diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index e69de29..89a0ff1 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -0,0 +1,2 @@ + +file(GLOB_RECURSE HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.h) \ No newline at end of file diff --git a/include/graph/graph.h b/include/graph/graph.h new file mode 100644 index 0000000..8c4025e --- /dev/null +++ b/include/graph/graph.h @@ -0,0 +1,41 @@ +#ifndef GRAPH_H +#define GRAPH_H + +#include +#include +#include + +#include "layer/layer.h" +#include "tensor/tensor.h" + +class Graph { + private: + std::unordered_map> layers_; + Tensor inputTensor_; + Tensor* outputTensor_; + int start_ = -1; + int end_ = -1; + bool bfs_helper(int start, int vert, bool flag, + std::vector* v_ord) const; + + public: + Graph(); + + void addLayer(std::shared_ptr lay); + void addEdge(std::shared_ptr layPrev, std::shared_ptr layNext); + void removeEdge(std::shared_ptr layPrev, + std::shared_ptr layNext); + void removeLayer(std::shared_ptr lay); + int getLayers() const; + int getEdges() const; + bool empty() const; + bool hasPath(std::shared_ptr layPrev, + std::shared_ptr layNext) const; + std::vector BFS(int start); + void setInput(std::shared_ptr lay, Tensor& vec); + void setOutput(std::shared_ptr lay, Tensor& vec); + void inference(); + ~Graph(); +}; + +#endif \ No newline at end of file diff --git a/include/layer/layer.h b/include/layer/layer.h new file mode 100644 index 0000000..315156b --- /dev/null +++ b/include/layer/layer.h @@ -0,0 +1,30 @@ + +#ifndef LAYER_H +#define LAYER_H + +#include +#include +#include + +#include "tensor/tensor.h" + +class Layer { + public: + int id; + std::string name; + std::list> neighbors_; + + Layer() = default; + Layer(const std::string& name); + Layer(std::string&& name); + + virtual ~Layer() = default; + void setID(int id) { this->id = id; } + int getID() const { return id; } + virtual void run(const Tensor& input, Tensor& output) {} + virtual Shape get_output_shape() { return Shape({1, 1, 1, 1}); } + + void addNeighbor(std::shared_ptr neighbor); + void removeNeighbor(std::shared_ptr neighbor); +}; +#endif \ No newline at end of file diff --git a/include/model_parser/model_parser.h b/include/model_parser/model_parser.h new file mode 100644 index 0000000..cf7ffdd --- /dev/null +++ b/include/model_parser/model_parser.h @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include + +#include "graph/graph.h" + +class AnyLayer : public Layer { + public: + std::string Name; + std::unordered_map Attributes; + std::vector Weights; + std::vector Bias; + + AnyLayer(const std::string& name); + ~AnyLayer() = default; + + void addNeighbor(Layer* neighbor); + void removeNeighbor(Layer* neighbor); +}; + +enum Model { ONNX, PYTORCH, OPENCV }; + +class ModelParser { + protected: + std::string m_filename; + + public: + virtual ~ModelParser() = default; + virtual Graph Parse() = 0; +}; \ No newline at end of file diff --git a/include/model_parser/onnx_model_parser.h b/include/model_parser/onnx_model_parser.h new file mode 100644 index 0000000..c3c8bcc --- /dev/null +++ b/include/model_parser/onnx_model_parser.h @@ -0,0 +1,31 @@ +#pragma once + +#include + +#include +#include +#include +#include +#include + +#include "graph/graph.h" +#include "model_parser/model_parser.h" + +class ONNX_ModelParser : public ModelParser { + private: + onnx::ModelProto m_model; + + std::unordered_map m_weights; + + public: + ONNX_ModelParser(const std::string& filename); + Graph Parse() override; + + private: + bool LoadModel(const std::string& filename); + bool ParseAttributes( + const onnx::NodeProto& node, + std::unordered_map& attributes); + bool ParseWeightsAndBias(const onnx::NodeProto& node, + const std::shared_ptr& any_layer); +}; diff --git a/include/onnx.pb.h b/include/onnx.pb.h new file mode 100644 index 0000000..cf13b1e --- /dev/null +++ b/include/onnx.pb.h @@ -0,0 +1,12909 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: onnx.proto +// Protobuf C++ Version: 5.29.3 + +#ifndef onnx_2eproto_2epb_2eh +#define onnx_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5029003 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/message_lite.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/generated_enum_util.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_onnx_2eproto + +namespace google { +namespace protobuf { +namespace internal { +template +::absl::string_view GetAnyMessageName(); +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_onnx_2eproto { + static const ::uint32_t offsets[]; +}; +namespace onnx { +class AttributeProto; +struct AttributeProtoDefaultTypeInternal; +extern AttributeProtoDefaultTypeInternal _AttributeProto_default_instance_; +class FunctionProto; +struct FunctionProtoDefaultTypeInternal; +extern FunctionProtoDefaultTypeInternal _FunctionProto_default_instance_; +class GraphProto; +struct GraphProtoDefaultTypeInternal; +extern GraphProtoDefaultTypeInternal _GraphProto_default_instance_; +class ModelProto; +struct ModelProtoDefaultTypeInternal; +extern ModelProtoDefaultTypeInternal _ModelProto_default_instance_; +class NodeProto; +struct NodeProtoDefaultTypeInternal; +extern NodeProtoDefaultTypeInternal _NodeProto_default_instance_; +class OperatorSetIdProto; +struct OperatorSetIdProtoDefaultTypeInternal; +extern OperatorSetIdProtoDefaultTypeInternal _OperatorSetIdProto_default_instance_; +class SparseTensorProto; +struct SparseTensorProtoDefaultTypeInternal; +extern SparseTensorProtoDefaultTypeInternal _SparseTensorProto_default_instance_; +class StringStringEntryProto; +struct StringStringEntryProtoDefaultTypeInternal; +extern StringStringEntryProtoDefaultTypeInternal _StringStringEntryProto_default_instance_; +class TensorAnnotation; +struct TensorAnnotationDefaultTypeInternal; +extern TensorAnnotationDefaultTypeInternal _TensorAnnotation_default_instance_; +class TensorProto; +struct TensorProtoDefaultTypeInternal; +extern TensorProtoDefaultTypeInternal _TensorProto_default_instance_; +class TensorProto_Segment; +struct TensorProto_SegmentDefaultTypeInternal; +extern TensorProto_SegmentDefaultTypeInternal _TensorProto_Segment_default_instance_; +class TensorShapeProto; +struct TensorShapeProtoDefaultTypeInternal; +extern TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_; +class TensorShapeProto_Dimension; +struct TensorShapeProto_DimensionDefaultTypeInternal; +extern TensorShapeProto_DimensionDefaultTypeInternal _TensorShapeProto_Dimension_default_instance_; +class TrainingInfoProto; +struct TrainingInfoProtoDefaultTypeInternal; +extern TrainingInfoProtoDefaultTypeInternal _TrainingInfoProto_default_instance_; +class TypeProto; +struct TypeProtoDefaultTypeInternal; +extern TypeProtoDefaultTypeInternal _TypeProto_default_instance_; +class TypeProto_Map; +struct TypeProto_MapDefaultTypeInternal; +extern TypeProto_MapDefaultTypeInternal _TypeProto_Map_default_instance_; +class TypeProto_Optional; +struct TypeProto_OptionalDefaultTypeInternal; +extern TypeProto_OptionalDefaultTypeInternal _TypeProto_Optional_default_instance_; +class TypeProto_Sequence; +struct TypeProto_SequenceDefaultTypeInternal; +extern TypeProto_SequenceDefaultTypeInternal _TypeProto_Sequence_default_instance_; +class TypeProto_SparseTensor; +struct TypeProto_SparseTensorDefaultTypeInternal; +extern TypeProto_SparseTensorDefaultTypeInternal _TypeProto_SparseTensor_default_instance_; +class TypeProto_Tensor; +struct TypeProto_TensorDefaultTypeInternal; +extern TypeProto_TensorDefaultTypeInternal _TypeProto_Tensor_default_instance_; +class ValueInfoProto; +struct ValueInfoProtoDefaultTypeInternal; +extern ValueInfoProtoDefaultTypeInternal _ValueInfoProto_default_instance_; +} // namespace onnx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace onnx { +enum AttributeProto_AttributeType : int { + AttributeProto_AttributeType_UNDEFINED = 0, + AttributeProto_AttributeType_FLOAT = 1, + AttributeProto_AttributeType_INT = 2, + AttributeProto_AttributeType_STRING = 3, + AttributeProto_AttributeType_TENSOR = 4, + AttributeProto_AttributeType_GRAPH = 5, + AttributeProto_AttributeType_SPARSE_TENSOR = 11, + AttributeProto_AttributeType_TYPE_PROTO = 13, + AttributeProto_AttributeType_FLOATS = 6, + AttributeProto_AttributeType_INTS = 7, + AttributeProto_AttributeType_STRINGS = 8, + AttributeProto_AttributeType_TENSORS = 9, + AttributeProto_AttributeType_GRAPHS = 10, + AttributeProto_AttributeType_SPARSE_TENSORS = 12, + AttributeProto_AttributeType_TYPE_PROTOS = 14, +}; + +bool AttributeProto_AttributeType_IsValid(int value); +extern const uint32_t AttributeProto_AttributeType_internal_data_[]; +constexpr AttributeProto_AttributeType AttributeProto_AttributeType_AttributeType_MIN = static_cast(0); +constexpr AttributeProto_AttributeType AttributeProto_AttributeType_AttributeType_MAX = static_cast(14); +constexpr int AttributeProto_AttributeType_AttributeType_ARRAYSIZE = 14 + 1; +const std::string& AttributeProto_AttributeType_Name(AttributeProto_AttributeType value); +template +const std::string& AttributeProto_AttributeType_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to AttributeType_Name()."); + return AttributeProto_AttributeType_Name(static_cast(value)); +} +bool AttributeProto_AttributeType_Parse(absl::string_view name, AttributeProto_AttributeType* value); +enum TensorProto_DataType : int { + TensorProto_DataType_UNDEFINED = 0, + TensorProto_DataType_FLOAT = 1, + TensorProto_DataType_UINT8 = 2, + TensorProto_DataType_INT8 = 3, + TensorProto_DataType_UINT16 = 4, + TensorProto_DataType_INT16 = 5, + TensorProto_DataType_INT32 = 6, + TensorProto_DataType_INT64 = 7, + TensorProto_DataType_STRING = 8, + TensorProto_DataType_BOOL = 9, + TensorProto_DataType_FLOAT16 = 10, + TensorProto_DataType_DOUBLE = 11, + TensorProto_DataType_UINT32 = 12, + TensorProto_DataType_UINT64 = 13, + TensorProto_DataType_COMPLEX64 = 14, + TensorProto_DataType_COMPLEX128 = 15, + TensorProto_DataType_BFLOAT16 = 16, + TensorProto_DataType_FLOAT8E4M3FN = 17, + TensorProto_DataType_FLOAT8E4M3FNUZ = 18, + TensorProto_DataType_FLOAT8E5M2 = 19, + TensorProto_DataType_FLOAT8E5M2FNUZ = 20, + TensorProto_DataType_UINT4 = 21, + TensorProto_DataType_INT4 = 22, + TensorProto_DataType_FLOAT4E2M1 = 23, +}; + +bool TensorProto_DataType_IsValid(int value); +extern const uint32_t TensorProto_DataType_internal_data_[]; +constexpr TensorProto_DataType TensorProto_DataType_DataType_MIN = static_cast(0); +constexpr TensorProto_DataType TensorProto_DataType_DataType_MAX = static_cast(23); +constexpr int TensorProto_DataType_DataType_ARRAYSIZE = 23 + 1; +const std::string& TensorProto_DataType_Name(TensorProto_DataType value); +template +const std::string& TensorProto_DataType_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to DataType_Name()."); + return TensorProto_DataType_Name(static_cast(value)); +} +bool TensorProto_DataType_Parse(absl::string_view name, TensorProto_DataType* value); +enum TensorProto_DataLocation : int { + TensorProto_DataLocation_DEFAULT = 0, + TensorProto_DataLocation_EXTERNAL = 1, +}; + +bool TensorProto_DataLocation_IsValid(int value); +extern const uint32_t TensorProto_DataLocation_internal_data_[]; +constexpr TensorProto_DataLocation TensorProto_DataLocation_DataLocation_MIN = static_cast(0); +constexpr TensorProto_DataLocation TensorProto_DataLocation_DataLocation_MAX = static_cast(1); +constexpr int TensorProto_DataLocation_DataLocation_ARRAYSIZE = 1 + 1; +const std::string& TensorProto_DataLocation_Name(TensorProto_DataLocation value); +template +const std::string& TensorProto_DataLocation_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to DataLocation_Name()."); + return TensorProto_DataLocation_Name(static_cast(value)); +} +bool TensorProto_DataLocation_Parse(absl::string_view name, TensorProto_DataLocation* value); +enum Version : int { + _START_VERSION = 0, + IR_VERSION_2017_10_10 = 1, + IR_VERSION_2017_10_30 = 2, + IR_VERSION_2017_11_3 = 3, + IR_VERSION_2019_1_22 = 4, + IR_VERSION_2019_3_18 = 5, + IR_VERSION_2019_9_19 = 6, + IR_VERSION_2020_5_8 = 7, + IR_VERSION_2021_7_30 = 8, + IR_VERSION_2023_5_5 = 9, + IR_VERSION_2024_3_25 = 10, + IR_VERSION = 11, +}; + +bool Version_IsValid(int value); +extern const uint32_t Version_internal_data_[]; +constexpr Version Version_MIN = static_cast(0); +constexpr Version Version_MAX = static_cast(11); +constexpr int Version_ARRAYSIZE = 11 + 1; +const std::string& Version_Name(Version value); +template +const std::string& Version_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to Version_Name()."); + return Version_Name(static_cast(value)); +} +bool Version_Parse(absl::string_view name, Version* value); +enum OperatorStatus : int { + EXPERIMENTAL = 0, + STABLE = 1, +}; + +bool OperatorStatus_IsValid(int value); +extern const uint32_t OperatorStatus_internal_data_[]; +constexpr OperatorStatus OperatorStatus_MIN = static_cast(0); +constexpr OperatorStatus OperatorStatus_MAX = static_cast(1); +constexpr int OperatorStatus_ARRAYSIZE = 1 + 1; +const std::string& OperatorStatus_Name(OperatorStatus value); +template +const std::string& OperatorStatus_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to OperatorStatus_Name()."); + return OperatorStatus_Name(static_cast(value)); +} +bool OperatorStatus_Parse(absl::string_view name, OperatorStatus* value); + +// =================================================================== + + +// ------------------------------------------------------------------- + +class TensorShapeProto_Dimension final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TensorShapeProto.Dimension) */ { + public: + inline TensorShapeProto_Dimension() : TensorShapeProto_Dimension(nullptr) {} + ~TensorShapeProto_Dimension() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TensorShapeProto_Dimension* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TensorShapeProto_Dimension)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TensorShapeProto_Dimension( + ::google::protobuf::internal::ConstantInitialized); + + inline TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from) : TensorShapeProto_Dimension(nullptr, from) {} + inline TensorShapeProto_Dimension(TensorShapeProto_Dimension&& from) noexcept + : TensorShapeProto_Dimension(nullptr, std::move(from)) {} + inline TensorShapeProto_Dimension& operator=(const TensorShapeProto_Dimension& from) { + CopyFrom(from); + return *this; + } + inline TensorShapeProto_Dimension& operator=(TensorShapeProto_Dimension&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TensorShapeProto_Dimension& default_instance() { + return *internal_default_instance(); + } + enum ValueCase { + kDimValue = 1, + kDimParam = 2, + VALUE_NOT_SET = 0, + }; + static inline const TensorShapeProto_Dimension* internal_default_instance() { + return reinterpret_cast( + &_TensorShapeProto_Dimension_default_instance_); + } + static constexpr int kIndexInFileMessages = 11; + friend void swap(TensorShapeProto_Dimension& a, TensorShapeProto_Dimension& b) { a.Swap(&b); } + inline void Swap(TensorShapeProto_Dimension* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorShapeProto_Dimension* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorShapeProto_Dimension* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TensorShapeProto_Dimension& from); + void MergeFrom(const TensorShapeProto_Dimension& from) { TensorShapeProto_Dimension::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TensorShapeProto_Dimension* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TensorShapeProto.Dimension"; } + + protected: + explicit TensorShapeProto_Dimension(::google::protobuf::Arena* arena); + TensorShapeProto_Dimension(::google::protobuf::Arena* arena, const TensorShapeProto_Dimension& from); + TensorShapeProto_Dimension(::google::protobuf::Arena* arena, TensorShapeProto_Dimension&& from) noexcept + : TensorShapeProto_Dimension(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<32> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDenotationFieldNumber = 3, + kDimValueFieldNumber = 1, + kDimParamFieldNumber = 2, + }; + // optional string denotation = 3; + bool has_denotation() const; + void clear_denotation() ; + const std::string& denotation() const; + template + void set_denotation(Arg_&& arg, Args_... args); + std::string* mutable_denotation(); + PROTOBUF_NODISCARD std::string* release_denotation(); + void set_allocated_denotation(std::string* value); + + private: + const std::string& _internal_denotation() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_denotation( + const std::string& value); + std::string* _internal_mutable_denotation(); + + public: + // int64 dim_value = 1; + bool has_dim_value() const; + void clear_dim_value() ; + ::int64_t dim_value() const; + void set_dim_value(::int64_t value); + + private: + ::int64_t _internal_dim_value() const; + void _internal_set_dim_value(::int64_t value); + + public: + // string dim_param = 2; + bool has_dim_param() const; + void clear_dim_param() ; + const std::string& dim_param() const; + template + void set_dim_param(Arg_&& arg, Args_... args); + std::string* mutable_dim_param(); + PROTOBUF_NODISCARD std::string* release_dim_param(); + void set_allocated_dim_param(std::string* value); + + private: + const std::string& _internal_dim_param() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_dim_param( + const std::string& value); + std::string* _internal_mutable_dim_param(); + + public: + void clear_value(); + ValueCase value_case() const; + // @@protoc_insertion_point(class_scope:onnx.TensorShapeProto.Dimension) + private: + class _Internal; + void set_has_dim_value(); + void set_has_dim_param(); + inline bool has_value() const; + inline void clear_has_value(); + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 3, 0, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TensorShapeProto_Dimension& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr denotation_; + union ValueUnion { + constexpr ValueUnion() : _constinit_{} {} + ::google::protobuf::internal::ConstantInitialized _constinit_; + ::int64_t dim_value_; + ::google::protobuf::internal::ArenaStringPtr dim_param_; + } value_; + ::uint32_t _oneof_case_[1]; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorProto_Segment final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TensorProto.Segment) */ { + public: + inline TensorProto_Segment() : TensorProto_Segment(nullptr) {} + ~TensorProto_Segment() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TensorProto_Segment* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TensorProto_Segment)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TensorProto_Segment( + ::google::protobuf::internal::ConstantInitialized); + + inline TensorProto_Segment(const TensorProto_Segment& from) : TensorProto_Segment(nullptr, from) {} + inline TensorProto_Segment(TensorProto_Segment&& from) noexcept + : TensorProto_Segment(nullptr, std::move(from)) {} + inline TensorProto_Segment& operator=(const TensorProto_Segment& from) { + CopyFrom(from); + return *this; + } + inline TensorProto_Segment& operator=(TensorProto_Segment&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TensorProto_Segment& default_instance() { + return *internal_default_instance(); + } + static inline const TensorProto_Segment* internal_default_instance() { + return reinterpret_cast( + &_TensorProto_Segment_default_instance_); + } + static constexpr int kIndexInFileMessages = 8; + friend void swap(TensorProto_Segment& a, TensorProto_Segment& b) { a.Swap(&b); } + inline void Swap(TensorProto_Segment* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorProto_Segment* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorProto_Segment* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TensorProto_Segment& from); + void MergeFrom(const TensorProto_Segment& from) { TensorProto_Segment::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TensorProto_Segment* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TensorProto.Segment"; } + + protected: + explicit TensorProto_Segment(::google::protobuf::Arena* arena); + TensorProto_Segment(::google::protobuf::Arena* arena, const TensorProto_Segment& from); + TensorProto_Segment(::google::protobuf::Arena* arena, TensorProto_Segment&& from) noexcept + : TensorProto_Segment(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<25> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kBeginFieldNumber = 1, + kEndFieldNumber = 2, + }; + // optional int64 begin = 1; + bool has_begin() const; + void clear_begin() ; + ::int64_t begin() const; + void set_begin(::int64_t value); + + private: + ::int64_t _internal_begin() const; + void _internal_set_begin(::int64_t value); + + public: + // optional int64 end = 2; + bool has_end() const; + void clear_end() ; + ::int64_t end() const; + void set_end(::int64_t value); + + private: + ::int64_t _internal_end() const; + void _internal_set_end(::int64_t value); + + public: + // @@protoc_insertion_point(class_scope:onnx.TensorProto.Segment) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TensorProto_Segment& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::int64_t begin_; + ::int64_t end_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class StringStringEntryProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.StringStringEntryProto) */ { + public: + inline StringStringEntryProto() : StringStringEntryProto(nullptr) {} + ~StringStringEntryProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(StringStringEntryProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(StringStringEntryProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR StringStringEntryProto( + ::google::protobuf::internal::ConstantInitialized); + + inline StringStringEntryProto(const StringStringEntryProto& from) : StringStringEntryProto(nullptr, from) {} + inline StringStringEntryProto(StringStringEntryProto&& from) noexcept + : StringStringEntryProto(nullptr, std::move(from)) {} + inline StringStringEntryProto& operator=(const StringStringEntryProto& from) { + CopyFrom(from); + return *this; + } + inline StringStringEntryProto& operator=(StringStringEntryProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const StringStringEntryProto& default_instance() { + return *internal_default_instance(); + } + static inline const StringStringEntryProto* internal_default_instance() { + return reinterpret_cast( + &_StringStringEntryProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 5; + friend void swap(StringStringEntryProto& a, StringStringEntryProto& b) { a.Swap(&b); } + inline void Swap(StringStringEntryProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StringStringEntryProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StringStringEntryProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const StringStringEntryProto& from); + void MergeFrom(const StringStringEntryProto& from) { StringStringEntryProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(StringStringEntryProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.StringStringEntryProto"; } + + protected: + explicit StringStringEntryProto(::google::protobuf::Arena* arena); + StringStringEntryProto(::google::protobuf::Arena* arena, const StringStringEntryProto& from); + StringStringEntryProto(::google::protobuf::Arena* arena, StringStringEntryProto&& from) noexcept + : StringStringEntryProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<28> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kKeyFieldNumber = 1, + kValueFieldNumber = 2, + }; + // optional string key = 1; + bool has_key() const; + void clear_key() ; + const std::string& key() const; + template + void set_key(Arg_&& arg, Args_... args); + std::string* mutable_key(); + PROTOBUF_NODISCARD std::string* release_key(); + void set_allocated_key(std::string* value); + + private: + const std::string& _internal_key() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_key( + const std::string& value); + std::string* _internal_mutable_key(); + + public: + // optional string value = 2; + bool has_value() const; + void clear_value() ; + const std::string& value() const; + template + void set_value(Arg_&& arg, Args_... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); + + private: + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value( + const std::string& value); + std::string* _internal_mutable_value(); + + public: + // @@protoc_insertion_point(class_scope:onnx.StringStringEntryProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const StringStringEntryProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr key_; + ::google::protobuf::internal::ArenaStringPtr value_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class OperatorSetIdProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.OperatorSetIdProto) */ { + public: + inline OperatorSetIdProto() : OperatorSetIdProto(nullptr) {} + ~OperatorSetIdProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(OperatorSetIdProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(OperatorSetIdProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR OperatorSetIdProto( + ::google::protobuf::internal::ConstantInitialized); + + inline OperatorSetIdProto(const OperatorSetIdProto& from) : OperatorSetIdProto(nullptr, from) {} + inline OperatorSetIdProto(OperatorSetIdProto&& from) noexcept + : OperatorSetIdProto(nullptr, std::move(from)) {} + inline OperatorSetIdProto& operator=(const OperatorSetIdProto& from) { + CopyFrom(from); + return *this; + } + inline OperatorSetIdProto& operator=(OperatorSetIdProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const OperatorSetIdProto& default_instance() { + return *internal_default_instance(); + } + static inline const OperatorSetIdProto* internal_default_instance() { + return reinterpret_cast( + &_OperatorSetIdProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 19; + friend void swap(OperatorSetIdProto& a, OperatorSetIdProto& b) { a.Swap(&b); } + inline void Swap(OperatorSetIdProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(OperatorSetIdProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + OperatorSetIdProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const OperatorSetIdProto& from); + void MergeFrom(const OperatorSetIdProto& from) { OperatorSetIdProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(OperatorSetIdProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.OperatorSetIdProto"; } + + protected: + explicit OperatorSetIdProto(::google::protobuf::Arena* arena); + OperatorSetIdProto(::google::protobuf::Arena* arena, const OperatorSetIdProto& from); + OperatorSetIdProto(::google::protobuf::Arena* arena, OperatorSetIdProto&& from) noexcept + : OperatorSetIdProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<24> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDomainFieldNumber = 1, + kVersionFieldNumber = 2, + }; + // optional string domain = 1; + bool has_domain() const; + void clear_domain() ; + const std::string& domain() const; + template + void set_domain(Arg_&& arg, Args_... args); + std::string* mutable_domain(); + PROTOBUF_NODISCARD std::string* release_domain(); + void set_allocated_domain(std::string* value); + + private: + const std::string& _internal_domain() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_domain( + const std::string& value); + std::string* _internal_mutable_domain(); + + public: + // optional int64 version = 2; + bool has_version() const; + void clear_version() ; + ::int64_t version() const; + void set_version(::int64_t value); + + private: + ::int64_t _internal_version() const; + void _internal_set_version(::int64_t value); + + public: + // @@protoc_insertion_point(class_scope:onnx.OperatorSetIdProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const OperatorSetIdProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr domain_; + ::int64_t version_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorShapeProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TensorShapeProto) */ { + public: + inline TensorShapeProto() : TensorShapeProto(nullptr) {} + ~TensorShapeProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TensorShapeProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TensorShapeProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TensorShapeProto( + ::google::protobuf::internal::ConstantInitialized); + + inline TensorShapeProto(const TensorShapeProto& from) : TensorShapeProto(nullptr, from) {} + inline TensorShapeProto(TensorShapeProto&& from) noexcept + : TensorShapeProto(nullptr, std::move(from)) {} + inline TensorShapeProto& operator=(const TensorShapeProto& from) { + CopyFrom(from); + return *this; + } + inline TensorShapeProto& operator=(TensorShapeProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TensorShapeProto& default_instance() { + return *internal_default_instance(); + } + static inline const TensorShapeProto* internal_default_instance() { + return reinterpret_cast( + &_TensorShapeProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 12; + friend void swap(TensorShapeProto& a, TensorShapeProto& b) { a.Swap(&b); } + inline void Swap(TensorShapeProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorShapeProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorShapeProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TensorShapeProto& from); + void MergeFrom(const TensorShapeProto& from) { TensorShapeProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TensorShapeProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TensorShapeProto"; } + + protected: + explicit TensorShapeProto(::google::protobuf::Arena* arena); + TensorShapeProto(::google::protobuf::Arena* arena, const TensorShapeProto& from); + TensorShapeProto(::google::protobuf::Arena* arena, TensorShapeProto&& from) noexcept + : TensorShapeProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<22> _class_data_; + + public: + // nested types ---------------------------------------------------- + using Dimension = TensorShapeProto_Dimension; + + // accessors ------------------------------------------------------- + enum : int { + kDimFieldNumber = 1, + }; + // repeated .onnx.TensorShapeProto.Dimension dim = 1; + int dim_size() const; + private: + int _internal_dim_size() const; + + public: + void clear_dim() ; + ::onnx::TensorShapeProto_Dimension* mutable_dim(int index); + ::google::protobuf::RepeatedPtrField<::onnx::TensorShapeProto_Dimension>* mutable_dim(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::TensorShapeProto_Dimension>& _internal_dim() const; + ::google::protobuf::RepeatedPtrField<::onnx::TensorShapeProto_Dimension>* _internal_mutable_dim(); + public: + const ::onnx::TensorShapeProto_Dimension& dim(int index) const; + ::onnx::TensorShapeProto_Dimension* add_dim(); + const ::google::protobuf::RepeatedPtrField<::onnx::TensorShapeProto_Dimension>& dim() const; + // @@protoc_insertion_point(class_scope:onnx.TensorShapeProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TensorShapeProto& from_msg); + ::google::protobuf::RepeatedPtrField< ::onnx::TensorShapeProto_Dimension > dim_; + ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TensorProto) */ { + public: + inline TensorProto() : TensorProto(nullptr) {} + ~TensorProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TensorProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TensorProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TensorProto( + ::google::protobuf::internal::ConstantInitialized); + + inline TensorProto(const TensorProto& from) : TensorProto(nullptr, from) {} + inline TensorProto(TensorProto&& from) noexcept + : TensorProto(nullptr, std::move(from)) {} + inline TensorProto& operator=(const TensorProto& from) { + CopyFrom(from); + return *this; + } + inline TensorProto& operator=(TensorProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TensorProto& default_instance() { + return *internal_default_instance(); + } + static inline const TensorProto* internal_default_instance() { + return reinterpret_cast( + &_TensorProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 9; + friend void swap(TensorProto& a, TensorProto& b) { a.Swap(&b); } + inline void Swap(TensorProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TensorProto& from); + void MergeFrom(const TensorProto& from) { TensorProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TensorProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TensorProto"; } + + protected: + explicit TensorProto(::google::protobuf::Arena* arena); + TensorProto(::google::protobuf::Arena* arena, const TensorProto& from); + TensorProto(::google::protobuf::Arena* arena, TensorProto&& from) noexcept + : TensorProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<17> _class_data_; + + public: + // nested types ---------------------------------------------------- + using Segment = TensorProto_Segment; + using DataType = TensorProto_DataType; + static constexpr DataType UNDEFINED = TensorProto_DataType_UNDEFINED; + static constexpr DataType FLOAT = TensorProto_DataType_FLOAT; + static constexpr DataType UINT8 = TensorProto_DataType_UINT8; + static constexpr DataType INT8 = TensorProto_DataType_INT8; + static constexpr DataType UINT16 = TensorProto_DataType_UINT16; + static constexpr DataType INT16 = TensorProto_DataType_INT16; + static constexpr DataType INT32 = TensorProto_DataType_INT32; + static constexpr DataType INT64 = TensorProto_DataType_INT64; + static constexpr DataType STRING = TensorProto_DataType_STRING; + static constexpr DataType BOOL = TensorProto_DataType_BOOL; + static constexpr DataType FLOAT16 = TensorProto_DataType_FLOAT16; + static constexpr DataType DOUBLE = TensorProto_DataType_DOUBLE; + static constexpr DataType UINT32 = TensorProto_DataType_UINT32; + static constexpr DataType UINT64 = TensorProto_DataType_UINT64; + static constexpr DataType COMPLEX64 = TensorProto_DataType_COMPLEX64; + static constexpr DataType COMPLEX128 = TensorProto_DataType_COMPLEX128; + static constexpr DataType BFLOAT16 = TensorProto_DataType_BFLOAT16; + static constexpr DataType FLOAT8E4M3FN = TensorProto_DataType_FLOAT8E4M3FN; + static constexpr DataType FLOAT8E4M3FNUZ = TensorProto_DataType_FLOAT8E4M3FNUZ; + static constexpr DataType FLOAT8E5M2 = TensorProto_DataType_FLOAT8E5M2; + static constexpr DataType FLOAT8E5M2FNUZ = TensorProto_DataType_FLOAT8E5M2FNUZ; + static constexpr DataType UINT4 = TensorProto_DataType_UINT4; + static constexpr DataType INT4 = TensorProto_DataType_INT4; + static constexpr DataType FLOAT4E2M1 = TensorProto_DataType_FLOAT4E2M1; + static inline bool DataType_IsValid(int value) { + return TensorProto_DataType_IsValid(value); + } + static constexpr DataType DataType_MIN = TensorProto_DataType_DataType_MIN; + static constexpr DataType DataType_MAX = TensorProto_DataType_DataType_MAX; + static constexpr int DataType_ARRAYSIZE = TensorProto_DataType_DataType_ARRAYSIZE; + template + static inline const std::string& DataType_Name(T value) { + return TensorProto_DataType_Name(value); + } + static inline bool DataType_Parse(absl::string_view name, DataType* value) { + return TensorProto_DataType_Parse(name, value); + } + using DataLocation = TensorProto_DataLocation; + static constexpr DataLocation DEFAULT = TensorProto_DataLocation_DEFAULT; + static constexpr DataLocation EXTERNAL = TensorProto_DataLocation_EXTERNAL; + static inline bool DataLocation_IsValid(int value) { + return TensorProto_DataLocation_IsValid(value); + } + static constexpr DataLocation DataLocation_MIN = TensorProto_DataLocation_DataLocation_MIN; + static constexpr DataLocation DataLocation_MAX = TensorProto_DataLocation_DataLocation_MAX; + static constexpr int DataLocation_ARRAYSIZE = TensorProto_DataLocation_DataLocation_ARRAYSIZE; + template + static inline const std::string& DataLocation_Name(T value) { + return TensorProto_DataLocation_Name(value); + } + static inline bool DataLocation_Parse(absl::string_view name, DataLocation* value) { + return TensorProto_DataLocation_Parse(name, value); + } + + // accessors ------------------------------------------------------- + enum : int { + kDimsFieldNumber = 1, + kFloatDataFieldNumber = 4, + kInt32DataFieldNumber = 5, + kStringDataFieldNumber = 6, + kInt64DataFieldNumber = 7, + kDoubleDataFieldNumber = 10, + kUint64DataFieldNumber = 11, + kExternalDataFieldNumber = 13, + kMetadataPropsFieldNumber = 16, + kNameFieldNumber = 8, + kRawDataFieldNumber = 9, + kDocStringFieldNumber = 12, + kSegmentFieldNumber = 3, + kDataTypeFieldNumber = 2, + kDataLocationFieldNumber = 14, + }; + // repeated int64 dims = 1; + int dims_size() const; + private: + int _internal_dims_size() const; + + public: + void clear_dims() ; + ::int64_t dims(int index) const; + void set_dims(int index, ::int64_t value); + void add_dims(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& dims() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_dims(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_dims() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_dims(); + + public: + // repeated float float_data = 4 [packed = true]; + int float_data_size() const; + private: + int _internal_float_data_size() const; + + public: + void clear_float_data() ; + float float_data(int index) const; + void set_float_data(int index, float value); + void add_float_data(float value); + const ::google::protobuf::RepeatedField& float_data() const; + ::google::protobuf::RepeatedField* mutable_float_data(); + + private: + const ::google::protobuf::RepeatedField& _internal_float_data() const; + ::google::protobuf::RepeatedField* _internal_mutable_float_data(); + + public: + // repeated int32 int32_data = 5 [packed = true]; + int int32_data_size() const; + private: + int _internal_int32_data_size() const; + + public: + void clear_int32_data() ; + ::int32_t int32_data(int index) const; + void set_int32_data(int index, ::int32_t value); + void add_int32_data(::int32_t value); + const ::google::protobuf::RepeatedField<::int32_t>& int32_data() const; + ::google::protobuf::RepeatedField<::int32_t>* mutable_int32_data(); + + private: + const ::google::protobuf::RepeatedField<::int32_t>& _internal_int32_data() const; + ::google::protobuf::RepeatedField<::int32_t>* _internal_mutable_int32_data(); + + public: + // repeated bytes string_data = 6; + int string_data_size() const; + private: + int _internal_string_data_size() const; + + public: + void clear_string_data() ; + const std::string& string_data(int index) const; + std::string* mutable_string_data(int index); + template + void set_string_data(int index, Arg_&& value, Args_... args); + std::string* add_string_data(); + template + void add_string_data(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField& string_data() const; + ::google::protobuf::RepeatedPtrField* mutable_string_data(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_string_data() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_string_data(); + + public: + // repeated int64 int64_data = 7 [packed = true]; + int int64_data_size() const; + private: + int _internal_int64_data_size() const; + + public: + void clear_int64_data() ; + ::int64_t int64_data(int index) const; + void set_int64_data(int index, ::int64_t value); + void add_int64_data(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& int64_data() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_int64_data(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_int64_data() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_int64_data(); + + public: + // repeated double double_data = 10 [packed = true]; + int double_data_size() const; + private: + int _internal_double_data_size() const; + + public: + void clear_double_data() ; + double double_data(int index) const; + void set_double_data(int index, double value); + void add_double_data(double value); + const ::google::protobuf::RepeatedField& double_data() const; + ::google::protobuf::RepeatedField* mutable_double_data(); + + private: + const ::google::protobuf::RepeatedField& _internal_double_data() const; + ::google::protobuf::RepeatedField* _internal_mutable_double_data(); + + public: + // repeated uint64 uint64_data = 11 [packed = true]; + int uint64_data_size() const; + private: + int _internal_uint64_data_size() const; + + public: + void clear_uint64_data() ; + ::uint64_t uint64_data(int index) const; + void set_uint64_data(int index, ::uint64_t value); + void add_uint64_data(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& uint64_data() const; + ::google::protobuf::RepeatedField<::uint64_t>* mutable_uint64_data(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_uint64_data() const; + ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_uint64_data(); + + public: + // repeated .onnx.StringStringEntryProto external_data = 13; + int external_data_size() const; + private: + int _internal_external_data_size() const; + + public: + void clear_external_data() ; + ::onnx::StringStringEntryProto* mutable_external_data(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_external_data(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_external_data() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_external_data(); + public: + const ::onnx::StringStringEntryProto& external_data(int index) const; + ::onnx::StringStringEntryProto* add_external_data(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& external_data() const; + // repeated .onnx.StringStringEntryProto metadata_props = 16; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + + public: + void clear_metadata_props() ; + ::onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_metadata_props(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_metadata_props() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_metadata_props(); + public: + const ::onnx::StringStringEntryProto& metadata_props(int index) const; + ::onnx::StringStringEntryProto* add_metadata_props(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& metadata_props() const; + // optional string name = 8; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional bytes raw_data = 9; + bool has_raw_data() const; + void clear_raw_data() ; + const std::string& raw_data() const; + template + void set_raw_data(Arg_&& arg, Args_... args); + std::string* mutable_raw_data(); + PROTOBUF_NODISCARD std::string* release_raw_data(); + void set_allocated_raw_data(std::string* value); + + private: + const std::string& _internal_raw_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_raw_data( + const std::string& value); + std::string* _internal_mutable_raw_data(); + + public: + // optional string doc_string = 12; + bool has_doc_string() const; + void clear_doc_string() ; + const std::string& doc_string() const; + template + void set_doc_string(Arg_&& arg, Args_... args); + std::string* mutable_doc_string(); + PROTOBUF_NODISCARD std::string* release_doc_string(); + void set_allocated_doc_string(std::string* value); + + private: + const std::string& _internal_doc_string() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_doc_string( + const std::string& value); + std::string* _internal_mutable_doc_string(); + + public: + // optional .onnx.TensorProto.Segment segment = 3; + bool has_segment() const; + void clear_segment() ; + const ::onnx::TensorProto_Segment& segment() const; + PROTOBUF_NODISCARD ::onnx::TensorProto_Segment* release_segment(); + ::onnx::TensorProto_Segment* mutable_segment(); + void set_allocated_segment(::onnx::TensorProto_Segment* value); + void unsafe_arena_set_allocated_segment(::onnx::TensorProto_Segment* value); + ::onnx::TensorProto_Segment* unsafe_arena_release_segment(); + + private: + const ::onnx::TensorProto_Segment& _internal_segment() const; + ::onnx::TensorProto_Segment* _internal_mutable_segment(); + + public: + // optional int32 data_type = 2; + bool has_data_type() const; + void clear_data_type() ; + ::int32_t data_type() const; + void set_data_type(::int32_t value); + + private: + ::int32_t _internal_data_type() const; + void _internal_set_data_type(::int32_t value); + + public: + // optional .onnx.TensorProto.DataLocation data_location = 14; + bool has_data_location() const; + void clear_data_location() ; + ::onnx::TensorProto_DataLocation data_location() const; + void set_data_location(::onnx::TensorProto_DataLocation value); + + private: + ::onnx::TensorProto_DataLocation _internal_data_location() const; + void _internal_set_data_location(::onnx::TensorProto_DataLocation value); + + public: + // @@protoc_insertion_point(class_scope:onnx.TensorProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 4, 15, 4, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TensorProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::int64_t> dims_; + ::google::protobuf::RepeatedField float_data_; + ::google::protobuf::RepeatedField<::int32_t> int32_data_; + ::google::protobuf::internal::CachedSize _int32_data_cached_byte_size_; + ::google::protobuf::RepeatedPtrField string_data_; + ::google::protobuf::RepeatedField<::int64_t> int64_data_; + ::google::protobuf::internal::CachedSize _int64_data_cached_byte_size_; + ::google::protobuf::RepeatedField double_data_; + ::google::protobuf::RepeatedField<::uint64_t> uint64_data_; + ::google::protobuf::internal::CachedSize _uint64_data_cached_byte_size_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > external_data_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > metadata_props_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr raw_data_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::onnx::TensorProto_Segment* segment_; + ::int32_t data_type_; + int data_location_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorAnnotation final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TensorAnnotation) */ { + public: + inline TensorAnnotation() : TensorAnnotation(nullptr) {} + ~TensorAnnotation() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TensorAnnotation* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TensorAnnotation)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TensorAnnotation( + ::google::protobuf::internal::ConstantInitialized); + + inline TensorAnnotation(const TensorAnnotation& from) : TensorAnnotation(nullptr, from) {} + inline TensorAnnotation(TensorAnnotation&& from) noexcept + : TensorAnnotation(nullptr, std::move(from)) {} + inline TensorAnnotation& operator=(const TensorAnnotation& from) { + CopyFrom(from); + return *this; + } + inline TensorAnnotation& operator=(TensorAnnotation&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TensorAnnotation& default_instance() { + return *internal_default_instance(); + } + static inline const TensorAnnotation* internal_default_instance() { + return reinterpret_cast( + &_TensorAnnotation_default_instance_); + } + static constexpr int kIndexInFileMessages = 6; + friend void swap(TensorAnnotation& a, TensorAnnotation& b) { a.Swap(&b); } + inline void Swap(TensorAnnotation* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorAnnotation* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorAnnotation* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TensorAnnotation& from); + void MergeFrom(const TensorAnnotation& from) { TensorAnnotation::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TensorAnnotation* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TensorAnnotation"; } + + protected: + explicit TensorAnnotation(::google::protobuf::Arena* arena); + TensorAnnotation(::google::protobuf::Arena* arena, const TensorAnnotation& from); + TensorAnnotation(::google::protobuf::Arena* arena, TensorAnnotation&& from) noexcept + : TensorAnnotation(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<22> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kQuantParameterTensorNamesFieldNumber = 2, + kTensorNameFieldNumber = 1, + }; + // repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2; + int quant_parameter_tensor_names_size() const; + private: + int _internal_quant_parameter_tensor_names_size() const; + + public: + void clear_quant_parameter_tensor_names() ; + ::onnx::StringStringEntryProto* mutable_quant_parameter_tensor_names(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_quant_parameter_tensor_names(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_quant_parameter_tensor_names() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_quant_parameter_tensor_names(); + public: + const ::onnx::StringStringEntryProto& quant_parameter_tensor_names(int index) const; + ::onnx::StringStringEntryProto* add_quant_parameter_tensor_names(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& quant_parameter_tensor_names() const; + // optional string tensor_name = 1; + bool has_tensor_name() const; + void clear_tensor_name() ; + const std::string& tensor_name() const; + template + void set_tensor_name(Arg_&& arg, Args_... args); + std::string* mutable_tensor_name(); + PROTOBUF_NODISCARD std::string* release_tensor_name(); + void set_allocated_tensor_name(std::string* value); + + private: + const std::string& _internal_tensor_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tensor_name( + const std::string& value); + std::string* _internal_mutable_tensor_name(); + + public: + // @@protoc_insertion_point(class_scope:onnx.TensorAnnotation) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TensorAnnotation& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > quant_parameter_tensor_names_; + ::google::protobuf::internal::ArenaStringPtr tensor_name_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto_Tensor final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TypeProto.Tensor) */ { + public: + inline TypeProto_Tensor() : TypeProto_Tensor(nullptr) {} + ~TypeProto_Tensor() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TypeProto_Tensor* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeProto_Tensor)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TypeProto_Tensor( + ::google::protobuf::internal::ConstantInitialized); + + inline TypeProto_Tensor(const TypeProto_Tensor& from) : TypeProto_Tensor(nullptr, from) {} + inline TypeProto_Tensor(TypeProto_Tensor&& from) noexcept + : TypeProto_Tensor(nullptr, std::move(from)) {} + inline TypeProto_Tensor& operator=(const TypeProto_Tensor& from) { + CopyFrom(from); + return *this; + } + inline TypeProto_Tensor& operator=(TypeProto_Tensor&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto_Tensor& default_instance() { + return *internal_default_instance(); + } + static inline const TypeProto_Tensor* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_Tensor_default_instance_); + } + static constexpr int kIndexInFileMessages = 13; + friend void swap(TypeProto_Tensor& a, TypeProto_Tensor& b) { a.Swap(&b); } + inline void Swap(TypeProto_Tensor* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto_Tensor* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto_Tensor* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TypeProto_Tensor& from); + void MergeFrom(const TypeProto_Tensor& from) { TypeProto_Tensor::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TypeProto_Tensor* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TypeProto.Tensor"; } + + protected: + explicit TypeProto_Tensor(::google::protobuf::Arena* arena); + TypeProto_Tensor(::google::protobuf::Arena* arena, const TypeProto_Tensor& from); + TypeProto_Tensor(::google::protobuf::Arena* arena, TypeProto_Tensor&& from) noexcept + : TypeProto_Tensor(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<22> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kShapeFieldNumber = 2, + kElemTypeFieldNumber = 1, + }; + // optional .onnx.TensorShapeProto shape = 2; + bool has_shape() const; + void clear_shape() ; + const ::onnx::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::onnx::TensorShapeProto* release_shape(); + ::onnx::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::onnx::TensorShapeProto* value); + void unsafe_arena_set_allocated_shape(::onnx::TensorShapeProto* value); + ::onnx::TensorShapeProto* unsafe_arena_release_shape(); + + private: + const ::onnx::TensorShapeProto& _internal_shape() const; + ::onnx::TensorShapeProto* _internal_mutable_shape(); + + public: + // optional int32 elem_type = 1; + bool has_elem_type() const; + void clear_elem_type() ; + ::int32_t elem_type() const; + void set_elem_type(::int32_t value); + + private: + ::int32_t _internal_elem_type() const; + void _internal_set_elem_type(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:onnx.TypeProto.Tensor) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TypeProto_Tensor& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::onnx::TensorShapeProto* shape_; + ::int32_t elem_type_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto_SparseTensor final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TypeProto.SparseTensor) */ { + public: + inline TypeProto_SparseTensor() : TypeProto_SparseTensor(nullptr) {} + ~TypeProto_SparseTensor() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TypeProto_SparseTensor* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeProto_SparseTensor)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TypeProto_SparseTensor( + ::google::protobuf::internal::ConstantInitialized); + + inline TypeProto_SparseTensor(const TypeProto_SparseTensor& from) : TypeProto_SparseTensor(nullptr, from) {} + inline TypeProto_SparseTensor(TypeProto_SparseTensor&& from) noexcept + : TypeProto_SparseTensor(nullptr, std::move(from)) {} + inline TypeProto_SparseTensor& operator=(const TypeProto_SparseTensor& from) { + CopyFrom(from); + return *this; + } + inline TypeProto_SparseTensor& operator=(TypeProto_SparseTensor&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto_SparseTensor& default_instance() { + return *internal_default_instance(); + } + static inline const TypeProto_SparseTensor* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_SparseTensor_default_instance_); + } + static constexpr int kIndexInFileMessages = 17; + friend void swap(TypeProto_SparseTensor& a, TypeProto_SparseTensor& b) { a.Swap(&b); } + inline void Swap(TypeProto_SparseTensor* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto_SparseTensor* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto_SparseTensor* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TypeProto_SparseTensor& from); + void MergeFrom(const TypeProto_SparseTensor& from) { TypeProto_SparseTensor::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TypeProto_SparseTensor* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TypeProto.SparseTensor"; } + + protected: + explicit TypeProto_SparseTensor(::google::protobuf::Arena* arena); + TypeProto_SparseTensor(::google::protobuf::Arena* arena, const TypeProto_SparseTensor& from); + TypeProto_SparseTensor(::google::protobuf::Arena* arena, TypeProto_SparseTensor&& from) noexcept + : TypeProto_SparseTensor(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<28> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kShapeFieldNumber = 2, + kElemTypeFieldNumber = 1, + }; + // optional .onnx.TensorShapeProto shape = 2; + bool has_shape() const; + void clear_shape() ; + const ::onnx::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::onnx::TensorShapeProto* release_shape(); + ::onnx::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::onnx::TensorShapeProto* value); + void unsafe_arena_set_allocated_shape(::onnx::TensorShapeProto* value); + ::onnx::TensorShapeProto* unsafe_arena_release_shape(); + + private: + const ::onnx::TensorShapeProto& _internal_shape() const; + ::onnx::TensorShapeProto* _internal_mutable_shape(); + + public: + // optional int32 elem_type = 1; + bool has_elem_type() const; + void clear_elem_type() ; + ::int32_t elem_type() const; + void set_elem_type(::int32_t value); + + private: + ::int32_t _internal_elem_type() const; + void _internal_set_elem_type(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:onnx.TypeProto.SparseTensor) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TypeProto_SparseTensor& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::onnx::TensorShapeProto* shape_; + ::int32_t elem_type_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class SparseTensorProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.SparseTensorProto) */ { + public: + inline SparseTensorProto() : SparseTensorProto(nullptr) {} + ~SparseTensorProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(SparseTensorProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(SparseTensorProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR SparseTensorProto( + ::google::protobuf::internal::ConstantInitialized); + + inline SparseTensorProto(const SparseTensorProto& from) : SparseTensorProto(nullptr, from) {} + inline SparseTensorProto(SparseTensorProto&& from) noexcept + : SparseTensorProto(nullptr, std::move(from)) {} + inline SparseTensorProto& operator=(const SparseTensorProto& from) { + CopyFrom(from); + return *this; + } + inline SparseTensorProto& operator=(SparseTensorProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SparseTensorProto& default_instance() { + return *internal_default_instance(); + } + static inline const SparseTensorProto* internal_default_instance() { + return reinterpret_cast( + &_SparseTensorProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 10; + friend void swap(SparseTensorProto& a, SparseTensorProto& b) { a.Swap(&b); } + inline void Swap(SparseTensorProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SparseTensorProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SparseTensorProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const SparseTensorProto& from); + void MergeFrom(const SparseTensorProto& from) { SparseTensorProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(SparseTensorProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.SparseTensorProto"; } + + protected: + explicit SparseTensorProto(::google::protobuf::Arena* arena); + SparseTensorProto(::google::protobuf::Arena* arena, const SparseTensorProto& from); + SparseTensorProto(::google::protobuf::Arena* arena, SparseTensorProto&& from) noexcept + : SparseTensorProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<23> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDimsFieldNumber = 3, + kValuesFieldNumber = 1, + kIndicesFieldNumber = 2, + }; + // repeated int64 dims = 3; + int dims_size() const; + private: + int _internal_dims_size() const; + + public: + void clear_dims() ; + ::int64_t dims(int index) const; + void set_dims(int index, ::int64_t value); + void add_dims(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& dims() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_dims(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_dims() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_dims(); + + public: + // optional .onnx.TensorProto values = 1; + bool has_values() const; + void clear_values() ; + const ::onnx::TensorProto& values() const; + PROTOBUF_NODISCARD ::onnx::TensorProto* release_values(); + ::onnx::TensorProto* mutable_values(); + void set_allocated_values(::onnx::TensorProto* value); + void unsafe_arena_set_allocated_values(::onnx::TensorProto* value); + ::onnx::TensorProto* unsafe_arena_release_values(); + + private: + const ::onnx::TensorProto& _internal_values() const; + ::onnx::TensorProto* _internal_mutable_values(); + + public: + // optional .onnx.TensorProto indices = 2; + bool has_indices() const; + void clear_indices() ; + const ::onnx::TensorProto& indices() const; + PROTOBUF_NODISCARD ::onnx::TensorProto* release_indices(); + ::onnx::TensorProto* mutable_indices(); + void set_allocated_indices(::onnx::TensorProto* value); + void unsafe_arena_set_allocated_indices(::onnx::TensorProto* value); + ::onnx::TensorProto* unsafe_arena_release_indices(); + + private: + const ::onnx::TensorProto& _internal_indices() const; + ::onnx::TensorProto* _internal_mutable_indices(); + + public: + // @@protoc_insertion_point(class_scope:onnx.SparseTensorProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 3, 2, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const SparseTensorProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::int64_t> dims_; + ::onnx::TensorProto* values_; + ::onnx::TensorProto* indices_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TypeProto) */ { + public: + inline TypeProto() : TypeProto(nullptr) {} + ~TypeProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TypeProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TypeProto( + ::google::protobuf::internal::ConstantInitialized); + + inline TypeProto(const TypeProto& from) : TypeProto(nullptr, from) {} + inline TypeProto(TypeProto&& from) noexcept + : TypeProto(nullptr, std::move(from)) {} + inline TypeProto& operator=(const TypeProto& from) { + CopyFrom(from); + return *this; + } + inline TypeProto& operator=(TypeProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto& default_instance() { + return *internal_default_instance(); + } + enum ValueCase { + kTensorType = 1, + kSequenceType = 4, + kMapType = 5, + kOptionalType = 9, + kSparseTensorType = 8, + VALUE_NOT_SET = 0, + }; + static inline const TypeProto* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 18; + friend void swap(TypeProto& a, TypeProto& b) { a.Swap(&b); } + inline void Swap(TypeProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TypeProto& from); + void MergeFrom(const TypeProto& from) { TypeProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TypeProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TypeProto"; } + + protected: + explicit TypeProto(::google::protobuf::Arena* arena); + TypeProto(::google::protobuf::Arena* arena, const TypeProto& from); + TypeProto(::google::protobuf::Arena* arena, TypeProto&& from) noexcept + : TypeProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<15> _class_data_; + + public: + // nested types ---------------------------------------------------- + using Tensor = TypeProto_Tensor; + using Sequence = TypeProto_Sequence; + using Map = TypeProto_Map; + using Optional = TypeProto_Optional; + using SparseTensor = TypeProto_SparseTensor; + + // accessors ------------------------------------------------------- + enum : int { + kDenotationFieldNumber = 6, + kTensorTypeFieldNumber = 1, + kSequenceTypeFieldNumber = 4, + kMapTypeFieldNumber = 5, + kOptionalTypeFieldNumber = 9, + kSparseTensorTypeFieldNumber = 8, + }; + // optional string denotation = 6; + bool has_denotation() const; + void clear_denotation() ; + const std::string& denotation() const; + template + void set_denotation(Arg_&& arg, Args_... args); + std::string* mutable_denotation(); + PROTOBUF_NODISCARD std::string* release_denotation(); + void set_allocated_denotation(std::string* value); + + private: + const std::string& _internal_denotation() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_denotation( + const std::string& value); + std::string* _internal_mutable_denotation(); + + public: + // .onnx.TypeProto.Tensor tensor_type = 1; + bool has_tensor_type() const; + private: + bool _internal_has_tensor_type() const; + + public: + void clear_tensor_type() ; + const ::onnx::TypeProto_Tensor& tensor_type() const; + PROTOBUF_NODISCARD ::onnx::TypeProto_Tensor* release_tensor_type(); + ::onnx::TypeProto_Tensor* mutable_tensor_type(); + void set_allocated_tensor_type(::onnx::TypeProto_Tensor* value); + void unsafe_arena_set_allocated_tensor_type(::onnx::TypeProto_Tensor* value); + ::onnx::TypeProto_Tensor* unsafe_arena_release_tensor_type(); + + private: + const ::onnx::TypeProto_Tensor& _internal_tensor_type() const; + ::onnx::TypeProto_Tensor* _internal_mutable_tensor_type(); + + public: + // .onnx.TypeProto.Sequence sequence_type = 4; + bool has_sequence_type() const; + private: + bool _internal_has_sequence_type() const; + + public: + void clear_sequence_type() ; + const ::onnx::TypeProto_Sequence& sequence_type() const; + PROTOBUF_NODISCARD ::onnx::TypeProto_Sequence* release_sequence_type(); + ::onnx::TypeProto_Sequence* mutable_sequence_type(); + void set_allocated_sequence_type(::onnx::TypeProto_Sequence* value); + void unsafe_arena_set_allocated_sequence_type(::onnx::TypeProto_Sequence* value); + ::onnx::TypeProto_Sequence* unsafe_arena_release_sequence_type(); + + private: + const ::onnx::TypeProto_Sequence& _internal_sequence_type() const; + ::onnx::TypeProto_Sequence* _internal_mutable_sequence_type(); + + public: + // .onnx.TypeProto.Map map_type = 5; + bool has_map_type() const; + private: + bool _internal_has_map_type() const; + + public: + void clear_map_type() ; + const ::onnx::TypeProto_Map& map_type() const; + PROTOBUF_NODISCARD ::onnx::TypeProto_Map* release_map_type(); + ::onnx::TypeProto_Map* mutable_map_type(); + void set_allocated_map_type(::onnx::TypeProto_Map* value); + void unsafe_arena_set_allocated_map_type(::onnx::TypeProto_Map* value); + ::onnx::TypeProto_Map* unsafe_arena_release_map_type(); + + private: + const ::onnx::TypeProto_Map& _internal_map_type() const; + ::onnx::TypeProto_Map* _internal_mutable_map_type(); + + public: + // .onnx.TypeProto.Optional optional_type = 9; + bool has_optional_type() const; + private: + bool _internal_has_optional_type() const; + + public: + void clear_optional_type() ; + const ::onnx::TypeProto_Optional& optional_type() const; + PROTOBUF_NODISCARD ::onnx::TypeProto_Optional* release_optional_type(); + ::onnx::TypeProto_Optional* mutable_optional_type(); + void set_allocated_optional_type(::onnx::TypeProto_Optional* value); + void unsafe_arena_set_allocated_optional_type(::onnx::TypeProto_Optional* value); + ::onnx::TypeProto_Optional* unsafe_arena_release_optional_type(); + + private: + const ::onnx::TypeProto_Optional& _internal_optional_type() const; + ::onnx::TypeProto_Optional* _internal_mutable_optional_type(); + + public: + // .onnx.TypeProto.SparseTensor sparse_tensor_type = 8; + bool has_sparse_tensor_type() const; + private: + bool _internal_has_sparse_tensor_type() const; + + public: + void clear_sparse_tensor_type() ; + const ::onnx::TypeProto_SparseTensor& sparse_tensor_type() const; + PROTOBUF_NODISCARD ::onnx::TypeProto_SparseTensor* release_sparse_tensor_type(); + ::onnx::TypeProto_SparseTensor* mutable_sparse_tensor_type(); + void set_allocated_sparse_tensor_type(::onnx::TypeProto_SparseTensor* value); + void unsafe_arena_set_allocated_sparse_tensor_type(::onnx::TypeProto_SparseTensor* value); + ::onnx::TypeProto_SparseTensor* unsafe_arena_release_sparse_tensor_type(); + + private: + const ::onnx::TypeProto_SparseTensor& _internal_sparse_tensor_type() const; + ::onnx::TypeProto_SparseTensor* _internal_mutable_sparse_tensor_type(); + + public: + void clear_value(); + ValueCase value_case() const; + // @@protoc_insertion_point(class_scope:onnx.TypeProto) + private: + class _Internal; + void set_has_tensor_type(); + void set_has_sequence_type(); + void set_has_map_type(); + void set_has_optional_type(); + void set_has_sparse_tensor_type(); + inline bool has_value() const; + inline void clear_has_value(); + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 6, 5, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TypeProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr denotation_; + union ValueUnion { + constexpr ValueUnion() : _constinit_{} {} + ::google::protobuf::internal::ConstantInitialized _constinit_; + ::onnx::TypeProto_Tensor* tensor_type_; + ::onnx::TypeProto_Sequence* sequence_type_; + ::onnx::TypeProto_Map* map_type_; + ::onnx::TypeProto_Optional* optional_type_; + ::onnx::TypeProto_SparseTensor* sparse_tensor_type_; + } value_; + ::uint32_t _oneof_case_[1]; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto_Map final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TypeProto.Map) */ { + public: + inline TypeProto_Map() : TypeProto_Map(nullptr) {} + ~TypeProto_Map() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TypeProto_Map* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeProto_Map)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TypeProto_Map( + ::google::protobuf::internal::ConstantInitialized); + + inline TypeProto_Map(const TypeProto_Map& from) : TypeProto_Map(nullptr, from) {} + inline TypeProto_Map(TypeProto_Map&& from) noexcept + : TypeProto_Map(nullptr, std::move(from)) {} + inline TypeProto_Map& operator=(const TypeProto_Map& from) { + CopyFrom(from); + return *this; + } + inline TypeProto_Map& operator=(TypeProto_Map&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto_Map& default_instance() { + return *internal_default_instance(); + } + static inline const TypeProto_Map* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_Map_default_instance_); + } + static constexpr int kIndexInFileMessages = 15; + friend void swap(TypeProto_Map& a, TypeProto_Map& b) { a.Swap(&b); } + inline void Swap(TypeProto_Map* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto_Map* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto_Map* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TypeProto_Map& from); + void MergeFrom(const TypeProto_Map& from) { TypeProto_Map::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TypeProto_Map* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TypeProto.Map"; } + + protected: + explicit TypeProto_Map(::google::protobuf::Arena* arena); + TypeProto_Map(::google::protobuf::Arena* arena, const TypeProto_Map& from); + TypeProto_Map(::google::protobuf::Arena* arena, TypeProto_Map&& from) noexcept + : TypeProto_Map(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<19> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kValueTypeFieldNumber = 2, + kKeyTypeFieldNumber = 1, + }; + // optional .onnx.TypeProto value_type = 2; + bool has_value_type() const; + void clear_value_type() ; + const ::onnx::TypeProto& value_type() const; + PROTOBUF_NODISCARD ::onnx::TypeProto* release_value_type(); + ::onnx::TypeProto* mutable_value_type(); + void set_allocated_value_type(::onnx::TypeProto* value); + void unsafe_arena_set_allocated_value_type(::onnx::TypeProto* value); + ::onnx::TypeProto* unsafe_arena_release_value_type(); + + private: + const ::onnx::TypeProto& _internal_value_type() const; + ::onnx::TypeProto* _internal_mutable_value_type(); + + public: + // optional int32 key_type = 1; + bool has_key_type() const; + void clear_key_type() ; + ::int32_t key_type() const; + void set_key_type(::int32_t value); + + private: + ::int32_t _internal_key_type() const; + void _internal_set_key_type(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:onnx.TypeProto.Map) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TypeProto_Map& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::onnx::TypeProto* value_type_; + ::int32_t key_type_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto_Optional final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TypeProto.Optional) */ { + public: + inline TypeProto_Optional() : TypeProto_Optional(nullptr) {} + ~TypeProto_Optional() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TypeProto_Optional* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeProto_Optional)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TypeProto_Optional( + ::google::protobuf::internal::ConstantInitialized); + + inline TypeProto_Optional(const TypeProto_Optional& from) : TypeProto_Optional(nullptr, from) {} + inline TypeProto_Optional(TypeProto_Optional&& from) noexcept + : TypeProto_Optional(nullptr, std::move(from)) {} + inline TypeProto_Optional& operator=(const TypeProto_Optional& from) { + CopyFrom(from); + return *this; + } + inline TypeProto_Optional& operator=(TypeProto_Optional&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto_Optional& default_instance() { + return *internal_default_instance(); + } + static inline const TypeProto_Optional* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_Optional_default_instance_); + } + static constexpr int kIndexInFileMessages = 16; + friend void swap(TypeProto_Optional& a, TypeProto_Optional& b) { a.Swap(&b); } + inline void Swap(TypeProto_Optional* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto_Optional* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto_Optional* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TypeProto_Optional& from); + void MergeFrom(const TypeProto_Optional& from) { TypeProto_Optional::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TypeProto_Optional* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TypeProto.Optional"; } + + protected: + explicit TypeProto_Optional(::google::protobuf::Arena* arena); + TypeProto_Optional(::google::protobuf::Arena* arena, const TypeProto_Optional& from); + TypeProto_Optional(::google::protobuf::Arena* arena, TypeProto_Optional&& from) noexcept + : TypeProto_Optional(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<24> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kElemTypeFieldNumber = 1, + }; + // optional .onnx.TypeProto elem_type = 1; + bool has_elem_type() const; + void clear_elem_type() ; + const ::onnx::TypeProto& elem_type() const; + PROTOBUF_NODISCARD ::onnx::TypeProto* release_elem_type(); + ::onnx::TypeProto* mutable_elem_type(); + void set_allocated_elem_type(::onnx::TypeProto* value); + void unsafe_arena_set_allocated_elem_type(::onnx::TypeProto* value); + ::onnx::TypeProto* unsafe_arena_release_elem_type(); + + private: + const ::onnx::TypeProto& _internal_elem_type() const; + ::onnx::TypeProto* _internal_mutable_elem_type(); + + public: + // @@protoc_insertion_point(class_scope:onnx.TypeProto.Optional) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TypeProto_Optional& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::onnx::TypeProto* elem_type_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto_Sequence final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TypeProto.Sequence) */ { + public: + inline TypeProto_Sequence() : TypeProto_Sequence(nullptr) {} + ~TypeProto_Sequence() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TypeProto_Sequence* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TypeProto_Sequence)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TypeProto_Sequence( + ::google::protobuf::internal::ConstantInitialized); + + inline TypeProto_Sequence(const TypeProto_Sequence& from) : TypeProto_Sequence(nullptr, from) {} + inline TypeProto_Sequence(TypeProto_Sequence&& from) noexcept + : TypeProto_Sequence(nullptr, std::move(from)) {} + inline TypeProto_Sequence& operator=(const TypeProto_Sequence& from) { + CopyFrom(from); + return *this; + } + inline TypeProto_Sequence& operator=(TypeProto_Sequence&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto_Sequence& default_instance() { + return *internal_default_instance(); + } + static inline const TypeProto_Sequence* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_Sequence_default_instance_); + } + static constexpr int kIndexInFileMessages = 14; + friend void swap(TypeProto_Sequence& a, TypeProto_Sequence& b) { a.Swap(&b); } + inline void Swap(TypeProto_Sequence* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto_Sequence* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto_Sequence* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TypeProto_Sequence& from); + void MergeFrom(const TypeProto_Sequence& from) { TypeProto_Sequence::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TypeProto_Sequence* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TypeProto.Sequence"; } + + protected: + explicit TypeProto_Sequence(::google::protobuf::Arena* arena); + TypeProto_Sequence(::google::protobuf::Arena* arena, const TypeProto_Sequence& from); + TypeProto_Sequence(::google::protobuf::Arena* arena, TypeProto_Sequence&& from) noexcept + : TypeProto_Sequence(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<24> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kElemTypeFieldNumber = 1, + }; + // optional .onnx.TypeProto elem_type = 1; + bool has_elem_type() const; + void clear_elem_type() ; + const ::onnx::TypeProto& elem_type() const; + PROTOBUF_NODISCARD ::onnx::TypeProto* release_elem_type(); + ::onnx::TypeProto* mutable_elem_type(); + void set_allocated_elem_type(::onnx::TypeProto* value); + void unsafe_arena_set_allocated_elem_type(::onnx::TypeProto* value); + ::onnx::TypeProto* unsafe_arena_release_elem_type(); + + private: + const ::onnx::TypeProto& _internal_elem_type() const; + ::onnx::TypeProto* _internal_mutable_elem_type(); + + public: + // @@protoc_insertion_point(class_scope:onnx.TypeProto.Sequence) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TypeProto_Sequence& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::onnx::TypeProto* elem_type_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class ValueInfoProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.ValueInfoProto) */ { + public: + inline ValueInfoProto() : ValueInfoProto(nullptr) {} + ~ValueInfoProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ValueInfoProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ValueInfoProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR ValueInfoProto( + ::google::protobuf::internal::ConstantInitialized); + + inline ValueInfoProto(const ValueInfoProto& from) : ValueInfoProto(nullptr, from) {} + inline ValueInfoProto(ValueInfoProto&& from) noexcept + : ValueInfoProto(nullptr, std::move(from)) {} + inline ValueInfoProto& operator=(const ValueInfoProto& from) { + CopyFrom(from); + return *this; + } + inline ValueInfoProto& operator=(ValueInfoProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ValueInfoProto& default_instance() { + return *internal_default_instance(); + } + static inline const ValueInfoProto* internal_default_instance() { + return reinterpret_cast( + &_ValueInfoProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(ValueInfoProto& a, ValueInfoProto& b) { a.Swap(&b); } + inline void Swap(ValueInfoProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ValueInfoProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ValueInfoProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const ValueInfoProto& from); + void MergeFrom(const ValueInfoProto& from) { ValueInfoProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(ValueInfoProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.ValueInfoProto"; } + + protected: + explicit ValueInfoProto(::google::protobuf::Arena* arena); + ValueInfoProto(::google::protobuf::Arena* arena, const ValueInfoProto& from); + ValueInfoProto(::google::protobuf::Arena* arena, ValueInfoProto&& from) noexcept + : ValueInfoProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<20> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kMetadataPropsFieldNumber = 4, + kNameFieldNumber = 1, + kDocStringFieldNumber = 3, + kTypeFieldNumber = 2, + }; + // repeated .onnx.StringStringEntryProto metadata_props = 4; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + + public: + void clear_metadata_props() ; + ::onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_metadata_props(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_metadata_props() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_metadata_props(); + public: + const ::onnx::StringStringEntryProto& metadata_props(int index) const; + ::onnx::StringStringEntryProto* add_metadata_props(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& metadata_props() const; + // optional string name = 1; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional string doc_string = 3; + bool has_doc_string() const; + void clear_doc_string() ; + const std::string& doc_string() const; + template + void set_doc_string(Arg_&& arg, Args_... args); + std::string* mutable_doc_string(); + PROTOBUF_NODISCARD std::string* release_doc_string(); + void set_allocated_doc_string(std::string* value); + + private: + const std::string& _internal_doc_string() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_doc_string( + const std::string& value); + std::string* _internal_mutable_doc_string(); + + public: + // optional .onnx.TypeProto type = 2; + bool has_type() const; + void clear_type() ; + const ::onnx::TypeProto& type() const; + PROTOBUF_NODISCARD ::onnx::TypeProto* release_type(); + ::onnx::TypeProto* mutable_type(); + void set_allocated_type(::onnx::TypeProto* value); + void unsafe_arena_set_allocated_type(::onnx::TypeProto* value); + ::onnx::TypeProto* unsafe_arena_release_type(); + + private: + const ::onnx::TypeProto& _internal_type() const; + ::onnx::TypeProto* _internal_mutable_type(); + + public: + // @@protoc_insertion_point(class_scope:onnx.ValueInfoProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 2, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const ValueInfoProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > metadata_props_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::onnx::TypeProto* type_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class AttributeProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.AttributeProto) */ { + public: + inline AttributeProto() : AttributeProto(nullptr) {} + ~AttributeProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(AttributeProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(AttributeProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR AttributeProto( + ::google::protobuf::internal::ConstantInitialized); + + inline AttributeProto(const AttributeProto& from) : AttributeProto(nullptr, from) {} + inline AttributeProto(AttributeProto&& from) noexcept + : AttributeProto(nullptr, std::move(from)) {} + inline AttributeProto& operator=(const AttributeProto& from) { + CopyFrom(from); + return *this; + } + inline AttributeProto& operator=(AttributeProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const AttributeProto& default_instance() { + return *internal_default_instance(); + } + static inline const AttributeProto* internal_default_instance() { + return reinterpret_cast( + &_AttributeProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(AttributeProto& a, AttributeProto& b) { a.Swap(&b); } + inline void Swap(AttributeProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(AttributeProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + AttributeProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const AttributeProto& from); + void MergeFrom(const AttributeProto& from) { AttributeProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(AttributeProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.AttributeProto"; } + + protected: + explicit AttributeProto(::google::protobuf::Arena* arena); + AttributeProto(::google::protobuf::Arena* arena, const AttributeProto& from); + AttributeProto(::google::protobuf::Arena* arena, AttributeProto&& from) noexcept + : AttributeProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<20> _class_data_; + + public: + // nested types ---------------------------------------------------- + using AttributeType = AttributeProto_AttributeType; + static constexpr AttributeType UNDEFINED = AttributeProto_AttributeType_UNDEFINED; + static constexpr AttributeType FLOAT = AttributeProto_AttributeType_FLOAT; + static constexpr AttributeType INT = AttributeProto_AttributeType_INT; + static constexpr AttributeType STRING = AttributeProto_AttributeType_STRING; + static constexpr AttributeType TENSOR = AttributeProto_AttributeType_TENSOR; + static constexpr AttributeType GRAPH = AttributeProto_AttributeType_GRAPH; + static constexpr AttributeType SPARSE_TENSOR = AttributeProto_AttributeType_SPARSE_TENSOR; + static constexpr AttributeType TYPE_PROTO = AttributeProto_AttributeType_TYPE_PROTO; + static constexpr AttributeType FLOATS = AttributeProto_AttributeType_FLOATS; + static constexpr AttributeType INTS = AttributeProto_AttributeType_INTS; + static constexpr AttributeType STRINGS = AttributeProto_AttributeType_STRINGS; + static constexpr AttributeType TENSORS = AttributeProto_AttributeType_TENSORS; + static constexpr AttributeType GRAPHS = AttributeProto_AttributeType_GRAPHS; + static constexpr AttributeType SPARSE_TENSORS = AttributeProto_AttributeType_SPARSE_TENSORS; + static constexpr AttributeType TYPE_PROTOS = AttributeProto_AttributeType_TYPE_PROTOS; + static inline bool AttributeType_IsValid(int value) { + return AttributeProto_AttributeType_IsValid(value); + } + static constexpr AttributeType AttributeType_MIN = AttributeProto_AttributeType_AttributeType_MIN; + static constexpr AttributeType AttributeType_MAX = AttributeProto_AttributeType_AttributeType_MAX; + static constexpr int AttributeType_ARRAYSIZE = AttributeProto_AttributeType_AttributeType_ARRAYSIZE; + template + static inline const std::string& AttributeType_Name(T value) { + return AttributeProto_AttributeType_Name(value); + } + static inline bool AttributeType_Parse(absl::string_view name, AttributeType* value) { + return AttributeProto_AttributeType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + enum : int { + kFloatsFieldNumber = 7, + kIntsFieldNumber = 8, + kStringsFieldNumber = 9, + kTensorsFieldNumber = 10, + kGraphsFieldNumber = 11, + kTypeProtosFieldNumber = 15, + kSparseTensorsFieldNumber = 23, + kNameFieldNumber = 1, + kSFieldNumber = 4, + kDocStringFieldNumber = 13, + kRefAttrNameFieldNumber = 21, + kTFieldNumber = 5, + kGFieldNumber = 6, + kTpFieldNumber = 14, + kSparseTensorFieldNumber = 22, + kIFieldNumber = 3, + kFFieldNumber = 2, + kTypeFieldNumber = 20, + }; + // repeated float floats = 7; + int floats_size() const; + private: + int _internal_floats_size() const; + + public: + void clear_floats() ; + float floats(int index) const; + void set_floats(int index, float value); + void add_floats(float value); + const ::google::protobuf::RepeatedField& floats() const; + ::google::protobuf::RepeatedField* mutable_floats(); + + private: + const ::google::protobuf::RepeatedField& _internal_floats() const; + ::google::protobuf::RepeatedField* _internal_mutable_floats(); + + public: + // repeated int64 ints = 8; + int ints_size() const; + private: + int _internal_ints_size() const; + + public: + void clear_ints() ; + ::int64_t ints(int index) const; + void set_ints(int index, ::int64_t value); + void add_ints(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& ints() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_ints(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_ints() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_ints(); + + public: + // repeated bytes strings = 9; + int strings_size() const; + private: + int _internal_strings_size() const; + + public: + void clear_strings() ; + const std::string& strings(int index) const; + std::string* mutable_strings(int index); + template + void set_strings(int index, Arg_&& value, Args_... args); + std::string* add_strings(); + template + void add_strings(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField& strings() const; + ::google::protobuf::RepeatedPtrField* mutable_strings(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_strings() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_strings(); + + public: + // repeated .onnx.TensorProto tensors = 10; + int tensors_size() const; + private: + int _internal_tensors_size() const; + + public: + void clear_tensors() ; + ::onnx::TensorProto* mutable_tensors(int index); + ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>* mutable_tensors(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>& _internal_tensors() const; + ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>* _internal_mutable_tensors(); + public: + const ::onnx::TensorProto& tensors(int index) const; + ::onnx::TensorProto* add_tensors(); + const ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>& tensors() const; + // repeated .onnx.GraphProto graphs = 11; + int graphs_size() const; + private: + int _internal_graphs_size() const; + + public: + void clear_graphs() ; + ::onnx::GraphProto* mutable_graphs(int index); + ::google::protobuf::RepeatedPtrField<::onnx::GraphProto>* mutable_graphs(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::GraphProto>& _internal_graphs() const; + ::google::protobuf::RepeatedPtrField<::onnx::GraphProto>* _internal_mutable_graphs(); + public: + const ::onnx::GraphProto& graphs(int index) const; + ::onnx::GraphProto* add_graphs(); + const ::google::protobuf::RepeatedPtrField<::onnx::GraphProto>& graphs() const; + // repeated .onnx.TypeProto type_protos = 15; + int type_protos_size() const; + private: + int _internal_type_protos_size() const; + + public: + void clear_type_protos() ; + ::onnx::TypeProto* mutable_type_protos(int index); + ::google::protobuf::RepeatedPtrField<::onnx::TypeProto>* mutable_type_protos(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::TypeProto>& _internal_type_protos() const; + ::google::protobuf::RepeatedPtrField<::onnx::TypeProto>* _internal_mutable_type_protos(); + public: + const ::onnx::TypeProto& type_protos(int index) const; + ::onnx::TypeProto* add_type_protos(); + const ::google::protobuf::RepeatedPtrField<::onnx::TypeProto>& type_protos() const; + // repeated .onnx.SparseTensorProto sparse_tensors = 23; + int sparse_tensors_size() const; + private: + int _internal_sparse_tensors_size() const; + + public: + void clear_sparse_tensors() ; + ::onnx::SparseTensorProto* mutable_sparse_tensors(int index); + ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>* mutable_sparse_tensors(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>& _internal_sparse_tensors() const; + ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>* _internal_mutable_sparse_tensors(); + public: + const ::onnx::SparseTensorProto& sparse_tensors(int index) const; + ::onnx::SparseTensorProto* add_sparse_tensors(); + const ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>& sparse_tensors() const; + // optional string name = 1; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional bytes s = 4; + bool has_s() const; + void clear_s() ; + const std::string& s() const; + template + void set_s(Arg_&& arg, Args_... args); + std::string* mutable_s(); + PROTOBUF_NODISCARD std::string* release_s(); + void set_allocated_s(std::string* value); + + private: + const std::string& _internal_s() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_s( + const std::string& value); + std::string* _internal_mutable_s(); + + public: + // optional string doc_string = 13; + bool has_doc_string() const; + void clear_doc_string() ; + const std::string& doc_string() const; + template + void set_doc_string(Arg_&& arg, Args_... args); + std::string* mutable_doc_string(); + PROTOBUF_NODISCARD std::string* release_doc_string(); + void set_allocated_doc_string(std::string* value); + + private: + const std::string& _internal_doc_string() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_doc_string( + const std::string& value); + std::string* _internal_mutable_doc_string(); + + public: + // optional string ref_attr_name = 21; + bool has_ref_attr_name() const; + void clear_ref_attr_name() ; + const std::string& ref_attr_name() const; + template + void set_ref_attr_name(Arg_&& arg, Args_... args); + std::string* mutable_ref_attr_name(); + PROTOBUF_NODISCARD std::string* release_ref_attr_name(); + void set_allocated_ref_attr_name(std::string* value); + + private: + const std::string& _internal_ref_attr_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_ref_attr_name( + const std::string& value); + std::string* _internal_mutable_ref_attr_name(); + + public: + // optional .onnx.TensorProto t = 5; + bool has_t() const; + void clear_t() ; + const ::onnx::TensorProto& t() const; + PROTOBUF_NODISCARD ::onnx::TensorProto* release_t(); + ::onnx::TensorProto* mutable_t(); + void set_allocated_t(::onnx::TensorProto* value); + void unsafe_arena_set_allocated_t(::onnx::TensorProto* value); + ::onnx::TensorProto* unsafe_arena_release_t(); + + private: + const ::onnx::TensorProto& _internal_t() const; + ::onnx::TensorProto* _internal_mutable_t(); + + public: + // optional .onnx.GraphProto g = 6; + bool has_g() const; + void clear_g() ; + const ::onnx::GraphProto& g() const; + PROTOBUF_NODISCARD ::onnx::GraphProto* release_g(); + ::onnx::GraphProto* mutable_g(); + void set_allocated_g(::onnx::GraphProto* value); + void unsafe_arena_set_allocated_g(::onnx::GraphProto* value); + ::onnx::GraphProto* unsafe_arena_release_g(); + + private: + const ::onnx::GraphProto& _internal_g() const; + ::onnx::GraphProto* _internal_mutable_g(); + + public: + // optional .onnx.TypeProto tp = 14; + bool has_tp() const; + void clear_tp() ; + const ::onnx::TypeProto& tp() const; + PROTOBUF_NODISCARD ::onnx::TypeProto* release_tp(); + ::onnx::TypeProto* mutable_tp(); + void set_allocated_tp(::onnx::TypeProto* value); + void unsafe_arena_set_allocated_tp(::onnx::TypeProto* value); + ::onnx::TypeProto* unsafe_arena_release_tp(); + + private: + const ::onnx::TypeProto& _internal_tp() const; + ::onnx::TypeProto* _internal_mutable_tp(); + + public: + // optional .onnx.SparseTensorProto sparse_tensor = 22; + bool has_sparse_tensor() const; + void clear_sparse_tensor() ; + const ::onnx::SparseTensorProto& sparse_tensor() const; + PROTOBUF_NODISCARD ::onnx::SparseTensorProto* release_sparse_tensor(); + ::onnx::SparseTensorProto* mutable_sparse_tensor(); + void set_allocated_sparse_tensor(::onnx::SparseTensorProto* value); + void unsafe_arena_set_allocated_sparse_tensor(::onnx::SparseTensorProto* value); + ::onnx::SparseTensorProto* unsafe_arena_release_sparse_tensor(); + + private: + const ::onnx::SparseTensorProto& _internal_sparse_tensor() const; + ::onnx::SparseTensorProto* _internal_mutable_sparse_tensor(); + + public: + // optional int64 i = 3; + bool has_i() const; + void clear_i() ; + ::int64_t i() const; + void set_i(::int64_t value); + + private: + ::int64_t _internal_i() const; + void _internal_set_i(::int64_t value); + + public: + // optional float f = 2; + bool has_f() const; + void clear_f() ; + float f() const; + void set_f(float value); + + private: + float _internal_f() const; + void _internal_set_f(float value); + + public: + // optional .onnx.AttributeProto.AttributeType type = 20; + bool has_type() const; + void clear_type() ; + ::onnx::AttributeProto_AttributeType type() const; + void set_type(::onnx::AttributeProto_AttributeType value); + + private: + ::onnx::AttributeProto_AttributeType _internal_type() const; + void _internal_set_type(::onnx::AttributeProto_AttributeType value); + + public: + // @@protoc_insertion_point(class_scope:onnx.AttributeProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 5, 18, 9, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const AttributeProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField floats_; + ::google::protobuf::RepeatedField<::int64_t> ints_; + ::google::protobuf::RepeatedPtrField strings_; + ::google::protobuf::RepeatedPtrField< ::onnx::TensorProto > tensors_; + ::google::protobuf::RepeatedPtrField< ::onnx::GraphProto > graphs_; + ::google::protobuf::RepeatedPtrField< ::onnx::TypeProto > type_protos_; + ::google::protobuf::RepeatedPtrField< ::onnx::SparseTensorProto > sparse_tensors_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr s_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::google::protobuf::internal::ArenaStringPtr ref_attr_name_; + ::onnx::TensorProto* t_; + ::onnx::GraphProto* g_; + ::onnx::TypeProto* tp_; + ::onnx::SparseTensorProto* sparse_tensor_; + ::int64_t i_; + float f_; + int type_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class GraphProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.GraphProto) */ { + public: + inline GraphProto() : GraphProto(nullptr) {} + ~GraphProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(GraphProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(GraphProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR GraphProto( + ::google::protobuf::internal::ConstantInitialized); + + inline GraphProto(const GraphProto& from) : GraphProto(nullptr, from) {} + inline GraphProto(GraphProto&& from) noexcept + : GraphProto(nullptr, std::move(from)) {} + inline GraphProto& operator=(const GraphProto& from) { + CopyFrom(from); + return *this; + } + inline GraphProto& operator=(GraphProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const GraphProto& default_instance() { + return *internal_default_instance(); + } + static inline const GraphProto* internal_default_instance() { + return reinterpret_cast( + &_GraphProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 7; + friend void swap(GraphProto& a, GraphProto& b) { a.Swap(&b); } + inline void Swap(GraphProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GraphProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GraphProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const GraphProto& from); + void MergeFrom(const GraphProto& from) { GraphProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(GraphProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.GraphProto"; } + + protected: + explicit GraphProto(::google::protobuf::Arena* arena); + GraphProto(::google::protobuf::Arena* arena, const GraphProto& from); + GraphProto(::google::protobuf::Arena* arena, GraphProto&& from) noexcept + : GraphProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<16> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kNodeFieldNumber = 1, + kInitializerFieldNumber = 5, + kInputFieldNumber = 11, + kOutputFieldNumber = 12, + kValueInfoFieldNumber = 13, + kQuantizationAnnotationFieldNumber = 14, + kSparseInitializerFieldNumber = 15, + kMetadataPropsFieldNumber = 16, + kNameFieldNumber = 2, + kDocStringFieldNumber = 10, + }; + // repeated .onnx.NodeProto node = 1; + int node_size() const; + private: + int _internal_node_size() const; + + public: + void clear_node() ; + ::onnx::NodeProto* mutable_node(int index); + ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>* mutable_node(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>& _internal_node() const; + ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>* _internal_mutable_node(); + public: + const ::onnx::NodeProto& node(int index) const; + ::onnx::NodeProto* add_node(); + const ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>& node() const; + // repeated .onnx.TensorProto initializer = 5; + int initializer_size() const; + private: + int _internal_initializer_size() const; + + public: + void clear_initializer() ; + ::onnx::TensorProto* mutable_initializer(int index); + ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>* mutable_initializer(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>& _internal_initializer() const; + ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>* _internal_mutable_initializer(); + public: + const ::onnx::TensorProto& initializer(int index) const; + ::onnx::TensorProto* add_initializer(); + const ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>& initializer() const; + // repeated .onnx.ValueInfoProto input = 11; + int input_size() const; + private: + int _internal_input_size() const; + + public: + void clear_input() ; + ::onnx::ValueInfoProto* mutable_input(int index); + ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* mutable_input(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& _internal_input() const; + ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* _internal_mutable_input(); + public: + const ::onnx::ValueInfoProto& input(int index) const; + ::onnx::ValueInfoProto* add_input(); + const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& input() const; + // repeated .onnx.ValueInfoProto output = 12; + int output_size() const; + private: + int _internal_output_size() const; + + public: + void clear_output() ; + ::onnx::ValueInfoProto* mutable_output(int index); + ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* mutable_output(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& _internal_output() const; + ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* _internal_mutable_output(); + public: + const ::onnx::ValueInfoProto& output(int index) const; + ::onnx::ValueInfoProto* add_output(); + const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& output() const; + // repeated .onnx.ValueInfoProto value_info = 13; + int value_info_size() const; + private: + int _internal_value_info_size() const; + + public: + void clear_value_info() ; + ::onnx::ValueInfoProto* mutable_value_info(int index); + ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* mutable_value_info(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& _internal_value_info() const; + ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* _internal_mutable_value_info(); + public: + const ::onnx::ValueInfoProto& value_info(int index) const; + ::onnx::ValueInfoProto* add_value_info(); + const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& value_info() const; + // repeated .onnx.TensorAnnotation quantization_annotation = 14; + int quantization_annotation_size() const; + private: + int _internal_quantization_annotation_size() const; + + public: + void clear_quantization_annotation() ; + ::onnx::TensorAnnotation* mutable_quantization_annotation(int index); + ::google::protobuf::RepeatedPtrField<::onnx::TensorAnnotation>* mutable_quantization_annotation(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::TensorAnnotation>& _internal_quantization_annotation() const; + ::google::protobuf::RepeatedPtrField<::onnx::TensorAnnotation>* _internal_mutable_quantization_annotation(); + public: + const ::onnx::TensorAnnotation& quantization_annotation(int index) const; + ::onnx::TensorAnnotation* add_quantization_annotation(); + const ::google::protobuf::RepeatedPtrField<::onnx::TensorAnnotation>& quantization_annotation() const; + // repeated .onnx.SparseTensorProto sparse_initializer = 15; + int sparse_initializer_size() const; + private: + int _internal_sparse_initializer_size() const; + + public: + void clear_sparse_initializer() ; + ::onnx::SparseTensorProto* mutable_sparse_initializer(int index); + ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>* mutable_sparse_initializer(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>& _internal_sparse_initializer() const; + ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>* _internal_mutable_sparse_initializer(); + public: + const ::onnx::SparseTensorProto& sparse_initializer(int index) const; + ::onnx::SparseTensorProto* add_sparse_initializer(); + const ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>& sparse_initializer() const; + // repeated .onnx.StringStringEntryProto metadata_props = 16; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + + public: + void clear_metadata_props() ; + ::onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_metadata_props(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_metadata_props() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_metadata_props(); + public: + const ::onnx::StringStringEntryProto& metadata_props(int index) const; + ::onnx::StringStringEntryProto* add_metadata_props(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& metadata_props() const; + // optional string name = 2; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional string doc_string = 10; + bool has_doc_string() const; + void clear_doc_string() ; + const std::string& doc_string() const; + template + void set_doc_string(Arg_&& arg, Args_... args); + std::string* mutable_doc_string(); + PROTOBUF_NODISCARD std::string* release_doc_string(); + void set_allocated_doc_string(std::string* value); + + private: + const std::string& _internal_doc_string() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_doc_string( + const std::string& value); + std::string* _internal_mutable_doc_string(); + + public: + // @@protoc_insertion_point(class_scope:onnx.GraphProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 4, 10, 8, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const GraphProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::onnx::NodeProto > node_; + ::google::protobuf::RepeatedPtrField< ::onnx::TensorProto > initializer_; + ::google::protobuf::RepeatedPtrField< ::onnx::ValueInfoProto > input_; + ::google::protobuf::RepeatedPtrField< ::onnx::ValueInfoProto > output_; + ::google::protobuf::RepeatedPtrField< ::onnx::ValueInfoProto > value_info_; + ::google::protobuf::RepeatedPtrField< ::onnx::TensorAnnotation > quantization_annotation_; + ::google::protobuf::RepeatedPtrField< ::onnx::SparseTensorProto > sparse_initializer_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > metadata_props_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class NodeProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.NodeProto) */ { + public: + inline NodeProto() : NodeProto(nullptr) {} + ~NodeProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(NodeProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(NodeProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR NodeProto( + ::google::protobuf::internal::ConstantInitialized); + + inline NodeProto(const NodeProto& from) : NodeProto(nullptr, from) {} + inline NodeProto(NodeProto&& from) noexcept + : NodeProto(nullptr, std::move(from)) {} + inline NodeProto& operator=(const NodeProto& from) { + CopyFrom(from); + return *this; + } + inline NodeProto& operator=(NodeProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const NodeProto& default_instance() { + return *internal_default_instance(); + } + static inline const NodeProto* internal_default_instance() { + return reinterpret_cast( + &_NodeProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 2; + friend void swap(NodeProto& a, NodeProto& b) { a.Swap(&b); } + inline void Swap(NodeProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(NodeProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + NodeProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const NodeProto& from); + void MergeFrom(const NodeProto& from) { NodeProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(NodeProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.NodeProto"; } + + protected: + explicit NodeProto(::google::protobuf::Arena* arena); + NodeProto(::google::protobuf::Arena* arena, const NodeProto& from); + NodeProto(::google::protobuf::Arena* arena, NodeProto&& from) noexcept + : NodeProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<15> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kInputFieldNumber = 1, + kOutputFieldNumber = 2, + kAttributeFieldNumber = 5, + kMetadataPropsFieldNumber = 9, + kNameFieldNumber = 3, + kOpTypeFieldNumber = 4, + kDocStringFieldNumber = 6, + kDomainFieldNumber = 7, + kOverloadFieldNumber = 8, + }; + // repeated string input = 1; + int input_size() const; + private: + int _internal_input_size() const; + + public: + void clear_input() ; + const std::string& input(int index) const; + std::string* mutable_input(int index); + template + void set_input(int index, Arg_&& value, Args_... args); + std::string* add_input(); + template + void add_input(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField& input() const; + ::google::protobuf::RepeatedPtrField* mutable_input(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_input() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_input(); + + public: + // repeated string output = 2; + int output_size() const; + private: + int _internal_output_size() const; + + public: + void clear_output() ; + const std::string& output(int index) const; + std::string* mutable_output(int index); + template + void set_output(int index, Arg_&& value, Args_... args); + std::string* add_output(); + template + void add_output(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField& output() const; + ::google::protobuf::RepeatedPtrField* mutable_output(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_output() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_output(); + + public: + // repeated .onnx.AttributeProto attribute = 5; + int attribute_size() const; + private: + int _internal_attribute_size() const; + + public: + void clear_attribute() ; + ::onnx::AttributeProto* mutable_attribute(int index); + ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>* mutable_attribute(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>& _internal_attribute() const; + ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>* _internal_mutable_attribute(); + public: + const ::onnx::AttributeProto& attribute(int index) const; + ::onnx::AttributeProto* add_attribute(); + const ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>& attribute() const; + // repeated .onnx.StringStringEntryProto metadata_props = 9; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + + public: + void clear_metadata_props() ; + ::onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_metadata_props(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_metadata_props() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_metadata_props(); + public: + const ::onnx::StringStringEntryProto& metadata_props(int index) const; + ::onnx::StringStringEntryProto* add_metadata_props(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& metadata_props() const; + // optional string name = 3; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional string op_type = 4; + bool has_op_type() const; + void clear_op_type() ; + const std::string& op_type() const; + template + void set_op_type(Arg_&& arg, Args_... args); + std::string* mutable_op_type(); + PROTOBUF_NODISCARD std::string* release_op_type(); + void set_allocated_op_type(std::string* value); + + private: + const std::string& _internal_op_type() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_op_type( + const std::string& value); + std::string* _internal_mutable_op_type(); + + public: + // optional string doc_string = 6; + bool has_doc_string() const; + void clear_doc_string() ; + const std::string& doc_string() const; + template + void set_doc_string(Arg_&& arg, Args_... args); + std::string* mutable_doc_string(); + PROTOBUF_NODISCARD std::string* release_doc_string(); + void set_allocated_doc_string(std::string* value); + + private: + const std::string& _internal_doc_string() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_doc_string( + const std::string& value); + std::string* _internal_mutable_doc_string(); + + public: + // optional string domain = 7; + bool has_domain() const; + void clear_domain() ; + const std::string& domain() const; + template + void set_domain(Arg_&& arg, Args_... args); + std::string* mutable_domain(); + PROTOBUF_NODISCARD std::string* release_domain(); + void set_allocated_domain(std::string* value); + + private: + const std::string& _internal_domain() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_domain( + const std::string& value); + std::string* _internal_mutable_domain(); + + public: + // optional string overload = 8; + bool has_overload() const; + void clear_overload() ; + const std::string& overload() const; + template + void set_overload(Arg_&& arg, Args_... args); + std::string* mutable_overload(); + PROTOBUF_NODISCARD std::string* release_overload(); + void set_allocated_overload(std::string* value); + + private: + const std::string& _internal_overload() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_overload( + const std::string& value); + std::string* _internal_mutable_overload(); + + public: + // @@protoc_insertion_point(class_scope:onnx.NodeProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 4, 9, 2, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const NodeProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField input_; + ::google::protobuf::RepeatedPtrField output_; + ::google::protobuf::RepeatedPtrField< ::onnx::AttributeProto > attribute_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > metadata_props_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr op_type_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::google::protobuf::internal::ArenaStringPtr domain_; + ::google::protobuf::internal::ArenaStringPtr overload_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TrainingInfoProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.TrainingInfoProto) */ { + public: + inline TrainingInfoProto() : TrainingInfoProto(nullptr) {} + ~TrainingInfoProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(TrainingInfoProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(TrainingInfoProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR TrainingInfoProto( + ::google::protobuf::internal::ConstantInitialized); + + inline TrainingInfoProto(const TrainingInfoProto& from) : TrainingInfoProto(nullptr, from) {} + inline TrainingInfoProto(TrainingInfoProto&& from) noexcept + : TrainingInfoProto(nullptr, std::move(from)) {} + inline TrainingInfoProto& operator=(const TrainingInfoProto& from) { + CopyFrom(from); + return *this; + } + inline TrainingInfoProto& operator=(TrainingInfoProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TrainingInfoProto& default_instance() { + return *internal_default_instance(); + } + static inline const TrainingInfoProto* internal_default_instance() { + return reinterpret_cast( + &_TrainingInfoProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 3; + friend void swap(TrainingInfoProto& a, TrainingInfoProto& b) { a.Swap(&b); } + inline void Swap(TrainingInfoProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TrainingInfoProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TrainingInfoProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const TrainingInfoProto& from); + void MergeFrom(const TrainingInfoProto& from) { TrainingInfoProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(TrainingInfoProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.TrainingInfoProto"; } + + protected: + explicit TrainingInfoProto(::google::protobuf::Arena* arena); + TrainingInfoProto(::google::protobuf::Arena* arena, const TrainingInfoProto& from); + TrainingInfoProto(::google::protobuf::Arena* arena, TrainingInfoProto&& from) noexcept + : TrainingInfoProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<23> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kInitializationBindingFieldNumber = 3, + kUpdateBindingFieldNumber = 4, + kInitializationFieldNumber = 1, + kAlgorithmFieldNumber = 2, + }; + // repeated .onnx.StringStringEntryProto initialization_binding = 3; + int initialization_binding_size() const; + private: + int _internal_initialization_binding_size() const; + + public: + void clear_initialization_binding() ; + ::onnx::StringStringEntryProto* mutable_initialization_binding(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_initialization_binding(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_initialization_binding() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_initialization_binding(); + public: + const ::onnx::StringStringEntryProto& initialization_binding(int index) const; + ::onnx::StringStringEntryProto* add_initialization_binding(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& initialization_binding() const; + // repeated .onnx.StringStringEntryProto update_binding = 4; + int update_binding_size() const; + private: + int _internal_update_binding_size() const; + + public: + void clear_update_binding() ; + ::onnx::StringStringEntryProto* mutable_update_binding(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_update_binding(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_update_binding() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_update_binding(); + public: + const ::onnx::StringStringEntryProto& update_binding(int index) const; + ::onnx::StringStringEntryProto* add_update_binding(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& update_binding() const; + // optional .onnx.GraphProto initialization = 1; + bool has_initialization() const; + void clear_initialization() ; + const ::onnx::GraphProto& initialization() const; + PROTOBUF_NODISCARD ::onnx::GraphProto* release_initialization(); + ::onnx::GraphProto* mutable_initialization(); + void set_allocated_initialization(::onnx::GraphProto* value); + void unsafe_arena_set_allocated_initialization(::onnx::GraphProto* value); + ::onnx::GraphProto* unsafe_arena_release_initialization(); + + private: + const ::onnx::GraphProto& _internal_initialization() const; + ::onnx::GraphProto* _internal_mutable_initialization(); + + public: + // optional .onnx.GraphProto algorithm = 2; + bool has_algorithm() const; + void clear_algorithm() ; + const ::onnx::GraphProto& algorithm() const; + PROTOBUF_NODISCARD ::onnx::GraphProto* release_algorithm(); + ::onnx::GraphProto* mutable_algorithm(); + void set_allocated_algorithm(::onnx::GraphProto* value); + void unsafe_arena_set_allocated_algorithm(::onnx::GraphProto* value); + ::onnx::GraphProto* unsafe_arena_release_algorithm(); + + private: + const ::onnx::GraphProto& _internal_algorithm() const; + ::onnx::GraphProto* _internal_mutable_algorithm(); + + public: + // @@protoc_insertion_point(class_scope:onnx.TrainingInfoProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 4, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const TrainingInfoProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > initialization_binding_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > update_binding_; + ::onnx::GraphProto* initialization_; + ::onnx::GraphProto* algorithm_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class FunctionProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.FunctionProto) */ { + public: + inline FunctionProto() : FunctionProto(nullptr) {} + ~FunctionProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(FunctionProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(FunctionProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR FunctionProto( + ::google::protobuf::internal::ConstantInitialized); + + inline FunctionProto(const FunctionProto& from) : FunctionProto(nullptr, from) {} + inline FunctionProto(FunctionProto&& from) noexcept + : FunctionProto(nullptr, std::move(from)) {} + inline FunctionProto& operator=(const FunctionProto& from) { + CopyFrom(from); + return *this; + } + inline FunctionProto& operator=(FunctionProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const FunctionProto& default_instance() { + return *internal_default_instance(); + } + static inline const FunctionProto* internal_default_instance() { + return reinterpret_cast( + &_FunctionProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 20; + friend void swap(FunctionProto& a, FunctionProto& b) { a.Swap(&b); } + inline void Swap(FunctionProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FunctionProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FunctionProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const FunctionProto& from); + void MergeFrom(const FunctionProto& from) { FunctionProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(FunctionProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.FunctionProto"; } + + protected: + explicit FunctionProto(::google::protobuf::Arena* arena); + FunctionProto(::google::protobuf::Arena* arena, const FunctionProto& from); + FunctionProto(::google::protobuf::Arena* arena, FunctionProto&& from) noexcept + : FunctionProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<19> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kInputFieldNumber = 4, + kOutputFieldNumber = 5, + kAttributeFieldNumber = 6, + kNodeFieldNumber = 7, + kOpsetImportFieldNumber = 9, + kAttributeProtoFieldNumber = 11, + kValueInfoFieldNumber = 12, + kMetadataPropsFieldNumber = 14, + kNameFieldNumber = 1, + kDocStringFieldNumber = 8, + kDomainFieldNumber = 10, + kOverloadFieldNumber = 13, + }; + // repeated string input = 4; + int input_size() const; + private: + int _internal_input_size() const; + + public: + void clear_input() ; + const std::string& input(int index) const; + std::string* mutable_input(int index); + template + void set_input(int index, Arg_&& value, Args_... args); + std::string* add_input(); + template + void add_input(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField& input() const; + ::google::protobuf::RepeatedPtrField* mutable_input(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_input() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_input(); + + public: + // repeated string output = 5; + int output_size() const; + private: + int _internal_output_size() const; + + public: + void clear_output() ; + const std::string& output(int index) const; + std::string* mutable_output(int index); + template + void set_output(int index, Arg_&& value, Args_... args); + std::string* add_output(); + template + void add_output(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField& output() const; + ::google::protobuf::RepeatedPtrField* mutable_output(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_output() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_output(); + + public: + // repeated string attribute = 6; + int attribute_size() const; + private: + int _internal_attribute_size() const; + + public: + void clear_attribute() ; + const std::string& attribute(int index) const; + std::string* mutable_attribute(int index); + template + void set_attribute(int index, Arg_&& value, Args_... args); + std::string* add_attribute(); + template + void add_attribute(Arg_&& value, Args_... args); + const ::google::protobuf::RepeatedPtrField& attribute() const; + ::google::protobuf::RepeatedPtrField* mutable_attribute(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_attribute() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_attribute(); + + public: + // repeated .onnx.NodeProto node = 7; + int node_size() const; + private: + int _internal_node_size() const; + + public: + void clear_node() ; + ::onnx::NodeProto* mutable_node(int index); + ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>* mutable_node(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>& _internal_node() const; + ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>* _internal_mutable_node(); + public: + const ::onnx::NodeProto& node(int index) const; + ::onnx::NodeProto* add_node(); + const ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>& node() const; + // repeated .onnx.OperatorSetIdProto opset_import = 9; + int opset_import_size() const; + private: + int _internal_opset_import_size() const; + + public: + void clear_opset_import() ; + ::onnx::OperatorSetIdProto* mutable_opset_import(int index); + ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>* mutable_opset_import(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>& _internal_opset_import() const; + ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>* _internal_mutable_opset_import(); + public: + const ::onnx::OperatorSetIdProto& opset_import(int index) const; + ::onnx::OperatorSetIdProto* add_opset_import(); + const ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>& opset_import() const; + // repeated .onnx.AttributeProto attribute_proto = 11; + int attribute_proto_size() const; + private: + int _internal_attribute_proto_size() const; + + public: + void clear_attribute_proto() ; + ::onnx::AttributeProto* mutable_attribute_proto(int index); + ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>* mutable_attribute_proto(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>& _internal_attribute_proto() const; + ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>* _internal_mutable_attribute_proto(); + public: + const ::onnx::AttributeProto& attribute_proto(int index) const; + ::onnx::AttributeProto* add_attribute_proto(); + const ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>& attribute_proto() const; + // repeated .onnx.ValueInfoProto value_info = 12; + int value_info_size() const; + private: + int _internal_value_info_size() const; + + public: + void clear_value_info() ; + ::onnx::ValueInfoProto* mutable_value_info(int index); + ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* mutable_value_info(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& _internal_value_info() const; + ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* _internal_mutable_value_info(); + public: + const ::onnx::ValueInfoProto& value_info(int index) const; + ::onnx::ValueInfoProto* add_value_info(); + const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& value_info() const; + // repeated .onnx.StringStringEntryProto metadata_props = 14; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + + public: + void clear_metadata_props() ; + ::onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_metadata_props(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_metadata_props() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_metadata_props(); + public: + const ::onnx::StringStringEntryProto& metadata_props(int index) const; + ::onnx::StringStringEntryProto* add_metadata_props(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& metadata_props() const; + // optional string name = 1; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional string doc_string = 8; + bool has_doc_string() const; + void clear_doc_string() ; + const std::string& doc_string() const; + template + void set_doc_string(Arg_&& arg, Args_... args); + std::string* mutable_doc_string(); + PROTOBUF_NODISCARD std::string* release_doc_string(); + void set_allocated_doc_string(std::string* value); + + private: + const std::string& _internal_doc_string() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_doc_string( + const std::string& value); + std::string* _internal_mutable_doc_string(); + + public: + // optional string domain = 10; + bool has_domain() const; + void clear_domain() ; + const std::string& domain() const; + template + void set_domain(Arg_&& arg, Args_... args); + std::string* mutable_domain(); + PROTOBUF_NODISCARD std::string* release_domain(); + void set_allocated_domain(std::string* value); + + private: + const std::string& _internal_domain() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_domain( + const std::string& value); + std::string* _internal_mutable_domain(); + + public: + // optional string overload = 13; + bool has_overload() const; + void clear_overload() ; + const std::string& overload() const; + template + void set_overload(Arg_&& arg, Args_... args); + std::string* mutable_overload(); + PROTOBUF_NODISCARD std::string* release_overload(); + void set_allocated_overload(std::string* value); + + private: + const std::string& _internal_overload() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_overload( + const std::string& value); + std::string* _internal_mutable_overload(); + + public: + // @@protoc_insertion_point(class_scope:onnx.FunctionProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 4, 12, 5, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const FunctionProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField input_; + ::google::protobuf::RepeatedPtrField output_; + ::google::protobuf::RepeatedPtrField attribute_; + ::google::protobuf::RepeatedPtrField< ::onnx::NodeProto > node_; + ::google::protobuf::RepeatedPtrField< ::onnx::OperatorSetIdProto > opset_import_; + ::google::protobuf::RepeatedPtrField< ::onnx::AttributeProto > attribute_proto_; + ::google::protobuf::RepeatedPtrField< ::onnx::ValueInfoProto > value_info_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > metadata_props_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::google::protobuf::internal::ArenaStringPtr domain_; + ::google::protobuf::internal::ArenaStringPtr overload_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; +// ------------------------------------------------------------------- + +class ModelProto final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:onnx.ModelProto) */ { + public: + inline ModelProto() : ModelProto(nullptr) {} + ~ModelProto() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(ModelProto* msg, std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(ModelProto)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR ModelProto( + ::google::protobuf::internal::ConstantInitialized); + + inline ModelProto(const ModelProto& from) : ModelProto(nullptr, from) {} + inline ModelProto(ModelProto&& from) noexcept + : ModelProto(nullptr, std::move(from)) {} + inline ModelProto& operator=(const ModelProto& from) { + CopyFrom(from); + return *this; + } + inline ModelProto& operator=(ModelProto&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ModelProto& default_instance() { + return *internal_default_instance(); + } + static inline const ModelProto* internal_default_instance() { + return reinterpret_cast( + &_ModelProto_default_instance_); + } + static constexpr int kIndexInFileMessages = 4; + friend void swap(ModelProto& a, ModelProto& b) { a.Swap(&b); } + inline void Swap(ModelProto* other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ModelProto* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ModelProto* New(::google::protobuf::Arena* arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const ModelProto& from); + void MergeFrom(const ModelProto& from) { ModelProto::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* _InternalSerialize( + const MessageLite& msg, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(ModelProto* other); + private: + template + friend ::absl::string_view( + ::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "onnx.ModelProto"; } + + protected: + explicit ModelProto(::google::protobuf::Arena* arena); + ModelProto(::google::protobuf::Arena* arena, const ModelProto& from); + ModelProto(::google::protobuf::Arena* arena, ModelProto&& from) noexcept + : ModelProto(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* GetClassData() const PROTOBUF_FINAL; + static void* PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena); + static constexpr auto InternalNewImpl_(); + static const ::google::protobuf::internal::ClassDataLite<16> _class_data_; + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kOpsetImportFieldNumber = 8, + kMetadataPropsFieldNumber = 14, + kTrainingInfoFieldNumber = 20, + kFunctionsFieldNumber = 25, + kProducerNameFieldNumber = 2, + kProducerVersionFieldNumber = 3, + kDomainFieldNumber = 4, + kDocStringFieldNumber = 6, + kGraphFieldNumber = 7, + kIrVersionFieldNumber = 1, + kModelVersionFieldNumber = 5, + }; + // repeated .onnx.OperatorSetIdProto opset_import = 8; + int opset_import_size() const; + private: + int _internal_opset_import_size() const; + + public: + void clear_opset_import() ; + ::onnx::OperatorSetIdProto* mutable_opset_import(int index); + ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>* mutable_opset_import(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>& _internal_opset_import() const; + ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>* _internal_mutable_opset_import(); + public: + const ::onnx::OperatorSetIdProto& opset_import(int index) const; + ::onnx::OperatorSetIdProto* add_opset_import(); + const ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>& opset_import() const; + // repeated .onnx.StringStringEntryProto metadata_props = 14; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + + public: + void clear_metadata_props() ; + ::onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* mutable_metadata_props(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& _internal_metadata_props() const; + ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* _internal_mutable_metadata_props(); + public: + const ::onnx::StringStringEntryProto& metadata_props(int index) const; + ::onnx::StringStringEntryProto* add_metadata_props(); + const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& metadata_props() const; + // repeated .onnx.TrainingInfoProto training_info = 20; + int training_info_size() const; + private: + int _internal_training_info_size() const; + + public: + void clear_training_info() ; + ::onnx::TrainingInfoProto* mutable_training_info(int index); + ::google::protobuf::RepeatedPtrField<::onnx::TrainingInfoProto>* mutable_training_info(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::TrainingInfoProto>& _internal_training_info() const; + ::google::protobuf::RepeatedPtrField<::onnx::TrainingInfoProto>* _internal_mutable_training_info(); + public: + const ::onnx::TrainingInfoProto& training_info(int index) const; + ::onnx::TrainingInfoProto* add_training_info(); + const ::google::protobuf::RepeatedPtrField<::onnx::TrainingInfoProto>& training_info() const; + // repeated .onnx.FunctionProto functions = 25; + int functions_size() const; + private: + int _internal_functions_size() const; + + public: + void clear_functions() ; + ::onnx::FunctionProto* mutable_functions(int index); + ::google::protobuf::RepeatedPtrField<::onnx::FunctionProto>* mutable_functions(); + + private: + const ::google::protobuf::RepeatedPtrField<::onnx::FunctionProto>& _internal_functions() const; + ::google::protobuf::RepeatedPtrField<::onnx::FunctionProto>* _internal_mutable_functions(); + public: + const ::onnx::FunctionProto& functions(int index) const; + ::onnx::FunctionProto* add_functions(); + const ::google::protobuf::RepeatedPtrField<::onnx::FunctionProto>& functions() const; + // optional string producer_name = 2; + bool has_producer_name() const; + void clear_producer_name() ; + const std::string& producer_name() const; + template + void set_producer_name(Arg_&& arg, Args_... args); + std::string* mutable_producer_name(); + PROTOBUF_NODISCARD std::string* release_producer_name(); + void set_allocated_producer_name(std::string* value); + + private: + const std::string& _internal_producer_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_producer_name( + const std::string& value); + std::string* _internal_mutable_producer_name(); + + public: + // optional string producer_version = 3; + bool has_producer_version() const; + void clear_producer_version() ; + const std::string& producer_version() const; + template + void set_producer_version(Arg_&& arg, Args_... args); + std::string* mutable_producer_version(); + PROTOBUF_NODISCARD std::string* release_producer_version(); + void set_allocated_producer_version(std::string* value); + + private: + const std::string& _internal_producer_version() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_producer_version( + const std::string& value); + std::string* _internal_mutable_producer_version(); + + public: + // optional string domain = 4; + bool has_domain() const; + void clear_domain() ; + const std::string& domain() const; + template + void set_domain(Arg_&& arg, Args_... args); + std::string* mutable_domain(); + PROTOBUF_NODISCARD std::string* release_domain(); + void set_allocated_domain(std::string* value); + + private: + const std::string& _internal_domain() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_domain( + const std::string& value); + std::string* _internal_mutable_domain(); + + public: + // optional string doc_string = 6; + bool has_doc_string() const; + void clear_doc_string() ; + const std::string& doc_string() const; + template + void set_doc_string(Arg_&& arg, Args_... args); + std::string* mutable_doc_string(); + PROTOBUF_NODISCARD std::string* release_doc_string(); + void set_allocated_doc_string(std::string* value); + + private: + const std::string& _internal_doc_string() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_doc_string( + const std::string& value); + std::string* _internal_mutable_doc_string(); + + public: + // optional .onnx.GraphProto graph = 7; + bool has_graph() const; + void clear_graph() ; + const ::onnx::GraphProto& graph() const; + PROTOBUF_NODISCARD ::onnx::GraphProto* release_graph(); + ::onnx::GraphProto* mutable_graph(); + void set_allocated_graph(::onnx::GraphProto* value); + void unsafe_arena_set_allocated_graph(::onnx::GraphProto* value); + ::onnx::GraphProto* unsafe_arena_release_graph(); + + private: + const ::onnx::GraphProto& _internal_graph() const; + ::onnx::GraphProto* _internal_mutable_graph(); + + public: + // optional int64 ir_version = 1; + bool has_ir_version() const; + void clear_ir_version() ; + ::int64_t ir_version() const; + void set_ir_version(::int64_t value); + + private: + ::int64_t _internal_ir_version() const; + void _internal_set_ir_version(::int64_t value); + + public: + // optional int64 model_version = 5; + bool has_model_version() const; + void clear_model_version() ; + ::int64_t model_version() const; + void set_model_version(::int64_t value); + + private: + ::int64_t _internal_model_version() const; + void _internal_set_model_version(::int64_t value); + + public: + // @@protoc_insertion_point(class_scope:onnx.ModelProto) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 4, 11, 5, + 0, 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const ModelProto& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::onnx::OperatorSetIdProto > opset_import_; + ::google::protobuf::RepeatedPtrField< ::onnx::StringStringEntryProto > metadata_props_; + ::google::protobuf::RepeatedPtrField< ::onnx::TrainingInfoProto > training_info_; + ::google::protobuf::RepeatedPtrField< ::onnx::FunctionProto > functions_; + ::google::protobuf::internal::ArenaStringPtr producer_name_; + ::google::protobuf::internal::ArenaStringPtr producer_version_; + ::google::protobuf::internal::ArenaStringPtr domain_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::onnx::GraphProto* graph_; + ::int64_t ir_version_; + ::int64_t model_version_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_onnx_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// AttributeProto + +// optional string name = 1; +inline bool AttributeProto::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void AttributeProto::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& AttributeProto::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void AttributeProto::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.AttributeProto.name) +} +inline std::string* AttributeProto::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.name) + return _s; +} +inline const std::string& AttributeProto::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void AttributeProto::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* AttributeProto::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* AttributeProto::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.AttributeProto.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.name_.Set("", GetArena()); + } + return released; +} +inline void AttributeProto::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.name) +} + +// optional string ref_attr_name = 21; +inline bool AttributeProto::has_ref_attr_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline void AttributeProto::clear_ref_attr_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ref_attr_name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline const std::string& AttributeProto::ref_attr_name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.ref_attr_name) + return _internal_ref_attr_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void AttributeProto::set_ref_attr_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.ref_attr_name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.AttributeProto.ref_attr_name) +} +inline std::string* AttributeProto::mutable_ref_attr_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_ref_attr_name(); + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.ref_attr_name) + return _s; +} +inline const std::string& AttributeProto::_internal_ref_attr_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.ref_attr_name_.Get(); +} +inline void AttributeProto::_internal_set_ref_attr_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.ref_attr_name_.Set(value, GetArena()); +} +inline std::string* AttributeProto::_internal_mutable_ref_attr_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + return _impl_.ref_attr_name_.Mutable( GetArena()); +} +inline std::string* AttributeProto::release_ref_attr_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.AttributeProto.ref_attr_name) + if ((_impl_._has_bits_[0] & 0x00000008u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000008u; + auto* released = _impl_.ref_attr_name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.ref_attr_name_.Set("", GetArena()); + } + return released; +} +inline void AttributeProto::set_allocated_ref_attr_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + _impl_.ref_attr_name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.ref_attr_name_.IsDefault()) { + _impl_.ref_attr_name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.ref_attr_name) +} + +// optional string doc_string = 13; +inline bool AttributeProto::has_doc_string() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline void AttributeProto::clear_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.doc_string_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const std::string& AttributeProto::doc_string() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.doc_string) + return _internal_doc_string(); +} +template +inline PROTOBUF_ALWAYS_INLINE void AttributeProto::set_doc_string(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.doc_string_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.AttributeProto.doc_string) +} +inline std::string* AttributeProto::mutable_doc_string() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_doc_string(); + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.doc_string) + return _s; +} +inline const std::string& AttributeProto::_internal_doc_string() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.doc_string_.Get(); +} +inline void AttributeProto::_internal_set_doc_string(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.doc_string_.Set(value, GetArena()); +} +inline std::string* AttributeProto::_internal_mutable_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + return _impl_.doc_string_.Mutable( GetArena()); +} +inline std::string* AttributeProto::release_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.AttributeProto.doc_string) + if ((_impl_._has_bits_[0] & 0x00000004u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000004u; + auto* released = _impl_.doc_string_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.doc_string_.Set("", GetArena()); + } + return released; +} +inline void AttributeProto::set_allocated_doc_string(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.doc_string_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.doc_string_.IsDefault()) { + _impl_.doc_string_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.doc_string) +} + +// optional .onnx.AttributeProto.AttributeType type = 20; +inline bool AttributeProto::has_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000400u) != 0; + return value; +} +inline void AttributeProto::clear_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.type_ = 0; + _impl_._has_bits_[0] &= ~0x00000400u; +} +inline ::onnx::AttributeProto_AttributeType AttributeProto::type() const { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.type) + return _internal_type(); +} +inline void AttributeProto::set_type(::onnx::AttributeProto_AttributeType value) { + _internal_set_type(value); + _impl_._has_bits_[0] |= 0x00000400u; + // @@protoc_insertion_point(field_set:onnx.AttributeProto.type) +} +inline ::onnx::AttributeProto_AttributeType AttributeProto::_internal_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::onnx::AttributeProto_AttributeType>(_impl_.type_); +} +inline void AttributeProto::_internal_set_type(::onnx::AttributeProto_AttributeType value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + assert(::onnx::AttributeProto_AttributeType_IsValid(value)); + _impl_.type_ = value; +} + +// optional float f = 2; +inline bool AttributeProto::has_f() const { + bool value = (_impl_._has_bits_[0] & 0x00000200u) != 0; + return value; +} +inline void AttributeProto::clear_f() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.f_ = 0; + _impl_._has_bits_[0] &= ~0x00000200u; +} +inline float AttributeProto::f() const { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.f) + return _internal_f(); +} +inline void AttributeProto::set_f(float value) { + _internal_set_f(value); + _impl_._has_bits_[0] |= 0x00000200u; + // @@protoc_insertion_point(field_set:onnx.AttributeProto.f) +} +inline float AttributeProto::_internal_f() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.f_; +} +inline void AttributeProto::_internal_set_f(float value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.f_ = value; +} + +// optional int64 i = 3; +inline bool AttributeProto::has_i() const { + bool value = (_impl_._has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline void AttributeProto::clear_i() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.i_ = ::int64_t{0}; + _impl_._has_bits_[0] &= ~0x00000100u; +} +inline ::int64_t AttributeProto::i() const { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.i) + return _internal_i(); +} +inline void AttributeProto::set_i(::int64_t value) { + _internal_set_i(value); + _impl_._has_bits_[0] |= 0x00000100u; + // @@protoc_insertion_point(field_set:onnx.AttributeProto.i) +} +inline ::int64_t AttributeProto::_internal_i() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.i_; +} +inline void AttributeProto::_internal_set_i(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.i_ = value; +} + +// optional bytes s = 4; +inline bool AttributeProto::has_s() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void AttributeProto::clear_s() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.s_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& AttributeProto::s() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.s) + return _internal_s(); +} +template +inline PROTOBUF_ALWAYS_INLINE void AttributeProto::set_s(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.s_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.AttributeProto.s) +} +inline std::string* AttributeProto::mutable_s() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_s(); + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.s) + return _s; +} +inline const std::string& AttributeProto::_internal_s() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.s_.Get(); +} +inline void AttributeProto::_internal_set_s(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.s_.Set(value, GetArena()); +} +inline std::string* AttributeProto::_internal_mutable_s() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.s_.Mutable( GetArena()); +} +inline std::string* AttributeProto::release_s() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.AttributeProto.s) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.s_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.s_.Set("", GetArena()); + } + return released; +} +inline void AttributeProto::set_allocated_s(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.s_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.s_.IsDefault()) { + _impl_.s_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.s) +} + +// optional .onnx.TensorProto t = 5; +inline bool AttributeProto::has_t() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + PROTOBUF_ASSUME(!value || _impl_.t_ != nullptr); + return value; +} +inline void AttributeProto::clear_t() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.t_ != nullptr) _impl_.t_->Clear(); + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline const ::onnx::TensorProto& AttributeProto::_internal_t() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TensorProto* p = _impl_.t_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TensorProto_default_instance_); +} +inline const ::onnx::TensorProto& AttributeProto::t() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.t) + return _internal_t(); +} +inline void AttributeProto::unsafe_arena_set_allocated_t(::onnx::TensorProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.t_); + } + _impl_.t_ = reinterpret_cast<::onnx::TensorProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000010u; + } else { + _impl_._has_bits_[0] &= ~0x00000010u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.AttributeProto.t) +} +inline ::onnx::TensorProto* AttributeProto::release_t() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000010u; + ::onnx::TensorProto* released = _impl_.t_; + _impl_.t_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TensorProto* AttributeProto::unsafe_arena_release_t() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.AttributeProto.t) + + _impl_._has_bits_[0] &= ~0x00000010u; + ::onnx::TensorProto* temp = _impl_.t_; + _impl_.t_ = nullptr; + return temp; +} +inline ::onnx::TensorProto* AttributeProto::_internal_mutable_t() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.t_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TensorProto>(GetArena()); + _impl_.t_ = reinterpret_cast<::onnx::TensorProto*>(p); + } + return _impl_.t_; +} +inline ::onnx::TensorProto* AttributeProto::mutable_t() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000010u; + ::onnx::TensorProto* _msg = _internal_mutable_t(); + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.t) + return _msg; +} +inline void AttributeProto::set_allocated_t(::onnx::TensorProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.t_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000010u; + } else { + _impl_._has_bits_[0] &= ~0x00000010u; + } + + _impl_.t_ = reinterpret_cast<::onnx::TensorProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.t) +} + +// optional .onnx.GraphProto g = 6; +inline bool AttributeProto::has_g() const { + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + PROTOBUF_ASSUME(!value || _impl_.g_ != nullptr); + return value; +} +inline void AttributeProto::clear_g() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.g_ != nullptr) _impl_.g_->Clear(); + _impl_._has_bits_[0] &= ~0x00000020u; +} +inline const ::onnx::GraphProto& AttributeProto::_internal_g() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::GraphProto* p = _impl_.g_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_GraphProto_default_instance_); +} +inline const ::onnx::GraphProto& AttributeProto::g() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.g) + return _internal_g(); +} +inline void AttributeProto::unsafe_arena_set_allocated_g(::onnx::GraphProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.g_); + } + _impl_.g_ = reinterpret_cast<::onnx::GraphProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000020u; + } else { + _impl_._has_bits_[0] &= ~0x00000020u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.AttributeProto.g) +} +inline ::onnx::GraphProto* AttributeProto::release_g() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000020u; + ::onnx::GraphProto* released = _impl_.g_; + _impl_.g_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::GraphProto* AttributeProto::unsafe_arena_release_g() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.AttributeProto.g) + + _impl_._has_bits_[0] &= ~0x00000020u; + ::onnx::GraphProto* temp = _impl_.g_; + _impl_.g_ = nullptr; + return temp; +} +inline ::onnx::GraphProto* AttributeProto::_internal_mutable_g() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.g_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::GraphProto>(GetArena()); + _impl_.g_ = reinterpret_cast<::onnx::GraphProto*>(p); + } + return _impl_.g_; +} +inline ::onnx::GraphProto* AttributeProto::mutable_g() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000020u; + ::onnx::GraphProto* _msg = _internal_mutable_g(); + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.g) + return _msg; +} +inline void AttributeProto::set_allocated_g(::onnx::GraphProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.g_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000020u; + } else { + _impl_._has_bits_[0] &= ~0x00000020u; + } + + _impl_.g_ = reinterpret_cast<::onnx::GraphProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.g) +} + +// optional .onnx.SparseTensorProto sparse_tensor = 22; +inline bool AttributeProto::has_sparse_tensor() const { + bool value = (_impl_._has_bits_[0] & 0x00000080u) != 0; + PROTOBUF_ASSUME(!value || _impl_.sparse_tensor_ != nullptr); + return value; +} +inline void AttributeProto::clear_sparse_tensor() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.sparse_tensor_ != nullptr) _impl_.sparse_tensor_->Clear(); + _impl_._has_bits_[0] &= ~0x00000080u; +} +inline const ::onnx::SparseTensorProto& AttributeProto::_internal_sparse_tensor() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::SparseTensorProto* p = _impl_.sparse_tensor_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_SparseTensorProto_default_instance_); +} +inline const ::onnx::SparseTensorProto& AttributeProto::sparse_tensor() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.sparse_tensor) + return _internal_sparse_tensor(); +} +inline void AttributeProto::unsafe_arena_set_allocated_sparse_tensor(::onnx::SparseTensorProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.sparse_tensor_); + } + _impl_.sparse_tensor_ = reinterpret_cast<::onnx::SparseTensorProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000080u; + } else { + _impl_._has_bits_[0] &= ~0x00000080u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.AttributeProto.sparse_tensor) +} +inline ::onnx::SparseTensorProto* AttributeProto::release_sparse_tensor() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000080u; + ::onnx::SparseTensorProto* released = _impl_.sparse_tensor_; + _impl_.sparse_tensor_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::SparseTensorProto* AttributeProto::unsafe_arena_release_sparse_tensor() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.AttributeProto.sparse_tensor) + + _impl_._has_bits_[0] &= ~0x00000080u; + ::onnx::SparseTensorProto* temp = _impl_.sparse_tensor_; + _impl_.sparse_tensor_ = nullptr; + return temp; +} +inline ::onnx::SparseTensorProto* AttributeProto::_internal_mutable_sparse_tensor() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.sparse_tensor_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::SparseTensorProto>(GetArena()); + _impl_.sparse_tensor_ = reinterpret_cast<::onnx::SparseTensorProto*>(p); + } + return _impl_.sparse_tensor_; +} +inline ::onnx::SparseTensorProto* AttributeProto::mutable_sparse_tensor() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000080u; + ::onnx::SparseTensorProto* _msg = _internal_mutable_sparse_tensor(); + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.sparse_tensor) + return _msg; +} +inline void AttributeProto::set_allocated_sparse_tensor(::onnx::SparseTensorProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.sparse_tensor_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000080u; + } else { + _impl_._has_bits_[0] &= ~0x00000080u; + } + + _impl_.sparse_tensor_ = reinterpret_cast<::onnx::SparseTensorProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.sparse_tensor) +} + +// optional .onnx.TypeProto tp = 14; +inline bool AttributeProto::has_tp() const { + bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; + PROTOBUF_ASSUME(!value || _impl_.tp_ != nullptr); + return value; +} +inline void AttributeProto::clear_tp() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.tp_ != nullptr) _impl_.tp_->Clear(); + _impl_._has_bits_[0] &= ~0x00000040u; +} +inline const ::onnx::TypeProto& AttributeProto::_internal_tp() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TypeProto* p = _impl_.tp_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TypeProto_default_instance_); +} +inline const ::onnx::TypeProto& AttributeProto::tp() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.tp) + return _internal_tp(); +} +inline void AttributeProto::unsafe_arena_set_allocated_tp(::onnx::TypeProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.tp_); + } + _impl_.tp_ = reinterpret_cast<::onnx::TypeProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000040u; + } else { + _impl_._has_bits_[0] &= ~0x00000040u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.AttributeProto.tp) +} +inline ::onnx::TypeProto* AttributeProto::release_tp() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000040u; + ::onnx::TypeProto* released = _impl_.tp_; + _impl_.tp_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TypeProto* AttributeProto::unsafe_arena_release_tp() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.AttributeProto.tp) + + _impl_._has_bits_[0] &= ~0x00000040u; + ::onnx::TypeProto* temp = _impl_.tp_; + _impl_.tp_ = nullptr; + return temp; +} +inline ::onnx::TypeProto* AttributeProto::_internal_mutable_tp() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.tp_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto>(GetArena()); + _impl_.tp_ = reinterpret_cast<::onnx::TypeProto*>(p); + } + return _impl_.tp_; +} +inline ::onnx::TypeProto* AttributeProto::mutable_tp() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000040u; + ::onnx::TypeProto* _msg = _internal_mutable_tp(); + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.tp) + return _msg; +} +inline void AttributeProto::set_allocated_tp(::onnx::TypeProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.tp_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000040u; + } else { + _impl_._has_bits_[0] &= ~0x00000040u; + } + + _impl_.tp_ = reinterpret_cast<::onnx::TypeProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.tp) +} + +// repeated float floats = 7; +inline int AttributeProto::_internal_floats_size() const { + return _internal_floats().size(); +} +inline int AttributeProto::floats_size() const { + return _internal_floats_size(); +} +inline void AttributeProto::clear_floats() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.floats_.Clear(); +} +inline float AttributeProto::floats(int index) const { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.floats) + return _internal_floats().Get(index); +} +inline void AttributeProto::set_floats(int index, float value) { + _internal_mutable_floats()->Set(index, value); + // @@protoc_insertion_point(field_set:onnx.AttributeProto.floats) +} +inline void AttributeProto::add_floats(float value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_floats()->Add(value); + // @@protoc_insertion_point(field_add:onnx.AttributeProto.floats) +} +inline const ::google::protobuf::RepeatedField& AttributeProto::floats() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.AttributeProto.floats) + return _internal_floats(); +} +inline ::google::protobuf::RepeatedField* AttributeProto::mutable_floats() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.AttributeProto.floats) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_floats(); +} +inline const ::google::protobuf::RepeatedField& +AttributeProto::_internal_floats() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.floats_; +} +inline ::google::protobuf::RepeatedField* AttributeProto::_internal_mutable_floats() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.floats_; +} + +// repeated int64 ints = 8; +inline int AttributeProto::_internal_ints_size() const { + return _internal_ints().size(); +} +inline int AttributeProto::ints_size() const { + return _internal_ints_size(); +} +inline void AttributeProto::clear_ints() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ints_.Clear(); +} +inline ::int64_t AttributeProto::ints(int index) const { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.ints) + return _internal_ints().Get(index); +} +inline void AttributeProto::set_ints(int index, ::int64_t value) { + _internal_mutable_ints()->Set(index, value); + // @@protoc_insertion_point(field_set:onnx.AttributeProto.ints) +} +inline void AttributeProto::add_ints(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_ints()->Add(value); + // @@protoc_insertion_point(field_add:onnx.AttributeProto.ints) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& AttributeProto::ints() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.AttributeProto.ints) + return _internal_ints(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* AttributeProto::mutable_ints() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.AttributeProto.ints) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_ints(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +AttributeProto::_internal_ints() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.ints_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* AttributeProto::_internal_mutable_ints() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.ints_; +} + +// repeated bytes strings = 9; +inline int AttributeProto::_internal_strings_size() const { + return _internal_strings().size(); +} +inline int AttributeProto::strings_size() const { + return _internal_strings_size(); +} +inline void AttributeProto::clear_strings() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.strings_.Clear(); +} +inline std::string* AttributeProto::add_strings() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + std::string* _s = _internal_mutable_strings()->Add(); + // @@protoc_insertion_point(field_add_mutable:onnx.AttributeProto.strings) + return _s; +} +inline const std::string& AttributeProto::strings(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.strings) + return _internal_strings().Get(index); +} +inline std::string* AttributeProto::mutable_strings(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.strings) + return _internal_mutable_strings()->Mutable(index); +} +template +inline void AttributeProto::set_strings(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString( + *_internal_mutable_strings()->Mutable(index), + std::forward(value), args... , ::google::protobuf::internal::BytesTag{}); + // @@protoc_insertion_point(field_set:onnx.AttributeProto.strings) +} +template +inline void AttributeProto::add_strings(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField(*_internal_mutable_strings(), + std::forward(value), + args... , ::google::protobuf::internal::BytesTag{}); + // @@protoc_insertion_point(field_add:onnx.AttributeProto.strings) +} +inline const ::google::protobuf::RepeatedPtrField& +AttributeProto::strings() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.AttributeProto.strings) + return _internal_strings(); +} +inline ::google::protobuf::RepeatedPtrField* +AttributeProto::mutable_strings() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.AttributeProto.strings) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_strings(); +} +inline const ::google::protobuf::RepeatedPtrField& +AttributeProto::_internal_strings() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.strings_; +} +inline ::google::protobuf::RepeatedPtrField* +AttributeProto::_internal_mutable_strings() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.strings_; +} + +// repeated .onnx.TensorProto tensors = 10; +inline int AttributeProto::_internal_tensors_size() const { + return _internal_tensors().size(); +} +inline int AttributeProto::tensors_size() const { + return _internal_tensors_size(); +} +inline void AttributeProto::clear_tensors() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.tensors_.Clear(); +} +inline ::onnx::TensorProto* AttributeProto::mutable_tensors(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.tensors) + return _internal_mutable_tensors()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>* AttributeProto::mutable_tensors() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.AttributeProto.tensors) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_tensors(); +} +inline const ::onnx::TensorProto& AttributeProto::tensors(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.tensors) + return _internal_tensors().Get(index); +} +inline ::onnx::TensorProto* AttributeProto::add_tensors() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::TensorProto* _add = _internal_mutable_tensors()->Add(); + // @@protoc_insertion_point(field_add:onnx.AttributeProto.tensors) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>& AttributeProto::tensors() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.AttributeProto.tensors) + return _internal_tensors(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>& +AttributeProto::_internal_tensors() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.tensors_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>* +AttributeProto::_internal_mutable_tensors() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.tensors_; +} + +// repeated .onnx.GraphProto graphs = 11; +inline int AttributeProto::_internal_graphs_size() const { + return _internal_graphs().size(); +} +inline int AttributeProto::graphs_size() const { + return _internal_graphs_size(); +} +inline void AttributeProto::clear_graphs() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.graphs_.Clear(); +} +inline ::onnx::GraphProto* AttributeProto::mutable_graphs(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.graphs) + return _internal_mutable_graphs()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::GraphProto>* AttributeProto::mutable_graphs() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.AttributeProto.graphs) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_graphs(); +} +inline const ::onnx::GraphProto& AttributeProto::graphs(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.graphs) + return _internal_graphs().Get(index); +} +inline ::onnx::GraphProto* AttributeProto::add_graphs() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::GraphProto* _add = _internal_mutable_graphs()->Add(); + // @@protoc_insertion_point(field_add:onnx.AttributeProto.graphs) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::GraphProto>& AttributeProto::graphs() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.AttributeProto.graphs) + return _internal_graphs(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::GraphProto>& +AttributeProto::_internal_graphs() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.graphs_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::GraphProto>* +AttributeProto::_internal_mutable_graphs() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.graphs_; +} + +// repeated .onnx.SparseTensorProto sparse_tensors = 23; +inline int AttributeProto::_internal_sparse_tensors_size() const { + return _internal_sparse_tensors().size(); +} +inline int AttributeProto::sparse_tensors_size() const { + return _internal_sparse_tensors_size(); +} +inline void AttributeProto::clear_sparse_tensors() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sparse_tensors_.Clear(); +} +inline ::onnx::SparseTensorProto* AttributeProto::mutable_sparse_tensors(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.sparse_tensors) + return _internal_mutable_sparse_tensors()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>* AttributeProto::mutable_sparse_tensors() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.AttributeProto.sparse_tensors) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_sparse_tensors(); +} +inline const ::onnx::SparseTensorProto& AttributeProto::sparse_tensors(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.sparse_tensors) + return _internal_sparse_tensors().Get(index); +} +inline ::onnx::SparseTensorProto* AttributeProto::add_sparse_tensors() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::SparseTensorProto* _add = _internal_mutable_sparse_tensors()->Add(); + // @@protoc_insertion_point(field_add:onnx.AttributeProto.sparse_tensors) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>& AttributeProto::sparse_tensors() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.AttributeProto.sparse_tensors) + return _internal_sparse_tensors(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>& +AttributeProto::_internal_sparse_tensors() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.sparse_tensors_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>* +AttributeProto::_internal_mutable_sparse_tensors() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.sparse_tensors_; +} + +// repeated .onnx.TypeProto type_protos = 15; +inline int AttributeProto::_internal_type_protos_size() const { + return _internal_type_protos().size(); +} +inline int AttributeProto::type_protos_size() const { + return _internal_type_protos_size(); +} +inline void AttributeProto::clear_type_protos() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.type_protos_.Clear(); +} +inline ::onnx::TypeProto* AttributeProto::mutable_type_protos(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.AttributeProto.type_protos) + return _internal_mutable_type_protos()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TypeProto>* AttributeProto::mutable_type_protos() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.AttributeProto.type_protos) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_type_protos(); +} +inline const ::onnx::TypeProto& AttributeProto::type_protos(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.AttributeProto.type_protos) + return _internal_type_protos().Get(index); +} +inline ::onnx::TypeProto* AttributeProto::add_type_protos() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::TypeProto* _add = _internal_mutable_type_protos()->Add(); + // @@protoc_insertion_point(field_add:onnx.AttributeProto.type_protos) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TypeProto>& AttributeProto::type_protos() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.AttributeProto.type_protos) + return _internal_type_protos(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TypeProto>& +AttributeProto::_internal_type_protos() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.type_protos_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TypeProto>* +AttributeProto::_internal_mutable_type_protos() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.type_protos_; +} + +// ------------------------------------------------------------------- + +// ValueInfoProto + +// optional string name = 1; +inline bool ValueInfoProto::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void ValueInfoProto::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ValueInfoProto::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ValueInfoProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ValueInfoProto::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.ValueInfoProto.name) +} +inline std::string* ValueInfoProto::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:onnx.ValueInfoProto.name) + return _s; +} +inline const std::string& ValueInfoProto::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void ValueInfoProto::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* ValueInfoProto::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* ValueInfoProto::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.ValueInfoProto.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.name_.Set("", GetArena()); + } + return released; +} +inline void ValueInfoProto::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.ValueInfoProto.name) +} + +// optional .onnx.TypeProto type = 2; +inline bool ValueInfoProto::has_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.type_ != nullptr); + return value; +} +inline void ValueInfoProto::clear_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.type_ != nullptr) _impl_.type_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const ::onnx::TypeProto& ValueInfoProto::_internal_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TypeProto* p = _impl_.type_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TypeProto_default_instance_); +} +inline const ::onnx::TypeProto& ValueInfoProto::type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ValueInfoProto.type) + return _internal_type(); +} +inline void ValueInfoProto::unsafe_arena_set_allocated_type(::onnx::TypeProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.type_); + } + _impl_.type_ = reinterpret_cast<::onnx::TypeProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.ValueInfoProto.type) +} +inline ::onnx::TypeProto* ValueInfoProto::release_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000004u; + ::onnx::TypeProto* released = _impl_.type_; + _impl_.type_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TypeProto* ValueInfoProto::unsafe_arena_release_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.ValueInfoProto.type) + + _impl_._has_bits_[0] &= ~0x00000004u; + ::onnx::TypeProto* temp = _impl_.type_; + _impl_.type_ = nullptr; + return temp; +} +inline ::onnx::TypeProto* ValueInfoProto::_internal_mutable_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.type_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto>(GetArena()); + _impl_.type_ = reinterpret_cast<::onnx::TypeProto*>(p); + } + return _impl_.type_; +} +inline ::onnx::TypeProto* ValueInfoProto::mutable_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000004u; + ::onnx::TypeProto* _msg = _internal_mutable_type(); + // @@protoc_insertion_point(field_mutable:onnx.ValueInfoProto.type) + return _msg; +} +inline void ValueInfoProto::set_allocated_type(::onnx::TypeProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.type_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + + _impl_.type_ = reinterpret_cast<::onnx::TypeProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.ValueInfoProto.type) +} + +// optional string doc_string = 3; +inline bool ValueInfoProto::has_doc_string() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void ValueInfoProto::clear_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.doc_string_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ValueInfoProto::doc_string() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ValueInfoProto.doc_string) + return _internal_doc_string(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ValueInfoProto::set_doc_string(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.doc_string_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.ValueInfoProto.doc_string) +} +inline std::string* ValueInfoProto::mutable_doc_string() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_doc_string(); + // @@protoc_insertion_point(field_mutable:onnx.ValueInfoProto.doc_string) + return _s; +} +inline const std::string& ValueInfoProto::_internal_doc_string() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.doc_string_.Get(); +} +inline void ValueInfoProto::_internal_set_doc_string(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.doc_string_.Set(value, GetArena()); +} +inline std::string* ValueInfoProto::_internal_mutable_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.doc_string_.Mutable( GetArena()); +} +inline std::string* ValueInfoProto::release_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.ValueInfoProto.doc_string) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.doc_string_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.doc_string_.Set("", GetArena()); + } + return released; +} +inline void ValueInfoProto::set_allocated_doc_string(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.doc_string_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.doc_string_.IsDefault()) { + _impl_.doc_string_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.ValueInfoProto.doc_string) +} + +// repeated .onnx.StringStringEntryProto metadata_props = 4; +inline int ValueInfoProto::_internal_metadata_props_size() const { + return _internal_metadata_props().size(); +} +inline int ValueInfoProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void ValueInfoProto::clear_metadata_props() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.metadata_props_.Clear(); +} +inline ::onnx::StringStringEntryProto* ValueInfoProto::mutable_metadata_props(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.ValueInfoProto.metadata_props) + return _internal_mutable_metadata_props()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* ValueInfoProto::mutable_metadata_props() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.ValueInfoProto.metadata_props) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_metadata_props(); +} +inline const ::onnx::StringStringEntryProto& ValueInfoProto::metadata_props(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ValueInfoProto.metadata_props) + return _internal_metadata_props().Get(index); +} +inline ::onnx::StringStringEntryProto* ValueInfoProto::add_metadata_props() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_metadata_props()->Add(); + // @@protoc_insertion_point(field_add:onnx.ValueInfoProto.metadata_props) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& ValueInfoProto::metadata_props() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.ValueInfoProto.metadata_props) + return _internal_metadata_props(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +ValueInfoProto::_internal_metadata_props() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.metadata_props_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +ValueInfoProto::_internal_mutable_metadata_props() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.metadata_props_; +} + +// ------------------------------------------------------------------- + +// NodeProto + +// repeated string input = 1; +inline int NodeProto::_internal_input_size() const { + return _internal_input().size(); +} +inline int NodeProto::input_size() const { + return _internal_input_size(); +} +inline void NodeProto::clear_input() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.input_.Clear(); +} +inline std::string* NodeProto::add_input() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + std::string* _s = _internal_mutable_input()->Add(); + // @@protoc_insertion_point(field_add_mutable:onnx.NodeProto.input) + return _s; +} +inline const std::string& NodeProto::input(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.NodeProto.input) + return _internal_input().Get(index); +} +inline std::string* NodeProto::mutable_input(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.NodeProto.input) + return _internal_mutable_input()->Mutable(index); +} +template +inline void NodeProto::set_input(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString( + *_internal_mutable_input()->Mutable(index), + std::forward(value), args... ); + // @@protoc_insertion_point(field_set:onnx.NodeProto.input) +} +template +inline void NodeProto::add_input(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField(*_internal_mutable_input(), + std::forward(value), + args... ); + // @@protoc_insertion_point(field_add:onnx.NodeProto.input) +} +inline const ::google::protobuf::RepeatedPtrField& +NodeProto::input() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.NodeProto.input) + return _internal_input(); +} +inline ::google::protobuf::RepeatedPtrField* +NodeProto::mutable_input() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.NodeProto.input) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_input(); +} +inline const ::google::protobuf::RepeatedPtrField& +NodeProto::_internal_input() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.input_; +} +inline ::google::protobuf::RepeatedPtrField* +NodeProto::_internal_mutable_input() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.input_; +} + +// repeated string output = 2; +inline int NodeProto::_internal_output_size() const { + return _internal_output().size(); +} +inline int NodeProto::output_size() const { + return _internal_output_size(); +} +inline void NodeProto::clear_output() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.output_.Clear(); +} +inline std::string* NodeProto::add_output() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + std::string* _s = _internal_mutable_output()->Add(); + // @@protoc_insertion_point(field_add_mutable:onnx.NodeProto.output) + return _s; +} +inline const std::string& NodeProto::output(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.NodeProto.output) + return _internal_output().Get(index); +} +inline std::string* NodeProto::mutable_output(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.NodeProto.output) + return _internal_mutable_output()->Mutable(index); +} +template +inline void NodeProto::set_output(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString( + *_internal_mutable_output()->Mutable(index), + std::forward(value), args... ); + // @@protoc_insertion_point(field_set:onnx.NodeProto.output) +} +template +inline void NodeProto::add_output(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField(*_internal_mutable_output(), + std::forward(value), + args... ); + // @@protoc_insertion_point(field_add:onnx.NodeProto.output) +} +inline const ::google::protobuf::RepeatedPtrField& +NodeProto::output() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.NodeProto.output) + return _internal_output(); +} +inline ::google::protobuf::RepeatedPtrField* +NodeProto::mutable_output() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.NodeProto.output) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_output(); +} +inline const ::google::protobuf::RepeatedPtrField& +NodeProto::_internal_output() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.output_; +} +inline ::google::protobuf::RepeatedPtrField* +NodeProto::_internal_mutable_output() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.output_; +} + +// optional string name = 3; +inline bool NodeProto::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void NodeProto::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& NodeProto::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.NodeProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void NodeProto::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.NodeProto.name) +} +inline std::string* NodeProto::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:onnx.NodeProto.name) + return _s; +} +inline const std::string& NodeProto::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void NodeProto::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* NodeProto::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* NodeProto::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.NodeProto.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.name_.Set("", GetArena()); + } + return released; +} +inline void NodeProto::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.NodeProto.name) +} + +// optional string op_type = 4; +inline bool NodeProto::has_op_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void NodeProto::clear_op_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.op_type_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& NodeProto::op_type() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.NodeProto.op_type) + return _internal_op_type(); +} +template +inline PROTOBUF_ALWAYS_INLINE void NodeProto::set_op_type(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.op_type_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.NodeProto.op_type) +} +inline std::string* NodeProto::mutable_op_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_op_type(); + // @@protoc_insertion_point(field_mutable:onnx.NodeProto.op_type) + return _s; +} +inline const std::string& NodeProto::_internal_op_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.op_type_.Get(); +} +inline void NodeProto::_internal_set_op_type(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.op_type_.Set(value, GetArena()); +} +inline std::string* NodeProto::_internal_mutable_op_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.op_type_.Mutable( GetArena()); +} +inline std::string* NodeProto::release_op_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.NodeProto.op_type) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.op_type_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.op_type_.Set("", GetArena()); + } + return released; +} +inline void NodeProto::set_allocated_op_type(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.op_type_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.op_type_.IsDefault()) { + _impl_.op_type_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.NodeProto.op_type) +} + +// optional string domain = 7; +inline bool NodeProto::has_domain() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline void NodeProto::clear_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.domain_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline const std::string& NodeProto::domain() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.NodeProto.domain) + return _internal_domain(); +} +template +inline PROTOBUF_ALWAYS_INLINE void NodeProto::set_domain(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.domain_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.NodeProto.domain) +} +inline std::string* NodeProto::mutable_domain() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_domain(); + // @@protoc_insertion_point(field_mutable:onnx.NodeProto.domain) + return _s; +} +inline const std::string& NodeProto::_internal_domain() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.domain_.Get(); +} +inline void NodeProto::_internal_set_domain(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.domain_.Set(value, GetArena()); +} +inline std::string* NodeProto::_internal_mutable_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + return _impl_.domain_.Mutable( GetArena()); +} +inline std::string* NodeProto::release_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.NodeProto.domain) + if ((_impl_._has_bits_[0] & 0x00000008u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000008u; + auto* released = _impl_.domain_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.domain_.Set("", GetArena()); + } + return released; +} +inline void NodeProto::set_allocated_domain(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + _impl_.domain_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.domain_.IsDefault()) { + _impl_.domain_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.NodeProto.domain) +} + +// optional string overload = 8; +inline bool NodeProto::has_overload() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline void NodeProto::clear_overload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.overload_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline const std::string& NodeProto::overload() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.NodeProto.overload) + return _internal_overload(); +} +template +inline PROTOBUF_ALWAYS_INLINE void NodeProto::set_overload(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.overload_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.NodeProto.overload) +} +inline std::string* NodeProto::mutable_overload() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_overload(); + // @@protoc_insertion_point(field_mutable:onnx.NodeProto.overload) + return _s; +} +inline const std::string& NodeProto::_internal_overload() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.overload_.Get(); +} +inline void NodeProto::_internal_set_overload(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.overload_.Set(value, GetArena()); +} +inline std::string* NodeProto::_internal_mutable_overload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000010u; + return _impl_.overload_.Mutable( GetArena()); +} +inline std::string* NodeProto::release_overload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.NodeProto.overload) + if ((_impl_._has_bits_[0] & 0x00000010u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000010u; + auto* released = _impl_.overload_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.overload_.Set("", GetArena()); + } + return released; +} +inline void NodeProto::set_allocated_overload(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000010u; + } else { + _impl_._has_bits_[0] &= ~0x00000010u; + } + _impl_.overload_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.overload_.IsDefault()) { + _impl_.overload_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.NodeProto.overload) +} + +// repeated .onnx.AttributeProto attribute = 5; +inline int NodeProto::_internal_attribute_size() const { + return _internal_attribute().size(); +} +inline int NodeProto::attribute_size() const { + return _internal_attribute_size(); +} +inline void NodeProto::clear_attribute() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attribute_.Clear(); +} +inline ::onnx::AttributeProto* NodeProto::mutable_attribute(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.NodeProto.attribute) + return _internal_mutable_attribute()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>* NodeProto::mutable_attribute() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.NodeProto.attribute) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attribute(); +} +inline const ::onnx::AttributeProto& NodeProto::attribute(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.NodeProto.attribute) + return _internal_attribute().Get(index); +} +inline ::onnx::AttributeProto* NodeProto::add_attribute() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::AttributeProto* _add = _internal_mutable_attribute()->Add(); + // @@protoc_insertion_point(field_add:onnx.NodeProto.attribute) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>& NodeProto::attribute() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.NodeProto.attribute) + return _internal_attribute(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>& +NodeProto::_internal_attribute() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attribute_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>* +NodeProto::_internal_mutable_attribute() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attribute_; +} + +// optional string doc_string = 6; +inline bool NodeProto::has_doc_string() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline void NodeProto::clear_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.doc_string_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const std::string& NodeProto::doc_string() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.NodeProto.doc_string) + return _internal_doc_string(); +} +template +inline PROTOBUF_ALWAYS_INLINE void NodeProto::set_doc_string(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.doc_string_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.NodeProto.doc_string) +} +inline std::string* NodeProto::mutable_doc_string() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_doc_string(); + // @@protoc_insertion_point(field_mutable:onnx.NodeProto.doc_string) + return _s; +} +inline const std::string& NodeProto::_internal_doc_string() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.doc_string_.Get(); +} +inline void NodeProto::_internal_set_doc_string(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.doc_string_.Set(value, GetArena()); +} +inline std::string* NodeProto::_internal_mutable_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + return _impl_.doc_string_.Mutable( GetArena()); +} +inline std::string* NodeProto::release_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.NodeProto.doc_string) + if ((_impl_._has_bits_[0] & 0x00000004u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000004u; + auto* released = _impl_.doc_string_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.doc_string_.Set("", GetArena()); + } + return released; +} +inline void NodeProto::set_allocated_doc_string(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.doc_string_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.doc_string_.IsDefault()) { + _impl_.doc_string_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.NodeProto.doc_string) +} + +// repeated .onnx.StringStringEntryProto metadata_props = 9; +inline int NodeProto::_internal_metadata_props_size() const { + return _internal_metadata_props().size(); +} +inline int NodeProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void NodeProto::clear_metadata_props() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.metadata_props_.Clear(); +} +inline ::onnx::StringStringEntryProto* NodeProto::mutable_metadata_props(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.NodeProto.metadata_props) + return _internal_mutable_metadata_props()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* NodeProto::mutable_metadata_props() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.NodeProto.metadata_props) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_metadata_props(); +} +inline const ::onnx::StringStringEntryProto& NodeProto::metadata_props(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.NodeProto.metadata_props) + return _internal_metadata_props().Get(index); +} +inline ::onnx::StringStringEntryProto* NodeProto::add_metadata_props() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_metadata_props()->Add(); + // @@protoc_insertion_point(field_add:onnx.NodeProto.metadata_props) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& NodeProto::metadata_props() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.NodeProto.metadata_props) + return _internal_metadata_props(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +NodeProto::_internal_metadata_props() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.metadata_props_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +NodeProto::_internal_mutable_metadata_props() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.metadata_props_; +} + +// ------------------------------------------------------------------- + +// TrainingInfoProto + +// optional .onnx.GraphProto initialization = 1; +inline bool TrainingInfoProto::has_initialization() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.initialization_ != nullptr); + return value; +} +inline void TrainingInfoProto::clear_initialization() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.initialization_ != nullptr) _impl_.initialization_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::onnx::GraphProto& TrainingInfoProto::_internal_initialization() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::GraphProto* p = _impl_.initialization_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_GraphProto_default_instance_); +} +inline const ::onnx::GraphProto& TrainingInfoProto::initialization() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TrainingInfoProto.initialization) + return _internal_initialization(); +} +inline void TrainingInfoProto::unsafe_arena_set_allocated_initialization(::onnx::GraphProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.initialization_); + } + _impl_.initialization_ = reinterpret_cast<::onnx::GraphProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TrainingInfoProto.initialization) +} +inline ::onnx::GraphProto* TrainingInfoProto::release_initialization() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::GraphProto* released = _impl_.initialization_; + _impl_.initialization_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::GraphProto* TrainingInfoProto::unsafe_arena_release_initialization() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TrainingInfoProto.initialization) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::GraphProto* temp = _impl_.initialization_; + _impl_.initialization_ = nullptr; + return temp; +} +inline ::onnx::GraphProto* TrainingInfoProto::_internal_mutable_initialization() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.initialization_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::GraphProto>(GetArena()); + _impl_.initialization_ = reinterpret_cast<::onnx::GraphProto*>(p); + } + return _impl_.initialization_; +} +inline ::onnx::GraphProto* TrainingInfoProto::mutable_initialization() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::onnx::GraphProto* _msg = _internal_mutable_initialization(); + // @@protoc_insertion_point(field_mutable:onnx.TrainingInfoProto.initialization) + return _msg; +} +inline void TrainingInfoProto::set_allocated_initialization(::onnx::GraphProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.initialization_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.initialization_ = reinterpret_cast<::onnx::GraphProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.TrainingInfoProto.initialization) +} + +// optional .onnx.GraphProto algorithm = 2; +inline bool TrainingInfoProto::has_algorithm() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.algorithm_ != nullptr); + return value; +} +inline void TrainingInfoProto::clear_algorithm() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.algorithm_ != nullptr) _impl_.algorithm_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::onnx::GraphProto& TrainingInfoProto::_internal_algorithm() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::GraphProto* p = _impl_.algorithm_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_GraphProto_default_instance_); +} +inline const ::onnx::GraphProto& TrainingInfoProto::algorithm() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TrainingInfoProto.algorithm) + return _internal_algorithm(); +} +inline void TrainingInfoProto::unsafe_arena_set_allocated_algorithm(::onnx::GraphProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.algorithm_); + } + _impl_.algorithm_ = reinterpret_cast<::onnx::GraphProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TrainingInfoProto.algorithm) +} +inline ::onnx::GraphProto* TrainingInfoProto::release_algorithm() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000002u; + ::onnx::GraphProto* released = _impl_.algorithm_; + _impl_.algorithm_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::GraphProto* TrainingInfoProto::unsafe_arena_release_algorithm() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TrainingInfoProto.algorithm) + + _impl_._has_bits_[0] &= ~0x00000002u; + ::onnx::GraphProto* temp = _impl_.algorithm_; + _impl_.algorithm_ = nullptr; + return temp; +} +inline ::onnx::GraphProto* TrainingInfoProto::_internal_mutable_algorithm() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.algorithm_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::GraphProto>(GetArena()); + _impl_.algorithm_ = reinterpret_cast<::onnx::GraphProto*>(p); + } + return _impl_.algorithm_; +} +inline ::onnx::GraphProto* TrainingInfoProto::mutable_algorithm() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000002u; + ::onnx::GraphProto* _msg = _internal_mutable_algorithm(); + // @@protoc_insertion_point(field_mutable:onnx.TrainingInfoProto.algorithm) + return _msg; +} +inline void TrainingInfoProto::set_allocated_algorithm(::onnx::GraphProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.algorithm_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + + _impl_.algorithm_ = reinterpret_cast<::onnx::GraphProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.TrainingInfoProto.algorithm) +} + +// repeated .onnx.StringStringEntryProto initialization_binding = 3; +inline int TrainingInfoProto::_internal_initialization_binding_size() const { + return _internal_initialization_binding().size(); +} +inline int TrainingInfoProto::initialization_binding_size() const { + return _internal_initialization_binding_size(); +} +inline void TrainingInfoProto::clear_initialization_binding() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.initialization_binding_.Clear(); +} +inline ::onnx::StringStringEntryProto* TrainingInfoProto::mutable_initialization_binding(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.TrainingInfoProto.initialization_binding) + return _internal_mutable_initialization_binding()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* TrainingInfoProto::mutable_initialization_binding() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TrainingInfoProto.initialization_binding) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_initialization_binding(); +} +inline const ::onnx::StringStringEntryProto& TrainingInfoProto::initialization_binding(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TrainingInfoProto.initialization_binding) + return _internal_initialization_binding().Get(index); +} +inline ::onnx::StringStringEntryProto* TrainingInfoProto::add_initialization_binding() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_initialization_binding()->Add(); + // @@protoc_insertion_point(field_add:onnx.TrainingInfoProto.initialization_binding) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& TrainingInfoProto::initialization_binding() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TrainingInfoProto.initialization_binding) + return _internal_initialization_binding(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +TrainingInfoProto::_internal_initialization_binding() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.initialization_binding_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +TrainingInfoProto::_internal_mutable_initialization_binding() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.initialization_binding_; +} + +// repeated .onnx.StringStringEntryProto update_binding = 4; +inline int TrainingInfoProto::_internal_update_binding_size() const { + return _internal_update_binding().size(); +} +inline int TrainingInfoProto::update_binding_size() const { + return _internal_update_binding_size(); +} +inline void TrainingInfoProto::clear_update_binding() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.update_binding_.Clear(); +} +inline ::onnx::StringStringEntryProto* TrainingInfoProto::mutable_update_binding(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.TrainingInfoProto.update_binding) + return _internal_mutable_update_binding()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* TrainingInfoProto::mutable_update_binding() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TrainingInfoProto.update_binding) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_update_binding(); +} +inline const ::onnx::StringStringEntryProto& TrainingInfoProto::update_binding(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TrainingInfoProto.update_binding) + return _internal_update_binding().Get(index); +} +inline ::onnx::StringStringEntryProto* TrainingInfoProto::add_update_binding() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_update_binding()->Add(); + // @@protoc_insertion_point(field_add:onnx.TrainingInfoProto.update_binding) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& TrainingInfoProto::update_binding() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TrainingInfoProto.update_binding) + return _internal_update_binding(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +TrainingInfoProto::_internal_update_binding() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.update_binding_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +TrainingInfoProto::_internal_mutable_update_binding() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.update_binding_; +} + +// ------------------------------------------------------------------- + +// ModelProto + +// optional int64 ir_version = 1; +inline bool ModelProto::has_ir_version() const { + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline void ModelProto::clear_ir_version() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ir_version_ = ::int64_t{0}; + _impl_._has_bits_[0] &= ~0x00000020u; +} +inline ::int64_t ModelProto::ir_version() const { + // @@protoc_insertion_point(field_get:onnx.ModelProto.ir_version) + return _internal_ir_version(); +} +inline void ModelProto::set_ir_version(::int64_t value) { + _internal_set_ir_version(value); + _impl_._has_bits_[0] |= 0x00000020u; + // @@protoc_insertion_point(field_set:onnx.ModelProto.ir_version) +} +inline ::int64_t ModelProto::_internal_ir_version() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.ir_version_; +} +inline void ModelProto::_internal_set_ir_version(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ir_version_ = value; +} + +// repeated .onnx.OperatorSetIdProto opset_import = 8; +inline int ModelProto::_internal_opset_import_size() const { + return _internal_opset_import().size(); +} +inline int ModelProto::opset_import_size() const { + return _internal_opset_import_size(); +} +inline void ModelProto::clear_opset_import() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.opset_import_.Clear(); +} +inline ::onnx::OperatorSetIdProto* ModelProto::mutable_opset_import(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.ModelProto.opset_import) + return _internal_mutable_opset_import()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>* ModelProto::mutable_opset_import() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.ModelProto.opset_import) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_opset_import(); +} +inline const ::onnx::OperatorSetIdProto& ModelProto::opset_import(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ModelProto.opset_import) + return _internal_opset_import().Get(index); +} +inline ::onnx::OperatorSetIdProto* ModelProto::add_opset_import() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::OperatorSetIdProto* _add = _internal_mutable_opset_import()->Add(); + // @@protoc_insertion_point(field_add:onnx.ModelProto.opset_import) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>& ModelProto::opset_import() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.ModelProto.opset_import) + return _internal_opset_import(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>& +ModelProto::_internal_opset_import() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.opset_import_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>* +ModelProto::_internal_mutable_opset_import() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.opset_import_; +} + +// optional string producer_name = 2; +inline bool ModelProto::has_producer_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void ModelProto::clear_producer_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.producer_name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ModelProto::producer_name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ModelProto.producer_name) + return _internal_producer_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ModelProto::set_producer_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.producer_name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.ModelProto.producer_name) +} +inline std::string* ModelProto::mutable_producer_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_producer_name(); + // @@protoc_insertion_point(field_mutable:onnx.ModelProto.producer_name) + return _s; +} +inline const std::string& ModelProto::_internal_producer_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.producer_name_.Get(); +} +inline void ModelProto::_internal_set_producer_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.producer_name_.Set(value, GetArena()); +} +inline std::string* ModelProto::_internal_mutable_producer_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.producer_name_.Mutable( GetArena()); +} +inline std::string* ModelProto::release_producer_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.ModelProto.producer_name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.producer_name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.producer_name_.Set("", GetArena()); + } + return released; +} +inline void ModelProto::set_allocated_producer_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.producer_name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.producer_name_.IsDefault()) { + _impl_.producer_name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.ModelProto.producer_name) +} + +// optional string producer_version = 3; +inline bool ModelProto::has_producer_version() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void ModelProto::clear_producer_version() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.producer_version_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ModelProto::producer_version() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ModelProto.producer_version) + return _internal_producer_version(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ModelProto::set_producer_version(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.producer_version_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.ModelProto.producer_version) +} +inline std::string* ModelProto::mutable_producer_version() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_producer_version(); + // @@protoc_insertion_point(field_mutable:onnx.ModelProto.producer_version) + return _s; +} +inline const std::string& ModelProto::_internal_producer_version() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.producer_version_.Get(); +} +inline void ModelProto::_internal_set_producer_version(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.producer_version_.Set(value, GetArena()); +} +inline std::string* ModelProto::_internal_mutable_producer_version() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.producer_version_.Mutable( GetArena()); +} +inline std::string* ModelProto::release_producer_version() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.ModelProto.producer_version) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.producer_version_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.producer_version_.Set("", GetArena()); + } + return released; +} +inline void ModelProto::set_allocated_producer_version(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.producer_version_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.producer_version_.IsDefault()) { + _impl_.producer_version_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.ModelProto.producer_version) +} + +// optional string domain = 4; +inline bool ModelProto::has_domain() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline void ModelProto::clear_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.domain_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const std::string& ModelProto::domain() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ModelProto.domain) + return _internal_domain(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ModelProto::set_domain(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.domain_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.ModelProto.domain) +} +inline std::string* ModelProto::mutable_domain() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_domain(); + // @@protoc_insertion_point(field_mutable:onnx.ModelProto.domain) + return _s; +} +inline const std::string& ModelProto::_internal_domain() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.domain_.Get(); +} +inline void ModelProto::_internal_set_domain(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.domain_.Set(value, GetArena()); +} +inline std::string* ModelProto::_internal_mutable_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + return _impl_.domain_.Mutable( GetArena()); +} +inline std::string* ModelProto::release_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.ModelProto.domain) + if ((_impl_._has_bits_[0] & 0x00000004u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000004u; + auto* released = _impl_.domain_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.domain_.Set("", GetArena()); + } + return released; +} +inline void ModelProto::set_allocated_domain(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.domain_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.domain_.IsDefault()) { + _impl_.domain_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.ModelProto.domain) +} + +// optional int64 model_version = 5; +inline bool ModelProto::has_model_version() const { + bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline void ModelProto::clear_model_version() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.model_version_ = ::int64_t{0}; + _impl_._has_bits_[0] &= ~0x00000040u; +} +inline ::int64_t ModelProto::model_version() const { + // @@protoc_insertion_point(field_get:onnx.ModelProto.model_version) + return _internal_model_version(); +} +inline void ModelProto::set_model_version(::int64_t value) { + _internal_set_model_version(value); + _impl_._has_bits_[0] |= 0x00000040u; + // @@protoc_insertion_point(field_set:onnx.ModelProto.model_version) +} +inline ::int64_t ModelProto::_internal_model_version() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.model_version_; +} +inline void ModelProto::_internal_set_model_version(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.model_version_ = value; +} + +// optional string doc_string = 6; +inline bool ModelProto::has_doc_string() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline void ModelProto::clear_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.doc_string_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline const std::string& ModelProto::doc_string() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ModelProto.doc_string) + return _internal_doc_string(); +} +template +inline PROTOBUF_ALWAYS_INLINE void ModelProto::set_doc_string(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.doc_string_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.ModelProto.doc_string) +} +inline std::string* ModelProto::mutable_doc_string() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_doc_string(); + // @@protoc_insertion_point(field_mutable:onnx.ModelProto.doc_string) + return _s; +} +inline const std::string& ModelProto::_internal_doc_string() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.doc_string_.Get(); +} +inline void ModelProto::_internal_set_doc_string(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.doc_string_.Set(value, GetArena()); +} +inline std::string* ModelProto::_internal_mutable_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + return _impl_.doc_string_.Mutable( GetArena()); +} +inline std::string* ModelProto::release_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.ModelProto.doc_string) + if ((_impl_._has_bits_[0] & 0x00000008u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000008u; + auto* released = _impl_.doc_string_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.doc_string_.Set("", GetArena()); + } + return released; +} +inline void ModelProto::set_allocated_doc_string(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + _impl_.doc_string_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.doc_string_.IsDefault()) { + _impl_.doc_string_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.ModelProto.doc_string) +} + +// optional .onnx.GraphProto graph = 7; +inline bool ModelProto::has_graph() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + PROTOBUF_ASSUME(!value || _impl_.graph_ != nullptr); + return value; +} +inline void ModelProto::clear_graph() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.graph_ != nullptr) _impl_.graph_->Clear(); + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline const ::onnx::GraphProto& ModelProto::_internal_graph() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::GraphProto* p = _impl_.graph_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_GraphProto_default_instance_); +} +inline const ::onnx::GraphProto& ModelProto::graph() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ModelProto.graph) + return _internal_graph(); +} +inline void ModelProto::unsafe_arena_set_allocated_graph(::onnx::GraphProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.graph_); + } + _impl_.graph_ = reinterpret_cast<::onnx::GraphProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000010u; + } else { + _impl_._has_bits_[0] &= ~0x00000010u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.ModelProto.graph) +} +inline ::onnx::GraphProto* ModelProto::release_graph() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000010u; + ::onnx::GraphProto* released = _impl_.graph_; + _impl_.graph_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::GraphProto* ModelProto::unsafe_arena_release_graph() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.ModelProto.graph) + + _impl_._has_bits_[0] &= ~0x00000010u; + ::onnx::GraphProto* temp = _impl_.graph_; + _impl_.graph_ = nullptr; + return temp; +} +inline ::onnx::GraphProto* ModelProto::_internal_mutable_graph() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.graph_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::GraphProto>(GetArena()); + _impl_.graph_ = reinterpret_cast<::onnx::GraphProto*>(p); + } + return _impl_.graph_; +} +inline ::onnx::GraphProto* ModelProto::mutable_graph() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000010u; + ::onnx::GraphProto* _msg = _internal_mutable_graph(); + // @@protoc_insertion_point(field_mutable:onnx.ModelProto.graph) + return _msg; +} +inline void ModelProto::set_allocated_graph(::onnx::GraphProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.graph_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000010u; + } else { + _impl_._has_bits_[0] &= ~0x00000010u; + } + + _impl_.graph_ = reinterpret_cast<::onnx::GraphProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.ModelProto.graph) +} + +// repeated .onnx.StringStringEntryProto metadata_props = 14; +inline int ModelProto::_internal_metadata_props_size() const { + return _internal_metadata_props().size(); +} +inline int ModelProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void ModelProto::clear_metadata_props() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.metadata_props_.Clear(); +} +inline ::onnx::StringStringEntryProto* ModelProto::mutable_metadata_props(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.ModelProto.metadata_props) + return _internal_mutable_metadata_props()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* ModelProto::mutable_metadata_props() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.ModelProto.metadata_props) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_metadata_props(); +} +inline const ::onnx::StringStringEntryProto& ModelProto::metadata_props(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ModelProto.metadata_props) + return _internal_metadata_props().Get(index); +} +inline ::onnx::StringStringEntryProto* ModelProto::add_metadata_props() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_metadata_props()->Add(); + // @@protoc_insertion_point(field_add:onnx.ModelProto.metadata_props) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& ModelProto::metadata_props() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.ModelProto.metadata_props) + return _internal_metadata_props(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +ModelProto::_internal_metadata_props() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.metadata_props_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +ModelProto::_internal_mutable_metadata_props() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.metadata_props_; +} + +// repeated .onnx.TrainingInfoProto training_info = 20; +inline int ModelProto::_internal_training_info_size() const { + return _internal_training_info().size(); +} +inline int ModelProto::training_info_size() const { + return _internal_training_info_size(); +} +inline void ModelProto::clear_training_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.training_info_.Clear(); +} +inline ::onnx::TrainingInfoProto* ModelProto::mutable_training_info(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.ModelProto.training_info) + return _internal_mutable_training_info()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TrainingInfoProto>* ModelProto::mutable_training_info() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.ModelProto.training_info) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_training_info(); +} +inline const ::onnx::TrainingInfoProto& ModelProto::training_info(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ModelProto.training_info) + return _internal_training_info().Get(index); +} +inline ::onnx::TrainingInfoProto* ModelProto::add_training_info() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::TrainingInfoProto* _add = _internal_mutable_training_info()->Add(); + // @@protoc_insertion_point(field_add:onnx.ModelProto.training_info) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TrainingInfoProto>& ModelProto::training_info() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.ModelProto.training_info) + return _internal_training_info(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TrainingInfoProto>& +ModelProto::_internal_training_info() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.training_info_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TrainingInfoProto>* +ModelProto::_internal_mutable_training_info() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.training_info_; +} + +// repeated .onnx.FunctionProto functions = 25; +inline int ModelProto::_internal_functions_size() const { + return _internal_functions().size(); +} +inline int ModelProto::functions_size() const { + return _internal_functions_size(); +} +inline void ModelProto::clear_functions() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.functions_.Clear(); +} +inline ::onnx::FunctionProto* ModelProto::mutable_functions(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.ModelProto.functions) + return _internal_mutable_functions()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::FunctionProto>* ModelProto::mutable_functions() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.ModelProto.functions) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_functions(); +} +inline const ::onnx::FunctionProto& ModelProto::functions(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.ModelProto.functions) + return _internal_functions().Get(index); +} +inline ::onnx::FunctionProto* ModelProto::add_functions() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::FunctionProto* _add = _internal_mutable_functions()->Add(); + // @@protoc_insertion_point(field_add:onnx.ModelProto.functions) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::FunctionProto>& ModelProto::functions() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.ModelProto.functions) + return _internal_functions(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::FunctionProto>& +ModelProto::_internal_functions() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.functions_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::FunctionProto>* +ModelProto::_internal_mutable_functions() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.functions_; +} + +// ------------------------------------------------------------------- + +// StringStringEntryProto + +// optional string key = 1; +inline bool StringStringEntryProto::has_key() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void StringStringEntryProto::clear_key() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.key_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& StringStringEntryProto::key() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.StringStringEntryProto.key) + return _internal_key(); +} +template +inline PROTOBUF_ALWAYS_INLINE void StringStringEntryProto::set_key(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.key_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.StringStringEntryProto.key) +} +inline std::string* StringStringEntryProto::mutable_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_key(); + // @@protoc_insertion_point(field_mutable:onnx.StringStringEntryProto.key) + return _s; +} +inline const std::string& StringStringEntryProto::_internal_key() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.key_.Get(); +} +inline void StringStringEntryProto::_internal_set_key(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.key_.Set(value, GetArena()); +} +inline std::string* StringStringEntryProto::_internal_mutable_key() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.key_.Mutable( GetArena()); +} +inline std::string* StringStringEntryProto::release_key() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.StringStringEntryProto.key) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.key_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.key_.Set("", GetArena()); + } + return released; +} +inline void StringStringEntryProto::set_allocated_key(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.key_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.key_.IsDefault()) { + _impl_.key_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.StringStringEntryProto.key) +} + +// optional string value = 2; +inline bool StringStringEntryProto::has_value() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void StringStringEntryProto::clear_value() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.value_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& StringStringEntryProto::value() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.StringStringEntryProto.value) + return _internal_value(); +} +template +inline PROTOBUF_ALWAYS_INLINE void StringStringEntryProto::set_value(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.value_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.StringStringEntryProto.value) +} +inline std::string* StringStringEntryProto::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_value(); + // @@protoc_insertion_point(field_mutable:onnx.StringStringEntryProto.value) + return _s; +} +inline const std::string& StringStringEntryProto::_internal_value() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.value_.Get(); +} +inline void StringStringEntryProto::_internal_set_value(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.value_.Set(value, GetArena()); +} +inline std::string* StringStringEntryProto::_internal_mutable_value() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.value_.Mutable( GetArena()); +} +inline std::string* StringStringEntryProto::release_value() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.StringStringEntryProto.value) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.value_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.value_.Set("", GetArena()); + } + return released; +} +inline void StringStringEntryProto::set_allocated_value(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.value_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.StringStringEntryProto.value) +} + +// ------------------------------------------------------------------- + +// TensorAnnotation + +// optional string tensor_name = 1; +inline bool TensorAnnotation::has_tensor_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void TensorAnnotation::clear_tensor_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.tensor_name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& TensorAnnotation::tensor_name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorAnnotation.tensor_name) + return _internal_tensor_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void TensorAnnotation::set_tensor_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.tensor_name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.TensorAnnotation.tensor_name) +} +inline std::string* TensorAnnotation::mutable_tensor_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_tensor_name(); + // @@protoc_insertion_point(field_mutable:onnx.TensorAnnotation.tensor_name) + return _s; +} +inline const std::string& TensorAnnotation::_internal_tensor_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.tensor_name_.Get(); +} +inline void TensorAnnotation::_internal_set_tensor_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.tensor_name_.Set(value, GetArena()); +} +inline std::string* TensorAnnotation::_internal_mutable_tensor_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.tensor_name_.Mutable( GetArena()); +} +inline std::string* TensorAnnotation::release_tensor_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TensorAnnotation.tensor_name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.tensor_name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.tensor_name_.Set("", GetArena()); + } + return released; +} +inline void TensorAnnotation::set_allocated_tensor_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.tensor_name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.tensor_name_.IsDefault()) { + _impl_.tensor_name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.TensorAnnotation.tensor_name) +} + +// repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2; +inline int TensorAnnotation::_internal_quant_parameter_tensor_names_size() const { + return _internal_quant_parameter_tensor_names().size(); +} +inline int TensorAnnotation::quant_parameter_tensor_names_size() const { + return _internal_quant_parameter_tensor_names_size(); +} +inline void TensorAnnotation::clear_quant_parameter_tensor_names() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.quant_parameter_tensor_names_.Clear(); +} +inline ::onnx::StringStringEntryProto* TensorAnnotation::mutable_quant_parameter_tensor_names(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.TensorAnnotation.quant_parameter_tensor_names) + return _internal_mutable_quant_parameter_tensor_names()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* TensorAnnotation::mutable_quant_parameter_tensor_names() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorAnnotation.quant_parameter_tensor_names) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_quant_parameter_tensor_names(); +} +inline const ::onnx::StringStringEntryProto& TensorAnnotation::quant_parameter_tensor_names(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorAnnotation.quant_parameter_tensor_names) + return _internal_quant_parameter_tensor_names().Get(index); +} +inline ::onnx::StringStringEntryProto* TensorAnnotation::add_quant_parameter_tensor_names() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_quant_parameter_tensor_names()->Add(); + // @@protoc_insertion_point(field_add:onnx.TensorAnnotation.quant_parameter_tensor_names) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& TensorAnnotation::quant_parameter_tensor_names() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorAnnotation.quant_parameter_tensor_names) + return _internal_quant_parameter_tensor_names(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +TensorAnnotation::_internal_quant_parameter_tensor_names() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.quant_parameter_tensor_names_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +TensorAnnotation::_internal_mutable_quant_parameter_tensor_names() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.quant_parameter_tensor_names_; +} + +// ------------------------------------------------------------------- + +// GraphProto + +// repeated .onnx.NodeProto node = 1; +inline int GraphProto::_internal_node_size() const { + return _internal_node().size(); +} +inline int GraphProto::node_size() const { + return _internal_node_size(); +} +inline void GraphProto::clear_node() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.node_.Clear(); +} +inline ::onnx::NodeProto* GraphProto::mutable_node(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.node) + return _internal_mutable_node()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>* GraphProto::mutable_node() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.GraphProto.node) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_node(); +} +inline const ::onnx::NodeProto& GraphProto::node(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.node) + return _internal_node().Get(index); +} +inline ::onnx::NodeProto* GraphProto::add_node() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::NodeProto* _add = _internal_mutable_node()->Add(); + // @@protoc_insertion_point(field_add:onnx.GraphProto.node) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>& GraphProto::node() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.GraphProto.node) + return _internal_node(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>& +GraphProto::_internal_node() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.node_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>* +GraphProto::_internal_mutable_node() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.node_; +} + +// optional string name = 2; +inline bool GraphProto::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void GraphProto::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& GraphProto::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void GraphProto::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.GraphProto.name) +} +inline std::string* GraphProto::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.name) + return _s; +} +inline const std::string& GraphProto::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void GraphProto::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* GraphProto::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* GraphProto::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.GraphProto.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.name_.Set("", GetArena()); + } + return released; +} +inline void GraphProto::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.GraphProto.name) +} + +// repeated .onnx.TensorProto initializer = 5; +inline int GraphProto::_internal_initializer_size() const { + return _internal_initializer().size(); +} +inline int GraphProto::initializer_size() const { + return _internal_initializer_size(); +} +inline void GraphProto::clear_initializer() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.initializer_.Clear(); +} +inline ::onnx::TensorProto* GraphProto::mutable_initializer(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.initializer) + return _internal_mutable_initializer()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>* GraphProto::mutable_initializer() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.GraphProto.initializer) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_initializer(); +} +inline const ::onnx::TensorProto& GraphProto::initializer(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.initializer) + return _internal_initializer().Get(index); +} +inline ::onnx::TensorProto* GraphProto::add_initializer() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::TensorProto* _add = _internal_mutable_initializer()->Add(); + // @@protoc_insertion_point(field_add:onnx.GraphProto.initializer) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>& GraphProto::initializer() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.GraphProto.initializer) + return _internal_initializer(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>& +GraphProto::_internal_initializer() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.initializer_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TensorProto>* +GraphProto::_internal_mutable_initializer() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.initializer_; +} + +// repeated .onnx.SparseTensorProto sparse_initializer = 15; +inline int GraphProto::_internal_sparse_initializer_size() const { + return _internal_sparse_initializer().size(); +} +inline int GraphProto::sparse_initializer_size() const { + return _internal_sparse_initializer_size(); +} +inline void GraphProto::clear_sparse_initializer() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sparse_initializer_.Clear(); +} +inline ::onnx::SparseTensorProto* GraphProto::mutable_sparse_initializer(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.sparse_initializer) + return _internal_mutable_sparse_initializer()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>* GraphProto::mutable_sparse_initializer() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.GraphProto.sparse_initializer) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_sparse_initializer(); +} +inline const ::onnx::SparseTensorProto& GraphProto::sparse_initializer(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.sparse_initializer) + return _internal_sparse_initializer().Get(index); +} +inline ::onnx::SparseTensorProto* GraphProto::add_sparse_initializer() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::SparseTensorProto* _add = _internal_mutable_sparse_initializer()->Add(); + // @@protoc_insertion_point(field_add:onnx.GraphProto.sparse_initializer) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>& GraphProto::sparse_initializer() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.GraphProto.sparse_initializer) + return _internal_sparse_initializer(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>& +GraphProto::_internal_sparse_initializer() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.sparse_initializer_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::SparseTensorProto>* +GraphProto::_internal_mutable_sparse_initializer() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.sparse_initializer_; +} + +// optional string doc_string = 10; +inline bool GraphProto::has_doc_string() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void GraphProto::clear_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.doc_string_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& GraphProto::doc_string() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.doc_string) + return _internal_doc_string(); +} +template +inline PROTOBUF_ALWAYS_INLINE void GraphProto::set_doc_string(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.doc_string_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.GraphProto.doc_string) +} +inline std::string* GraphProto::mutable_doc_string() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_doc_string(); + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.doc_string) + return _s; +} +inline const std::string& GraphProto::_internal_doc_string() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.doc_string_.Get(); +} +inline void GraphProto::_internal_set_doc_string(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.doc_string_.Set(value, GetArena()); +} +inline std::string* GraphProto::_internal_mutable_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.doc_string_.Mutable( GetArena()); +} +inline std::string* GraphProto::release_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.GraphProto.doc_string) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.doc_string_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.doc_string_.Set("", GetArena()); + } + return released; +} +inline void GraphProto::set_allocated_doc_string(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.doc_string_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.doc_string_.IsDefault()) { + _impl_.doc_string_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.GraphProto.doc_string) +} + +// repeated .onnx.ValueInfoProto input = 11; +inline int GraphProto::_internal_input_size() const { + return _internal_input().size(); +} +inline int GraphProto::input_size() const { + return _internal_input_size(); +} +inline void GraphProto::clear_input() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.input_.Clear(); +} +inline ::onnx::ValueInfoProto* GraphProto::mutable_input(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.input) + return _internal_mutable_input()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* GraphProto::mutable_input() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.GraphProto.input) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_input(); +} +inline const ::onnx::ValueInfoProto& GraphProto::input(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.input) + return _internal_input().Get(index); +} +inline ::onnx::ValueInfoProto* GraphProto::add_input() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::ValueInfoProto* _add = _internal_mutable_input()->Add(); + // @@protoc_insertion_point(field_add:onnx.GraphProto.input) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& GraphProto::input() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.GraphProto.input) + return _internal_input(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& +GraphProto::_internal_input() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.input_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* +GraphProto::_internal_mutable_input() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.input_; +} + +// repeated .onnx.ValueInfoProto output = 12; +inline int GraphProto::_internal_output_size() const { + return _internal_output().size(); +} +inline int GraphProto::output_size() const { + return _internal_output_size(); +} +inline void GraphProto::clear_output() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.output_.Clear(); +} +inline ::onnx::ValueInfoProto* GraphProto::mutable_output(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.output) + return _internal_mutable_output()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* GraphProto::mutable_output() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.GraphProto.output) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_output(); +} +inline const ::onnx::ValueInfoProto& GraphProto::output(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.output) + return _internal_output().Get(index); +} +inline ::onnx::ValueInfoProto* GraphProto::add_output() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::ValueInfoProto* _add = _internal_mutable_output()->Add(); + // @@protoc_insertion_point(field_add:onnx.GraphProto.output) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& GraphProto::output() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.GraphProto.output) + return _internal_output(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& +GraphProto::_internal_output() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.output_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* +GraphProto::_internal_mutable_output() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.output_; +} + +// repeated .onnx.ValueInfoProto value_info = 13; +inline int GraphProto::_internal_value_info_size() const { + return _internal_value_info().size(); +} +inline int GraphProto::value_info_size() const { + return _internal_value_info_size(); +} +inline void GraphProto::clear_value_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.value_info_.Clear(); +} +inline ::onnx::ValueInfoProto* GraphProto::mutable_value_info(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.value_info) + return _internal_mutable_value_info()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* GraphProto::mutable_value_info() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.GraphProto.value_info) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_value_info(); +} +inline const ::onnx::ValueInfoProto& GraphProto::value_info(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.value_info) + return _internal_value_info().Get(index); +} +inline ::onnx::ValueInfoProto* GraphProto::add_value_info() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::ValueInfoProto* _add = _internal_mutable_value_info()->Add(); + // @@protoc_insertion_point(field_add:onnx.GraphProto.value_info) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& GraphProto::value_info() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.GraphProto.value_info) + return _internal_value_info(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& +GraphProto::_internal_value_info() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.value_info_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* +GraphProto::_internal_mutable_value_info() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.value_info_; +} + +// repeated .onnx.TensorAnnotation quantization_annotation = 14; +inline int GraphProto::_internal_quantization_annotation_size() const { + return _internal_quantization_annotation().size(); +} +inline int GraphProto::quantization_annotation_size() const { + return _internal_quantization_annotation_size(); +} +inline void GraphProto::clear_quantization_annotation() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.quantization_annotation_.Clear(); +} +inline ::onnx::TensorAnnotation* GraphProto::mutable_quantization_annotation(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.quantization_annotation) + return _internal_mutable_quantization_annotation()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TensorAnnotation>* GraphProto::mutable_quantization_annotation() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.GraphProto.quantization_annotation) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_quantization_annotation(); +} +inline const ::onnx::TensorAnnotation& GraphProto::quantization_annotation(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.quantization_annotation) + return _internal_quantization_annotation().Get(index); +} +inline ::onnx::TensorAnnotation* GraphProto::add_quantization_annotation() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::TensorAnnotation* _add = _internal_mutable_quantization_annotation()->Add(); + // @@protoc_insertion_point(field_add:onnx.GraphProto.quantization_annotation) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TensorAnnotation>& GraphProto::quantization_annotation() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.GraphProto.quantization_annotation) + return _internal_quantization_annotation(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TensorAnnotation>& +GraphProto::_internal_quantization_annotation() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.quantization_annotation_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TensorAnnotation>* +GraphProto::_internal_mutable_quantization_annotation() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.quantization_annotation_; +} + +// repeated .onnx.StringStringEntryProto metadata_props = 16; +inline int GraphProto::_internal_metadata_props_size() const { + return _internal_metadata_props().size(); +} +inline int GraphProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void GraphProto::clear_metadata_props() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.metadata_props_.Clear(); +} +inline ::onnx::StringStringEntryProto* GraphProto::mutable_metadata_props(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.GraphProto.metadata_props) + return _internal_mutable_metadata_props()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* GraphProto::mutable_metadata_props() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.GraphProto.metadata_props) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_metadata_props(); +} +inline const ::onnx::StringStringEntryProto& GraphProto::metadata_props(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.GraphProto.metadata_props) + return _internal_metadata_props().Get(index); +} +inline ::onnx::StringStringEntryProto* GraphProto::add_metadata_props() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_metadata_props()->Add(); + // @@protoc_insertion_point(field_add:onnx.GraphProto.metadata_props) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& GraphProto::metadata_props() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.GraphProto.metadata_props) + return _internal_metadata_props(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +GraphProto::_internal_metadata_props() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.metadata_props_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +GraphProto::_internal_mutable_metadata_props() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.metadata_props_; +} + +// ------------------------------------------------------------------- + +// TensorProto_Segment + +// optional int64 begin = 1; +inline bool TensorProto_Segment::has_begin() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void TensorProto_Segment::clear_begin() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.begin_ = ::int64_t{0}; + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline ::int64_t TensorProto_Segment::begin() const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.Segment.begin) + return _internal_begin(); +} +inline void TensorProto_Segment::set_begin(::int64_t value) { + _internal_set_begin(value); + _impl_._has_bits_[0] |= 0x00000001u; + // @@protoc_insertion_point(field_set:onnx.TensorProto.Segment.begin) +} +inline ::int64_t TensorProto_Segment::_internal_begin() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.begin_; +} +inline void TensorProto_Segment::_internal_set_begin(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.begin_ = value; +} + +// optional int64 end = 2; +inline bool TensorProto_Segment::has_end() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void TensorProto_Segment::clear_end() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.end_ = ::int64_t{0}; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline ::int64_t TensorProto_Segment::end() const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.Segment.end) + return _internal_end(); +} +inline void TensorProto_Segment::set_end(::int64_t value) { + _internal_set_end(value); + _impl_._has_bits_[0] |= 0x00000002u; + // @@protoc_insertion_point(field_set:onnx.TensorProto.Segment.end) +} +inline ::int64_t TensorProto_Segment::_internal_end() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.end_; +} +inline void TensorProto_Segment::_internal_set_end(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.end_ = value; +} + +// ------------------------------------------------------------------- + +// TensorProto + +// repeated int64 dims = 1; +inline int TensorProto::_internal_dims_size() const { + return _internal_dims().size(); +} +inline int TensorProto::dims_size() const { + return _internal_dims_size(); +} +inline void TensorProto::clear_dims() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dims_.Clear(); +} +inline ::int64_t TensorProto::dims(int index) const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.dims) + return _internal_dims().Get(index); +} +inline void TensorProto::set_dims(int index, ::int64_t value) { + _internal_mutable_dims()->Set(index, value); + // @@protoc_insertion_point(field_set:onnx.TensorProto.dims) +} +inline void TensorProto::add_dims(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_dims()->Add(value); + // @@protoc_insertion_point(field_add:onnx.TensorProto.dims) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& TensorProto::dims() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorProto.dims) + return _internal_dims(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* TensorProto::mutable_dims() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorProto.dims) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_dims(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +TensorProto::_internal_dims() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.dims_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* TensorProto::_internal_mutable_dims() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.dims_; +} + +// optional int32 data_type = 2; +inline bool TensorProto::has_data_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline void TensorProto::clear_data_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline ::int32_t TensorProto::data_type() const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.data_type) + return _internal_data_type(); +} +inline void TensorProto::set_data_type(::int32_t value) { + _internal_set_data_type(value); + _impl_._has_bits_[0] |= 0x00000010u; + // @@protoc_insertion_point(field_set:onnx.TensorProto.data_type) +} +inline ::int32_t TensorProto::_internal_data_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.data_type_; +} +inline void TensorProto::_internal_set_data_type(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_type_ = value; +} + +// optional .onnx.TensorProto.Segment segment = 3; +inline bool TensorProto::has_segment() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || _impl_.segment_ != nullptr); + return value; +} +inline void TensorProto::clear_segment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.segment_ != nullptr) _impl_.segment_->Clear(); + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline const ::onnx::TensorProto_Segment& TensorProto::_internal_segment() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TensorProto_Segment* p = _impl_.segment_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TensorProto_Segment_default_instance_); +} +inline const ::onnx::TensorProto_Segment& TensorProto::segment() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorProto.segment) + return _internal_segment(); +} +inline void TensorProto::unsafe_arena_set_allocated_segment(::onnx::TensorProto_Segment* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.segment_); + } + _impl_.segment_ = reinterpret_cast<::onnx::TensorProto_Segment*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TensorProto.segment) +} +inline ::onnx::TensorProto_Segment* TensorProto::release_segment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000008u; + ::onnx::TensorProto_Segment* released = _impl_.segment_; + _impl_.segment_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TensorProto_Segment* TensorProto::unsafe_arena_release_segment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TensorProto.segment) + + _impl_._has_bits_[0] &= ~0x00000008u; + ::onnx::TensorProto_Segment* temp = _impl_.segment_; + _impl_.segment_ = nullptr; + return temp; +} +inline ::onnx::TensorProto_Segment* TensorProto::_internal_mutable_segment() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.segment_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TensorProto_Segment>(GetArena()); + _impl_.segment_ = reinterpret_cast<::onnx::TensorProto_Segment*>(p); + } + return _impl_.segment_; +} +inline ::onnx::TensorProto_Segment* TensorProto::mutable_segment() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000008u; + ::onnx::TensorProto_Segment* _msg = _internal_mutable_segment(); + // @@protoc_insertion_point(field_mutable:onnx.TensorProto.segment) + return _msg; +} +inline void TensorProto::set_allocated_segment(::onnx::TensorProto_Segment* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.segment_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + + _impl_.segment_ = reinterpret_cast<::onnx::TensorProto_Segment*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.TensorProto.segment) +} + +// repeated float float_data = 4 [packed = true]; +inline int TensorProto::_internal_float_data_size() const { + return _internal_float_data().size(); +} +inline int TensorProto::float_data_size() const { + return _internal_float_data_size(); +} +inline void TensorProto::clear_float_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.float_data_.Clear(); +} +inline float TensorProto::float_data(int index) const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.float_data) + return _internal_float_data().Get(index); +} +inline void TensorProto::set_float_data(int index, float value) { + _internal_mutable_float_data()->Set(index, value); + // @@protoc_insertion_point(field_set:onnx.TensorProto.float_data) +} +inline void TensorProto::add_float_data(float value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_float_data()->Add(value); + // @@protoc_insertion_point(field_add:onnx.TensorProto.float_data) +} +inline const ::google::protobuf::RepeatedField& TensorProto::float_data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorProto.float_data) + return _internal_float_data(); +} +inline ::google::protobuf::RepeatedField* TensorProto::mutable_float_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorProto.float_data) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_float_data(); +} +inline const ::google::protobuf::RepeatedField& +TensorProto::_internal_float_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.float_data_; +} +inline ::google::protobuf::RepeatedField* TensorProto::_internal_mutable_float_data() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.float_data_; +} + +// repeated int32 int32_data = 5 [packed = true]; +inline int TensorProto::_internal_int32_data_size() const { + return _internal_int32_data().size(); +} +inline int TensorProto::int32_data_size() const { + return _internal_int32_data_size(); +} +inline void TensorProto::clear_int32_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.int32_data_.Clear(); +} +inline ::int32_t TensorProto::int32_data(int index) const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.int32_data) + return _internal_int32_data().Get(index); +} +inline void TensorProto::set_int32_data(int index, ::int32_t value) { + _internal_mutable_int32_data()->Set(index, value); + // @@protoc_insertion_point(field_set:onnx.TensorProto.int32_data) +} +inline void TensorProto::add_int32_data(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_int32_data()->Add(value); + // @@protoc_insertion_point(field_add:onnx.TensorProto.int32_data) +} +inline const ::google::protobuf::RepeatedField<::int32_t>& TensorProto::int32_data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorProto.int32_data) + return _internal_int32_data(); +} +inline ::google::protobuf::RepeatedField<::int32_t>* TensorProto::mutable_int32_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorProto.int32_data) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_int32_data(); +} +inline const ::google::protobuf::RepeatedField<::int32_t>& +TensorProto::_internal_int32_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.int32_data_; +} +inline ::google::protobuf::RepeatedField<::int32_t>* TensorProto::_internal_mutable_int32_data() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.int32_data_; +} + +// repeated bytes string_data = 6; +inline int TensorProto::_internal_string_data_size() const { + return _internal_string_data().size(); +} +inline int TensorProto::string_data_size() const { + return _internal_string_data_size(); +} +inline void TensorProto::clear_string_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.string_data_.Clear(); +} +inline std::string* TensorProto::add_string_data() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + std::string* _s = _internal_mutable_string_data()->Add(); + // @@protoc_insertion_point(field_add_mutable:onnx.TensorProto.string_data) + return _s; +} +inline const std::string& TensorProto::string_data(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorProto.string_data) + return _internal_string_data().Get(index); +} +inline std::string* TensorProto::mutable_string_data(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.TensorProto.string_data) + return _internal_mutable_string_data()->Mutable(index); +} +template +inline void TensorProto::set_string_data(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString( + *_internal_mutable_string_data()->Mutable(index), + std::forward(value), args... , ::google::protobuf::internal::BytesTag{}); + // @@protoc_insertion_point(field_set:onnx.TensorProto.string_data) +} +template +inline void TensorProto::add_string_data(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField(*_internal_mutable_string_data(), + std::forward(value), + args... , ::google::protobuf::internal::BytesTag{}); + // @@protoc_insertion_point(field_add:onnx.TensorProto.string_data) +} +inline const ::google::protobuf::RepeatedPtrField& +TensorProto::string_data() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorProto.string_data) + return _internal_string_data(); +} +inline ::google::protobuf::RepeatedPtrField* +TensorProto::mutable_string_data() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorProto.string_data) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_string_data(); +} +inline const ::google::protobuf::RepeatedPtrField& +TensorProto::_internal_string_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.string_data_; +} +inline ::google::protobuf::RepeatedPtrField* +TensorProto::_internal_mutable_string_data() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.string_data_; +} + +// repeated int64 int64_data = 7 [packed = true]; +inline int TensorProto::_internal_int64_data_size() const { + return _internal_int64_data().size(); +} +inline int TensorProto::int64_data_size() const { + return _internal_int64_data_size(); +} +inline void TensorProto::clear_int64_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.int64_data_.Clear(); +} +inline ::int64_t TensorProto::int64_data(int index) const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.int64_data) + return _internal_int64_data().Get(index); +} +inline void TensorProto::set_int64_data(int index, ::int64_t value) { + _internal_mutable_int64_data()->Set(index, value); + // @@protoc_insertion_point(field_set:onnx.TensorProto.int64_data) +} +inline void TensorProto::add_int64_data(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_int64_data()->Add(value); + // @@protoc_insertion_point(field_add:onnx.TensorProto.int64_data) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& TensorProto::int64_data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorProto.int64_data) + return _internal_int64_data(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* TensorProto::mutable_int64_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorProto.int64_data) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_int64_data(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +TensorProto::_internal_int64_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.int64_data_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* TensorProto::_internal_mutable_int64_data() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.int64_data_; +} + +// optional string name = 8; +inline bool TensorProto::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void TensorProto::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& TensorProto::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void TensorProto::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.TensorProto.name) +} +inline std::string* TensorProto::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:onnx.TensorProto.name) + return _s; +} +inline const std::string& TensorProto::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void TensorProto::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* TensorProto::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* TensorProto::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TensorProto.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.name_.Set("", GetArena()); + } + return released; +} +inline void TensorProto::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.TensorProto.name) +} + +// optional string doc_string = 12; +inline bool TensorProto::has_doc_string() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline void TensorProto::clear_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.doc_string_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const std::string& TensorProto::doc_string() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorProto.doc_string) + return _internal_doc_string(); +} +template +inline PROTOBUF_ALWAYS_INLINE void TensorProto::set_doc_string(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.doc_string_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.TensorProto.doc_string) +} +inline std::string* TensorProto::mutable_doc_string() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_doc_string(); + // @@protoc_insertion_point(field_mutable:onnx.TensorProto.doc_string) + return _s; +} +inline const std::string& TensorProto::_internal_doc_string() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.doc_string_.Get(); +} +inline void TensorProto::_internal_set_doc_string(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.doc_string_.Set(value, GetArena()); +} +inline std::string* TensorProto::_internal_mutable_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + return _impl_.doc_string_.Mutable( GetArena()); +} +inline std::string* TensorProto::release_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TensorProto.doc_string) + if ((_impl_._has_bits_[0] & 0x00000004u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000004u; + auto* released = _impl_.doc_string_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.doc_string_.Set("", GetArena()); + } + return released; +} +inline void TensorProto::set_allocated_doc_string(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.doc_string_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.doc_string_.IsDefault()) { + _impl_.doc_string_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.TensorProto.doc_string) +} + +// optional bytes raw_data = 9; +inline bool TensorProto::has_raw_data() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void TensorProto::clear_raw_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.raw_data_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& TensorProto::raw_data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorProto.raw_data) + return _internal_raw_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE void TensorProto::set_raw_data(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.raw_data_.SetBytes(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.TensorProto.raw_data) +} +inline std::string* TensorProto::mutable_raw_data() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_raw_data(); + // @@protoc_insertion_point(field_mutable:onnx.TensorProto.raw_data) + return _s; +} +inline const std::string& TensorProto::_internal_raw_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.raw_data_.Get(); +} +inline void TensorProto::_internal_set_raw_data(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.raw_data_.Set(value, GetArena()); +} +inline std::string* TensorProto::_internal_mutable_raw_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.raw_data_.Mutable( GetArena()); +} +inline std::string* TensorProto::release_raw_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TensorProto.raw_data) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.raw_data_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.raw_data_.Set("", GetArena()); + } + return released; +} +inline void TensorProto::set_allocated_raw_data(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.raw_data_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.raw_data_.IsDefault()) { + _impl_.raw_data_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.TensorProto.raw_data) +} + +// repeated .onnx.StringStringEntryProto external_data = 13; +inline int TensorProto::_internal_external_data_size() const { + return _internal_external_data().size(); +} +inline int TensorProto::external_data_size() const { + return _internal_external_data_size(); +} +inline void TensorProto::clear_external_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.external_data_.Clear(); +} +inline ::onnx::StringStringEntryProto* TensorProto::mutable_external_data(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.TensorProto.external_data) + return _internal_mutable_external_data()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* TensorProto::mutable_external_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorProto.external_data) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_external_data(); +} +inline const ::onnx::StringStringEntryProto& TensorProto::external_data(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorProto.external_data) + return _internal_external_data().Get(index); +} +inline ::onnx::StringStringEntryProto* TensorProto::add_external_data() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_external_data()->Add(); + // @@protoc_insertion_point(field_add:onnx.TensorProto.external_data) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& TensorProto::external_data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorProto.external_data) + return _internal_external_data(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +TensorProto::_internal_external_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.external_data_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +TensorProto::_internal_mutable_external_data() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.external_data_; +} + +// optional .onnx.TensorProto.DataLocation data_location = 14; +inline bool TensorProto::has_data_location() const { + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline void TensorProto::clear_data_location() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.data_location_ = 0; + _impl_._has_bits_[0] &= ~0x00000020u; +} +inline ::onnx::TensorProto_DataLocation TensorProto::data_location() const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.data_location) + return _internal_data_location(); +} +inline void TensorProto::set_data_location(::onnx::TensorProto_DataLocation value) { + _internal_set_data_location(value); + _impl_._has_bits_[0] |= 0x00000020u; + // @@protoc_insertion_point(field_set:onnx.TensorProto.data_location) +} +inline ::onnx::TensorProto_DataLocation TensorProto::_internal_data_location() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::onnx::TensorProto_DataLocation>(_impl_.data_location_); +} +inline void TensorProto::_internal_set_data_location(::onnx::TensorProto_DataLocation value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + assert(::onnx::TensorProto_DataLocation_IsValid(value)); + _impl_.data_location_ = value; +} + +// repeated double double_data = 10 [packed = true]; +inline int TensorProto::_internal_double_data_size() const { + return _internal_double_data().size(); +} +inline int TensorProto::double_data_size() const { + return _internal_double_data_size(); +} +inline void TensorProto::clear_double_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.double_data_.Clear(); +} +inline double TensorProto::double_data(int index) const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.double_data) + return _internal_double_data().Get(index); +} +inline void TensorProto::set_double_data(int index, double value) { + _internal_mutable_double_data()->Set(index, value); + // @@protoc_insertion_point(field_set:onnx.TensorProto.double_data) +} +inline void TensorProto::add_double_data(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_double_data()->Add(value); + // @@protoc_insertion_point(field_add:onnx.TensorProto.double_data) +} +inline const ::google::protobuf::RepeatedField& TensorProto::double_data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorProto.double_data) + return _internal_double_data(); +} +inline ::google::protobuf::RepeatedField* TensorProto::mutable_double_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorProto.double_data) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_double_data(); +} +inline const ::google::protobuf::RepeatedField& +TensorProto::_internal_double_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.double_data_; +} +inline ::google::protobuf::RepeatedField* TensorProto::_internal_mutable_double_data() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.double_data_; +} + +// repeated uint64 uint64_data = 11 [packed = true]; +inline int TensorProto::_internal_uint64_data_size() const { + return _internal_uint64_data().size(); +} +inline int TensorProto::uint64_data_size() const { + return _internal_uint64_data_size(); +} +inline void TensorProto::clear_uint64_data() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.uint64_data_.Clear(); +} +inline ::uint64_t TensorProto::uint64_data(int index) const { + // @@protoc_insertion_point(field_get:onnx.TensorProto.uint64_data) + return _internal_uint64_data().Get(index); +} +inline void TensorProto::set_uint64_data(int index, ::uint64_t value) { + _internal_mutable_uint64_data()->Set(index, value); + // @@protoc_insertion_point(field_set:onnx.TensorProto.uint64_data) +} +inline void TensorProto::add_uint64_data(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_uint64_data()->Add(value); + // @@protoc_insertion_point(field_add:onnx.TensorProto.uint64_data) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& TensorProto::uint64_data() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorProto.uint64_data) + return _internal_uint64_data(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* TensorProto::mutable_uint64_data() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorProto.uint64_data) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_uint64_data(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +TensorProto::_internal_uint64_data() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.uint64_data_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* TensorProto::_internal_mutable_uint64_data() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.uint64_data_; +} + +// repeated .onnx.StringStringEntryProto metadata_props = 16; +inline int TensorProto::_internal_metadata_props_size() const { + return _internal_metadata_props().size(); +} +inline int TensorProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void TensorProto::clear_metadata_props() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.metadata_props_.Clear(); +} +inline ::onnx::StringStringEntryProto* TensorProto::mutable_metadata_props(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.TensorProto.metadata_props) + return _internal_mutable_metadata_props()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* TensorProto::mutable_metadata_props() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorProto.metadata_props) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_metadata_props(); +} +inline const ::onnx::StringStringEntryProto& TensorProto::metadata_props(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorProto.metadata_props) + return _internal_metadata_props().Get(index); +} +inline ::onnx::StringStringEntryProto* TensorProto::add_metadata_props() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_metadata_props()->Add(); + // @@protoc_insertion_point(field_add:onnx.TensorProto.metadata_props) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& TensorProto::metadata_props() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorProto.metadata_props) + return _internal_metadata_props(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +TensorProto::_internal_metadata_props() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.metadata_props_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +TensorProto::_internal_mutable_metadata_props() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.metadata_props_; +} + +// ------------------------------------------------------------------- + +// SparseTensorProto + +// optional .onnx.TensorProto values = 1; +inline bool SparseTensorProto::has_values() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.values_ != nullptr); + return value; +} +inline void SparseTensorProto::clear_values() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.values_ != nullptr) _impl_.values_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::onnx::TensorProto& SparseTensorProto::_internal_values() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TensorProto* p = _impl_.values_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TensorProto_default_instance_); +} +inline const ::onnx::TensorProto& SparseTensorProto::values() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.SparseTensorProto.values) + return _internal_values(); +} +inline void SparseTensorProto::unsafe_arena_set_allocated_values(::onnx::TensorProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.values_); + } + _impl_.values_ = reinterpret_cast<::onnx::TensorProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.SparseTensorProto.values) +} +inline ::onnx::TensorProto* SparseTensorProto::release_values() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TensorProto* released = _impl_.values_; + _impl_.values_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TensorProto* SparseTensorProto::unsafe_arena_release_values() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.SparseTensorProto.values) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TensorProto* temp = _impl_.values_; + _impl_.values_ = nullptr; + return temp; +} +inline ::onnx::TensorProto* SparseTensorProto::_internal_mutable_values() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.values_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TensorProto>(GetArena()); + _impl_.values_ = reinterpret_cast<::onnx::TensorProto*>(p); + } + return _impl_.values_; +} +inline ::onnx::TensorProto* SparseTensorProto::mutable_values() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::onnx::TensorProto* _msg = _internal_mutable_values(); + // @@protoc_insertion_point(field_mutable:onnx.SparseTensorProto.values) + return _msg; +} +inline void SparseTensorProto::set_allocated_values(::onnx::TensorProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.values_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.values_ = reinterpret_cast<::onnx::TensorProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.SparseTensorProto.values) +} + +// optional .onnx.TensorProto indices = 2; +inline bool SparseTensorProto::has_indices() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.indices_ != nullptr); + return value; +} +inline void SparseTensorProto::clear_indices() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.indices_ != nullptr) _impl_.indices_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const ::onnx::TensorProto& SparseTensorProto::_internal_indices() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TensorProto* p = _impl_.indices_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TensorProto_default_instance_); +} +inline const ::onnx::TensorProto& SparseTensorProto::indices() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.SparseTensorProto.indices) + return _internal_indices(); +} +inline void SparseTensorProto::unsafe_arena_set_allocated_indices(::onnx::TensorProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.indices_); + } + _impl_.indices_ = reinterpret_cast<::onnx::TensorProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.SparseTensorProto.indices) +} +inline ::onnx::TensorProto* SparseTensorProto::release_indices() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000002u; + ::onnx::TensorProto* released = _impl_.indices_; + _impl_.indices_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TensorProto* SparseTensorProto::unsafe_arena_release_indices() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.SparseTensorProto.indices) + + _impl_._has_bits_[0] &= ~0x00000002u; + ::onnx::TensorProto* temp = _impl_.indices_; + _impl_.indices_ = nullptr; + return temp; +} +inline ::onnx::TensorProto* SparseTensorProto::_internal_mutable_indices() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.indices_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TensorProto>(GetArena()); + _impl_.indices_ = reinterpret_cast<::onnx::TensorProto*>(p); + } + return _impl_.indices_; +} +inline ::onnx::TensorProto* SparseTensorProto::mutable_indices() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000002u; + ::onnx::TensorProto* _msg = _internal_mutable_indices(); + // @@protoc_insertion_point(field_mutable:onnx.SparseTensorProto.indices) + return _msg; +} +inline void SparseTensorProto::set_allocated_indices(::onnx::TensorProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.indices_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + + _impl_.indices_ = reinterpret_cast<::onnx::TensorProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.SparseTensorProto.indices) +} + +// repeated int64 dims = 3; +inline int SparseTensorProto::_internal_dims_size() const { + return _internal_dims().size(); +} +inline int SparseTensorProto::dims_size() const { + return _internal_dims_size(); +} +inline void SparseTensorProto::clear_dims() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dims_.Clear(); +} +inline ::int64_t SparseTensorProto::dims(int index) const { + // @@protoc_insertion_point(field_get:onnx.SparseTensorProto.dims) + return _internal_dims().Get(index); +} +inline void SparseTensorProto::set_dims(int index, ::int64_t value) { + _internal_mutable_dims()->Set(index, value); + // @@protoc_insertion_point(field_set:onnx.SparseTensorProto.dims) +} +inline void SparseTensorProto::add_dims(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_dims()->Add(value); + // @@protoc_insertion_point(field_add:onnx.SparseTensorProto.dims) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& SparseTensorProto::dims() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.SparseTensorProto.dims) + return _internal_dims(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* SparseTensorProto::mutable_dims() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.SparseTensorProto.dims) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_dims(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +SparseTensorProto::_internal_dims() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.dims_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* SparseTensorProto::_internal_mutable_dims() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.dims_; +} + +// ------------------------------------------------------------------- + +// TensorShapeProto_Dimension + +// int64 dim_value = 1; +inline bool TensorShapeProto_Dimension::has_dim_value() const { + return value_case() == kDimValue; +} +inline void TensorShapeProto_Dimension::set_has_dim_value() { + _impl_._oneof_case_[0] = kDimValue; +} +inline void TensorShapeProto_Dimension::clear_dim_value() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() == kDimValue) { + _impl_.value_.dim_value_ = ::int64_t{0}; + clear_has_value(); + } +} +inline ::int64_t TensorShapeProto_Dimension::dim_value() const { + // @@protoc_insertion_point(field_get:onnx.TensorShapeProto.Dimension.dim_value) + return _internal_dim_value(); +} +inline void TensorShapeProto_Dimension::set_dim_value(::int64_t value) { + if (value_case() != kDimValue) { + clear_value(); + set_has_dim_value(); + } + _impl_.value_.dim_value_ = value; + // @@protoc_insertion_point(field_set:onnx.TensorShapeProto.Dimension.dim_value) +} +inline ::int64_t TensorShapeProto_Dimension::_internal_dim_value() const { + if (value_case() == kDimValue) { + return _impl_.value_.dim_value_; + } + return ::int64_t{0}; +} + +// string dim_param = 2; +inline bool TensorShapeProto_Dimension::has_dim_param() const { + return value_case() == kDimParam; +} +inline void TensorShapeProto_Dimension::set_has_dim_param() { + _impl_._oneof_case_[0] = kDimParam; +} +inline void TensorShapeProto_Dimension::clear_dim_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() == kDimParam) { + _impl_.value_.dim_param_.Destroy(); + clear_has_value(); + } +} +inline const std::string& TensorShapeProto_Dimension::dim_param() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorShapeProto.Dimension.dim_param) + return _internal_dim_param(); +} +template +inline PROTOBUF_ALWAYS_INLINE void TensorShapeProto_Dimension::set_dim_param(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() != kDimParam) { + clear_value(); + + set_has_dim_param(); + _impl_.value_.dim_param_.InitDefault(); + } + _impl_.value_.dim_param_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.TensorShapeProto.Dimension.dim_param) +} +inline std::string* TensorShapeProto_Dimension::mutable_dim_param() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_dim_param(); + // @@protoc_insertion_point(field_mutable:onnx.TensorShapeProto.Dimension.dim_param) + return _s; +} +inline const std::string& TensorShapeProto_Dimension::_internal_dim_param() const { + ::google::protobuf::internal::TSanRead(&_impl_); + if (value_case() != kDimParam) { + return ::google::protobuf::internal::GetEmptyStringAlreadyInited(); + } + return _impl_.value_.dim_param_.Get(); +} +inline void TensorShapeProto_Dimension::_internal_set_dim_param(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() != kDimParam) { + clear_value(); + + set_has_dim_param(); + _impl_.value_.dim_param_.InitDefault(); + } + _impl_.value_.dim_param_.Set(value, GetArena()); +} +inline std::string* TensorShapeProto_Dimension::_internal_mutable_dim_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() != kDimParam) { + clear_value(); + + set_has_dim_param(); + _impl_.value_.dim_param_.InitDefault(); + } + return _impl_.value_.dim_param_.Mutable( GetArena()); +} +inline std::string* TensorShapeProto_Dimension::release_dim_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TensorShapeProto.Dimension.dim_param) + if (value_case() != kDimParam) { + return nullptr; + } + clear_has_value(); + return _impl_.value_.dim_param_.Release(); +} +inline void TensorShapeProto_Dimension::set_allocated_dim_param(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (has_value()) { + clear_value(); + } + if (value != nullptr) { + set_has_dim_param(); + _impl_.value_.dim_param_.InitAllocated(value, GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.TensorShapeProto.Dimension.dim_param) +} + +// optional string denotation = 3; +inline bool TensorShapeProto_Dimension::has_denotation() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void TensorShapeProto_Dimension::clear_denotation() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.denotation_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& TensorShapeProto_Dimension::denotation() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorShapeProto.Dimension.denotation) + return _internal_denotation(); +} +template +inline PROTOBUF_ALWAYS_INLINE void TensorShapeProto_Dimension::set_denotation(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.denotation_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.TensorShapeProto.Dimension.denotation) +} +inline std::string* TensorShapeProto_Dimension::mutable_denotation() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_denotation(); + // @@protoc_insertion_point(field_mutable:onnx.TensorShapeProto.Dimension.denotation) + return _s; +} +inline const std::string& TensorShapeProto_Dimension::_internal_denotation() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.denotation_.Get(); +} +inline void TensorShapeProto_Dimension::_internal_set_denotation(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.denotation_.Set(value, GetArena()); +} +inline std::string* TensorShapeProto_Dimension::_internal_mutable_denotation() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.denotation_.Mutable( GetArena()); +} +inline std::string* TensorShapeProto_Dimension::release_denotation() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TensorShapeProto.Dimension.denotation) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.denotation_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.denotation_.Set("", GetArena()); + } + return released; +} +inline void TensorShapeProto_Dimension::set_allocated_denotation(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.denotation_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.denotation_.IsDefault()) { + _impl_.denotation_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.TensorShapeProto.Dimension.denotation) +} + +inline bool TensorShapeProto_Dimension::has_value() const { + return value_case() != VALUE_NOT_SET; +} +inline void TensorShapeProto_Dimension::clear_has_value() { + _impl_._oneof_case_[0] = VALUE_NOT_SET; +} +inline TensorShapeProto_Dimension::ValueCase TensorShapeProto_Dimension::value_case() const { + return TensorShapeProto_Dimension::ValueCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// TensorShapeProto + +// repeated .onnx.TensorShapeProto.Dimension dim = 1; +inline int TensorShapeProto::_internal_dim_size() const { + return _internal_dim().size(); +} +inline int TensorShapeProto::dim_size() const { + return _internal_dim_size(); +} +inline void TensorShapeProto::clear_dim() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dim_.Clear(); +} +inline ::onnx::TensorShapeProto_Dimension* TensorShapeProto::mutable_dim(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.TensorShapeProto.dim) + return _internal_mutable_dim()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TensorShapeProto_Dimension>* TensorShapeProto::mutable_dim() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.TensorShapeProto.dim) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_dim(); +} +inline const ::onnx::TensorShapeProto_Dimension& TensorShapeProto::dim(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TensorShapeProto.dim) + return _internal_dim().Get(index); +} +inline ::onnx::TensorShapeProto_Dimension* TensorShapeProto::add_dim() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::TensorShapeProto_Dimension* _add = _internal_mutable_dim()->Add(); + // @@protoc_insertion_point(field_add:onnx.TensorShapeProto.dim) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TensorShapeProto_Dimension>& TensorShapeProto::dim() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.TensorShapeProto.dim) + return _internal_dim(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::TensorShapeProto_Dimension>& +TensorShapeProto::_internal_dim() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.dim_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::TensorShapeProto_Dimension>* +TensorShapeProto::_internal_mutable_dim() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.dim_; +} + +// ------------------------------------------------------------------- + +// TypeProto_Tensor + +// optional int32 elem_type = 1; +inline bool TypeProto_Tensor::has_elem_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void TypeProto_Tensor::clear_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.elem_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline ::int32_t TypeProto_Tensor::elem_type() const { + // @@protoc_insertion_point(field_get:onnx.TypeProto.Tensor.elem_type) + return _internal_elem_type(); +} +inline void TypeProto_Tensor::set_elem_type(::int32_t value) { + _internal_set_elem_type(value); + _impl_._has_bits_[0] |= 0x00000002u; + // @@protoc_insertion_point(field_set:onnx.TypeProto.Tensor.elem_type) +} +inline ::int32_t TypeProto_Tensor::_internal_elem_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.elem_type_; +} +inline void TypeProto_Tensor::_internal_set_elem_type(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.elem_type_ = value; +} + +// optional .onnx.TensorShapeProto shape = 2; +inline bool TypeProto_Tensor::has_shape() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.shape_ != nullptr); + return value; +} +inline void TypeProto_Tensor::clear_shape() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.shape_ != nullptr) _impl_.shape_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::onnx::TensorShapeProto& TypeProto_Tensor::_internal_shape() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TensorShapeProto* p = _impl_.shape_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TensorShapeProto_default_instance_); +} +inline const ::onnx::TensorShapeProto& TypeProto_Tensor::shape() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.Tensor.shape) + return _internal_shape(); +} +inline void TypeProto_Tensor::unsafe_arena_set_allocated_shape(::onnx::TensorShapeProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.shape_); + } + _impl_.shape_ = reinterpret_cast<::onnx::TensorShapeProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.Tensor.shape) +} +inline ::onnx::TensorShapeProto* TypeProto_Tensor::release_shape() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TensorShapeProto* released = _impl_.shape_; + _impl_.shape_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TensorShapeProto* TypeProto_Tensor::unsafe_arena_release_shape() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TypeProto.Tensor.shape) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; + return temp; +} +inline ::onnx::TensorShapeProto* TypeProto_Tensor::_internal_mutable_shape() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.shape_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TensorShapeProto>(GetArena()); + _impl_.shape_ = reinterpret_cast<::onnx::TensorShapeProto*>(p); + } + return _impl_.shape_; +} +inline ::onnx::TensorShapeProto* TypeProto_Tensor::mutable_shape() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::onnx::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.Tensor.shape) + return _msg; +} +inline void TypeProto_Tensor::set_allocated_shape(::onnx::TensorShapeProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.shape_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.shape_ = reinterpret_cast<::onnx::TensorShapeProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.Tensor.shape) +} + +// ------------------------------------------------------------------- + +// TypeProto_Sequence + +// optional .onnx.TypeProto elem_type = 1; +inline bool TypeProto_Sequence::has_elem_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.elem_type_ != nullptr); + return value; +} +inline void TypeProto_Sequence::clear_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.elem_type_ != nullptr) _impl_.elem_type_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::onnx::TypeProto& TypeProto_Sequence::_internal_elem_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TypeProto* p = _impl_.elem_type_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TypeProto_default_instance_); +} +inline const ::onnx::TypeProto& TypeProto_Sequence::elem_type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.Sequence.elem_type) + return _internal_elem_type(); +} +inline void TypeProto_Sequence::unsafe_arena_set_allocated_elem_type(::onnx::TypeProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.elem_type_); + } + _impl_.elem_type_ = reinterpret_cast<::onnx::TypeProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.Sequence.elem_type) +} +inline ::onnx::TypeProto* TypeProto_Sequence::release_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TypeProto* released = _impl_.elem_type_; + _impl_.elem_type_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TypeProto* TypeProto_Sequence::unsafe_arena_release_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TypeProto.Sequence.elem_type) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TypeProto* temp = _impl_.elem_type_; + _impl_.elem_type_ = nullptr; + return temp; +} +inline ::onnx::TypeProto* TypeProto_Sequence::_internal_mutable_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.elem_type_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto>(GetArena()); + _impl_.elem_type_ = reinterpret_cast<::onnx::TypeProto*>(p); + } + return _impl_.elem_type_; +} +inline ::onnx::TypeProto* TypeProto_Sequence::mutable_elem_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::onnx::TypeProto* _msg = _internal_mutable_elem_type(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.Sequence.elem_type) + return _msg; +} +inline void TypeProto_Sequence::set_allocated_elem_type(::onnx::TypeProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.elem_type_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.elem_type_ = reinterpret_cast<::onnx::TypeProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.Sequence.elem_type) +} + +// ------------------------------------------------------------------- + +// TypeProto_Map + +// optional int32 key_type = 1; +inline bool TypeProto_Map::has_key_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void TypeProto_Map::clear_key_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.key_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline ::int32_t TypeProto_Map::key_type() const { + // @@protoc_insertion_point(field_get:onnx.TypeProto.Map.key_type) + return _internal_key_type(); +} +inline void TypeProto_Map::set_key_type(::int32_t value) { + _internal_set_key_type(value); + _impl_._has_bits_[0] |= 0x00000002u; + // @@protoc_insertion_point(field_set:onnx.TypeProto.Map.key_type) +} +inline ::int32_t TypeProto_Map::_internal_key_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.key_type_; +} +inline void TypeProto_Map::_internal_set_key_type(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.key_type_ = value; +} + +// optional .onnx.TypeProto value_type = 2; +inline bool TypeProto_Map::has_value_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.value_type_ != nullptr); + return value; +} +inline void TypeProto_Map::clear_value_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.value_type_ != nullptr) _impl_.value_type_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::onnx::TypeProto& TypeProto_Map::_internal_value_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TypeProto* p = _impl_.value_type_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TypeProto_default_instance_); +} +inline const ::onnx::TypeProto& TypeProto_Map::value_type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.Map.value_type) + return _internal_value_type(); +} +inline void TypeProto_Map::unsafe_arena_set_allocated_value_type(::onnx::TypeProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.value_type_); + } + _impl_.value_type_ = reinterpret_cast<::onnx::TypeProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.Map.value_type) +} +inline ::onnx::TypeProto* TypeProto_Map::release_value_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TypeProto* released = _impl_.value_type_; + _impl_.value_type_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TypeProto* TypeProto_Map::unsafe_arena_release_value_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TypeProto.Map.value_type) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TypeProto* temp = _impl_.value_type_; + _impl_.value_type_ = nullptr; + return temp; +} +inline ::onnx::TypeProto* TypeProto_Map::_internal_mutable_value_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.value_type_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto>(GetArena()); + _impl_.value_type_ = reinterpret_cast<::onnx::TypeProto*>(p); + } + return _impl_.value_type_; +} +inline ::onnx::TypeProto* TypeProto_Map::mutable_value_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::onnx::TypeProto* _msg = _internal_mutable_value_type(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.Map.value_type) + return _msg; +} +inline void TypeProto_Map::set_allocated_value_type(::onnx::TypeProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.value_type_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.value_type_ = reinterpret_cast<::onnx::TypeProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.Map.value_type) +} + +// ------------------------------------------------------------------- + +// TypeProto_Optional + +// optional .onnx.TypeProto elem_type = 1; +inline bool TypeProto_Optional::has_elem_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.elem_type_ != nullptr); + return value; +} +inline void TypeProto_Optional::clear_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.elem_type_ != nullptr) _impl_.elem_type_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::onnx::TypeProto& TypeProto_Optional::_internal_elem_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TypeProto* p = _impl_.elem_type_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TypeProto_default_instance_); +} +inline const ::onnx::TypeProto& TypeProto_Optional::elem_type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.Optional.elem_type) + return _internal_elem_type(); +} +inline void TypeProto_Optional::unsafe_arena_set_allocated_elem_type(::onnx::TypeProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.elem_type_); + } + _impl_.elem_type_ = reinterpret_cast<::onnx::TypeProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.Optional.elem_type) +} +inline ::onnx::TypeProto* TypeProto_Optional::release_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TypeProto* released = _impl_.elem_type_; + _impl_.elem_type_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TypeProto* TypeProto_Optional::unsafe_arena_release_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TypeProto.Optional.elem_type) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TypeProto* temp = _impl_.elem_type_; + _impl_.elem_type_ = nullptr; + return temp; +} +inline ::onnx::TypeProto* TypeProto_Optional::_internal_mutable_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.elem_type_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto>(GetArena()); + _impl_.elem_type_ = reinterpret_cast<::onnx::TypeProto*>(p); + } + return _impl_.elem_type_; +} +inline ::onnx::TypeProto* TypeProto_Optional::mutable_elem_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::onnx::TypeProto* _msg = _internal_mutable_elem_type(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.Optional.elem_type) + return _msg; +} +inline void TypeProto_Optional::set_allocated_elem_type(::onnx::TypeProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.elem_type_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.elem_type_ = reinterpret_cast<::onnx::TypeProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.Optional.elem_type) +} + +// ------------------------------------------------------------------- + +// TypeProto_SparseTensor + +// optional int32 elem_type = 1; +inline bool TypeProto_SparseTensor::has_elem_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void TypeProto_SparseTensor::clear_elem_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.elem_type_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline ::int32_t TypeProto_SparseTensor::elem_type() const { + // @@protoc_insertion_point(field_get:onnx.TypeProto.SparseTensor.elem_type) + return _internal_elem_type(); +} +inline void TypeProto_SparseTensor::set_elem_type(::int32_t value) { + _internal_set_elem_type(value); + _impl_._has_bits_[0] |= 0x00000002u; + // @@protoc_insertion_point(field_set:onnx.TypeProto.SparseTensor.elem_type) +} +inline ::int32_t TypeProto_SparseTensor::_internal_elem_type() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.elem_type_; +} +inline void TypeProto_SparseTensor::_internal_set_elem_type(::int32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.elem_type_ = value; +} + +// optional .onnx.TensorShapeProto shape = 2; +inline bool TypeProto_SparseTensor::has_shape() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.shape_ != nullptr); + return value; +} +inline void TypeProto_SparseTensor::clear_shape() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.shape_ != nullptr) _impl_.shape_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::onnx::TensorShapeProto& TypeProto_SparseTensor::_internal_shape() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::onnx::TensorShapeProto* p = _impl_.shape_; + return p != nullptr ? *p : reinterpret_cast(::onnx::_TensorShapeProto_default_instance_); +} +inline const ::onnx::TensorShapeProto& TypeProto_SparseTensor::shape() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.SparseTensor.shape) + return _internal_shape(); +} +inline void TypeProto_SparseTensor::unsafe_arena_set_allocated_shape(::onnx::TensorShapeProto* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.shape_); + } + _impl_.shape_ = reinterpret_cast<::onnx::TensorShapeProto*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.SparseTensor.shape) +} +inline ::onnx::TensorShapeProto* TypeProto_SparseTensor::release_shape() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TensorShapeProto* released = _impl_.shape_; + _impl_.shape_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::onnx::TensorShapeProto* TypeProto_SparseTensor::unsafe_arena_release_shape() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TypeProto.SparseTensor.shape) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::onnx::TensorShapeProto* temp = _impl_.shape_; + _impl_.shape_ = nullptr; + return temp; +} +inline ::onnx::TensorShapeProto* TypeProto_SparseTensor::_internal_mutable_shape() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.shape_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TensorShapeProto>(GetArena()); + _impl_.shape_ = reinterpret_cast<::onnx::TensorShapeProto*>(p); + } + return _impl_.shape_; +} +inline ::onnx::TensorShapeProto* TypeProto_SparseTensor::mutable_shape() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::onnx::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.SparseTensor.shape) + return _msg; +} +inline void TypeProto_SparseTensor::set_allocated_shape(::onnx::TensorShapeProto* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.shape_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.shape_ = reinterpret_cast<::onnx::TensorShapeProto*>(value); + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.SparseTensor.shape) +} + +// ------------------------------------------------------------------- + +// TypeProto + +// .onnx.TypeProto.Tensor tensor_type = 1; +inline bool TypeProto::has_tensor_type() const { + return value_case() == kTensorType; +} +inline bool TypeProto::_internal_has_tensor_type() const { + return value_case() == kTensorType; +} +inline void TypeProto::set_has_tensor_type() { + _impl_._oneof_case_[0] = kTensorType; +} +inline void TypeProto::clear_tensor_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() == kTensorType) { + if (GetArena() == nullptr) { + delete _impl_.value_.tensor_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.tensor_type_ != nullptr) { + _impl_.value_.tensor_type_->Clear(); + } + } + clear_has_value(); + } +} +inline ::onnx::TypeProto_Tensor* TypeProto::release_tensor_type() { + // @@protoc_insertion_point(field_release:onnx.TypeProto.tensor_type) + if (value_case() == kTensorType) { + clear_has_value(); + auto* temp = _impl_.value_.tensor_type_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.value_.tensor_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::onnx::TypeProto_Tensor& TypeProto::_internal_tensor_type() const { + return value_case() == kTensorType ? *_impl_.value_.tensor_type_ : reinterpret_cast<::onnx::TypeProto_Tensor&>(::onnx::_TypeProto_Tensor_default_instance_); +} +inline const ::onnx::TypeProto_Tensor& TypeProto::tensor_type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.tensor_type) + return _internal_tensor_type(); +} +inline ::onnx::TypeProto_Tensor* TypeProto::unsafe_arena_release_tensor_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:onnx.TypeProto.tensor_type) + if (value_case() == kTensorType) { + clear_has_value(); + auto* temp = _impl_.value_.tensor_type_; + _impl_.value_.tensor_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TypeProto::unsafe_arena_set_allocated_tensor_type(::onnx::TypeProto_Tensor* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_value(); + if (value) { + set_has_tensor_type(); + _impl_.value_.tensor_type_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.tensor_type) +} +inline ::onnx::TypeProto_Tensor* TypeProto::_internal_mutable_tensor_type() { + if (value_case() != kTensorType) { + clear_value(); + set_has_tensor_type(); + _impl_.value_.tensor_type_ = + ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto_Tensor>(GetArena()); + } + return _impl_.value_.tensor_type_; +} +inline ::onnx::TypeProto_Tensor* TypeProto::mutable_tensor_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::onnx::TypeProto_Tensor* _msg = _internal_mutable_tensor_type(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.tensor_type) + return _msg; +} + +// .onnx.TypeProto.Sequence sequence_type = 4; +inline bool TypeProto::has_sequence_type() const { + return value_case() == kSequenceType; +} +inline bool TypeProto::_internal_has_sequence_type() const { + return value_case() == kSequenceType; +} +inline void TypeProto::set_has_sequence_type() { + _impl_._oneof_case_[0] = kSequenceType; +} +inline void TypeProto::clear_sequence_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() == kSequenceType) { + if (GetArena() == nullptr) { + delete _impl_.value_.sequence_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.sequence_type_ != nullptr) { + _impl_.value_.sequence_type_->Clear(); + } + } + clear_has_value(); + } +} +inline ::onnx::TypeProto_Sequence* TypeProto::release_sequence_type() { + // @@protoc_insertion_point(field_release:onnx.TypeProto.sequence_type) + if (value_case() == kSequenceType) { + clear_has_value(); + auto* temp = _impl_.value_.sequence_type_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.value_.sequence_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::onnx::TypeProto_Sequence& TypeProto::_internal_sequence_type() const { + return value_case() == kSequenceType ? *_impl_.value_.sequence_type_ : reinterpret_cast<::onnx::TypeProto_Sequence&>(::onnx::_TypeProto_Sequence_default_instance_); +} +inline const ::onnx::TypeProto_Sequence& TypeProto::sequence_type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.sequence_type) + return _internal_sequence_type(); +} +inline ::onnx::TypeProto_Sequence* TypeProto::unsafe_arena_release_sequence_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:onnx.TypeProto.sequence_type) + if (value_case() == kSequenceType) { + clear_has_value(); + auto* temp = _impl_.value_.sequence_type_; + _impl_.value_.sequence_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TypeProto::unsafe_arena_set_allocated_sequence_type(::onnx::TypeProto_Sequence* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_value(); + if (value) { + set_has_sequence_type(); + _impl_.value_.sequence_type_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.sequence_type) +} +inline ::onnx::TypeProto_Sequence* TypeProto::_internal_mutable_sequence_type() { + if (value_case() != kSequenceType) { + clear_value(); + set_has_sequence_type(); + _impl_.value_.sequence_type_ = + ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto_Sequence>(GetArena()); + } + return _impl_.value_.sequence_type_; +} +inline ::onnx::TypeProto_Sequence* TypeProto::mutable_sequence_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::onnx::TypeProto_Sequence* _msg = _internal_mutable_sequence_type(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.sequence_type) + return _msg; +} + +// .onnx.TypeProto.Map map_type = 5; +inline bool TypeProto::has_map_type() const { + return value_case() == kMapType; +} +inline bool TypeProto::_internal_has_map_type() const { + return value_case() == kMapType; +} +inline void TypeProto::set_has_map_type() { + _impl_._oneof_case_[0] = kMapType; +} +inline void TypeProto::clear_map_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() == kMapType) { + if (GetArena() == nullptr) { + delete _impl_.value_.map_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.map_type_ != nullptr) { + _impl_.value_.map_type_->Clear(); + } + } + clear_has_value(); + } +} +inline ::onnx::TypeProto_Map* TypeProto::release_map_type() { + // @@protoc_insertion_point(field_release:onnx.TypeProto.map_type) + if (value_case() == kMapType) { + clear_has_value(); + auto* temp = _impl_.value_.map_type_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.value_.map_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::onnx::TypeProto_Map& TypeProto::_internal_map_type() const { + return value_case() == kMapType ? *_impl_.value_.map_type_ : reinterpret_cast<::onnx::TypeProto_Map&>(::onnx::_TypeProto_Map_default_instance_); +} +inline const ::onnx::TypeProto_Map& TypeProto::map_type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.map_type) + return _internal_map_type(); +} +inline ::onnx::TypeProto_Map* TypeProto::unsafe_arena_release_map_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:onnx.TypeProto.map_type) + if (value_case() == kMapType) { + clear_has_value(); + auto* temp = _impl_.value_.map_type_; + _impl_.value_.map_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TypeProto::unsafe_arena_set_allocated_map_type(::onnx::TypeProto_Map* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_value(); + if (value) { + set_has_map_type(); + _impl_.value_.map_type_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.map_type) +} +inline ::onnx::TypeProto_Map* TypeProto::_internal_mutable_map_type() { + if (value_case() != kMapType) { + clear_value(); + set_has_map_type(); + _impl_.value_.map_type_ = + ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto_Map>(GetArena()); + } + return _impl_.value_.map_type_; +} +inline ::onnx::TypeProto_Map* TypeProto::mutable_map_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::onnx::TypeProto_Map* _msg = _internal_mutable_map_type(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.map_type) + return _msg; +} + +// .onnx.TypeProto.Optional optional_type = 9; +inline bool TypeProto::has_optional_type() const { + return value_case() == kOptionalType; +} +inline bool TypeProto::_internal_has_optional_type() const { + return value_case() == kOptionalType; +} +inline void TypeProto::set_has_optional_type() { + _impl_._oneof_case_[0] = kOptionalType; +} +inline void TypeProto::clear_optional_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() == kOptionalType) { + if (GetArena() == nullptr) { + delete _impl_.value_.optional_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.optional_type_ != nullptr) { + _impl_.value_.optional_type_->Clear(); + } + } + clear_has_value(); + } +} +inline ::onnx::TypeProto_Optional* TypeProto::release_optional_type() { + // @@protoc_insertion_point(field_release:onnx.TypeProto.optional_type) + if (value_case() == kOptionalType) { + clear_has_value(); + auto* temp = _impl_.value_.optional_type_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.value_.optional_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::onnx::TypeProto_Optional& TypeProto::_internal_optional_type() const { + return value_case() == kOptionalType ? *_impl_.value_.optional_type_ : reinterpret_cast<::onnx::TypeProto_Optional&>(::onnx::_TypeProto_Optional_default_instance_); +} +inline const ::onnx::TypeProto_Optional& TypeProto::optional_type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.optional_type) + return _internal_optional_type(); +} +inline ::onnx::TypeProto_Optional* TypeProto::unsafe_arena_release_optional_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:onnx.TypeProto.optional_type) + if (value_case() == kOptionalType) { + clear_has_value(); + auto* temp = _impl_.value_.optional_type_; + _impl_.value_.optional_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TypeProto::unsafe_arena_set_allocated_optional_type(::onnx::TypeProto_Optional* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_value(); + if (value) { + set_has_optional_type(); + _impl_.value_.optional_type_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.optional_type) +} +inline ::onnx::TypeProto_Optional* TypeProto::_internal_mutable_optional_type() { + if (value_case() != kOptionalType) { + clear_value(); + set_has_optional_type(); + _impl_.value_.optional_type_ = + ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto_Optional>(GetArena()); + } + return _impl_.value_.optional_type_; +} +inline ::onnx::TypeProto_Optional* TypeProto::mutable_optional_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::onnx::TypeProto_Optional* _msg = _internal_mutable_optional_type(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.optional_type) + return _msg; +} + +// .onnx.TypeProto.SparseTensor sparse_tensor_type = 8; +inline bool TypeProto::has_sparse_tensor_type() const { + return value_case() == kSparseTensorType; +} +inline bool TypeProto::_internal_has_sparse_tensor_type() const { + return value_case() == kSparseTensorType; +} +inline void TypeProto::set_has_sparse_tensor_type() { + _impl_._oneof_case_[0] = kSparseTensorType; +} +inline void TypeProto::clear_sparse_tensor_type() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value_case() == kSparseTensorType) { + if (GetArena() == nullptr) { + delete _impl_.value_.sparse_tensor_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.sparse_tensor_type_ != nullptr) { + _impl_.value_.sparse_tensor_type_->Clear(); + } + } + clear_has_value(); + } +} +inline ::onnx::TypeProto_SparseTensor* TypeProto::release_sparse_tensor_type() { + // @@protoc_insertion_point(field_release:onnx.TypeProto.sparse_tensor_type) + if (value_case() == kSparseTensorType) { + clear_has_value(); + auto* temp = _impl_.value_.sparse_tensor_type_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.value_.sparse_tensor_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::onnx::TypeProto_SparseTensor& TypeProto::_internal_sparse_tensor_type() const { + return value_case() == kSparseTensorType ? *_impl_.value_.sparse_tensor_type_ : reinterpret_cast<::onnx::TypeProto_SparseTensor&>(::onnx::_TypeProto_SparseTensor_default_instance_); +} +inline const ::onnx::TypeProto_SparseTensor& TypeProto::sparse_tensor_type() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.sparse_tensor_type) + return _internal_sparse_tensor_type(); +} +inline ::onnx::TypeProto_SparseTensor* TypeProto::unsafe_arena_release_sparse_tensor_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:onnx.TypeProto.sparse_tensor_type) + if (value_case() == kSparseTensorType) { + clear_has_value(); + auto* temp = _impl_.value_.sparse_tensor_type_; + _impl_.value_.sparse_tensor_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TypeProto::unsafe_arena_set_allocated_sparse_tensor_type(::onnx::TypeProto_SparseTensor* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_value(); + if (value) { + set_has_sparse_tensor_type(); + _impl_.value_.sparse_tensor_type_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:onnx.TypeProto.sparse_tensor_type) +} +inline ::onnx::TypeProto_SparseTensor* TypeProto::_internal_mutable_sparse_tensor_type() { + if (value_case() != kSparseTensorType) { + clear_value(); + set_has_sparse_tensor_type(); + _impl_.value_.sparse_tensor_type_ = + ::google::protobuf::MessageLite::DefaultConstruct<::onnx::TypeProto_SparseTensor>(GetArena()); + } + return _impl_.value_.sparse_tensor_type_; +} +inline ::onnx::TypeProto_SparseTensor* TypeProto::mutable_sparse_tensor_type() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::onnx::TypeProto_SparseTensor* _msg = _internal_mutable_sparse_tensor_type(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.sparse_tensor_type) + return _msg; +} + +// optional string denotation = 6; +inline bool TypeProto::has_denotation() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void TypeProto::clear_denotation() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.denotation_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& TypeProto::denotation() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.TypeProto.denotation) + return _internal_denotation(); +} +template +inline PROTOBUF_ALWAYS_INLINE void TypeProto::set_denotation(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.denotation_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.TypeProto.denotation) +} +inline std::string* TypeProto::mutable_denotation() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_denotation(); + // @@protoc_insertion_point(field_mutable:onnx.TypeProto.denotation) + return _s; +} +inline const std::string& TypeProto::_internal_denotation() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.denotation_.Get(); +} +inline void TypeProto::_internal_set_denotation(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.denotation_.Set(value, GetArena()); +} +inline std::string* TypeProto::_internal_mutable_denotation() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.denotation_.Mutable( GetArena()); +} +inline std::string* TypeProto::release_denotation() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.TypeProto.denotation) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.denotation_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.denotation_.Set("", GetArena()); + } + return released; +} +inline void TypeProto::set_allocated_denotation(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.denotation_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.denotation_.IsDefault()) { + _impl_.denotation_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.denotation) +} + +inline bool TypeProto::has_value() const { + return value_case() != VALUE_NOT_SET; +} +inline void TypeProto::clear_has_value() { + _impl_._oneof_case_[0] = VALUE_NOT_SET; +} +inline TypeProto::ValueCase TypeProto::value_case() const { + return TypeProto::ValueCase(_impl_._oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// OperatorSetIdProto + +// optional string domain = 1; +inline bool OperatorSetIdProto::has_domain() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void OperatorSetIdProto::clear_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.domain_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& OperatorSetIdProto::domain() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.OperatorSetIdProto.domain) + return _internal_domain(); +} +template +inline PROTOBUF_ALWAYS_INLINE void OperatorSetIdProto::set_domain(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.domain_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.OperatorSetIdProto.domain) +} +inline std::string* OperatorSetIdProto::mutable_domain() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_domain(); + // @@protoc_insertion_point(field_mutable:onnx.OperatorSetIdProto.domain) + return _s; +} +inline const std::string& OperatorSetIdProto::_internal_domain() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.domain_.Get(); +} +inline void OperatorSetIdProto::_internal_set_domain(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.domain_.Set(value, GetArena()); +} +inline std::string* OperatorSetIdProto::_internal_mutable_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.domain_.Mutable( GetArena()); +} +inline std::string* OperatorSetIdProto::release_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.OperatorSetIdProto.domain) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.domain_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.domain_.Set("", GetArena()); + } + return released; +} +inline void OperatorSetIdProto::set_allocated_domain(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.domain_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.domain_.IsDefault()) { + _impl_.domain_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.OperatorSetIdProto.domain) +} + +// optional int64 version = 2; +inline bool OperatorSetIdProto::has_version() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void OperatorSetIdProto::clear_version() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.version_ = ::int64_t{0}; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline ::int64_t OperatorSetIdProto::version() const { + // @@protoc_insertion_point(field_get:onnx.OperatorSetIdProto.version) + return _internal_version(); +} +inline void OperatorSetIdProto::set_version(::int64_t value) { + _internal_set_version(value); + _impl_._has_bits_[0] |= 0x00000002u; + // @@protoc_insertion_point(field_set:onnx.OperatorSetIdProto.version) +} +inline ::int64_t OperatorSetIdProto::_internal_version() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.version_; +} +inline void OperatorSetIdProto::_internal_set_version(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.version_ = value; +} + +// ------------------------------------------------------------------- + +// FunctionProto + +// optional string name = 1; +inline bool FunctionProto::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void FunctionProto::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& FunctionProto::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void FunctionProto::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.FunctionProto.name) +} +inline std::string* FunctionProto::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.name) + return _s; +} +inline const std::string& FunctionProto::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void FunctionProto::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* FunctionProto::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* FunctionProto::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.FunctionProto.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.name_.Set("", GetArena()); + } + return released; +} +inline void FunctionProto::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.FunctionProto.name) +} + +// repeated string input = 4; +inline int FunctionProto::_internal_input_size() const { + return _internal_input().size(); +} +inline int FunctionProto::input_size() const { + return _internal_input_size(); +} +inline void FunctionProto::clear_input() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.input_.Clear(); +} +inline std::string* FunctionProto::add_input() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + std::string* _s = _internal_mutable_input()->Add(); + // @@protoc_insertion_point(field_add_mutable:onnx.FunctionProto.input) + return _s; +} +inline const std::string& FunctionProto::input(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.input) + return _internal_input().Get(index); +} +inline std::string* FunctionProto::mutable_input(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.input) + return _internal_mutable_input()->Mutable(index); +} +template +inline void FunctionProto::set_input(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString( + *_internal_mutable_input()->Mutable(index), + std::forward(value), args... ); + // @@protoc_insertion_point(field_set:onnx.FunctionProto.input) +} +template +inline void FunctionProto::add_input(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField(*_internal_mutable_input(), + std::forward(value), + args... ); + // @@protoc_insertion_point(field_add:onnx.FunctionProto.input) +} +inline const ::google::protobuf::RepeatedPtrField& +FunctionProto::input() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.FunctionProto.input) + return _internal_input(); +} +inline ::google::protobuf::RepeatedPtrField* +FunctionProto::mutable_input() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.FunctionProto.input) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_input(); +} +inline const ::google::protobuf::RepeatedPtrField& +FunctionProto::_internal_input() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.input_; +} +inline ::google::protobuf::RepeatedPtrField* +FunctionProto::_internal_mutable_input() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.input_; +} + +// repeated string output = 5; +inline int FunctionProto::_internal_output_size() const { + return _internal_output().size(); +} +inline int FunctionProto::output_size() const { + return _internal_output_size(); +} +inline void FunctionProto::clear_output() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.output_.Clear(); +} +inline std::string* FunctionProto::add_output() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + std::string* _s = _internal_mutable_output()->Add(); + // @@protoc_insertion_point(field_add_mutable:onnx.FunctionProto.output) + return _s; +} +inline const std::string& FunctionProto::output(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.output) + return _internal_output().Get(index); +} +inline std::string* FunctionProto::mutable_output(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.output) + return _internal_mutable_output()->Mutable(index); +} +template +inline void FunctionProto::set_output(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString( + *_internal_mutable_output()->Mutable(index), + std::forward(value), args... ); + // @@protoc_insertion_point(field_set:onnx.FunctionProto.output) +} +template +inline void FunctionProto::add_output(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField(*_internal_mutable_output(), + std::forward(value), + args... ); + // @@protoc_insertion_point(field_add:onnx.FunctionProto.output) +} +inline const ::google::protobuf::RepeatedPtrField& +FunctionProto::output() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.FunctionProto.output) + return _internal_output(); +} +inline ::google::protobuf::RepeatedPtrField* +FunctionProto::mutable_output() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.FunctionProto.output) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_output(); +} +inline const ::google::protobuf::RepeatedPtrField& +FunctionProto::_internal_output() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.output_; +} +inline ::google::protobuf::RepeatedPtrField* +FunctionProto::_internal_mutable_output() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.output_; +} + +// repeated string attribute = 6; +inline int FunctionProto::_internal_attribute_size() const { + return _internal_attribute().size(); +} +inline int FunctionProto::attribute_size() const { + return _internal_attribute_size(); +} +inline void FunctionProto::clear_attribute() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attribute_.Clear(); +} +inline std::string* FunctionProto::add_attribute() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + std::string* _s = _internal_mutable_attribute()->Add(); + // @@protoc_insertion_point(field_add_mutable:onnx.FunctionProto.attribute) + return _s; +} +inline const std::string& FunctionProto::attribute(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.attribute) + return _internal_attribute().Get(index); +} +inline std::string* FunctionProto::mutable_attribute(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.attribute) + return _internal_mutable_attribute()->Mutable(index); +} +template +inline void FunctionProto::set_attribute(int index, Arg_&& value, Args_... args) { + ::google::protobuf::internal::AssignToString( + *_internal_mutable_attribute()->Mutable(index), + std::forward(value), args... ); + // @@protoc_insertion_point(field_set:onnx.FunctionProto.attribute) +} +template +inline void FunctionProto::add_attribute(Arg_&& value, Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::google::protobuf::internal::AddToRepeatedPtrField(*_internal_mutable_attribute(), + std::forward(value), + args... ); + // @@protoc_insertion_point(field_add:onnx.FunctionProto.attribute) +} +inline const ::google::protobuf::RepeatedPtrField& +FunctionProto::attribute() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.FunctionProto.attribute) + return _internal_attribute(); +} +inline ::google::protobuf::RepeatedPtrField* +FunctionProto::mutable_attribute() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.FunctionProto.attribute) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attribute(); +} +inline const ::google::protobuf::RepeatedPtrField& +FunctionProto::_internal_attribute() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attribute_; +} +inline ::google::protobuf::RepeatedPtrField* +FunctionProto::_internal_mutable_attribute() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attribute_; +} + +// repeated .onnx.AttributeProto attribute_proto = 11; +inline int FunctionProto::_internal_attribute_proto_size() const { + return _internal_attribute_proto().size(); +} +inline int FunctionProto::attribute_proto_size() const { + return _internal_attribute_proto_size(); +} +inline void FunctionProto::clear_attribute_proto() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.attribute_proto_.Clear(); +} +inline ::onnx::AttributeProto* FunctionProto::mutable_attribute_proto(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.attribute_proto) + return _internal_mutable_attribute_proto()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>* FunctionProto::mutable_attribute_proto() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.FunctionProto.attribute_proto) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_attribute_proto(); +} +inline const ::onnx::AttributeProto& FunctionProto::attribute_proto(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.attribute_proto) + return _internal_attribute_proto().Get(index); +} +inline ::onnx::AttributeProto* FunctionProto::add_attribute_proto() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::AttributeProto* _add = _internal_mutable_attribute_proto()->Add(); + // @@protoc_insertion_point(field_add:onnx.FunctionProto.attribute_proto) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>& FunctionProto::attribute_proto() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.FunctionProto.attribute_proto) + return _internal_attribute_proto(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>& +FunctionProto::_internal_attribute_proto() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.attribute_proto_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::AttributeProto>* +FunctionProto::_internal_mutable_attribute_proto() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.attribute_proto_; +} + +// repeated .onnx.NodeProto node = 7; +inline int FunctionProto::_internal_node_size() const { + return _internal_node().size(); +} +inline int FunctionProto::node_size() const { + return _internal_node_size(); +} +inline void FunctionProto::clear_node() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.node_.Clear(); +} +inline ::onnx::NodeProto* FunctionProto::mutable_node(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.node) + return _internal_mutable_node()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>* FunctionProto::mutable_node() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.FunctionProto.node) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_node(); +} +inline const ::onnx::NodeProto& FunctionProto::node(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.node) + return _internal_node().Get(index); +} +inline ::onnx::NodeProto* FunctionProto::add_node() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::NodeProto* _add = _internal_mutable_node()->Add(); + // @@protoc_insertion_point(field_add:onnx.FunctionProto.node) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>& FunctionProto::node() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.FunctionProto.node) + return _internal_node(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>& +FunctionProto::_internal_node() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.node_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::NodeProto>* +FunctionProto::_internal_mutable_node() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.node_; +} + +// optional string doc_string = 8; +inline bool FunctionProto::has_doc_string() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void FunctionProto::clear_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.doc_string_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& FunctionProto::doc_string() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.doc_string) + return _internal_doc_string(); +} +template +inline PROTOBUF_ALWAYS_INLINE void FunctionProto::set_doc_string(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.doc_string_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.FunctionProto.doc_string) +} +inline std::string* FunctionProto::mutable_doc_string() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_doc_string(); + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.doc_string) + return _s; +} +inline const std::string& FunctionProto::_internal_doc_string() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.doc_string_.Get(); +} +inline void FunctionProto::_internal_set_doc_string(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.doc_string_.Set(value, GetArena()); +} +inline std::string* FunctionProto::_internal_mutable_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.doc_string_.Mutable( GetArena()); +} +inline std::string* FunctionProto::release_doc_string() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.FunctionProto.doc_string) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.doc_string_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.doc_string_.Set("", GetArena()); + } + return released; +} +inline void FunctionProto::set_allocated_doc_string(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.doc_string_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.doc_string_.IsDefault()) { + _impl_.doc_string_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.FunctionProto.doc_string) +} + +// repeated .onnx.OperatorSetIdProto opset_import = 9; +inline int FunctionProto::_internal_opset_import_size() const { + return _internal_opset_import().size(); +} +inline int FunctionProto::opset_import_size() const { + return _internal_opset_import_size(); +} +inline void FunctionProto::clear_opset_import() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.opset_import_.Clear(); +} +inline ::onnx::OperatorSetIdProto* FunctionProto::mutable_opset_import(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.opset_import) + return _internal_mutable_opset_import()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>* FunctionProto::mutable_opset_import() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.FunctionProto.opset_import) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_opset_import(); +} +inline const ::onnx::OperatorSetIdProto& FunctionProto::opset_import(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.opset_import) + return _internal_opset_import().Get(index); +} +inline ::onnx::OperatorSetIdProto* FunctionProto::add_opset_import() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::OperatorSetIdProto* _add = _internal_mutable_opset_import()->Add(); + // @@protoc_insertion_point(field_add:onnx.FunctionProto.opset_import) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>& FunctionProto::opset_import() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.FunctionProto.opset_import) + return _internal_opset_import(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>& +FunctionProto::_internal_opset_import() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.opset_import_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::OperatorSetIdProto>* +FunctionProto::_internal_mutable_opset_import() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.opset_import_; +} + +// optional string domain = 10; +inline bool FunctionProto::has_domain() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline void FunctionProto::clear_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.domain_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const std::string& FunctionProto::domain() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.domain) + return _internal_domain(); +} +template +inline PROTOBUF_ALWAYS_INLINE void FunctionProto::set_domain(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.domain_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.FunctionProto.domain) +} +inline std::string* FunctionProto::mutable_domain() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_domain(); + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.domain) + return _s; +} +inline const std::string& FunctionProto::_internal_domain() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.domain_.Get(); +} +inline void FunctionProto::_internal_set_domain(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.domain_.Set(value, GetArena()); +} +inline std::string* FunctionProto::_internal_mutable_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + return _impl_.domain_.Mutable( GetArena()); +} +inline std::string* FunctionProto::release_domain() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.FunctionProto.domain) + if ((_impl_._has_bits_[0] & 0x00000004u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000004u; + auto* released = _impl_.domain_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.domain_.Set("", GetArena()); + } + return released; +} +inline void FunctionProto::set_allocated_domain(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.domain_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.domain_.IsDefault()) { + _impl_.domain_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.FunctionProto.domain) +} + +// optional string overload = 13; +inline bool FunctionProto::has_overload() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline void FunctionProto::clear_overload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.overload_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline const std::string& FunctionProto::overload() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.overload) + return _internal_overload(); +} +template +inline PROTOBUF_ALWAYS_INLINE void FunctionProto::set_overload(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.overload_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:onnx.FunctionProto.overload) +} +inline std::string* FunctionProto::mutable_overload() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_overload(); + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.overload) + return _s; +} +inline const std::string& FunctionProto::_internal_overload() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.overload_.Get(); +} +inline void FunctionProto::_internal_set_overload(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.overload_.Set(value, GetArena()); +} +inline std::string* FunctionProto::_internal_mutable_overload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000008u; + return _impl_.overload_.Mutable( GetArena()); +} +inline std::string* FunctionProto::release_overload() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:onnx.FunctionProto.overload) + if ((_impl_._has_bits_[0] & 0x00000008u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000008u; + auto* released = _impl_.overload_.Release(); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { + _impl_.overload_.Set("", GetArena()); + } + return released; +} +inline void FunctionProto::set_allocated_overload(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + _impl_.overload_.SetAllocated(value, GetArena()); + if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.overload_.IsDefault()) { + _impl_.overload_.Set("", GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:onnx.FunctionProto.overload) +} + +// repeated .onnx.ValueInfoProto value_info = 12; +inline int FunctionProto::_internal_value_info_size() const { + return _internal_value_info().size(); +} +inline int FunctionProto::value_info_size() const { + return _internal_value_info_size(); +} +inline void FunctionProto::clear_value_info() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.value_info_.Clear(); +} +inline ::onnx::ValueInfoProto* FunctionProto::mutable_value_info(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.value_info) + return _internal_mutable_value_info()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* FunctionProto::mutable_value_info() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.FunctionProto.value_info) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_value_info(); +} +inline const ::onnx::ValueInfoProto& FunctionProto::value_info(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.value_info) + return _internal_value_info().Get(index); +} +inline ::onnx::ValueInfoProto* FunctionProto::add_value_info() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::ValueInfoProto* _add = _internal_mutable_value_info()->Add(); + // @@protoc_insertion_point(field_add:onnx.FunctionProto.value_info) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& FunctionProto::value_info() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.FunctionProto.value_info) + return _internal_value_info(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>& +FunctionProto::_internal_value_info() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.value_info_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::ValueInfoProto>* +FunctionProto::_internal_mutable_value_info() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.value_info_; +} + +// repeated .onnx.StringStringEntryProto metadata_props = 14; +inline int FunctionProto::_internal_metadata_props_size() const { + return _internal_metadata_props().size(); +} +inline int FunctionProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void FunctionProto::clear_metadata_props() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.metadata_props_.Clear(); +} +inline ::onnx::StringStringEntryProto* FunctionProto::mutable_metadata_props(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:onnx.FunctionProto.metadata_props) + return _internal_mutable_metadata_props()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* FunctionProto::mutable_metadata_props() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:onnx.FunctionProto.metadata_props) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_metadata_props(); +} +inline const ::onnx::StringStringEntryProto& FunctionProto::metadata_props(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:onnx.FunctionProto.metadata_props) + return _internal_metadata_props().Get(index); +} +inline ::onnx::StringStringEntryProto* FunctionProto::add_metadata_props() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::onnx::StringStringEntryProto* _add = _internal_mutable_metadata_props()->Add(); + // @@protoc_insertion_point(field_add:onnx.FunctionProto.metadata_props) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& FunctionProto::metadata_props() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:onnx.FunctionProto.metadata_props) + return _internal_metadata_props(); +} +inline const ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>& +FunctionProto::_internal_metadata_props() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.metadata_props_; +} +inline ::google::protobuf::RepeatedPtrField<::onnx::StringStringEntryProto>* +FunctionProto::_internal_mutable_metadata_props() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.metadata_props_; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace onnx + + +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::onnx::AttributeProto_AttributeType> : std::true_type {}; +template <> +struct is_proto_enum<::onnx::TensorProto_DataType> : std::true_type {}; +template <> +struct is_proto_enum<::onnx::TensorProto_DataLocation> : std::true_type {}; +template <> +struct is_proto_enum<::onnx::Version> : std::true_type {}; +template <> +struct is_proto_enum<::onnx::OperatorStatus> : std::true_type {}; + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // onnx_2eproto_2epb_2eh diff --git a/include/tensor/tensor.h b/include/tensor/tensor.h new file mode 100644 index 0000000..398a0ce --- /dev/null +++ b/include/tensor/tensor.h @@ -0,0 +1,98 @@ +#ifndef TENSOR_H +#define TENSOR_H + +#include +#include +#include +#include +#include +#include + +struct Shape { + std::vector dimensions; + size_t total_elements; + + Shape(std::vector dims); + + size_t get_rank() const; +}; + +enum Layout : std::uint8_t { kNchw, kNhwc, kNd }; + +template +class Tensor { + public: + Shape shape; + Layout layout; + std::vector data; + + Tensor(const Shape &sh, Layout l = Layout::kNd); + Tensor(std::vector dims, Layout l = Layout::kNd); + + size_t get_linear_index(const std::vector &indices) const; + + T &at(const std::vector &indices); + const T &at(const std::vector &indices) const; +}; + +template +Tensor::Tensor(const Shape &sh, Layout l) + : shape(sh), layout(l), data(sh.total_elements) {} + +template +Tensor::Tensor(std::vector dims, Layout l) + : Tensor(Shape(std::move(dims)), l) {} + +template +size_t Tensor::get_linear_index(const std::vector &indices) const { + if (indices.size() != shape.get_rank()) { + throw std::runtime_error("Incorrect number of indices provided."); + } + for (size_t i = 0; i < indices.size(); ++i) { + if (indices[i] >= shape.dimensions[i]) { + throw std::out_of_range("Index out of range for dimension"); + } + } + + size_t linear_index = 0; + size_t stride = 1; + + if (shape.get_rank() == 4) { + if (layout == Layout::kNchw) { + linear_index = indices[0] * (shape.dimensions[1] * shape.dimensions[2] * + shape.dimensions[3]) + + indices[1] * (shape.dimensions[2] * shape.dimensions[3]) + + indices[2] * shape.dimensions[3] + indices[3]; + } else if (layout == Layout::kNhwc) { + linear_index = indices[0] * (shape.dimensions[1] * shape.dimensions[2] * + shape.dimensions[3]) + + indices[1] * (shape.dimensions[2] * shape.dimensions[3]) + + indices[2] * shape.dimensions[3] + indices[3]; + } else { + linear_index = indices[0] * (shape.dimensions[1] * shape.dimensions[2] * + shape.dimensions[3]) + + indices[1] * (shape.dimensions[2] * shape.dimensions[3]) + + indices[2] * shape.dimensions[3] + indices[3]; + } + } else { + std::vector reversed_dims = shape.dimensions; + std::reverse(reversed_dims.begin(), reversed_dims.end()); + for (int i = static_cast(reversed_dims.size()) - 1; i >= 0; --i) { + linear_index += indices[i] * stride; + stride *= reversed_dims[i]; + } + } + + return linear_index; +} + +template +T &Tensor::at(const std::vector &indices) { + return data[get_linear_index(indices)]; +} + +template +const T &Tensor::at(const std::vector &indices) const { + return data[get_linear_index(indices)]; +} +#endif \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e69de29..21918b5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -0,0 +1,9 @@ + +file(GLOB_RECURSE HEADER_FILES ${CMAKE_SOURCE_DIR}/include/*.h) +file(GLOB_RECURSE SOURCE_FILES ${CMAKE_SOURCE_DIR}/src/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cc) + +add_library(${CMAKE_PROJECT_NAME} STATIC ${SOURCE_FILES} ${HEADER_FILES}) +target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${HEADER_FILES}) + +target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/src) +target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/include) \ No newline at end of file diff --git a/src/graph/graph.cpp b/src/graph/graph.cpp new file mode 100644 index 0000000..1e8ed4d --- /dev/null +++ b/src/graph/graph.cpp @@ -0,0 +1,183 @@ + +#include "graph/graph.h" + +#include +#include +#include +#include +#include + +#include "layer/layer.h" +#include "tensor/tensor.h" + +Graph::Graph() : inputTensor_({}), outputTensor_(nullptr) {} + +void Graph::addLayer(std::shared_ptr lay) { + if (layers_.find(lay->getID()) == layers_.end()) { + layers_[lay->getID()] = lay; + } +} + +void Graph::addEdge(std::shared_ptr layPrev, + std::shared_ptr layNext) { + if (layPrev->getID() == layNext->getID()) { + throw std::invalid_argument("Cannot add edge from a layer to itself."); + } + if (layers_.find(layPrev->getID()) == layers_.end()) { + addLayer(layPrev); + } + if (layers_.find(layNext->getID()) == layers_.end()) { + addLayer(layNext); + } + layPrev->addNeighbor(layNext); +} + +void Graph::removeEdge(std::shared_ptr layPrev, + std::shared_ptr layNext) { + if (layers_.find(layPrev->getID()) != layers_.end()) { + layPrev->removeNeighbor(layNext); + } +} + +void Graph::removeLayer(std::shared_ptr lay) { + int layer_id = lay->getID(); + + if (layers_.find(layer_id) == layers_.end()) { + return; + } + + for (auto& pair : layers_) { + pair.second->removeNeighbor(lay); + } + + auto it = layers_.find(layer_id); + if (it != layers_.end()) { + layers_.erase(it); + } + + if (start_ == layer_id) { + start_ = -1; + } + if (end_ == layer_id) { + end_ = -1; + } +} + +int Graph::getLayers() const { return static_cast(layers_.size()); } + +int Graph::getEdges() const { + int count = 0; + for (const auto& layer : layers_) { + count += layer.second->neighbors_.size(); + } + return count; +} + +bool Graph::empty() const { return layers_.empty(); } + +bool Graph::bfs_helper(int start, int vert, bool flag, + std::vector* v_ord) const { + std::unordered_map visited; + std::queue queue; + + queue.push(start); + visited[start] = true; + + while (!queue.empty()) { + int current = queue.front(); + queue.pop(); + + if (flag && current == vert) { + return true; + } + + if (v_ord != nullptr) { + v_ord->push_back(current); + } + + if (layers_.count(current) > 0) { + std::shared_ptr current_layer = layers_.at(current); + + for (const std::shared_ptr& neighbor : current_layer->neighbors_) { + if (visited.find(neighbor->getID()) == visited.end()) { + visited[neighbor->getID()] = true; + queue.push(neighbor->getID()); + } + } + } + } + + return false; +} + +bool Graph::hasPath(std::shared_ptr layPrev, + std::shared_ptr layNext) const { + if (layers_.find(layPrev->getID()) == layers_.end() || + layers_.find(layNext->getID()) == layers_.end()) { + return false; + } + return bfs_helper(layPrev->getID(), layNext->getID(), true, nullptr); +} + +std::vector Graph::BFS(int start) { + std::vector v_ord; + bfs_helper(start, -1, false, &v_ord); + return v_ord; +} + +void Graph::setInput(std::shared_ptr lay, Tensor& vec) { + if (start_ != -1) { + throw std::runtime_error("Input layer already set."); + } + if (!layers_.empty()) { + addLayer(lay); + } + inputTensor_ = vec; + start_ = lay->getID(); +} + +void Graph::setOutput(std::shared_ptr lay, Tensor& vec) { + if (end_ != -1) { + throw std::runtime_error("Output layer already set."); + } + + if (layers_.find(lay->getID()) == layers_.end()) { + addLayer(lay); + } + + end_ = lay->getID(); + outputTensor_ = &vec; +} + +void Graph::inference() { + if (start_ == -1 || end_ == -1) { + throw std::runtime_error("Input or output layer not set."); + } + + std::vector traversal = BFS(start_); + + if (traversal.empty() || traversal.back() != end_) { + throw std::runtime_error("No path from start to end layer found."); + } + + Tensor current_tensor = inputTensor_; + + for (int layer_id : traversal) { + if (layers_.find(layer_id) == layers_.end()) { + throw std::runtime_error("layer_id out of range in traversal."); + } + std::shared_ptr current_layer = layers_[layer_id]; + Tensor temp_output_tensor(current_layer->get_output_shape()); + current_layer->run(current_tensor, temp_output_tensor); + current_tensor = temp_output_tensor; + + if (layer_id == end_) { + if (outputTensor_ == nullptr) { + throw std::runtime_error("Output tensor pointer is not set."); + } + *outputTensor_ = current_tensor; + } + } +} + +Graph::~Graph() = default; \ No newline at end of file diff --git a/src/layer/layer.cpp b/src/layer/layer.cpp new file mode 100644 index 0000000..47bf6b0 --- /dev/null +++ b/src/layer/layer.cpp @@ -0,0 +1,16 @@ + +#include "layer/layer.h" + +Layer::Layer(const std::string& _name) : name(_name) {} + +Layer::Layer(std::string&& _name) : name(_name) {} + +void Layer::addNeighbor(std::shared_ptr neighbor) { + if (neighbor != nullptr) { + neighbors_.push_back(neighbor); + } +} + +void Layer::removeNeighbor(std::shared_ptr neighbor) { + neighbors_.remove(neighbor); +} \ No newline at end of file diff --git a/src/model_parser/model_parser.cpp b/src/model_parser/model_parser.cpp new file mode 100644 index 0000000..6ad356b --- /dev/null +++ b/src/model_parser/model_parser.cpp @@ -0,0 +1,4 @@ + +#include "model_parser/model_parser.h" + +AnyLayer::AnyLayer(const std::string& name) : Name(name) {} \ No newline at end of file diff --git a/src/model_parser/onnx_model_parser.cpp b/src/model_parser/onnx_model_parser.cpp new file mode 100644 index 0000000..d38bc0d --- /dev/null +++ b/src/model_parser/onnx_model_parser.cpp @@ -0,0 +1,161 @@ + +#include "model_parser/onnx_model_parser.h" + +#include + +#include + +#include "layer/layer.h" + +ONNX_ModelParser::ONNX_ModelParser(const std::string& filename) { + m_filename = filename; +} + +Graph ONNX_ModelParser::Parse() { + Graph result_graph; + + if (!LoadModel(m_filename)) { + std::cerr << "Failed to open a model file" << std::endl; + return result_graph; + } + + const auto& graph = m_model.graph(); + + for (const auto& tensor : graph.initializer()) { + m_weights[tensor.name()] = &tensor; + } + + // image: node name -> layer + std::unordered_map> node_to_layer; + + // create layers for every node + for (const auto& node : graph.node()) { + std::string layer_name = node.name(); + auto any_layer = std::make_shared(layer_name); + + // parse weights and bias + ParseWeightsAndBias(node, any_layer); + + // parse attributes + ParseAttributes(node, any_layer->Attributes); + + auto layer = std::dynamic_pointer_cast(any_layer); + result_graph.addLayer(layer); + node_to_layer[layer_name] = layer; + } + + // bypass nodes and create edges + for (const auto& node : graph.node()) { + std::string layer_name = node.name(); + auto current_layer = node_to_layer[layer_name]; + + for (const auto& input_name : node.input()) { + auto it = node_to_layer.find(input_name); + if (it != node_to_layer.end()) { + result_graph.addEdge(it->second, current_layer); + } + } + } + + return result_graph; +} + +bool ONNX_ModelParser::LoadModel(const std::string& filename) { + // open a model file + std::ifstream model_file(filename, std::ios::binary); + if (!model_file.is_open()) { + return false; + } + + // parse the file to the onnx model + if (!m_model.ParseFromIstream(&model_file)) { + return false; + } + + model_file.close(); + + return true; +} + +bool ONNX_ModelParser::ParseAttributes( + const onnx::NodeProto& node, + std::unordered_map& attributes) { + for (int i = 0; i < node.attribute_size(); ++i) { + const auto& attrib = node.attribute(i); + + std::string attrib_name = attrib.name(); + std::string attrib_data; + + switch (attrib.type()) { + case onnx::AttributeProto_AttributeType_STRING: + attrib_data = attrib.s(); + break; + + case onnx::AttributeProto_AttributeType_FLOAT: + attrib_data = std::to_string(attrib.f()); + break; + + case onnx::AttributeProto_AttributeType_INT: + attrib_data = std::to_string(attrib.i()); + break; + + case onnx::AttributeProto_AttributeType_STRINGS: + attrib_data += '['; + + int si; + for (si = 0; si < attrib.floats_size() - 1; ++si) { + attrib_data += attrib.strings(si) + ", "; + } + + attrib_data += attrib.strings(si) + ']'; + break; + + case onnx::AttributeProto_AttributeType_FLOATS: + attrib_data += '['; + + int fi; + for (fi = 0; fi < attrib.floats_size() - 1; ++fi) { + attrib_data += std::to_string(attrib.floats(fi)) + ", "; + } + + attrib_data += std::to_string(attrib.floats(fi)) + ']'; + break; + + case onnx::AttributeProto_AttributeType_INTS: + attrib_data += '['; + + int ii; + for (ii = 0; ii < attrib.ints_size() - 1; ++ii) { + attrib_data += std::to_string(attrib.ints(ii)) + ", "; + } + + attrib_data += std::to_string(attrib.ints(ii)) + ']'; + break; + } + + attributes.insert({attrib_name, attrib_data}); + } + + return true; +} + +bool ONNX_ModelParser::ParseWeightsAndBias( + const onnx::NodeProto& node, const std::shared_ptr& any_layer) { + for (const auto& input_name : node.input()) { + auto weight_it = m_weights.find(input_name); + if (weight_it != m_weights.end()) { + const auto* tensor_ptr = weight_it->second; + + const char* raw_data = tensor_ptr->raw_data().data(); + size_t data_size = tensor_ptr->raw_data().size() / sizeof(float); + + if (input_name.find("weight")) { + any_layer->Weights = std::vector(raw_data, raw_data + data_size); + } else if (input_name.find("bias")) { + any_layer->Bias = std::vector(raw_data, raw_data + data_size); + } + } + } + + return true; +} diff --git a/src/onnx.pb.cc b/src/onnx.pb.cc new file mode 100644 index 0000000..0652695 --- /dev/null +++ b/src/onnx.pb.cc @@ -0,0 +1,9493 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: onnx.proto +// Protobuf C++ Version: 5.29.3 + +#include "onnx.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/io/zero_copy_stream_impl_lite.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace onnx { + +inline constexpr TensorShapeProto_Dimension::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + denotation_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_{}, + _oneof_case_{} {} + +template +PROTOBUF_CONSTEXPR TensorShapeProto_Dimension::TensorShapeProto_Dimension(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TensorShapeProto_DimensionDefaultTypeInternal { + PROTOBUF_CONSTEXPR TensorShapeProto_DimensionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TensorShapeProto_DimensionDefaultTypeInternal() {} + union { + TensorShapeProto_Dimension _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorShapeProto_DimensionDefaultTypeInternal _TensorShapeProto_Dimension_default_instance_; + +inline constexpr TensorProto_Segment::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + begin_{::int64_t{0}}, + end_{::int64_t{0}} {} + +template +PROTOBUF_CONSTEXPR TensorProto_Segment::TensorProto_Segment(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TensorProto_SegmentDefaultTypeInternal { + PROTOBUF_CONSTEXPR TensorProto_SegmentDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TensorProto_SegmentDefaultTypeInternal() {} + union { + TensorProto_Segment _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorProto_SegmentDefaultTypeInternal _TensorProto_Segment_default_instance_; + +inline constexpr StringStringEntryProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + key_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR StringStringEntryProto::StringStringEntryProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct StringStringEntryProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR StringStringEntryProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~StringStringEntryProtoDefaultTypeInternal() {} + union { + StringStringEntryProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StringStringEntryProtoDefaultTypeInternal _StringStringEntryProto_default_instance_; + +inline constexpr OperatorSetIdProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + domain_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + version_{::int64_t{0}} {} + +template +PROTOBUF_CONSTEXPR OperatorSetIdProto::OperatorSetIdProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct OperatorSetIdProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR OperatorSetIdProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~OperatorSetIdProtoDefaultTypeInternal() {} + union { + OperatorSetIdProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OperatorSetIdProtoDefaultTypeInternal _OperatorSetIdProto_default_instance_; + +inline constexpr TensorShapeProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : dim_{}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR TensorShapeProto::TensorShapeProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TensorShapeProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR TensorShapeProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TensorShapeProtoDefaultTypeInternal() {} + union { + TensorShapeProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_; + +inline constexpr TensorProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + dims_{}, + float_data_{}, + int32_data_{}, + _int32_data_cached_byte_size_{0}, + string_data_{}, + int64_data_{}, + _int64_data_cached_byte_size_{0}, + double_data_{}, + uint64_data_{}, + _uint64_data_cached_byte_size_{0}, + external_data_{}, + metadata_props_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + raw_data_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + doc_string_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + segment_{nullptr}, + data_type_{0}, + data_location_{static_cast< ::onnx::TensorProto_DataLocation >(0)} {} + +template +PROTOBUF_CONSTEXPR TensorProto::TensorProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TensorProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR TensorProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TensorProtoDefaultTypeInternal() {} + union { + TensorProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorProtoDefaultTypeInternal _TensorProto_default_instance_; + +inline constexpr TensorAnnotation::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + quant_parameter_tensor_names_{}, + tensor_name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR TensorAnnotation::TensorAnnotation(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TensorAnnotationDefaultTypeInternal { + PROTOBUF_CONSTEXPR TensorAnnotationDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TensorAnnotationDefaultTypeInternal() {} + union { + TensorAnnotation _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TensorAnnotationDefaultTypeInternal _TensorAnnotation_default_instance_; + +inline constexpr TypeProto_Tensor::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + shape_{nullptr}, + elem_type_{0} {} + +template +PROTOBUF_CONSTEXPR TypeProto_Tensor::TypeProto_Tensor(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TypeProto_TensorDefaultTypeInternal { + PROTOBUF_CONSTEXPR TypeProto_TensorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TypeProto_TensorDefaultTypeInternal() {} + union { + TypeProto_Tensor _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeProto_TensorDefaultTypeInternal _TypeProto_Tensor_default_instance_; + +inline constexpr TypeProto_SparseTensor::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + shape_{nullptr}, + elem_type_{0} {} + +template +PROTOBUF_CONSTEXPR TypeProto_SparseTensor::TypeProto_SparseTensor(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TypeProto_SparseTensorDefaultTypeInternal { + PROTOBUF_CONSTEXPR TypeProto_SparseTensorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TypeProto_SparseTensorDefaultTypeInternal() {} + union { + TypeProto_SparseTensor _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeProto_SparseTensorDefaultTypeInternal _TypeProto_SparseTensor_default_instance_; + +inline constexpr SparseTensorProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + dims_{}, + values_{nullptr}, + indices_{nullptr} {} + +template +PROTOBUF_CONSTEXPR SparseTensorProto::SparseTensorProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct SparseTensorProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR SparseTensorProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SparseTensorProtoDefaultTypeInternal() {} + union { + SparseTensorProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SparseTensorProtoDefaultTypeInternal _SparseTensorProto_default_instance_; + +inline constexpr TypeProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + denotation_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + value_{}, + _oneof_case_{} {} + +template +PROTOBUF_CONSTEXPR TypeProto::TypeProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TypeProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR TypeProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TypeProtoDefaultTypeInternal() {} + union { + TypeProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeProtoDefaultTypeInternal _TypeProto_default_instance_; + +inline constexpr TypeProto_Map::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + value_type_{nullptr}, + key_type_{0} {} + +template +PROTOBUF_CONSTEXPR TypeProto_Map::TypeProto_Map(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TypeProto_MapDefaultTypeInternal { + PROTOBUF_CONSTEXPR TypeProto_MapDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TypeProto_MapDefaultTypeInternal() {} + union { + TypeProto_Map _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeProto_MapDefaultTypeInternal _TypeProto_Map_default_instance_; + +inline constexpr TypeProto_Optional::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + elem_type_{nullptr} {} + +template +PROTOBUF_CONSTEXPR TypeProto_Optional::TypeProto_Optional(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TypeProto_OptionalDefaultTypeInternal { + PROTOBUF_CONSTEXPR TypeProto_OptionalDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TypeProto_OptionalDefaultTypeInternal() {} + union { + TypeProto_Optional _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeProto_OptionalDefaultTypeInternal _TypeProto_Optional_default_instance_; + +inline constexpr TypeProto_Sequence::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + elem_type_{nullptr} {} + +template +PROTOBUF_CONSTEXPR TypeProto_Sequence::TypeProto_Sequence(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TypeProto_SequenceDefaultTypeInternal { + PROTOBUF_CONSTEXPR TypeProto_SequenceDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TypeProto_SequenceDefaultTypeInternal() {} + union { + TypeProto_Sequence _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypeProto_SequenceDefaultTypeInternal _TypeProto_Sequence_default_instance_; + +inline constexpr ValueInfoProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + metadata_props_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + doc_string_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + type_{nullptr} {} + +template +PROTOBUF_CONSTEXPR ValueInfoProto::ValueInfoProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ValueInfoProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR ValueInfoProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ValueInfoProtoDefaultTypeInternal() {} + union { + ValueInfoProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueInfoProtoDefaultTypeInternal _ValueInfoProto_default_instance_; + +inline constexpr AttributeProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + floats_{}, + ints_{}, + strings_{}, + tensors_{}, + graphs_{}, + type_protos_{}, + sparse_tensors_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + s_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + doc_string_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + ref_attr_name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + t_{nullptr}, + g_{nullptr}, + tp_{nullptr}, + sparse_tensor_{nullptr}, + i_{::int64_t{0}}, + f_{0}, + type_{static_cast< ::onnx::AttributeProto_AttributeType >(0)} {} + +template +PROTOBUF_CONSTEXPR AttributeProto::AttributeProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct AttributeProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR AttributeProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~AttributeProtoDefaultTypeInternal() {} + union { + AttributeProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AttributeProtoDefaultTypeInternal _AttributeProto_default_instance_; + +inline constexpr GraphProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + node_{}, + initializer_{}, + input_{}, + output_{}, + value_info_{}, + quantization_annotation_{}, + sparse_initializer_{}, + metadata_props_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + doc_string_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR GraphProto::GraphProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct GraphProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR GraphProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GraphProtoDefaultTypeInternal() {} + union { + GraphProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GraphProtoDefaultTypeInternal _GraphProto_default_instance_; + +inline constexpr NodeProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + input_{}, + output_{}, + attribute_{}, + metadata_props_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + op_type_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + doc_string_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + domain_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + overload_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR NodeProto::NodeProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct NodeProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR NodeProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~NodeProtoDefaultTypeInternal() {} + union { + NodeProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NodeProtoDefaultTypeInternal _NodeProto_default_instance_; + +inline constexpr TrainingInfoProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + initialization_binding_{}, + update_binding_{}, + initialization_{nullptr}, + algorithm_{nullptr} {} + +template +PROTOBUF_CONSTEXPR TrainingInfoProto::TrainingInfoProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct TrainingInfoProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR TrainingInfoProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~TrainingInfoProtoDefaultTypeInternal() {} + union { + TrainingInfoProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TrainingInfoProtoDefaultTypeInternal _TrainingInfoProto_default_instance_; + +inline constexpr FunctionProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + input_{}, + output_{}, + attribute_{}, + node_{}, + opset_import_{}, + attribute_proto_{}, + value_info_{}, + metadata_props_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + doc_string_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + domain_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + overload_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR FunctionProto::FunctionProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct FunctionProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR FunctionProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~FunctionProtoDefaultTypeInternal() {} + union { + FunctionProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FunctionProtoDefaultTypeInternal _FunctionProto_default_instance_; + +inline constexpr ModelProto::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + opset_import_{}, + metadata_props_{}, + training_info_{}, + functions_{}, + producer_name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + producer_version_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + domain_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + doc_string_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + graph_{nullptr}, + ir_version_{::int64_t{0}}, + model_version_{::int64_t{0}} {} + +template +PROTOBUF_CONSTEXPR ModelProto::ModelProto(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct ModelProtoDefaultTypeInternal { + PROTOBUF_CONSTEXPR ModelProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ModelProtoDefaultTypeInternal() {} + union { + ModelProto _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ModelProtoDefaultTypeInternal _ModelProto_default_instance_; +} // namespace onnx +namespace onnx { +PROTOBUF_CONSTINIT const uint32_t AttributeProto_AttributeType_internal_data_[] = { + 983040u, 0u, }; +bool AttributeProto_AttributeType_IsValid(int value) { + return 0 <= value && value <= 14; +} +static ::google::protobuf::internal::ExplicitlyConstructed + AttributeProto_AttributeType_strings[15] = {}; + +static const char AttributeProto_AttributeType_names[] = { + "FLOAT" + "FLOATS" + "GRAPH" + "GRAPHS" + "INT" + "INTS" + "SPARSE_TENSOR" + "SPARSE_TENSORS" + "STRING" + "STRINGS" + "TENSOR" + "TENSORS" + "TYPE_PROTO" + "TYPE_PROTOS" + "UNDEFINED" +}; + +static const ::google::protobuf::internal::EnumEntry AttributeProto_AttributeType_entries[] = + { + {{&AttributeProto_AttributeType_names[0], 5}, 1}, + {{&AttributeProto_AttributeType_names[5], 6}, 6}, + {{&AttributeProto_AttributeType_names[11], 5}, 5}, + {{&AttributeProto_AttributeType_names[16], 6}, 10}, + {{&AttributeProto_AttributeType_names[22], 3}, 2}, + {{&AttributeProto_AttributeType_names[25], 4}, 7}, + {{&AttributeProto_AttributeType_names[29], 13}, 11}, + {{&AttributeProto_AttributeType_names[42], 14}, 12}, + {{&AttributeProto_AttributeType_names[56], 6}, 3}, + {{&AttributeProto_AttributeType_names[62], 7}, 8}, + {{&AttributeProto_AttributeType_names[69], 6}, 4}, + {{&AttributeProto_AttributeType_names[75], 7}, 9}, + {{&AttributeProto_AttributeType_names[82], 10}, 13}, + {{&AttributeProto_AttributeType_names[92], 11}, 14}, + {{&AttributeProto_AttributeType_names[103], 9}, 0}, +}; + +static const int AttributeProto_AttributeType_entries_by_number[] = { + 14, // 0 -> UNDEFINED + 0, // 1 -> FLOAT + 4, // 2 -> INT + 8, // 3 -> STRING + 10, // 4 -> TENSOR + 2, // 5 -> GRAPH + 1, // 6 -> FLOATS + 5, // 7 -> INTS + 9, // 8 -> STRINGS + 11, // 9 -> TENSORS + 3, // 10 -> GRAPHS + 6, // 11 -> SPARSE_TENSOR + 7, // 12 -> SPARSE_TENSORS + 12, // 13 -> TYPE_PROTO + 13, // 14 -> TYPE_PROTOS +}; + +const std::string& AttributeProto_AttributeType_Name(AttributeProto_AttributeType value) { + static const bool kDummy = + ::google::protobuf::internal::InitializeEnumStrings( + AttributeProto_AttributeType_entries, AttributeProto_AttributeType_entries_by_number, + 15, AttributeProto_AttributeType_strings); + (void)kDummy; + + int idx = ::google::protobuf::internal::LookUpEnumName( + AttributeProto_AttributeType_entries, AttributeProto_AttributeType_entries_by_number, 15, + value); + return idx == -1 ? ::google::protobuf::internal::GetEmptyString() + : AttributeProto_AttributeType_strings[idx].get(); +} + +bool AttributeProto_AttributeType_Parse(absl::string_view name, AttributeProto_AttributeType* value) { + int int_value; + bool success = ::google::protobuf::internal::LookUpEnumValue( + AttributeProto_AttributeType_entries, 15, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && \ + (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +constexpr AttributeProto_AttributeType AttributeProto::UNDEFINED; +constexpr AttributeProto_AttributeType AttributeProto::FLOAT; +constexpr AttributeProto_AttributeType AttributeProto::INT; +constexpr AttributeProto_AttributeType AttributeProto::STRING; +constexpr AttributeProto_AttributeType AttributeProto::TENSOR; +constexpr AttributeProto_AttributeType AttributeProto::GRAPH; +constexpr AttributeProto_AttributeType AttributeProto::SPARSE_TENSOR; +constexpr AttributeProto_AttributeType AttributeProto::TYPE_PROTO; +constexpr AttributeProto_AttributeType AttributeProto::FLOATS; +constexpr AttributeProto_AttributeType AttributeProto::INTS; +constexpr AttributeProto_AttributeType AttributeProto::STRINGS; +constexpr AttributeProto_AttributeType AttributeProto::TENSORS; +constexpr AttributeProto_AttributeType AttributeProto::GRAPHS; +constexpr AttributeProto_AttributeType AttributeProto::SPARSE_TENSORS; +constexpr AttributeProto_AttributeType AttributeProto::TYPE_PROTOS; +constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MIN; +constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MAX; +constexpr int AttributeProto::AttributeType_ARRAYSIZE; + +#endif // (__cplusplus < 201703) && + // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +PROTOBUF_CONSTINIT const uint32_t TensorProto_DataType_internal_data_[] = { + 1572864u, 0u, }; +bool TensorProto_DataType_IsValid(int value) { + return 0 <= value && value <= 23; +} +static ::google::protobuf::internal::ExplicitlyConstructed + TensorProto_DataType_strings[24] = {}; + +static const char TensorProto_DataType_names[] = { + "BFLOAT16" + "BOOL" + "COMPLEX128" + "COMPLEX64" + "DOUBLE" + "FLOAT" + "FLOAT16" + "FLOAT4E2M1" + "FLOAT8E4M3FN" + "FLOAT8E4M3FNUZ" + "FLOAT8E5M2" + "FLOAT8E5M2FNUZ" + "INT16" + "INT32" + "INT4" + "INT64" + "INT8" + "STRING" + "UINT16" + "UINT32" + "UINT4" + "UINT64" + "UINT8" + "UNDEFINED" +}; + +static const ::google::protobuf::internal::EnumEntry TensorProto_DataType_entries[] = + { + {{&TensorProto_DataType_names[0], 8}, 16}, + {{&TensorProto_DataType_names[8], 4}, 9}, + {{&TensorProto_DataType_names[12], 10}, 15}, + {{&TensorProto_DataType_names[22], 9}, 14}, + {{&TensorProto_DataType_names[31], 6}, 11}, + {{&TensorProto_DataType_names[37], 5}, 1}, + {{&TensorProto_DataType_names[42], 7}, 10}, + {{&TensorProto_DataType_names[49], 10}, 23}, + {{&TensorProto_DataType_names[59], 12}, 17}, + {{&TensorProto_DataType_names[71], 14}, 18}, + {{&TensorProto_DataType_names[85], 10}, 19}, + {{&TensorProto_DataType_names[95], 14}, 20}, + {{&TensorProto_DataType_names[109], 5}, 5}, + {{&TensorProto_DataType_names[114], 5}, 6}, + {{&TensorProto_DataType_names[119], 4}, 22}, + {{&TensorProto_DataType_names[123], 5}, 7}, + {{&TensorProto_DataType_names[128], 4}, 3}, + {{&TensorProto_DataType_names[132], 6}, 8}, + {{&TensorProto_DataType_names[138], 6}, 4}, + {{&TensorProto_DataType_names[144], 6}, 12}, + {{&TensorProto_DataType_names[150], 5}, 21}, + {{&TensorProto_DataType_names[155], 6}, 13}, + {{&TensorProto_DataType_names[161], 5}, 2}, + {{&TensorProto_DataType_names[166], 9}, 0}, +}; + +static const int TensorProto_DataType_entries_by_number[] = { + 23, // 0 -> UNDEFINED + 5, // 1 -> FLOAT + 22, // 2 -> UINT8 + 16, // 3 -> INT8 + 18, // 4 -> UINT16 + 12, // 5 -> INT16 + 13, // 6 -> INT32 + 15, // 7 -> INT64 + 17, // 8 -> STRING + 1, // 9 -> BOOL + 6, // 10 -> FLOAT16 + 4, // 11 -> DOUBLE + 19, // 12 -> UINT32 + 21, // 13 -> UINT64 + 3, // 14 -> COMPLEX64 + 2, // 15 -> COMPLEX128 + 0, // 16 -> BFLOAT16 + 8, // 17 -> FLOAT8E4M3FN + 9, // 18 -> FLOAT8E4M3FNUZ + 10, // 19 -> FLOAT8E5M2 + 11, // 20 -> FLOAT8E5M2FNUZ + 20, // 21 -> UINT4 + 14, // 22 -> INT4 + 7, // 23 -> FLOAT4E2M1 +}; + +const std::string& TensorProto_DataType_Name(TensorProto_DataType value) { + static const bool kDummy = + ::google::protobuf::internal::InitializeEnumStrings( + TensorProto_DataType_entries, TensorProto_DataType_entries_by_number, + 24, TensorProto_DataType_strings); + (void)kDummy; + + int idx = ::google::protobuf::internal::LookUpEnumName( + TensorProto_DataType_entries, TensorProto_DataType_entries_by_number, 24, + value); + return idx == -1 ? ::google::protobuf::internal::GetEmptyString() + : TensorProto_DataType_strings[idx].get(); +} + +bool TensorProto_DataType_Parse(absl::string_view name, TensorProto_DataType* value) { + int int_value; + bool success = ::google::protobuf::internal::LookUpEnumValue( + TensorProto_DataType_entries, 24, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && \ + (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +constexpr TensorProto_DataType TensorProto::UNDEFINED; +constexpr TensorProto_DataType TensorProto::FLOAT; +constexpr TensorProto_DataType TensorProto::UINT8; +constexpr TensorProto_DataType TensorProto::INT8; +constexpr TensorProto_DataType TensorProto::UINT16; +constexpr TensorProto_DataType TensorProto::INT16; +constexpr TensorProto_DataType TensorProto::INT32; +constexpr TensorProto_DataType TensorProto::INT64; +constexpr TensorProto_DataType TensorProto::STRING; +constexpr TensorProto_DataType TensorProto::BOOL; +constexpr TensorProto_DataType TensorProto::FLOAT16; +constexpr TensorProto_DataType TensorProto::DOUBLE; +constexpr TensorProto_DataType TensorProto::UINT32; +constexpr TensorProto_DataType TensorProto::UINT64; +constexpr TensorProto_DataType TensorProto::COMPLEX64; +constexpr TensorProto_DataType TensorProto::COMPLEX128; +constexpr TensorProto_DataType TensorProto::BFLOAT16; +constexpr TensorProto_DataType TensorProto::FLOAT8E4M3FN; +constexpr TensorProto_DataType TensorProto::FLOAT8E4M3FNUZ; +constexpr TensorProto_DataType TensorProto::FLOAT8E5M2; +constexpr TensorProto_DataType TensorProto::FLOAT8E5M2FNUZ; +constexpr TensorProto_DataType TensorProto::UINT4; +constexpr TensorProto_DataType TensorProto::INT4; +constexpr TensorProto_DataType TensorProto::FLOAT4E2M1; +constexpr TensorProto_DataType TensorProto::DataType_MIN; +constexpr TensorProto_DataType TensorProto::DataType_MAX; +constexpr int TensorProto::DataType_ARRAYSIZE; + +#endif // (__cplusplus < 201703) && + // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +PROTOBUF_CONSTINIT const uint32_t TensorProto_DataLocation_internal_data_[] = { + 131072u, 0u, }; +bool TensorProto_DataLocation_IsValid(int value) { + return 0 <= value && value <= 1; +} +static ::google::protobuf::internal::ExplicitlyConstructed + TensorProto_DataLocation_strings[2] = {}; + +static const char TensorProto_DataLocation_names[] = { + "DEFAULT" + "EXTERNAL" +}; + +static const ::google::protobuf::internal::EnumEntry TensorProto_DataLocation_entries[] = + { + {{&TensorProto_DataLocation_names[0], 7}, 0}, + {{&TensorProto_DataLocation_names[7], 8}, 1}, +}; + +static const int TensorProto_DataLocation_entries_by_number[] = { + 0, // 0 -> DEFAULT + 1, // 1 -> EXTERNAL +}; + +const std::string& TensorProto_DataLocation_Name(TensorProto_DataLocation value) { + static const bool kDummy = + ::google::protobuf::internal::InitializeEnumStrings( + TensorProto_DataLocation_entries, TensorProto_DataLocation_entries_by_number, + 2, TensorProto_DataLocation_strings); + (void)kDummy; + + int idx = ::google::protobuf::internal::LookUpEnumName( + TensorProto_DataLocation_entries, TensorProto_DataLocation_entries_by_number, 2, + value); + return idx == -1 ? ::google::protobuf::internal::GetEmptyString() + : TensorProto_DataLocation_strings[idx].get(); +} + +bool TensorProto_DataLocation_Parse(absl::string_view name, TensorProto_DataLocation* value) { + int int_value; + bool success = ::google::protobuf::internal::LookUpEnumValue( + TensorProto_DataLocation_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && \ + (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +constexpr TensorProto_DataLocation TensorProto::DEFAULT; +constexpr TensorProto_DataLocation TensorProto::EXTERNAL; +constexpr TensorProto_DataLocation TensorProto::DataLocation_MIN; +constexpr TensorProto_DataLocation TensorProto::DataLocation_MAX; +constexpr int TensorProto::DataLocation_ARRAYSIZE; + +#endif // (__cplusplus < 201703) && + // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +PROTOBUF_CONSTINIT const uint32_t Version_internal_data_[] = { + 786432u, 0u, }; +bool Version_IsValid(int value) { + return 0 <= value && value <= 11; +} +static ::google::protobuf::internal::ExplicitlyConstructed + Version_strings[12] = {}; + +static const char Version_names[] = { + "IR_VERSION" + "IR_VERSION_2017_10_10" + "IR_VERSION_2017_10_30" + "IR_VERSION_2017_11_3" + "IR_VERSION_2019_1_22" + "IR_VERSION_2019_3_18" + "IR_VERSION_2019_9_19" + "IR_VERSION_2020_5_8" + "IR_VERSION_2021_7_30" + "IR_VERSION_2023_5_5" + "IR_VERSION_2024_3_25" + "_START_VERSION" +}; + +static const ::google::protobuf::internal::EnumEntry Version_entries[] = + { + {{&Version_names[0], 10}, 11}, + {{&Version_names[10], 21}, 1}, + {{&Version_names[31], 21}, 2}, + {{&Version_names[52], 20}, 3}, + {{&Version_names[72], 20}, 4}, + {{&Version_names[92], 20}, 5}, + {{&Version_names[112], 20}, 6}, + {{&Version_names[132], 19}, 7}, + {{&Version_names[151], 20}, 8}, + {{&Version_names[171], 19}, 9}, + {{&Version_names[190], 20}, 10}, + {{&Version_names[210], 14}, 0}, +}; + +static const int Version_entries_by_number[] = { + 11, // 0 -> _START_VERSION + 1, // 1 -> IR_VERSION_2017_10_10 + 2, // 2 -> IR_VERSION_2017_10_30 + 3, // 3 -> IR_VERSION_2017_11_3 + 4, // 4 -> IR_VERSION_2019_1_22 + 5, // 5 -> IR_VERSION_2019_3_18 + 6, // 6 -> IR_VERSION_2019_9_19 + 7, // 7 -> IR_VERSION_2020_5_8 + 8, // 8 -> IR_VERSION_2021_7_30 + 9, // 9 -> IR_VERSION_2023_5_5 + 10, // 10 -> IR_VERSION_2024_3_25 + 0, // 11 -> IR_VERSION +}; + +const std::string& Version_Name(Version value) { + static const bool kDummy = + ::google::protobuf::internal::InitializeEnumStrings( + Version_entries, Version_entries_by_number, + 12, Version_strings); + (void)kDummy; + + int idx = ::google::protobuf::internal::LookUpEnumName( + Version_entries, Version_entries_by_number, 12, + value); + return idx == -1 ? ::google::protobuf::internal::GetEmptyString() + : Version_strings[idx].get(); +} + +bool Version_Parse(absl::string_view name, Version* value) { + int int_value; + bool success = ::google::protobuf::internal::LookUpEnumValue( + Version_entries, 12, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +PROTOBUF_CONSTINIT const uint32_t OperatorStatus_internal_data_[] = { + 131072u, 0u, }; +bool OperatorStatus_IsValid(int value) { + return 0 <= value && value <= 1; +} +static ::google::protobuf::internal::ExplicitlyConstructed + OperatorStatus_strings[2] = {}; + +static const char OperatorStatus_names[] = { + "EXPERIMENTAL" + "STABLE" +}; + +static const ::google::protobuf::internal::EnumEntry OperatorStatus_entries[] = + { + {{&OperatorStatus_names[0], 12}, 0}, + {{&OperatorStatus_names[12], 6}, 1}, +}; + +static const int OperatorStatus_entries_by_number[] = { + 0, // 0 -> EXPERIMENTAL + 1, // 1 -> STABLE +}; + +const std::string& OperatorStatus_Name(OperatorStatus value) { + static const bool kDummy = + ::google::protobuf::internal::InitializeEnumStrings( + OperatorStatus_entries, OperatorStatus_entries_by_number, + 2, OperatorStatus_strings); + (void)kDummy; + + int idx = ::google::protobuf::internal::LookUpEnumName( + OperatorStatus_entries, OperatorStatus_entries_by_number, 2, + value); + return idx == -1 ? ::google::protobuf::internal::GetEmptyString() + : OperatorStatus_strings[idx].get(); +} + +bool OperatorStatus_Parse(absl::string_view name, OperatorStatus* value) { + int int_value; + bool success = ::google::protobuf::internal::LookUpEnumValue( + OperatorStatus_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +// =================================================================== + +class AttributeProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_._has_bits_); +}; + +AttributeProto::AttributeProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.AttributeProto) +} +inline PROTOBUF_NDEBUG_INLINE AttributeProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::AttributeProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + floats_{visibility, arena, from.floats_}, + ints_{visibility, arena, from.ints_}, + strings_{visibility, arena, from.strings_}, + tensors_{visibility, arena, from.tensors_}, + graphs_{visibility, arena, from.graphs_}, + type_protos_{visibility, arena, from.type_protos_}, + sparse_tensors_{visibility, arena, from.sparse_tensors_}, + name_(arena, from.name_), + s_(arena, from.s_), + doc_string_(arena, from.doc_string_), + ref_attr_name_(arena, from.ref_attr_name_) {} + +AttributeProto::AttributeProto( + ::google::protobuf::Arena* arena, + const AttributeProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + AttributeProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.t_ = (cached_has_bits & 0x00000010u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorProto>( + arena, *from._impl_.t_) + : nullptr; + _impl_.g_ = (cached_has_bits & 0x00000020u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::GraphProto>( + arena, *from._impl_.g_) + : nullptr; + _impl_.tp_ = (cached_has_bits & 0x00000040u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>( + arena, *from._impl_.tp_) + : nullptr; + _impl_.sparse_tensor_ = (cached_has_bits & 0x00000080u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::SparseTensorProto>( + arena, *from._impl_.sparse_tensor_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, i_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, i_), + offsetof(Impl_, type_) - + offsetof(Impl_, i_) + + sizeof(Impl_::type_)); + + // @@protoc_insertion_point(copy_constructor:onnx.AttributeProto) +} +inline PROTOBUF_NDEBUG_INLINE AttributeProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + floats_{visibility, arena}, + ints_{visibility, arena}, + strings_{visibility, arena}, + tensors_{visibility, arena}, + graphs_{visibility, arena}, + type_protos_{visibility, arena}, + sparse_tensors_{visibility, arena}, + name_(arena), + s_(arena), + doc_string_(arena), + ref_attr_name_(arena) {} + +inline void AttributeProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, t_), + 0, + offsetof(Impl_, type_) - + offsetof(Impl_, t_) + + sizeof(Impl_::type_)); +} +AttributeProto::~AttributeProto() { + // @@protoc_insertion_point(destructor:onnx.AttributeProto) + SharedDtor(*this); +} +inline void AttributeProto::SharedDtor(MessageLite& self) { + AttributeProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.s_.Destroy(); + this_._impl_.doc_string_.Destroy(); + this_._impl_.ref_attr_name_.Destroy(); + delete this_._impl_.t_; + delete this_._impl_.g_; + delete this_._impl_.tp_; + delete this_._impl_.sparse_tensor_; + this_._impl_.~Impl_(); +} + +inline void* AttributeProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) AttributeProto(arena); +} +constexpr auto AttributeProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.floats_) + + decltype(AttributeProto::_impl_.floats_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.ints_) + + decltype(AttributeProto::_impl_.ints_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.strings_) + + decltype(AttributeProto::_impl_.strings_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.tensors_) + + decltype(AttributeProto::_impl_.tensors_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.graphs_) + + decltype(AttributeProto::_impl_.graphs_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.sparse_tensors_) + + decltype(AttributeProto::_impl_.sparse_tensors_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.type_protos_) + + decltype(AttributeProto::_impl_.type_protos_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(AttributeProto), alignof(AttributeProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&AttributeProto::PlacementNew_, + sizeof(AttributeProto), + alignof(AttributeProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<20> AttributeProto::_class_data_ = { + { + &_AttributeProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &AttributeProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &AttributeProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &AttributeProto::ByteSizeLong, + &AttributeProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_._cached_size_), + true, + }, + "onnx.AttributeProto", +}; +const ::google::protobuf::internal::ClassData* AttributeProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<5, 18, 9, 0, 2> AttributeProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_._has_bits_), + 0, // no _extensions_ + 23, 248, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4287072256, // skipmap + offsetof(decltype(_table_), field_entries), + 18, // num_field_entries + 9, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::AttributeProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // optional string name = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.name_)}}, + // optional float f = 2; + {::_pbi::TcParser::FastF32S1, + {21, 9, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.f_)}}, + // optional int64 i = 3; + {::_pbi::TcParser::FastV64S1, + {24, 8, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.i_)}}, + // optional bytes s = 4; + {::_pbi::TcParser::FastBS1, + {34, 1, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.s_)}}, + // optional .onnx.TensorProto t = 5; + {::_pbi::TcParser::FastMtS1, + {42, 4, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.t_)}}, + // optional .onnx.GraphProto g = 6; + {::_pbi::TcParser::FastMtS1, + {50, 5, 1, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.g_)}}, + // repeated float floats = 7; + {::_pbi::TcParser::FastF32R1, + {61, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.floats_)}}, + // repeated int64 ints = 8; + {::_pbi::TcParser::FastV64R1, + {64, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.ints_)}}, + // repeated bytes strings = 9; + {::_pbi::TcParser::FastBR1, + {74, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.strings_)}}, + // repeated .onnx.TensorProto tensors = 10; + {::_pbi::TcParser::FastMtR1, + {82, 63, 2, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.tensors_)}}, + // repeated .onnx.GraphProto graphs = 11; + {::_pbi::TcParser::FastMtR1, + {90, 63, 3, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.graphs_)}}, + {::_pbi::TcParser::MiniParse, {}}, + // optional string doc_string = 13; + {::_pbi::TcParser::FastBS1, + {106, 2, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.doc_string_)}}, + // optional .onnx.TypeProto tp = 14; + {::_pbi::TcParser::FastMtS1, + {114, 6, 4, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.tp_)}}, + // repeated .onnx.TypeProto type_protos = 15; + {::_pbi::TcParser::FastMtR1, + {122, 63, 5, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.type_protos_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + // optional .onnx.AttributeProto.AttributeType type = 20; + {::_pbi::TcParser::FastEr0S2, + {416, 10, 14, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.type_)}}, + // optional string ref_attr_name = 21; + {::_pbi::TcParser::FastBS2, + {426, 3, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.ref_attr_name_)}}, + // optional .onnx.SparseTensorProto sparse_tensor = 22; + {::_pbi::TcParser::FastMtS2, + {434, 7, 6, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.sparse_tensor_)}}, + // repeated .onnx.SparseTensorProto sparse_tensors = 23; + {::_pbi::TcParser::FastMtR2, + {442, 63, 7, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.sparse_tensors_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional string name = 1; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional float f = 2; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.f_), _Internal::kHasBitsOffset + 9, 0, + (0 | ::_fl::kFcOptional | ::_fl::kFloat)}, + // optional int64 i = 3; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.i_), _Internal::kHasBitsOffset + 8, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + // optional bytes s = 4; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.s_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional .onnx.TensorProto t = 5; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.t_), _Internal::kHasBitsOffset + 4, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional .onnx.GraphProto g = 6; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.g_), _Internal::kHasBitsOffset + 5, 1, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated float floats = 7; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.floats_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kFloat)}, + // repeated int64 ints = 8; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.ints_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kInt64)}, + // repeated bytes strings = 9; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.strings_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, + // repeated .onnx.TensorProto tensors = 10; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.tensors_), -1, 2, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.GraphProto graphs = 11; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.graphs_), -1, 3, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string doc_string = 13; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.doc_string_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional .onnx.TypeProto tp = 14; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.tp_), _Internal::kHasBitsOffset + 6, 4, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.TypeProto type_protos = 15; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.type_protos_), -1, 5, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional .onnx.AttributeProto.AttributeType type = 20; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.type_), _Internal::kHasBitsOffset + 10, 8, + (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)}, + // optional string ref_attr_name = 21; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.ref_attr_name_), _Internal::kHasBitsOffset + 3, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional .onnx.SparseTensorProto sparse_tensor = 22; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.sparse_tensor_), _Internal::kHasBitsOffset + 7, 6, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.SparseTensorProto sparse_tensors = 23; + {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.sparse_tensors_), -1, 7, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TensorProto>()}, + {::_pbi::TcParser::GetTable<::onnx::GraphProto>()}, + {::_pbi::TcParser::GetTable<::onnx::TensorProto>()}, + {::_pbi::TcParser::GetTable<::onnx::GraphProto>()}, + {::_pbi::TcParser::GetTable<::onnx::TypeProto>()}, + {::_pbi::TcParser::GetTable<::onnx::TypeProto>()}, + {::_pbi::TcParser::GetTable<::onnx::SparseTensorProto>()}, + {::_pbi::TcParser::GetTable<::onnx::SparseTensorProto>()}, + {0, 15}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void AttributeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.AttributeProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.floats_.Clear(); + _impl_.ints_.Clear(); + _impl_.strings_.Clear(); + _impl_.tensors_.Clear(); + _impl_.graphs_.Clear(); + _impl_.type_protos_.Clear(); + _impl_.sparse_tensors_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.s_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + _impl_.doc_string_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + _impl_.ref_attr_name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000010u) { + ABSL_DCHECK(_impl_.t_ != nullptr); + _impl_.t_->Clear(); + } + if (cached_has_bits & 0x00000020u) { + ABSL_DCHECK(_impl_.g_ != nullptr); + _impl_.g_->Clear(); + } + if (cached_has_bits & 0x00000040u) { + ABSL_DCHECK(_impl_.tp_ != nullptr); + _impl_.tp_->Clear(); + } + if (cached_has_bits & 0x00000080u) { + ABSL_DCHECK(_impl_.sparse_tensor_ != nullptr); + _impl_.sparse_tensor_->Clear(); + } + } + if (cached_has_bits & 0x00000700u) { + ::memset(&_impl_.i_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.type_) - + reinterpret_cast(&_impl_.i_)) + sizeof(_impl_.type_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* AttributeProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const AttributeProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* AttributeProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const AttributeProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.AttributeProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional float f = 2; + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray( + 2, this_._internal_f(), target); + } + + // optional int64 i = 3; + if (cached_has_bits & 0x00000100u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<3>( + stream, this_._internal_i(), target); + } + + // optional bytes s = 4; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_s(); + target = stream->WriteBytesMaybeAliased(4, _s, target); + } + + // optional .onnx.TensorProto t = 5; + if (cached_has_bits & 0x00000010u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, *this_._impl_.t_, this_._impl_.t_->GetCachedSize(), target, + stream); + } + + // optional .onnx.GraphProto g = 6; + if (cached_has_bits & 0x00000020u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 6, *this_._impl_.g_, this_._impl_.g_->GetCachedSize(), target, + stream); + } + + // repeated float floats = 7; + for (int i = 0, n = this_._internal_floats_size(); i < n; ++i) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray( + 7, this_._internal_floats().Get(i), target); + } + + // repeated int64 ints = 8; + for (int i = 0, n = this_._internal_ints_size(); i < n; ++i) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray( + 8, this_._internal_ints().Get(i), target); + } + + // repeated bytes strings = 9; + for (int i = 0, n = this_._internal_strings_size(); i < n; ++i) { + const auto& s = this_._internal_strings().Get(i); + target = stream->WriteBytes(9, s, target); + } + + // repeated .onnx.TensorProto tensors = 10; + for (unsigned i = 0, n = static_cast( + this_._internal_tensors_size()); + i < n; i++) { + const auto& repfield = this_._internal_tensors().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 10, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.GraphProto graphs = 11; + for (unsigned i = 0, n = static_cast( + this_._internal_graphs_size()); + i < n; i++) { + const auto& repfield = this_._internal_graphs().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 11, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional string doc_string = 13; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_doc_string(); + target = stream->WriteStringMaybeAliased(13, _s, target); + } + + // optional .onnx.TypeProto tp = 14; + if (cached_has_bits & 0x00000040u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 14, *this_._impl_.tp_, this_._impl_.tp_->GetCachedSize(), target, + stream); + } + + // repeated .onnx.TypeProto type_protos = 15; + for (unsigned i = 0, n = static_cast( + this_._internal_type_protos_size()); + i < n; i++) { + const auto& repfield = this_._internal_type_protos().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 15, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional .onnx.AttributeProto.AttributeType type = 20; + if (cached_has_bits & 0x00000400u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 20, this_._internal_type(), target); + } + + // optional string ref_attr_name = 21; + if (cached_has_bits & 0x00000008u) { + const std::string& _s = this_._internal_ref_attr_name(); + target = stream->WriteStringMaybeAliased(21, _s, target); + } + + // optional .onnx.SparseTensorProto sparse_tensor = 22; + if (cached_has_bits & 0x00000080u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 22, *this_._impl_.sparse_tensor_, this_._impl_.sparse_tensor_->GetCachedSize(), target, + stream); + } + + // repeated .onnx.SparseTensorProto sparse_tensors = 23; + for (unsigned i = 0, n = static_cast( + this_._internal_sparse_tensors_size()); + i < n; i++) { + const auto& repfield = this_._internal_sparse_tensors().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 23, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.AttributeProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t AttributeProto::ByteSizeLong(const MessageLite& base) { + const AttributeProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t AttributeProto::ByteSizeLong() const { + const AttributeProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.AttributeProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated float floats = 7; + { + std::size_t data_size = std::size_t{4} * + ::_pbi::FromIntSize(this_._internal_floats_size()); + std::size_t tag_size = std::size_t{1} * + ::_pbi::FromIntSize(this_._internal_floats_size()); + total_size += tag_size + data_size; + } + // repeated int64 ints = 8; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this_._internal_ints()); + std::size_t tag_size = std::size_t{1} * + ::_pbi::FromIntSize(this_._internal_ints_size()); + total_size += tag_size + data_size; + } + // repeated bytes strings = 9; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_strings().size()); + for (int i = 0, n = this_._internal_strings().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_strings().Get(i)); + } + } + // repeated .onnx.TensorProto tensors = 10; + { + total_size += 1UL * this_._internal_tensors_size(); + for (const auto& msg : this_._internal_tensors()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.GraphProto graphs = 11; + { + total_size += 1UL * this_._internal_graphs_size(); + for (const auto& msg : this_._internal_graphs()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.TypeProto type_protos = 15; + { + total_size += 1UL * this_._internal_type_protos_size(); + for (const auto& msg : this_._internal_type_protos()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.SparseTensorProto sparse_tensors = 23; + { + total_size += 2UL * this_._internal_sparse_tensors_size(); + for (const auto& msg : this_._internal_sparse_tensors()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional bytes s = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_s()); + } + // optional string doc_string = 13; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_doc_string()); + } + // optional string ref_attr_name = 21; + if (cached_has_bits & 0x00000008u) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_ref_attr_name()); + } + // optional .onnx.TensorProto t = 5; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.t_); + } + // optional .onnx.GraphProto g = 6; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.g_); + } + // optional .onnx.TypeProto tp = 14; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.tp_); + } + // optional .onnx.SparseTensorProto sparse_tensor = 22; + if (cached_has_bits & 0x00000080u) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.sparse_tensor_); + } + } + if (cached_has_bits & 0x00000700u) { + // optional int64 i = 3; + if (cached_has_bits & 0x00000100u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_i()); + } + // optional float f = 2; + if (cached_has_bits & 0x00000200u) { + total_size += 5; + } + // optional .onnx.AttributeProto.AttributeType type = 20; + if (cached_has_bits & 0x00000400u) { + total_size += 2 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_type()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void AttributeProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.AttributeProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_floats()->MergeFrom(from._internal_floats()); + _this->_internal_mutable_ints()->MergeFrom(from._internal_ints()); + _this->_internal_mutable_strings()->MergeFrom(from._internal_strings()); + _this->_internal_mutable_tensors()->MergeFrom( + from._internal_tensors()); + _this->_internal_mutable_graphs()->MergeFrom( + from._internal_graphs()); + _this->_internal_mutable_type_protos()->MergeFrom( + from._internal_type_protos()); + _this->_internal_mutable_sparse_tensors()->MergeFrom( + from._internal_sparse_tensors()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_s(from._internal_s()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_set_doc_string(from._internal_doc_string()); + } + if (cached_has_bits & 0x00000008u) { + _this->_internal_set_ref_attr_name(from._internal_ref_attr_name()); + } + if (cached_has_bits & 0x00000010u) { + ABSL_DCHECK(from._impl_.t_ != nullptr); + if (_this->_impl_.t_ == nullptr) { + _this->_impl_.t_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorProto>(arena, *from._impl_.t_); + } else { + _this->_impl_.t_->MergeFrom(*from._impl_.t_); + } + } + if (cached_has_bits & 0x00000020u) { + ABSL_DCHECK(from._impl_.g_ != nullptr); + if (_this->_impl_.g_ == nullptr) { + _this->_impl_.g_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::GraphProto>(arena, *from._impl_.g_); + } else { + _this->_impl_.g_->MergeFrom(*from._impl_.g_); + } + } + if (cached_has_bits & 0x00000040u) { + ABSL_DCHECK(from._impl_.tp_ != nullptr); + if (_this->_impl_.tp_ == nullptr) { + _this->_impl_.tp_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>(arena, *from._impl_.tp_); + } else { + _this->_impl_.tp_->MergeFrom(*from._impl_.tp_); + } + } + if (cached_has_bits & 0x00000080u) { + ABSL_DCHECK(from._impl_.sparse_tensor_ != nullptr); + if (_this->_impl_.sparse_tensor_ == nullptr) { + _this->_impl_.sparse_tensor_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::SparseTensorProto>(arena, *from._impl_.sparse_tensor_); + } else { + _this->_impl_.sparse_tensor_->MergeFrom(*from._impl_.sparse_tensor_); + } + } + } + if (cached_has_bits & 0x00000700u) { + if (cached_has_bits & 0x00000100u) { + _this->_impl_.i_ = from._impl_.i_; + } + if (cached_has_bits & 0x00000200u) { + _this->_impl_.f_ = from._impl_.f_; + } + if (cached_has_bits & 0x00000400u) { + _this->_impl_.type_ = from._impl_.type_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void AttributeProto::CopyFrom(const AttributeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.AttributeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void AttributeProto::InternalSwap(AttributeProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.floats_.InternalSwap(&other->_impl_.floats_); + _impl_.ints_.InternalSwap(&other->_impl_.ints_); + _impl_.strings_.InternalSwap(&other->_impl_.strings_); + _impl_.tensors_.InternalSwap(&other->_impl_.tensors_); + _impl_.graphs_.InternalSwap(&other->_impl_.graphs_); + _impl_.type_protos_.InternalSwap(&other->_impl_.type_protos_); + _impl_.sparse_tensors_.InternalSwap(&other->_impl_.sparse_tensors_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.s_, &other->_impl_.s_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.doc_string_, &other->_impl_.doc_string_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.ref_attr_name_, &other->_impl_.ref_attr_name_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.type_) + + sizeof(AttributeProto::_impl_.type_) + - PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.t_)>( + reinterpret_cast(&_impl_.t_), + reinterpret_cast(&other->_impl_.t_)); +} + +// =================================================================== + +class ValueInfoProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_._has_bits_); +}; + +ValueInfoProto::ValueInfoProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.ValueInfoProto) +} +inline PROTOBUF_NDEBUG_INLINE ValueInfoProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::ValueInfoProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + metadata_props_{visibility, arena, from.metadata_props_}, + name_(arena, from.name_), + doc_string_(arena, from.doc_string_) {} + +ValueInfoProto::ValueInfoProto( + ::google::protobuf::Arena* arena, + const ValueInfoProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ValueInfoProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.type_ = (cached_has_bits & 0x00000004u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>( + arena, *from._impl_.type_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:onnx.ValueInfoProto) +} +inline PROTOBUF_NDEBUG_INLINE ValueInfoProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + metadata_props_{visibility, arena}, + name_(arena), + doc_string_(arena) {} + +inline void ValueInfoProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.type_ = {}; +} +ValueInfoProto::~ValueInfoProto() { + // @@protoc_insertion_point(destructor:onnx.ValueInfoProto) + SharedDtor(*this); +} +inline void ValueInfoProto::SharedDtor(MessageLite& self) { + ValueInfoProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.doc_string_.Destroy(); + delete this_._impl_.type_; + this_._impl_.~Impl_(); +} + +inline void* ValueInfoProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) ValueInfoProto(arena); +} +constexpr auto ValueInfoProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.metadata_props_) + + decltype(ValueInfoProto::_impl_.metadata_props_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(ValueInfoProto), alignof(ValueInfoProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&ValueInfoProto::PlacementNew_, + sizeof(ValueInfoProto), + alignof(ValueInfoProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<20> ValueInfoProto::_class_data_ = { + { + &_ValueInfoProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ValueInfoProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ValueInfoProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &ValueInfoProto::ByteSizeLong, + &ValueInfoProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_._cached_size_), + true, + }, + "onnx.ValueInfoProto", +}; +const ::google::protobuf::internal::ClassData* ValueInfoProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 2, 0, 2> ValueInfoProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::ValueInfoProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .onnx.StringStringEntryProto metadata_props = 4; + {::_pbi::TcParser::FastMtR1, + {34, 63, 1, PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.metadata_props_)}}, + // optional string name = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.name_)}}, + // optional .onnx.TypeProto type = 2; + {::_pbi::TcParser::FastMtS1, + {18, 2, 0, PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.type_)}}, + // optional string doc_string = 3; + {::_pbi::TcParser::FastBS1, + {26, 1, 0, PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.doc_string_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional string name = 1; + {PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional .onnx.TypeProto type = 2; + {PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.type_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string doc_string = 3; + {PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.doc_string_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.StringStringEntryProto metadata_props = 4; + {PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.metadata_props_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TypeProto>()}, + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void ValueInfoProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.ValueInfoProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.metadata_props_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.doc_string_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(_impl_.type_ != nullptr); + _impl_.type_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* ValueInfoProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const ValueInfoProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* ValueInfoProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const ValueInfoProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.ValueInfoProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional .onnx.TypeProto type = 2; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.type_, this_._impl_.type_->GetCachedSize(), target, + stream); + } + + // optional string doc_string = 3; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_doc_string(); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + // repeated .onnx.StringStringEntryProto metadata_props = 4; + for (unsigned i = 0, n = static_cast( + this_._internal_metadata_props_size()); + i < n; i++) { + const auto& repfield = this_._internal_metadata_props().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.ValueInfoProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t ValueInfoProto::ByteSizeLong(const MessageLite& base) { + const ValueInfoProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t ValueInfoProto::ByteSizeLong() const { + const ValueInfoProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.ValueInfoProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .onnx.StringStringEntryProto metadata_props = 4; + { + total_size += 1UL * this_._internal_metadata_props_size(); + for (const auto& msg : this_._internal_metadata_props()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional string doc_string = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_doc_string()); + } + // optional .onnx.TypeProto type = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.type_); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void ValueInfoProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.ValueInfoProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_metadata_props()->MergeFrom( + from._internal_metadata_props()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_doc_string(from._internal_doc_string()); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(from._impl_.type_ != nullptr); + if (_this->_impl_.type_ == nullptr) { + _this->_impl_.type_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>(arena, *from._impl_.type_); + } else { + _this->_impl_.type_->MergeFrom(*from._impl_.type_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ValueInfoProto::CopyFrom(const ValueInfoProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.ValueInfoProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ValueInfoProto::InternalSwap(ValueInfoProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.metadata_props_.InternalSwap(&other->_impl_.metadata_props_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.doc_string_, &other->_impl_.doc_string_, arena); + swap(_impl_.type_, other->_impl_.type_); +} + +// =================================================================== + +class NodeProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(NodeProto, _impl_._has_bits_); +}; + +NodeProto::NodeProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.NodeProto) +} +inline PROTOBUF_NDEBUG_INLINE NodeProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::NodeProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + input_{visibility, arena, from.input_}, + output_{visibility, arena, from.output_}, + attribute_{visibility, arena, from.attribute_}, + metadata_props_{visibility, arena, from.metadata_props_}, + name_(arena, from.name_), + op_type_(arena, from.op_type_), + doc_string_(arena, from.doc_string_), + domain_(arena, from.domain_), + overload_(arena, from.overload_) {} + +NodeProto::NodeProto( + ::google::protobuf::Arena* arena, + const NodeProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + NodeProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:onnx.NodeProto) +} +inline PROTOBUF_NDEBUG_INLINE NodeProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + input_{visibility, arena}, + output_{visibility, arena}, + attribute_{visibility, arena}, + metadata_props_{visibility, arena}, + name_(arena), + op_type_(arena), + doc_string_(arena), + domain_(arena), + overload_(arena) {} + +inline void NodeProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +NodeProto::~NodeProto() { + // @@protoc_insertion_point(destructor:onnx.NodeProto) + SharedDtor(*this); +} +inline void NodeProto::SharedDtor(MessageLite& self) { + NodeProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.op_type_.Destroy(); + this_._impl_.doc_string_.Destroy(); + this_._impl_.domain_.Destroy(); + this_._impl_.overload_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* NodeProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) NodeProto(arena); +} +constexpr auto NodeProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.input_) + + decltype(NodeProto::_impl_.input_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.output_) + + decltype(NodeProto::_impl_.output_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.attribute_) + + decltype(NodeProto::_impl_.attribute_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.metadata_props_) + + decltype(NodeProto::_impl_.metadata_props_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(NodeProto), alignof(NodeProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&NodeProto::PlacementNew_, + sizeof(NodeProto), + alignof(NodeProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<15> NodeProto::_class_data_ = { + { + &_NodeProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &NodeProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &NodeProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &NodeProto::ByteSizeLong, + &NodeProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(NodeProto, _impl_._cached_size_), + true, + }, + "onnx.NodeProto", +}; +const ::google::protobuf::internal::ClassData* NodeProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 9, 2, 0, 2> NodeProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(NodeProto, _impl_._has_bits_), + 0, // no _extensions_ + 9, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294966784, // skipmap + offsetof(decltype(_table_), field_entries), + 9, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::NodeProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // repeated string input = 1; + {::_pbi::TcParser::FastBR1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.input_)}}, + // repeated string output = 2; + {::_pbi::TcParser::FastBR1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.output_)}}, + // optional string name = 3; + {::_pbi::TcParser::FastBS1, + {26, 0, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.name_)}}, + // optional string op_type = 4; + {::_pbi::TcParser::FastBS1, + {34, 1, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.op_type_)}}, + // repeated .onnx.AttributeProto attribute = 5; + {::_pbi::TcParser::FastMtR1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.attribute_)}}, + // optional string doc_string = 6; + {::_pbi::TcParser::FastBS1, + {50, 2, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.doc_string_)}}, + // optional string domain = 7; + {::_pbi::TcParser::FastBS1, + {58, 3, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.domain_)}}, + // optional string overload = 8; + {::_pbi::TcParser::FastBS1, + {66, 4, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.overload_)}}, + // repeated .onnx.StringStringEntryProto metadata_props = 9; + {::_pbi::TcParser::FastMtR1, + {74, 63, 1, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.metadata_props_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated string input = 1; + {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.input_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, + // repeated string output = 2; + {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.output_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, + // optional string name = 3; + {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional string op_type = 4; + {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.op_type_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.AttributeProto attribute = 5; + {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.attribute_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string doc_string = 6; + {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.doc_string_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional string domain = 7; + {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.domain_), _Internal::kHasBitsOffset + 3, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional string overload = 8; + {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.overload_), _Internal::kHasBitsOffset + 4, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.StringStringEntryProto metadata_props = 9; + {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.metadata_props_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::AttributeProto>()}, + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void NodeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.NodeProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.input_.Clear(); + _impl_.output_.Clear(); + _impl_.attribute_.Clear(); + _impl_.metadata_props_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.op_type_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + _impl_.doc_string_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + _impl_.domain_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000010u) { + _impl_.overload_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* NodeProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const NodeProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* NodeProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const NodeProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.NodeProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated string input = 1; + for (int i = 0, n = this_._internal_input_size(); i < n; ++i) { + const auto& s = this_._internal_input().Get(i); + target = stream->WriteString(1, s, target); + } + + // repeated string output = 2; + for (int i = 0, n = this_._internal_output_size(); i < n; ++i) { + const auto& s = this_._internal_output().Get(i); + target = stream->WriteString(2, s, target); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 3; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + // optional string op_type = 4; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_op_type(); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + // repeated .onnx.AttributeProto attribute = 5; + for (unsigned i = 0, n = static_cast( + this_._internal_attribute_size()); + i < n; i++) { + const auto& repfield = this_._internal_attribute().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional string doc_string = 6; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_doc_string(); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + + // optional string domain = 7; + if (cached_has_bits & 0x00000008u) { + const std::string& _s = this_._internal_domain(); + target = stream->WriteStringMaybeAliased(7, _s, target); + } + + // optional string overload = 8; + if (cached_has_bits & 0x00000010u) { + const std::string& _s = this_._internal_overload(); + target = stream->WriteStringMaybeAliased(8, _s, target); + } + + // repeated .onnx.StringStringEntryProto metadata_props = 9; + for (unsigned i = 0, n = static_cast( + this_._internal_metadata_props_size()); + i < n; i++) { + const auto& repfield = this_._internal_metadata_props().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.NodeProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t NodeProto::ByteSizeLong(const MessageLite& base) { + const NodeProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t NodeProto::ByteSizeLong() const { + const NodeProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.NodeProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated string input = 1; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_input().size()); + for (int i = 0, n = this_._internal_input().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_input().Get(i)); + } + } + // repeated string output = 2; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_output().size()); + for (int i = 0, n = this_._internal_output().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_output().Get(i)); + } + } + // repeated .onnx.AttributeProto attribute = 5; + { + total_size += 1UL * this_._internal_attribute_size(); + for (const auto& msg : this_._internal_attribute()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.StringStringEntryProto metadata_props = 9; + { + total_size += 1UL * this_._internal_metadata_props_size(); + for (const auto& msg : this_._internal_metadata_props()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional string name = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional string op_type = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_op_type()); + } + // optional string doc_string = 6; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_doc_string()); + } + // optional string domain = 7; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_domain()); + } + // optional string overload = 8; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_overload()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void NodeProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.NodeProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_input()->MergeFrom(from._internal_input()); + _this->_internal_mutable_output()->MergeFrom(from._internal_output()); + _this->_internal_mutable_attribute()->MergeFrom( + from._internal_attribute()); + _this->_internal_mutable_metadata_props()->MergeFrom( + from._internal_metadata_props()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_op_type(from._internal_op_type()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_set_doc_string(from._internal_doc_string()); + } + if (cached_has_bits & 0x00000008u) { + _this->_internal_set_domain(from._internal_domain()); + } + if (cached_has_bits & 0x00000010u) { + _this->_internal_set_overload(from._internal_overload()); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void NodeProto::CopyFrom(const NodeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.NodeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void NodeProto::InternalSwap(NodeProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.input_.InternalSwap(&other->_impl_.input_); + _impl_.output_.InternalSwap(&other->_impl_.output_); + _impl_.attribute_.InternalSwap(&other->_impl_.attribute_); + _impl_.metadata_props_.InternalSwap(&other->_impl_.metadata_props_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.op_type_, &other->_impl_.op_type_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.doc_string_, &other->_impl_.doc_string_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.domain_, &other->_impl_.domain_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.overload_, &other->_impl_.overload_, arena); +} + +// =================================================================== + +class TrainingInfoProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_._has_bits_); +}; + +TrainingInfoProto::TrainingInfoProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TrainingInfoProto) +} +inline PROTOBUF_NDEBUG_INLINE TrainingInfoProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TrainingInfoProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + initialization_binding_{visibility, arena, from.initialization_binding_}, + update_binding_{visibility, arena, from.update_binding_} {} + +TrainingInfoProto::TrainingInfoProto( + ::google::protobuf::Arena* arena, + const TrainingInfoProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TrainingInfoProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.initialization_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::GraphProto>( + arena, *from._impl_.initialization_) + : nullptr; + _impl_.algorithm_ = (cached_has_bits & 0x00000002u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::GraphProto>( + arena, *from._impl_.algorithm_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:onnx.TrainingInfoProto) +} +inline PROTOBUF_NDEBUG_INLINE TrainingInfoProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + initialization_binding_{visibility, arena}, + update_binding_{visibility, arena} {} + +inline void TrainingInfoProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, initialization_), + 0, + offsetof(Impl_, algorithm_) - + offsetof(Impl_, initialization_) + + sizeof(Impl_::algorithm_)); +} +TrainingInfoProto::~TrainingInfoProto() { + // @@protoc_insertion_point(destructor:onnx.TrainingInfoProto) + SharedDtor(*this); +} +inline void TrainingInfoProto::SharedDtor(MessageLite& self) { + TrainingInfoProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.initialization_; + delete this_._impl_.algorithm_; + this_._impl_.~Impl_(); +} + +inline void* TrainingInfoProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TrainingInfoProto(arena); +} +constexpr auto TrainingInfoProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.initialization_binding_) + + decltype(TrainingInfoProto::_impl_.initialization_binding_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.update_binding_) + + decltype(TrainingInfoProto::_impl_.update_binding_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TrainingInfoProto), alignof(TrainingInfoProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TrainingInfoProto::PlacementNew_, + sizeof(TrainingInfoProto), + alignof(TrainingInfoProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<23> TrainingInfoProto::_class_data_ = { + { + &_TrainingInfoProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TrainingInfoProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TrainingInfoProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TrainingInfoProto::ByteSizeLong, + &TrainingInfoProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_._cached_size_), + true, + }, + "onnx.TrainingInfoProto", +}; +const ::google::protobuf::internal::ClassData* TrainingInfoProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 4, 0, 2> TrainingInfoProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 4, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TrainingInfoProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .onnx.StringStringEntryProto update_binding = 4; + {::_pbi::TcParser::FastMtR1, + {34, 63, 3, PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.update_binding_)}}, + // optional .onnx.GraphProto initialization = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.initialization_)}}, + // optional .onnx.GraphProto algorithm = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.algorithm_)}}, + // repeated .onnx.StringStringEntryProto initialization_binding = 3; + {::_pbi::TcParser::FastMtR1, + {26, 63, 2, PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.initialization_binding_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional .onnx.GraphProto initialization = 1; + {PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.initialization_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional .onnx.GraphProto algorithm = 2; + {PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.algorithm_), _Internal::kHasBitsOffset + 1, 1, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.StringStringEntryProto initialization_binding = 3; + {PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.initialization_binding_), -1, 2, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.StringStringEntryProto update_binding = 4; + {PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.update_binding_), -1, 3, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::GraphProto>()}, + {::_pbi::TcParser::GetTable<::onnx::GraphProto>()}, + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TrainingInfoProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TrainingInfoProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.initialization_binding_.Clear(); + _impl_.update_binding_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.initialization_ != nullptr); + _impl_.initialization_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(_impl_.algorithm_ != nullptr); + _impl_.algorithm_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TrainingInfoProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TrainingInfoProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TrainingInfoProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TrainingInfoProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TrainingInfoProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .onnx.GraphProto initialization = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.initialization_, this_._impl_.initialization_->GetCachedSize(), target, + stream); + } + + // optional .onnx.GraphProto algorithm = 2; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.algorithm_, this_._impl_.algorithm_->GetCachedSize(), target, + stream); + } + + // repeated .onnx.StringStringEntryProto initialization_binding = 3; + for (unsigned i = 0, n = static_cast( + this_._internal_initialization_binding_size()); + i < n; i++) { + const auto& repfield = this_._internal_initialization_binding().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.StringStringEntryProto update_binding = 4; + for (unsigned i = 0, n = static_cast( + this_._internal_update_binding_size()); + i < n; i++) { + const auto& repfield = this_._internal_update_binding().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TrainingInfoProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TrainingInfoProto::ByteSizeLong(const MessageLite& base) { + const TrainingInfoProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TrainingInfoProto::ByteSizeLong() const { + const TrainingInfoProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TrainingInfoProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .onnx.StringStringEntryProto initialization_binding = 3; + { + total_size += 1UL * this_._internal_initialization_binding_size(); + for (const auto& msg : this_._internal_initialization_binding()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.StringStringEntryProto update_binding = 4; + { + total_size += 1UL * this_._internal_update_binding_size(); + for (const auto& msg : this_._internal_update_binding()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .onnx.GraphProto initialization = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.initialization_); + } + // optional .onnx.GraphProto algorithm = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.algorithm_); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TrainingInfoProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TrainingInfoProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_initialization_binding()->MergeFrom( + from._internal_initialization_binding()); + _this->_internal_mutable_update_binding()->MergeFrom( + from._internal_update_binding()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.initialization_ != nullptr); + if (_this->_impl_.initialization_ == nullptr) { + _this->_impl_.initialization_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::GraphProto>(arena, *from._impl_.initialization_); + } else { + _this->_impl_.initialization_->MergeFrom(*from._impl_.initialization_); + } + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(from._impl_.algorithm_ != nullptr); + if (_this->_impl_.algorithm_ == nullptr) { + _this->_impl_.algorithm_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::GraphProto>(arena, *from._impl_.algorithm_); + } else { + _this->_impl_.algorithm_->MergeFrom(*from._impl_.algorithm_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TrainingInfoProto::CopyFrom(const TrainingInfoProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TrainingInfoProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TrainingInfoProto::InternalSwap(TrainingInfoProto* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.initialization_binding_.InternalSwap(&other->_impl_.initialization_binding_); + _impl_.update_binding_.InternalSwap(&other->_impl_.update_binding_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.algorithm_) + + sizeof(TrainingInfoProto::_impl_.algorithm_) + - PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.initialization_)>( + reinterpret_cast(&_impl_.initialization_), + reinterpret_cast(&other->_impl_.initialization_)); +} + +// =================================================================== + +class ModelProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(ModelProto, _impl_._has_bits_); +}; + +ModelProto::ModelProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.ModelProto) +} +inline PROTOBUF_NDEBUG_INLINE ModelProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::ModelProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + opset_import_{visibility, arena, from.opset_import_}, + metadata_props_{visibility, arena, from.metadata_props_}, + training_info_{visibility, arena, from.training_info_}, + functions_{visibility, arena, from.functions_}, + producer_name_(arena, from.producer_name_), + producer_version_(arena, from.producer_version_), + domain_(arena, from.domain_), + doc_string_(arena, from.doc_string_) {} + +ModelProto::ModelProto( + ::google::protobuf::Arena* arena, + const ModelProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + ModelProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.graph_ = (cached_has_bits & 0x00000010u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::GraphProto>( + arena, *from._impl_.graph_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, ir_version_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, ir_version_), + offsetof(Impl_, model_version_) - + offsetof(Impl_, ir_version_) + + sizeof(Impl_::model_version_)); + + // @@protoc_insertion_point(copy_constructor:onnx.ModelProto) +} +inline PROTOBUF_NDEBUG_INLINE ModelProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + opset_import_{visibility, arena}, + metadata_props_{visibility, arena}, + training_info_{visibility, arena}, + functions_{visibility, arena}, + producer_name_(arena), + producer_version_(arena), + domain_(arena), + doc_string_(arena) {} + +inline void ModelProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, graph_), + 0, + offsetof(Impl_, model_version_) - + offsetof(Impl_, graph_) + + sizeof(Impl_::model_version_)); +} +ModelProto::~ModelProto() { + // @@protoc_insertion_point(destructor:onnx.ModelProto) + SharedDtor(*this); +} +inline void ModelProto::SharedDtor(MessageLite& self) { + ModelProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.producer_name_.Destroy(); + this_._impl_.producer_version_.Destroy(); + this_._impl_.domain_.Destroy(); + this_._impl_.doc_string_.Destroy(); + delete this_._impl_.graph_; + this_._impl_.~Impl_(); +} + +inline void* ModelProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) ModelProto(arena); +} +constexpr auto ModelProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.opset_import_) + + decltype(ModelProto::_impl_.opset_import_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.metadata_props_) + + decltype(ModelProto::_impl_.metadata_props_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.training_info_) + + decltype(ModelProto::_impl_.training_info_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.functions_) + + decltype(ModelProto::_impl_.functions_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(ModelProto), alignof(ModelProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&ModelProto::PlacementNew_, + sizeof(ModelProto), + alignof(ModelProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<16> ModelProto::_class_data_ = { + { + &_ModelProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &ModelProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &ModelProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &ModelProto::ByteSizeLong, + &ModelProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(ModelProto, _impl_._cached_size_), + true, + }, + "onnx.ModelProto", +}; +const ::google::protobuf::internal::ClassData* ModelProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 11, 5, 0, 2> ModelProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(ModelProto, _impl_._has_bits_), + 0, // no _extensions_ + 25, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4277657344, // skipmap + offsetof(decltype(_table_), field_entries), + 11, // num_field_entries + 5, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::ModelProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // optional int64 ir_version = 1; + {::_pbi::TcParser::FastV64S1, + {8, 5, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.ir_version_)}}, + // optional string producer_name = 2; + {::_pbi::TcParser::FastBS1, + {18, 0, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.producer_name_)}}, + // optional string producer_version = 3; + {::_pbi::TcParser::FastBS1, + {26, 1, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.producer_version_)}}, + // optional string domain = 4; + {::_pbi::TcParser::FastBS1, + {34, 2, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.domain_)}}, + // optional int64 model_version = 5; + {::_pbi::TcParser::FastV64S1, + {40, 6, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.model_version_)}}, + // optional string doc_string = 6; + {::_pbi::TcParser::FastBS1, + {50, 3, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.doc_string_)}}, + // optional .onnx.GraphProto graph = 7; + {::_pbi::TcParser::FastMtS1, + {58, 4, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.graph_)}}, + // repeated .onnx.OperatorSetIdProto opset_import = 8; + {::_pbi::TcParser::FastMtR1, + {66, 63, 1, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.opset_import_)}}, + // repeated .onnx.FunctionProto functions = 25; + {::_pbi::TcParser::FastMtR2, + {458, 63, 4, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.functions_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + // repeated .onnx.StringStringEntryProto metadata_props = 14; + {::_pbi::TcParser::FastMtR1, + {114, 63, 2, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.metadata_props_)}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional int64 ir_version = 1; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.ir_version_), _Internal::kHasBitsOffset + 5, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + // optional string producer_name = 2; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.producer_name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional string producer_version = 3; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.producer_version_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional string domain = 4; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.domain_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional int64 model_version = 5; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.model_version_), _Internal::kHasBitsOffset + 6, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + // optional string doc_string = 6; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.doc_string_), _Internal::kHasBitsOffset + 3, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional .onnx.GraphProto graph = 7; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.graph_), _Internal::kHasBitsOffset + 4, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.OperatorSetIdProto opset_import = 8; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.opset_import_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.StringStringEntryProto metadata_props = 14; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.metadata_props_), -1, 2, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.TrainingInfoProto training_info = 20; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.training_info_), -1, 3, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.FunctionProto functions = 25; + {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.functions_), -1, 4, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::GraphProto>()}, + {::_pbi::TcParser::GetTable<::onnx::OperatorSetIdProto>()}, + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + {::_pbi::TcParser::GetTable<::onnx::TrainingInfoProto>()}, + {::_pbi::TcParser::GetTable<::onnx::FunctionProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void ModelProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.ModelProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.opset_import_.Clear(); + _impl_.metadata_props_.Clear(); + _impl_.training_info_.Clear(); + _impl_.functions_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _impl_.producer_name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.producer_version_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + _impl_.domain_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + _impl_.doc_string_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000010u) { + ABSL_DCHECK(_impl_.graph_ != nullptr); + _impl_.graph_->Clear(); + } + } + if (cached_has_bits & 0x00000060u) { + ::memset(&_impl_.ir_version_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.model_version_) - + reinterpret_cast(&_impl_.ir_version_)) + sizeof(_impl_.model_version_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* ModelProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const ModelProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* ModelProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const ModelProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.ModelProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int64 ir_version = 1; + if (cached_has_bits & 0x00000020u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<1>( + stream, this_._internal_ir_version(), target); + } + + // optional string producer_name = 2; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_producer_name(); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // optional string producer_version = 3; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_producer_version(); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + // optional string domain = 4; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_domain(); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + // optional int64 model_version = 5; + if (cached_has_bits & 0x00000040u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<5>( + stream, this_._internal_model_version(), target); + } + + // optional string doc_string = 6; + if (cached_has_bits & 0x00000008u) { + const std::string& _s = this_._internal_doc_string(); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + + // optional .onnx.GraphProto graph = 7; + if (cached_has_bits & 0x00000010u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, *this_._impl_.graph_, this_._impl_.graph_->GetCachedSize(), target, + stream); + } + + // repeated .onnx.OperatorSetIdProto opset_import = 8; + for (unsigned i = 0, n = static_cast( + this_._internal_opset_import_size()); + i < n; i++) { + const auto& repfield = this_._internal_opset_import().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.StringStringEntryProto metadata_props = 14; + for (unsigned i = 0, n = static_cast( + this_._internal_metadata_props_size()); + i < n; i++) { + const auto& repfield = this_._internal_metadata_props().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 14, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.TrainingInfoProto training_info = 20; + for (unsigned i = 0, n = static_cast( + this_._internal_training_info_size()); + i < n; i++) { + const auto& repfield = this_._internal_training_info().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 20, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.FunctionProto functions = 25; + for (unsigned i = 0, n = static_cast( + this_._internal_functions_size()); + i < n; i++) { + const auto& repfield = this_._internal_functions().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 25, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.ModelProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t ModelProto::ByteSizeLong(const MessageLite& base) { + const ModelProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t ModelProto::ByteSizeLong() const { + const ModelProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.ModelProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .onnx.OperatorSetIdProto opset_import = 8; + { + total_size += 1UL * this_._internal_opset_import_size(); + for (const auto& msg : this_._internal_opset_import()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.StringStringEntryProto metadata_props = 14; + { + total_size += 1UL * this_._internal_metadata_props_size(); + for (const auto& msg : this_._internal_metadata_props()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.TrainingInfoProto training_info = 20; + { + total_size += 2UL * this_._internal_training_info_size(); + for (const auto& msg : this_._internal_training_info()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.FunctionProto functions = 25; + { + total_size += 2UL * this_._internal_functions_size(); + for (const auto& msg : this_._internal_functions()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + // optional string producer_name = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_producer_name()); + } + // optional string producer_version = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_producer_version()); + } + // optional string domain = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_domain()); + } + // optional string doc_string = 6; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_doc_string()); + } + // optional .onnx.GraphProto graph = 7; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.graph_); + } + // optional int64 ir_version = 1; + if (cached_has_bits & 0x00000020u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_ir_version()); + } + // optional int64 model_version = 5; + if (cached_has_bits & 0x00000040u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_model_version()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void ModelProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.ModelProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_opset_import()->MergeFrom( + from._internal_opset_import()); + _this->_internal_mutable_metadata_props()->MergeFrom( + from._internal_metadata_props()); + _this->_internal_mutable_training_info()->MergeFrom( + from._internal_training_info()); + _this->_internal_mutable_functions()->MergeFrom( + from._internal_functions()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_producer_name(from._internal_producer_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_producer_version(from._internal_producer_version()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_set_domain(from._internal_domain()); + } + if (cached_has_bits & 0x00000008u) { + _this->_internal_set_doc_string(from._internal_doc_string()); + } + if (cached_has_bits & 0x00000010u) { + ABSL_DCHECK(from._impl_.graph_ != nullptr); + if (_this->_impl_.graph_ == nullptr) { + _this->_impl_.graph_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::GraphProto>(arena, *from._impl_.graph_); + } else { + _this->_impl_.graph_->MergeFrom(*from._impl_.graph_); + } + } + if (cached_has_bits & 0x00000020u) { + _this->_impl_.ir_version_ = from._impl_.ir_version_; + } + if (cached_has_bits & 0x00000040u) { + _this->_impl_.model_version_ = from._impl_.model_version_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ModelProto::CopyFrom(const ModelProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.ModelProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void ModelProto::InternalSwap(ModelProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.opset_import_.InternalSwap(&other->_impl_.opset_import_); + _impl_.metadata_props_.InternalSwap(&other->_impl_.metadata_props_); + _impl_.training_info_.InternalSwap(&other->_impl_.training_info_); + _impl_.functions_.InternalSwap(&other->_impl_.functions_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.producer_name_, &other->_impl_.producer_name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.producer_version_, &other->_impl_.producer_version_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.domain_, &other->_impl_.domain_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.doc_string_, &other->_impl_.doc_string_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.model_version_) + + sizeof(ModelProto::_impl_.model_version_) + - PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.graph_)>( + reinterpret_cast(&_impl_.graph_), + reinterpret_cast(&other->_impl_.graph_)); +} + +// =================================================================== + +class StringStringEntryProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_._has_bits_); +}; + +StringStringEntryProto::StringStringEntryProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.StringStringEntryProto) +} +inline PROTOBUF_NDEBUG_INLINE StringStringEntryProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::StringStringEntryProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + key_(arena, from.key_), + value_(arena, from.value_) {} + +StringStringEntryProto::StringStringEntryProto( + ::google::protobuf::Arena* arena, + const StringStringEntryProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + StringStringEntryProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:onnx.StringStringEntryProto) +} +inline PROTOBUF_NDEBUG_INLINE StringStringEntryProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + key_(arena), + value_(arena) {} + +inline void StringStringEntryProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +StringStringEntryProto::~StringStringEntryProto() { + // @@protoc_insertion_point(destructor:onnx.StringStringEntryProto) + SharedDtor(*this); +} +inline void StringStringEntryProto::SharedDtor(MessageLite& self) { + StringStringEntryProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.key_.Destroy(); + this_._impl_.value_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* StringStringEntryProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) StringStringEntryProto(arena); +} +constexpr auto StringStringEntryProto::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(StringStringEntryProto), + alignof(StringStringEntryProto)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<28> StringStringEntryProto::_class_data_ = { + { + &_StringStringEntryProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &StringStringEntryProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &StringStringEntryProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &StringStringEntryProto::ByteSizeLong, + &StringStringEntryProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_._cached_size_), + true, + }, + "onnx.StringStringEntryProto", +}; +const ::google::protobuf::internal::ClassData* StringStringEntryProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> StringStringEntryProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional string value = 2; + {::_pbi::TcParser::FastBS1, + {18, 1, 0, PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_.value_)}}, + // optional string key = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_.key_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional string key = 1; + {PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_.key_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional string value = 2; + {PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_.value_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + }}, +}; + +PROTOBUF_NOINLINE void StringStringEntryProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.StringStringEntryProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.key_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.value_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* StringStringEntryProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const StringStringEntryProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* StringStringEntryProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const StringStringEntryProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.StringStringEntryProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string key = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_key(); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional string value = 2; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_value(); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.StringStringEntryProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t StringStringEntryProto::ByteSizeLong(const MessageLite& base) { + const StringStringEntryProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t StringStringEntryProto::ByteSizeLong() const { + const StringStringEntryProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.StringStringEntryProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string key = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_key()); + } + // optional string value = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_value()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void StringStringEntryProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.StringStringEntryProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_key(from._internal_key()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_value(from._internal_value()); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void StringStringEntryProto::CopyFrom(const StringStringEntryProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.StringStringEntryProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void StringStringEntryProto::InternalSwap(StringStringEntryProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); +} + +// =================================================================== + +class TensorAnnotation::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_._has_bits_); +}; + +TensorAnnotation::TensorAnnotation(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TensorAnnotation) +} +inline PROTOBUF_NDEBUG_INLINE TensorAnnotation::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TensorAnnotation& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + quant_parameter_tensor_names_{visibility, arena, from.quant_parameter_tensor_names_}, + tensor_name_(arena, from.tensor_name_) {} + +TensorAnnotation::TensorAnnotation( + ::google::protobuf::Arena* arena, + const TensorAnnotation& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TensorAnnotation* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:onnx.TensorAnnotation) +} +inline PROTOBUF_NDEBUG_INLINE TensorAnnotation::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + quant_parameter_tensor_names_{visibility, arena}, + tensor_name_(arena) {} + +inline void TensorAnnotation::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +TensorAnnotation::~TensorAnnotation() { + // @@protoc_insertion_point(destructor:onnx.TensorAnnotation) + SharedDtor(*this); +} +inline void TensorAnnotation::SharedDtor(MessageLite& self) { + TensorAnnotation& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.tensor_name_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* TensorAnnotation::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TensorAnnotation(arena); +} +constexpr auto TensorAnnotation::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_.quant_parameter_tensor_names_) + + decltype(TensorAnnotation::_impl_.quant_parameter_tensor_names_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(TensorAnnotation), alignof(TensorAnnotation), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TensorAnnotation::PlacementNew_, + sizeof(TensorAnnotation), + alignof(TensorAnnotation)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<22> TensorAnnotation::_class_data_ = { + { + &_TensorAnnotation_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TensorAnnotation::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TensorAnnotation::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TensorAnnotation::ByteSizeLong, + &TensorAnnotation::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_._cached_size_), + true, + }, + "onnx.TensorAnnotation", +}; +const ::google::protobuf::internal::ClassData* TensorAnnotation::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> TensorAnnotation::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TensorAnnotation>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2; + {::_pbi::TcParser::FastMtR1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_.quant_parameter_tensor_names_)}}, + // optional string tensor_name = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_.tensor_name_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional string tensor_name = 1; + {PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_.tensor_name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2; + {PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_.quant_parameter_tensor_names_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TensorAnnotation::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TensorAnnotation) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.quant_parameter_tensor_names_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.tensor_name_.ClearNonDefaultToEmpty(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TensorAnnotation::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TensorAnnotation& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TensorAnnotation::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TensorAnnotation& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TensorAnnotation) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string tensor_name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_tensor_name(); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2; + for (unsigned i = 0, n = static_cast( + this_._internal_quant_parameter_tensor_names_size()); + i < n; i++) { + const auto& repfield = this_._internal_quant_parameter_tensor_names().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TensorAnnotation) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TensorAnnotation::ByteSizeLong(const MessageLite& base) { + const TensorAnnotation& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TensorAnnotation::ByteSizeLong() const { + const TensorAnnotation& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TensorAnnotation) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2; + { + total_size += 1UL * this_._internal_quant_parameter_tensor_names_size(); + for (const auto& msg : this_._internal_quant_parameter_tensor_names()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + { + // optional string tensor_name = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_tensor_name()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TensorAnnotation::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TensorAnnotation) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_quant_parameter_tensor_names()->MergeFrom( + from._internal_quant_parameter_tensor_names()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_tensor_name(from._internal_tensor_name()); + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TensorAnnotation::CopyFrom(const TensorAnnotation& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TensorAnnotation) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TensorAnnotation::InternalSwap(TensorAnnotation* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.quant_parameter_tensor_names_.InternalSwap(&other->_impl_.quant_parameter_tensor_names_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.tensor_name_, &other->_impl_.tensor_name_, arena); +} + +// =================================================================== + +class GraphProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(GraphProto, _impl_._has_bits_); +}; + +GraphProto::GraphProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.GraphProto) +} +inline PROTOBUF_NDEBUG_INLINE GraphProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::GraphProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + node_{visibility, arena, from.node_}, + initializer_{visibility, arena, from.initializer_}, + input_{visibility, arena, from.input_}, + output_{visibility, arena, from.output_}, + value_info_{visibility, arena, from.value_info_}, + quantization_annotation_{visibility, arena, from.quantization_annotation_}, + sparse_initializer_{visibility, arena, from.sparse_initializer_}, + metadata_props_{visibility, arena, from.metadata_props_}, + name_(arena, from.name_), + doc_string_(arena, from.doc_string_) {} + +GraphProto::GraphProto( + ::google::protobuf::Arena* arena, + const GraphProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + GraphProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:onnx.GraphProto) +} +inline PROTOBUF_NDEBUG_INLINE GraphProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + node_{visibility, arena}, + initializer_{visibility, arena}, + input_{visibility, arena}, + output_{visibility, arena}, + value_info_{visibility, arena}, + quantization_annotation_{visibility, arena}, + sparse_initializer_{visibility, arena}, + metadata_props_{visibility, arena}, + name_(arena), + doc_string_(arena) {} + +inline void GraphProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +GraphProto::~GraphProto() { + // @@protoc_insertion_point(destructor:onnx.GraphProto) + SharedDtor(*this); +} +inline void GraphProto::SharedDtor(MessageLite& self) { + GraphProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.doc_string_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* GraphProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) GraphProto(arena); +} +constexpr auto GraphProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.node_) + + decltype(GraphProto::_impl_.node_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.initializer_) + + decltype(GraphProto::_impl_.initializer_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.sparse_initializer_) + + decltype(GraphProto::_impl_.sparse_initializer_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.input_) + + decltype(GraphProto::_impl_.input_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.output_) + + decltype(GraphProto::_impl_.output_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.value_info_) + + decltype(GraphProto::_impl_.value_info_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.quantization_annotation_) + + decltype(GraphProto::_impl_.quantization_annotation_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.metadata_props_) + + decltype(GraphProto::_impl_.metadata_props_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(GraphProto), alignof(GraphProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&GraphProto::PlacementNew_, + sizeof(GraphProto), + alignof(GraphProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<16> GraphProto::_class_data_ = { + { + &_GraphProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &GraphProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &GraphProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &GraphProto::ByteSizeLong, + &GraphProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_._cached_size_), + true, + }, + "onnx.GraphProto", +}; +const ::google::protobuf::internal::ClassData* GraphProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 10, 8, 0, 2> GraphProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(GraphProto, _impl_._has_bits_), + 0, // no _extensions_ + 16, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294902252, // skipmap + offsetof(decltype(_table_), field_entries), + 10, // num_field_entries + 8, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::GraphProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .onnx.StringStringEntryProto metadata_props = 16; + {::_pbi::TcParser::FastMtR2, + {386, 63, 7, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.metadata_props_)}}, + // repeated .onnx.NodeProto node = 1; + {::_pbi::TcParser::FastMtR1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.node_)}}, + // optional string name = 2; + {::_pbi::TcParser::FastBS1, + {18, 0, 0, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.name_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + // repeated .onnx.TensorProto initializer = 5; + {::_pbi::TcParser::FastMtR1, + {42, 63, 1, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.initializer_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + // optional string doc_string = 10; + {::_pbi::TcParser::FastBS1, + {82, 1, 0, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.doc_string_)}}, + // repeated .onnx.ValueInfoProto input = 11; + {::_pbi::TcParser::FastMtR1, + {90, 63, 2, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.input_)}}, + // repeated .onnx.ValueInfoProto output = 12; + {::_pbi::TcParser::FastMtR1, + {98, 63, 3, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.output_)}}, + // repeated .onnx.ValueInfoProto value_info = 13; + {::_pbi::TcParser::FastMtR1, + {106, 63, 4, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.value_info_)}}, + // repeated .onnx.TensorAnnotation quantization_annotation = 14; + {::_pbi::TcParser::FastMtR1, + {114, 63, 5, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.quantization_annotation_)}}, + // repeated .onnx.SparseTensorProto sparse_initializer = 15; + {::_pbi::TcParser::FastMtR1, + {122, 63, 6, PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.sparse_initializer_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .onnx.NodeProto node = 1; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.node_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string name = 2; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.TensorProto initializer = 5; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.initializer_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string doc_string = 10; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.doc_string_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.ValueInfoProto input = 11; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.input_), -1, 2, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.ValueInfoProto output = 12; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.output_), -1, 3, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.ValueInfoProto value_info = 13; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.value_info_), -1, 4, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.TensorAnnotation quantization_annotation = 14; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.quantization_annotation_), -1, 5, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.SparseTensorProto sparse_initializer = 15; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.sparse_initializer_), -1, 6, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.StringStringEntryProto metadata_props = 16; + {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.metadata_props_), -1, 7, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::NodeProto>()}, + {::_pbi::TcParser::GetTable<::onnx::TensorProto>()}, + {::_pbi::TcParser::GetTable<::onnx::ValueInfoProto>()}, + {::_pbi::TcParser::GetTable<::onnx::ValueInfoProto>()}, + {::_pbi::TcParser::GetTable<::onnx::ValueInfoProto>()}, + {::_pbi::TcParser::GetTable<::onnx::TensorAnnotation>()}, + {::_pbi::TcParser::GetTable<::onnx::SparseTensorProto>()}, + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void GraphProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.GraphProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.node_.Clear(); + _impl_.initializer_.Clear(); + _impl_.input_.Clear(); + _impl_.output_.Clear(); + _impl_.value_info_.Clear(); + _impl_.quantization_annotation_.Clear(); + _impl_.sparse_initializer_.Clear(); + _impl_.metadata_props_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.doc_string_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* GraphProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const GraphProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* GraphProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const GraphProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.GraphProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .onnx.NodeProto node = 1; + for (unsigned i = 0, n = static_cast( + this_._internal_node_size()); + i < n; i++) { + const auto& repfield = this_._internal_node().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 2; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // repeated .onnx.TensorProto initializer = 5; + for (unsigned i = 0, n = static_cast( + this_._internal_initializer_size()); + i < n; i++) { + const auto& repfield = this_._internal_initializer().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional string doc_string = 10; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_doc_string(); + target = stream->WriteStringMaybeAliased(10, _s, target); + } + + // repeated .onnx.ValueInfoProto input = 11; + for (unsigned i = 0, n = static_cast( + this_._internal_input_size()); + i < n; i++) { + const auto& repfield = this_._internal_input().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 11, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.ValueInfoProto output = 12; + for (unsigned i = 0, n = static_cast( + this_._internal_output_size()); + i < n; i++) { + const auto& repfield = this_._internal_output().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 12, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.ValueInfoProto value_info = 13; + for (unsigned i = 0, n = static_cast( + this_._internal_value_info_size()); + i < n; i++) { + const auto& repfield = this_._internal_value_info().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 13, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.TensorAnnotation quantization_annotation = 14; + for (unsigned i = 0, n = static_cast( + this_._internal_quantization_annotation_size()); + i < n; i++) { + const auto& repfield = this_._internal_quantization_annotation().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 14, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.SparseTensorProto sparse_initializer = 15; + for (unsigned i = 0, n = static_cast( + this_._internal_sparse_initializer_size()); + i < n; i++) { + const auto& repfield = this_._internal_sparse_initializer().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 15, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.StringStringEntryProto metadata_props = 16; + for (unsigned i = 0, n = static_cast( + this_._internal_metadata_props_size()); + i < n; i++) { + const auto& repfield = this_._internal_metadata_props().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 16, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.GraphProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t GraphProto::ByteSizeLong(const MessageLite& base) { + const GraphProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t GraphProto::ByteSizeLong() const { + const GraphProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.GraphProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .onnx.NodeProto node = 1; + { + total_size += 1UL * this_._internal_node_size(); + for (const auto& msg : this_._internal_node()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.TensorProto initializer = 5; + { + total_size += 1UL * this_._internal_initializer_size(); + for (const auto& msg : this_._internal_initializer()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.ValueInfoProto input = 11; + { + total_size += 1UL * this_._internal_input_size(); + for (const auto& msg : this_._internal_input()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.ValueInfoProto output = 12; + { + total_size += 1UL * this_._internal_output_size(); + for (const auto& msg : this_._internal_output()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.ValueInfoProto value_info = 13; + { + total_size += 1UL * this_._internal_value_info_size(); + for (const auto& msg : this_._internal_value_info()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.TensorAnnotation quantization_annotation = 14; + { + total_size += 1UL * this_._internal_quantization_annotation_size(); + for (const auto& msg : this_._internal_quantization_annotation()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.SparseTensorProto sparse_initializer = 15; + { + total_size += 1UL * this_._internal_sparse_initializer_size(); + for (const auto& msg : this_._internal_sparse_initializer()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.StringStringEntryProto metadata_props = 16; + { + total_size += 2UL * this_._internal_metadata_props_size(); + for (const auto& msg : this_._internal_metadata_props()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional string doc_string = 10; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_doc_string()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void GraphProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.GraphProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_node()->MergeFrom( + from._internal_node()); + _this->_internal_mutable_initializer()->MergeFrom( + from._internal_initializer()); + _this->_internal_mutable_input()->MergeFrom( + from._internal_input()); + _this->_internal_mutable_output()->MergeFrom( + from._internal_output()); + _this->_internal_mutable_value_info()->MergeFrom( + from._internal_value_info()); + _this->_internal_mutable_quantization_annotation()->MergeFrom( + from._internal_quantization_annotation()); + _this->_internal_mutable_sparse_initializer()->MergeFrom( + from._internal_sparse_initializer()); + _this->_internal_mutable_metadata_props()->MergeFrom( + from._internal_metadata_props()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_doc_string(from._internal_doc_string()); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void GraphProto::CopyFrom(const GraphProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.GraphProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void GraphProto::InternalSwap(GraphProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.node_.InternalSwap(&other->_impl_.node_); + _impl_.initializer_.InternalSwap(&other->_impl_.initializer_); + _impl_.input_.InternalSwap(&other->_impl_.input_); + _impl_.output_.InternalSwap(&other->_impl_.output_); + _impl_.value_info_.InternalSwap(&other->_impl_.value_info_); + _impl_.quantization_annotation_.InternalSwap(&other->_impl_.quantization_annotation_); + _impl_.sparse_initializer_.InternalSwap(&other->_impl_.sparse_initializer_); + _impl_.metadata_props_.InternalSwap(&other->_impl_.metadata_props_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.doc_string_, &other->_impl_.doc_string_, arena); +} + +// =================================================================== + +class TensorProto_Segment::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_._has_bits_); +}; + +TensorProto_Segment::TensorProto_Segment(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TensorProto.Segment) +} +TensorProto_Segment::TensorProto_Segment( + ::google::protobuf::Arena* arena, const TensorProto_Segment& from) + : TensorProto_Segment(arena) { + MergeFrom(from); +} +inline PROTOBUF_NDEBUG_INLINE TensorProto_Segment::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void TensorProto_Segment::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, begin_), + 0, + offsetof(Impl_, end_) - + offsetof(Impl_, begin_) + + sizeof(Impl_::end_)); +} +TensorProto_Segment::~TensorProto_Segment() { + // @@protoc_insertion_point(destructor:onnx.TensorProto.Segment) + SharedDtor(*this); +} +inline void TensorProto_Segment::SharedDtor(MessageLite& self) { + TensorProto_Segment& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* TensorProto_Segment::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TensorProto_Segment(arena); +} +constexpr auto TensorProto_Segment::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TensorProto_Segment), + alignof(TensorProto_Segment)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<25> TensorProto_Segment::_class_data_ = { + { + &_TensorProto_Segment_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TensorProto_Segment::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TensorProto_Segment::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TensorProto_Segment::ByteSizeLong, + &TensorProto_Segment::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_._cached_size_), + true, + }, + "onnx.TensorProto.Segment", +}; +const ::google::protobuf::internal::ClassData* TensorProto_Segment::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> TensorProto_Segment::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TensorProto_Segment>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional int64 end = 2; + {::_pbi::TcParser::FastV64S1, + {16, 1, 0, PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.end_)}}, + // optional int64 begin = 1; + {::_pbi::TcParser::FastV64S1, + {8, 0, 0, PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.begin_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional int64 begin = 1; + {PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.begin_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + // optional int64 end = 2; + {PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.end_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + }}, + // no aux_entries + {{ + }}, +}; + +PROTOBUF_NOINLINE void TensorProto_Segment::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TensorProto.Segment) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + ::memset(&_impl_.begin_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.end_) - + reinterpret_cast(&_impl_.begin_)) + sizeof(_impl_.end_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TensorProto_Segment::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TensorProto_Segment& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TensorProto_Segment::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TensorProto_Segment& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TensorProto.Segment) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int64 begin = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<1>( + stream, this_._internal_begin(), target); + } + + // optional int64 end = 2; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<2>( + stream, this_._internal_end(), target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TensorProto.Segment) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TensorProto_Segment::ByteSizeLong(const MessageLite& base) { + const TensorProto_Segment& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TensorProto_Segment::ByteSizeLong() const { + const TensorProto_Segment& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TensorProto.Segment) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional int64 begin = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_begin()); + } + // optional int64 end = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_end()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TensorProto_Segment::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TensorProto.Segment) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_impl_.begin_ = from._impl_.begin_; + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.end_ = from._impl_.end_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TensorProto_Segment::CopyFrom(const TensorProto_Segment& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TensorProto.Segment) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TensorProto_Segment::InternalSwap(TensorProto_Segment* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.end_) + + sizeof(TensorProto_Segment::_impl_.end_) + - PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.begin_)>( + reinterpret_cast(&_impl_.begin_), + reinterpret_cast(&other->_impl_.begin_)); +} + +// =================================================================== + +class TensorProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TensorProto, _impl_._has_bits_); +}; + +TensorProto::TensorProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TensorProto) +} +inline PROTOBUF_NDEBUG_INLINE TensorProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TensorProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + dims_{visibility, arena, from.dims_}, + float_data_{visibility, arena, from.float_data_}, + int32_data_{visibility, arena, from.int32_data_}, + _int32_data_cached_byte_size_{0}, + string_data_{visibility, arena, from.string_data_}, + int64_data_{visibility, arena, from.int64_data_}, + _int64_data_cached_byte_size_{0}, + double_data_{visibility, arena, from.double_data_}, + uint64_data_{visibility, arena, from.uint64_data_}, + _uint64_data_cached_byte_size_{0}, + external_data_{visibility, arena, from.external_data_}, + metadata_props_{visibility, arena, from.metadata_props_}, + name_(arena, from.name_), + raw_data_(arena, from.raw_data_), + doc_string_(arena, from.doc_string_) {} + +TensorProto::TensorProto( + ::google::protobuf::Arena* arena, + const TensorProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TensorProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.segment_ = (cached_has_bits & 0x00000008u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorProto_Segment>( + arena, *from._impl_.segment_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, data_type_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, data_type_), + offsetof(Impl_, data_location_) - + offsetof(Impl_, data_type_) + + sizeof(Impl_::data_location_)); + + // @@protoc_insertion_point(copy_constructor:onnx.TensorProto) +} +inline PROTOBUF_NDEBUG_INLINE TensorProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + dims_{visibility, arena}, + float_data_{visibility, arena}, + int32_data_{visibility, arena}, + _int32_data_cached_byte_size_{0}, + string_data_{visibility, arena}, + int64_data_{visibility, arena}, + _int64_data_cached_byte_size_{0}, + double_data_{visibility, arena}, + uint64_data_{visibility, arena}, + _uint64_data_cached_byte_size_{0}, + external_data_{visibility, arena}, + metadata_props_{visibility, arena}, + name_(arena), + raw_data_(arena), + doc_string_(arena) {} + +inline void TensorProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, segment_), + 0, + offsetof(Impl_, data_location_) - + offsetof(Impl_, segment_) + + sizeof(Impl_::data_location_)); +} +TensorProto::~TensorProto() { + // @@protoc_insertion_point(destructor:onnx.TensorProto) + SharedDtor(*this); +} +inline void TensorProto::SharedDtor(MessageLite& self) { + TensorProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.raw_data_.Destroy(); + this_._impl_.doc_string_.Destroy(); + delete this_._impl_.segment_; + this_._impl_.~Impl_(); +} + +inline void* TensorProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TensorProto(arena); +} +constexpr auto TensorProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.dims_) + + decltype(TensorProto::_impl_.dims_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.float_data_) + + decltype(TensorProto::_impl_.float_data_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.int32_data_) + + decltype(TensorProto::_impl_.int32_data_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.string_data_) + + decltype(TensorProto::_impl_.string_data_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.int64_data_) + + decltype(TensorProto::_impl_.int64_data_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.external_data_) + + decltype(TensorProto::_impl_.external_data_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.double_data_) + + decltype(TensorProto::_impl_.double_data_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.uint64_data_) + + decltype(TensorProto::_impl_.uint64_data_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.metadata_props_) + + decltype(TensorProto::_impl_.metadata_props_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(TensorProto), alignof(TensorProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TensorProto::PlacementNew_, + sizeof(TensorProto), + alignof(TensorProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<17> TensorProto::_class_data_ = { + { + &_TensorProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TensorProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TensorProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TensorProto::ByteSizeLong, + &TensorProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_._cached_size_), + true, + }, + "onnx.TensorProto", +}; +const ::google::protobuf::internal::ClassData* TensorProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 15, 4, 0, 2> TensorProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_._has_bits_), + 0, // no _extensions_ + 16, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294918144, // skipmap + offsetof(decltype(_table_), field_entries), + 15, // num_field_entries + 4, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TensorProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .onnx.StringStringEntryProto metadata_props = 16; + {::_pbi::TcParser::FastMtR2, + {386, 63, 2, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.metadata_props_)}}, + // repeated int64 dims = 1; + {::_pbi::TcParser::FastV64R1, + {8, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.dims_)}}, + // optional int32 data_type = 2; + {::_pbi::TcParser::FastV32S1, + {16, 4, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.data_type_)}}, + // optional .onnx.TensorProto.Segment segment = 3; + {::_pbi::TcParser::FastMtS1, + {26, 3, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.segment_)}}, + // repeated float float_data = 4 [packed = true]; + {::_pbi::TcParser::FastF32P1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.float_data_)}}, + // repeated int32 int32_data = 5 [packed = true]; + {::_pbi::TcParser::FastV32P1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.int32_data_)}}, + // repeated bytes string_data = 6; + {::_pbi::TcParser::FastBR1, + {50, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.string_data_)}}, + // repeated int64 int64_data = 7 [packed = true]; + {::_pbi::TcParser::FastV64P1, + {58, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.int64_data_)}}, + // optional string name = 8; + {::_pbi::TcParser::FastBS1, + {66, 0, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.name_)}}, + // optional bytes raw_data = 9; + {::_pbi::TcParser::FastBS1, + {74, 1, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.raw_data_)}}, + // repeated double double_data = 10 [packed = true]; + {::_pbi::TcParser::FastF64P1, + {82, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.double_data_)}}, + // repeated uint64 uint64_data = 11 [packed = true]; + {::_pbi::TcParser::FastV64P1, + {90, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.uint64_data_)}}, + // optional string doc_string = 12; + {::_pbi::TcParser::FastBS1, + {98, 2, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.doc_string_)}}, + // repeated .onnx.StringStringEntryProto external_data = 13; + {::_pbi::TcParser::FastMtR1, + {106, 63, 1, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.external_data_)}}, + // optional .onnx.TensorProto.DataLocation data_location = 14; + {::_pbi::TcParser::FastEr0S1, + {112, 5, 1, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.data_location_)}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated int64 dims = 1; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.dims_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kInt64)}, + // optional int32 data_type = 2; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.data_type_), _Internal::kHasBitsOffset + 4, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // optional .onnx.TensorProto.Segment segment = 3; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.segment_), _Internal::kHasBitsOffset + 3, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated float float_data = 4 [packed = true]; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.float_data_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedFloat)}, + // repeated int32 int32_data = 5 [packed = true]; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.int32_data_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt32)}, + // repeated bytes string_data = 6; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.string_data_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, + // repeated int64 int64_data = 7 [packed = true]; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.int64_data_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + // optional string name = 8; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional bytes raw_data = 9; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.raw_data_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated double double_data = 10 [packed = true]; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.double_data_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedDouble)}, + // repeated uint64 uint64_data = 11 [packed = true]; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.uint64_data_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // optional string doc_string = 12; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.doc_string_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.StringStringEntryProto external_data = 13; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.external_data_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional .onnx.TensorProto.DataLocation data_location = 14; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.data_location_), _Internal::kHasBitsOffset + 5, 3, + (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)}, + // repeated .onnx.StringStringEntryProto metadata_props = 16; + {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.metadata_props_), -1, 2, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TensorProto_Segment>()}, + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + {0, 2}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TensorProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TensorProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.dims_.Clear(); + _impl_.float_data_.Clear(); + _impl_.int32_data_.Clear(); + _impl_.string_data_.Clear(); + _impl_.int64_data_.Clear(); + _impl_.double_data_.Clear(); + _impl_.uint64_data_.Clear(); + _impl_.external_data_.Clear(); + _impl_.metadata_props_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.raw_data_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + _impl_.doc_string_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + ABSL_DCHECK(_impl_.segment_ != nullptr); + _impl_.segment_->Clear(); + } + } + if (cached_has_bits & 0x00000030u) { + ::memset(&_impl_.data_type_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.data_location_) - + reinterpret_cast(&_impl_.data_type_)) + sizeof(_impl_.data_location_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TensorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TensorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TensorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TensorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TensorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated int64 dims = 1; + for (int i = 0, n = this_._internal_dims_size(); i < n; ++i) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray( + 1, this_._internal_dims().Get(i), target); + } + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int32 data_type = 2; + if (cached_has_bits & 0x00000010u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<2>( + stream, this_._internal_data_type(), target); + } + + // optional .onnx.TensorProto.Segment segment = 3; + if (cached_has_bits & 0x00000008u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.segment_, this_._impl_.segment_->GetCachedSize(), target, + stream); + } + + // repeated float float_data = 4 [packed = true]; + if (this_._internal_float_data_size() > 0) { + target = stream->WriteFixedPacked(4, this_._internal_float_data(), target); + } + + // repeated int32 int32_data = 5 [packed = true]; + { + int byte_size = this_._impl_._int32_data_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 5, this_._internal_int32_data(), byte_size, target); + } + } + + // repeated bytes string_data = 6; + for (int i = 0, n = this_._internal_string_data_size(); i < n; ++i) { + const auto& s = this_._internal_string_data().Get(i); + target = stream->WriteBytes(6, s, target); + } + + // repeated int64 int64_data = 7 [packed = true]; + { + int byte_size = this_._impl_._int64_data_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 7, this_._internal_int64_data(), byte_size, target); + } + } + + // optional string name = 8; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + target = stream->WriteStringMaybeAliased(8, _s, target); + } + + // optional bytes raw_data = 9; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_raw_data(); + target = stream->WriteBytesMaybeAliased(9, _s, target); + } + + // repeated double double_data = 10 [packed = true]; + if (this_._internal_double_data_size() > 0) { + target = stream->WriteFixedPacked(10, this_._internal_double_data(), target); + } + + // repeated uint64 uint64_data = 11 [packed = true]; + { + int byte_size = this_._impl_._uint64_data_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 11, this_._internal_uint64_data(), byte_size, target); + } + } + + // optional string doc_string = 12; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_doc_string(); + target = stream->WriteStringMaybeAliased(12, _s, target); + } + + // repeated .onnx.StringStringEntryProto external_data = 13; + for (unsigned i = 0, n = static_cast( + this_._internal_external_data_size()); + i < n; i++) { + const auto& repfield = this_._internal_external_data().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 13, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional .onnx.TensorProto.DataLocation data_location = 14; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 14, this_._internal_data_location(), target); + } + + // repeated .onnx.StringStringEntryProto metadata_props = 16; + for (unsigned i = 0, n = static_cast( + this_._internal_metadata_props_size()); + i < n; i++) { + const auto& repfield = this_._internal_metadata_props().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 16, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TensorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TensorProto::ByteSizeLong(const MessageLite& base) { + const TensorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TensorProto::ByteSizeLong() const { + const TensorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TensorProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated int64 dims = 1; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this_._internal_dims()); + std::size_t tag_size = std::size_t{1} * + ::_pbi::FromIntSize(this_._internal_dims_size()); + total_size += tag_size + data_size; + } + // repeated float float_data = 4 [packed = true]; + { + std::size_t data_size = std::size_t{4} * + ::_pbi::FromIntSize(this_._internal_float_data_size()); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)); + total_size += tag_size + data_size; + } + // repeated int32 int32_data = 5 [packed = true]; + { + total_size += + ::_pbi::WireFormatLite::Int32SizeWithPackedTagSize( + this_._internal_int32_data(), 1, + this_._impl_._int32_data_cached_byte_size_); + } + // repeated bytes string_data = 6; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_string_data().size()); + for (int i = 0, n = this_._internal_string_data().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_string_data().Get(i)); + } + } + // repeated int64 int64_data = 7 [packed = true]; + { + total_size += + ::_pbi::WireFormatLite::Int64SizeWithPackedTagSize( + this_._internal_int64_data(), 1, + this_._impl_._int64_data_cached_byte_size_); + } + // repeated double double_data = 10 [packed = true]; + { + std::size_t data_size = std::size_t{8} * + ::_pbi::FromIntSize(this_._internal_double_data_size()); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)); + total_size += tag_size + data_size; + } + // repeated uint64 uint64_data = 11 [packed = true]; + { + total_size += + ::_pbi::WireFormatLite::UInt64SizeWithPackedTagSize( + this_._internal_uint64_data(), 1, + this_._impl_._uint64_data_cached_byte_size_); + } + // repeated .onnx.StringStringEntryProto external_data = 13; + { + total_size += 1UL * this_._internal_external_data_size(); + for (const auto& msg : this_._internal_external_data()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.StringStringEntryProto metadata_props = 16; + { + total_size += 2UL * this_._internal_metadata_props_size(); + for (const auto& msg : this_._internal_metadata_props()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional string name = 8; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional bytes raw_data = 9; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this_._internal_raw_data()); + } + // optional string doc_string = 12; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_doc_string()); + } + // optional .onnx.TensorProto.Segment segment = 3; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.segment_); + } + // optional int32 data_type = 2; + if (cached_has_bits & 0x00000010u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_data_type()); + } + // optional .onnx.TensorProto.DataLocation data_location = 14; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this_._internal_data_location()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TensorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TensorProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_dims()->MergeFrom(from._internal_dims()); + _this->_internal_mutable_float_data()->MergeFrom(from._internal_float_data()); + _this->_internal_mutable_int32_data()->MergeFrom(from._internal_int32_data()); + _this->_internal_mutable_string_data()->MergeFrom(from._internal_string_data()); + _this->_internal_mutable_int64_data()->MergeFrom(from._internal_int64_data()); + _this->_internal_mutable_double_data()->MergeFrom(from._internal_double_data()); + _this->_internal_mutable_uint64_data()->MergeFrom(from._internal_uint64_data()); + _this->_internal_mutable_external_data()->MergeFrom( + from._internal_external_data()); + _this->_internal_mutable_metadata_props()->MergeFrom( + from._internal_metadata_props()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_raw_data(from._internal_raw_data()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_set_doc_string(from._internal_doc_string()); + } + if (cached_has_bits & 0x00000008u) { + ABSL_DCHECK(from._impl_.segment_ != nullptr); + if (_this->_impl_.segment_ == nullptr) { + _this->_impl_.segment_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorProto_Segment>(arena, *from._impl_.segment_); + } else { + _this->_impl_.segment_->MergeFrom(*from._impl_.segment_); + } + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.data_type_ = from._impl_.data_type_; + } + if (cached_has_bits & 0x00000020u) { + _this->_impl_.data_location_ = from._impl_.data_location_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TensorProto::CopyFrom(const TensorProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TensorProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TensorProto::InternalSwap(TensorProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.dims_.InternalSwap(&other->_impl_.dims_); + _impl_.float_data_.InternalSwap(&other->_impl_.float_data_); + _impl_.int32_data_.InternalSwap(&other->_impl_.int32_data_); + _impl_.string_data_.InternalSwap(&other->_impl_.string_data_); + _impl_.int64_data_.InternalSwap(&other->_impl_.int64_data_); + _impl_.double_data_.InternalSwap(&other->_impl_.double_data_); + _impl_.uint64_data_.InternalSwap(&other->_impl_.uint64_data_); + _impl_.external_data_.InternalSwap(&other->_impl_.external_data_); + _impl_.metadata_props_.InternalSwap(&other->_impl_.metadata_props_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.raw_data_, &other->_impl_.raw_data_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.doc_string_, &other->_impl_.doc_string_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.data_location_) + + sizeof(TensorProto::_impl_.data_location_) + - PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.segment_)>( + reinterpret_cast(&_impl_.segment_), + reinterpret_cast(&other->_impl_.segment_)); +} + +// =================================================================== + +class SparseTensorProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_._has_bits_); +}; + +SparseTensorProto::SparseTensorProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.SparseTensorProto) +} +inline PROTOBUF_NDEBUG_INLINE SparseTensorProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::SparseTensorProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + dims_{visibility, arena, from.dims_} {} + +SparseTensorProto::SparseTensorProto( + ::google::protobuf::Arena* arena, + const SparseTensorProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SparseTensorProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.values_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorProto>( + arena, *from._impl_.values_) + : nullptr; + _impl_.indices_ = (cached_has_bits & 0x00000002u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorProto>( + arena, *from._impl_.indices_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:onnx.SparseTensorProto) +} +inline PROTOBUF_NDEBUG_INLINE SparseTensorProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + dims_{visibility, arena} {} + +inline void SparseTensorProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, values_), + 0, + offsetof(Impl_, indices_) - + offsetof(Impl_, values_) + + sizeof(Impl_::indices_)); +} +SparseTensorProto::~SparseTensorProto() { + // @@protoc_insertion_point(destructor:onnx.SparseTensorProto) + SharedDtor(*this); +} +inline void SparseTensorProto::SharedDtor(MessageLite& self) { + SparseTensorProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.values_; + delete this_._impl_.indices_; + this_._impl_.~Impl_(); +} + +inline void* SparseTensorProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) SparseTensorProto(arena); +} +constexpr auto SparseTensorProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.dims_) + + decltype(SparseTensorProto::_impl_.dims_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(SparseTensorProto), alignof(SparseTensorProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&SparseTensorProto::PlacementNew_, + sizeof(SparseTensorProto), + alignof(SparseTensorProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<23> SparseTensorProto::_class_data_ = { + { + &_SparseTensorProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &SparseTensorProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &SparseTensorProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &SparseTensorProto::ByteSizeLong, + &SparseTensorProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_._cached_size_), + true, + }, + "onnx.SparseTensorProto", +}; +const ::google::protobuf::internal::ClassData* SparseTensorProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 2, 0, 2> SparseTensorProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_._has_bits_), + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::SparseTensorProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // optional .onnx.TensorProto values = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.values_)}}, + // optional .onnx.TensorProto indices = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.indices_)}}, + // repeated int64 dims = 3; + {::_pbi::TcParser::FastV64R1, + {24, 63, 0, PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.dims_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional .onnx.TensorProto values = 1; + {PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.values_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional .onnx.TensorProto indices = 2; + {PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.indices_), _Internal::kHasBitsOffset + 1, 1, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated int64 dims = 3; + {PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.dims_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kInt64)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TensorProto>()}, + {::_pbi::TcParser::GetTable<::onnx::TensorProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void SparseTensorProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.SparseTensorProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.dims_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.values_ != nullptr); + _impl_.values_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(_impl_.indices_ != nullptr); + _impl_.indices_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* SparseTensorProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const SparseTensorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* SparseTensorProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const SparseTensorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.SparseTensorProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .onnx.TensorProto values = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.values_, this_._impl_.values_->GetCachedSize(), target, + stream); + } + + // optional .onnx.TensorProto indices = 2; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.indices_, this_._impl_.indices_->GetCachedSize(), target, + stream); + } + + // repeated int64 dims = 3; + for (int i = 0, n = this_._internal_dims_size(); i < n; ++i) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray( + 3, this_._internal_dims().Get(i), target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.SparseTensorProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t SparseTensorProto::ByteSizeLong(const MessageLite& base) { + const SparseTensorProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t SparseTensorProto::ByteSizeLong() const { + const SparseTensorProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.SparseTensorProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated int64 dims = 3; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this_._internal_dims()); + std::size_t tag_size = std::size_t{1} * + ::_pbi::FromIntSize(this_._internal_dims_size()); + total_size += tag_size + data_size; + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .onnx.TensorProto values = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.values_); + } + // optional .onnx.TensorProto indices = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.indices_); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void SparseTensorProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.SparseTensorProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_dims()->MergeFrom(from._internal_dims()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.values_ != nullptr); + if (_this->_impl_.values_ == nullptr) { + _this->_impl_.values_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorProto>(arena, *from._impl_.values_); + } else { + _this->_impl_.values_->MergeFrom(*from._impl_.values_); + } + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(from._impl_.indices_ != nullptr); + if (_this->_impl_.indices_ == nullptr) { + _this->_impl_.indices_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorProto>(arena, *from._impl_.indices_); + } else { + _this->_impl_.indices_->MergeFrom(*from._impl_.indices_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SparseTensorProto::CopyFrom(const SparseTensorProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.SparseTensorProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void SparseTensorProto::InternalSwap(SparseTensorProto* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.dims_.InternalSwap(&other->_impl_.dims_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.indices_) + + sizeof(SparseTensorProto::_impl_.indices_) + - PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.values_)>( + reinterpret_cast(&_impl_.values_), + reinterpret_cast(&other->_impl_.values_)); +} + +// =================================================================== + +class TensorShapeProto_Dimension::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dimension, _impl_._has_bits_); + static constexpr ::int32_t kOneofCaseOffset = + PROTOBUF_FIELD_OFFSET(::onnx::TensorShapeProto_Dimension, _impl_._oneof_case_); +}; + +TensorShapeProto_Dimension::TensorShapeProto_Dimension(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TensorShapeProto.Dimension) +} +inline PROTOBUF_NDEBUG_INLINE TensorShapeProto_Dimension::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TensorShapeProto_Dimension& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + denotation_(arena, from.denotation_), + value_{}, + _oneof_case_{from._oneof_case_[0]} {} + +TensorShapeProto_Dimension::TensorShapeProto_Dimension( + ::google::protobuf::Arena* arena, + const TensorShapeProto_Dimension& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TensorShapeProto_Dimension* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + switch (value_case()) { + case VALUE_NOT_SET: + break; + case kDimValue: + _impl_.value_.dim_value_ = from._impl_.value_.dim_value_; + break; + case kDimParam: + new (&_impl_.value_.dim_param_) decltype(_impl_.value_.dim_param_){arena, from._impl_.value_.dim_param_}; + break; + } + + // @@protoc_insertion_point(copy_constructor:onnx.TensorShapeProto.Dimension) +} +inline PROTOBUF_NDEBUG_INLINE TensorShapeProto_Dimension::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + denotation_(arena), + value_{}, + _oneof_case_{} {} + +inline void TensorShapeProto_Dimension::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +TensorShapeProto_Dimension::~TensorShapeProto_Dimension() { + // @@protoc_insertion_point(destructor:onnx.TensorShapeProto.Dimension) + SharedDtor(*this); +} +inline void TensorShapeProto_Dimension::SharedDtor(MessageLite& self) { + TensorShapeProto_Dimension& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.denotation_.Destroy(); + if (this_.has_value()) { + this_.clear_value(); + } + this_._impl_.~Impl_(); +} + +void TensorShapeProto_Dimension::clear_value() { +// @@protoc_insertion_point(one_of_clear_start:onnx.TensorShapeProto.Dimension) + ::google::protobuf::internal::TSanWrite(&_impl_); + switch (value_case()) { + case kDimValue: { + // No need to clear + break; + } + case kDimParam: { + _impl_.value_.dim_param_.Destroy(); + break; + } + case VALUE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = VALUE_NOT_SET; +} + + +inline void* TensorShapeProto_Dimension::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TensorShapeProto_Dimension(arena); +} +constexpr auto TensorShapeProto_Dimension::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(TensorShapeProto_Dimension), + alignof(TensorShapeProto_Dimension)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<32> TensorShapeProto_Dimension::_class_data_ = { + { + &_TensorShapeProto_Dimension_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TensorShapeProto_Dimension::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TensorShapeProto_Dimension::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TensorShapeProto_Dimension::ByteSizeLong, + &TensorShapeProto_Dimension::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dimension, _impl_._cached_size_), + true, + }, + "onnx.TensorShapeProto.Dimension", +}; +const ::google::protobuf::internal::ClassData* TensorShapeProto_Dimension::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 3, 0, 0, 2> TensorShapeProto_Dimension::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dimension, _impl_._has_bits_), + 0, // no _extensions_ + 3, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TensorShapeProto_Dimension>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional string denotation = 3; + {::_pbi::TcParser::FastBS1, + {26, 0, 0, PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dimension, _impl_.denotation_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // int64 dim_value = 1; + {PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dimension, _impl_.value_.dim_value_), _Internal::kOneofCaseOffset + 0, 0, + (0 | ::_fl::kFcOneof | ::_fl::kInt64)}, + // string dim_param = 2; + {PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dimension, _impl_.value_.dim_param_), _Internal::kOneofCaseOffset + 0, 0, + (0 | ::_fl::kFcOneof | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional string denotation = 3; + {PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dimension, _impl_.denotation_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + }}, +}; + +PROTOBUF_NOINLINE void TensorShapeProto_Dimension::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TensorShapeProto.Dimension) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.denotation_.ClearNonDefaultToEmpty(); + } + clear_value(); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TensorShapeProto_Dimension::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TensorShapeProto_Dimension& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TensorShapeProto_Dimension::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TensorShapeProto_Dimension& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TensorShapeProto.Dimension) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + switch (this_.value_case()) { + case kDimValue: { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<1>( + stream, this_._internal_dim_value(), target); + break; + } + case kDimParam: { + const std::string& _s = this_._internal_dim_param(); + target = stream->WriteStringMaybeAliased(2, _s, target); + break; + } + default: + break; + } + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string denotation = 3; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_denotation(); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TensorShapeProto.Dimension) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TensorShapeProto_Dimension::ByteSizeLong(const MessageLite& base) { + const TensorShapeProto_Dimension& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TensorShapeProto_Dimension::ByteSizeLong() const { + const TensorShapeProto_Dimension& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TensorShapeProto.Dimension) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + { + // optional string denotation = 3; + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_denotation()); + } + } + switch (this_.value_case()) { + // int64 dim_value = 1; + case kDimValue: { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_dim_value()); + break; + } + // string dim_param = 2; + case kDimParam: { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_dim_param()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TensorShapeProto_Dimension::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TensorShapeProto.Dimension) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_denotation(from._internal_denotation()); + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) { + const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0]; + const bool oneof_needs_init = oneof_to_case != oneof_from_case; + if (oneof_needs_init) { + if (oneof_to_case != 0) { + _this->clear_value(); + } + _this->_impl_._oneof_case_[0] = oneof_from_case; + } + + switch (oneof_from_case) { + case kDimValue: { + _this->_impl_.value_.dim_value_ = from._impl_.value_.dim_value_; + break; + } + case kDimParam: { + if (oneof_needs_init) { + _this->_impl_.value_.dim_param_.InitDefault(); + } + _this->_impl_.value_.dim_param_.Set(from._internal_dim_param(), arena); + break; + } + case VALUE_NOT_SET: + break; + } + } + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TensorShapeProto_Dimension::CopyFrom(const TensorShapeProto_Dimension& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TensorShapeProto.Dimension) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TensorShapeProto_Dimension::InternalSwap(TensorShapeProto_Dimension* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.denotation_, &other->_impl_.denotation_, arena); + swap(_impl_.value_, other->_impl_.value_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); +} + +// =================================================================== + +class TensorShapeProto::_Internal { + public: +}; + +TensorShapeProto::TensorShapeProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TensorShapeProto) +} +inline PROTOBUF_NDEBUG_INLINE TensorShapeProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TensorShapeProto& from_msg) + : dim_{visibility, arena, from.dim_}, + _cached_size_{0} {} + +TensorShapeProto::TensorShapeProto( + ::google::protobuf::Arena* arena, + const TensorShapeProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TensorShapeProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:onnx.TensorShapeProto) +} +inline PROTOBUF_NDEBUG_INLINE TensorShapeProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : dim_{visibility, arena}, + _cached_size_{0} {} + +inline void TensorShapeProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +TensorShapeProto::~TensorShapeProto() { + // @@protoc_insertion_point(destructor:onnx.TensorShapeProto) + SharedDtor(*this); +} +inline void TensorShapeProto::SharedDtor(MessageLite& self) { + TensorShapeProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.~Impl_(); +} + +inline void* TensorShapeProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TensorShapeProto(arena); +} +constexpr auto TensorShapeProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_.dim_) + + decltype(TensorShapeProto::_impl_.dim_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::ZeroInit( + sizeof(TensorShapeProto), alignof(TensorShapeProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&TensorShapeProto::PlacementNew_, + sizeof(TensorShapeProto), + alignof(TensorShapeProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<22> TensorShapeProto::_class_data_ = { + { + &_TensorShapeProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TensorShapeProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TensorShapeProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TensorShapeProto::ByteSizeLong, + &TensorShapeProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_._cached_size_), + true, + }, + "onnx.TensorShapeProto", +}; +const ::google::protobuf::internal::ClassData* TensorShapeProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> TensorShapeProto::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TensorShapeProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .onnx.TensorShapeProto.Dimension dim = 1; + {::_pbi::TcParser::FastMtR1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_.dim_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .onnx.TensorShapeProto.Dimension dim = 1; + {PROTOBUF_FIELD_OFFSET(TensorShapeProto, _impl_.dim_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TensorShapeProto_Dimension>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TensorShapeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TensorShapeProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.dim_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TensorShapeProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TensorShapeProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TensorShapeProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TensorShapeProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TensorShapeProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .onnx.TensorShapeProto.Dimension dim = 1; + for (unsigned i = 0, n = static_cast( + this_._internal_dim_size()); + i < n; i++) { + const auto& repfield = this_._internal_dim().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TensorShapeProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TensorShapeProto::ByteSizeLong(const MessageLite& base) { + const TensorShapeProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TensorShapeProto::ByteSizeLong() const { + const TensorShapeProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TensorShapeProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated .onnx.TensorShapeProto.Dimension dim = 1; + { + total_size += 1UL * this_._internal_dim_size(); + for (const auto& msg : this_._internal_dim()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TensorShapeProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TensorShapeProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_dim()->MergeFrom( + from._internal_dim()); + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TensorShapeProto::CopyFrom(const TensorShapeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TensorShapeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TensorShapeProto::InternalSwap(TensorShapeProto* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.dim_.InternalSwap(&other->_impl_.dim_); +} + +// =================================================================== + +class TypeProto_Tensor::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_._has_bits_); +}; + +TypeProto_Tensor::TypeProto_Tensor(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TypeProto.Tensor) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_Tensor::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TypeProto_Tensor& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +TypeProto_Tensor::TypeProto_Tensor( + ::google::protobuf::Arena* arena, + const TypeProto_Tensor& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TypeProto_Tensor* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.shape_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorShapeProto>( + arena, *from._impl_.shape_) + : nullptr; + _impl_.elem_type_ = from._impl_.elem_type_; + + // @@protoc_insertion_point(copy_constructor:onnx.TypeProto.Tensor) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_Tensor::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void TypeProto_Tensor::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, shape_), + 0, + offsetof(Impl_, elem_type_) - + offsetof(Impl_, shape_) + + sizeof(Impl_::elem_type_)); +} +TypeProto_Tensor::~TypeProto_Tensor() { + // @@protoc_insertion_point(destructor:onnx.TypeProto.Tensor) + SharedDtor(*this); +} +inline void TypeProto_Tensor::SharedDtor(MessageLite& self) { + TypeProto_Tensor& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.shape_; + this_._impl_.~Impl_(); +} + +inline void* TypeProto_Tensor::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TypeProto_Tensor(arena); +} +constexpr auto TypeProto_Tensor::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeProto_Tensor), + alignof(TypeProto_Tensor)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<22> TypeProto_Tensor::_class_data_ = { + { + &_TypeProto_Tensor_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TypeProto_Tensor::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TypeProto_Tensor::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TypeProto_Tensor::ByteSizeLong, + &TypeProto_Tensor::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_._cached_size_), + true, + }, + "onnx.TypeProto.Tensor", +}; +const ::google::protobuf::internal::ClassData* TypeProto_Tensor::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> TypeProto_Tensor::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TypeProto_Tensor>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional .onnx.TensorShapeProto shape = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.shape_)}}, + // optional int32 elem_type = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.elem_type_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional int32 elem_type = 1; + {PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.elem_type_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // optional .onnx.TensorShapeProto shape = 2; + {PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.shape_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TensorShapeProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TypeProto_Tensor::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TypeProto.Tensor) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.shape_ != nullptr); + _impl_.shape_->Clear(); + } + _impl_.elem_type_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TypeProto_Tensor::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TypeProto_Tensor& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TypeProto_Tensor::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TypeProto_Tensor& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TypeProto.Tensor) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int32 elem_type = 1; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( + stream, this_._internal_elem_type(), target); + } + + // optional .onnx.TensorShapeProto shape = 2; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.shape_, this_._impl_.shape_->GetCachedSize(), target, + stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TypeProto.Tensor) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TypeProto_Tensor::ByteSizeLong(const MessageLite& base) { + const TypeProto_Tensor& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TypeProto_Tensor::ByteSizeLong() const { + const TypeProto_Tensor& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TypeProto.Tensor) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .onnx.TensorShapeProto shape = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.shape_); + } + // optional int32 elem_type = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_elem_type()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TypeProto_Tensor::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TypeProto.Tensor) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.shape_ != nullptr); + if (_this->_impl_.shape_ == nullptr) { + _this->_impl_.shape_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorShapeProto>(arena, *from._impl_.shape_); + } else { + _this->_impl_.shape_->MergeFrom(*from._impl_.shape_); + } + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.elem_type_ = from._impl_.elem_type_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto_Tensor::CopyFrom(const TypeProto_Tensor& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TypeProto.Tensor) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TypeProto_Tensor::InternalSwap(TypeProto_Tensor* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.elem_type_) + + sizeof(TypeProto_Tensor::_impl_.elem_type_) + - PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.shape_)>( + reinterpret_cast(&_impl_.shape_), + reinterpret_cast(&other->_impl_.shape_)); +} + +// =================================================================== + +class TypeProto_Sequence::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TypeProto_Sequence, _impl_._has_bits_); +}; + +TypeProto_Sequence::TypeProto_Sequence(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TypeProto.Sequence) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_Sequence::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TypeProto_Sequence& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +TypeProto_Sequence::TypeProto_Sequence( + ::google::protobuf::Arena* arena, + const TypeProto_Sequence& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TypeProto_Sequence* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.elem_type_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>( + arena, *from._impl_.elem_type_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:onnx.TypeProto.Sequence) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_Sequence::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void TypeProto_Sequence::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.elem_type_ = {}; +} +TypeProto_Sequence::~TypeProto_Sequence() { + // @@protoc_insertion_point(destructor:onnx.TypeProto.Sequence) + SharedDtor(*this); +} +inline void TypeProto_Sequence::SharedDtor(MessageLite& self) { + TypeProto_Sequence& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.elem_type_; + this_._impl_.~Impl_(); +} + +inline void* TypeProto_Sequence::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TypeProto_Sequence(arena); +} +constexpr auto TypeProto_Sequence::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeProto_Sequence), + alignof(TypeProto_Sequence)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<24> TypeProto_Sequence::_class_data_ = { + { + &_TypeProto_Sequence_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TypeProto_Sequence::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TypeProto_Sequence::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TypeProto_Sequence::ByteSizeLong, + &TypeProto_Sequence::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TypeProto_Sequence, _impl_._cached_size_), + true, + }, + "onnx.TypeProto.Sequence", +}; +const ::google::protobuf::internal::ClassData* TypeProto_Sequence::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> TypeProto_Sequence::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TypeProto_Sequence, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TypeProto_Sequence>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional .onnx.TypeProto elem_type = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Sequence, _impl_.elem_type_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional .onnx.TypeProto elem_type = 1; + {PROTOBUF_FIELD_OFFSET(TypeProto_Sequence, _impl_.elem_type_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TypeProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TypeProto_Sequence::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TypeProto.Sequence) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.elem_type_ != nullptr); + _impl_.elem_type_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TypeProto_Sequence::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TypeProto_Sequence& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TypeProto_Sequence::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TypeProto_Sequence& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TypeProto.Sequence) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .onnx.TypeProto elem_type = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.elem_type_, this_._impl_.elem_type_->GetCachedSize(), target, + stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TypeProto.Sequence) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TypeProto_Sequence::ByteSizeLong(const MessageLite& base) { + const TypeProto_Sequence& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TypeProto_Sequence::ByteSizeLong() const { + const TypeProto_Sequence& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TypeProto.Sequence) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + { + // optional .onnx.TypeProto elem_type = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.elem_type_); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TypeProto_Sequence::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TypeProto.Sequence) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.elem_type_ != nullptr); + if (_this->_impl_.elem_type_ == nullptr) { + _this->_impl_.elem_type_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>(arena, *from._impl_.elem_type_); + } else { + _this->_impl_.elem_type_->MergeFrom(*from._impl_.elem_type_); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto_Sequence::CopyFrom(const TypeProto_Sequence& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TypeProto.Sequence) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TypeProto_Sequence::InternalSwap(TypeProto_Sequence* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(_impl_.elem_type_, other->_impl_.elem_type_); +} + +// =================================================================== + +class TypeProto_Map::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_._has_bits_); +}; + +TypeProto_Map::TypeProto_Map(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TypeProto.Map) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_Map::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TypeProto_Map& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +TypeProto_Map::TypeProto_Map( + ::google::protobuf::Arena* arena, + const TypeProto_Map& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TypeProto_Map* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.value_type_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>( + arena, *from._impl_.value_type_) + : nullptr; + _impl_.key_type_ = from._impl_.key_type_; + + // @@protoc_insertion_point(copy_constructor:onnx.TypeProto.Map) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_Map::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void TypeProto_Map::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, value_type_), + 0, + offsetof(Impl_, key_type_) - + offsetof(Impl_, value_type_) + + sizeof(Impl_::key_type_)); +} +TypeProto_Map::~TypeProto_Map() { + // @@protoc_insertion_point(destructor:onnx.TypeProto.Map) + SharedDtor(*this); +} +inline void TypeProto_Map::SharedDtor(MessageLite& self) { + TypeProto_Map& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.value_type_; + this_._impl_.~Impl_(); +} + +inline void* TypeProto_Map::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TypeProto_Map(arena); +} +constexpr auto TypeProto_Map::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeProto_Map), + alignof(TypeProto_Map)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<19> TypeProto_Map::_class_data_ = { + { + &_TypeProto_Map_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TypeProto_Map::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TypeProto_Map::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TypeProto_Map::ByteSizeLong, + &TypeProto_Map::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_._cached_size_), + true, + }, + "onnx.TypeProto.Map", +}; +const ::google::protobuf::internal::ClassData* TypeProto_Map::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> TypeProto_Map::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TypeProto_Map>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional .onnx.TypeProto value_type = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_.value_type_)}}, + // optional int32 key_type = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_.key_type_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional int32 key_type = 1; + {PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_.key_type_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // optional .onnx.TypeProto value_type = 2; + {PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_.value_type_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TypeProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TypeProto_Map::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TypeProto.Map) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.value_type_ != nullptr); + _impl_.value_type_->Clear(); + } + _impl_.key_type_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TypeProto_Map::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TypeProto_Map& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TypeProto_Map::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TypeProto_Map& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TypeProto.Map) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int32 key_type = 1; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( + stream, this_._internal_key_type(), target); + } + + // optional .onnx.TypeProto value_type = 2; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.value_type_, this_._impl_.value_type_->GetCachedSize(), target, + stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TypeProto.Map) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TypeProto_Map::ByteSizeLong(const MessageLite& base) { + const TypeProto_Map& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TypeProto_Map::ByteSizeLong() const { + const TypeProto_Map& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TypeProto.Map) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .onnx.TypeProto value_type = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.value_type_); + } + // optional int32 key_type = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_key_type()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TypeProto_Map::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TypeProto.Map) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.value_type_ != nullptr); + if (_this->_impl_.value_type_ == nullptr) { + _this->_impl_.value_type_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>(arena, *from._impl_.value_type_); + } else { + _this->_impl_.value_type_->MergeFrom(*from._impl_.value_type_); + } + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.key_type_ = from._impl_.key_type_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto_Map::CopyFrom(const TypeProto_Map& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TypeProto.Map) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TypeProto_Map::InternalSwap(TypeProto_Map* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_.key_type_) + + sizeof(TypeProto_Map::_impl_.key_type_) + - PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_.value_type_)>( + reinterpret_cast(&_impl_.value_type_), + reinterpret_cast(&other->_impl_.value_type_)); +} + +// =================================================================== + +class TypeProto_Optional::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TypeProto_Optional, _impl_._has_bits_); +}; + +TypeProto_Optional::TypeProto_Optional(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TypeProto.Optional) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_Optional::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TypeProto_Optional& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +TypeProto_Optional::TypeProto_Optional( + ::google::protobuf::Arena* arena, + const TypeProto_Optional& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TypeProto_Optional* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.elem_type_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>( + arena, *from._impl_.elem_type_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:onnx.TypeProto.Optional) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_Optional::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void TypeProto_Optional::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.elem_type_ = {}; +} +TypeProto_Optional::~TypeProto_Optional() { + // @@protoc_insertion_point(destructor:onnx.TypeProto.Optional) + SharedDtor(*this); +} +inline void TypeProto_Optional::SharedDtor(MessageLite& self) { + TypeProto_Optional& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.elem_type_; + this_._impl_.~Impl_(); +} + +inline void* TypeProto_Optional::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TypeProto_Optional(arena); +} +constexpr auto TypeProto_Optional::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeProto_Optional), + alignof(TypeProto_Optional)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<24> TypeProto_Optional::_class_data_ = { + { + &_TypeProto_Optional_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TypeProto_Optional::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TypeProto_Optional::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TypeProto_Optional::ByteSizeLong, + &TypeProto_Optional::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TypeProto_Optional, _impl_._cached_size_), + true, + }, + "onnx.TypeProto.Optional", +}; +const ::google::protobuf::internal::ClassData* TypeProto_Optional::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> TypeProto_Optional::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TypeProto_Optional, _impl_._has_bits_), + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TypeProto_Optional>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional .onnx.TypeProto elem_type = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Optional, _impl_.elem_type_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional .onnx.TypeProto elem_type = 1; + {PROTOBUF_FIELD_OFFSET(TypeProto_Optional, _impl_.elem_type_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TypeProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TypeProto_Optional::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TypeProto.Optional) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.elem_type_ != nullptr); + _impl_.elem_type_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TypeProto_Optional::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TypeProto_Optional& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TypeProto_Optional::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TypeProto_Optional& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TypeProto.Optional) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional .onnx.TypeProto elem_type = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.elem_type_, this_._impl_.elem_type_->GetCachedSize(), target, + stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TypeProto.Optional) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TypeProto_Optional::ByteSizeLong(const MessageLite& base) { + const TypeProto_Optional& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TypeProto_Optional::ByteSizeLong() const { + const TypeProto_Optional& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TypeProto.Optional) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + { + // optional .onnx.TypeProto elem_type = 1; + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.elem_type_); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TypeProto_Optional::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TypeProto.Optional) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.elem_type_ != nullptr); + if (_this->_impl_.elem_type_ == nullptr) { + _this->_impl_.elem_type_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>(arena, *from._impl_.elem_type_); + } else { + _this->_impl_.elem_type_->MergeFrom(*from._impl_.elem_type_); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto_Optional::CopyFrom(const TypeProto_Optional& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TypeProto.Optional) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TypeProto_Optional::InternalSwap(TypeProto_Optional* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + swap(_impl_.elem_type_, other->_impl_.elem_type_); +} + +// =================================================================== + +class TypeProto_SparseTensor::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_._has_bits_); +}; + +TypeProto_SparseTensor::TypeProto_SparseTensor(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TypeProto.SparseTensor) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_SparseTensor::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TypeProto_SparseTensor& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +TypeProto_SparseTensor::TypeProto_SparseTensor( + ::google::protobuf::Arena* arena, + const TypeProto_SparseTensor& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TypeProto_SparseTensor* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.shape_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorShapeProto>( + arena, *from._impl_.shape_) + : nullptr; + _impl_.elem_type_ = from._impl_.elem_type_; + + // @@protoc_insertion_point(copy_constructor:onnx.TypeProto.SparseTensor) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto_SparseTensor::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void TypeProto_SparseTensor::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, shape_), + 0, + offsetof(Impl_, elem_type_) - + offsetof(Impl_, shape_) + + sizeof(Impl_::elem_type_)); +} +TypeProto_SparseTensor::~TypeProto_SparseTensor() { + // @@protoc_insertion_point(destructor:onnx.TypeProto.SparseTensor) + SharedDtor(*this); +} +inline void TypeProto_SparseTensor::SharedDtor(MessageLite& self) { + TypeProto_SparseTensor& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.shape_; + this_._impl_.~Impl_(); +} + +inline void* TypeProto_SparseTensor::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TypeProto_SparseTensor(arena); +} +constexpr auto TypeProto_SparseTensor::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(TypeProto_SparseTensor), + alignof(TypeProto_SparseTensor)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<28> TypeProto_SparseTensor::_class_data_ = { + { + &_TypeProto_SparseTensor_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TypeProto_SparseTensor::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TypeProto_SparseTensor::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TypeProto_SparseTensor::ByteSizeLong, + &TypeProto_SparseTensor::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_._cached_size_), + true, + }, + "onnx.TypeProto.SparseTensor", +}; +const ::google::protobuf::internal::ClassData* TypeProto_SparseTensor::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> TypeProto_SparseTensor::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TypeProto_SparseTensor>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional .onnx.TensorShapeProto shape = 2; + {::_pbi::TcParser::FastMtS1, + {18, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_.shape_)}}, + // optional int32 elem_type = 1; + {::_pbi::TcParser::FastV32S1, + {8, 1, 0, PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_.elem_type_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional int32 elem_type = 1; + {PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_.elem_type_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt32)}, + // optional .onnx.TensorShapeProto shape = 2; + {PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_.shape_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TensorShapeProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TypeProto_SparseTensor::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TypeProto.SparseTensor) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.shape_ != nullptr); + _impl_.shape_->Clear(); + } + _impl_.elem_type_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TypeProto_SparseTensor::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TypeProto_SparseTensor& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TypeProto_SparseTensor::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TypeProto_SparseTensor& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TypeProto.SparseTensor) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional int32 elem_type = 1; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32ToArrayWithField<1>( + stream, this_._internal_elem_type(), target); + } + + // optional .onnx.TensorShapeProto shape = 2; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.shape_, this_._impl_.shape_->GetCachedSize(), target, + stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TypeProto.SparseTensor) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TypeProto_SparseTensor::ByteSizeLong(const MessageLite& base) { + const TypeProto_SparseTensor& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TypeProto_SparseTensor::ByteSizeLong() const { + const TypeProto_SparseTensor& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TypeProto.SparseTensor) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .onnx.TensorShapeProto shape = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.shape_); + } + // optional int32 elem_type = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( + this_._internal_elem_type()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TypeProto_SparseTensor::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TypeProto.SparseTensor) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.shape_ != nullptr); + if (_this->_impl_.shape_ == nullptr) { + _this->_impl_.shape_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorShapeProto>(arena, *from._impl_.shape_); + } else { + _this->_impl_.shape_->MergeFrom(*from._impl_.shape_); + } + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.elem_type_ = from._impl_.elem_type_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto_SparseTensor::CopyFrom(const TypeProto_SparseTensor& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TypeProto.SparseTensor) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TypeProto_SparseTensor::InternalSwap(TypeProto_SparseTensor* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_.elem_type_) + + sizeof(TypeProto_SparseTensor::_impl_.elem_type_) + - PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_.shape_)>( + reinterpret_cast(&_impl_.shape_), + reinterpret_cast(&other->_impl_.shape_)); +} + +// =================================================================== + +class TypeProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(TypeProto, _impl_._has_bits_); + static constexpr ::int32_t kOneofCaseOffset = + PROTOBUF_FIELD_OFFSET(::onnx::TypeProto, _impl_._oneof_case_); +}; + +void TypeProto::set_allocated_tensor_type(::onnx::TypeProto_Tensor* tensor_type) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_value(); + if (tensor_type) { + ::google::protobuf::Arena* submessage_arena = tensor_type->GetArena(); + if (message_arena != submessage_arena) { + tensor_type = ::google::protobuf::internal::GetOwnedMessage(message_arena, tensor_type, submessage_arena); + } + set_has_tensor_type(); + _impl_.value_.tensor_type_ = tensor_type; + } + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.tensor_type) +} +void TypeProto::set_allocated_sequence_type(::onnx::TypeProto_Sequence* sequence_type) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_value(); + if (sequence_type) { + ::google::protobuf::Arena* submessage_arena = sequence_type->GetArena(); + if (message_arena != submessage_arena) { + sequence_type = ::google::protobuf::internal::GetOwnedMessage(message_arena, sequence_type, submessage_arena); + } + set_has_sequence_type(); + _impl_.value_.sequence_type_ = sequence_type; + } + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.sequence_type) +} +void TypeProto::set_allocated_map_type(::onnx::TypeProto_Map* map_type) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_value(); + if (map_type) { + ::google::protobuf::Arena* submessage_arena = map_type->GetArena(); + if (message_arena != submessage_arena) { + map_type = ::google::protobuf::internal::GetOwnedMessage(message_arena, map_type, submessage_arena); + } + set_has_map_type(); + _impl_.value_.map_type_ = map_type; + } + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.map_type) +} +void TypeProto::set_allocated_optional_type(::onnx::TypeProto_Optional* optional_type) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_value(); + if (optional_type) { + ::google::protobuf::Arena* submessage_arena = optional_type->GetArena(); + if (message_arena != submessage_arena) { + optional_type = ::google::protobuf::internal::GetOwnedMessage(message_arena, optional_type, submessage_arena); + } + set_has_optional_type(); + _impl_.value_.optional_type_ = optional_type; + } + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.optional_type) +} +void TypeProto::set_allocated_sparse_tensor_type(::onnx::TypeProto_SparseTensor* sparse_tensor_type) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_value(); + if (sparse_tensor_type) { + ::google::protobuf::Arena* submessage_arena = sparse_tensor_type->GetArena(); + if (message_arena != submessage_arena) { + sparse_tensor_type = ::google::protobuf::internal::GetOwnedMessage(message_arena, sparse_tensor_type, submessage_arena); + } + set_has_sparse_tensor_type(); + _impl_.value_.sparse_tensor_type_ = sparse_tensor_type; + } + // @@protoc_insertion_point(field_set_allocated:onnx.TypeProto.sparse_tensor_type) +} +TypeProto::TypeProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.TypeProto) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::TypeProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + denotation_(arena, from.denotation_), + value_{}, + _oneof_case_{from._oneof_case_[0]} {} + +TypeProto::TypeProto( + ::google::protobuf::Arena* arena, + const TypeProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + TypeProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + switch (value_case()) { + case VALUE_NOT_SET: + break; + case kTensorType: + _impl_.value_.tensor_type_ = ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_Tensor>(arena, *from._impl_.value_.tensor_type_); + break; + case kSequenceType: + _impl_.value_.sequence_type_ = ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_Sequence>(arena, *from._impl_.value_.sequence_type_); + break; + case kMapType: + _impl_.value_.map_type_ = ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_Map>(arena, *from._impl_.value_.map_type_); + break; + case kOptionalType: + _impl_.value_.optional_type_ = ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_Optional>(arena, *from._impl_.value_.optional_type_); + break; + case kSparseTensorType: + _impl_.value_.sparse_tensor_type_ = ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_SparseTensor>(arena, *from._impl_.value_.sparse_tensor_type_); + break; + } + + // @@protoc_insertion_point(copy_constructor:onnx.TypeProto) +} +inline PROTOBUF_NDEBUG_INLINE TypeProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + denotation_(arena), + value_{}, + _oneof_case_{} {} + +inline void TypeProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +TypeProto::~TypeProto() { + // @@protoc_insertion_point(destructor:onnx.TypeProto) + SharedDtor(*this); +} +inline void TypeProto::SharedDtor(MessageLite& self) { + TypeProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.denotation_.Destroy(); + if (this_.has_value()) { + this_.clear_value(); + } + this_._impl_.~Impl_(); +} + +void TypeProto::clear_value() { +// @@protoc_insertion_point(one_of_clear_start:onnx.TypeProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + switch (value_case()) { + case kTensorType: { + if (GetArena() == nullptr) { + delete _impl_.value_.tensor_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.tensor_type_ != nullptr) { + _impl_.value_.tensor_type_->Clear(); + } + } + break; + } + case kSequenceType: { + if (GetArena() == nullptr) { + delete _impl_.value_.sequence_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.sequence_type_ != nullptr) { + _impl_.value_.sequence_type_->Clear(); + } + } + break; + } + case kMapType: { + if (GetArena() == nullptr) { + delete _impl_.value_.map_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.map_type_ != nullptr) { + _impl_.value_.map_type_->Clear(); + } + } + break; + } + case kOptionalType: { + if (GetArena() == nullptr) { + delete _impl_.value_.optional_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.optional_type_ != nullptr) { + _impl_.value_.optional_type_->Clear(); + } + } + break; + } + case kSparseTensorType: { + if (GetArena() == nullptr) { + delete _impl_.value_.sparse_tensor_type_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + if (_impl_.value_.sparse_tensor_type_ != nullptr) { + _impl_.value_.sparse_tensor_type_->Clear(); + } + } + break; + } + case VALUE_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = VALUE_NOT_SET; +} + + +inline void* TypeProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) TypeProto(arena); +} +constexpr auto TypeProto::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(TypeProto), + alignof(TypeProto)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<15> TypeProto::_class_data_ = { + { + &_TypeProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &TypeProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &TypeProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &TypeProto::ByteSizeLong, + &TypeProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(TypeProto, _impl_._cached_size_), + true, + }, + "onnx.TypeProto", +}; +const ::google::protobuf::internal::ClassData* TypeProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 6, 5, 0, 2> TypeProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(TypeProto, _impl_._has_bits_), + 0, // no _extensions_ + 9, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294966854, // skipmap + offsetof(decltype(_table_), field_entries), + 6, // num_field_entries + 5, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::TypeProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional string denotation = 6; + {::_pbi::TcParser::FastBS1, + {50, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto, _impl_.denotation_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .onnx.TypeProto.Tensor tensor_type = 1; + {PROTOBUF_FIELD_OFFSET(TypeProto, _impl_.value_.tensor_type_), _Internal::kOneofCaseOffset + 0, 0, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .onnx.TypeProto.Sequence sequence_type = 4; + {PROTOBUF_FIELD_OFFSET(TypeProto, _impl_.value_.sequence_type_), _Internal::kOneofCaseOffset + 0, 1, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .onnx.TypeProto.Map map_type = 5; + {PROTOBUF_FIELD_OFFSET(TypeProto, _impl_.value_.map_type_), _Internal::kOneofCaseOffset + 0, 2, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string denotation = 6; + {PROTOBUF_FIELD_OFFSET(TypeProto, _impl_.denotation_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // .onnx.TypeProto.SparseTensor sparse_tensor_type = 8; + {PROTOBUF_FIELD_OFFSET(TypeProto, _impl_.value_.sparse_tensor_type_), _Internal::kOneofCaseOffset + 0, 3, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .onnx.TypeProto.Optional optional_type = 9; + {PROTOBUF_FIELD_OFFSET(TypeProto, _impl_.value_.optional_type_), _Internal::kOneofCaseOffset + 0, 4, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::TypeProto_Tensor>()}, + {::_pbi::TcParser::GetTable<::onnx::TypeProto_Sequence>()}, + {::_pbi::TcParser::GetTable<::onnx::TypeProto_Map>()}, + {::_pbi::TcParser::GetTable<::onnx::TypeProto_SparseTensor>()}, + {::_pbi::TcParser::GetTable<::onnx::TypeProto_Optional>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void TypeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.TypeProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.denotation_.ClearNonDefaultToEmpty(); + } + clear_value(); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* TypeProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const TypeProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* TypeProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const TypeProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.TypeProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + switch (this_.value_case()) { + case kTensorType: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.value_.tensor_type_, this_._impl_.value_.tensor_type_->GetCachedSize(), target, + stream); + break; + } + case kSequenceType: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *this_._impl_.value_.sequence_type_, this_._impl_.value_.sequence_type_->GetCachedSize(), target, + stream); + break; + } + case kMapType: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 5, *this_._impl_.value_.map_type_, this_._impl_.value_.map_type_->GetCachedSize(), target, + stream); + break; + } + default: + break; + } + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string denotation = 6; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_denotation(); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + + switch (this_.value_case()) { + case kSparseTensorType: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 8, *this_._impl_.value_.sparse_tensor_type_, this_._impl_.value_.sparse_tensor_type_->GetCachedSize(), target, + stream); + break; + } + case kOptionalType: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, *this_._impl_.value_.optional_type_, this_._impl_.value_.optional_type_->GetCachedSize(), target, + stream); + break; + } + default: + break; + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.TypeProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t TypeProto::ByteSizeLong(const MessageLite& base) { + const TypeProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t TypeProto::ByteSizeLong() const { + const TypeProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.TypeProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + { + // optional string denotation = 6; + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_denotation()); + } + } + switch (this_.value_case()) { + // .onnx.TypeProto.Tensor tensor_type = 1; + case kTensorType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.value_.tensor_type_); + break; + } + // .onnx.TypeProto.Sequence sequence_type = 4; + case kSequenceType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.value_.sequence_type_); + break; + } + // .onnx.TypeProto.Map map_type = 5; + case kMapType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.value_.map_type_); + break; + } + // .onnx.TypeProto.Optional optional_type = 9; + case kOptionalType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.value_.optional_type_); + break; + } + // .onnx.TypeProto.SparseTensor sparse_tensor_type = 8; + case kSparseTensorType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.value_.sparse_tensor_type_); + break; + } + case VALUE_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void TypeProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.TypeProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_denotation(from._internal_denotation()); + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) { + const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0]; + const bool oneof_needs_init = oneof_to_case != oneof_from_case; + if (oneof_needs_init) { + if (oneof_to_case != 0) { + _this->clear_value(); + } + _this->_impl_._oneof_case_[0] = oneof_from_case; + } + + switch (oneof_from_case) { + case kTensorType: { + if (oneof_needs_init) { + _this->_impl_.value_.tensor_type_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_Tensor>(arena, *from._impl_.value_.tensor_type_); + } else { + _this->_impl_.value_.tensor_type_->MergeFrom(from._internal_tensor_type()); + } + break; + } + case kSequenceType: { + if (oneof_needs_init) { + _this->_impl_.value_.sequence_type_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_Sequence>(arena, *from._impl_.value_.sequence_type_); + } else { + _this->_impl_.value_.sequence_type_->MergeFrom(from._internal_sequence_type()); + } + break; + } + case kMapType: { + if (oneof_needs_init) { + _this->_impl_.value_.map_type_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_Map>(arena, *from._impl_.value_.map_type_); + } else { + _this->_impl_.value_.map_type_->MergeFrom(from._internal_map_type()); + } + break; + } + case kOptionalType: { + if (oneof_needs_init) { + _this->_impl_.value_.optional_type_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_Optional>(arena, *from._impl_.value_.optional_type_); + } else { + _this->_impl_.value_.optional_type_->MergeFrom(from._internal_optional_type()); + } + break; + } + case kSparseTensorType: { + if (oneof_needs_init) { + _this->_impl_.value_.sparse_tensor_type_ = + ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto_SparseTensor>(arena, *from._impl_.value_.sparse_tensor_type_); + } else { + _this->_impl_.value_.sparse_tensor_type_->MergeFrom(from._internal_sparse_tensor_type()); + } + break; + } + case VALUE_NOT_SET: + break; + } + } + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto::CopyFrom(const TypeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.TypeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void TypeProto::InternalSwap(TypeProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.denotation_, &other->_impl_.denotation_, arena); + swap(_impl_.value_, other->_impl_.value_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); +} + +// =================================================================== + +class OperatorSetIdProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_._has_bits_); +}; + +OperatorSetIdProto::OperatorSetIdProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.OperatorSetIdProto) +} +inline PROTOBUF_NDEBUG_INLINE OperatorSetIdProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::OperatorSetIdProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + domain_(arena, from.domain_) {} + +OperatorSetIdProto::OperatorSetIdProto( + ::google::protobuf::Arena* arena, + const OperatorSetIdProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + OperatorSetIdProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.version_ = from._impl_.version_; + + // @@protoc_insertion_point(copy_constructor:onnx.OperatorSetIdProto) +} +inline PROTOBUF_NDEBUG_INLINE OperatorSetIdProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + domain_(arena) {} + +inline void OperatorSetIdProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.version_ = {}; +} +OperatorSetIdProto::~OperatorSetIdProto() { + // @@protoc_insertion_point(destructor:onnx.OperatorSetIdProto) + SharedDtor(*this); +} +inline void OperatorSetIdProto::SharedDtor(MessageLite& self) { + OperatorSetIdProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.domain_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* OperatorSetIdProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) OperatorSetIdProto(arena); +} +constexpr auto OperatorSetIdProto::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(OperatorSetIdProto), + alignof(OperatorSetIdProto)); +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<24> OperatorSetIdProto::_class_data_ = { + { + &_OperatorSetIdProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &OperatorSetIdProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &OperatorSetIdProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &OperatorSetIdProto::ByteSizeLong, + &OperatorSetIdProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_._cached_size_), + true, + }, + "onnx.OperatorSetIdProto", +}; +const ::google::protobuf::internal::ClassData* OperatorSetIdProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> OperatorSetIdProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::OperatorSetIdProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional int64 version = 2; + {::_pbi::TcParser::FastV64S1, + {16, 1, 0, PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_.version_)}}, + // optional string domain = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_.domain_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional string domain = 1; + {PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_.domain_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // optional int64 version = 2; + {PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_.version_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kInt64)}, + }}, + // no aux_entries + {{ + }}, +}; + +PROTOBUF_NOINLINE void OperatorSetIdProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.OperatorSetIdProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.domain_.ClearNonDefaultToEmpty(); + } + _impl_.version_ = ::int64_t{0}; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* OperatorSetIdProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const OperatorSetIdProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* OperatorSetIdProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const OperatorSetIdProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.OperatorSetIdProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string domain = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_domain(); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional int64 version = 2; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArrayWithField<2>( + stream, this_._internal_version(), target); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.OperatorSetIdProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t OperatorSetIdProto::ByteSizeLong(const MessageLite& base) { + const OperatorSetIdProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t OperatorSetIdProto::ByteSizeLong() const { + const OperatorSetIdProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.OperatorSetIdProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string domain = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_domain()); + } + // optional int64 version = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( + this_._internal_version()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void OperatorSetIdProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.OperatorSetIdProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_domain(from._internal_domain()); + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.version_ = from._impl_.version_; + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void OperatorSetIdProto::CopyFrom(const OperatorSetIdProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.OperatorSetIdProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void OperatorSetIdProto::InternalSwap(OperatorSetIdProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.domain_, &other->_impl_.domain_, arena); + swap(_impl_.version_, other->_impl_.version_); +} + +// =================================================================== + +class FunctionProto::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_._has_bits_); +}; + +FunctionProto::FunctionProto(::google::protobuf::Arena* arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:onnx.FunctionProto) +} +inline PROTOBUF_NDEBUG_INLINE FunctionProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::onnx::FunctionProto& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + input_{visibility, arena, from.input_}, + output_{visibility, arena, from.output_}, + attribute_{visibility, arena, from.attribute_}, + node_{visibility, arena, from.node_}, + opset_import_{visibility, arena, from.opset_import_}, + attribute_proto_{visibility, arena, from.attribute_proto_}, + value_info_{visibility, arena, from.value_info_}, + metadata_props_{visibility, arena, from.metadata_props_}, + name_(arena, from.name_), + doc_string_(arena, from.doc_string_), + domain_(arena, from.domain_), + overload_(arena, from.overload_) {} + +FunctionProto::FunctionProto( + ::google::protobuf::Arena* arena, + const FunctionProto& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, _class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + FunctionProto* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:onnx.FunctionProto) +} +inline PROTOBUF_NDEBUG_INLINE FunctionProto::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + input_{visibility, arena}, + output_{visibility, arena}, + attribute_{visibility, arena}, + node_{visibility, arena}, + opset_import_{visibility, arena}, + attribute_proto_{visibility, arena}, + value_info_{visibility, arena}, + metadata_props_{visibility, arena}, + name_(arena), + doc_string_(arena), + domain_(arena), + overload_(arena) {} + +inline void FunctionProto::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +FunctionProto::~FunctionProto() { + // @@protoc_insertion_point(destructor:onnx.FunctionProto) + SharedDtor(*this); +} +inline void FunctionProto::SharedDtor(MessageLite& self) { + FunctionProto& this_ = static_cast(self); + this_._internal_metadata_.Delete(); + ABSL_DCHECK(this_.GetArena() == nullptr); + this_._impl_.name_.Destroy(); + this_._impl_.doc_string_.Destroy(); + this_._impl_.domain_.Destroy(); + this_._impl_.overload_.Destroy(); + this_._impl_.~Impl_(); +} + +inline void* FunctionProto::PlacementNew_(const void*, void* mem, + ::google::protobuf::Arena* arena) { + return ::new (mem) FunctionProto(arena); +} +constexpr auto FunctionProto::InternalNewImpl_() { + constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({ + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.input_) + + decltype(FunctionProto::_impl_.input_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.output_) + + decltype(FunctionProto::_impl_.output_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.attribute_) + + decltype(FunctionProto::_impl_.attribute_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.attribute_proto_) + + decltype(FunctionProto::_impl_.attribute_proto_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.node_) + + decltype(FunctionProto::_impl_.node_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.opset_import_) + + decltype(FunctionProto::_impl_.opset_import_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.value_info_) + + decltype(FunctionProto::_impl_.value_info_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.metadata_props_) + + decltype(FunctionProto::_impl_.metadata_props_):: + InternalGetArenaOffset( + ::google::protobuf::MessageLite::internal_visibility()), + }); + if (arena_bits.has_value()) { + return ::google::protobuf::internal::MessageCreator::CopyInit( + sizeof(FunctionProto), alignof(FunctionProto), *arena_bits); + } else { + return ::google::protobuf::internal::MessageCreator(&FunctionProto::PlacementNew_, + sizeof(FunctionProto), + alignof(FunctionProto)); + } +} +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<19> FunctionProto::_class_data_ = { + { + &_FunctionProto_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &FunctionProto::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &FunctionProto::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &FunctionProto::ByteSizeLong, + &FunctionProto::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_._cached_size_), + true, + }, + "onnx.FunctionProto", +}; +const ::google::protobuf::internal::ClassData* FunctionProto::GetClassData() const { + return _class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 12, 5, 0, 2> FunctionProto::_table_ = { + { + PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_._has_bits_), + 0, // no _extensions_ + 14, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294950918, // skipmap + offsetof(decltype(_table_), field_entries), + 12, // num_field_entries + 5, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + _class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::onnx::FunctionProto>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // optional string name = 1; + {::_pbi::TcParser::FastBS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.name_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + // repeated string input = 4; + {::_pbi::TcParser::FastBR1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.input_)}}, + // repeated string output = 5; + {::_pbi::TcParser::FastBR1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.output_)}}, + // repeated string attribute = 6; + {::_pbi::TcParser::FastBR1, + {50, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.attribute_)}}, + // repeated .onnx.NodeProto node = 7; + {::_pbi::TcParser::FastMtR1, + {58, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.node_)}}, + // optional string doc_string = 8; + {::_pbi::TcParser::FastBS1, + {66, 1, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.doc_string_)}}, + // repeated .onnx.OperatorSetIdProto opset_import = 9; + {::_pbi::TcParser::FastMtR1, + {74, 63, 1, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.opset_import_)}}, + // optional string domain = 10; + {::_pbi::TcParser::FastBS1, + {82, 2, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.domain_)}}, + // repeated .onnx.AttributeProto attribute_proto = 11; + {::_pbi::TcParser::FastMtR1, + {90, 63, 2, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.attribute_proto_)}}, + // repeated .onnx.ValueInfoProto value_info = 12; + {::_pbi::TcParser::FastMtR1, + {98, 63, 3, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.value_info_)}}, + // optional string overload = 13; + {::_pbi::TcParser::FastBS1, + {106, 3, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.overload_)}}, + // repeated .onnx.StringStringEntryProto metadata_props = 14; + {::_pbi::TcParser::FastMtR1, + {114, 63, 4, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.metadata_props_)}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional string name = 1; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated string input = 4; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.input_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, + // repeated string output = 5; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.output_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, + // repeated string attribute = 6; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.attribute_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kBytes | ::_fl::kRepSString)}, + // repeated .onnx.NodeProto node = 7; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.node_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string doc_string = 8; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.doc_string_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.OperatorSetIdProto opset_import = 9; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.opset_import_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string domain = 10; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.domain_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.AttributeProto attribute_proto = 11; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.attribute_proto_), -1, 2, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .onnx.ValueInfoProto value_info = 12; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.value_info_), -1, 3, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string overload = 13; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.overload_), _Internal::kHasBitsOffset + 3, 0, + (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)}, + // repeated .onnx.StringStringEntryProto metadata_props = 14; + {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.metadata_props_), -1, 4, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::onnx::NodeProto>()}, + {::_pbi::TcParser::GetTable<::onnx::OperatorSetIdProto>()}, + {::_pbi::TcParser::GetTable<::onnx::AttributeProto>()}, + {::_pbi::TcParser::GetTable<::onnx::ValueInfoProto>()}, + {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void FunctionProto::Clear() { +// @@protoc_insertion_point(message_clear_start:onnx.FunctionProto) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.input_.Clear(); + _impl_.output_.Clear(); + _impl_.attribute_.Clear(); + _impl_.node_.Clear(); + _impl_.opset_import_.Clear(); + _impl_.attribute_proto_.Clear(); + _impl_.value_info_.Clear(); + _impl_.metadata_props_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.doc_string_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + _impl_.domain_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + _impl_.overload_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::uint8_t* FunctionProto::_InternalSerialize( + const MessageLite& base, ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) { + const FunctionProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::uint8_t* FunctionProto::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + const FunctionProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(serialize_to_array_start:onnx.FunctionProto) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this_._internal_name(); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // repeated string input = 4; + for (int i = 0, n = this_._internal_input_size(); i < n; ++i) { + const auto& s = this_._internal_input().Get(i); + target = stream->WriteString(4, s, target); + } + + // repeated string output = 5; + for (int i = 0, n = this_._internal_output_size(); i < n; ++i) { + const auto& s = this_._internal_output().Get(i); + target = stream->WriteString(5, s, target); + } + + // repeated string attribute = 6; + for (int i = 0, n = this_._internal_attribute_size(); i < n; ++i) { + const auto& s = this_._internal_attribute().Get(i); + target = stream->WriteString(6, s, target); + } + + // repeated .onnx.NodeProto node = 7; + for (unsigned i = 0, n = static_cast( + this_._internal_node_size()); + i < n; i++) { + const auto& repfield = this_._internal_node().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 7, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional string doc_string = 8; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this_._internal_doc_string(); + target = stream->WriteStringMaybeAliased(8, _s, target); + } + + // repeated .onnx.OperatorSetIdProto opset_import = 9; + for (unsigned i = 0, n = static_cast( + this_._internal_opset_import_size()); + i < n; i++) { + const auto& repfield = this_._internal_opset_import().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 9, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional string domain = 10; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this_._internal_domain(); + target = stream->WriteStringMaybeAliased(10, _s, target); + } + + // repeated .onnx.AttributeProto attribute_proto = 11; + for (unsigned i = 0, n = static_cast( + this_._internal_attribute_proto_size()); + i < n; i++) { + const auto& repfield = this_._internal_attribute_proto().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 11, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .onnx.ValueInfoProto value_info = 12; + for (unsigned i = 0, n = static_cast( + this_._internal_value_info_size()); + i < n; i++) { + const auto& repfield = this_._internal_value_info().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 12, repfield, repfield.GetCachedSize(), + target, stream); + } + + // optional string overload = 13; + if (cached_has_bits & 0x00000008u) { + const std::string& _s = this_._internal_overload(); + target = stream->WriteStringMaybeAliased(13, _s, target); + } + + // repeated .onnx.StringStringEntryProto metadata_props = 14; + for (unsigned i = 0, n = static_cast( + this_._internal_metadata_props_size()); + i < n; i++) { + const auto& repfield = this_._internal_metadata_props().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 14, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:onnx.FunctionProto) + return target; + } + +#if defined(PROTOBUF_CUSTOM_VTABLE) + ::size_t FunctionProto::ByteSizeLong(const MessageLite& base) { + const FunctionProto& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE + ::size_t FunctionProto::ByteSizeLong() const { + const FunctionProto& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:onnx.FunctionProto) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + { + // repeated string input = 4; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_input().size()); + for (int i = 0, n = this_._internal_input().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_input().Get(i)); + } + } + // repeated string output = 5; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_output().size()); + for (int i = 0, n = this_._internal_output().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_output().Get(i)); + } + } + // repeated string attribute = 6; + { + total_size += + 1 * ::google::protobuf::internal::FromIntSize(this_._internal_attribute().size()); + for (int i = 0, n = this_._internal_attribute().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_attribute().Get(i)); + } + } + // repeated .onnx.NodeProto node = 7; + { + total_size += 1UL * this_._internal_node_size(); + for (const auto& msg : this_._internal_node()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.OperatorSetIdProto opset_import = 9; + { + total_size += 1UL * this_._internal_opset_import_size(); + for (const auto& msg : this_._internal_opset_import()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.AttributeProto attribute_proto = 11; + { + total_size += 1UL * this_._internal_attribute_proto_size(); + for (const auto& msg : this_._internal_attribute_proto()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.ValueInfoProto value_info = 12; + { + total_size += 1UL * this_._internal_value_info_size(); + for (const auto& msg : this_._internal_value_info()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + // repeated .onnx.StringStringEntryProto metadata_props = 14; + { + total_size += 1UL * this_._internal_metadata_props_size(); + for (const auto& msg : this_._internal_metadata_props()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + } + } + cached_has_bits = this_._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_name()); + } + // optional string doc_string = 8; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_doc_string()); + } + // optional string domain = 10; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_domain()); + } + // optional string overload = 13; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_overload()); + } + } + if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; + } + +void FunctionProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:onnx.FunctionProto) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_input()->MergeFrom(from._internal_input()); + _this->_internal_mutable_output()->MergeFrom(from._internal_output()); + _this->_internal_mutable_attribute()->MergeFrom(from._internal_attribute()); + _this->_internal_mutable_node()->MergeFrom( + from._internal_node()); + _this->_internal_mutable_opset_import()->MergeFrom( + from._internal_opset_import()); + _this->_internal_mutable_attribute_proto()->MergeFrom( + from._internal_attribute_proto()); + _this->_internal_mutable_value_info()->MergeFrom( + from._internal_value_info()); + _this->_internal_mutable_metadata_props()->MergeFrom( + from._internal_metadata_props()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_doc_string(from._internal_doc_string()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_set_domain(from._internal_domain()); + } + if (cached_has_bits & 0x00000008u) { + _this->_internal_set_overload(from._internal_overload()); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void FunctionProto::CopyFrom(const FunctionProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:onnx.FunctionProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void FunctionProto::InternalSwap(FunctionProto* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.input_.InternalSwap(&other->_impl_.input_); + _impl_.output_.InternalSwap(&other->_impl_.output_); + _impl_.attribute_.InternalSwap(&other->_impl_.attribute_); + _impl_.node_.InternalSwap(&other->_impl_.node_); + _impl_.opset_import_.InternalSwap(&other->_impl_.opset_import_); + _impl_.attribute_proto_.InternalSwap(&other->_impl_.attribute_proto_); + _impl_.value_info_.InternalSwap(&other->_impl_.value_info_); + _impl_.metadata_props_.InternalSwap(&other->_impl_.metadata_props_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.doc_string_, &other->_impl_.doc_string_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.domain_, &other->_impl_.domain_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.overload_, &other->_impl_.overload_, arena); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace onnx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +#include "google/protobuf/port_undef.inc" diff --git a/src/tensor/tensor.cpp b/src/tensor/tensor.cpp new file mode 100644 index 0000000..7c7d616 --- /dev/null +++ b/src/tensor/tensor.cpp @@ -0,0 +1,15 @@ + +#include "tensor/tensor.h" + +#include +#include +#include +#include + +Shape::Shape(std::vector dims) : dimensions(std::move(dims)) { + total_elements = std::accumulate(dimensions.begin(), dimensions.end(), + static_cast(1), + [](size_t a, size_t b) { return a * b; }); +} + +size_t Shape::get_rank() const { return dimensions.size(); } \ No newline at end of file