diff --git a/.github/workflows/master-test-workflow.yml b/.github/workflows/master-test-workflow.yml index ff34de65..a114990c 100644 --- a/.github/workflows/master-test-workflow.yml +++ b/.github/workflows/master-test-workflow.yml @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v4 - name: Setup - run: source /home/hicr/.bashrc && meson setup build -Dbackends=hwloc,pthreads,mpi,lpf,nosv,boost,opencl -Dfrontends=channel,RPCEngine,tasking,objectStore -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true + run: source /home/hicr/.bashrc && meson setup build -Dbackends=hwloc,pthreads,mpi,lpf,nosv,boost,opencl,acl -Dfrontends=channel,RPCEngine,tasking,objectStore -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true - name: Compile run: source /home/hicr/.bashrc && meson compile -C build diff --git a/.github/workflows/pr-development-workflow.yml b/.github/workflows/pr-development-workflow.yml index 574796fb..7344d8b3 100644 --- a/.github/workflows/pr-development-workflow.yml +++ b/.github/workflows/pr-development-workflow.yml @@ -229,7 +229,7 @@ jobs: docker run --name hicr --shm-size=1024M --privileged -v $PWD:/home/hicr/hicr -w /home/hicr/hicr -td ${{ env.DOCKERIMAGE }}:${{ inputs.arch }}-latest bash - name: Setup - run: docker exec -u hicr hicr bash -c "meson setup build -Dbackends=hwloc,pthreads,mpi,lpf,nosv,boost,opencl -Dfrontends=channel,RPCEngine,tasking,objectStore -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true" + run: docker exec -u hicr hicr bash -c "meson setup build -Dbackends=hwloc,pthreads,mpi,lpf,nosv,boost,opencl,acl -Dfrontends=channel,RPCEngine,tasking,objectStore -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true" - name: Compile run: docker exec -u hicr hicr bash -c "meson compile -C build" diff --git a/.gitignore b/.gitignore index ed4fdcf8..39c3f54e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ atlas_* **/*.bin **/*ubyte* **/.venv -.cache \ No newline at end of file +.cache +examples/neuralNetwork/proto/onnx.proto3.pb.* \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4caf2dbe..5ff83b97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,7 +42,7 @@ build-acl: - echo "$PATH" - echo "Building..." - mkdir build - - meson setup build -Dbackends=hwloc,pthreads,acl,boost -Dfrontends= -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true + - meson setup build -Dbackends=hwloc,pthreads,acl,boost -DbuildTests=true -DbuildExamples=true -DcompileWarningsAsErrors=true - meson compile -C build - echo "Running tests..." - meson test -C build diff --git a/examples/neuralNetwork/proto/meson.build b/examples/neuralNetwork/proto/meson.build index e744a11b..745bc8ae 100644 --- a/examples/neuralNetwork/proto/meson.build +++ b/examples/neuralNetwork/proto/meson.build @@ -1,5 +1,5 @@ ####### Creating ONNX Protobuf dependency -protoDep = dependency('protobuf', required: true, version: '29.3.0', modules: ['protobuf::libprotobuf']) +protoDep = dependency('protobuf', required: true, version: '>=29.3.0', modules: ['protobuf::libprotobuf']) # if the cpp generated protobuf files do not exist run the script to create them fs = import('fs') diff --git a/examples/neuralNetwork/proto/onnx.proto3.pb.cc b/examples/neuralNetwork/proto/onnx.proto3.pb.cc deleted file mode 100644 index 6453bf25..00000000 --- a/examples/neuralNetwork/proto/onnx.proto3.pb.cc +++ /dev/null @@ -1,9432 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: onnx.proto3 -// Protobuf C++ Version: 5.29.3 - -#include "onnx.proto3.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 - : denotation_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - value_{}, - _cached_size_{0}, - _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 - : begin_{::int64_t{0}}, - end_{::int64_t{0}}, - _cached_size_{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 - : key_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - value_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - _cached_size_{0} {} - -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 - : domain_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - version_{::int64_t{0}}, - _cached_size_{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_{}, - _dims_cached_byte_size_{0}, - 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 - : quant_parameter_tensor_names_{}, - tensor_name_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - _cached_size_{0} {} - -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_{}, - _dims_cached_byte_size_{0}, - 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 - : denotation_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - value_{}, - _cached_size_{0}, - _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_{}, - _ints_cached_byte_size_{0}, - 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 - : 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()), - _cached_size_{0} {} - -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 - : 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()), - _cached_size_{0} {} - -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 - : 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()), - _cached_size_{0} {} - -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_}, - _ints_cached_byte_size_{0}, - 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 & 0x00000001u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TensorProto>( - arena, *from._impl_.t_) - : nullptr; - _impl_.g_ = (cached_has_bits & 0x00000002u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::GraphProto>( - arena, *from._impl_.g_) - : nullptr; - _impl_.tp_ = (cached_has_bits & 0x00000004u) ? ::google::protobuf::MessageLite::CopyConstruct<::onnx::TypeProto>( - arena, *from._impl_.tp_) - : nullptr; - _impl_.sparse_tensor_ = (cached_has_bits & 0x00000008u) ? ::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}, - _ints_cached_byte_size_{0}, - 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, 8, 71, 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 - 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::AttributeProto>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - // string name = 1; - {::_pbi::TcParser::FastUS1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.name_)}}, - // float f = 2; - {::_pbi::TcParser::FastF32S1, - {21, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.f_)}}, - // int64 i = 3; - {::_pbi::TcParser::FastV64S1, - {24, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.i_)}}, - // bytes s = 4; - {::_pbi::TcParser::FastBS1, - {34, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.s_)}}, - // .onnx.TensorProto t = 5; - {::_pbi::TcParser::FastMtS1, - {42, 0, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.t_)}}, - // .onnx.GraphProto g = 6; - {::_pbi::TcParser::FastMtS1, - {50, 1, 1, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.g_)}}, - // repeated float floats = 7; - {::_pbi::TcParser::FastF32P1, - {58, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.floats_)}}, - // repeated int64 ints = 8; - {::_pbi::TcParser::FastV64P1, - {66, 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, {}}, - // string doc_string = 13; - {::_pbi::TcParser::FastUS1, - {106, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.doc_string_)}}, - // .onnx.TypeProto tp = 14; - {::_pbi::TcParser::FastMtS1, - {114, 2, 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, {}}, - // .onnx.AttributeProto.AttributeType type = 20; - {::_pbi::TcParser::FastV32S2, - {416, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.type_)}}, - // string ref_attr_name = 21; - {::_pbi::TcParser::FastUS2, - {426, 63, 0, PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.ref_attr_name_)}}, - // .onnx.SparseTensorProto sparse_tensor = 22; - {::_pbi::TcParser::FastMtS2, - {434, 3, 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 - }}, {{ - // string name = 1; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.name_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // float f = 2; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.f_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kFloat)}, - // int64 i = 3; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.i_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kInt64)}, - // bytes s = 4; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.s_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kBytes | ::_fl::kRepAString)}, - // .onnx.TensorProto t = 5; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.t_), _Internal::kHasBitsOffset + 0, 0, - (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // .onnx.GraphProto g = 6; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.g_), _Internal::kHasBitsOffset + 1, 1, - (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated float floats = 7; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.floats_), -1, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kPackedFloat)}, - // repeated int64 ints = 8; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.ints_), -1, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, - // 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)}, - // string doc_string = 13; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.doc_string_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // .onnx.TypeProto tp = 14; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.tp_), _Internal::kHasBitsOffset + 2, 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)}, - // .onnx.AttributeProto.AttributeType type = 20; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.type_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, - // string ref_attr_name = 21; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.ref_attr_name_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // .onnx.SparseTensorProto sparse_tensor = 22; - {PROTOBUF_FIELD_OFFSET(AttributeProto, _impl_.sparse_tensor_), _Internal::kHasBitsOffset + 3, 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>()}, - }}, {{ - "\23\4\0\0\0\0\0\0\0\0\0\0\12\0\0\0\15\0\0\0\0\0\0\0" - "onnx.AttributeProto" - "name" - "doc_string" - "ref_attr_name" - }}, -}; - -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(); - _impl_.name_.ClearToEmpty(); - _impl_.s_.ClearToEmpty(); - _impl_.doc_string_.ClearToEmpty(); - _impl_.ref_attr_name_.ClearToEmpty(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - if (cached_has_bits & 0x00000001u) { - ABSL_DCHECK(_impl_.t_ != nullptr); - _impl_.t_->Clear(); - } - if (cached_has_bits & 0x00000002u) { - ABSL_DCHECK(_impl_.g_ != nullptr); - _impl_.g_->Clear(); - } - if (cached_has_bits & 0x00000004u) { - ABSL_DCHECK(_impl_.tp_ != nullptr); - _impl_.tp_->Clear(); - } - if (cached_has_bits & 0x00000008u) { - ABSL_DCHECK(_impl_.sparse_tensor_ != nullptr); - _impl_.sparse_tensor_->Clear(); - } - } - ::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; - - // string name = 1; - if (!this_._internal_name().empty()) { - const std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.AttributeProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // float f = 2; - if (::absl::bit_cast<::uint32_t>(this_._internal_f()) != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteFloatToArray( - 2, this_._internal_f(), target); - } - - // int64 i = 3; - if (this_._internal_i() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt64ToArrayWithField<3>( - stream, this_._internal_i(), target); - } - - // bytes s = 4; - if (!this_._internal_s().empty()) { - const std::string& _s = this_._internal_s(); - target = stream->WriteBytesMaybeAliased(4, _s, target); - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // .onnx.TensorProto t = 5; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 5, *this_._impl_.t_, this_._impl_.t_->GetCachedSize(), target, - stream); - } - - // .onnx.GraphProto g = 6; - if (cached_has_bits & 0x00000002u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 6, *this_._impl_.g_, this_._impl_.g_->GetCachedSize(), target, - stream); - } - - // repeated float floats = 7; - if (this_._internal_floats_size() > 0) { - target = stream->WriteFixedPacked(7, this_._internal_floats(), target); - } - - // repeated int64 ints = 8; - { - int byte_size = this_._impl_._ints_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteInt64Packed( - 8, this_._internal_ints(), byte_size, 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); - } - - // string doc_string = 13; - if (!this_._internal_doc_string().empty()) { - const std::string& _s = this_._internal_doc_string(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.AttributeProto.doc_string"); - target = stream->WriteStringMaybeAliased(13, _s, target); - } - - // .onnx.TypeProto tp = 14; - if (cached_has_bits & 0x00000004u) { - 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); - } - - // .onnx.AttributeProto.AttributeType type = 20; - if (this_._internal_type() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteEnumToArray( - 20, this_._internal_type(), target); - } - - // string ref_attr_name = 21; - if (!this_._internal_ref_attr_name().empty()) { - const std::string& _s = this_._internal_ref_attr_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.AttributeProto.ref_attr_name"); - target = stream->WriteStringMaybeAliased(21, _s, target); - } - - // .onnx.SparseTensorProto sparse_tensor = 22; - if (cached_has_bits & 0x00000008u) { - 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 = data_size == 0 - ? 0 - : 1 + ::_pbi::WireFormatLite::Int32Size( - static_cast(data_size)); - total_size += tag_size + data_size; - } - // repeated int64 ints = 8; - { - total_size += - ::_pbi::WireFormatLite::Int64SizeWithPackedTagSize( - this_._internal_ints(), 1, - this_._impl_._ints_cached_byte_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); - } - } - } - { - // string name = 1; - if (!this_._internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // bytes s = 4; - if (!this_._internal_s().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( - this_._internal_s()); - } - // string doc_string = 13; - if (!this_._internal_doc_string().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_doc_string()); - } - // string ref_attr_name = 21; - if (!this_._internal_ref_attr_name().empty()) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_ref_attr_name()); - } - } - cached_has_bits = this_._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - // .onnx.TensorProto t = 5; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.t_); - } - // .onnx.GraphProto g = 6; - if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.g_); - } - // .onnx.TypeProto tp = 14; - if (cached_has_bits & 0x00000004u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.tp_); - } - // .onnx.SparseTensorProto sparse_tensor = 22; - if (cached_has_bits & 0x00000008u) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.sparse_tensor_); - } - } - { - // int64 i = 3; - if (this_._internal_i() != 0) { - total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( - this_._internal_i()); - } - // float f = 2; - if (::absl::bit_cast<::uint32_t>(this_._internal_f()) != 0) { - total_size += 5; - } - // .onnx.AttributeProto.AttributeType type = 20; - if (this_._internal_type() != 0) { - 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()); - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } - if (!from._internal_s().empty()) { - _this->_internal_set_s(from._internal_s()); - } - if (!from._internal_doc_string().empty()) { - _this->_internal_set_doc_string(from._internal_doc_string()); - } - if (!from._internal_ref_attr_name().empty()) { - _this->_internal_set_ref_attr_name(from._internal_ref_attr_name()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { - if (cached_has_bits & 0x00000001u) { - 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 & 0x00000002u) { - 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 & 0x00000004u) { - 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 & 0x00000008u) { - 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 (from._internal_i() != 0) { - _this->_impl_.i_ = from._impl_.i_; - } - if (::absl::bit_cast<::uint32_t>(from._internal_f()) != 0) { - _this->_impl_.f_ = from._impl_.f_; - } - if (from._internal_type() != 0) { - _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 & 0x00000001u) ? ::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, 42, 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_)}}, - // string name = 1; - {::_pbi::TcParser::FastUS1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.name_)}}, - // .onnx.TypeProto type = 2; - {::_pbi::TcParser::FastMtS1, - {18, 0, 0, PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.type_)}}, - // string doc_string = 3; - {::_pbi::TcParser::FastUS1, - {26, 63, 0, PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.doc_string_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // string name = 1; - {PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.name_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // .onnx.TypeProto type = 2; - {PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.type_), _Internal::kHasBitsOffset + 0, 0, - (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // string doc_string = 3; - {PROTOBUF_FIELD_OFFSET(ValueInfoProto, _impl_.doc_string_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_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>()}, - }}, {{ - "\23\4\0\12\0\0\0\0" - "onnx.ValueInfoProto" - "name" - "doc_string" - }}, -}; - -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(); - _impl_.name_.ClearToEmpty(); - _impl_.doc_string_.ClearToEmpty(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - 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; - - // string name = 1; - if (!this_._internal_name().empty()) { - const std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.ValueInfoProto.name"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // .onnx.TypeProto type = 2; - if (cached_has_bits & 0x00000001u) { - target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( - 2, *this_._impl_.type_, this_._impl_.type_->GetCachedSize(), target, - stream); - } - - // string doc_string = 3; - if (!this_._internal_doc_string().empty()) { - const std::string& _s = this_._internal_doc_string(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.ValueInfoProto.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); - } - } - } - { - // string name = 1; - if (!this_._internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // string doc_string = 3; - if (!this_._internal_doc_string().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_doc_string()); - } - } - { - // .onnx.TypeProto type = 2; - cached_has_bits = this_._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - 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()); - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } - if (!from._internal_doc_string().empty()) { - _this->_internal_set_doc_string(from._internal_doc_string()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - 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: -}; - -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) - : 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_), - _cached_size_{0} {} - -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) - : 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), - _cached_size_{0} {} - -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, 77, 2> NodeProto::_table_ = { - { - 0, // no _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::FastUR1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.input_)}}, - // repeated string output = 2; - {::_pbi::TcParser::FastUR1, - {18, 63, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.output_)}}, - // string name = 3; - {::_pbi::TcParser::FastUS1, - {26, 63, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.name_)}}, - // string op_type = 4; - {::_pbi::TcParser::FastUS1, - {34, 63, 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_)}}, - // string doc_string = 6; - {::_pbi::TcParser::FastUS1, - {50, 63, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.doc_string_)}}, - // string domain = 7; - {::_pbi::TcParser::FastUS1, - {58, 63, 0, PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.domain_)}}, - // string overload = 8; - {::_pbi::TcParser::FastUS1, - {66, 63, 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_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, - // repeated string output = 2; - {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.output_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, - // string name = 3; - {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.name_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // string op_type = 4; - {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.op_type_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .onnx.AttributeProto attribute = 5; - {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.attribute_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // string doc_string = 6; - {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.doc_string_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // string domain = 7; - {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.domain_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // string overload = 8; - {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.overload_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .onnx.StringStringEntryProto metadata_props = 9; - {PROTOBUF_FIELD_OFFSET(NodeProto, _impl_.metadata_props_), 0, 1, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, {{ - {::_pbi::TcParser::GetTable<::onnx::AttributeProto>()}, - {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, - }}, {{ - "\16\5\6\4\7\0\12\6\10\0\0\0\0\0\0\0" - "onnx.NodeProto" - "input" - "output" - "name" - "op_type" - "doc_string" - "domain" - "overload" - }}, -}; - -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(); - _impl_.name_.ClearToEmpty(); - _impl_.op_type_.ClearToEmpty(); - _impl_.doc_string_.ClearToEmpty(); - _impl_.domain_.ClearToEmpty(); - _impl_.overload_.ClearToEmpty(); - _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); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.NodeProto.input"); - 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); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.NodeProto.output"); - target = stream->WriteString(2, s, target); - } - - // string name = 3; - if (!this_._internal_name().empty()) { - const std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.NodeProto.name"); - target = stream->WriteStringMaybeAliased(3, _s, target); - } - - // string op_type = 4; - if (!this_._internal_op_type().empty()) { - const std::string& _s = this_._internal_op_type(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.NodeProto.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); - } - - // string doc_string = 6; - if (!this_._internal_doc_string().empty()) { - const std::string& _s = this_._internal_doc_string(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.NodeProto.doc_string"); - target = stream->WriteStringMaybeAliased(6, _s, target); - } - - // string domain = 7; - if (!this_._internal_domain().empty()) { - const std::string& _s = this_._internal_domain(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.NodeProto.domain"); - target = stream->WriteStringMaybeAliased(7, _s, target); - } - - // string overload = 8; - if (!this_._internal_overload().empty()) { - const std::string& _s = this_._internal_overload(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.NodeProto.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); - } - } - } - { - // string name = 3; - if (!this_._internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // string op_type = 4; - if (!this_._internal_op_type().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_op_type()); - } - // string doc_string = 6; - if (!this_._internal_doc_string().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_doc_string()); - } - // string domain = 7; - if (!this_._internal_domain().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_domain()); - } - // string overload = 8; - if (!this_._internal_overload().empty()) { - 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()); - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } - if (!from._internal_op_type().empty()) { - _this->_internal_set_op_type(from._internal_op_type()); - } - if (!from._internal_doc_string().empty()) { - _this->_internal_set_doc_string(from._internal_doc_string()); - } - if (!from._internal_domain().empty()) { - _this->_internal_set_domain(from._internal_domain()); - } - if (!from._internal_overload().empty()) { - _this->_internal_set_overload(from._internal_overload()); - } - _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_); - _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_)}}, - // .onnx.GraphProto initialization = 1; - {::_pbi::TcParser::FastMtS1, - {10, 0, 0, PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.initialization_)}}, - // .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 - }}, {{ - // .onnx.GraphProto initialization = 1; - {PROTOBUF_FIELD_OFFSET(TrainingInfoProto, _impl_.initialization_), _Internal::kHasBitsOffset + 0, 0, - (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // .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]; - // .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); - } - - // .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) { - // .onnx.GraphProto initialization = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.initialization_); - } - // .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 & 0x00000001u) ? ::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, 77, 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, {}}, - // int64 ir_version = 1; - {::_pbi::TcParser::FastV64S1, - {8, 63, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.ir_version_)}}, - // string producer_name = 2; - {::_pbi::TcParser::FastUS1, - {18, 63, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.producer_name_)}}, - // string producer_version = 3; - {::_pbi::TcParser::FastUS1, - {26, 63, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.producer_version_)}}, - // string domain = 4; - {::_pbi::TcParser::FastUS1, - {34, 63, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.domain_)}}, - // int64 model_version = 5; - {::_pbi::TcParser::FastV64S1, - {40, 63, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.model_version_)}}, - // string doc_string = 6; - {::_pbi::TcParser::FastUS1, - {50, 63, 0, PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.doc_string_)}}, - // .onnx.GraphProto graph = 7; - {::_pbi::TcParser::FastMtS1, - {58, 0, 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 - }}, {{ - // int64 ir_version = 1; - {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.ir_version_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kInt64)}, - // string producer_name = 2; - {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.producer_name_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // string producer_version = 3; - {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.producer_version_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // string domain = 4; - {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.domain_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // int64 model_version = 5; - {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.model_version_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kInt64)}, - // string doc_string = 6; - {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.doc_string_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // .onnx.GraphProto graph = 7; - {PROTOBUF_FIELD_OFFSET(ModelProto, _impl_.graph_), _Internal::kHasBitsOffset + 0, 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>()}, - }}, {{ - "\17\0\15\20\6\0\12\0\0\0\0\0\0\0\0\0" - "onnx.ModelProto" - "producer_name" - "producer_version" - "domain" - "doc_string" - }}, -}; - -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(); - _impl_.producer_name_.ClearToEmpty(); - _impl_.producer_version_.ClearToEmpty(); - _impl_.domain_.ClearToEmpty(); - _impl_.doc_string_.ClearToEmpty(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - ABSL_DCHECK(_impl_.graph_ != nullptr); - _impl_.graph_->Clear(); - } - ::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; - - // int64 ir_version = 1; - if (this_._internal_ir_version() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt64ToArrayWithField<1>( - stream, this_._internal_ir_version(), target); - } - - // string producer_name = 2; - if (!this_._internal_producer_name().empty()) { - const std::string& _s = this_._internal_producer_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.ModelProto.producer_name"); - target = stream->WriteStringMaybeAliased(2, _s, target); - } - - // string producer_version = 3; - if (!this_._internal_producer_version().empty()) { - const std::string& _s = this_._internal_producer_version(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.ModelProto.producer_version"); - target = stream->WriteStringMaybeAliased(3, _s, target); - } - - // string domain = 4; - if (!this_._internal_domain().empty()) { - const std::string& _s = this_._internal_domain(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.ModelProto.domain"); - target = stream->WriteStringMaybeAliased(4, _s, target); - } - - // int64 model_version = 5; - if (this_._internal_model_version() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt64ToArrayWithField<5>( - stream, this_._internal_model_version(), target); - } - - // string doc_string = 6; - if (!this_._internal_doc_string().empty()) { - const std::string& _s = this_._internal_doc_string(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.ModelProto.doc_string"); - target = stream->WriteStringMaybeAliased(6, _s, target); - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // .onnx.GraphProto graph = 7; - if (cached_has_bits & 0x00000001u) { - 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); - } - } - } - { - // string producer_name = 2; - if (!this_._internal_producer_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_producer_name()); - } - // string producer_version = 3; - if (!this_._internal_producer_version().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_producer_version()); - } - // string domain = 4; - if (!this_._internal_domain().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_domain()); - } - // string doc_string = 6; - if (!this_._internal_doc_string().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_doc_string()); - } - } - { - // .onnx.GraphProto graph = 7; - cached_has_bits = this_._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.graph_); - } - } - { - // int64 ir_version = 1; - if (this_._internal_ir_version() != 0) { - total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( - this_._internal_ir_version()); - } - // int64 model_version = 5; - if (this_._internal_model_version() != 0) { - 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()); - if (!from._internal_producer_name().empty()) { - _this->_internal_set_producer_name(from._internal_producer_name()); - } - if (!from._internal_producer_version().empty()) { - _this->_internal_set_producer_version(from._internal_producer_version()); - } - if (!from._internal_domain().empty()) { - _this->_internal_set_domain(from._internal_domain()); - } - if (!from._internal_doc_string().empty()) { - _this->_internal_set_doc_string(from._internal_doc_string()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - 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 (from._internal_ir_version() != 0) { - _this->_impl_.ir_version_ = from._impl_.ir_version_; - } - if (from._internal_model_version() != 0) { - _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: -}; - -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) - : key_(arena, from.key_), - value_(arena, from.value_), - _cached_size_{0} {} - -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) - : key_(arena), - value_(arena), - _cached_size_{0} {} - -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, 44, 2> StringStringEntryProto::_table_ = { - { - 0, // no _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 - }, {{ - // string value = 2; - {::_pbi::TcParser::FastUS1, - {18, 63, 0, PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_.value_)}}, - // string key = 1; - {::_pbi::TcParser::FastUS1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_.key_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // string key = 1; - {PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_.key_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // string value = 2; - {PROTOBUF_FIELD_OFFSET(StringStringEntryProto, _impl_.value_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - }}, - // no aux_entries - {{ - "\33\3\5\0\0\0\0\0" - "onnx.StringStringEntryProto" - "key" - "value" - }}, -}; - -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; - - _impl_.key_.ClearToEmpty(); - _impl_.value_.ClearToEmpty(); - _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; - - // string key = 1; - if (!this_._internal_key().empty()) { - const std::string& _s = this_._internal_key(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.StringStringEntryProto.key"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // string value = 2; - if (!this_._internal_value().empty()) { - const std::string& _s = this_._internal_value(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.StringStringEntryProto.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_); - { - // string key = 1; - if (!this_._internal_key().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_key()); - } - // string value = 2; - if (!this_._internal_value().empty()) { - 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; - - if (!from._internal_key().empty()) { - _this->_internal_set_key(from._internal_key()); - } - if (!from._internal_value().empty()) { - _this->_internal_set_value(from._internal_value()); - } - _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_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.key_, &other->_impl_.key_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena); -} - -// =================================================================== - -class TensorAnnotation::_Internal { - public: -}; - -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) - : quant_parameter_tensor_names_{visibility, arena, from.quant_parameter_tensor_names_}, - tensor_name_(arena, from.tensor_name_), - _cached_size_{0} {} - -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) - : quant_parameter_tensor_names_{visibility, arena}, - tensor_name_(arena), - _cached_size_{0} {} - -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, 41, 2> TensorAnnotation::_table_ = { - { - 0, // no _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_)}}, - // string tensor_name = 1; - {::_pbi::TcParser::FastUS1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_.tensor_name_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // string tensor_name = 1; - {PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_.tensor_name_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .onnx.StringStringEntryProto quant_parameter_tensor_names = 2; - {PROTOBUF_FIELD_OFFSET(TensorAnnotation, _impl_.quant_parameter_tensor_names_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, {{ - {::_pbi::TcParser::GetTable<::onnx::StringStringEntryProto>()}, - }}, {{ - "\25\13\0\0\0\0\0\0" - "onnx.TensorAnnotation" - "tensor_name" - }}, -}; - -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(); - _impl_.tensor_name_.ClearToEmpty(); - _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; - - // string tensor_name = 1; - if (!this_._internal_tensor_name().empty()) { - const std::string& _s = this_._internal_tensor_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.TensorAnnotation.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); - } - } - } - { - // string tensor_name = 1; - if (!this_._internal_tensor_name().empty()) { - 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()); - if (!from._internal_tensor_name().empty()) { - _this->_internal_set_tensor_name(from._internal_tensor_name()); - } - _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_); - _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: -}; - -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) - : 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_), - _cached_size_{0} {} - -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) - : 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), - _cached_size_{0} {} - -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, 46, 2> GraphProto::_table_ = { - { - 0, // no _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_)}}, - // string name = 2; - {::_pbi::TcParser::FastUS1, - {18, 63, 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, {}}, - // string doc_string = 10; - {::_pbi::TcParser::FastUS1, - {82, 63, 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_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // string name = 2; - {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.name_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .onnx.TensorProto initializer = 5; - {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.initializer_), 0, 1, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // string doc_string = 10; - {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.doc_string_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .onnx.ValueInfoProto input = 11; - {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.input_), 0, 2, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .onnx.ValueInfoProto output = 12; - {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.output_), 0, 3, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .onnx.ValueInfoProto value_info = 13; - {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.value_info_), 0, 4, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .onnx.TensorAnnotation quantization_annotation = 14; - {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.quantization_annotation_), 0, 5, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .onnx.SparseTensorProto sparse_initializer = 15; - {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.sparse_initializer_), 0, 6, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .onnx.StringStringEntryProto metadata_props = 16; - {PROTOBUF_FIELD_OFFSET(GraphProto, _impl_.metadata_props_), 0, 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>()}, - }}, {{ - "\17\0\4\0\12\0\0\0\0\0\0\0\0\0\0\0" - "onnx.GraphProto" - "name" - "doc_string" - }}, -}; - -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(); - _impl_.name_.ClearToEmpty(); - _impl_.doc_string_.ClearToEmpty(); - _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); - } - - // string name = 2; - if (!this_._internal_name().empty()) { - const std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.GraphProto.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); - } - - // string doc_string = 10; - if (!this_._internal_doc_string().empty()) { - const std::string& _s = this_._internal_doc_string(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.GraphProto.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); - } - } - } - { - // string name = 2; - if (!this_._internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // string doc_string = 10; - if (!this_._internal_doc_string().empty()) { - 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()); - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } - if (!from._internal_doc_string().empty()) { - _this->_internal_set_doc_string(from._internal_doc_string()); - } - _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_); - _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: -}; - -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_ = { - { - 0, // no _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 - }, {{ - // int64 end = 2; - {::_pbi::TcParser::FastV64S1, - {16, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.end_)}}, - // int64 begin = 1; - {::_pbi::TcParser::FastV64S1, - {8, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.begin_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // int64 begin = 1; - {PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.begin_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kInt64)}, - // int64 end = 2; - {PROTOBUF_FIELD_OFFSET(TensorProto_Segment, _impl_.end_), 0, 0, - (0 | ::_fl::kFcSingular | ::_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; - - ::memset(&_impl_.begin_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.end_) - - reinterpret_cast(&_impl_.begin_)) + sizeof(_impl_.end_)); - _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; - - // int64 begin = 1; - if (this_._internal_begin() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt64ToArrayWithField<1>( - stream, this_._internal_begin(), target); - } - - // int64 end = 2; - if (this_._internal_end() != 0) { - 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_); - { - // int64 begin = 1; - if (this_._internal_begin() != 0) { - total_size += ::_pbi::WireFormatLite::Int64SizePlusOne( - this_._internal_begin()); - } - // int64 end = 2; - if (this_._internal_end() != 0) { - 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; - - if (from._internal_begin() != 0) { - _this->_impl_.begin_ = from._impl_.begin_; - } - if (from._internal_end() != 0) { - _this->_impl_.end_ = from._impl_.end_; - } - _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_); - ::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_}, - _dims_cached_byte_size_{0}, - 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 & 0x00000001u) ? ::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}, - _dims_cached_byte_size_{0}, - 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, 3, 47, 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 - 3, // 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::FastV64P1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.dims_)}}, - // int32 data_type = 2; - {::_pbi::TcParser::FastV32S1, - {16, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.data_type_)}}, - // .onnx.TensorProto.Segment segment = 3; - {::_pbi::TcParser::FastMtS1, - {26, 0, 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_)}}, - // string name = 8; - {::_pbi::TcParser::FastUS1, - {66, 63, 0, PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.name_)}}, - // bytes raw_data = 9; - {::_pbi::TcParser::FastBS1, - {74, 63, 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_)}}, - // string doc_string = 12; - {::_pbi::TcParser::FastUS1, - {98, 63, 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_)}}, - // .onnx.TensorProto.DataLocation data_location = 14; - {::_pbi::TcParser::FastV32S1, - {112, 63, 0, 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::kPackedInt64)}, - // int32 data_type = 2; - {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.data_type_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, - // .onnx.TensorProto.Segment segment = 3; - {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.segment_), _Internal::kHasBitsOffset + 0, 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)}, - // string name = 8; - {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.name_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // bytes raw_data = 9; - {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.raw_data_), -1, 0, - (0 | ::_fl::kFcSingular | ::_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)}, - // string doc_string = 12; - {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.doc_string_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .onnx.StringStringEntryProto external_data = 13; - {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.external_data_), -1, 1, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // .onnx.TensorProto.DataLocation data_location = 14; - {PROTOBUF_FIELD_OFFSET(TensorProto, _impl_.data_location_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, - // 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>()}, - }}, {{ - "\20\0\0\0\0\0\0\0\4\0\0\0\12\0\0\0" - "onnx.TensorProto" - "name" - "doc_string" - }}, -}; - -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(); - _impl_.name_.ClearToEmpty(); - _impl_.raw_data_.ClearToEmpty(); - _impl_.doc_string_.ClearToEmpty(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - ABSL_DCHECK(_impl_.segment_ != nullptr); - _impl_.segment_->Clear(); - } - ::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; - { - int byte_size = this_._impl_._dims_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteInt64Packed( - 1, this_._internal_dims(), byte_size, target); - } - } - - // int32 data_type = 2; - if (this_._internal_data_type() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<2>( - stream, this_._internal_data_type(), target); - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // .onnx.TensorProto.Segment segment = 3; - if (cached_has_bits & 0x00000001u) { - 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); - } - } - - // string name = 8; - if (!this_._internal_name().empty()) { - const std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.TensorProto.name"); - target = stream->WriteStringMaybeAliased(8, _s, target); - } - - // bytes raw_data = 9; - if (!this_._internal_raw_data().empty()) { - 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); - } - } - - // string doc_string = 12; - if (!this_._internal_doc_string().empty()) { - const std::string& _s = this_._internal_doc_string(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.TensorProto.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); - } - - // .onnx.TensorProto.DataLocation data_location = 14; - if (this_._internal_data_location() != 0) { - 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; - { - total_size += - ::_pbi::WireFormatLite::Int64SizeWithPackedTagSize( - this_._internal_dims(), 1, - this_._impl_._dims_cached_byte_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); - } - } - } - { - // string name = 8; - if (!this_._internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // bytes raw_data = 9; - if (!this_._internal_raw_data().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( - this_._internal_raw_data()); - } - // string doc_string = 12; - if (!this_._internal_doc_string().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_doc_string()); - } - } - { - // .onnx.TensorProto.Segment segment = 3; - cached_has_bits = this_._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.segment_); - } - } - { - // int32 data_type = 2; - if (this_._internal_data_type() != 0) { - total_size += ::_pbi::WireFormatLite::Int32SizePlusOne( - this_._internal_data_type()); - } - // .onnx.TensorProto.DataLocation data_location = 14; - if (this_._internal_data_location() != 0) { - 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()); - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } - if (!from._internal_raw_data().empty()) { - _this->_internal_set_raw_data(from._internal_raw_data()); - } - if (!from._internal_doc_string().empty()) { - _this->_internal_set_doc_string(from._internal_doc_string()); - } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - 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 (from._internal_data_type() != 0) { - _this->_impl_.data_type_ = from._impl_.data_type_; - } - if (from._internal_data_location() != 0) { - _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_}, - _dims_cached_byte_size_{0} {} - -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}, - _dims_cached_byte_size_{0} {} - -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, {}}, - // .onnx.TensorProto values = 1; - {::_pbi::TcParser::FastMtS1, - {10, 0, 0, PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.values_)}}, - // .onnx.TensorProto indices = 2; - {::_pbi::TcParser::FastMtS1, - {18, 1, 1, PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.indices_)}}, - // repeated int64 dims = 3; - {::_pbi::TcParser::FastV64P1, - {26, 63, 0, PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.dims_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .onnx.TensorProto values = 1; - {PROTOBUF_FIELD_OFFSET(SparseTensorProto, _impl_.values_), _Internal::kHasBitsOffset + 0, 0, - (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // .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::kPackedInt64)}, - }}, {{ - {::_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]; - // .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); - } - - // .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; - { - int byte_size = this_._impl_._dims_cached_byte_size_.Get(); - if (byte_size > 0) { - target = stream->WriteInt64Packed( - 3, this_._internal_dims(), byte_size, 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; - { - total_size += - ::_pbi::WireFormatLite::Int64SizeWithPackedTagSize( - this_._internal_dims(), 1, - this_._impl_._dims_cached_byte_size_); - } - } - cached_has_bits = this_._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // .onnx.TensorProto values = 1; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.values_); - } - // .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: - 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) - : denotation_(arena, from.denotation_), - value_{}, - _cached_size_{0}, - _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) - : denotation_(arena), - value_{}, - _cached_size_{0}, - _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, 59, 2> TensorShapeProto_Dimension::_table_ = { - { - 0, // no _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 - }, {{ - // string denotation = 3; - {::_pbi::TcParser::FastUS1, - {26, 63, 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::kUtf8String | ::_fl::kRepAString)}, - // string denotation = 3; - {PROTOBUF_FIELD_OFFSET(TensorShapeProto_Dimension, _impl_.denotation_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - }}, - // no aux_entries - {{ - "\37\0\11\12\0\0\0\0" - "onnx.TensorShapeProto.Dimension" - "dim_param" - "denotation" - }}, -}; - -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; - - _impl_.denotation_.ClearToEmpty(); - clear_value(); - _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(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.TensorShapeProto.Dimension.dim_param"); - target = stream->WriteStringMaybeAliased(2, _s, target); - break; - } - default: - break; - } - // string denotation = 3; - if (!this_._internal_denotation().empty()) { - const std::string& _s = this_._internal_denotation(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.TensorShapeProto.Dimension.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; - - { - // string denotation = 3; - if (!this_._internal_denotation().empty()) { - 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; - - if (!from._internal_denotation().empty()) { - _this->_internal_set_denotation(from._internal_denotation()); - } - 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_); - ::_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 - }, {{ - // .onnx.TensorShapeProto shape = 2; - {::_pbi::TcParser::FastMtS1, - {18, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.shape_)}}, - // int32 elem_type = 1; - {::_pbi::TcParser::FastV32S1, - {8, 63, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.elem_type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // int32 elem_type = 1; - {PROTOBUF_FIELD_OFFSET(TypeProto_Tensor, _impl_.elem_type_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, - // .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; - - // int32 elem_type = 1; - if (this_._internal_elem_type() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<1>( - stream, this_._internal_elem_type(), target); - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // .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_); - { - // .onnx.TensorShapeProto shape = 2; - cached_has_bits = this_._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.shape_); - } - } - { - // int32 elem_type = 1; - if (this_._internal_elem_type() != 0) { - 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 & 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 (from._internal_elem_type() != 0) { - _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 - }, {{ - // .onnx.TypeProto elem_type = 1; - {::_pbi::TcParser::FastMtS1, - {10, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Sequence, _impl_.elem_type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .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]; - // .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; - - { - // .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 - }, {{ - // .onnx.TypeProto value_type = 2; - {::_pbi::TcParser::FastMtS1, - {18, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_.value_type_)}}, - // int32 key_type = 1; - {::_pbi::TcParser::FastV32S1, - {8, 63, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_.key_type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // int32 key_type = 1; - {PROTOBUF_FIELD_OFFSET(TypeProto_Map, _impl_.key_type_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, - // .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; - - // int32 key_type = 1; - if (this_._internal_key_type() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<1>( - stream, this_._internal_key_type(), target); - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // .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_); - { - // .onnx.TypeProto value_type = 2; - cached_has_bits = this_._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.value_type_); - } - } - { - // int32 key_type = 1; - if (this_._internal_key_type() != 0) { - 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 & 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 (from._internal_key_type() != 0) { - _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 - }, {{ - // .onnx.TypeProto elem_type = 1; - {::_pbi::TcParser::FastMtS1, - {10, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_Optional, _impl_.elem_type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // .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]; - // .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; - - { - // .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 - }, {{ - // .onnx.TensorShapeProto shape = 2; - {::_pbi::TcParser::FastMtS1, - {18, 0, 0, PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_.shape_)}}, - // int32 elem_type = 1; - {::_pbi::TcParser::FastV32S1, - {8, 63, 0, PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_.elem_type_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // int32 elem_type = 1; - {PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, _impl_.elem_type_), -1, 0, - (0 | ::_fl::kFcSingular | ::_fl::kInt32)}, - // .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; - - // int32 elem_type = 1; - if (this_._internal_elem_type() != 0) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32ToArrayWithField<1>( - stream, this_._internal_elem_type(), target); - } - - cached_has_bits = this_._impl_._has_bits_[0]; - // .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_); - { - // .onnx.TensorShapeProto shape = 2; - cached_has_bits = this_._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.shape_); - } - } - { - // int32 elem_type = 1; - if (this_._internal_elem_type() != 0) { - 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 & 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 (from._internal_elem_type() != 0) { - _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: - 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) - : denotation_(arena, from.denotation_), - value_{}, - _cached_size_{0}, - _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) - : denotation_(arena), - value_{}, - _cached_size_{0}, - _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, 33, 2> TypeProto::_table_ = { - { - 0, // no _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 - }, {{ - // string denotation = 6; - {::_pbi::TcParser::FastUS1, - {50, 63, 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)}, - // string denotation = 6; - {PROTOBUF_FIELD_OFFSET(TypeProto, _impl_.denotation_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_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>()}, - }}, {{ - "\16\0\0\0\12\0\0\0" - "onnx.TypeProto" - "denotation" - }}, -}; - -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; - - _impl_.denotation_.ClearToEmpty(); - clear_value(); - _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; - } - // string denotation = 6; - if (!this_._internal_denotation().empty()) { - const std::string& _s = this_._internal_denotation(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.TypeProto.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; - - { - // string denotation = 6; - if (!this_._internal_denotation().empty()) { - 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; - - if (!from._internal_denotation().empty()) { - _this->_internal_set_denotation(from._internal_denotation()); - } - 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_); - ::_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: -}; - -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) - : domain_(arena, from.domain_), - _cached_size_{0} {} - -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) - : domain_(arena), - _cached_size_{0} {} - -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, 38, 2> OperatorSetIdProto::_table_ = { - { - 0, // no _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 - }, {{ - // int64 version = 2; - {::_pbi::TcParser::FastV64S1, - {16, 63, 0, PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_.version_)}}, - // string domain = 1; - {::_pbi::TcParser::FastUS1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_.domain_)}}, - }}, {{ - 65535, 65535 - }}, {{ - // string domain = 1; - {PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_.domain_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // int64 version = 2; - {PROTOBUF_FIELD_OFFSET(OperatorSetIdProto, _impl_.version_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kInt64)}, - }}, - // no aux_entries - {{ - "\27\6\0\0\0\0\0\0" - "onnx.OperatorSetIdProto" - "domain" - }}, -}; - -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; - - _impl_.domain_.ClearToEmpty(); - _impl_.version_ = ::int64_t{0}; - _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; - - // string domain = 1; - if (!this_._internal_domain().empty()) { - const std::string& _s = this_._internal_domain(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.OperatorSetIdProto.domain"); - target = stream->WriteStringMaybeAliased(1, _s, target); - } - - // int64 version = 2; - if (this_._internal_version() != 0) { - 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_); - { - // string domain = 1; - if (!this_._internal_domain().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_domain()); - } - // int64 version = 2; - if (this_._internal_version() != 0) { - 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; - - if (!from._internal_domain().empty()) { - _this->_internal_set_domain(from._internal_domain()); - } - if (from._internal_version() != 0) { - _this->_impl_.version_ = from._impl_.version_; - } - _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_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.domain_, &other->_impl_.domain_, arena); - swap(_impl_.version_, other->_impl_.version_); -} - -// =================================================================== - -class FunctionProto::_Internal { - public: -}; - -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) - : 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_), - _cached_size_{0} {} - -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) - : 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), - _cached_size_{0} {} - -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, 83, 2> FunctionProto::_table_ = { - { - 0, // no _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, {}}, - // string name = 1; - {::_pbi::TcParser::FastUS1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.name_)}}, - {::_pbi::TcParser::MiniParse, {}}, - {::_pbi::TcParser::MiniParse, {}}, - // repeated string input = 4; - {::_pbi::TcParser::FastUR1, - {34, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.input_)}}, - // repeated string output = 5; - {::_pbi::TcParser::FastUR1, - {42, 63, 0, PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.output_)}}, - // repeated string attribute = 6; - {::_pbi::TcParser::FastUR1, - {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_)}}, - // string doc_string = 8; - {::_pbi::TcParser::FastUS1, - {66, 63, 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_)}}, - // string domain = 10; - {::_pbi::TcParser::FastUS1, - {82, 63, 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_)}}, - // string overload = 13; - {::_pbi::TcParser::FastUS1, - {106, 63, 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 - }}, {{ - // string name = 1; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.name_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated string input = 4; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.input_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, - // repeated string output = 5; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.output_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, - // repeated string attribute = 6; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.attribute_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, - // repeated .onnx.NodeProto node = 7; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.node_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // string doc_string = 8; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.doc_string_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .onnx.OperatorSetIdProto opset_import = 9; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.opset_import_), 0, 1, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // string domain = 10; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.domain_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .onnx.AttributeProto attribute_proto = 11; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.attribute_proto_), 0, 2, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .onnx.ValueInfoProto value_info = 12; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.value_info_), 0, 3, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // string overload = 13; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.overload_), 0, 0, - (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated .onnx.StringStringEntryProto metadata_props = 14; - {PROTOBUF_FIELD_OFFSET(FunctionProto, _impl_.metadata_props_), 0, 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>()}, - }}, {{ - "\22\4\5\6\11\0\12\0\6\0\0\10\0\0\0\0" - "onnx.FunctionProto" - "name" - "input" - "output" - "attribute" - "doc_string" - "domain" - "overload" - }}, -}; - -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(); - _impl_.name_.ClearToEmpty(); - _impl_.doc_string_.ClearToEmpty(); - _impl_.domain_.ClearToEmpty(); - _impl_.overload_.ClearToEmpty(); - _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; - - // string name = 1; - if (!this_._internal_name().empty()) { - const std::string& _s = this_._internal_name(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.FunctionProto.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); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.FunctionProto.input"); - 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); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.FunctionProto.output"); - 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); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.FunctionProto.attribute"); - 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); - } - - // string doc_string = 8; - if (!this_._internal_doc_string().empty()) { - const std::string& _s = this_._internal_doc_string(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.FunctionProto.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); - } - - // string domain = 10; - if (!this_._internal_domain().empty()) { - const std::string& _s = this_._internal_domain(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.FunctionProto.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); - } - - // string overload = 13; - if (!this_._internal_overload().empty()) { - const std::string& _s = this_._internal_overload(); - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "onnx.FunctionProto.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); - } - } - } - { - // string name = 1; - if (!this_._internal_name().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_name()); - } - // string doc_string = 8; - if (!this_._internal_doc_string().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_doc_string()); - } - // string domain = 10; - if (!this_._internal_domain().empty()) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_domain()); - } - // string overload = 13; - if (!this_._internal_overload().empty()) { - 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()); - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } - if (!from._internal_doc_string().empty()) { - _this->_internal_set_doc_string(from._internal_doc_string()); - } - if (!from._internal_domain().empty()) { - _this->_internal_set_domain(from._internal_domain()); - } - if (!from._internal_overload().empty()) { - _this->_internal_set_overload(from._internal_overload()); - } - _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_); - _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/examples/neuralNetwork/proto/onnx.proto3.pb.h b/examples/neuralNetwork/proto/onnx.proto3.pb.h deleted file mode 100644 index f49f1166..00000000 --- a/examples/neuralNetwork/proto/onnx.proto3.pb.h +++ /dev/null @@ -1,12170 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: onnx.proto3 -// Protobuf C++ Version: 5.29.3 - -#ifndef onnx_2eproto3_2epb_2eh -#define onnx_2eproto3_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_2eproto3 - -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_2eproto3 { - 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, - AttributeProto_AttributeType_AttributeProto_AttributeType_INT_MIN_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::min(), - AttributeProto_AttributeType_AttributeProto_AttributeType_INT_MAX_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::max(), -}; - -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, - TensorProto_DataType_TensorProto_DataType_INT_MIN_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::min(), - TensorProto_DataType_TensorProto_DataType_INT_MAX_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::max(), -}; - -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, - TensorProto_DataLocation_TensorProto_DataLocation_INT_MIN_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::min(), - TensorProto_DataLocation_TensorProto_DataLocation_INT_MAX_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::max(), -}; - -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, - Version_INT_MIN_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::min(), - Version_INT_MAX_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::max(), -}; - -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, - OperatorStatus_INT_MIN_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::min(), - OperatorStatus_INT_MAX_SENTINEL_DO_NOT_USE_ = - std::numeric_limits<::int32_t>::max(), -}; - -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, - }; - // string denotation = 3; - 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, - 59, 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::ArenaStringPtr denotation_; - union ValueUnion { - constexpr ValueUnion() : _constinit_{} {} - ::google::protobuf::internal::ConstantInitialized _constinit_; - ::int64_t dim_value_; - ::google::protobuf::internal::ArenaStringPtr dim_param_; - } value_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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, - }; - // int64 begin = 1; - 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: - // int64 end = 2; - 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); - ::int64_t begin_; - ::int64_t end_; - ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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, - }; - // string key = 1; - 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: - // string value = 2; - 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, - 44, 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::ArenaStringPtr key_; - ::google::protobuf::internal::ArenaStringPtr value_; - ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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, - }; - // string domain = 1; - 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: - // int64 version = 2; - 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, - 38, 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::ArenaStringPtr domain_; - ::int64_t version_; - ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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_2eproto3; -}; -// ------------------------------------------------------------------- - -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; - // string name = 8; - 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: - // bytes raw_data = 9; - 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: - // string doc_string = 12; - 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: - // .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: - // int32 data_type = 2; - 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: - // .onnx.TensorProto.DataLocation data_location = 14; - 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, 3, - 47, 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::internal::CachedSize _dims_cached_byte_size_; - ::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_2eproto3; -}; -// ------------------------------------------------------------------- - -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; - // string tensor_name = 1; - 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, - 41, 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::RepeatedPtrField< ::onnx::StringStringEntryProto > quant_parameter_tensor_names_; - ::google::protobuf::internal::ArenaStringPtr tensor_name_; - ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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, - }; - // .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: - // int32 elem_type = 1; - 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_2eproto3; -}; -// ------------------------------------------------------------------- - -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, - }; - // .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: - // int32 elem_type = 1; - 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_2eproto3; -}; -// ------------------------------------------------------------------- - -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: - // .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: - // .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_; - ::google::protobuf::internal::CachedSize _dims_cached_byte_size_; - ::onnx::TensorProto* values_; - ::onnx::TensorProto* indices_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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, - }; - // string denotation = 6; - 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, - 33, 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::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_; - ::google::protobuf::internal::CachedSize _cached_size_; - ::uint32_t _oneof_case_[1]; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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, - }; - // .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: - // int32 key_type = 1; - 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_2eproto3; -}; -// ------------------------------------------------------------------- - -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, - }; - // .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_2eproto3; -}; -// ------------------------------------------------------------------- - -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, - }; - // .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_2eproto3; -}; -// ------------------------------------------------------------------- - -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; - // string name = 1; - 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: - // string doc_string = 3; - 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: - // .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, - 42, 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_2eproto3; -}; -// ------------------------------------------------------------------- - -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; - // string name = 1; - 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: - // bytes s = 4; - 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: - // string doc_string = 13; - 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: - // string ref_attr_name = 21; - 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: - // .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: - // .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: - // .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: - // .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: - // int64 i = 3; - 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: - // float f = 2; - void clear_f() ; - float f() const; - void set_f(float value); - - private: - float _internal_f() const; - void _internal_set_f(float value); - - public: - // .onnx.AttributeProto.AttributeType type = 20; - 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, 8, - 71, 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::internal::CachedSize _ints_cached_byte_size_; - ::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_2eproto3; -}; -// ------------------------------------------------------------------- - -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; - // string name = 2; - 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: - // string doc_string = 10; - 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, - 46, 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::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_; - ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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; - // string name = 3; - 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: - // string op_type = 4; - 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: - // string doc_string = 6; - 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: - // string domain = 7; - 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: - // string overload = 8; - 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, - 77, 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::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_; - ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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; - // .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: - // .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_2eproto3; -}; -// ------------------------------------------------------------------- - -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; - // string name = 1; - 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: - // string doc_string = 8; - 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: - // string domain = 10; - 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: - // string overload = 13; - 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, - 83, 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::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_; - ::google::protobuf::internal::CachedSize _cached_size_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_onnx_2eproto3; -}; -// ------------------------------------------------------------------- - -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; - // string producer_name = 2; - 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: - // string producer_version = 3; - 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: - // string domain = 4; - 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: - // string doc_string = 6; - 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: - // .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: - // int64 ir_version = 1; - 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: - // int64 model_version = 5; - 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, - 77, 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_2eproto3; -}; - -// =================================================================== - - - - -// =================================================================== - - -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// AttributeProto - -// string name = 1; -inline void AttributeProto::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); -} -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_.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_.name_.Set(value, GetArena()); -} -inline std::string* AttributeProto::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); -} -inline std::string* AttributeProto::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.AttributeProto.name) - return _impl_.name_.Release(); -} -inline void AttributeProto::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string ref_attr_name = 21; -inline void AttributeProto::clear_ref_attr_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.ref_attr_name_.ClearToEmpty(); -} -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_.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_.ref_attr_name_.Set(value, GetArena()); -} -inline std::string* AttributeProto::_internal_mutable_ref_attr_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.ref_attr_name_.Release(); -} -inline void AttributeProto::set_allocated_ref_attr_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string doc_string = 13; -inline void AttributeProto::clear_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.doc_string_.ClearToEmpty(); -} -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_.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_.doc_string_.Set(value, GetArena()); -} -inline std::string* AttributeProto::_internal_mutable_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.doc_string_.Release(); -} -inline void AttributeProto::set_allocated_doc_string(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// .onnx.AttributeProto.AttributeType type = 20; -inline void AttributeProto::clear_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.type_ = 0; -} -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); - // @@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_); - _impl_.type_ = value; -} - -// float f = 2; -inline void AttributeProto::clear_f() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.f_ = 0; -} -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); - // @@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; -} - -// int64 i = 3; -inline void AttributeProto::clear_i() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.i_ = ::int64_t{0}; -} -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); - // @@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; -} - -// bytes s = 4; -inline void AttributeProto::clear_s() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.s_.ClearToEmpty(); -} -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_.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_.s_.Set(value, GetArena()); -} -inline std::string* AttributeProto::_internal_mutable_s() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.s_.Mutable( GetArena()); -} -inline std::string* AttributeProto::release_s() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.AttributeProto.s) - return _impl_.s_.Release(); -} -inline void AttributeProto::set_allocated_s(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// .onnx.TensorProto t = 5; -inline bool AttributeProto::has_t() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 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] &= ~0x00000001u; -} -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] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@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] &= ~0x00000001u; - ::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] &= ~0x00000001u; - ::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] |= 0x00000001u; - ::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] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - - _impl_.t_ = reinterpret_cast<::onnx::TensorProto*>(value); - // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.t) -} - -// .onnx.GraphProto g = 6; -inline bool AttributeProto::has_g() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 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] &= ~0x00000002u; -} -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] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - // @@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] &= ~0x00000002u; - ::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] &= ~0x00000002u; - ::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] |= 0x00000002u; - ::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] |= 0x00000002u; - } else { - _impl_._has_bits_[0] &= ~0x00000002u; - } - - _impl_.g_ = reinterpret_cast<::onnx::GraphProto*>(value); - // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.g) -} - -// .onnx.SparseTensorProto sparse_tensor = 22; -inline bool AttributeProto::has_sparse_tensor() const { - bool value = (_impl_._has_bits_[0] & 0x00000008u) != 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] &= ~0x00000008u; -} -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] |= 0x00000008u; - } else { - _impl_._has_bits_[0] &= ~0x00000008u; - } - // @@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] &= ~0x00000008u; - ::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] &= ~0x00000008u; - ::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] |= 0x00000008u; - ::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] |= 0x00000008u; - } else { - _impl_._has_bits_[0] &= ~0x00000008u; - } - - _impl_.sparse_tensor_ = reinterpret_cast<::onnx::SparseTensorProto*>(value); - // @@protoc_insertion_point(field_set_allocated:onnx.AttributeProto.sparse_tensor) -} - -// .onnx.TypeProto tp = 14; -inline bool AttributeProto::has_tp() const { - bool value = (_impl_._has_bits_[0] & 0x00000004u) != 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] &= ~0x00000004u; -} -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] |= 0x00000004u; - } else { - _impl_._has_bits_[0] &= ~0x00000004u; - } - // @@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] &= ~0x00000004u; - ::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] &= ~0x00000004u; - ::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] |= 0x00000004u; - ::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] |= 0x00000004u; - } else { - _impl_._has_bits_[0] &= ~0x00000004u; - } - - _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 - -// string name = 1; -inline void ValueInfoProto::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); -} -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_.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_.name_.Set(value, GetArena()); -} -inline std::string* ValueInfoProto::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); -} -inline std::string* ValueInfoProto::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.ValueInfoProto.name) - return _impl_.name_.Release(); -} -inline void ValueInfoProto::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// .onnx.TypeProto type = 2; -inline bool ValueInfoProto::has_type() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 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] &= ~0x00000001u; -} -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] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@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] &= ~0x00000001u; - ::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] &= ~0x00000001u; - ::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] |= 0x00000001u; - ::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] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - - _impl_.type_ = reinterpret_cast<::onnx::TypeProto*>(value); - // @@protoc_insertion_point(field_set_allocated:onnx.ValueInfoProto.type) -} - -// string doc_string = 3; -inline void ValueInfoProto::clear_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.doc_string_.ClearToEmpty(); -} -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_.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_.doc_string_.Set(value, GetArena()); -} -inline std::string* ValueInfoProto::_internal_mutable_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.doc_string_.Release(); -} -inline void ValueInfoProto::set_allocated_doc_string(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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_; -} - -// string name = 3; -inline void NodeProto::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); -} -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_.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_.name_.Set(value, GetArena()); -} -inline std::string* NodeProto::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); -} -inline std::string* NodeProto::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.NodeProto.name) - return _impl_.name_.Release(); -} -inline void NodeProto::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string op_type = 4; -inline void NodeProto::clear_op_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.op_type_.ClearToEmpty(); -} -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_.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_.op_type_.Set(value, GetArena()); -} -inline std::string* NodeProto::_internal_mutable_op_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.op_type_.Release(); -} -inline void NodeProto::set_allocated_op_type(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string domain = 7; -inline void NodeProto::clear_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.domain_.ClearToEmpty(); -} -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_.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_.domain_.Set(value, GetArena()); -} -inline std::string* NodeProto::_internal_mutable_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.domain_.Mutable( GetArena()); -} -inline std::string* NodeProto::release_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.NodeProto.domain) - return _impl_.domain_.Release(); -} -inline void NodeProto::set_allocated_domain(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string overload = 8; -inline void NodeProto::clear_overload() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.overload_.ClearToEmpty(); -} -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_.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_.overload_.Set(value, GetArena()); -} -inline std::string* NodeProto::_internal_mutable_overload() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.overload_.Mutable( GetArena()); -} -inline std::string* NodeProto::release_overload() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.NodeProto.overload) - return _impl_.overload_.Release(); -} -inline void NodeProto::set_allocated_overload(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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_; -} - -// string doc_string = 6; -inline void NodeProto::clear_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.doc_string_.ClearToEmpty(); -} -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_.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_.doc_string_.Set(value, GetArena()); -} -inline std::string* NodeProto::_internal_mutable_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.doc_string_.Release(); -} -inline void NodeProto::set_allocated_doc_string(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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 - -// .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) -} - -// .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 - -// int64 ir_version = 1; -inline void ModelProto::clear_ir_version() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.ir_version_ = ::int64_t{0}; -} -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); - // @@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_; -} - -// string producer_name = 2; -inline void ModelProto::clear_producer_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.producer_name_.ClearToEmpty(); -} -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_.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_.producer_name_.Set(value, GetArena()); -} -inline std::string* ModelProto::_internal_mutable_producer_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.producer_name_.Release(); -} -inline void ModelProto::set_allocated_producer_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string producer_version = 3; -inline void ModelProto::clear_producer_version() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.producer_version_.ClearToEmpty(); -} -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_.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_.producer_version_.Set(value, GetArena()); -} -inline std::string* ModelProto::_internal_mutable_producer_version() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.producer_version_.Release(); -} -inline void ModelProto::set_allocated_producer_version(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string domain = 4; -inline void ModelProto::clear_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.domain_.ClearToEmpty(); -} -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_.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_.domain_.Set(value, GetArena()); -} -inline std::string* ModelProto::_internal_mutable_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.domain_.Mutable( GetArena()); -} -inline std::string* ModelProto::release_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.ModelProto.domain) - return _impl_.domain_.Release(); -} -inline void ModelProto::set_allocated_domain(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// int64 model_version = 5; -inline void ModelProto::clear_model_version() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.model_version_ = ::int64_t{0}; -} -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); - // @@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; -} - -// string doc_string = 6; -inline void ModelProto::clear_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.doc_string_.ClearToEmpty(); -} -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_.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_.doc_string_.Set(value, GetArena()); -} -inline std::string* ModelProto::_internal_mutable_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.doc_string_.Release(); -} -inline void ModelProto::set_allocated_doc_string(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// .onnx.GraphProto graph = 7; -inline bool ModelProto::has_graph() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 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] &= ~0x00000001u; -} -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] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@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] &= ~0x00000001u; - ::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] &= ~0x00000001u; - ::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] |= 0x00000001u; - ::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] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - - _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 - -// string key = 1; -inline void StringStringEntryProto::clear_key() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.key_.ClearToEmpty(); -} -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_.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_.key_.Set(value, GetArena()); -} -inline std::string* StringStringEntryProto::_internal_mutable_key() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.key_.Mutable( GetArena()); -} -inline std::string* StringStringEntryProto::release_key() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.StringStringEntryProto.key) - return _impl_.key_.Release(); -} -inline void StringStringEntryProto::set_allocated_key(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string value = 2; -inline void StringStringEntryProto::clear_value() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.value_.ClearToEmpty(); -} -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_.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_.value_.Set(value, GetArena()); -} -inline std::string* StringStringEntryProto::_internal_mutable_value() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.value_.Mutable( GetArena()); -} -inline std::string* StringStringEntryProto::release_value() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.StringStringEntryProto.value) - return _impl_.value_.Release(); -} -inline void StringStringEntryProto::set_allocated_value(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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 - -// string tensor_name = 1; -inline void TensorAnnotation::clear_tensor_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.tensor_name_.ClearToEmpty(); -} -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_.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_.tensor_name_.Set(value, GetArena()); -} -inline std::string* TensorAnnotation::_internal_mutable_tensor_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.tensor_name_.Release(); -} -inline void TensorAnnotation::set_allocated_tensor_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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_; -} - -// string name = 2; -inline void GraphProto::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); -} -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_.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_.name_.Set(value, GetArena()); -} -inline std::string* GraphProto::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); -} -inline std::string* GraphProto::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.GraphProto.name) - return _impl_.name_.Release(); -} -inline void GraphProto::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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_; -} - -// string doc_string = 10; -inline void GraphProto::clear_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.doc_string_.ClearToEmpty(); -} -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_.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_.doc_string_.Set(value, GetArena()); -} -inline std::string* GraphProto::_internal_mutable_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.doc_string_.Release(); -} -inline void GraphProto::set_allocated_doc_string(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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 - -// int64 begin = 1; -inline void TensorProto_Segment::clear_begin() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.begin_ = ::int64_t{0}; -} -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); - // @@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; -} - -// int64 end = 2; -inline void TensorProto_Segment::clear_end() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.end_ = ::int64_t{0}; -} -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); - // @@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_; -} - -// int32 data_type = 2; -inline void TensorProto::clear_data_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.data_type_ = 0; -} -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); - // @@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; -} - -// .onnx.TensorProto.Segment segment = 3; -inline bool TensorProto::has_segment() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 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] &= ~0x00000001u; -} -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] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@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] &= ~0x00000001u; - ::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] &= ~0x00000001u; - ::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] |= 0x00000001u; - ::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] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - - _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_; -} - -// string name = 8; -inline void TensorProto::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); -} -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_.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_.name_.Set(value, GetArena()); -} -inline std::string* TensorProto::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); -} -inline std::string* TensorProto::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.TensorProto.name) - return _impl_.name_.Release(); -} -inline void TensorProto::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string doc_string = 12; -inline void TensorProto::clear_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.doc_string_.ClearToEmpty(); -} -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_.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_.doc_string_.Set(value, GetArena()); -} -inline std::string* TensorProto::_internal_mutable_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.doc_string_.Release(); -} -inline void TensorProto::set_allocated_doc_string(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// bytes raw_data = 9; -inline void TensorProto::clear_raw_data() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.raw_data_.ClearToEmpty(); -} -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_.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_.raw_data_.Set(value, GetArena()); -} -inline std::string* TensorProto::_internal_mutable_raw_data() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.raw_data_.Release(); -} -inline void TensorProto::set_allocated_raw_data(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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_; -} - -// .onnx.TensorProto.DataLocation data_location = 14; -inline void TensorProto::clear_data_location() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.data_location_ = 0; -} -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); - // @@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_); - _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 - -// .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) -} - -// .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) -} - -// string denotation = 3; -inline void TensorShapeProto_Dimension::clear_denotation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.denotation_.ClearToEmpty(); -} -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_.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_.denotation_.Set(value, GetArena()); -} -inline std::string* TensorShapeProto_Dimension::_internal_mutable_denotation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.denotation_.Release(); -} -inline void TensorShapeProto_Dimension::set_allocated_denotation(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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 - -// int32 elem_type = 1; -inline void TypeProto_Tensor::clear_elem_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.elem_type_ = 0; -} -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); - // @@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; -} - -// .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 - -// .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 - -// int32 key_type = 1; -inline void TypeProto_Map::clear_key_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.key_type_ = 0; -} -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); - // @@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; -} - -// .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 - -// .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 - -// int32 elem_type = 1; -inline void TypeProto_SparseTensor::clear_elem_type() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.elem_type_ = 0; -} -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); - // @@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; -} - -// .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; -} - -// string denotation = 6; -inline void TypeProto::clear_denotation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.denotation_.ClearToEmpty(); -} -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_.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_.denotation_.Set(value, GetArena()); -} -inline std::string* TypeProto::_internal_mutable_denotation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.denotation_.Mutable( GetArena()); -} -inline std::string* TypeProto::release_denotation() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.TypeProto.denotation) - return _impl_.denotation_.Release(); -} -inline void TypeProto::set_allocated_denotation(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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 - -// string domain = 1; -inline void OperatorSetIdProto::clear_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.domain_.ClearToEmpty(); -} -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_.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_.domain_.Set(value, GetArena()); -} -inline std::string* OperatorSetIdProto::_internal_mutable_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.domain_.Mutable( GetArena()); -} -inline std::string* OperatorSetIdProto::release_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.OperatorSetIdProto.domain) - return _impl_.domain_.Release(); -} -inline void OperatorSetIdProto::set_allocated_domain(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// int64 version = 2; -inline void OperatorSetIdProto::clear_version() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.version_ = ::int64_t{0}; -} -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); - // @@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 - -// string name = 1; -inline void FunctionProto::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.name_.ClearToEmpty(); -} -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_.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_.name_.Set(value, GetArena()); -} -inline std::string* FunctionProto::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.name_.Mutable( GetArena()); -} -inline std::string* FunctionProto::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.FunctionProto.name) - return _impl_.name_.Release(); -} -inline void FunctionProto::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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_; -} - -// string doc_string = 8; -inline void FunctionProto::clear_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.doc_string_.ClearToEmpty(); -} -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_.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_.doc_string_.Set(value, GetArena()); -} -inline std::string* FunctionProto::_internal_mutable_doc_string() { - ::google::protobuf::internal::TSanWrite(&_impl_); - 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) - return _impl_.doc_string_.Release(); -} -inline void FunctionProto::set_allocated_doc_string(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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_; -} - -// string domain = 10; -inline void FunctionProto::clear_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.domain_.ClearToEmpty(); -} -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_.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_.domain_.Set(value, GetArena()); -} -inline std::string* FunctionProto::_internal_mutable_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.domain_.Mutable( GetArena()); -} -inline std::string* FunctionProto::release_domain() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.FunctionProto.domain) - return _impl_.domain_.Release(); -} -inline void FunctionProto::set_allocated_domain(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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) -} - -// string overload = 13; -inline void FunctionProto::clear_overload() { - ::google::protobuf::internal::TSanWrite(&_impl_); - _impl_.overload_.ClearToEmpty(); -} -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_.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_.overload_.Set(value, GetArena()); -} -inline std::string* FunctionProto::_internal_mutable_overload() { - ::google::protobuf::internal::TSanWrite(&_impl_); - return _impl_.overload_.Mutable( GetArena()); -} -inline std::string* FunctionProto::release_overload() { - ::google::protobuf::internal::TSanWrite(&_impl_); - // @@protoc_insertion_point(field_release:onnx.FunctionProto.overload) - return _impl_.overload_.Release(); -} -inline void FunctionProto::set_allocated_overload(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); - _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_2eproto3_2epb_2eh diff --git a/extern/aclMock/acl.cpp b/extern/aclMock/acl.cpp new file mode 100644 index 00000000..eaa4d632 --- /dev/null +++ b/extern/aclMock/acl.cpp @@ -0,0 +1,50 @@ +#include "acl/acl.h" + +ACL_FUNC_VISIBILITY aclError aclInit(const char *configPath) { return 0; } +ACL_FUNC_VISIBILITY aclError aclFinalize() { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtSetCurrentContext(aclrtContext context) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtMalloc(void **devPtr, size_t size, aclrtMemMallocPolicy policy) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtFree(void *devPtr) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtMallocHost(void **hostPtr, size_t size) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtFreeHost(void *hostPtr) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtMemcpy(void *dst, size_t destMax, const void *src, size_t count, aclrtMemcpyKind kind) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtMemset(void *devPtr, size_t maxCount, int32_t value, size_t count) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst, size_t destMax, const void *src, size_t count, aclrtMemcpyKind kind, aclrtStream stream) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtCreateContext(aclrtContext *context, int32_t deviceId) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtGetCurrentContext(aclrtContext *context) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtDestroyContext(aclrtContext context) { return 0; } +ACL_FUNC_VISIBILITY aclError aclDestroyDataBuffer(const aclDataBuffer *dataBuffer) { return 0; } +ACL_FUNC_VISIBILITY aclDataBuffer *aclCreateDataBuffer(void *data, size_t size) { return nullptr; } +ACL_FUNC_VISIBILITY aclError aclrtGetMemInfo(aclrtMemAttr attr, size_t *free, size_t *total) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtDeviceEnablePeerAccess(int32_t peerDeviceId, uint32_t flags) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtDeviceCanAccessPeer(int32_t *canAccessPeer, int32_t deviceId, int32_t peerDeviceId) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtGetDeviceCount(uint32_t *count) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtSetDevice(int32_t deviceId) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtCreateEvent(aclrtEvent *event) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtDestroyEvent(aclrtEvent event) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtRecordEvent(aclrtEvent event, aclrtStream stream) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtCreateStreamWithConfig(aclrtStream *stream, uint32_t priority, uint32_t flag) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtSynchronizeStream(aclrtStream stream) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtQueryEventStatus(aclrtEvent event, aclrtEventRecordedStatus *status) { return 0; } +ACL_FUNC_VISIBILITY aclError aclrtDestroyStream(aclrtStream stream) { return 0; } +ACL_FUNC_VISIBILITY aclError aclopSetModelDir(const char *modelDir) { return 0; } +ACL_FUNC_VISIBILITY aclError aclopLoad(const void *model, size_t modelSize) { return 0; } +ACL_FUNC_VISIBILITY aclError aclopExecuteV2(const char *opType, + int numInputs, + aclTensorDesc *inputDesc[], + aclDataBuffer *inputs[], + int numOutputs, + aclTensorDesc *outputDesc[], + aclDataBuffer *outputs[], + aclopAttr *attr, + aclrtStream stream) +{ + return 0; +} +ACL_FUNC_VISIBILITY aclopAttr *aclopCreateAttr() { return nullptr; } +ACL_FUNC_VISIBILITY void aclopDestroyAttr(const aclopAttr *attr) {} +ACL_FUNC_VISIBILITY aclTensorDesc *aclCreateTensorDesc(aclDataType dataType, int numDims, const int64_t *dims, aclFormat format) { return nullptr; } +ACL_FUNC_VISIBILITY void aclDestroyTensorDesc(const aclTensorDesc *desc) {} +ACL_FUNC_VISIBILITY float aclFloat16ToFloat(aclFloat16 value) { return 0.0f; } +ACL_FUNC_VISIBILITY aclFloat16 aclFloatToFloat16(float value) { return 0; } +ACL_FUNC_VISIBILITY aclError aclopSetAttrBool(aclopAttr *attr, const char *attrName, uint8_t attrValue) { return 0; } \ No newline at end of file diff --git a/extern/aclMock/acl/acl.h b/extern/aclMock/acl/acl.h new file mode 100644 index 00000000..f3502231 --- /dev/null +++ b/extern/aclMock/acl/acl.h @@ -0,0 +1,76 @@ +/** +* @file acl.h +* +* Copyright (c) Huawei Technologies Co., Ltd. 2019-2020. All rights reserved. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#ifndef INC_EXTERNAL_ACL_ACL_H_ +#define INC_EXTERNAL_ACL_ACL_H_ + +#include "acl_rt.h" +#include "acl_op.h" +#include "acl_mdl.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Current version is 1.6.0 +#define ACL_MAJOR_VERSION 1 +#define ACL_MINOR_VERSION 6 +#define ACL_PATCH_VERSION 0 + +/** + * @ingroup AscendCL + * @brief acl initialize + * + * @par Restriction + * The aclInit interface can be called only once in a process + * @param configPath [IN] the config path,it can be NULL + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclInit(const char *configPath); + +/** + * @ingroup AscendCL + * @brief acl finalize + * + * @par Restriction + * Need to call aclFinalize before the process exits. + * After calling aclFinalize,the services cannot continue to be used normally. + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclFinalize(); + +/** + * @ingroup AscendCL + * @brief query ACL interface version + * + * @param majorVersion[OUT] ACL interface major version + * @param minorVersion[OUT] ACL interface minor version + * @param patchVersion[OUT] ACL interface patch version + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetVersion(int32_t *majorVersion, int32_t *minorVersion, int32_t *patchVersion); + +/** + * @ingroup AscendCL + * @brief get recent error message + * + * @retval null for failed + * @retval OtherValues success +*/ +ACL_FUNC_VISIBILITY const char *aclGetRecentErrMsg(); + +#ifdef __cplusplus +} +#endif + +#endif // INC_EXTERNAL_ACL_ACL_H_ diff --git a/extern/aclMock/acl/acl_base.h b/extern/aclMock/acl/acl_base.h new file mode 100644 index 00000000..43a6a2a7 --- /dev/null +++ b/extern/aclMock/acl/acl_base.h @@ -0,0 +1,673 @@ +/** +* @file acl_base.h +* +* Copyright (c) Huawei Technologies Co., Ltd. 2019-2020. All rights reserved. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#ifndef INC_EXTERNAL_ACL_ACL_BASE_H_ +#define INC_EXTERNAL_ACL_ACL_BASE_H_ + +#include +#include +#include "error_codes/rt_error_codes.h" +#include "error_codes/ge_error_codes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(_MSC_VER) +#ifdef FUNC_VISIBILITY +#define ACL_FUNC_VISIBILITY _declspec(dllexport) +#else +#define ACL_FUNC_VISIBILITY +#endif +#else +#ifdef FUNC_VISIBILITY +#define ACL_FUNC_VISIBILITY __attribute__((visibility("default"))) +#else +#define ACL_FUNC_VISIBILITY +#endif +#endif + +#ifdef __GNUC__ +#define ACL_DEPRECATED __attribute__((deprecated)) +#define ACL_DEPRECATED_MESSAGE(message) __attribute__((deprecated(message))) +#elif defined(_MSC_VER) +#define ACL_DEPRECATED __declspec(deprecated) +#define ACL_DEPRECATED_MESSAGE(message) __declspec(deprecated(message)) +#else +#define ACL_DEPRECATED +#define ACL_DEPRECATED_MESSAGE(message) +#endif + +typedef void *aclrtStream; +typedef void *aclrtEvent; +typedef void *aclrtContext; +typedef int aclError; +typedef uint16_t aclFloat16; +typedef struct aclDataBuffer aclDataBuffer; +typedef struct aclTensorDesc aclTensorDesc; +typedef void *aclrtAllocatorDesc; +typedef void *aclrtAllocator; +typedef void *aclrtAllocatorBlock; +typedef void *aclrtAllocatorAddr; + +static const int ACL_ERROR_NONE = 0; +static const int ACL_SUCCESS = 0; + +static const int ACL_ERROR_INVALID_PARAM = 100000; +static const int ACL_ERROR_UNINITIALIZE = 100001; +static const int ACL_ERROR_REPEAT_INITIALIZE = 100002; +static const int ACL_ERROR_INVALID_FILE = 100003; +static const int ACL_ERROR_WRITE_FILE = 100004; +static const int ACL_ERROR_INVALID_FILE_SIZE = 100005; +static const int ACL_ERROR_PARSE_FILE = 100006; +static const int ACL_ERROR_FILE_MISSING_ATTR = 100007; +static const int ACL_ERROR_FILE_ATTR_INVALID = 100008; +static const int ACL_ERROR_INVALID_DUMP_CONFIG = 100009; +static const int ACL_ERROR_INVALID_PROFILING_CONFIG = 100010; +static const int ACL_ERROR_INVALID_MODEL_ID = 100011; +static const int ACL_ERROR_DESERIALIZE_MODEL = 100012; +static const int ACL_ERROR_PARSE_MODEL = 100013; +static const int ACL_ERROR_READ_MODEL_FAILURE = 100014; +static const int ACL_ERROR_MODEL_SIZE_INVALID = 100015; +static const int ACL_ERROR_MODEL_MISSING_ATTR = 100016; +static const int ACL_ERROR_MODEL_INPUT_NOT_MATCH = 100017; +static const int ACL_ERROR_MODEL_OUTPUT_NOT_MATCH = 100018; +static const int ACL_ERROR_MODEL_NOT_DYNAMIC = 100019; +static const int ACL_ERROR_OP_TYPE_NOT_MATCH = 100020; +static const int ACL_ERROR_OP_INPUT_NOT_MATCH = 100021; +static const int ACL_ERROR_OP_OUTPUT_NOT_MATCH = 100022; +static const int ACL_ERROR_OP_ATTR_NOT_MATCH = 100023; +static const int ACL_ERROR_OP_NOT_FOUND = 100024; +static const int ACL_ERROR_OP_LOAD_FAILED = 100025; +static const int ACL_ERROR_UNSUPPORTED_DATA_TYPE = 100026; +static const int ACL_ERROR_FORMAT_NOT_MATCH = 100027; +static const int ACL_ERROR_BIN_SELECTOR_NOT_REGISTERED = 100028; +static const int ACL_ERROR_KERNEL_NOT_FOUND = 100029; +static const int ACL_ERROR_BIN_SELECTOR_ALREADY_REGISTERED = 100030; +static const int ACL_ERROR_KERNEL_ALREADY_REGISTERED = 100031; +static const int ACL_ERROR_INVALID_QUEUE_ID = 100032; +static const int ACL_ERROR_REPEAT_SUBSCRIBE = 100033; +static const int ACL_ERROR_STREAM_NOT_SUBSCRIBE = 100034; +static const int ACL_ERROR_THREAD_NOT_SUBSCRIBE = 100035; +static const int ACL_ERROR_WAIT_CALLBACK_TIMEOUT = 100036; +static const int ACL_ERROR_REPEAT_FINALIZE = 100037; +static const int ACL_ERROR_NOT_STATIC_AIPP = 100038; +static const int ACL_ERROR_COMPILING_STUB_MODE = 100039; +static const int ACL_ERROR_GROUP_NOT_SET = 100040; +static const int ACL_ERROR_GROUP_NOT_CREATE = 100041; +static const int ACL_ERROR_PROF_ALREADY_RUN = 100042; +static const int ACL_ERROR_PROF_NOT_RUN = 100043; +static const int ACL_ERROR_DUMP_ALREADY_RUN = 100044; +static const int ACL_ERROR_DUMP_NOT_RUN = 100045; +static const int ACL_ERROR_PROF_REPEAT_SUBSCRIBE = 148046; +static const int ACL_ERROR_PROF_API_CONFLICT = 148047; +static const int ACL_ERROR_INVALID_MAX_OPQUEUE_NUM_CONFIG = 148048; +static const int ACL_ERROR_INVALID_OPP_PATH = 148049; +static const int ACL_ERROR_OP_UNSUPPORTED_DYNAMIC = 148050; +static const int ACL_ERROR_RELATIVE_RESOURCE_NOT_CLEARED = 148051; +static const int ACL_ERROR_UNSUPPORTED_JPEG = 148052; + +static const int ACL_ERROR_BAD_ALLOC = 200000; +static const int ACL_ERROR_API_NOT_SUPPORT = 200001; +static const int ACL_ERROR_INVALID_DEVICE = 200002; +static const int ACL_ERROR_MEMORY_ADDRESS_UNALIGNED = 200003; +static const int ACL_ERROR_RESOURCE_NOT_MATCH = 200004; +static const int ACL_ERROR_INVALID_RESOURCE_HANDLE = 200005; +static const int ACL_ERROR_FEATURE_UNSUPPORTED = 200006; +static const int ACL_ERROR_PROF_MODULES_UNSUPPORTED = 200007; + +static const int ACL_ERROR_STORAGE_OVER_LIMIT = 300000; + +static const int ACL_ERROR_INTERNAL_ERROR = 500000; +static const int ACL_ERROR_FAILURE = 500001; +static const int ACL_ERROR_GE_FAILURE = 500002; +static const int ACL_ERROR_RT_FAILURE = 500003; +static const int ACL_ERROR_DRV_FAILURE = 500004; +static const int ACL_ERROR_PROFILING_FAILURE = 500005; + +#define ACL_TENSOR_SHAPE_RANGE_NUM 2 +#define ACL_TENSOR_VALUE_RANGE_NUM 2 +#define ACL_UNKNOWN_RANK 0xFFFFFFFFFFFFFFFE + +typedef enum { + ACL_DT_UNDEFINED = -1, + ACL_FLOAT = 0, + ACL_FLOAT16 = 1, + ACL_INT8 = 2, + ACL_INT32 = 3, + ACL_UINT8 = 4, + ACL_INT16 = 6, + ACL_UINT16 = 7, + ACL_UINT32 = 8, + ACL_INT64 = 9, + ACL_UINT64 = 10, + ACL_DOUBLE = 11, + ACL_BOOL = 12, + ACL_STRING = 13, + ACL_COMPLEX64 = 16, + ACL_COMPLEX128 = 17, + ACL_BF16 = 27, + ACL_UINT1 = 30, + ACL_COMPLEX32 = 33, +} aclDataType; + +typedef enum { + ACL_FORMAT_UNDEFINED = -1, + ACL_FORMAT_NCHW = 0, + ACL_FORMAT_NHWC = 1, + ACL_FORMAT_ND = 2, + ACL_FORMAT_NC1HWC0 = 3, + ACL_FORMAT_FRACTAL_Z = 4, + ACL_FORMAT_NC1HWC0_C04 = 12, + ACL_FORMAT_HWCN = 16, + ACL_FORMAT_NDHWC = 27, + ACL_FORMAT_FRACTAL_NZ = 29, + ACL_FORMAT_NCDHW = 30, + ACL_FORMAT_NDC1HWC0 = 32, + ACL_FRACTAL_Z_3D = 33, + ACL_FORMAT_NC = 35, + ACL_FORMAT_NCL = 47, +} aclFormat; + +typedef enum { + ACL_DEBUG = 0, + ACL_INFO = 1, + ACL_WARNING = 2, + ACL_ERROR = 3, +} aclLogLevel; + +typedef enum { + ACL_MEMTYPE_DEVICE = 0, + ACL_MEMTYPE_HOST = 1, + ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT = 2 +} aclMemType; + +typedef enum { + ACL_OPT_DETERMINISTIC = 0, +} aclSysParamOpt; + +/** + * @ingroup AscendCL + * @brief Converts data of type aclFloat16 to data of type float + * + * @param value [IN] Data to be converted + * + * @retval Transformed data + */ +ACL_FUNC_VISIBILITY float aclFloat16ToFloat(aclFloat16 value); + +/** + * @ingroup AscendCL + * @brief Converts data of type float to data of type aclFloat16 + * + * @param value [IN] Data to be converted + * + * @retval Transformed data + */ +ACL_FUNC_VISIBILITY aclFloat16 aclFloatToFloat16(float value); + +/** + * @ingroup AscendCL + * @brief create data of aclDataBuffer + * + * @param data [IN] pointer to data + * @li Need to be managed by the user, + * call aclrtMalloc interface to apply for memory, + * call aclrtFree interface to release memory + * + * @param size [IN] size of data in bytes + * + * @retval pointer to created instance. nullptr if run out of memory + * + * @see aclrtMalloc | aclrtFree + */ +ACL_FUNC_VISIBILITY aclDataBuffer *aclCreateDataBuffer(void *data, size_t size); + +/** + * @ingroup AscendCL + * @brief destroy data of aclDataBuffer + * + * @par Function + * Only the aclDataBuffer type data is destroyed here. + * The memory of the data passed in when the aclDataDataBuffer interface + * is called to create aclDataBuffer type data must be released by the user + * + * @param dataBuffer [IN] pointer to the aclDataBuffer + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclCreateDataBuffer + */ +ACL_FUNC_VISIBILITY aclError aclDestroyDataBuffer(const aclDataBuffer *dataBuffer); + +/** + * @ingroup AscendCL + * @brief update new data of aclDataBuffer + * + * @param dataBuffer [OUT] pointer to aclDataBuffer + * @li The old data need to be released by the user, otherwise it may occur memory leak leakage + * call aclGetDataBufferAddr interface to get old data address + * call aclrtFree interface to release memory + * + * @param data [IN] pointer to new data + * @li Need to be managed by the user, + * call aclrtMalloc interface to apply for memory, + * call aclrtFree interface to release memory + * + * @param size [IN] size of data in bytes + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtMalloc | aclrtFree | aclGetDataBufferAddr + */ +ACL_FUNC_VISIBILITY aclError aclUpdateDataBuffer(aclDataBuffer *dataBuffer, void *data, size_t size); + +/** + * @ingroup AscendCL + * @brief get data address from aclDataBuffer + * + * @param dataBuffer [IN] pointer to the data of aclDataBuffer + * + * @retval data address + */ +ACL_FUNC_VISIBILITY void *aclGetDataBufferAddr(const aclDataBuffer *dataBuffer); + +/** + * @ingroup AscendCL + * @brief get data size of aclDataBuffer + * + * @param dataBuffer [IN] pointer to the data of aclDataBuffer + * + * @retval data size + */ +ACL_DEPRECATED_MESSAGE("aclGetDataBufferSize is deprecated, use aclGetDataBufferSizeV2 instead") +ACL_FUNC_VISIBILITY uint32_t aclGetDataBufferSize(const aclDataBuffer *dataBuffer); + +/** + * @ingroup AscendCL + * @brief get data size of aclDataBuffer to replace aclGetDataBufferSize + * + * @param dataBuffer [IN] pointer to the data of aclDataBuffer + * + * @retval data size + */ +ACL_FUNC_VISIBILITY size_t aclGetDataBufferSizeV2(const aclDataBuffer *dataBuffer); + +/** + * @ingroup AscendCL + * @brief get size of aclDataType + * + * @param dataType [IN] aclDataType data the size to get + * + * @retval size of the aclDataType + */ +ACL_FUNC_VISIBILITY size_t aclDataTypeSize(aclDataType dataType); + +// interfaces of tensor desc +/** + * @ingroup AscendCL + * @brief create data aclTensorDesc + * + * @param dataType [IN] Data types described by tensor + * @param numDims [IN] the number of dimensions of the shape + * @param dims [IN] the size of the specified dimension + * @param format [IN] tensor format + * + * @retval aclTensorDesc pointer. + * @retval nullptr if param is invalid or run out of memory + */ +ACL_FUNC_VISIBILITY aclTensorDesc *aclCreateTensorDesc(aclDataType dataType, + int numDims, + const int64_t *dims, + aclFormat format); + +/** + * @ingroup AscendCL + * @brief destroy data aclTensorDesc + * + * @param desc [IN] pointer to the data of aclTensorDesc to destroy + */ +ACL_FUNC_VISIBILITY void aclDestroyTensorDesc(const aclTensorDesc *desc); + +/** + * @ingroup AscendCL + * @brief set tensor shape range for aclTensorDesc + * + * @param desc [OUT] pointer to the data of aclTensorDesc + * @param dimsCount [IN] the number of dimensions of the shape + * @param dimsRange [IN] the range of dimensions of the shape + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorShapeRange(aclTensorDesc* desc, + size_t dimsCount, + int64_t dimsRange[][ACL_TENSOR_SHAPE_RANGE_NUM]); + +/** + * @ingroup AscendCL + * @brief set value range for aclTensorDesc + * + * @param desc [OUT] pointer to the data of aclTensorDesc + * @param valueCount [IN] the number of value + * @param valueRange [IN] the range of value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorValueRange(aclTensorDesc* desc, + size_t valueCount, + int64_t valueRange[][ACL_TENSOR_VALUE_RANGE_NUM]); +/** + * @ingroup AscendCL + * @brief get data type specified by the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * + * @retval data type specified by the tensor description. + * @retval ACL_DT_UNDEFINED if description is null + */ +ACL_FUNC_VISIBILITY aclDataType aclGetTensorDescType(const aclTensorDesc *desc); + +/** + * @ingroup AscendCL + * @brief get data format specified by the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * + * @retval data format specified by the tensor description. + * @retval ACL_FORMAT_UNDEFINED if description is null + */ +ACL_FUNC_VISIBILITY aclFormat aclGetTensorDescFormat(const aclTensorDesc *desc); + +/** + * @ingroup AscendCL + * @brief get tensor size specified by the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * + * @retval data size specified by the tensor description. + * @retval 0 if description is null + */ +ACL_FUNC_VISIBILITY size_t aclGetTensorDescSize(const aclTensorDesc *desc); + +/** + * @ingroup AscendCL + * @brief get element count specified by the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * + * @retval element count specified by the tensor description. + * @retval 0 if description is null + */ +ACL_FUNC_VISIBILITY size_t aclGetTensorDescElementCount(const aclTensorDesc *desc); + +/** + * @ingroup AscendCL + * @brief get number of dims specified by the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * + * @retval number of dims specified by the tensor description. + * @retval 0 if description is null + * @retval ACL_UNKNOWN_RANK if the tensor dim is -2 + */ +ACL_FUNC_VISIBILITY size_t aclGetTensorDescNumDims(const aclTensorDesc *desc); + +/** + * @ingroup AscendCL + * @brief Get the size of the specified dim in the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * @param index [IN] index of dims, start from 0. + * + * @retval dim specified by the tensor description and index. + * @retval -1 if description or index is invalid + */ +ACL_DEPRECATED_MESSAGE("aclGetTensorDescDim is deprecated, use aclGetTensorDescDimV2 instead") +ACL_FUNC_VISIBILITY int64_t aclGetTensorDescDim(const aclTensorDesc *desc, size_t index); + +/** + * @ingroup AscendCL + * @brief Get the size of the specified dim in the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * @param index [IN] index of dims, start from 0. + * @param dimSize [OUT] size of the specified dim. + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimV2(const aclTensorDesc *desc, size_t index, int64_t *dimSize); + +/** + * @ingroup AscendCL + * @brief Get the range of the specified dim in the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * @param index [IN] index of dims, start from 0. + * @param dimRangeNum [IN] number of dimRange. + * @param dimRange [OUT] range of the specified dim. + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimRange(const aclTensorDesc *desc, + size_t index, + size_t dimRangeNum, + int64_t *dimRange); + +/** + * @ingroup AscendCL + * @brief set tensor description name + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param name [IN] tensor description name + */ +ACL_FUNC_VISIBILITY void aclSetTensorDescName(aclTensorDesc *desc, const char *name); + +/** + * @ingroup AscendCL + * @brief get tensor description name + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * + * @retval tensor description name. + * @retval empty string if description is null + */ +ACL_FUNC_VISIBILITY const char *aclGetTensorDescName(aclTensorDesc *desc); + +/** + * @ingroup AscendCL + * @brief Convert the format in the source aclTensorDesc according to + * the specified dstFormat to generate a new target aclTensorDesc. + * The format in the source aclTensorDesc remains unchanged. + * + * @param srcDesc [IN] pointer to the source tensor desc + * @param dstFormat [IN] destination format + * @param dstDesc [OUT] pointer to the pointer to the destination tensor desc + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclTransTensorDescFormat(const aclTensorDesc *srcDesc, aclFormat dstFormat, + aclTensorDesc **dstDesc); + +/** + * @ingroup AscendCL + * @brief Set the storage format specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param format [IN] the storage format + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_DEPRECATED_MESSAGE("aclSetTensorStorageFormat is deprecated, use aclSetTensorFormat instead") +ACL_FUNC_VISIBILITY aclError aclSetTensorStorageFormat(aclTensorDesc *desc, aclFormat format); + +/** + * @ingroup AscendCL + * @brief Set the storage shape specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param numDims [IN] the number of dimensions of the shape + * @param dims [IN] the size of the specified dimension + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_DEPRECATED_MESSAGE("aclSetTensorStorageShape is deprecated, use aclSetTensorShape instead") +ACL_FUNC_VISIBILITY aclError aclSetTensorStorageShape(aclTensorDesc *desc, int numDims, const int64_t *dims); + +/** + * @ingroup AscendCL + * @brief Set the format specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param format [IN] the storage format + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorFormat(aclTensorDesc *desc, aclFormat format); + +/** + * @ingroup AscendCL + * @brief Set the shape specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param numDims [IN] the number of dimensions of the shape + * @param dims [IN] the size of the specified dimension + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorShape(aclTensorDesc *desc, int numDims, const int64_t *dims); + +/** + * @ingroup AscendCL + * @brief Set the original format specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param format [IN] the storage format + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorOriginFormat(aclTensorDesc *desc, aclFormat format); + +/** + * @ingroup AscendCL + * @brief Set the original shape specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param numDims [IN] the number of dimensions of the shape + * @param dims [IN] the size of the specified dimension + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorOriginShape(aclTensorDesc *desc, int numDims, const int64_t *dims); + +/** + * @ingroup AscendCL + * @brief get op description info + * + * @param desc [IN] pointer to tensor description + * @param index [IN] index of tensor + * + * @retval null for failed. + * @retval OtherValues success. +*/ +ACL_FUNC_VISIBILITY aclTensorDesc *aclGetTensorDescByIndex(aclTensorDesc *desc, size_t index); + +/** + * @ingroup AscendCL + * @brief get address of tensor + * + * @param desc [IN] pointer to tensor description + * + * @retval null for failed + * @retval OtherValues success +*/ +ACL_FUNC_VISIBILITY void *aclGetTensorDescAddress(const aclTensorDesc *desc); + +/** + * @ingroup AscendCL + * @brief Set the dynamic input name specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param dynamicInputName [IN] pointer to the dynamic input name + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorDynamicInput(aclTensorDesc *desc, const char *dynamicInputName); + +/** + * @ingroup AscendCL + * @brief Set const data specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param dataBuffer [IN] pointer to the const databuffer + * @param length [IN] the length of const databuffer + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorConst(aclTensorDesc *desc, void *dataBuffer, size_t length); + +/** + * @ingroup AscendCL + * @brief Set tensor memory type specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param memType [IN] ACL_MEMTYPE_DEVICE means device, ACL_MEMTYPE_HOST or + * ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT means host + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorPlaceMent(aclTensorDesc *desc, aclMemType memType); + +/** + * @ingroup AscendCL + * @brief an interface for users to output APP logs + * + * @param logLevel [IN] the level of current log + * @param func [IN] the function where the log is located + * @param file [IN] the file where the log is located + * @param line [IN] Number of source lines where the log is located + * @param fmt [IN] the format of current log + * @param ... [IN] the value of current log + */ +ACL_FUNC_VISIBILITY void aclAppLog(aclLogLevel logLevel, const char *func, const char *file, uint32_t line, + const char *fmt, ...); + +/** + * @ingroup AscendCL + * @brief get soc name + * + * @retval null for failed + * @retval OtherValues success +*/ +ACL_FUNC_VISIBILITY const char *aclrtGetSocName(); + +#define ACL_APP_LOG(level, fmt, ...) \ + aclAppLog(level, __FUNCTION__, __FILE__, __LINE__, fmt, ##__VA_ARGS__) + +#ifdef __cplusplus +} +#endif + +#endif // INC_EXTERNAL_ACL_ACL_BASE_H_ diff --git a/extern/aclMock/acl/acl_mdl.h b/extern/aclMock/acl/acl_mdl.h new file mode 100644 index 00000000..c0ca8313 --- /dev/null +++ b/extern/aclMock/acl/acl_mdl.h @@ -0,0 +1,1363 @@ +/** +* @file acl_mdl.h +* +* Copyright (c) Huawei Technologies Co., Ltd. 2019-2023. All rights reserved. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#ifndef INC_EXTERNAL_ACL_ACL_MODEL_H_ +#define INC_EXTERNAL_ACL_ACL_MODEL_H_ + +#include +#include + +#include "acl_base.h" +#include "acl_rt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ACL_MAX_DIM_CNT 128 +#define ACL_MAX_TENSOR_NAME_LEN 128 +#define ACL_MAX_BATCH_NUM 128 +#define ACL_MAX_HW_NUM 128 +#define ACL_MAX_SHAPE_COUNT 128 +#define ACL_INVALID_NODE_INDEX 0xFFFFFFFF + +#define ACL_MDL_LOAD_FROM_FILE 1 +#define ACL_MDL_LOAD_FROM_FILE_WITH_MEM 2 +#define ACL_MDL_LOAD_FROM_MEM 3 +#define ACL_MDL_LOAD_FROM_MEM_WITH_MEM 4 +#define ACL_MDL_LOAD_FROM_FILE_WITH_Q 5 +#define ACL_MDL_LOAD_FROM_MEM_WITH_Q 6 + +#define ACL_DYNAMIC_TENSOR_NAME "ascend_mbatch_shape_data" +#define ACL_DYNAMIC_AIPP_NAME "ascend_dynamic_aipp_data" +#define ACL_ATTR_NAME_DATA_DUMP_ORIGIN_OP_NAMES "_datadump_original_op_names" + +/* used for ACL_MDL_WORKSPACE_MEM_OPTIMIZE */ +#define ACL_WORKSPACE_MEM_OPTIMIZE_DEFAULT 0 +#define ACL_WORKSPACE_MEM_OPTIMIZE_INPUTOUTPUT 1 + +typedef struct aclmdlDataset aclmdlDataset; +typedef struct aclmdlDesc aclmdlDesc; +typedef struct aclmdlAIPP aclmdlAIPP; +typedef struct aclAippExtendInfo aclAippExtendInfo; +typedef struct aclmdlConfigHandle aclmdlConfigHandle; +typedef struct aclmdlExecConfigHandle aclmdlExecConfigHandle; + +typedef enum { + ACL_YUV420SP_U8 = 1, + ACL_XRGB8888_U8 = 2, + ACL_RGB888_U8 = 3, + ACL_YUV400_U8 = 4, + ACL_NC1HWC0DI_FP16 = 5, + ACL_NC1HWC0DI_S8 = 6, + ACL_ARGB8888_U8 = 7, + ACL_YUYV_U8 = 8, + ACL_YUV422SP_U8 = 9, + ACL_AYUV444_U8 = 10, + ACL_RAW10 = 11, + ACL_RAW12 = 12, + ACL_RAW16 = 13, + ACL_RAW24 = 14, + ACL_AIPP_RESERVED = 0xFFFF, +} aclAippInputFormat; + +typedef enum { + ACL_MDL_PRIORITY_INT32 = 0, + ACL_MDL_LOAD_TYPE_SIZET, + ACL_MDL_PATH_PTR, /**< pointer to model load path with deep copy */ + ACL_MDL_MEM_ADDR_PTR, /**< pointer to model memory with shallow copy */ + ACL_MDL_MEM_SIZET, + ACL_MDL_WEIGHT_ADDR_PTR, /**< pointer to weight memory of model with shallow copy */ + ACL_MDL_WEIGHT_SIZET, + ACL_MDL_WORKSPACE_ADDR_PTR, /**< pointer to worksapce memory of model with shallow copy */ + ACL_MDL_WORKSPACE_SIZET, + ACL_MDL_INPUTQ_NUM_SIZET, + ACL_MDL_INPUTQ_ADDR_PTR, /**< pointer to inputQ with shallow copy */ + ACL_MDL_OUTPUTQ_NUM_SIZET, + ACL_MDL_OUTPUTQ_ADDR_PTR, /**< pointer to outputQ with shallow copy */ + ACL_MDL_WORKSPACE_MEM_OPTIMIZE +} aclmdlConfigAttr; + +typedef enum { + ACL_MDL_STREAM_SYNC_TIMEOUT = 0, + ACL_MDL_EVENT_SYNC_TIMEOUT, + ACL_MDL_WORK_ADDR_PTR, /**< param */ + ACL_MDL_WORK_SIZET, /**< param */ + ACL_MDL_MPAIMID_SIZET, /**< param reserved */ + ACL_MDL_AICQOS_SIZET, /**< param reserved */ + ACL_MDL_AICOST_SIZET, /**< param reserved */ + ACL_MDL_MEC_TIMETHR_SIZET /**< param reserved */ +} aclmdlExecConfigAttr; + +typedef enum { + ACL_DATA_WITHOUT_AIPP = 0, + ACL_DATA_WITH_STATIC_AIPP, + ACL_DATA_WITH_DYNAMIC_AIPP, + ACL_DYNAMIC_AIPP_NODE +} aclmdlInputAippType; + +typedef struct aclmdlIODims { + char name[ACL_MAX_TENSOR_NAME_LEN]; /**< tensor name */ + size_t dimCount; /**< dim array count */ + int64_t dims[ACL_MAX_DIM_CNT]; /**< dim data array */ +} aclmdlIODims; + +typedef struct aclAippDims { + aclmdlIODims srcDims; /**< input dims before model transform */ + size_t srcSize; /**< input size before model transform */ + aclmdlIODims aippOutdims; /**< aipp output dims */ + size_t aippOutSize; /**< aipp output size */ +} aclAippDims; + +typedef struct aclmdlBatch { + size_t batchCount; /**< batch array count */ + uint64_t batch[ACL_MAX_BATCH_NUM]; /**< batch data array */ +} aclmdlBatch; + +typedef struct aclmdlHW { + size_t hwCount; /**< height&width array count */ + uint64_t hw[ACL_MAX_HW_NUM][2]; /**< height&width data array */ +} aclmdlHW; + +typedef struct aclAippInfo { + aclAippInputFormat inputFormat; + int32_t srcImageSizeW; + int32_t srcImageSizeH; + int8_t cropSwitch; + int32_t loadStartPosW; + int32_t loadStartPosH; + int32_t cropSizeW; + int32_t cropSizeH; + int8_t resizeSwitch; + int32_t resizeOutputW; + int32_t resizeOutputH; + int8_t paddingSwitch; + int32_t leftPaddingSize; + int32_t rightPaddingSize; + int32_t topPaddingSize; + int32_t bottomPaddingSize; + int8_t cscSwitch; + int8_t rbuvSwapSwitch; + int8_t axSwapSwitch; + int8_t singleLineMode; + int32_t matrixR0C0; + int32_t matrixR0C1; + int32_t matrixR0C2; + int32_t matrixR1C0; + int32_t matrixR1C1; + int32_t matrixR1C2; + int32_t matrixR2C0; + int32_t matrixR2C1; + int32_t matrixR2C2; + int32_t outputBias0; + int32_t outputBias1; + int32_t outputBias2; + int32_t inputBias0; + int32_t inputBias1; + int32_t inputBias2; + int32_t meanChn0; + int32_t meanChn1; + int32_t meanChn2; + int32_t meanChn3; + float minChn0; + float minChn1; + float minChn2; + float minChn3; + float varReciChn0; + float varReciChn1; + float varReciChn2; + float varReciChn3; + aclFormat srcFormat; + aclDataType srcDatatype; + size_t srcDimNum; + size_t shapeCount; + aclAippDims outDims[ACL_MAX_SHAPE_COUNT]; + aclAippExtendInfo *aippExtend; /**< reserved parameters, current version needs to be null */ +} aclAippInfo; + +/** + * @ingroup AscendCL + * @brief Create data of type aclmdlDesc + * + * @retval the aclmdlDesc pointer + */ +ACL_FUNC_VISIBILITY aclmdlDesc *aclmdlCreateDesc(); + +/** + * @ingroup AscendCL + * @brief destroy data of type aclmdlDesc + * + * @param modelDesc [IN] Pointer to almdldlDesc to be destroyed + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlDestroyDesc(aclmdlDesc *modelDesc); + +/** + * @ingroup AscendCL + * @brief Get aclmdlDesc data of the model according to the model ID + * + * @param modelDesc [OUT] aclmdlDesc pointer + * @param modelId [IN] model id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetDesc(aclmdlDesc *modelDesc, uint32_t modelId); + +/** + * @ingroup AscendCL + * @brief Get aclmdlDesc data of the model according to the model path + * + * @param modelDesc [OUT] aclmdlDesc pointer + * @param modelPath [IN] model path + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetDescFromFile(aclmdlDesc *modelDesc, const char *modelPath); + +/** + * @ingroup AscendCL + * @brief Get aclmdlDesc data of the model according to the model and modelSize + * + * @param modelDesc [OUT] aclmdlDesc pointer + * @param model [IN] model pointer + * @param modelSize [IN] model size + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetDescFromMem(aclmdlDesc *modelDesc, const void *model, size_t modelSize); + +/** + * @ingroup AscendCL + * @brief Get the number of the inputs of + * the model according to data of aclmdlDesc + * + * @param modelDesc [IN] aclmdlDesc pointer + * + * @retval input size with aclmdlDesc + */ +ACL_FUNC_VISIBILITY size_t aclmdlGetNumInputs(aclmdlDesc *modelDesc); + +/** + * @ingroup AscendCL + * @brief Get the number of the output of + * the model according to data of aclmdlDesc + * + * @param modelDesc [IN] aclmdlDesc pointer + * + * @retval output size with aclmdlDesc + */ +ACL_FUNC_VISIBILITY size_t aclmdlGetNumOutputs(aclmdlDesc *modelDesc); + +/** + * @ingroup AscendCL + * @brief Get the size of the specified input according to + * the data of type aclmdlDesc + * + * @param modelDesc [IN] aclmdlDesc pointer + * @param index [IN] the size of the number of inputs to be obtained, + * the index value starts from 0 + * + * @retval Specify the size of the input + */ +ACL_FUNC_VISIBILITY size_t aclmdlGetInputSizeByIndex(aclmdlDesc *modelDesc, size_t index); + +/** + * @ingroup AscendCL + * @brief Get the size of the specified output according to + * the data of type aclmdlDesc + * + * @param modelDesc [IN] aclmdlDesc pointer + * @param index [IN] the size of the number of outputs to be obtained, + * the index value starts from 0 + * + * @retval Specify the size of the output + */ +ACL_FUNC_VISIBILITY size_t aclmdlGetOutputSizeByIndex(aclmdlDesc *modelDesc, size_t index); + +/** + * @ingroup AscendCL + * @brief Create config handle of execute + * + * @retval the aclmdlCreateExecConfigHandle pointer + */ +ACL_FUNC_VISIBILITY aclmdlExecConfigHandle *aclmdlCreateExecConfigHandle(); + +/** + * @ingroup AscendCL + * @brief Destroy config handle of model execute + * + * @param handle [IN] Pointer to aclmdlExecConfigHandle to be destroyed + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlDestroyExecConfigHandle(const aclmdlExecConfigHandle *handle); + +/** + * @ingroup AscendCL + * @brief Create data of type aclmdlDataset + * + * @retval the aclmdlDataset pointer + */ +ACL_FUNC_VISIBILITY aclmdlDataset *aclmdlCreateDataset(); + +/** + * @ingroup AscendCL + * @brief destroy data of type aclmdlDataset + * + * @param dataset [IN] Pointer to aclmdlDataset to be destroyed + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlDestroyDataset(const aclmdlDataset *dataset); + +/** + * @ingroup AscendCL + * @brief Add aclDataBuffer to aclmdlDataset + * + * @param dataset [OUT] aclmdlDataset address of aclDataBuffer to be added + * @param dataBuffer [IN] aclDataBuffer address to be added + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlAddDatasetBuffer(aclmdlDataset *dataset, aclDataBuffer *dataBuffer); + +/** + * @ingroup AscendCL + * @brief Set aclTensorDesc to aclmdlDataset + * + * @param dataset [OUT] aclmdlDataset address of aclDataBuffer to be added + * @param tensorDesc [IN] aclTensorDesc address to be added + * @param index [IN] index of tensorDesc which to be added + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetDatasetTensorDesc(aclmdlDataset *dataset, + aclTensorDesc *tensorDesc, + size_t index); + +/** + * @ingroup AscendCL + * @brief Get aclTensorDesc from aclmdlDataset + * + * @param dataset [IN] aclmdlDataset pointer; + * @param index [IN] index of tensorDesc + * + * @retval Get address of aclTensorDesc when executed successfully. + * @retval Failure return NULL + */ +ACL_FUNC_VISIBILITY aclTensorDesc *aclmdlGetDatasetTensorDesc(const aclmdlDataset *dataset, size_t index); + +/** + * @ingroup AscendCL + * @brief Get the number of aclDataBuffer in aclmdlDataset + * + * @param dataset [IN] aclmdlDataset pointer + * + * @retval the number of aclDataBuffer + */ +ACL_FUNC_VISIBILITY size_t aclmdlGetDatasetNumBuffers(const aclmdlDataset *dataset); + +/** + * @ingroup AscendCL + * @brief Get the aclDataBuffer in aclmdlDataset by index + * + * @param dataset [IN] aclmdlDataset pointer + * @param index [IN] the index of aclDataBuffer + * + * @retval Get successfully, return the address of aclDataBuffer + * @retval Failure return NULL + */ +ACL_FUNC_VISIBILITY aclDataBuffer *aclmdlGetDatasetBuffer(const aclmdlDataset *dataset, size_t index); + +/** + * @ingroup AscendCL + * @brief Load offline model data from files + * and manage memory internally by the system + * + * @par Function + * After the system finishes loading the model, + * the model ID returned is used as a mark to identify the model + * during subsequent operations + * + * @param modelPath [IN] Storage path for offline model files + * @param modelId [OUT] Model ID generated after + * the system finishes loading the model + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFile(const char *modelPath, uint32_t *modelId); + +/** + * @ingroup AscendCL + * @brief Load offline model data from memory and manage the memory of + * model running internally by the system + * + * @par Function + * After the system finishes loading the model, + * the model ID returned is used as a mark to identify the model + * during subsequent operations + * + * @param model [IN] Model data stored in memory + * @param modelSize [IN] model data size + * @param modelId [OUT] Model ID generated after + * the system finishes loading the model + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMem(const void *model, size_t modelSize, + uint32_t *modelId); + +/** + * @ingroup AscendCL + * @brief Load offline model data from a file, + * and the user manages the memory of the model run by itself + * + * @par Function + * After the system finishes loading the model, + * the model ID returned is used as a mark to identify the model + * during subsequent operations. + * @param modelPath [IN] Storage path for offline model files + * @param modelId [OUT] Model ID generated after finishes loading the model + * @param workPtr [IN] A pointer to the working memory + * required by the model on the Device,can be null + * @param workSize [IN] The amount of working memory required by the model + * @param weightPtr [IN] Pointer to model weight memory on Device + * @param weightSize [IN] The amount of weight memory required by the model + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithMem(const char *modelPath, + uint32_t *modelId, void *workPtr, size_t workSize, + void *weightPtr, size_t weightSize); + +/** + * @ingroup AscendCL + * @brief Load offline model data from memory, + * and the user can manage the memory of model running + * + * @par Function + * After the system finishes loading the model, + * the model ID returned is used as a mark to identify the model + * during subsequent operations + * @param model [IN] Model data stored in memory + * @param modelSize [IN] model data size + * @param modelId [OUT] Model ID generated after finishes loading the model + * @param workPtr [IN] A pointer to the working memory + * required by the model on the Device,can be null + * @param workSize [IN] work memory size + * @param weightPtr [IN] Pointer to model weight memory on Device,can be null + * @param weightSize [IN] The amount of weight memory required by the model + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithMem(const void *model, size_t modelSize, + uint32_t *modelId, void *workPtr, size_t workSize, + void *weightPtr, size_t weightSize); + +/** + * @ingroup AscendCL + * @brief load model from file with async queue + * + * @param modelPath [IN] model path + * @param modelId [OUT] return model id if load success + * @param inputQ [IN] input queue pointer + * @param inputQNum [IN] input queue num + * @param outputQ [IN] output queue pointer + * @param outputQNum [IN] output queue num + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithQ(const char *modelPath, uint32_t *modelId, const uint32_t *inputQ, + size_t inputQNum, const uint32_t *outputQ, size_t outputQNum); + +/** + * @ingroup AscendCL + * @brief load model from memory with async queue + * + * @param model [IN] model memory which user manages + * @param modelSize [IN] model size + * @param modelId [OUT] return model id if load success + * @param inputQ [IN] input queue pointer + * @param inputQNum [IN] input queue num + * @param outputQ [IN] output queue pointer + * @param outputQNum [IN] output queue num + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithQ(const void *model, size_t modelSize, uint32_t *modelId, + const uint32_t *inputQ, size_t inputQNum, + const uint32_t *outputQ, size_t outputQNum); + +/** + * @ingroup AscendCL + * @brief Execute model synchronous inference until the inference result is returned + * + * @param modelId [IN] ID of the model to perform inference + * @param input [IN] Input data for model inference + * @param output [OUT] Output data for model inference + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlExecute(uint32_t modelId, const aclmdlDataset *input, aclmdlDataset *output); + +/** + * @ingroup AscendCL + * @brief Execute model synchronous inference until the inference result is returned + * + * @param modelId [IN] ID of the model to perform inference + * @param input [IN] Input data for model inference + * @param output [OUT] Output data for model inference + * @param stream [IN] stream + * @param handle [IN] config of model execute + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlExecuteV2(uint32_t modelId, const aclmdlDataset *input, aclmdlDataset *output, + aclrtStream stream, const aclmdlExecConfigHandle *handle); + +/** + * @ingroup AscendCL + * @brief Execute model asynchronous inference until the inference result is returned + * + * @param modelId [IN] ID of the model to perform inference + * @param input [IN] Input data for model inference + * @param output [OUT] Output data for model inference + * @param stream [IN] stream + * @param handle [IN] config of model execute + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlExecuteAsyncV2(uint32_t modelId, const aclmdlDataset *input, aclmdlDataset *output, + aclrtStream stream, const aclmdlExecConfigHandle *handle); +/** + * @ingroup AscendCL + * @brief Execute model asynchronous inference until the inference result is returned + * + * @param modelId [IN] ID of the model to perform inference + * @param input [IN] Input data for model inference + * @param output [OUT] Output data for model inference + * @param stream [IN] stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem + */ +ACL_FUNC_VISIBILITY aclError aclmdlExecuteAsync(uint32_t modelId, const aclmdlDataset *input, + aclmdlDataset *output, aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief unload model with model id + * + * @param modelId [IN] model id to be unloaded + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlUnload(uint32_t modelId); + +/** + * @ingroup AscendCL + * @brief Get the weight memory size and working memory size + * required for model execution according to the model file + * + * @param fileName [IN] Model path to get memory information + * @param workSize [OUT] The amount of working memory for model executed + * @param weightSize [OUT] The amount of weight memory for model executed + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlQuerySize(const char *fileName, size_t *workSize, size_t *weightSize); + +/** + * @ingroup AscendCL + * @brief Obtain the weights required for + * model execution according to the model data in memory + * + * @par Restriction + * The execution and weight memory is Device memory, + * and requires user application and release. + * @param model [IN] model memory which user manages + * @param modelSize [IN] model data size + * @param workSize [OUT] The amount of working memory for model executed + * @param weightSize [OUT] The amount of weight memory for model executed + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlQuerySizeFromMem(const void *model, size_t modelSize, size_t *workSize, + size_t *weightSize); + +/** + * @ingroup AscendCL + * @brief In dynamic batch scenarios, + * it is used to set the number of images processed + * at one time during model inference + * + * @param modelId [IN] model id + * @param dataset [IN|OUT] data for model inference + * @param index [IN] index of dynamic tensor + * @param batchSize [IN] Number of images processed at a time during model + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetDynamicBatchSize(uint32_t modelId, aclmdlDataset *dataset, size_t index, + uint64_t batchSize); + +/** + * @ingroup AscendCL + * @brief Sets the H and W of the specified input of the model + * + * @param modelId [IN] model id + * @param dataset [IN|OUT] data for model inference + * @param index [IN] index of dynamic tensor + * @param height [IN] model height + * @param width [IN] model width + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetDynamicHWSize(uint32_t modelId, aclmdlDataset *dataset, size_t index, + uint64_t height, uint64_t width); + +/** + * @ingroup AscendCL + * @brief Sets the dynamic dims of the specified input of the model + * + * @param modelId [IN] model id + * @param dataset [IN|OUT] data for model inference + * @param index [IN] index of dynamic dims + * @param dims [IN] value of dynamic dims + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetInputDynamicDims(uint32_t modelId, aclmdlDataset *dataset, size_t index, + const aclmdlIODims *dims); + +/** + * @ingroup AscendCL + * @brief get input dims info + * + * @param modelDesc [IN] model description + * @param index [IN] input tensor index + * @param dims [OUT] dims info + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlGetInputDimsV2 + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetInputDims(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims); + +/** + * @ingroup AscendCL + * @brief get input dims info(version 2), especially for static aipp + * it is the same with aclmdlGetInputDims while model without static aipp + * + * @param modelDesc [IN] model description + * @param index [IN] input tensor index + * @param dims [OUT] dims info + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlGetInputDims + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetInputDimsV2(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims); + +/** + * @ingroup AscendCL + * @brief get output dims info + * + * @param modelDesc [IN] model description + * @param index [IN] output tensor index + * @param dims [OUT] dims info + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetOutputDims(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims); + +/** + * @ingroup AscendCL + * @brief get current output dims info + * + * @par Function + * The following use cases are supported: + * @li Get current output shape when model is dynamic and + * dynamic shape info is set + * @li Get max output shape when model is dynamic and + * dynamic shape info is not set + * @li Get actual output shape when model is static + * + * @param modelDesc [IN] model description + * @param index [IN] output tensor index + * @param dims [OUT] dims info + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetCurOutputDims(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims); + +/** + * @ingroup AscendCL + * @brief get attr value by op name + * + * @param modelDesc [IN] model description + * @param opName [IN] op name + * @param attr [IN] attr name + * + * @retval the attr value + */ +ACL_FUNC_VISIBILITY const char *aclmdlGetOpAttr(aclmdlDesc *modelDesc, const char *opName, const char *attr); + +/** + * @ingroup AscendCL + * @brief get input name by index + * + * @param modelDesc [IN] model description + * @param index [IN] intput tensor index + * + * @retval input tensor name,the same life cycle with modelDesc + */ +ACL_FUNC_VISIBILITY const char *aclmdlGetInputNameByIndex(const aclmdlDesc *modelDesc, size_t index); + +/** + * @ingroup AscendCL + * @brief get output name by index + * + * @param modelDesc [IN] model description + * @param index [IN] output tensor index + * + * @retval output tensor name,the same life cycle with modelDesc + */ +ACL_FUNC_VISIBILITY const char *aclmdlGetOutputNameByIndex(const aclmdlDesc *modelDesc, size_t index); + +/** + * @ingroup AscendCL + * @brief get input format by index + * + * @param modelDesc [IN] model description + * @param index [IN] intput tensor index + * + * @retval input tensor format + */ +ACL_FUNC_VISIBILITY aclFormat aclmdlGetInputFormat(const aclmdlDesc *modelDesc, size_t index); + +/** + * @ingroup AscendCL + * @brief get output format by index + * + * @param modelDesc [IN] model description + * @param index [IN] output tensor index + * + * @retval output tensor format + */ +ACL_FUNC_VISIBILITY aclFormat aclmdlGetOutputFormat(const aclmdlDesc *modelDesc, size_t index); + +/** + * @ingroup AscendCL + * @brief get input data type by index + * + * @param modelDesc [IN] model description + * @param index [IN] intput tensor index + * + * @retval input tensor data type + */ +ACL_FUNC_VISIBILITY aclDataType aclmdlGetInputDataType(const aclmdlDesc *modelDesc, size_t index); + +/** + * @ingroup AscendCL + * @brief get output data type by index + * + * @param modelDesc [IN] model description + * @param index [IN] output tensor index + * + * @retval output tensor data type + */ +ACL_FUNC_VISIBILITY aclDataType aclmdlGetOutputDataType(const aclmdlDesc *modelDesc, size_t index); + +/** + * @ingroup AscendCL + * @brief get input tensor index by name + * + * @param modelDesc [IN] model description + * @param name [IN] intput tensor name + * @param index [OUT] intput tensor index + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetInputIndexByName(const aclmdlDesc *modelDesc, const char *name, size_t *index); + +/** + * @ingroup AscendCL + * @brief get output tensor index by name + * + * @param modelDesc [IN] model description + * @param name [IN] output tensor name + * @param index [OUT] output tensor index + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetOutputIndexByName(const aclmdlDesc *modelDesc, const char *name, size_t *index); + +/** + * @ingroup AscendCL + * @brief get dynamic batch info + * + * @param modelDesc [IN] model description + * @param batch [OUT] dynamic batch info + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetDynamicBatch(const aclmdlDesc *modelDesc, aclmdlBatch *batch); + +/** + * @ingroup AscendCL + * @brief get dynamic height&width info + * + * @param modelDesc [IN] model description + * @param index [IN] input tensor index + * @param hw [OUT] dynamic height&width info + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetDynamicHW(const aclmdlDesc *modelDesc, size_t index, aclmdlHW *hw); + +/** + * @ingroup AscendCL + * @brief get dynamic gear count + * + * @param modelDesc [IN] model description + * @param index [IN] unused, must be -1 + * @param gearCount [OUT] dynamic gear count + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetInputDynamicGearCount(const aclmdlDesc *modelDesc, size_t index, + size_t *gearCount); + +/** + * @ingroup AscendCL + * @brief get dynamic dims info + * + * @param modelDesc [IN] model description + * @param index [IN] unused, must be -1 + * @param dims [OUT] value of dynamic dims + * @param gearCount [IN] dynamic gear count + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetInputDynamicDims(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims, + size_t gearCount); + +/** + * @ingroup AscendCL + * @brief Create data of type aclmdlAIPP + * + * @param batchSize [IN] batchsizes of model + * + * @retval the aclmdlAIPP pointer + */ +ACL_FUNC_VISIBILITY aclmdlAIPP *aclmdlCreateAIPP(uint64_t batchSize); + +/** + * @ingroup AscendCL + * @brief destroy data of type aclmdlAIPP + * + * @param aippParmsSet [IN] Pointer for aclmdlAIPP to be destroyed + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlDestroyAIPP(const aclmdlAIPP *aippParmsSet); + +/** + * @ingroup AscendCL + * @brief set InputFormat of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param inputFormat [IN] The inputFormat of aipp + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPInputFormat(aclmdlAIPP *aippParmsSet, aclAippInputFormat inputFormat); + +/** + * @ingroup AscendCL + * @brief set cscParms of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param csc_switch [IN] Csc switch + * @param cscMatrixR0C0 [IN] Csc_matrix_r0_c0 + * @param cscMatrixR0C1 [IN] Csc_matrix_r0_c1 + * @param cscMatrixR0C2 [IN] Csc_matrix_r0_c2 + * @param cscMatrixR1C0 [IN] Csc_matrix_r1_c0 + * @param cscMatrixR1C1 [IN] Csc_matrix_r1_c1 + * @param cscMatrixR1C2 [IN] Csc_matrix_r1_c2 + * @param cscMatrixR2C0 [IN] Csc_matrix_r2_c0 + * @param cscMatrixR2C1 [IN] Csc_matrix_r2_c1 + * @param cscMatrixR2C2 [IN] Csc_matrix_r2_c2 + * @param cscOutputBiasR0 [IN] Output Bias for RGB to YUV, element of row 0, unsigned number + * @param cscOutputBiasR1 [IN] Output Bias for RGB to YUV, element of row 1, unsigned number + * @param cscOutputBiasR2 [IN] Output Bias for RGB to YUV, element of row 2, unsigned number + * @param cscInputBiasR0 [IN] Input Bias for YUV to RGB, element of row 0, unsigned number + * @param cscInputBiasR1 [IN] Input Bias for YUV to RGB, element of row 1, unsigned number + * @param cscInputBiasR2 [IN] Input Bias for YUV to RGB, element of row 2, unsigned number + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCscParams(aclmdlAIPP *aippParmsSet, int8_t cscSwitch, + int16_t cscMatrixR0C0, int16_t cscMatrixR0C1, int16_t cscMatrixR0C2, + int16_t cscMatrixR1C0, int16_t cscMatrixR1C1, int16_t cscMatrixR1C2, + int16_t cscMatrixR2C0, int16_t cscMatrixR2C1, int16_t cscMatrixR2C2, + uint8_t cscOutputBiasR0, uint8_t cscOutputBiasR1, + uint8_t cscOutputBiasR2, uint8_t cscInputBiasR0, + uint8_t cscInputBiasR1, uint8_t cscInputBiasR2); + +/** + * @ingroup AscendCL + * @brief set rb/ub swap switch of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param rbuvSwapSwitch [IN] rb/ub swap switch + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPRbuvSwapSwitch(aclmdlAIPP *aippParmsSet, int8_t rbuvSwapSwitch); + +/** + * @ingroup AscendCL + * @brief set RGBA->ARGB, YUVA->AYUV swap switch of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param axSwapSwitch [IN] RGBA->ARGB, YUVA->AYUV swap switch + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPAxSwapSwitch(aclmdlAIPP *aippParmsSet, int8_t axSwapSwitch); + +/** + * @ingroup AscendCL + * @brief set source image of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param srcImageSizeW [IN] Source image width + * @param srcImageSizeH [IN] Source image height + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPSrcImageSize(aclmdlAIPP *aippParmsSet, int32_t srcImageSizeW, + int32_t srcImageSizeH); + +/** + * @ingroup AscendCL + * @brief set resize switch of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param scfSwitch [IN] Resize switch + * @param scfInputSizeW [IN] Input width of scf + * @param scfInputSizeH [IN] Input height of scf + * @param scfOutputSizeW [IN] Output width of scf + * @param scfOutputSizeH [IN] Output height of scf + * @param batchIndex [IN] Batch parameter index + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet, + int8_t scfSwitch, + int32_t scfInputSizeW, + int32_t scfInputSizeH, + int32_t scfOutputSizeW, + int32_t scfOutputSizeH, + uint64_t batchIndex); + +/** + * @ingroup AscendCL + * @brief set cropParams of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param cropSwitch [IN] Crop switch + * @param cropStartPosW [IN] The start horizontal position of cropping + * @param cropStartPosH [IN] The start vertical position of cropping + * @param cropSizeW [IN] Crop width + * @param cropSizeH [IN] Crop height + * @param batchIndex [IN] Batch parameter index + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCropParams(aclmdlAIPP *aippParmsSet, + int8_t cropSwitch, + int32_t cropStartPosW, + int32_t cropStartPosH, + int32_t cropSizeW, + int32_t cropSizeH, + uint64_t batchIndex); + +/** + * @ingroup AscendCL + * @brief set paddingParams of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param paddingSwitch [IN] Padding switch + * @param paddingSizeTop [IN] Top padding size + * @param paddingSizeBottom [IN] Bottom padding size + * @param paddingSizeLeft [IN] Left padding size + * @param paddingSizeRight [IN] Right padding size + * @param batchIndex [IN] Batch parameter index + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPaddingParams(aclmdlAIPP *aippParmsSet, int8_t paddingSwitch, + int32_t paddingSizeTop, int32_t paddingSizeBottom, + int32_t paddingSizeLeft, int32_t paddingSizeRight, + uint64_t batchIndex); + +/** + * @ingroup AscendCL + * @brief set DtcPixelMean of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param dtcPixelMeanChn0 [IN] Mean value of channel 0 + * @param dtcPixelMeanChn1 [IN] Mean value of channel 1 + * @param dtcPixelMeanChn2 [IN] Mean value of channel 2 + * @param dtcPixelMeanChn3 [IN] Mean value of channel 3 + * @param batchIndex [IN] Batch parameter index + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *aippParmsSet, + int16_t dtcPixelMeanChn0, + int16_t dtcPixelMeanChn1, + int16_t dtcPixelMeanChn2, + int16_t dtcPixelMeanChn3, + uint64_t batchIndex); + +/** + * @ingroup AscendCL + * @brief set DtcPixelMin of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param dtcPixelMinChn0 [IN] Min value of channel 0 + * @param dtcPixelMinChn1 [IN] Min value of channel 1 + * @param dtcPixelMinChn2 [IN] Min value of channel 2 + * @param dtcPixelMinChn3 [IN] Min value of channel 3 + * @param batchIndex [IN] Batch parameter index + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMin(aclmdlAIPP *aippParmsSet, + float dtcPixelMinChn0, + float dtcPixelMinChn1, + float dtcPixelMinChn2, + float dtcPixelMinChn3, + uint64_t batchIndex); + +/** + * @ingroup AscendCL + * @brief set PixelVarReci of type aclmdlAIPP + * + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP + * @param dtcPixelVarReciChn0 [IN] sfr_dtc_pixel_variance_reci_ch0 + * @param dtcPixelVarReciChn1 [IN] sfr_dtc_pixel_variance_reci_ch1 + * @param dtcPixelVarReciChn2 [IN] sfr_dtc_pixel_variance_reci_ch2 + * @param dtcPixelVarReciChn3 [IN] sfr_dtc_pixel_variance_reci_ch3 + * @param batchIndex [IN] Batch parameter index + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPixelVarReci(aclmdlAIPP *aippParmsSet, + float dtcPixelVarReciChn0, + float dtcPixelVarReciChn1, + float dtcPixelVarReciChn2, + float dtcPixelVarReciChn3, + uint64_t batchIndex); + +/** + * @ingroup AscendCL + * @brief set aipp parameters to model + * + * @param modelId [IN] model id + * @param dataset [IN] Pointer of dataset + * @param index [IN] index of input for aipp data(ACL_DYNAMIC_AIPP_NODE) + * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetInputAIPP(uint32_t modelId, + aclmdlDataset *dataset, + size_t index, + const aclmdlAIPP *aippParmsSet); + +/** + * @ingroup AscendCL + * @brief set aipp parameters to model + * + * @param modelId [IN] model id + * @param dataset [IN] Pointer of dataset + * @param index [IN] index of input for data which linked dynamic aipp(ACL_DATA_WITH_DYNAMIC_AIPP) + * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPByInputIndex(uint32_t modelId, + aclmdlDataset *dataset, + size_t index, + const aclmdlAIPP *aippParmsSet); + +/** + * @ingroup AscendCL + * @brief get input aipp type + * + * @param modelId [IN] model id + * @param index [IN] index of input + * @param type [OUT] aipp type for input.refrer to aclmdlInputAippType(enum) + * @param dynamicAttachedDataIndex [OUT] index for dynamic attached data(ACL_DYNAMIC_AIPP_NODE) + * valid when type is ACL_DATA_WITH_DYNAMIC_AIPP, invalid value is ACL_INVALID_NODE_INDEX + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlGetAippType(uint32_t modelId, + size_t index, + aclmdlInputAippType *type, + size_t *dynamicAttachedDataIndex); + +/** + * @ingroup AscendCL + * @brief get static aipp parameters from model + * + * @param modelId [IN] model id + * @param index [IN] index of tensor + * @param aippInfo [OUT] Pointer for static aipp info + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval ACL_ERROR_MODEL_AIPP_NOT_EXIST The tensor of index is not configured with aipp + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName +*/ +ACL_FUNC_VISIBILITY aclError aclmdlGetFirstAippInfo(uint32_t modelId, size_t index, aclAippInfo *aippInfo); + +/** + * @ingroup AscendCL + * @brief get op description info + * + * @param deviceId [IN] device id + * @param streamId [IN] stream id + * @param taskId [IN] task id + * @param opName [OUT] pointer to op name + * @param opNameLen [IN] the length of op name + * @param inputDesc [OUT] pointer to input description + * @param numInputs [OUT] the number of input tensor + * @param outputDesc [OUT] pointer to output description + * @param numOutputs [OUT] the number of output tensor + * + * @retval ACL_SUCCESS The function is successfully executed + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclmdlCreateAndGetOpDesc(uint32_t deviceId, uint32_t streamId, + uint32_t taskId, char *opName, size_t opNameLen, aclTensorDesc **inputDesc, size_t *numInputs, + aclTensorDesc **outputDesc, size_t *numOutputs); + +/** + * @ingroup AscendCL + * @brief init dump + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclmdlInitDump(); + +/** + * @ingroup AscendCL + * @brief set param of dump + * + * @param dumpCfgPath [IN] the path of dump config + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetDump(const char *dumpCfgPath); + +/** + * @ingroup AscendCL + * @brief finalize dump. + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclmdlFinalizeDump(); + +/** + * @ingroup AscendCL + * @brief load model with config + * + * @param handle [IN] pointer to model config handle + * @param modelId [OUT] pointer to model id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclmdlLoadWithConfig(const aclmdlConfigHandle *handle, uint32_t *modelId); + +/** + * @ingroup AscendCL + * @brief create model config handle of type aclmdlConfigHandle + * + * @retval the aclmdlConfigHandle pointer + * + * @see aclmdlDestroyConfigHandle +*/ +ACL_FUNC_VISIBILITY aclmdlConfigHandle *aclmdlCreateConfigHandle(); + +/** + * @ingroup AscendCL + * @brief destroy data of type aclmdlConfigHandle + * + * @param handle [IN] pointer to model config handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateConfigHandle + */ +ACL_FUNC_VISIBILITY aclError aclmdlDestroyConfigHandle(aclmdlConfigHandle *handle); + +/** + * @ingroup AscendCL + * @brief set config for model load + * + * @param handle [OUT] pointer to model config handle + * @param attr [IN] config attr in model config handle to be set + * @param attrValue [IN] pointer to model config value + * @param valueSize [IN] memory size of attrValue + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetConfigOpt(aclmdlConfigHandle *handle, aclmdlConfigAttr attr, + const void *attrValue, size_t valueSize); + +/** + * @ingroup AscendCL + * @brief set config for model execute + * + * @param handle [OUT] pointer to model execute config handle + * @param attr [IN] config attr in model execute config handle to be set + * @param attrValue [IN] pointer to model execute config value + * @param valueSize [IN] memory size of attrValue + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetExecConfigOpt(aclmdlExecConfigHandle *handle, aclmdlExecConfigAttr attr, + const void *attrValue, size_t valueSize); + +/** + * @ingroup AscendCL + * @brief get real tensor name from modelDesc + * + * @param modelDesc [IN] pointer to modelDesc + * @param name [IN] tensor name + * + * @retval the pointer of real tensor name + * @retval Failure return NULL + */ +ACL_FUNC_VISIBILITY const char *aclmdlGetTensorRealName(const aclmdlDesc *modelDesc, const char *name); + +#ifdef __cplusplus +} +#endif + +#endif // INC_EXTERNAL_ACL_ACL_MODEL_H_ diff --git a/extern/aclMock/acl/acl_op.h b/extern/aclMock/acl/acl_op.h new file mode 100644 index 00000000..d2f60175 --- /dev/null +++ b/extern/aclMock/acl/acl_op.h @@ -0,0 +1,594 @@ +/** +* @file acl_op.h +* +* Copyright (c) Huawei Technologies Co., Ltd. 2019-2020. All rights reserved. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ +#ifndef INC_EXTERNAL_ACL_ACL_OP_H_ +#define INC_EXTERNAL_ACL_ACL_OP_H_ + +#include "acl_base.h" +#include "acl_rt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct aclopHandle aclopHandle; +typedef struct aclopAttr aclopAttr; +typedef struct aclopKernelDesc aclopKernelDesc; + +typedef void (*aclDataDeallocator)(void *data, size_t length); + +static const int ACL_COMPILE_FLAG_BIN_SELECTOR = 1; + +typedef enum aclEngineType { + ACL_ENGINE_SYS, + ACL_ENGINE_AICORE, + ACL_ENGINE_VECTOR, +} aclopEngineType; + +/** + * @ingroup AscendCL + * @brief Set base directory that contains single op models + * + * @par Restriction + * The aclopSetModelDir interface can be called only once in a process. + * @param modelDir [IN] path of the directory + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetModelDir(const char *modelDir); + +/** + * @ingroup AscendCL + * @brief load single op models from memory + * + * @par Restriction + * The aclopLoad interface can be called more than one times in a process. + * @param model [IN] address of single op models + * @param modelSize [IN] size of single op models + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopLoad(const void *model, size_t modelSize); + +/** + * @ingroup AscendCL + * @brief create data of type aclopAttr + * + * @retval pointer to created instance. + * @retval nullptr if run out of memory + */ +ACL_FUNC_VISIBILITY aclopAttr *aclopCreateAttr(); + +/** + * @ingroup AscendCL + * @brief destroy data of typ aclopAttr + * + * @param attr [IN] pointer to the instance of aclopAttr + */ +ACL_FUNC_VISIBILITY void aclopDestroyAttr(const aclopAttr *attr); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is bool + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param attrValue [IN] attribute value + * false if attrValue is 0, true otherwise. + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrBool(aclopAttr *attr, const char *attrName, uint8_t attrValue); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is int64_t + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param attrValue [IN] attribute value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrInt(aclopAttr *attr, const char *attrName, int64_t attrValue); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is float + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param attrValue [IN] attribute value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrFloat(aclopAttr *attr, const char *attrName, float attrValue); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is string + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param attrValue [IN] attribute value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrString(aclopAttr *attr, const char *attrName, const char *attrValue); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is aclDataType + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param attrValue [IN] attribute value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrDataType(aclopAttr *attr, const char *attrName, aclDataType attrValue); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is list of aclDataType + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param numValues [IN] number of values. false if attrValue is 0, true otherwise. + * @param values [IN] pointer to values + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrListDataType(aclopAttr *attr, const char *attrName, int numValues, + const aclDataType values[]); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is list of bools + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param numValues [IN] number of values. false if attrValue is 0, true otherwise. + * @param values [IN] pointer to values + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrListBool(aclopAttr *attr, const char *attrName, int numValues, + const uint8_t *values); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is list of ints + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param numValues [IN] number of values + * @param values [IN] pointer to values + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrListInt(aclopAttr *attr, const char *attrName, int numValues, + const int64_t *values); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is list of floats + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param numValues [IN] number of values + * @param values [IN] pointer to values + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrListFloat(aclopAttr *attr, const char *attrName, int numValues, + const float *values); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is list of strings + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param numValues [IN] number of values + * @param values [IN] pointer to values + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrListString(aclopAttr *attr, const char *attrName, int numValues, + const char **values); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is list of list of ints + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param numLists [IN] number of lists + * @param numValues [IN] pointer to number of values of each list + * @param values [IN] pointer to values + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr, + const char *attrName, + int numLists, + const int *numValues, + const int64_t *const values[]); + +/** + * @ingroup AscendCL + * @brief Load and execute the specified operator asynchronously + * + * @par Restriction + * @li The input and output organization of each operator is different, + * and the application needs to organize the operator strictly + * according to the operator input and output parameters when calling. + * @li When the user calls aclopExecute, + * the ACL finds the corresponding task according to the optype, + * the description of the input tesnsor, + * the description of the output tesnsor, and attr, and issues the execution. + * + * @param opType [IN] type of op + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param inputs [IN] pointer to array of input buffers + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN] pointer to array of output tensor descriptions + * @param outputs [OUT] pointer to array of output buffers + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * @param stream [IN] stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_DEPRECATED_MESSAGE("aclopExecute is deprecated, use aclopExecuteV2 instead") +ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType, + int numInputs, + const aclTensorDesc *const inputDesc[], + const aclDataBuffer *const inputs[], + int numOutputs, + const aclTensorDesc *const outputDesc[], + aclDataBuffer *const outputs[], + const aclopAttr *attr, + aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief Load and execute the specified operator + * The difference with aclopExecute is that aclopExecuteV2 will refresh outputDesc + * + * @par Restriction + * @li The input and output organization of each operator is different, + * and the application needs to organize the operator strictly + * according to the operator input and output parameters when calling. + * @li When the user calls aclopExecuteV2, + * the ACL finds the corresponding task according to the optype, + * the description of the input tesnsor, + * the description of the output tesnsor, and attr, and issues the execution. + * + * @param opType [IN] type of op + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param inputs [IN] pointer to array of input buffers + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN|OUT] pointer to array of output tensor descriptions + * @param outputs [OUT] pointer to array of output buffers + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * @param stream [IN] stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopExecuteV2(const char *opType, + int numInputs, + aclTensorDesc *inputDesc[], + aclDataBuffer *inputs[], + int numOutputs, + aclTensorDesc *outputDesc[], + aclDataBuffer *outputs[], + aclopAttr *attr, + aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief create a instance of aclopHandle. + * + * @param opType [IN] type of op + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN] pointer to array of output tensor descriptions + * @param opAttr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * @param handle [OUT] pointer to the pointer to the handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopCreateHandle(const char *opType, + int numInputs, + const aclTensorDesc *const inputDesc[], + int numOutputs, + const aclTensorDesc *const outputDesc[], + const aclopAttr *opAttr, + aclopHandle **handle); + +/** + * @ingroup AscendCL + * @brief destroy aclopHandle instance + * + * @param handle [IN] pointer to the instance of aclopHandle + */ +ACL_FUNC_VISIBILITY void aclopDestroyHandle(aclopHandle *handle); + +/** + * @ingroup AscendCL + * @brief execute an op with the handle. + * can save op model matching cost compared with aclopExecute + * + * @param handle [IN] pointer to the instance of aclopHandle. + * The aclopCreateHandle interface has been called + * in advance to create aclopHandle type data. + * @param numInputs [IN] number of inputs + * @param inputs [IN] pointer to array of input buffers. + * The aclCreateDataBuffer interface has been called + * in advance to create aclDataBuffer type data. + * @param numOutputs [IN] number of outputs + * @param outputs [OUT] pointer to array of output buffers + * @param stream [IN] stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclopCreateHandle | aclCreateDataBuffer + */ +ACL_FUNC_VISIBILITY aclError aclopExecWithHandle(aclopHandle *handle, + int numInputs, + const aclDataBuffer *const inputs[], + int numOutputs, + aclDataBuffer *const outputs[], + aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief cast data type + * + * @param srcDesc [IN] source tensor desc + * @param srcBuffer [IN] source tensor buffer + * @param dstDesc [IN] destination tensor desc + * @param dstBuffer [OUT] destination tensor buffer + * @param truncate [IN] do not truncate if value is 0, truncate otherwise + * @param stream [IN] stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopCast(const aclTensorDesc *srcDesc, + const aclDataBuffer *srcBuffer, + const aclTensorDesc *dstDesc, + aclDataBuffer *dstBuffer, + uint8_t truncate, + aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief create a handle for casting datatype + * + * @param srcDesc [IN] source tensor desc + * @param dstDesc [IN] destination tensor desc + * @param truncate [IN] do not truncate if value is 0, truncate otherwise + * @param handle [OUT] pointer to the pointer to the handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopCreateHandleForCast(aclTensorDesc *srcDesc, + aclTensorDesc *dstDesc, + uint8_t truncate, + aclopHandle **handle); + + +/** + * @ingroup AscendCL + * @brief create kernel + * + * @param opType [IN] op type + * @param kernelId [IN] kernel id + * @param kernelName [IN] kernel name + * @param binData [IN] kernel bin data + * @param binSize [IN] kernel bin size + * @param enginetype [IN] enigne type + * @param deallocator [IN] callback function for deallocating bin data, + * null if bin data to be deallocated by caller + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclopCompile + */ +ACL_FUNC_VISIBILITY aclError aclopCreateKernel(const char *opType, + const char *kernelId, + const char *kernelName, + void *binData, + int binSize, + aclopEngineType enginetype, + aclDataDeallocator deallocator); + + +/** + * @ingroup AscendCL + * @brief create kernel + * + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN] pointer to array of output tensor descriptions + * @param opAttr [IN] pointer to instance of aclopAttr + * @param aclopKernelDesc [IN] pointer to instance of aclopKernelDesc + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +typedef aclError (*aclopCompileFunc)(int numInputs, + const aclTensorDesc *const inputDesc[], + int numOutputs, + const aclTensorDesc *const outputDesc[], + const aclopAttr *opAttr, + aclopKernelDesc *aclopKernelDesc); + +/** + * @ingroup AscendCL + * @brief register compile function + * + * @param opType [IN] op type + * @param func [IN] compile function + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclopUnregisterCompileFunc + */ +ACL_FUNC_VISIBILITY aclError aclopRegisterCompileFunc(const char *opType, aclopCompileFunc func); + +/** + * @ingroup AscendCL + * @brief unregister compile function + * + * @param opType [IN] op type + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopUnregisterCompileFunc(const char *opType); + +/** + * @ingroup AscendCL + * @brief set kernel args + * + * @param kernelDesc [IN] pointer to instance of aclopKernelDesc + * @param kernelId [IN] kernel id + * @param blockDim [IN] block dim + * @param args [IN] args + * @param argSize [IN] size in bytes of args + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetKernelArgs(aclopKernelDesc *kernelDesc, + const char *kernelId, + uint32_t blockDim, + const void *args, + uint32_t argSize); + +/** + * @ingroup AscendCL + * @brief set workspace sizes + * + * @param kernelDesc [IN] pointer to instance of aclopKernelDesc + * @param numWorkspaces [IN] number of workspaces + * @param workspaceSizes [IN] pointer to array of sizes of workspaces + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetKernelWorkspaceSizes(aclopKernelDesc *kernelDesc, int numWorkspaces, + size_t *workspaceSizes); + +/** + * @ingroup AscendCL + * @brief compile op with dynamic shape + * + * @param opType [IN] op type + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN] pointer to array of output tensor descriptions + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopUpdateParams(const char *opType, + int numInputs, + const aclTensorDesc *const inputDesc[], + int numOutputs, + const aclTensorDesc *const outputDesc[], + const aclopAttr *attr); + +/** + * @ingroup AscendCL + * @brief inferShape the specified operator synchronously + * + * @param opType [IN] type of op + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param inputs [IN] pointer to array of input buffers + * @param numOutputs [IN] number of outputs + * @param outputDesc [OUT] pointer to array of output tensor descriptions + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopInferShape(const char *opType, + int numInputs, + aclTensorDesc *inputDesc[], + aclDataBuffer *inputs[], + int numOutputs, + aclTensorDesc *outputDesc[], + aclopAttr *attr); + +#define ACL_OP_DUMP_OP_AICORE_ARGS 0x00000001U + +/** + * @ingroup AscendCL + * @brief Enable the dump function of the corresponding dump type. + * + * @param dumpType [IN] type of dump + * @param path [IN] dump path + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopStartDumpArgs(uint32_t dumpType, const char *path); + +/** + * @ingroup AscendCL + * @brief Disable the dump function of the corresponding dump type. + * + * @param dumpType [IN] type of dump + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopStopDumpArgs(uint32_t dumpType); + +#ifdef __cplusplus +} +#endif + +#endif // INC_EXTERNAL_ACL_ACL_OP_H_ diff --git a/extern/aclMock/acl/acl_op_compiler.h b/extern/aclMock/acl/acl_op_compiler.h new file mode 100644 index 00000000..d4cbb155 --- /dev/null +++ b/extern/aclMock/acl/acl_op_compiler.h @@ -0,0 +1,235 @@ +/** +* @file acl_op_compiler.h +* +* Copyright (c) Huawei Technologies Co., Ltd. 2019-2020. All rights reserved. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ +#ifndef INC_EXTERNAL_ACL_ACL_OP_COMPILER_H_ +#define INC_EXTERNAL_ACL_ACL_OP_COMPILER_H_ + +#include "acl_base.h" +#include "acl_op.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum aclCompileType { + ACL_COMPILE_SYS, + ACL_COMPILE_UNREGISTERED +} aclopCompileType; + +typedef enum { + ACL_PRECISION_MODE, + ACL_AICORE_NUM, + ACL_AUTO_TUNE_MODE, // The auto_tune_mode has been discarded + ACL_OP_SELECT_IMPL_MODE, + ACL_OPTYPELIST_FOR_IMPLMODE, + ACL_OP_DEBUG_LEVEL, + ACL_DEBUG_DIR, + ACL_OP_COMPILER_CACHE_MODE, + ACL_OP_COMPILER_CACHE_DIR, + ACL_OP_PERFORMANCE_MODE, + ACL_OP_JIT_COMPILE, + ACL_OP_DETERMINISTIC, + ACL_CUSTOMIZE_DTYPES, + ACL_OP_PRECISION_MODE, + ACL_ALLOW_HF32, + ACL_PRECISION_MODE_V2 +} aclCompileOpt; + +typedef enum aclCompileFlag { + ACL_OP_COMPILE_DEFAULT, + ACL_OP_COMPILE_FUZZ +} aclOpCompileFlag; + +typedef struct aclGraphDumpOption aclGraphDumpOption; + +/** + * @ingroup AscendCL + * @brief compile op + * + * @param opType [IN] op type + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN] pointer to array of output tensor descriptions + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * @param engineType [IN] engine type + * @param compileFlag [IN] compile flag + * @param opPath [IN] path of op + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopCompile(const char *opType, + int numInputs, + const aclTensorDesc *const inputDesc[], + int numOutputs, + const aclTensorDesc *const outputDesc[], + const aclopAttr *attr, + aclopEngineType engineType, + aclopCompileType compileFlag, + const char *opPath); + +/** + * @ingroup AscendCL + * @brief compile and execute op + * + * @param opType [IN] op type + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param inputs [IN] pointer to array of input buffers + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN] pointer to array of output tensor descriptions + * @param outputs [IN] pointer to array of outputs buffers + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * @param engineType [IN] engine type + * @param compileFlag [IN] compile flag + * @param opPath [IN] path of op + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopCompileAndExecute(const char *opType, + int numInputs, const aclTensorDesc *const inputDesc[], const aclDataBuffer *const inputs[], + int numOutputs, const aclTensorDesc *const outputDesc[], aclDataBuffer *const outputs[], + const aclopAttr *attr, aclopEngineType engineType, aclopCompileType compileFlag, + const char *opPath, aclrtStream stream); + + +/** + * @ingroup AscendCL + * @brief compile and execute op + * + * @param opType [IN] op type + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param inputs [IN] pointer to array of input buffers + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN|OUT] pointer to array of output tensor descriptions + * @param outputs [IN] pointer to array of outputs buffers + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * @param engineType [IN] engine type + * @param compileFlag [IN] compile flag + * @param opPath [IN] path of op + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopCompileAndExecuteV2(const char *opType, + int numInputs, aclTensorDesc *inputDesc[], aclDataBuffer *inputs[], + int numOutputs, aclTensorDesc *outputDesc[], aclDataBuffer *outputs[], + aclopAttr *attr, aclopEngineType engineType, aclopCompileType compileFlag, + const char *opPath, aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief set compile option + * + * @param aclCompileOpt [IN] compile option + * @param value [IN] pointer for the option value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetCompileopt(aclCompileOpt opt, const char *value); + +/** + * @ingroup AscendCL + * @brief get compile option value size + * + * @param aclCompileOpt [IN] compile option + * + * @retval size of compile option value + */ +ACL_FUNC_VISIBILITY size_t aclGetCompileoptSize(aclCompileOpt opt); + +/** + * @ingroup AscendCL + * @brief get compile option + * + * @param aclCompileOpt [IN] compile option + * @param value [OUT] pointer for the option value + * @param length [IN] length of value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclGetCompileopt(aclCompileOpt opt, char *value, size_t length); + +/** + * @ingroup AscendCL + * @brief set compile flag + * + * @param flag [IN] compile flag, ACL_OP_COMPILE_DEFAULT means compile with default mode + * ACL_OP_COMPILE_FUZZ means compile with fuzz mode + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetCompileFlag(aclOpCompileFlag flag); + +/** + * @ingroup AscendCL + * @brief generate graph and dump + * + * @param opType [IN] op type + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param inputs [IN] pointer to array of input buffers + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN] pointer to array of output tensor descriptions + * @param outputs [IN] pointer to array of outputs buffers + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * @param engineType [IN] engine type + * @param graphDumpPath [IN] dump path, if the suffix is ".txt", it means file path, else it means directory path + * @param graphDumpOpt [IN] dump option, nullptr is supported + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclGenGraphAndDumpForOp(const char *opType, + int numInputs, const aclTensorDesc *const inputDesc[], const aclDataBuffer *const inputs[], + int numOutputs, const aclTensorDesc *const outputDesc[], aclDataBuffer *const outputs[], + const aclopAttr *attr, aclopEngineType engineType, + const char *graphDumpPath, const aclGraphDumpOption *graphDumpOpt); + +/** + * @ingroup AscendCL + * @brief Create the graph dump option + * + * @retval null for failed + * @retval OtherValues success + * + * @see aclDestroyGraphDumpOpt + */ +ACL_FUNC_VISIBILITY aclGraphDumpOption *aclCreateGraphDumpOpt(); + +/** + * @ingroup AscendCL + * @brief Destroy graph dump option + * + * @param graphDumpOpt [IN] pointer to the graph dump option + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclCreateGraphDumpOpt + */ +ACL_FUNC_VISIBILITY aclError aclDestroyGraphDumpOpt(const aclGraphDumpOption *graphDumpOpt); + +#ifdef __cplusplus +} +#endif + +#endif // INC_EXTERNAL_ACL_ACL_OP_COMPILER_H_ diff --git a/extern/aclMock/acl/acl_rt.h b/extern/aclMock/acl/acl_rt.h new file mode 100644 index 00000000..ba1fcb6c --- /dev/null +++ b/extern/aclMock/acl/acl_rt.h @@ -0,0 +1,1552 @@ +/** +* @file acl_rt.h +* +* Copyright (c) Huawei Technologies Co., Ltd. 2019-2020. All rights reserved. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#ifndef INC_EXTERNAL_ACL_ACL_RT_H_ +#define INC_EXTERNAL_ACL_ACL_RT_H_ + +#include +#include +#include "acl_base.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ACL_EVENT_SYNC 0x00000001u +#define ACL_EVENT_CAPTURE_STREAM_PROGRESS 0x00000002u +#define ACL_EVENT_TIME_LINE 0x00000008u + +#define ACL_STREAM_FAST_LAUNCH 0x00000001u +#define ACL_STREAM_FAST_SYNC 0x00000002u + +#define ACL_CONTINUE_ON_FAILURE 0x00000000u +#define ACL_STOP_ON_FAILURE 0x00000001u + +typedef enum aclrtRunMode { + ACL_DEVICE, + ACL_HOST, +} aclrtRunMode; + +typedef enum aclrtTsId { + ACL_TS_ID_AICORE = 0, + ACL_TS_ID_AIVECTOR = 1, + ACL_TS_ID_RESERVED = 2, +} aclrtTsId; + +typedef enum aclrtEventStatus { + ACL_EVENT_STATUS_COMPLETE = 0, + ACL_EVENT_STATUS_NOT_READY = 1, + ACL_EVENT_STATUS_RESERVED = 2, +} aclrtEventStatus; + +typedef enum aclrtEventRecordedStatus { + ACL_EVENT_RECORDED_STATUS_NOT_READY = 0, + ACL_EVENT_RECORDED_STATUS_COMPLETE = 1, +} aclrtEventRecordedStatus; + +typedef enum aclrtEventWaitStatus { + ACL_EVENT_WAIT_STATUS_COMPLETE = 0, + ACL_EVENT_WAIT_STATUS_NOT_READY = 1, + ACL_EVENT_WAIT_STATUS_RESERVED = 0xFFFF, +} aclrtEventWaitStatus; + +typedef enum aclrtStreamStatus { + ACL_STREAM_STATUS_COMPLETE = 0, + ACL_STREAM_STATUS_NOT_READY = 1, + ACL_STREAM_STATUS_RESERVED = 0xFFFF, +} aclrtStreamStatus; + +typedef enum aclrtCallbackBlockType { + ACL_CALLBACK_NO_BLOCK, + ACL_CALLBACK_BLOCK, +} aclrtCallbackBlockType; + +typedef enum aclrtMemcpyKind { + ACL_MEMCPY_HOST_TO_HOST, + ACL_MEMCPY_HOST_TO_DEVICE, + ACL_MEMCPY_DEVICE_TO_HOST, + ACL_MEMCPY_DEVICE_TO_DEVICE, +} aclrtMemcpyKind; + +typedef enum aclrtMemMallocPolicy { + ACL_MEM_MALLOC_HUGE_FIRST, + ACL_MEM_MALLOC_HUGE_ONLY, + ACL_MEM_MALLOC_NORMAL_ONLY, + ACL_MEM_MALLOC_HUGE_FIRST_P2P, + ACL_MEM_MALLOC_HUGE_ONLY_P2P, + ACL_MEM_MALLOC_NORMAL_ONLY_P2P, + ACL_MEM_TYPE_LOW_BAND_WIDTH = 0x0100, + ACL_MEM_TYPE_HIGH_BAND_WIDTH = 0x1000, +} aclrtMemMallocPolicy; + +typedef enum aclrtMemAttr { + ACL_DDR_MEM, + ACL_HBM_MEM, + ACL_DDR_MEM_HUGE, + ACL_DDR_MEM_NORMAL, + ACL_HBM_MEM_HUGE, + ACL_HBM_MEM_NORMAL, + ACL_DDR_MEM_P2P_HUGE, + ACL_DDR_MEM_P2P_NORMAL, + ACL_HBM_MEM_P2P_HUGE, + ACL_HBM_MEM_P2P_NORMAL, +} aclrtMemAttr; + +typedef enum aclrtGroupAttr { + ACL_GROUP_AICORE_INT, + ACL_GROUP_AIV_INT, + ACL_GROUP_AIC_INT, + ACL_GROUP_SDMANUM_INT, + ACL_GROUP_ASQNUM_INT, + ACL_GROUP_GROUPID_INT +} aclrtGroupAttr; + +typedef enum aclrtFloatOverflowMode { + ACL_RT_OVERFLOW_MODE_SATURATION = 0, + ACL_RT_OVERFLOW_MODE_INFNAN, + ACL_RT_OVERFLOW_MODE_UNDEF, +} aclrtFloatOverflowMode; + +typedef enum { + ACL_RT_STREAM_WORK_ADDR_PTR = 0, /**< pointer to model work addr */ + ACL_RT_STREAM_WORK_SIZE, /**< pointer to model work size */ + ACL_RT_STREAM_FLAG, + ACL_RT_STREAM_PRIORITY, +} aclrtStreamConfigAttr; + +typedef struct aclrtStreamConfigHandle { + void* workptr; + size_t workSize; + size_t flag; + uint32_t priority; +} aclrtStreamConfigHandle; + +typedef struct aclrtUtilizationExtendInfo aclrtUtilizationExtendInfo; + +typedef struct aclrtUtilizationInfo { + int32_t cubeUtilization; + int32_t vectorUtilization; + int32_t aicpuUtilization; + int32_t memoryUtilization; + aclrtUtilizationExtendInfo *utilizationExtend; /**< reserved parameters, current version needs to be null */ +} aclrtUtilizationInfo; + +typedef struct tagRtGroupInfo aclrtGroupInfo; + +typedef struct rtExceptionInfo aclrtExceptionInfo; + +typedef enum aclrtMemLocationType { + ACL_MEM_LOCATION_TYPE_HOST = 0, /**< reserved enum, current version not support */ + ACL_MEM_LOCATION_TYPE_DEVICE, +} aclrtMemLocationType; + +typedef struct aclrtMemLocation { + uint32_t id; + aclrtMemLocationType type; +} aclrtMemLocation; + +typedef enum aclrtMemAllocationType { + ACL_MEM_ALLOCATION_TYPE_PINNED = 0, +} aclrtMemAllocationType; + +typedef enum aclrtMemHandleType { + ACL_MEM_HANDLE_TYPE_NONE = 0, +} aclrtMemHandleType; + +typedef struct aclrtPhysicalMemProp { + aclrtMemHandleType handleType; + aclrtMemAllocationType allocationType; + aclrtMemAttr memAttr; + aclrtMemLocation location; + uint64_t reserve; +} aclrtPhysicalMemProp; + +typedef void* aclrtDrvMemHandle; + +typedef void (*aclrtCallback)(void *userData); + +typedef void (*aclrtExceptionInfoCallback)(aclrtExceptionInfo *exceptionInfo); + +/** + * @ingroup AscendCL + * @brief Set a callback function to handle exception information + * + * @param callback [IN] callback function to handle exception information + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSetExceptionInfoCallback(aclrtExceptionInfoCallback callback); + +/** + * @ingroup AscendCL + * @brief Get task id from exception information + * + * @param info [IN] pointer of exception information + * + * @retval The task id from exception information + * @retval 0xFFFFFFFF if info is null + */ +ACL_FUNC_VISIBILITY uint32_t aclrtGetTaskIdFromExceptionInfo(const aclrtExceptionInfo *info); + +/** + * @ingroup AscendCL + * @brief Get stream id from exception information + * + * @param info [IN] pointer of exception information + * + * @retval The stream id from exception information + * @retval 0xFFFFFFFF if info is null + */ +ACL_FUNC_VISIBILITY uint32_t aclrtGetStreamIdFromExceptionInfo(const aclrtExceptionInfo *info); + +/** + * @ingroup AscendCL + * @brief Get thread id from exception information + * + * @param info [IN] pointer of exception information + * + * @retval The thread id of fail task + * @retval 0xFFFFFFFF if info is null + */ +ACL_FUNC_VISIBILITY uint32_t aclrtGetThreadIdFromExceptionInfo(const aclrtExceptionInfo *info); + +/** + * @ingroup AscendCL + * @brief Get device id from exception information + * + * @param info [IN] pointer of exception information + * + * @retval The thread id of fail task + * @retval 0xFFFFFFFF if info is null + */ +ACL_FUNC_VISIBILITY uint32_t aclrtGetDeviceIdFromExceptionInfo(const aclrtExceptionInfo *info); + +/** + * @ingroup AscendCL + * @brief Get error code from exception information + * + * @param info [IN] pointer of exception information + * + * @retval The error code from exception information + * @retval 0xFFFFFFFF if info is null + */ +ACL_FUNC_VISIBILITY uint32_t aclrtGetErrorCodeFromExceptionInfo(const aclrtExceptionInfo *info); + +/** + * @ingroup AscendCL + * @brief The thread that handles the callback function on the Stream + * + * @param threadId [IN] thread ID + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSubscribeReport(uint64_t threadId, aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief Add a callback function to be executed on the host + * to the task queue of the Stream + * + * @param fn [IN] Specify the callback function to be added + * The function prototype of the callback function is: + * typedef void (*aclrtCallback)(void *userData); + * @param userData [IN] User data to be passed to the callback function + * @param blockType [IN] callback block type + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtLaunchCallback(aclrtCallback fn, void *userData, aclrtCallbackBlockType blockType, + aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief After waiting for a specified time, trigger callback processing + * + * @par Function + * The thread processing callback specified by + * the aclrtSubscribeReport interface + * + * @param timeout [IN] timeout value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtSubscribeReport + */ +ACL_FUNC_VISIBILITY aclError aclrtProcessReport(int32_t timeout); + +/** + * @ingroup AscendCL + * @brief Cancel thread registration, + * the callback function on the specified Stream + * is no longer processed by the specified thread + * + * @param threadId [IN] thread ID + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtUnSubscribeReport(uint64_t threadId, aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief create context and associates it with the calling thread + * + * @par Function + * The following use cases are supported: + * @li If you don't call the aclrtCreateContext interface + * to explicitly create the context, + * the system will use the default context, which is implicitly created + * when the aclrtSetDevice interface is called. + * @li If multiple contexts are created in a process + * (there is no limit on the number of contexts), + * the current thread can only use one of them at the same time. + * It is recommended to explicitly specify the context of the current thread + * through the aclrtSetCurrentContext interface to increase. + * the maintainability of the program. + * + * @param context [OUT] point to the created context + * @param deviceId [IN] device to create context on + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtSetDevice | aclrtSetCurrentContext + */ +ACL_FUNC_VISIBILITY aclError aclrtCreateContext(aclrtContext *context, int32_t deviceId); + +/** + * @ingroup AscendCL + * @brief destroy context instance + * + * @par Function + * Can only destroy context created through aclrtCreateContext interface + * + * @param context [IN] the context to destroy + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtCreateContext + */ +ACL_FUNC_VISIBILITY aclError aclrtDestroyContext(aclrtContext context); + +/** + * @ingroup AscendCL + * @brief set the context of the thread + * + * @par Function + * The following scenarios are supported: + * @li If the aclrtCreateContext interface is called in a thread to explicitly + * create a Context (for example: ctx1), the thread's Context can be specified + * without calling the aclrtSetCurrentContext interface. + * The system uses ctx1 as the context of thread1 by default. + * @li If the aclrtCreateContext interface is not explicitly created, + * the system uses the default context as the context of the thread. + * At this time, the aclrtDestroyContext interface cannot be used to release + * the default context. + * @li If the aclrtSetCurrentContext interface is called multiple times to + * set the thread's Context, the last one prevails. + * + * @par Restriction + * @li If the cevice corresponding to the context set for the thread + * has been reset, you cannot set the context as the context of the thread, + * otherwise a business exception will result. + * @li It is recommended to use the context created in a thread. + * If the aclrtCreateContext interface is called in thread A to create a context, + * and the context is used in thread B, + * the user must guarantee the execution order of tasks in the same stream + * under the same context in two threads. + * + * @param context [IN] the current context of the thread + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtCreateContext | aclrtDestroyContext + */ +ACL_FUNC_VISIBILITY aclError aclrtSetCurrentContext(aclrtContext context); + +/** + * @ingroup AscendCL + * @brief get the context of the thread + * + * @par Function + * If the user calls the aclrtSetCurrentContext interface + * multiple times to set the context of the current thread, + * then the last set context is obtained + * + * @param context [OUT] the current context of the thread + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtSetCurrentContext + */ +ACL_FUNC_VISIBILITY aclError aclrtGetCurrentContext(aclrtContext *context); + +/** + * @ingroup AscendCL + * @brief get system param option value in current context + * + * @param opt[IN] system option + * @param value[OUT] value of system option + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclrtCtxGetSysParamOpt(aclSysParamOpt opt, int64_t *value); + +/** + * @ingroup AscendCL + * @brief set system param option value in current context + * + * @param opt[IN] system option + * @param value[IN] value of system option + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclrtCtxSetSysParamOpt(aclSysParamOpt opt, int64_t value); + +/** + * @ingroup AscendCL + * @brief Specify the device to use for the operation + * implicitly create the default context and the default stream + * + * @par Function + * The following use cases are supported: + * @li Device can be specified in the process or thread. + * If you call the aclrtSetDevice interface multiple + * times to specify the same device, + * you only need to call the aclrtResetDevice interface to reset the device. + * @li The same device can be specified for operation + * in different processes or threads. + * @li Device is specified in a process, + * and multiple threads in the process can share this device to explicitly + * create a Context (aclrtCreateContext interface). + * @li In multi-device scenarios, you can switch to other devices + * through the aclrtSetDevice interface in the process. + * + * @param deviceId [IN] the device id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtResetDevice |aclrtCreateContext + */ +ACL_FUNC_VISIBILITY aclError aclrtSetDevice(int32_t deviceId); + +/** + * @ingroup AscendCL + * @brief Reset the current operating Device and free resources on the device, + * including the default context, the default stream, + * and all streams created under the default context, + * and synchronizes the interface. + * If the task under the default context or stream has not been completed, + * the system will wait for the task to complete before releasing it. + * + * @par Restriction + * @li The Context, Stream, and Event that are explicitly created + * on the device to be reset. Before resetting, + * it is recommended to follow the following interface calling sequence, + * otherwise business abnormalities may be caused. + * @li Interface calling sequence: + * call aclrtDestroyEvent interface to release Event or + * call aclrtDestroyStream interface to release explicitly created Stream-> + * call aclrtDestroyContext to release explicitly created Context-> + * call aclrtResetDevice interface + * + * @param deviceId [IN] the device id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtResetDevice(int32_t deviceId); + +/** + * @ingroup AscendCL + * @brief get target device of current thread + * + * @param deviceId [OUT] the device id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetDevice(int32_t *deviceId); + +/** + * @ingroup AscendCL + * @brief set stream failure mode + * + * @param stream [IN] the stream to set + * @param mode [IN] stream failure mode + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSetStreamFailureMode(aclrtStream stream, uint64_t mode); + +/** + * @ingroup AscendCL + * @brief get target side + * + * @param runMode [OUT] the run mode + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetRunMode(aclrtRunMode *runMode); + +/** + * @ingroup AscendCL + * @brief Wait for compute device to finish + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSynchronizeDevice(void); + +/** + * @ingroup AscendCL + * @brief Set Scheduling TS + * + * @param tsId [IN] the ts id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSetTsDevice(aclrtTsId tsId); + +/** + * @ingroup AscendCL + * @brief Query the comprehensive usage rate of device + * @param deviceId [IN] the need query's deviceId + * @param utilizationInfo [OUT] the usage rate of device + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetDeviceUtilizationRate(int32_t deviceId, aclrtUtilizationInfo *utilizationInfo); + +/** + * @ingroup AscendCL + * @brief get total device number. + * + * @param count [OUT] the device number + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetDeviceCount(uint32_t *count); + +/** + * @ingroup AscendCL + * @brief create event instance + * + * @param event [OUT] created event + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtCreateEvent(aclrtEvent *event); + +/** + * @ingroup AscendCL + * @brief create event instance with flag + * + * @param event [OUT] created event + * @param flag [IN] event flag + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtCreateEventWithFlag(aclrtEvent *event, uint32_t flag); + +/** + * @ingroup AscendCL + * @brief destroy event instance + * + * @par Function + * Only events created through the aclrtCreateEvent interface can be + * destroyed, synchronous interfaces. When destroying an event, + * the user must ensure that the tasks involved in the aclrtSynchronizeEvent + * interface or the aclrtStreamWaitEvent interface are completed before + * they are destroyed. + * + * @param event [IN] event to destroy + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtCreateEvent | aclrtSynchronizeEvent | aclrtStreamWaitEvent + */ +ACL_FUNC_VISIBILITY aclError aclrtDestroyEvent(aclrtEvent event); + +/** + * @ingroup AscendCL + * @brief Record an Event in the Stream + * + * @param event [IN] event to record + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtRecordEvent(aclrtEvent event, aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief Reset an event + * + * @par Function + * Users need to make sure to wait for the tasks in the Stream + * to complete before resetting the Event + * + * @param event [IN] event to reset + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtResetEvent(aclrtEvent event, aclrtStream stream); + + /** + * @ingroup AscendCL + * @brief Queries an event's status + * + * @param event [IN] event to query + * @param status [OUT] event status + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_DEPRECATED_MESSAGE("aclrtQueryEvent is deprecated, use aclrtQueryEventStatus instead") +ACL_FUNC_VISIBILITY aclError aclrtQueryEvent(aclrtEvent event, aclrtEventStatus *status); + +/** + * @ingroup AscendCL + * @brief Queries an event's status + * + * @param event [IN] event to query + * @param status [OUT] event recorded status + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtQueryEventStatus(aclrtEvent event, aclrtEventRecordedStatus *status); + +/** +* @ingroup AscendCL +* @brief Queries an event's wait-status +* +* @param event [IN] event to query +* @param status [OUT] event wait-status +* +* @retval ACL_SUCCESS The function is successfully executed. +* @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclrtQueryEventWaitStatus(aclrtEvent event, aclrtEventWaitStatus *status); + +/** + * @ingroup AscendCL + * @brief Block Host Running, wait event to be complete + * + * @param event [IN] event to wait + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSynchronizeEvent(aclrtEvent event); + +/** + * @ingroup AscendCL + * @brief Block Host Running, wait event to be complete + * + * @param event [IN] event to wait + * @param timeout [IN] timeout value,the unit is milliseconds + * -1 means waiting indefinitely, 0 means check whether synchronization is immediately completed + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSynchronizeEventWithTimeout(aclrtEvent event, int32_t timeout); + +/** + * @ingroup AscendCL + * @brief computes the elapsed time between events. + * + * @param ms [OUT] time between start and end in ms + * @param start [IN] starting event + * @param end [IN] ending event + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtCreateEvent | aclrtRecordEvent | aclrtSynchronizeStream + */ +ACL_FUNC_VISIBILITY aclError aclrtEventElapsedTime(float *ms, aclrtEvent startEvent, aclrtEvent endEvent); + +/** + * @ingroup AscendCL + * @brief alloc memory on device, real alloc size is aligned to 32 bytes and padded with 32 bytes + * + * @par Function + * alloc for size linear memory on device + * and return a pointer to allocated memory by *devPtr + * + * @par Restriction + * @li The memory requested by the aclrtMalloc interface needs to be released + * through the aclrtFree interface. + * @li Before calling the media data processing interface, + * if you need to apply memory on the device to store input or output data, + * you need to call acldvppMalloc to apply for memory. + * + * @param devPtr [OUT] pointer to pointer to allocated memory on device + * @param size [IN] alloc memory size + * @param policy [IN] memory alloc policy + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtFree | acldvppMalloc | aclrtMallocCached + */ +ACL_FUNC_VISIBILITY aclError aclrtMalloc(void **devPtr, + size_t size, + aclrtMemMallocPolicy policy); + +/** + * @ingroup AscendCL + * @brief alloc memory on device, real alloc size is aligned to 32 bytes with no padding + * + * @par Function + * alloc for size linear memory on device + * and return a pointer to allocated memory by *devPtr + * + * @par Restriction + * @li The memory requested by the aclrtMallocAlign32 interface needs to be released + * through the aclrtFree interface. + * + * @param devPtr [OUT] pointer to pointer to allocated memory on device + * @param size [IN] alloc memory size + * @param policy [IN] memory alloc policy + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtFree | aclrtMalloc | aclrtMallocCached + */ +ACL_FUNC_VISIBILITY aclError aclrtMallocAlign32(void **devPtr, + size_t size, + aclrtMemMallocPolicy policy); + +/** + * @ingroup AscendCL + * @brief allocate memory on device with cache + * + * @par Function + * alloc for size linear memory on device + * and return a pointer to allocated memory by *devPtr + * + * @par Restriction + * @li The memory requested by the aclrtMallocCached interface needs to be released + * through the aclrtFree interface. + * + * @param devPtr [OUT] pointer to pointer to allocated memory on device + * @param size [IN] alloc memory size + * @param policy [IN] memory alloc policy + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtFree | aclrtMalloc + */ +ACL_FUNC_VISIBILITY aclError aclrtMallocCached(void **devPtr, + size_t size, + aclrtMemMallocPolicy policy); + +/** + * @ingroup AscendCL + * @brief flush cache data to ddr + * + * @param devPtr [IN] the pointer that flush data to ddr + * @param size [IN] flush size + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemFlush(void *devPtr, size_t size); + +/** + * @ingroup AscendCL + * @brief invalidate cache data + * + * @param devPtr [IN] pointer to invalidate cache data + * @param size [IN] invalidate size + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemInvalidate(void *devPtr, size_t size); + +/** + * @ingroup AscendCL + * @brief free device memory + * + * @par Function + * can only free memory allocated through the aclrtMalloc interface + * + * @param devPtr [IN] Pointer to memory to be freed + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtMalloc + */ +ACL_FUNC_VISIBILITY aclError aclrtFree(void *devPtr); + +/** + * @ingroup AscendCL + * @brief alloc memory on host + * + * @par Restriction + * @li The requested memory cannot be used in the Device + * and needs to be explicitly copied to the Device. + * @li The memory requested by the aclrtMallocHost interface + * needs to be released through the aclrtFreeHost interface. + * + * @param hostPtr [OUT] pointer to pointer to allocated memory on the host + * @param size [IN] alloc memory size + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtFreeHost + */ +ACL_FUNC_VISIBILITY aclError aclrtMallocHost(void **hostPtr, size_t size); + +/** + * @ingroup AscendCL + * @brief free host memory + * + * @par Function + * can only free memory allocated through the aclrtMallocHost interface + * + * @param hostPtr [IN] free memory pointer + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtMallocHost + */ +ACL_FUNC_VISIBILITY aclError aclrtFreeHost(void *hostPtr); + +/** + * @ingroup AscendCL + * @brief synchronous memory replication between host and device + * + * @param dst [IN] destination address pointer + * @param destMax [IN] Max length of the destination address memory + * @param src [IN] source address pointer + * @param count [IN] the length of byte to copy + * @param kind [IN] memcpy type + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemcpy(void *dst, + size_t destMax, + const void *src, + size_t count, + aclrtMemcpyKind kind); + +/** + * @ingroup AscendCL + * @brief Initialize memory and set contents of memory to specified value + * + * @par Function + * The memory to be initialized is on the Host or device side, + * and the system determines whether + * it is host or device according to the address + * + * @param devPtr [IN] Starting address of memory + * @param maxCount [IN] Max length of destination address memory + * @param value [IN] Set value + * @param count [IN] The length of memory + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemset(void *devPtr, size_t maxCount, int32_t value, size_t count); + +/** + * @ingroup AscendCL + * @brief Asynchronous memory replication between Host and Device + * + * @par Function + * After calling this interface, + * be sure to call the aclrtSynchronizeStream interface to ensure that + * the task of memory replication has been completed + * + * @par Restriction + * @li For on-chip Device-to-Device memory copy, + * both the source and destination addresses must be 64-byte aligned + * + * @param dst [IN] destination address pointer + * @param destMax [IN] Max length of destination address memory + * @param src [IN] source address pointer + * @param count [IN] the number of byte to copy + * @param kind [IN] memcpy type + * @param stream [IN] asynchronized task stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtSynchronizeStream + */ +ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst, + size_t destMax, + const void *src, + size_t count, + aclrtMemcpyKind kind, + aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief synchronous memory replication of two-dimensional matrix between host and device + * + * @param dst [IN] destination address pointer + * @param dpitch [IN] pitch of destination memory + * @param src [IN] source address pointer + * @param spitch [IN] pitch of source memory + * @param width [IN] width of matrix transfer + * @param height [IN] height of matrix transfer + * @param kind [IN] memcpy type + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemcpy2d(void *dst, + size_t dpitch, + const void *src, + size_t spitch, + size_t width, + size_t height, + aclrtMemcpyKind kind); + +/** + * @ingroup AscendCL + * @brief asynchronous memory replication of two-dimensional matrix between host and device + * + * @param dst [IN] destination address pointer + * @param dpitch [IN] pitch of destination memory + * @param src [IN] source address pointer + * @param spitch [IN] pitch of source memory + * @param width [IN] width of matrix transfer + * @param height [IN] height of matrix transfer + * @param kind [IN] memcpy type + * @param stream [IN] asynchronized task stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemcpy2dAsync(void *dst, + size_t dpitch, + const void *src, + size_t spitch, + size_t width, + size_t height, + aclrtMemcpyKind kind, + aclrtStream stream); + +/** +* @ingroup AscendCL +* @brief Asynchronous initialize memory +* and set contents of memory to specified value async +* +* @par Function + * The memory to be initialized is on the Host or device side, + * and the system determines whether + * it is host or device according to the address + * +* @param devPtr [IN] destination address pointer +* @param maxCount [IN] Max length of destination address memory +* @param value [IN] set value +* @param count [IN] the number of byte to set +* @param stream [IN] asynchronized task stream +* +* @retval ACL_SUCCESS The function is successfully executed. +* @retval OtherValues Failure +* +* @see aclrtSynchronizeStream +*/ +ACL_FUNC_VISIBILITY aclError aclrtMemsetAsync(void *devPtr, + size_t maxCount, + int32_t value, + size_t count, + aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief Allocate an address range reservation + * + * @param virPtr [OUT] Resulting pointer to start of virtual address range allocated + * @param size [IN] Size of the reserved virtual address range requested + * @param alignment [IN] Alignment of the reserved virtual address range requested + * @param expectPtr [IN] Fixed starting address range requested, must be nullptr + * @param flags [IN] Flag of page type + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtReleaseMemAddress | aclrtMallocPhysical | aclrtMapMem + */ +ACL_FUNC_VISIBILITY aclError aclrtReserveMemAddress(void **virPtr, + size_t size, + size_t alignment, + void *expectPtr, + uint64_t flags); + +/** + * @ingroup AscendCL + * @brief Free an address range reservation + * + * @param virPtr [IN] Starting address of the virtual address range to free + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtReserveMemAddress + */ +ACL_FUNC_VISIBILITY aclError aclrtReleaseMemAddress(void *virPtr); + +/** + * @ingroup AscendCL + * @brief Create a memory handle representing a memory allocation of a given size described by the given properties + * + * @param handle [OUT] Value of handle returned. All operations on this allocation are to be performed using this handle. + * @param size [IN] Size of the allocation requested + * @param prop [IN] Properties of the allocation to create + * @param flags [IN] Currently unused, must be zero + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtFreePhysical | aclrtReserveMemAddress | aclrtMapMem + */ +ACL_FUNC_VISIBILITY aclError aclrtMallocPhysical(aclrtDrvMemHandle *handle, + size_t size, + const aclrtPhysicalMemProp *prop, + uint64_t flags); + +/** + * @ingroup AscendCL + * @brief Release a memory handle representing a memory allocation which was previously allocated through aclrtMallocPhysical + * + * @param handle [IN] Value of handle which was returned previously by aclrtMallocPhysical + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtMallocPhysical + */ +ACL_FUNC_VISIBILITY aclError aclrtFreePhysical(aclrtDrvMemHandle handle); + +/** + * @ingroup AscendCL + * @brief Maps an allocation handle to a reserved virtual address range + * + * @param virPtr [IN] Address where memory will be mapped + * @param size [IN] Size of the memory mapping + * @param offset [IN] Offset into the memory represented by handle from which to start mapping + * @param handle [IN] Handle to a shareable memory + * @param flags [IN] Currently unused, must be zero + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtUnmapMem | aclrtReserveMemAddress | aclrtMallocPhysical + */ +ACL_FUNC_VISIBILITY aclError aclrtMapMem(void *virPtr, + size_t size, + size_t offset, + aclrtDrvMemHandle handle, + uint64_t flags); + +/** + * @ingroup AscendCL + * @brief Unmap the backing memory of a given address range + * + * @param virPtr [IN] Starting address for the virtual address range to unmap + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtMapMem + */ +ACL_FUNC_VISIBILITY aclError aclrtUnmapMem(void *virPtr); + +/** + * @ingroup AscendCL + * @brief Create config handle of stream + * + * @retval the aclrtStreamConfigHandle pointer + */ +ACL_FUNC_VISIBILITY aclrtStreamConfigHandle *aclrtCreateStreamConfigHandle(void); + +/** + * @ingroup AscendCL + * @brief Destroy config handle of model execute + * + * @param handle [IN] Pointer to aclrtStreamConfigHandle to be destroyed + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtDestroyStreamConfigHandle(aclrtStreamConfigHandle *handle); + +/** + * @ingroup AscendCL + * @brief set config for stream + * + * @param handle [OUT] pointer to stream config handle + * @param attr [IN] config attr in stream config handle to be set + * @param attrValue [IN] pointer to stream config value + * @param valueSize [IN] memory size of attrValue + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSetStreamConfigOpt(aclrtStreamConfigHandle *handle, aclrtStreamConfigAttr attr, + const void *attrValue, size_t valueSize); + +/** + * @ingroup AscendCL + * @brief create stream instance + * + * @param stream [OUT] the created stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtCreateStream(aclrtStream *stream); + +/** + * @ingroup AscendCL + * @brief create stream instance + * + * @param stream [OUT] the created stream + * @param handle [IN] the config of stream + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtCreateStreamV2(aclrtStream *stream, const aclrtStreamConfigHandle *handle); + +/** + * @ingroup AscendCL + * @brief create stream instance with param + * + * @par Function + * Can create fast streams through the aclrtCreateStreamWithConfig interface + * + * @param stream [OUT] the created stream + * @param priority [IN] the priority of stream, value range:0~7 + * @param flag [IN] indicate the function for stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtCreateStreamWithConfig(aclrtStream *stream, uint32_t priority, uint32_t flag); + +/** + * @ingroup AscendCL + * @brief destroy stream instance + * + * @par Function + * Can only destroy streams created through the aclrtCreateStream interface + * + * @par Restriction + * Before calling the aclrtDestroyStream interface to destroy + * the specified Stream, you need to call the aclrtSynchronizeStream interface + * to ensure that the tasks in the Stream have been completed. + * + * @param stream [IN] the stream to destroy + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtCreateStream | aclrtSynchronizeStream + */ +ACL_FUNC_VISIBILITY aclError aclrtDestroyStream(aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief destroy stream instance by force + * + * @par Function + * Can only destroy streams created through the aclrtCreateStream interface + * + * @param stream [IN] the stream to destroy + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtCreateStream + */ +ACL_FUNC_VISIBILITY aclError aclrtDestroyStreamForce(aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief block the host until all tasks + * in the specified stream have completed + * + * @param stream [IN] the stream to wait + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSynchronizeStream(aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief block the host until all tasks + * in the specified stream have completed + * + * @param stream [IN] the stream to wait + * @param timeout [IN] timeout value,the unit is milliseconds + * -1 means waiting indefinitely, 0 means check whether synchronization is complete immediately + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSynchronizeStreamWithTimeout(aclrtStream stream, int32_t timeout); + +/** + * @ingroup AscendCL + * @brief Query a stream for completion status. + * + * @param stream [IN] the stream to query + * @param status [OUT] stream status + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtStreamQuery(aclrtStream stream, aclrtStreamStatus *status); + +/** + * @ingroup AscendCL + * @brief Blocks the operation of the specified Stream until + * the specified Event is completed. + * Support for multiple streams waiting for the same event. + * + * @param stream [IN] the wait stream If using thedefault Stream, set NULL + * @param event [IN] the event to wait + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtStreamWaitEvent(aclrtStream stream, aclrtEvent event); + +/** + * @ingroup AscendCL + * @brief set group + * + * @par Function + * set the task to the corresponding group + * + * @param groupId [IN] group id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtGetGroupCount | aclrtGetAllGroupInfo | aclrtGetGroupInfoDetail + */ +ACL_FUNC_VISIBILITY aclError aclrtSetGroup(int32_t groupId); + +/** + * @ingroup AscendCL + * @brief get the number of group + * + * @par Function + * get the number of group. if the number of group is zero, + * it means that group is not supported or group is not created. + * + * @param count [OUT] the number of group + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + */ +ACL_FUNC_VISIBILITY aclError aclrtGetGroupCount(uint32_t *count); + +/** + * @ingroup AscendCL + * @brief create group information + * + * @retval null for failed. + * @retval OtherValues success. + * + * @see aclrtDestroyGroupInfo + */ +ACL_FUNC_VISIBILITY aclrtGroupInfo *aclrtCreateGroupInfo(); + +/** + * @ingroup AscendCL + * @brief destroy group information + * + * @param groupInfo [IN] pointer to group information + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtCreateGroupInfo + */ +ACL_FUNC_VISIBILITY aclError aclrtDestroyGroupInfo(aclrtGroupInfo *groupInfo); + +/** + * @ingroup AscendCL + * @brief get all group information + * + * @param groupInfo [OUT] pointer to group information + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtGetGroupCount + */ +ACL_FUNC_VISIBILITY aclError aclrtGetAllGroupInfo(aclrtGroupInfo *groupInfo); + +/** + * @ingroup AscendCL + * @brief get detail information of group + * + * @param groupInfo [IN] pointer to group information + * @param groupIndex [IN] group index value + * @param attr [IN] group attribute + * @param attrValue [OUT] pointer to attribute value + * @param valueLen [IN] length of attribute value + * @param paramRetSize [OUT] pointer to real length of attribute value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtGetGroupCount | aclrtGetAllGroupInfo + */ +ACL_FUNC_VISIBILITY aclError aclrtGetGroupInfoDetail(const aclrtGroupInfo *groupInfo, + int32_t groupIndex, + aclrtGroupAttr attr, + void *attrValue, + size_t valueLen, + size_t *paramRetSize); + +/** + * @ingroup AscendCL + * @brief checking whether current device and peer device support the p2p feature + * + * @param canAccessPeer [OUT] pointer to save the checking result + * @param deviceId [IN] current device id + * @param peerDeviceId [IN] peer device id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtDeviceEnablePeerAccess | aclrtDeviceDisablePeerAccess + */ +ACL_FUNC_VISIBILITY aclError aclrtDeviceCanAccessPeer(int32_t *canAccessPeer, int32_t deviceId, int32_t peerDeviceId); + +/** + * @ingroup AscendCL + * @brief enable the peer device to support the p2p feature + * + * @param peerDeviceId [IN] the peer device id + * @param flags [IN] reserved field, now it must be zero + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtDeviceCanAccessPeer | aclrtDeviceDisablePeerAccess + */ +ACL_FUNC_VISIBILITY aclError aclrtDeviceEnablePeerAccess(int32_t peerDeviceId, uint32_t flags); + +/** + * @ingroup AscendCL + * @brief disable the peer device to support the p2p function + * + * @param peerDeviceId [IN] the peer device id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtDeviceCanAccessPeer | aclrtDeviceEnablePeerAccess + */ +ACL_FUNC_VISIBILITY aclError aclrtDeviceDisablePeerAccess(int32_t peerDeviceId); + +/** + * @ingroup AscendCL + * @brief Obtain the free memory and total memory of specified attribute. + * the specified memory include normal memory and huge memory. + * + * @param attr [IN] the memory attribute of specified device + * @param free [OUT] the free memory of specified device + * @param total [OUT] the total memory of specified device. + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetMemInfo(aclrtMemAttr attr, size_t *free, size_t *total); + +/** + * @ingroup AscendCL + * @brief Set the timeout interval for waitting of op + * + * @param timeout [IN] op wait timeout + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSetOpWaitTimeout(uint32_t timeout); + +/** + * @ingroup AscendCL + * @brief Set the timeout interval for op executing + * + * @param timeout [IN] op execute timeout + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSetOpExecuteTimeOut(uint32_t timeout); + +/** + * @ingroup AscendCL + * @brief enable or disable overflow switch on some stream + * @param stream [IN] set overflow switch on this stream + * @param flag [IN] 0 : disable 1 : enable + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSetStreamOverflowSwitch(aclrtStream stream, uint32_t flag); + +/** + * @ingroup AscendCL + * @brief get overflow switch on some stream + * @param stream [IN] get overflow switch on this stream + * @param flag [OUT] current overflow switch, 0 : disable others : enable + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetStreamOverflowSwitch(aclrtStream stream, uint32_t *flag); + +/** + * @ingroup AscendCL + * @brief set saturation mode + * @param mode [IN] target saturation mode + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSetDeviceSatMode(aclrtFloatOverflowMode mode); + +/** + * @ingroup AscendCL + * @brief get saturation mode + * @param mode [OUT] get saturation mode + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetDeviceSatMode(aclrtFloatOverflowMode *mode); + +/** + * @ingroup AscendCL + * @brief get overflow status asynchronously + * + * @par Restriction + * After calling the aclrtGetOverflowStatus interface, + * you need to call the aclrtSynchronizeStream interface + * to ensure that the tasks in the stream have been completed. + * @param outputAddr [IN/OUT] output device addr to store overflow status + * @param outputSize [IN] output addr size + * @param outputSize [IN] stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetOverflowStatus(void *outputAddr, size_t outputSize, aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief reset overflow status asynchronously + * + * @par Restriction + * After calling the aclrtResetOverflowStatus interface, + * you need to call the aclrtSynchronizeStream interface + * to ensure that the tasks in the stream have been completed. + * @param outputSize [IN] stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtResetOverflowStatus(aclrtStream stream); + +/** + * @ingroup AscendCL + * @brief The thread that handles the hostFunc function on the Stream + * + * @param hostFuncThreadId [IN] thread ID + * @param exeStream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSubscribeHostFunc(uint64_t hostFuncThreadId, aclrtStream exeStream); + +/** + * @ingroup AscendCL + * @brief After waiting for a specified time, trigger hostFunc callback function processing + * + * @par Function + * The thread processing callback specified by the aclrtSubscribeHostFunc interface + * + * @param timeout [IN] timeout value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtSubscribeHostFunc + */ +ACL_FUNC_VISIBILITY aclError aclrtProcessHostFunc(int32_t timeout); + +/** + * @ingroup AscendCL + * @brief Cancel thread registration, + * the hostFunc function on the specified Stream + * is no longer processed by the specified thread + * + * @param hostFuncThreadId [IN] thread ID + * @param exeStream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtUnSubscribeHostFunc(uint64_t hostFuncThreadId, aclrtStream exeStream); + +#ifdef __cplusplus +} +#endif + +#endif // INC_EXTERNAL_ACL_ACL_RT_H_ + diff --git a/extern/aclMock/acl/acl_rt_allocator.h b/extern/aclMock/acl/acl_rt_allocator.h new file mode 100644 index 00000000..ab4c0da3 --- /dev/null +++ b/extern/aclMock/acl/acl_rt_allocator.h @@ -0,0 +1,148 @@ +/** +* @file acl_rt_allocator.h +* +* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ +#ifndef INC_EXTERNAL_ACL_ACL_RT_ALLOCATOR_H_ +#define INC_EXTERNAL_ACL_ACL_RT_ALLOCATOR_H_ + +#include "acl_base.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *aclrtAllocatorDesc; +typedef void *aclrtAllocator; +typedef void *aclrtAllocatorBlock; +typedef void *aclrtAllocatorAddr; + +typedef void *(*aclrtAllocatorAllocFunc)(aclrtAllocator allocator, size_t size); +typedef void (*aclrtAllocatorFreeFunc)(aclrtAllocator allocator, aclrtAllocatorBlock block); +typedef void *(*aclrtAllocatorAllocAdviseFunc)(aclrtAllocator allocator, size_t size, aclrtAllocatorAddr addr); +typedef void *(*aclrtAllocatorGetAddrFromBlockFunc)(aclrtAllocatorBlock block); + +/** + * @ingroup AscendCL + * @brief Create allocator description + * + * @retval null for failed + * @retval OtherValues success + * + * @see aclrtAllocatorDestroyDesc + */ +ACL_FUNC_VISIBILITY aclrtAllocatorDesc aclrtAllocatorCreateDesc(); + +/** + * @ingroup AscendCL + * @brief Relese allocator description + * + * @param allocatorDesc [IN] allocator description + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtAllocatorCreateDesc + */ +ACL_FUNC_VISIBILITY aclError aclrtAllocatorDestroyDesc(aclrtAllocatorDesc allocatorDesc); + +/** + * @ingroup AscendCL + * @brief Register allocator object to allocator description + * + * @param allocatorDesc [IN] allocator description + * @param allocator [IN] allocator object handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtAllocatorSetObjToDesc(aclrtAllocatorDesc allocatorDesc, aclrtAllocator allocator); + +/** + * @ingroup AscendCL + * @brief Register the function pointer of alloc memory to the allocator description + * + * @param allocatorDesc [IN] allocator description + * @param func [IN] the function pointer of alloc memory + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtAllocatorSetAllocFuncToDesc(aclrtAllocatorDesc allocatorDesc, + aclrtAllocatorAllocFunc func); + +/** + * @ingroup AscendCL + * @brief Register the function pointer of free memory to the allocator description + * + * @param allocatorDesc [IN] allocator description + * @param func [IN] free memory function pointer + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtAllocatorSetFreeFuncToDesc(aclrtAllocatorDesc allocatorDesc, + aclrtAllocatorFreeFunc func); + +/** + * @ingroup AscendCL + * @brief Register the function pointer of alloc suggested memory to the allocator description + * + * @param allocatorDesc [IN] allocator description + * @param func [IN] the function pointer of alloc suggested memory + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtAllocatorSetAllocAdviseFuncToDesc(aclrtAllocatorDesc allocatorDesc, + aclrtAllocatorAllocAdviseFunc func); + +/** + * @ingroup AscendCL + * @brief Register the function pointer of get address from block to the allocator description + * + * @param allocatorDesc [IN] allocator description + * @param func [IN] the function pointer of get address from block + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtAllocatorSetGetAddrFromBlockFuncToDesc(aclrtAllocatorDesc allocatorDesc, + aclrtAllocatorGetAddrFromBlockFunc func); + +/** + * @ingroup AscendCL + * @brief Register allocator description to acl by stream + * + * @param stream [IN] stream handle + * @param allocatorDesc [IN] allocator description + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtAllocatorUnregister + */ +ACL_FUNC_VISIBILITY aclError aclrtAllocatorRegister(aclrtStream stream, aclrtAllocatorDesc allocatorDesc); + +/** + * @ingroup AscendCL + * @brief Unregister allocator description from acl by stream + * + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtAllocatorRegister + */ +ACL_FUNC_VISIBILITY aclError aclrtAllocatorUnregister(aclrtStream stream); + +#ifdef __cplusplus +} +#endif + +#endif // INC_EXTERNAL_ACL_ACL_RT_ALLOCATOR_H_ diff --git a/extern/aclMock/acl/error_codes/ge_error_codes.h b/extern/aclMock/acl/error_codes/ge_error_codes.h new file mode 100644 index 00000000..ccd9f4bb --- /dev/null +++ b/extern/aclMock/acl/error_codes/ge_error_codes.h @@ -0,0 +1,77 @@ +/** + * Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INC_EXTERNAL_GE_GE_ERROR_CODES_H_ +#define INC_EXTERNAL_GE_GE_ERROR_CODES_H_ + +#if defined(_MSC_VER) +#ifdef FUNC_VISIBILITY +#define GE_FUNC_VISIBILITY _declspec(dllexport) +#else +#define GE_FUNC_VISIBILITY +#endif +#else +#ifdef FUNC_VISIBILITY +#define GE_FUNC_VISIBILITY __attribute__((visibility("default"))) +#else +#define GE_FUNC_VISIBILITY +#endif +#endif + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif +static const uint32_t ACL_ERROR_GE_PARAM_INVALID = 145000U; +static const uint32_t ACL_ERROR_GE_EXEC_NOT_INIT = 145001U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_PATH_INVALID = 145002U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_ID_INVALID = 145003U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_DATA_SIZE_INVALID = 145006U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_ADDR_INVALID = 145007U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID = 145008U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_MODEL_REPEATED = 145009U; +static const uint32_t ACL_ERROR_GE_DYNAMIC_INPUT_ADDR_INVALID = 145011U; +static const uint32_t ACL_ERROR_GE_DYNAMIC_INPUT_LENGTH_INVALID = 145012U; +static const uint32_t ACL_ERROR_GE_DYNAMIC_BATCH_SIZE_INVALID = 145013U; +static const uint32_t ACL_ERROR_GE_AIPP_BATCH_EMPTY = 145014U; +static const uint32_t ACL_ERROR_GE_AIPP_NOT_EXIST = 145015U; +static const uint32_t ACL_ERROR_GE_AIPP_MODE_INVALID = 145016U; +static const uint32_t ACL_ERROR_GE_OP_TASK_TYPE_INVALID = 145017U; +static const uint32_t ACL_ERROR_GE_OP_KERNEL_TYPE_INVALID = 145018U; +static const uint32_t ACL_ERROR_GE_PLGMGR_PATH_INVALID = 145019U; +static const uint32_t ACL_ERROR_GE_FORMAT_INVALID = 145020U; +static const uint32_t ACL_ERROR_GE_SHAPE_INVALID = 145021U; +static const uint32_t ACL_ERROR_GE_DATATYPE_INVALID = 145022U; +static const uint32_t ACL_ERROR_GE_MEMORY_ALLOCATION = 245000U; +static const uint32_t ACL_ERROR_GE_MEMORY_OPERATE_FAILED = 245001U; +static const uint32_t ACL_ERROR_GE_DEVICE_MEMORY_OPERATE_FAILED = 245002U; +static const uint32_t ACL_ERROR_GE_INTERNAL_ERROR = 545000U; +static const uint32_t ACL_ERROR_GE_LOAD_MODEL = 545001U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_MODEL_PARTITION_FAILED = 545002U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_WEIGHT_PARTITION_FAILED = 545003U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_TASK_PARTITION_FAILED = 545004U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_KERNEL_PARTITION_FAILED = 545005U; +static const uint32_t ACL_ERROR_GE_EXEC_RELEASE_MODEL_DATA = 545006U; +static const uint32_t ACL_ERROR_GE_COMMAND_HANDLE = 545007U; +static const uint32_t ACL_ERROR_GE_GET_TENSOR_INFO = 545008U; +static const uint32_t ACL_ERROR_GE_UNLOAD_MODEL = 545009U; + +#ifdef __cplusplus +} // namespace ge +#endif +#endif // INC_EXTERNAL_GE_GE_ERROR_CODES_H_ diff --git a/extern/aclMock/acl/error_codes/rt_error_codes.h b/extern/aclMock/acl/error_codes/rt_error_codes.h new file mode 100644 index 00000000..c2f89fd7 --- /dev/null +++ b/extern/aclMock/acl/error_codes/rt_error_codes.h @@ -0,0 +1,124 @@ +/** +* @file rt_error_codes.h +* +* Copyright (C) Huawei Technologies Co., Ltd. 2019-2020. All Rights Reserved. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#ifndef __INC_EXTERNEL_RT_ERROR_CODES_H__ +#define __INC_EXTERNEL_RT_ERROR_CODES_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define ACL_RT_SUCCESS 0 // success +#define ACL_ERROR_RT_PARAM_INVALID 107000 // param invalid +#define ACL_ERROR_RT_INVALID_DEVICEID 107001 // invalid device id +#define ACL_ERROR_RT_CONTEXT_NULL 107002 // current context null +#define ACL_ERROR_RT_STREAM_CONTEXT 107003 // stream not in current context +#define ACL_ERROR_RT_MODEL_CONTEXT 107004 // model not in current context +#define ACL_ERROR_RT_STREAM_MODEL 107005 // stream not in model +#define ACL_ERROR_RT_EVENT_TIMESTAMP_INVALID 107006 // event timestamp invalid +#define ACL_ERROR_RT_EVENT_TIMESTAMP_REVERSAL 107007 // event timestamp reversal +#define ACL_ERROR_RT_ADDR_UNALIGNED 107008 // memory address unaligned +#define ACL_ERROR_RT_FILE_OPEN 107009 // open file failed +#define ACL_ERROR_RT_FILE_WRITE 107010 // write file failed +#define ACL_ERROR_RT_STREAM_SUBSCRIBE 107011 // error subscribe stream +#define ACL_ERROR_RT_THREAD_SUBSCRIBE 107012 // error subscribe thread +#define ACL_ERROR_RT_GROUP_NOT_SET 107013 // group not set +#define ACL_ERROR_RT_GROUP_NOT_CREATE 107014 // group not create +#define ACL_ERROR_RT_STREAM_NO_CB_REG 107015 // callback not register to stream +#define ACL_ERROR_RT_INVALID_MEMORY_TYPE 107016 // invalid memory type +#define ACL_ERROR_RT_INVALID_HANDLE 107017 // invalid handle +#define ACL_ERROR_RT_INVALID_MALLOC_TYPE 107018 // invalid malloc type +#define ACL_ERROR_RT_WAIT_TIMEOUT 107019 // wait timeout +#define ACL_ERROR_RT_TASK_TIMEOUT 107020 // task timeout +#define ACL_ERROR_RT_SYSPARAMOPT_NOT_SET 107021 // not set sysparamopt + +#define ACL_ERROR_RT_FEATURE_NOT_SUPPORT 207000 // feature not support +#define ACL_ERROR_RT_MEMORY_ALLOCATION 207001 // memory allocation error +#define ACL_ERROR_RT_MEMORY_FREE 207002 // memory free error +#define ACL_ERROR_RT_AICORE_OVER_FLOW 207003 // aicore over flow +#define ACL_ERROR_RT_NO_DEVICE 207004 // no device +#define ACL_ERROR_RT_RESOURCE_ALLOC_FAIL 207005 // resource alloc fail +#define ACL_ERROR_RT_NO_PERMISSION 207006 // no permission +#define ACL_ERROR_RT_NO_EVENT_RESOURCE 207007 // no event resource +#define ACL_ERROR_RT_NO_STREAM_RESOURCE 207008 // no stream resource +#define ACL_ERROR_RT_NO_NOTIFY_RESOURCE 207009 // no notify resource +#define ACL_ERROR_RT_NO_MODEL_RESOURCE 207010 // no model resource +#define ACL_ERROR_RT_NO_CDQ_RESOURCE 207011 // no cdq resource +#define ACL_ERROR_RT_OVER_LIMIT 207012 // over limit +#define ACL_ERROR_RT_QUEUE_EMPTY 207013 // queue is empty +#define ACL_ERROR_RT_QUEUE_FULL 207014 // queue is full +#define ACL_ERROR_RT_REPEATED_INIT 207015 // repeated init +#define ACL_ERROR_RT_AIVEC_OVER_FLOW 207016 // aivec over flow +#define ACL_ERROR_RT_OVER_FLOW 207017 // common over flow +#define ACL_ERROR_RT_DEVIDE_OOM 207018 // device oom + +#define ACL_ERROR_RT_INTERNAL_ERROR 507000 // runtime internal error +#define ACL_ERROR_RT_TS_ERROR 507001 // ts internel error +#define ACL_ERROR_RT_STREAM_TASK_FULL 507002 // task full in stream +#define ACL_ERROR_RT_STREAM_TASK_EMPTY 507003 // task empty in stream +#define ACL_ERROR_RT_STREAM_NOT_COMPLETE 507004 // stream not complete +#define ACL_ERROR_RT_END_OF_SEQUENCE 507005 // end of sequence +#define ACL_ERROR_RT_EVENT_NOT_COMPLETE 507006 // event not complete +#define ACL_ERROR_RT_CONTEXT_RELEASE_ERROR 507007 // context release error +#define ACL_ERROR_RT_SOC_VERSION 507008 // soc version error +#define ACL_ERROR_RT_TASK_TYPE_NOT_SUPPORT 507009 // task type not support +#define ACL_ERROR_RT_LOST_HEARTBEAT 507010 // ts lost heartbeat +#define ACL_ERROR_RT_MODEL_EXECUTE 507011 // model execute failed +#define ACL_ERROR_RT_REPORT_TIMEOUT 507012 // report timeout +#define ACL_ERROR_RT_SYS_DMA 507013 // sys dma error +#define ACL_ERROR_RT_AICORE_TIMEOUT 507014 // aicore timeout +#define ACL_ERROR_RT_AICORE_EXCEPTION 507015 // aicore exception +#define ACL_ERROR_RT_AICORE_TRAP_EXCEPTION 507016 // aicore trap exception +#define ACL_ERROR_RT_AICPU_TIMEOUT 507017 // aicpu timeout +#define ACL_ERROR_RT_AICPU_EXCEPTION 507018 // aicpu exception +#define ACL_ERROR_RT_AICPU_DATADUMP_RSP_ERR 507019 // aicpu datadump response error +#define ACL_ERROR_RT_AICPU_MODEL_RSP_ERR 507020 // aicpu model operate response error +#define ACL_ERROR_RT_PROFILING_ERROR 507021 // profiling error +#define ACL_ERROR_RT_IPC_ERROR 507022 // ipc error +#define ACL_ERROR_RT_MODEL_ABORT_NORMAL 507023 // model abort normal +#define ACL_ERROR_RT_KERNEL_UNREGISTERING 507024 // kernel unregistering +#define ACL_ERROR_RT_RINGBUFFER_NOT_INIT 507025 // ringbuffer not init +#define ACL_ERROR_RT_RINGBUFFER_NO_DATA 507026 // ringbuffer no data +#define ACL_ERROR_RT_KERNEL_LOOKUP 507027 // kernel lookup error +#define ACL_ERROR_RT_KERNEL_DUPLICATE 507028 // kernel register duplicate +#define ACL_ERROR_RT_DEBUG_REGISTER_FAIL 507029 // debug register failed +#define ACL_ERROR_RT_DEBUG_UNREGISTER_FAIL 507030 // debug unregister failed +#define ACL_ERROR_RT_LABEL_CONTEXT 507031 // label not in current context +#define ACL_ERROR_RT_PROGRAM_USE_OUT 507032 // program register num use out +#define ACL_ERROR_RT_DEV_SETUP_ERROR 507033 // device setup error +#define ACL_ERROR_RT_VECTOR_CORE_TIMEOUT 507034 // vector core timeout +#define ACL_ERROR_RT_VECTOR_CORE_EXCEPTION 507035 // vector core exception +#define ACL_ERROR_RT_VECTOR_CORE_TRAP_EXCEPTION 507036 // vector core trap exception +#define ACL_ERROR_RT_CDQ_BATCH_ABNORMAL 507037 // cdq alloc batch abnormal +#define ACL_ERROR_RT_DIE_MODE_CHANGE_ERROR 507038 // can not change die mode +#define ACL_ERROR_RT_DIE_SET_ERROR 507039 // single die mode can not set die +#define ACL_ERROR_RT_INVALID_DIEID 507040 // invalid die id +#define ACL_ERROR_RT_DIE_MODE_NOT_SET 507041 // die mode not set +#define ACL_ERROR_RT_AICORE_TRAP_READ_OVERFLOW 507042 // aic trap read overflow +#define ACL_ERROR_RT_AICORE_TRAP_WRITE_OVERFLOW 507043 // aic trap write overflow +#define ACL_ERROR_RT_VECTOR_CORE_TRAP_READ_OVERFLOW 507044 // aiv trap read overflow +#define ACL_ERROR_RT_VECTOR_CORE_TRAP_WRITE_OVERFLOW 507045 // aiv trap write overflow +#define ACL_ERROR_RT_STREAM_SYNC_TIMEOUT 507046 // stream sync time out +#define ACL_ERROR_RT_EVENT_SYNC_TIMEOUT 507047 // event sync time out +#define ACL_ERROR_RT_FFTS_PLUS_TIMEOUT 507048 // ffts+ timeout +#define ACL_ERROR_RT_FFTS_PLUS_EXCEPTION 507049 // ffts+ exception +#define ACL_ERROR_RT_FFTS_PLUS_TRAP_EXCEPTION 507050 // ffts+ trap exception +#define ACL_ERROR_RT_SEND_MSG 507051 // hdc send msg fail +#define ACL_ERROR_RT_COPY_DATA 507052 // copy data fail +#define ACL_ERROR_RT_DRV_INTERNAL_ERROR 507899 // drv internal error +#define ACL_ERROR_RT_AICPU_INTERNAL_ERROR 507900 // aicpu internal error +#define ACL_ERROR_RT_SOCKET_CLOSE 507901 // hdc disconnect + +#ifdef __cplusplus +} +#endif +#endif // __INC_EXTERNEL_RT_ERROR_CODES_H__ diff --git a/extern/aclMock/meson.build b/extern/aclMock/meson.build new file mode 100644 index 00000000..f35ff186 --- /dev/null +++ b/extern/aclMock/meson.build @@ -0,0 +1,18 @@ +project( + 'acl hicr backend mock', + ['cpp', 'c'], + default_options: [ + 'cpp_std=c++20', + 'buildtype=release', + ], + version: '1.0.0', +) + +# HiCR acl Mock Backend Configuration + +backendIncludes = include_directories(['.']) + +aclDependency = declare_dependency( + sources: ['acl.cpp'], + include_directories: backendIncludes, +) \ No newline at end of file diff --git a/include/hicr/backends/acl/meson.build b/include/hicr/backends/acl/meson.build index 25a1238c..e46c94da 100644 --- a/include/hicr/backends/acl/meson.build +++ b/include/hicr/backends/acl/meson.build @@ -1,25 +1,25 @@ # HiCR acl Backend Configuration -backendIncludes = include_directories([ - '/usr/local/Ascend/ascend-toolkit/latest/include' -]) +aclPath = get_option('aclPath') -backendDependencies = [ ] - -backendCppArgs = [ - '-D_HICR_USE_ACL_BACKEND_' - ] +backendIncludes = [] +backendLinkArgs = [] +backendDependencies = [] +backendCppArgs = ['-D_HICR_USE_ACL_BACKEND_'] -backendLinkArgs = [ - # TODO: put as meson argument since acl does not provide pkg config or cmake. - # in the majority of cases this will work since the default installation path is this one - '-L/usr/local/Ascend/ascend-toolkit/latest/acllib/lib64/stub', - '-lascendcl', -] +if aclPath == '' + backendDependencies += aclBackendMockSubproject.get_variable('aclDependency') +else + backendIncludes = include_directories([aclPath + '/include']) + backendLinkArgs = [ + '-L' + aclPath + '/acllib/lib64/stub', + '-lascendcl', + ] +endif HiCRBackendDependencies += declare_dependency( - dependencies: backendDependencies, - compile_args : backendCppArgs, - link_args : backendLinkArgs, - include_directories : backendIncludes -) + dependencies: backendDependencies, + compile_args: backendCppArgs, + link_args: backendLinkArgs, + include_directories: backendIncludes, +) \ No newline at end of file diff --git a/meson.build b/meson.build index 8dc9a873..0544d851 100644 --- a/meson.build +++ b/meson.build @@ -1,16 +1,25 @@ -project('HiCR', [ 'cpp', 'c'], - default_options : [ - 'cpp_std=c++20', - 'buildtype=release', +project( + 'HiCR', + ['cpp', 'c'], + default_options: [ + 'cpp_std=c++20', + 'buildtype=release', ], - version: '1.0.0' + subproject_dir: 'extern', + version: '1.0.0', ) ####### Getting selected built-in backends # Including selected built-in backends enabledBackends = get_option('backends') -HiCRBackendDependencies = [ ] +HiCRBackendDependencies = [] + + +####### Get reference to acl backend mock subproject +if 'acl' in enabledBackends and get_option('aclPath') == '' + aclBackendMockSubproject = subproject('aclMock', required: true) +endif foreach backend : enabledBackends subdir('include/hicr/backends/' + backend) @@ -20,7 +29,7 @@ endforeach # Including selected built-in frontends enabledFrontends = get_option('frontends') -HiCRFrontendDependencies = [ ] +HiCRFrontendDependencies = [] foreach frontend : enabledFrontends subdir('include/hicr/frontends/' + frontend) @@ -36,12 +45,12 @@ if meson.is_subproject() == false # Build example targets if get_option('buildExamples') - subdir('examples') + subdir('examples') endif # Build test targets if get_option('buildTests') - subdir('tests') + subdir('tests') endif -endif +endif \ No newline at end of file diff --git a/meson_options.txt b/meson_options.txt index 9191bf7e..d9739d48 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -6,8 +6,7 @@ option('backends', type : 'array', choices : ['hwloc', 'boost', 'pthreads', 'mpi option('frontends', type : 'array', choices : [ 'channel', 'RPCEngine', 'tasking', 'objectStore' ], description : 'Specifies which builtin frontends to enable for compilation with HiCR', value: [ 'channel', 'RPCEngine', 'tasking', 'objectStore' ] -) - +) option('buildTests', type : 'boolean', value : false, description: 'Indicates whether to build tests' @@ -24,3 +23,8 @@ option('exceptionModel', type : 'combo', choices : [ 'stdexception', 'abort' ], option('compileWarningsAsErrors', type : 'boolean', value : false, description: 'Indicates whether a compilation warning should result in a fatal error. This is useful for CI testing but may result in inconveniences for normal users, hence it should be false by default' ) + +###### Backend-specific options +option('aclPath', type : 'string', value : '', + description: 'Indicates home directory where the acl libraries are e.g., /usr/local/Ascend/ascend-toolkit//)' +)