diff --git a/onert-micro/externals/flatbuffers/base.h b/onert-micro/externals/flatbuffers/base.h index 56bf9b427a8..cc9e22dcccf 100644 --- a/onert-micro/externals/flatbuffers/base.h +++ b/onert-micro/externals/flatbuffers/base.h @@ -1,19 +1,3 @@ -/* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ #ifndef FLATBUFFERS_BASE_H_ #define FLATBUFFERS_BASE_H_ diff --git a/onert-micro/externals/flatbuffers/code_generators.h b/onert-micro/externals/flatbuffers/code_generators.h index 3908ea5829a..d1f7b5a4563 100644 --- a/onert-micro/externals/flatbuffers/code_generators.h +++ b/onert-micro/externals/flatbuffers/code_generators.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,8 +22,7 @@ #include "flatbuffers/idl.h" -namespace flatbuffers -{ +namespace flatbuffers { // Utility class to assist in generating code through use of text templates. // @@ -39,16 +37,13 @@ namespace flatbuffers // Output: // void Foo() { printf("%s", "Foo"); } // void Bar() { printf("%s", "Bar"); } -class CodeWriter -{ -public: - CodeWriter(std::string pad = std::string()) : pad_(pad), cur_ident_lvl_(0), ignore_ident_(false) - { - } +class CodeWriter { + public: + CodeWriter(std::string pad = std::string()) + : pad_(pad), cur_ident_lvl_(0), ignore_ident_(false) {} // Clears the current "written" code. - void Clear() - { + void Clear() { stream_.str(""); stream_.clear(); } @@ -56,10 +51,11 @@ class CodeWriter // Associates a key with a value. All subsequent calls to operator+=, where // the specified key is contained in {{ and }} delimiters will be replaced by // the given value. - void SetValue(const std::string &key, const std::string &value) { value_map_[key] = value; } + void SetValue(const std::string &key, const std::string &value) { + value_map_[key] = value; + } - std::string GetValue(const std::string &key) const - { + std::string GetValue(const std::string &key) const { const auto it = value_map_.find(key); return it == value_map_.end() ? "" : it->second; } @@ -76,15 +72,13 @@ class CodeWriter // Increase ident level for writing code void IncrementIdentLevel() { cur_ident_lvl_++; } // Decrease ident level for writing code - void DecrementIdentLevel() - { - if (cur_ident_lvl_) - cur_ident_lvl_--; + void DecrementIdentLevel() { + if (cur_ident_lvl_) cur_ident_lvl_--; } void SetPadding(const std::string &padding) { pad_ = padding; } -private: + private: std::map value_map_; std::stringstream stream_; std::string pad_; @@ -95,34 +89,38 @@ class CodeWriter void AppendIdent(std::stringstream &stream); }; -class BaseGenerator -{ -public: +class BaseGenerator { + public: virtual bool generate() = 0; static std::string NamespaceDir(const Parser &parser, const std::string &path, - const Namespace &ns, const bool dasherize = false); + const Namespace &ns, + const bool dasherize = false); static std::string ToDasherizedCase(const std::string pascal_case); - std::string GeneratedFileName(const std::string &path, const std::string &file_name, + std::string GeneratedFileName(const std::string &path, + const std::string &file_name, const IDLOptions &options) const; -protected: - BaseGenerator(const Parser &parser, const std::string &path, const std::string &file_name, - std::string qualifying_start, std::string qualifying_separator, - std::string default_extension) - : parser_(parser), path_(path), file_name_(file_name), qualifying_start_(qualifying_start), - qualifying_separator_(qualifying_separator), default_extension_(default_extension) - { - } + protected: + BaseGenerator(const Parser &parser, const std::string &path, + const std::string &file_name, std::string qualifying_start, + std::string qualifying_separator, std::string default_extension) + : parser_(parser), + path_(path), + file_name_(file_name), + qualifying_start_(qualifying_start), + qualifying_separator_(qualifying_separator), + default_extension_(default_extension) {} virtual ~BaseGenerator() {} // No copy/assign. BaseGenerator &operator=(const BaseGenerator &); BaseGenerator(const BaseGenerator &); - std::string NamespaceDir(const Namespace &ns, const bool dasherize = false) const; + std::string NamespaceDir(const Namespace &ns, + const bool dasherize = false) const; static const char *FlatBuffersGeneratedWarning(); @@ -139,7 +137,8 @@ class BaseGenerator // Ensure that a type is prefixed with its namespace even within // its own namespace to avoid conflict between generated method // names and similarly named classes or structs - std::string WrapInNameSpace(const Namespace *ns, const std::string &name) const; + std::string WrapInNameSpace(const Namespace *ns, + const std::string &name) const; std::string WrapInNameSpace(const Definition &def) const; @@ -153,23 +152,22 @@ class BaseGenerator const std::string default_extension_; }; -struct CommentConfig -{ +struct CommentConfig { const char *first_line; const char *content_line_prefix; const char *last_line; }; -extern void GenComment(const std::vector &dc, std::string *code_ptr, - const CommentConfig *config, const char *prefix = ""); +extern void GenComment(const std::vector &dc, + std::string *code_ptr, const CommentConfig *config, + const char *prefix = ""); -class FloatConstantGenerator -{ -public: +class FloatConstantGenerator { + public: virtual ~FloatConstantGenerator() {} std::string GenFloatConstant(const FieldDef &field) const; -private: + private: virtual std::string Value(double v, const std::string &src) const = 0; virtual std::string Inf(double v) const = 0; virtual std::string NaN(double v) const = 0; @@ -178,17 +176,19 @@ class FloatConstantGenerator virtual std::string Inf(float v) const = 0; virtual std::string NaN(float v) const = 0; - template std::string GenFloatConstantImpl(const FieldDef &field) const; + template + std::string GenFloatConstantImpl(const FieldDef &field) const; }; -class SimpleFloatConstantGenerator : public FloatConstantGenerator -{ -public: - SimpleFloatConstantGenerator(const char *nan_number, const char *pos_inf_number, +class SimpleFloatConstantGenerator : public FloatConstantGenerator { + public: + SimpleFloatConstantGenerator(const char *nan_number, + const char *pos_inf_number, const char *neg_inf_number); -private: - std::string Value(double v, const std::string &src) const FLATBUFFERS_OVERRIDE; + private: + std::string Value(double v, + const std::string &src) const FLATBUFFERS_OVERRIDE; std::string Inf(double v) const FLATBUFFERS_OVERRIDE; std::string NaN(double v) const FLATBUFFERS_OVERRIDE; @@ -202,15 +202,16 @@ class SimpleFloatConstantGenerator : public FloatConstantGenerator }; // C++, C#, Java like generator. -class TypedFloatConstantGenerator : public FloatConstantGenerator -{ -public: - TypedFloatConstantGenerator(const char *double_prefix, const char *single_prefix, - const char *nan_number, const char *pos_inf_number, +class TypedFloatConstantGenerator : public FloatConstantGenerator { + public: + TypedFloatConstantGenerator(const char *double_prefix, + const char *single_prefix, const char *nan_number, + const char *pos_inf_number, const char *neg_inf_number = ""); -private: - std::string Value(double v, const std::string &src) const FLATBUFFERS_OVERRIDE; + private: + std::string Value(double v, + const std::string &src) const FLATBUFFERS_OVERRIDE; std::string Inf(double v) const FLATBUFFERS_OVERRIDE; std::string NaN(double v) const FLATBUFFERS_OVERRIDE; @@ -229,6 +230,6 @@ class TypedFloatConstantGenerator : public FloatConstantGenerator const std::string neg_inf_number_; }; -} // namespace flatbuffers +} // namespace flatbuffers -#endif // FLATBUFFERS_CODE_GENERATORS_H_ +#endif // FLATBUFFERS_CODE_GENERATORS_H_ diff --git a/onert-micro/externals/flatbuffers/flatbuffers.h b/onert-micro/externals/flatbuffers/flatbuffers.h index 3005d892181..ee34d54ed40 100644 --- a/onert-micro/externals/flatbuffers/flatbuffers.h +++ b/onert-micro/externals/flatbuffers/flatbuffers.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,30 +21,29 @@ #include "flatbuffers/stl_emulation.h" #ifndef FLATBUFFERS_CPP98_STL -#include +# include #endif #if defined(FLATBUFFERS_NAN_DEFAULTS) -#include +# include #endif -namespace flatbuffers -{ +namespace flatbuffers { // Generic 'operator==' with conditional specialisations. // T e - new value of a scalar field. // T def - default of scalar (is known at compile-time). -template inline bool IsTheSameAs(T e, T def) { return e == def; } +template inline bool IsTheSameAs(T e, T def) { return e == def; } -#if defined(FLATBUFFERS_NAN_DEFAULTS) && defined(FLATBUFFERS_HAS_NEW_STRTOD) && \ - (FLATBUFFERS_HAS_NEW_STRTOD > 0) +#if defined(FLATBUFFERS_NAN_DEFAULTS) && \ + defined(FLATBUFFERS_HAS_NEW_STRTOD) && (FLATBUFFERS_HAS_NEW_STRTOD > 0) // Like `operator==(e, def)` with weak NaN if T=(float|double). -template inline bool IsFloatTheSameAs(T e, T def) -{ +template inline bool IsFloatTheSameAs(T e, T def) { return (e == def) || ((def != def) && (e != e)); } -template <> inline bool IsTheSameAs(float e, float def) { return IsFloatTheSameAs(e, def); } -template <> inline bool IsTheSameAs(double e, double def) -{ +template<> inline bool IsTheSameAs(float e, float def) { + return IsFloatTheSameAs(e, def); +} +template<> inline bool IsTheSameAs(double e, double def) { return IsFloatTheSameAs(e, def); } #endif @@ -53,21 +51,20 @@ template <> inline bool IsTheSameAs(double e, double def) // Check 'v' is out of closed range [low; high]. // Workaround for GCC warning [-Werror=type-limits]: // comparison is always true due to limited range of data type. -template inline bool IsOutRange(const T &v, const T &low, const T &high) -{ +template +inline bool IsOutRange(const T &v, const T &low, const T &high) { return (v < low) || (high < v); } // Check 'v' is in closed range [low; high]. -template inline bool IsInRange(const T &v, const T &low, const T &high) -{ +template +inline bool IsInRange(const T &v, const T &low, const T &high) { return !IsOutRange(v, low, high); } // Wrapper for uoffset_t to allow safe template specialization. // Value is allowed to be 0 to indicate a null object (see e.g. AddOffset). -template struct Offset -{ +template struct Offset { uoffset_t o; Offset() : o(0) {} Offset(uoffset_t _o) : o(_o) {} @@ -75,25 +72,25 @@ template struct Offset bool IsNull() const { return !o; } }; -inline void EndianCheck() -{ +inline void EndianCheck() { int endiantest = 1; // If this fails, see FLATBUFFERS_LITTLEENDIAN above. - FLATBUFFERS_ASSERT(*reinterpret_cast(&endiantest) == FLATBUFFERS_LITTLEENDIAN); + FLATBUFFERS_ASSERT(*reinterpret_cast(&endiantest) == + FLATBUFFERS_LITTLEENDIAN); (void)endiantest; } -template FLATBUFFERS_CONSTEXPR size_t AlignOf() -{ -#ifdef _MSC_VER - return __alignof(T); -#else -#ifndef alignof - return __alignof__(T); -#else - return alignof(T); -#endif -#endif +template FLATBUFFERS_CONSTEXPR size_t AlignOf() { + // clang-format off + #ifdef _MSC_VER + return __alignof(T); + #else + #ifndef alignof + return __alignof__(T); + #else + return alignof(T); + #endif + #endif // clang-format on } @@ -105,42 +102,35 @@ template FLATBUFFERS_CONSTEXPR size_t AlignOf() // return type like this. // The typedef is for the convenience of callers of this function // (avoiding the need for a trailing return decltype) -template struct IndirectHelper -{ +template struct IndirectHelper { typedef T return_type; typedef T mutable_return_type; static const size_t element_stride = sizeof(T); - static return_type Read(const uint8_t *p, uoffset_t i) - { + static return_type Read(const uint8_t *p, uoffset_t i) { return EndianScalar((reinterpret_cast(p))[i]); } }; -template struct IndirectHelper> -{ +template struct IndirectHelper> { typedef const T *return_type; typedef T *mutable_return_type; static const size_t element_stride = sizeof(uoffset_t); - static return_type Read(const uint8_t *p, uoffset_t i) - { + static return_type Read(const uint8_t *p, uoffset_t i) { p += i * sizeof(uoffset_t); return reinterpret_cast(p + ReadScalar(p)); } }; -template struct IndirectHelper -{ +template struct IndirectHelper { typedef const T *return_type; typedef T *mutable_return_type; static const size_t element_stride = sizeof(T); - static return_type Read(const uint8_t *p, uoffset_t i) - { + static return_type Read(const uint8_t *p, uoffset_t i) { return reinterpret_cast(p + i * sizeof(T)); } }; // An STL compatible iterator implementation for Vector below, effectively // calling Get() for every element. -template struct VectorIterator -{ +template struct VectorIterator { typedef std::random_access_iterator_tag iterator_category; typedef IT value_type; typedef ptrdiff_t difference_type; @@ -148,35 +138,37 @@ template struct VectorIterator typedef IT &reference; VectorIterator(const uint8_t *data, uoffset_t i) - : data_(data + IndirectHelper::element_stride * i) - { - } + : data_(data + IndirectHelper::element_stride * i) {} VectorIterator(const VectorIterator &other) : data_(other.data_) {} VectorIterator() : data_(nullptr) {} - VectorIterator &operator=(const VectorIterator &other) - { + VectorIterator &operator=(const VectorIterator &other) { data_ = other.data_; return *this; } -#if !defined(FLATBUFFERS_CPP98_STL) - VectorIterator &operator=(VectorIterator &&other) - { + // clang-format off + #if !defined(FLATBUFFERS_CPP98_STL) + VectorIterator &operator=(VectorIterator &&other) { data_ = other.data_; return *this; } -#endif // !defined(FLATBUFFERS_CPP98_STL) + #endif // !defined(FLATBUFFERS_CPP98_STL) // clang-format on - bool operator==(const VectorIterator &other) const { return data_ == other.data_; } + bool operator==(const VectorIterator &other) const { + return data_ == other.data_; + } - bool operator<(const VectorIterator &other) const { return data_ < other.data_; } + bool operator<(const VectorIterator &other) const { + return data_ < other.data_; + } - bool operator!=(const VectorIterator &other) const { return data_ != other.data_; } + bool operator!=(const VectorIterator &other) const { + return data_ != other.data_; + } - difference_type operator-(const VectorIterator &other) const - { + difference_type operator-(const VectorIterator &other) const { return (data_ - other.data_) / IndirectHelper::element_stride; } @@ -188,74 +180,67 @@ template struct VectorIterator // `pointer operator->()`. IT operator->() const { return IndirectHelper::Read(data_, 0); } - VectorIterator &operator++() - { + VectorIterator &operator++() { data_ += IndirectHelper::element_stride; return *this; } - VectorIterator operator++(int) - { + VectorIterator operator++(int) { VectorIterator temp(data_, 0); data_ += IndirectHelper::element_stride; return temp; } - VectorIterator operator+(const uoffset_t &offset) const - { - return VectorIterator(data_ + offset * IndirectHelper::element_stride, 0); + VectorIterator operator+(const uoffset_t &offset) const { + return VectorIterator(data_ + offset * IndirectHelper::element_stride, + 0); } - VectorIterator &operator+=(const uoffset_t &offset) - { + VectorIterator &operator+=(const uoffset_t &offset) { data_ += offset * IndirectHelper::element_stride; return *this; } - VectorIterator &operator--() - { + VectorIterator &operator--() { data_ -= IndirectHelper::element_stride; return *this; } - VectorIterator operator--(int) - { + VectorIterator operator--(int) { VectorIterator temp(data_, 0); data_ -= IndirectHelper::element_stride; return temp; } - VectorIterator operator-(const uoffset_t &offset) const - { - return VectorIterator(data_ - offset * IndirectHelper::element_stride, 0); + VectorIterator operator-(const uoffset_t &offset) const { + return VectorIterator(data_ - offset * IndirectHelper::element_stride, + 0); } - VectorIterator &operator-=(const uoffset_t &offset) - { + VectorIterator &operator-=(const uoffset_t &offset) { data_ -= offset * IndirectHelper::element_stride; return *this; } -private: + private: const uint8_t *data_; }; -template struct VectorReverseIterator : public std::reverse_iterator -{ - explicit VectorReverseIterator(Iterator iter) : std::reverse_iterator(iter) {} +template +struct VectorReverseIterator : public std::reverse_iterator { + explicit VectorReverseIterator(Iterator iter) + : std::reverse_iterator(iter) {} // Note: return type is incompatible with the standard // `reference operator*()`. - typename Iterator::value_type operator*() const - { + typename Iterator::value_type operator*() const { auto tmp = std::reverse_iterator::current; return *--tmp; } // Note: return type is incompatible with the standard // `pointer operator->()`. - typename Iterator::value_type operator->() const - { + typename Iterator::value_type operator->() const { auto tmp = std::reverse_iterator::current; return *--tmp; } @@ -265,11 +250,12 @@ struct String; // This is used as a helper type for accessing vectors. // Vector::data() assumes the vector elements start after the length field. -template class Vector -{ -public: - typedef VectorIterator::mutable_return_type> iterator; - typedef VectorIterator::return_type> const_iterator; +template class Vector { + public: + typedef VectorIterator::mutable_return_type> + iterator; + typedef VectorIterator::return_type> + const_iterator; typedef VectorReverseIterator reverse_iterator; typedef VectorReverseIterator const_reverse_iterator; @@ -283,8 +269,7 @@ template class Vector typedef typename IndirectHelper::mutable_return_type mutable_return_type; typedef return_type value_type; - return_type Get(uoffset_t i) const - { + return_type Get(uoffset_t i) const { FLATBUFFERS_ASSERT(i < size()); return IndirectHelper::Read(Data(), i); } @@ -294,21 +279,23 @@ template class Vector // If this is a Vector of enums, T will be its storage type, not the enum // type. This function makes it convenient to retrieve value with enum // type E. - template E GetEnum(uoffset_t i) const { return static_cast(Get(i)); } + template E GetEnum(uoffset_t i) const { + return static_cast(Get(i)); + } // If this a vector of unions, this does the cast for you. There's no check // to make sure this is the right type! - template const U *GetAs(uoffset_t i) const - { + template const U *GetAs(uoffset_t i) const { return reinterpret_cast(Get(i)); } // If this a vector of unions, this does the cast for you. There's no check // to make sure this is actually a string! - const String *GetAsString(uoffset_t i) const { return reinterpret_cast(Get(i)); } + const String *GetAsString(uoffset_t i) const { + return reinterpret_cast(Get(i)); + } - const void *GetStructFromOffset(size_t o) const - { + const void *GetStructFromOffset(size_t o) const { return reinterpret_cast(Data() + o); } @@ -319,10 +306,14 @@ template class Vector const_iterator end() const { return const_iterator(Data(), size()); } reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } const_iterator cbegin() const { return begin(); } @@ -334,8 +325,7 @@ template class Vector // Change elements if you have a non-const pointer to this object. // Scalars only. See reflection.h, and the documentation. - void Mutate(uoffset_t i, const T &val) - { + void Mutate(uoffset_t i, const T &val) { FLATBUFFERS_ASSERT(i < size()); WriteScalar(data() + i, val); } @@ -343,22 +333,23 @@ template class Vector // Change an element of a vector of tables (or strings). // "val" points to the new table/string, as you can obtain from // e.g. reflection::AddFlatBuffer(). - void MutateOffset(uoffset_t i, const uint8_t *val) - { + void MutateOffset(uoffset_t i, const uint8_t *val) { FLATBUFFERS_ASSERT(i < size()); static_assert(sizeof(T) == sizeof(uoffset_t), "Unrelated types"); - WriteScalar(data() + i, static_cast(val - (Data() + i * sizeof(uoffset_t)))); + WriteScalar(data() + i, + static_cast(val - (Data() + i * sizeof(uoffset_t)))); } // Get a mutable pointer to tables/strings inside this vector. - mutable_return_type GetMutableObject(uoffset_t i) const - { + mutable_return_type GetMutableObject(uoffset_t i) const { FLATBUFFERS_ASSERT(i < size()); return const_cast(IndirectHelper::Read(Data(), i)); } // The raw data in little endian format. Use with care. - const uint8_t *Data() const { return reinterpret_cast(&length_ + 1); } + const uint8_t *Data() const { + return reinterpret_cast(&length_ + 1); + } uint8_t *Data() { return reinterpret_cast(&length_ + 1); } @@ -366,14 +357,12 @@ template class Vector const T *data() const { return reinterpret_cast(Data()); } T *data() { return reinterpret_cast(Data()); } - template return_type LookupByKey(K key) const - { - void *search_result = - std::bsearch(&key, Data(), size(), IndirectHelper::element_stride, KeyCompare); + template return_type LookupByKey(K key) const { + void *search_result = std::bsearch( + &key, Data(), size(), IndirectHelper::element_stride, KeyCompare); - if (!search_result) - { - return nullptr; // Key not found. + if (!search_result) { + return nullptr; // Key not found. } const uint8_t *element = reinterpret_cast(search_result); @@ -381,21 +370,20 @@ template class Vector return IndirectHelper::Read(element, 0); } -protected: + protected: // This class is only used to access pre-existing data. Don't ever // try to construct these manually. Vector(); uoffset_t length_; -private: + private: // This class is a pointer. Copying will therefore create an invalid object. // Private and unimplemented copy constructor. Vector(const Vector &); Vector &operator=(const Vector &); - template static int KeyCompare(const void *ap, const void *bp) - { + template static int KeyCompare(const void *ap, const void *bp) { const K *key = reinterpret_cast(ap); const uint8_t *data = reinterpret_cast(bp); auto table = IndirectHelper::Read(data, 0); @@ -408,33 +396,34 @@ template class Vector // Represent a vector much like the template above, but in this case we // don't know what the element types are (used with reflection.h). -class VectorOfAny -{ -public: +class VectorOfAny { + public: uoffset_t size() const { return EndianScalar(length_); } - const uint8_t *Data() const { return reinterpret_cast(&length_ + 1); } + const uint8_t *Data() const { + return reinterpret_cast(&length_ + 1); + } uint8_t *Data() { return reinterpret_cast(&length_ + 1); } -protected: + protected: VectorOfAny(); uoffset_t length_; -private: + private: VectorOfAny(const VectorOfAny &); VectorOfAny &operator=(const VectorOfAny &); }; #ifndef FLATBUFFERS_CPP98_STL -template Vector> *VectorCast(Vector> *ptr) -{ +template +Vector> *VectorCast(Vector> *ptr) { static_assert(std::is_base_of::value, "Unrelated types"); return reinterpret_cast> *>(ptr); } -template const Vector> *VectorCast(const Vector> *ptr) -{ +template +const Vector> *VectorCast(const Vector> *ptr) { static_assert(std::is_base_of::value, "Unrelated types"); return reinterpret_cast> *>(ptr); } @@ -442,20 +431,21 @@ template const Vector> *VectorCast(const Vect // Convenient helper function to get the length of any vector, regardless // of whether it is null or not (the field is not set). -template static inline size_t VectorLength(const Vector *v) -{ +template static inline size_t VectorLength(const Vector *v) { return v ? v->size() : 0; } // This is used as a helper type for accessing arrays. -template class Array -{ - typedef typename flatbuffers::integral_constant::value> - scalar_tag; +template class Array { + typedef + typename flatbuffers::integral_constant::value> + scalar_tag; typedef - typename flatbuffers::conditional::type IndirectHelperType; + typename flatbuffers::conditional::type + IndirectHelperType; -public: + public: typedef uint16_t size_type; typedef typename IndirectHelper::return_type return_type; typedef VectorIterator const_iterator; @@ -463,8 +453,7 @@ template class Array FLATBUFFERS_CONSTEXPR uint16_t size() const { return length; } - return_type Get(uoffset_t i) const - { + return_type Get(uoffset_t i) const { FLATBUFFERS_ASSERT(i < size()); return IndirectHelper::Read(Data(), i); } @@ -474,13 +463,19 @@ template class Array // If this is a Vector of enums, T will be its storage type, not the enum // type. This function makes it convenient to retrieve value with enum // type E. - template E GetEnum(uoffset_t i) const { return static_cast(Get(i)); } + template E GetEnum(uoffset_t i) const { + return static_cast(Get(i)); + } const_iterator begin() const { return const_iterator(Data(), 0); } const_iterator end() const { return const_iterator(Data(), size()); } - const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } - const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } const_iterator cbegin() const { return begin(); } const_iterator cend() const { return end(); } @@ -494,8 +489,7 @@ template class Array // @warning Assignments and reads to/from the dereferenced pointer are not // automatically converted to the correct endianness. typename flatbuffers::conditional::type - GetMutablePointer(uoffset_t i) const - { + GetMutablePointer(uoffset_t i) const { FLATBUFFERS_ASSERT(i < size()); return const_cast(&data()[i]); } @@ -514,33 +508,34 @@ template class Array // Copy data from a span with endian conversion. // If this Array and the span overlap, the behavior is undefined. - void CopyFromSpan(flatbuffers::span src) - { + void CopyFromSpan(flatbuffers::span src) { const auto p1 = reinterpret_cast(src.data()); const auto p2 = Data(); - FLATBUFFERS_ASSERT(!(p1 >= p2 && p1 < (p2 + length)) && !(p2 >= p1 && p2 < (p1 + length))); + FLATBUFFERS_ASSERT(!(p1 >= p2 && p1 < (p2 + length)) && + !(p2 >= p1 && p2 < (p1 + length))); (void)p1; (void)p2; - CopyFromSpanImpl(flatbuffers::integral_constant < bool, - !scalar_tag::value || sizeof(T) == 1 || FLATBUFFERS_LITTLEENDIAN > (), src); + CopyFromSpanImpl( + flatbuffers::integral_constant < bool, + !scalar_tag::value || sizeof(T) == 1 || FLATBUFFERS_LITTLEENDIAN > (), + src); } -protected: - void MutateImpl(flatbuffers::integral_constant, uoffset_t i, const T &val) - { + protected: + void MutateImpl(flatbuffers::integral_constant, uoffset_t i, + const T &val) { FLATBUFFERS_ASSERT(i < size()); WriteScalar(data() + i, val); } - void MutateImpl(flatbuffers::integral_constant, uoffset_t i, const T &val) - { + void MutateImpl(flatbuffers::integral_constant, uoffset_t i, + const T &val) { *(GetMutablePointer(i)) = val; } void CopyFromSpanImpl(flatbuffers::integral_constant, - flatbuffers::span src) - { + flatbuffers::span src) { // Use std::memcpy() instead of std::copy() to avoid preformance degradation // due to aliasing if T is char or unsigned char. // The size is known at compile time, so memcpy would be inlined. @@ -549,12 +544,8 @@ template class Array // Copy data from flatbuffers::span with endian conversion. void CopyFromSpanImpl(flatbuffers::integral_constant, - flatbuffers::span src) - { - for (size_type k = 0; k < length; k++) - { - Mutate(k, src[k]); - } + flatbuffers::span src) { + for (size_type k = 0; k < length; k++) { Mutate(k, src[k]); } } // This class is only used to access pre-existing data. Don't ever @@ -570,7 +561,7 @@ template class Array uint8_t data_[length * sizeof(T)]; -private: + private: // This class is a pointer. Copying will therefore create an invalid object. // Private and unimplemented copy constructor. Array(const Array &); @@ -579,23 +570,21 @@ template class Array // Specialization for Array[struct] with access using Offset pointer. // This specialization used by idl_gen_text.cpp. -template class Array, length> -{ +template class Array, length> { static_assert(flatbuffers::is_same::value, "unexpected type T"); -public: + public: typedef const void *return_type; const uint8_t *Data() const { return data_; } // Make idl_gen_text.cpp::PrintContainer happy. - return_type operator[](uoffset_t) const - { + return_type operator[](uoffset_t) const { FLATBUFFERS_ASSERT(false); return nullptr; } -private: + private: // This class is only used to access pre-existing data. Array(); Array(const Array &); @@ -606,77 +595,77 @@ template class Array, length> // Cast a raw T[length] to a raw flatbuffers::Array // without endian conversion. Use with care. -template Array &CastToArray(T (&arr)[length]) -{ +template +Array &CastToArray(T (&arr)[length]) { return *reinterpret_cast *>(arr); } -template const Array &CastToArray(const T (&arr)[length]) -{ +template +const Array &CastToArray(const T (&arr)[length]) { return *reinterpret_cast *>(arr); } -template -Array &CastToArrayOfEnum(T (&arr)[length]) -{ +template +Array &CastToArrayOfEnum(T (&arr)[length]) { static_assert(sizeof(E) == sizeof(T), "invalid enum type E"); return *reinterpret_cast *>(arr); } -template -const Array &CastToArrayOfEnum(const T (&arr)[length]) -{ +template +const Array &CastToArrayOfEnum(const T (&arr)[length]) { static_assert(sizeof(E) == sizeof(T), "invalid enum type E"); return *reinterpret_cast *>(arr); } // Lexicographically compare two strings (possibly containing nulls), and // return true if the first is less than the second. -static inline bool StringLessThan(const char *a_data, uoffset_t a_size, const char *b_data, - uoffset_t b_size) -{ +static inline bool StringLessThan(const char *a_data, uoffset_t a_size, + const char *b_data, uoffset_t b_size) { const auto cmp = memcmp(a_data, b_data, (std::min)(a_size, b_size)); return cmp == 0 ? a_size < b_size : cmp < 0; } -struct String : public Vector -{ +struct String : public Vector { const char *c_str() const { return reinterpret_cast(Data()); } std::string str() const { return std::string(c_str(), size()); } -#ifdef FLATBUFFERS_HAS_STRING_VIEW - flatbuffers::string_view string_view() const { return flatbuffers::string_view(c_str(), size()); } -#endif // FLATBUFFERS_HAS_STRING_VIEW + // clang-format off + #ifdef FLATBUFFERS_HAS_STRING_VIEW + flatbuffers::string_view string_view() const { + return flatbuffers::string_view(c_str(), size()); + } + #endif // FLATBUFFERS_HAS_STRING_VIEW // clang-format on - bool operator<(const String &o) const - { + bool operator<(const String &o) const { return StringLessThan(this->data(), this->size(), o.data(), o.size()); } }; // Convenience function to get std::string from a String returning an empty // string on null pointer. -static inline std::string GetString(const String *str) { return str ? str->str() : ""; } +static inline std::string GetString(const String *str) { + return str ? str->str() : ""; +} // Convenience function to get char* from a String returning an empty string on // null pointer. -static inline const char *GetCstring(const String *str) { return str ? str->c_str() : ""; } +static inline const char *GetCstring(const String *str) { + return str ? str->c_str() : ""; +} #ifdef FLATBUFFERS_HAS_STRING_VIEW // Convenience function to get string_view from a String returning an empty // string_view on null pointer. -static inline flatbuffers::string_view GetStringView(const String *str) -{ +static inline flatbuffers::string_view GetStringView(const String *str) { return str ? str->string_view() : flatbuffers::string_view(); } -#endif // FLATBUFFERS_HAS_STRING_VIEW +#endif // FLATBUFFERS_HAS_STRING_VIEW // Allocator interface. This is flatbuffers-specific and meant only for // `vector_downward` usage. -class Allocator -{ -public: +class Allocator { + public: virtual ~Allocator() {} // Allocate `size` bytes of memory. @@ -690,34 +679,37 @@ class Allocator // and is intended specifcally for `vector_downward` use. // `in_use_back` and `in_use_front` indicate how much of `old_size` is // actually in use at each end, and needs to be copied. - virtual uint8_t *reallocate_downward(uint8_t *old_p, size_t old_size, size_t new_size, - size_t in_use_back, size_t in_use_front) - { - FLATBUFFERS_ASSERT(new_size > old_size); // vector_downward only grows + virtual uint8_t *reallocate_downward(uint8_t *old_p, size_t old_size, + size_t new_size, size_t in_use_back, + size_t in_use_front) { + FLATBUFFERS_ASSERT(new_size > old_size); // vector_downward only grows uint8_t *new_p = allocate(new_size); - memcpy_downward(old_p, old_size, new_p, new_size, in_use_back, in_use_front); + memcpy_downward(old_p, old_size, new_p, new_size, in_use_back, + in_use_front); deallocate(old_p, old_size); return new_p; } -protected: + protected: // Called by `reallocate_downward` to copy memory from `old_p` of `old_size` // to `new_p` of `new_size`. Only memory of size `in_use_front` and // `in_use_back` will be copied from the front and back of the old memory // allocation. - void memcpy_downward(uint8_t *old_p, size_t old_size, uint8_t *new_p, size_t new_size, - size_t in_use_back, size_t in_use_front) - { - memcpy(new_p + new_size - in_use_back, old_p + old_size - in_use_back, in_use_back); + void memcpy_downward(uint8_t *old_p, size_t old_size, uint8_t *new_p, + size_t new_size, size_t in_use_back, + size_t in_use_front) { + memcpy(new_p + new_size - in_use_back, old_p + old_size - in_use_back, + in_use_back); memcpy(new_p, old_p, in_use_front); } }; // DefaultAllocator uses new/delete to allocate memory regions -class DefaultAllocator : public Allocator -{ -public: - uint8_t *allocate(size_t size) FLATBUFFERS_OVERRIDE { return new uint8_t[size]; } +class DefaultAllocator : public Allocator { + public: + uint8_t *allocate(size_t size) FLATBUFFERS_OVERRIDE { + return new uint8_t[size]; + } void deallocate(uint8_t *p, size_t) FLATBUFFERS_OVERRIDE { delete[] p; } @@ -728,63 +720,70 @@ class DefaultAllocator : public Allocator // as used by DetachedBuffer and vector_downward below. // This is to avoid having a statically or dynamically allocated default // allocator, or having to move it between the classes that may own it. -inline uint8_t *Allocate(Allocator *allocator, size_t size) -{ - return allocator ? allocator->allocate(size) : DefaultAllocator().allocate(size); +inline uint8_t *Allocate(Allocator *allocator, size_t size) { + return allocator ? allocator->allocate(size) + : DefaultAllocator().allocate(size); } -inline void Deallocate(Allocator *allocator, uint8_t *p, size_t size) -{ +inline void Deallocate(Allocator *allocator, uint8_t *p, size_t size) { if (allocator) allocator->deallocate(p, size); else DefaultAllocator().deallocate(p, size); } -inline uint8_t *ReallocateDownward(Allocator *allocator, uint8_t *old_p, size_t old_size, - size_t new_size, size_t in_use_back, size_t in_use_front) -{ - return allocator - ? allocator->reallocate_downward(old_p, old_size, new_size, in_use_back, in_use_front) - : DefaultAllocator().reallocate_downward(old_p, old_size, new_size, in_use_back, - in_use_front); +inline uint8_t *ReallocateDownward(Allocator *allocator, uint8_t *old_p, + size_t old_size, size_t new_size, + size_t in_use_back, size_t in_use_front) { + return allocator ? allocator->reallocate_downward(old_p, old_size, new_size, + in_use_back, in_use_front) + : DefaultAllocator().reallocate_downward( + old_p, old_size, new_size, in_use_back, in_use_front); } // DetachedBuffer is a finished flatbuffer memory region, detached from its // builder. The original memory region and allocator are also stored so that // the DetachedBuffer can manage the memory lifetime. -class DetachedBuffer -{ -public: +class DetachedBuffer { + public: DetachedBuffer() - : allocator_(nullptr), own_allocator_(false), buf_(nullptr), reserved_(0), cur_(nullptr), - size_(0) - { - } - - DetachedBuffer(Allocator *allocator, bool own_allocator, uint8_t *buf, size_t reserved, - uint8_t *cur, size_t sz) - : allocator_(allocator), own_allocator_(own_allocator), buf_(buf), reserved_(reserved), - cur_(cur), size_(sz) - { - } - -#if !defined(FLATBUFFERS_CPP98_STL) + : allocator_(nullptr), + own_allocator_(false), + buf_(nullptr), + reserved_(0), + cur_(nullptr), + size_(0) {} + + DetachedBuffer(Allocator *allocator, bool own_allocator, uint8_t *buf, + size_t reserved, uint8_t *cur, size_t sz) + : allocator_(allocator), + own_allocator_(own_allocator), + buf_(buf), + reserved_(reserved), + cur_(cur), + size_(sz) {} + + // clang-format off + #if !defined(FLATBUFFERS_CPP98_STL) // clang-format on DetachedBuffer(DetachedBuffer &&other) - : allocator_(other.allocator_), own_allocator_(other.own_allocator_), buf_(other.buf_), - reserved_(other.reserved_), cur_(other.cur_), size_(other.size_) - { + : allocator_(other.allocator_), + own_allocator_(other.own_allocator_), + buf_(other.buf_), + reserved_(other.reserved_), + cur_(other.cur_), + size_(other.size_) { other.reset(); } -#endif // !defined(FLATBUFFERS_CPP98_STL) + // clang-format off + #endif // !defined(FLATBUFFERS_CPP98_STL) + // clang-format on -#if !defined(FLATBUFFERS_CPP98_STL) + // clang-format off + #if !defined(FLATBUFFERS_CPP98_STL) // clang-format on - DetachedBuffer &operator=(DetachedBuffer &&other) - { - if (this == &other) - return *this; + DetachedBuffer &operator=(DetachedBuffer &&other) { + if (this == &other) return *this; destroy(); @@ -799,7 +798,8 @@ class DetachedBuffer return *this; } -#endif // !defined(FLATBUFFERS_CPP98_STL) + // clang-format off + #endif // !defined(FLATBUFFERS_CPP98_STL) // clang-format on ~DetachedBuffer() { destroy(); } @@ -810,7 +810,8 @@ class DetachedBuffer size_t size() const { return size_; } -#if 0 // disabled for now due to the ordering of classes in this header + // clang-format off + #if 0 // disabled for now due to the ordering of classes in this header template bool Verify() const { Verifier verifier(data(), size()); @@ -826,17 +827,21 @@ class DetachedBuffer T* GetRoot() { return flatbuffers::GetRoot(data()); } -#endif + #endif + // clang-format on -#if !defined(FLATBUFFERS_CPP98_STL) + // clang-format off + #if !defined(FLATBUFFERS_CPP98_STL) // clang-format on // These may change access mode, leave these at end of public section FLATBUFFERS_DELETE_FUNC(DetachedBuffer(const DetachedBuffer &other)); - FLATBUFFERS_DELETE_FUNC(DetachedBuffer &operator=(const DetachedBuffer &other)); -#endif // !defined(FLATBUFFERS_CPP98_STL) + FLATBUFFERS_DELETE_FUNC( + DetachedBuffer &operator=(const DetachedBuffer &other)); + // clang-format off + #endif // !defined(FLATBUFFERS_CPP98_STL) // clang-format on -protected: + protected: Allocator *allocator_; bool own_allocator_; uint8_t *buf_; @@ -844,19 +849,13 @@ class DetachedBuffer uint8_t *cur_; size_t size_; - inline void destroy() - { - if (buf_) - Deallocate(allocator_, buf_, reserved_); - if (own_allocator_ && allocator_) - { - delete allocator_; - } + inline void destroy() { + if (buf_) Deallocate(allocator_, buf_, reserved_); + if (own_allocator_ && allocator_) { delete allocator_; } reset(); } - inline void reset() - { + inline void reset() { allocator_ = nullptr; own_allocator_ = false; buf_ = nullptr; @@ -872,27 +871,34 @@ class DetachedBuffer // Since this vector leaves the lower part unused, we support a "scratch-pad" // that can be stored there for temporary data, to share the allocated space. // Essentially, this supports 2 std::vectors in a single buffer. -class vector_downward -{ -public: - explicit vector_downward(size_t initial_size, Allocator *allocator, bool own_allocator, - size_t buffer_minalign) - : allocator_(allocator), own_allocator_(own_allocator), initial_size_(initial_size), - buffer_minalign_(buffer_minalign), reserved_(0), buf_(nullptr), cur_(nullptr), - scratch_(nullptr) - { - } - -#if !defined(FLATBUFFERS_CPP98_STL) +class vector_downward { + public: + explicit vector_downward(size_t initial_size, Allocator *allocator, + bool own_allocator, size_t buffer_minalign) + : allocator_(allocator), + own_allocator_(own_allocator), + initial_size_(initial_size), + buffer_minalign_(buffer_minalign), + reserved_(0), + buf_(nullptr), + cur_(nullptr), + scratch_(nullptr) {} + + // clang-format off + #if !defined(FLATBUFFERS_CPP98_STL) vector_downward(vector_downward &&other) -#else + #else vector_downward(vector_downward &other) -#endif // defined(FLATBUFFERS_CPP98_STL) - // clang-format on - : allocator_(other.allocator_), own_allocator_(other.own_allocator_), - initial_size_(other.initial_size_), buffer_minalign_(other.buffer_minalign_), - reserved_(other.reserved_), buf_(other.buf_), cur_(other.cur_), scratch_(other.scratch_) - { + #endif // defined(FLATBUFFERS_CPP98_STL) + // clang-format on + : allocator_(other.allocator_), + own_allocator_(other.own_allocator_), + initial_size_(other.initial_size_), + buffer_minalign_(other.buffer_minalign_), + reserved_(other.reserved_), + buf_(other.buf_), + cur_(other.cur_), + scratch_(other.scratch_) { // No change in other.allocator_ // No change in other.initial_size_ // No change in other.buffer_minalign_ @@ -903,38 +909,33 @@ class vector_downward other.scratch_ = nullptr; } -#if !defined(FLATBUFFERS_CPP98_STL) + // clang-format off + #if !defined(FLATBUFFERS_CPP98_STL) // clang-format on - vector_downward &operator=(vector_downward &&other) - { + vector_downward &operator=(vector_downward &&other) { // Move construct a temporary and swap idiom vector_downward temp(std::move(other)); swap(temp); return *this; } -#endif // defined(FLATBUFFERS_CPP98_STL) + // clang-format off + #endif // defined(FLATBUFFERS_CPP98_STL) // clang-format on - ~vector_downward() - { + ~vector_downward() { clear_buffer(); clear_allocator(); } - void reset() - { + void reset() { clear_buffer(); clear(); } - void clear() - { - if (buf_) - { + void clear() { + if (buf_) { cur_ = buf_ + reserved_; - } - else - { + } else { reserved_ = 0; cur_ = nullptr; } @@ -943,26 +944,19 @@ class vector_downward void clear_scratch() { scratch_ = buf_; } - void clear_allocator() - { - if (own_allocator_ && allocator_) - { - delete allocator_; - } + void clear_allocator() { + if (own_allocator_ && allocator_) { delete allocator_; } allocator_ = nullptr; own_allocator_ = false; } - void clear_buffer() - { - if (buf_) - Deallocate(allocator_, buf_, reserved_); + void clear_buffer() { + if (buf_) Deallocate(allocator_, buf_, reserved_); buf_ = nullptr; } // Relinquish the pointer to the caller. - uint8_t *release_raw(size_t &allocated_bytes, size_t &offset) - { + uint8_t *release_raw(size_t &allocated_bytes, size_t &offset) { auto *buf = buf_; allocated_bytes = reserved_; offset = static_cast(cur_ - buf_); @@ -975,12 +969,11 @@ class vector_downward } // Relinquish the pointer to the caller. - DetachedBuffer release() - { + DetachedBuffer release() { // allocator ownership (if any) is transferred to DetachedBuffer. - DetachedBuffer fb(allocator_, own_allocator_, buf_, reserved_, cur_, size()); - if (own_allocator_) - { + DetachedBuffer fb(allocator_, own_allocator_, buf_, reserved_, cur_, + size()); + if (own_allocator_) { allocator_ = nullptr; own_allocator_ = false; } @@ -989,21 +982,16 @@ class vector_downward return fb; } - size_t ensure_space(size_t len) - { + size_t ensure_space(size_t len) { FLATBUFFERS_ASSERT(cur_ >= scratch_ && scratch_ >= buf_); - if (len > static_cast(cur_ - scratch_)) - { - reallocate(len); - } + if (len > static_cast(cur_ - scratch_)) { reallocate(len); } // Beyond this, signed offsets may not have enough range: // (FlatBuffers > 2GB not supported). FLATBUFFERS_ASSERT(size() < FLATBUFFERS_MAX_BUFFER_SIZE); return len; } - inline uint8_t *make_space(size_t len) - { + inline uint8_t *make_space(size_t len) { size_t space = ensure_space(len); cur_ -= space; return cur_; @@ -1012,52 +1000,44 @@ class vector_downward // Returns nullptr if using the DefaultAllocator. Allocator *get_custom_allocator() { return allocator_; } - uoffset_t size() const - { + uoffset_t size() const { return static_cast(reserved_ - static_cast(cur_ - buf_)); } - uoffset_t scratch_size() const { return static_cast(scratch_ - buf_); } + uoffset_t scratch_size() const { + return static_cast(scratch_ - buf_); + } size_t capacity() const { return reserved_; } - uint8_t *data() const - { + uint8_t *data() const { FLATBUFFERS_ASSERT(cur_); return cur_; } - uint8_t *scratch_data() const - { + uint8_t *scratch_data() const { FLATBUFFERS_ASSERT(buf_); return buf_; } - uint8_t *scratch_end() const - { + uint8_t *scratch_end() const { FLATBUFFERS_ASSERT(scratch_); return scratch_; } uint8_t *data_at(size_t offset) const { return buf_ + reserved_ - offset; } - void push(const uint8_t *bytes, size_t num) - { - if (num > 0) - { - memcpy(make_space(num), bytes, num); - } + void push(const uint8_t *bytes, size_t num) { + if (num > 0) { memcpy(make_space(num), bytes, num); } } // Specialized version of push() that avoids memcpy call for small data. - template void push_small(const T &little_endian_t) - { + template void push_small(const T &little_endian_t) { make_space(sizeof(T)); *reinterpret_cast(cur_) = little_endian_t; } - template void scratch_push_small(const T &t) - { + template void scratch_push_small(const T &t) { ensure_space(sizeof(T)); *reinterpret_cast(scratch_) = t; scratch_ += sizeof(T); @@ -1065,22 +1045,21 @@ class vector_downward // fill() is most frequently called with small byte counts (<= 4), // which is why we're using loops rather than calling memset. - void fill(size_t zero_pad_bytes) - { + void fill(size_t zero_pad_bytes) { make_space(zero_pad_bytes); - for (size_t i = 0; i < zero_pad_bytes; i++) - cur_[i] = 0; + for (size_t i = 0; i < zero_pad_bytes; i++) cur_[i] = 0; } // Version for when we know the size is larger. // Precondition: zero_pad_bytes > 0 - void fill_big(size_t zero_pad_bytes) { memset(make_space(zero_pad_bytes), 0, zero_pad_bytes); } + void fill_big(size_t zero_pad_bytes) { + memset(make_space(zero_pad_bytes), 0, zero_pad_bytes); + } void pop(size_t bytes_to_remove) { cur_ += bytes_to_remove; } void scratch_pop(size_t bytes_to_remove) { scratch_ -= bytes_to_remove; } - void swap(vector_downward &other) - { + void swap(vector_downward &other) { using std::swap; swap(allocator_, other.allocator_); swap(own_allocator_, other.own_allocator_); @@ -1092,14 +1071,13 @@ class vector_downward swap(scratch_, other.scratch_); } - void swap_allocator(vector_downward &other) - { + void swap_allocator(vector_downward &other) { using std::swap; swap(allocator_, other.allocator_); swap(own_allocator_, other.own_allocator_); } -private: + private: // You shouldn't really be copying instances of this class. FLATBUFFERS_DELETE_FUNC(vector_downward(const vector_downward &)); FLATBUFFERS_DELETE_FUNC(vector_downward &operator=(const vector_downward &)); @@ -1110,23 +1088,20 @@ class vector_downward size_t buffer_minalign_; size_t reserved_; uint8_t *buf_; - uint8_t *cur_; // Points at location between empty (below) and used (above). - uint8_t *scratch_; // Points to the end of the scratchpad in use. + uint8_t *cur_; // Points at location between empty (below) and used (above). + uint8_t *scratch_; // Points to the end of the scratchpad in use. - void reallocate(size_t len) - { + void reallocate(size_t len) { auto old_reserved = reserved_; auto old_size = size(); auto old_scratch_size = scratch_size(); - reserved_ += (std::max)(len, old_reserved ? old_reserved / 2 : initial_size_); + reserved_ += + (std::max)(len, old_reserved ? old_reserved / 2 : initial_size_); reserved_ = (reserved_ + buffer_minalign_ - 1) & ~(buffer_minalign_ - 1); - if (buf_) - { - buf_ = - ReallocateDownward(allocator_, buf_, old_reserved, reserved_, old_size, old_scratch_size); - } - else - { + if (buf_) { + buf_ = ReallocateDownward(allocator_, buf_, old_reserved, reserved_, + old_size, old_scratch_size); + } else { buf_ = Allocate(allocator_, reserved_); } cur_ = buf_ + reserved_ - old_size; @@ -1135,22 +1110,20 @@ class vector_downward }; // Converts a Field ID to a virtual table offset. -inline voffset_t FieldIndexToOffset(voffset_t field_id) -{ +inline voffset_t FieldIndexToOffset(voffset_t field_id) { // Should correspond to what EndTable() below builds up. - const int fixed_fields = 2; // Vtable size and Object Size. + const int fixed_fields = 2; // Vtable size and Object Size. return static_cast((field_id + fixed_fields) * sizeof(voffset_t)); } -template const T *data(const std::vector &v) -{ +template +const T *data(const std::vector &v) { // Eventually the returned pointer gets passed down to memcpy, so // we need it to be non-null to avoid undefined behavior. static uint8_t t; return v.empty() ? reinterpret_cast(&t) : &v.front(); } -template T *data(std::vector &v) -{ +template T *data(std::vector &v) { // Eventually the returned pointer gets passed down to memcpy, so // we need it to be non-null to avoid undefined behavior. static uint8_t t; @@ -1168,9 +1141,8 @@ template T *data(std::vector &v) /// `PushElement`/`AddElement`/`EndTable`, or the builtin `CreateString`/ /// `CreateVector` functions. Do this is depth-first order to build up a tree to /// the root. `Finish()` wraps up the buffer ready for transport. -class FlatBufferBuilder -{ -public: +class FlatBufferBuilder { + public: /// @brief Default constructor for FlatBufferBuilder. /// @param[in] initial_size The initial size of the buffer, in bytes. Defaults /// to `1024`. @@ -1182,47 +1154,60 @@ class FlatBufferBuilder /// minimum alignment upon reallocation. Only needed if you intend to store /// types with custom alignment AND you wish to read the buffer in-place /// directly after creation. - explicit FlatBufferBuilder(size_t initial_size = 1024, Allocator *allocator = nullptr, - bool own_allocator = false, - size_t buffer_minalign = AlignOf()) - : buf_(initial_size, allocator, own_allocator, buffer_minalign), num_field_loc(0), - max_voffset_(0), nested(false), finished(false), minalign_(1), force_defaults_(false), - dedup_vtables_(true), string_pool(nullptr) - { + explicit FlatBufferBuilder( + size_t initial_size = 1024, Allocator *allocator = nullptr, + bool own_allocator = false, + size_t buffer_minalign = AlignOf()) + : buf_(initial_size, allocator, own_allocator, buffer_minalign), + num_field_loc(0), + max_voffset_(0), + nested(false), + finished(false), + minalign_(1), + force_defaults_(false), + dedup_vtables_(true), + string_pool(nullptr) { EndianCheck(); } -/// @brief Move constructor for FlatBufferBuilder. -#if !defined(FLATBUFFERS_CPP98_STL) + // clang-format off + /// @brief Move constructor for FlatBufferBuilder. + #if !defined(FLATBUFFERS_CPP98_STL) FlatBufferBuilder(FlatBufferBuilder &&other) -#else + #else FlatBufferBuilder(FlatBufferBuilder &other) -#endif // #if !defined(FLATBUFFERS_CPP98_STL) - : buf_(1024, nullptr, false, AlignOf()), num_field_loc(0), max_voffset_(0), - nested(false), finished(false), minalign_(1), force_defaults_(false), dedup_vtables_(true), - string_pool(nullptr) - { + #endif // #if !defined(FLATBUFFERS_CPP98_STL) + : buf_(1024, nullptr, false, AlignOf()), + num_field_loc(0), + max_voffset_(0), + nested(false), + finished(false), + minalign_(1), + force_defaults_(false), + dedup_vtables_(true), + string_pool(nullptr) { EndianCheck(); // Default construct and swap idiom. // Lack of delegating constructors in vs2010 makes it more verbose than needed. Swap(other); } + // clang-format on -#if !defined(FLATBUFFERS_CPP98_STL) + // clang-format off + #if !defined(FLATBUFFERS_CPP98_STL) // clang-format on /// @brief Move assignment operator for FlatBufferBuilder. - FlatBufferBuilder &operator=(FlatBufferBuilder &&other) - { + FlatBufferBuilder &operator=(FlatBufferBuilder &&other) { // Move construct a temporary and swap idiom FlatBufferBuilder temp(std::move(other)); Swap(temp); return *this; } -#endif // defined(FLATBUFFERS_CPP98_STL) + // clang-format off + #endif // defined(FLATBUFFERS_CPP98_STL) // clang-format on - void Swap(FlatBufferBuilder &other) - { + void Swap(FlatBufferBuilder &other) { using std::swap; buf_.swap(other.buf_); swap(num_field_loc, other.num_field_loc); @@ -1235,29 +1220,24 @@ class FlatBufferBuilder swap(string_pool, other.string_pool); } - ~FlatBufferBuilder() - { - if (string_pool) - delete string_pool; + ~FlatBufferBuilder() { + if (string_pool) delete string_pool; } - void Reset() - { - Clear(); // clear builder state - buf_.reset(); // deallocate buffer + void Reset() { + Clear(); // clear builder state + buf_.reset(); // deallocate buffer } /// @brief Reset all the state in this FlatBufferBuilder so it can be reused /// to construct another buffer. - void Clear() - { + void Clear() { ClearOffsets(); buf_.clear(); nested = false; finished = false; minalign_ = 1; - if (string_pool) - string_pool->clear(); + if (string_pool) string_pool->clear(); } /// @brief The current size of the serialized buffer, counting from the end. @@ -1267,8 +1247,7 @@ class FlatBufferBuilder /// @brief Get the serialized buffer (after you call `Finish()`). /// @return Returns an `uint8_t` pointer to the FlatBuffer data inside the /// buffer. - uint8_t *GetBufferPointer() const - { + uint8_t *GetBufferPointer() const { Finished(); return buf_.data(); } @@ -1276,8 +1255,7 @@ class FlatBufferBuilder /// @brief Get the serialized buffer (after you call `Finish()`) as a span. /// @return Returns a constructed flatbuffers::span that is a view over the /// FlatBuffer data inside the buffer. - flatbuffers::span GetBufferSpan() const - { + flatbuffers::span GetBufferSpan() const { Finished(); return flatbuffers::span(buf_.data(), buf_.size()); } @@ -1291,16 +1269,14 @@ class FlatBufferBuilder /// @return A `FlatBuffer` that owns the buffer and its allocator and /// behaves similar to a `unique_ptr` with a deleter. FLATBUFFERS_ATTRIBUTE(deprecated("use Release() instead")) - DetachedBuffer ReleaseBufferPointer() - { + DetachedBuffer ReleaseBufferPointer() { Finished(); return buf_.release(); } /// @brief Get the released DetachedBuffer. /// @return A `DetachedBuffer` that owns the buffer and its allocator. - DetachedBuffer Release() - { + DetachedBuffer Release() { Finished(); return buf_.release(); } @@ -1314,8 +1290,7 @@ class FlatBufferBuilder /// the serialized `FlatBuffer`. /// @remark If the allocator is owned, it gets deleted when the destructor is /// called.. - uint8_t *ReleaseRaw(size_t &size, size_t &offset) - { + uint8_t *ReleaseRaw(size_t &size, size_t &offset) { Finished(); return buf_.release_raw(size, offset); } @@ -1325,15 +1300,13 @@ class FlatBufferBuilder /// you call Finish()). You can use this information if you need to embed /// a FlatBuffer in some other buffer, such that you can later read it /// without first having to copy it into its own buffer. - size_t GetBufferMinAlignment() const - { + size_t GetBufferMinAlignment() const { Finished(); return minalign_; } /// @cond FLATBUFFERS_INTERNAL - void Finished() const - { + void Finished() const { // If you get this assert, you're attempting to get access a buffer // which hasn't been finished yet. Be sure to call // FlatBufferBuilder::Finish with your root table. @@ -1357,20 +1330,16 @@ class FlatBufferBuilder /// @cond FLATBUFFERS_INTERNAL void Pad(size_t num_bytes) { buf_.fill(num_bytes); } - void TrackMinAlign(size_t elem_size) - { - if (elem_size > minalign_) - minalign_ = elem_size; + void TrackMinAlign(size_t elem_size) { + if (elem_size > minalign_) minalign_ = elem_size; } - void Align(size_t elem_size) - { + void Align(size_t elem_size) { TrackMinAlign(elem_size); buf_.fill(PaddingBytes(buf_.size(), elem_size)); } - void PushFlatBuffer(const uint8_t *bytes, size_t size) - { + void PushFlatBuffer(const uint8_t *bytes, size_t size) { PushBytes(bytes, size); finished = true; } @@ -1379,15 +1348,13 @@ class FlatBufferBuilder void PopBytes(size_t amount) { buf_.pop(amount); } - template void AssertScalarT() - { + template void AssertScalarT() { // The code assumes power of 2 sizes and endian-swap-ability. static_assert(flatbuffers::is_scalar::value, "T must be a scalar type"); } // Write a single aligned scalar to the buffer - template uoffset_t PushElement(T element) - { + template uoffset_t PushElement(T element) { AssertScalarT(); T litle_endian_element = EndianScalar(element); Align(sizeof(T)); @@ -1395,61 +1362,53 @@ class FlatBufferBuilder return GetSize(); } - template uoffset_t PushElement(Offset off) - { + template uoffset_t PushElement(Offset off) { // Special case for offsets: see ReferTo below. return PushElement(ReferTo(off.o)); } // When writing fields, we track where they are, so we can create correct // vtables later. - void TrackField(voffset_t field, uoffset_t off) - { - FieldLoc fl = {off, field}; + void TrackField(voffset_t field, uoffset_t off) { + FieldLoc fl = { off, field }; buf_.scratch_push_small(fl); num_field_loc++; max_voffset_ = (std::max)(max_voffset_, field); } // Like PushElement, but additionally tracks the field this represents. - template void AddElement(voffset_t field, T e, T def) - { + template void AddElement(voffset_t field, T e, T def) { // We don't serialize values equal to the default. - if (IsTheSameAs(e, def) && !force_defaults_) - return; + if (IsTheSameAs(e, def) && !force_defaults_) return; auto off = PushElement(e); TrackField(field, off); } - template void AddElement(voffset_t field, T e) - { + template void AddElement(voffset_t field, T e) { auto off = PushElement(e); TrackField(field, off); } - template void AddOffset(voffset_t field, Offset off) - { - if (off.IsNull()) - return; // Don't store. + template void AddOffset(voffset_t field, Offset off) { + if (off.IsNull()) return; // Don't store. AddElement(field, ReferTo(off.o), static_cast(0)); } - template void AddStruct(voffset_t field, const T *structptr) - { - if (!structptr) - return; // Default, don't store. + template void AddStruct(voffset_t field, const T *structptr) { + if (!structptr) return; // Default, don't store. Align(AlignOf()); buf_.push_small(*structptr); TrackField(field, GetSize()); } - void AddStructOffset(voffset_t field, uoffset_t off) { TrackField(field, off); } + void AddStructOffset(voffset_t field, uoffset_t off) { + TrackField(field, off); + } // Offsets initially are relative to the end of the buffer (downwards). // This function converts them to be relative to the current location // in the buffer (when stored here), pointing upwards. - uoffset_t ReferTo(uoffset_t off) - { + uoffset_t ReferTo(uoffset_t off) { // Align to ensure GetSize() below is correct. Align(sizeof(uoffset_t)); // Offset must refer to something already in buffer. @@ -1457,8 +1416,7 @@ class FlatBufferBuilder return GetSize() - off + static_cast(sizeof(uoffset_t)); } - void NotNested() - { + void NotNested() { // If you hit this, you're trying to construct a Table/Vector/String // during the construction of its parent table (between the MyTableBuilder // and table.Finish(). @@ -1474,8 +1432,7 @@ class FlatBufferBuilder // From generated code (or from the parser), we call StartTable/EndTable // with a sequence of AddElement calls in between. - uoffset_t StartTable() - { + uoffset_t StartTable() { NotNested(); nested = true; return GetSize(); @@ -1484,8 +1441,7 @@ class FlatBufferBuilder // This finishes one serialized object by generating the vtable if it's a // table, comparing it against existing vtables, and writing the // resulting vtable offset. - uoffset_t EndTable(uoffset_t start) - { + uoffset_t EndTable(uoffset_t start) { // If you get this assert, a corresponding StartTable wasn't called. FLATBUFFERS_ASSERT(nested); // Write the vtable offset, which is the start of any Table. @@ -1497,7 +1453,8 @@ class FlatBufferBuilder // Include space for the last offset and ensure empty tables have a // minimum size. max_voffset_ = - (std::max)(static_cast(max_voffset_ + sizeof(voffset_t)), FieldIndexToOffset(0)); + (std::max)(static_cast(max_voffset_ + sizeof(voffset_t)), + FieldIndexToOffset(0)); buf_.fill_big(max_voffset_); auto table_object_size = vtableoffsetloc - start; // Vtable use 16bit offsets. @@ -1506,13 +1463,13 @@ class FlatBufferBuilder static_cast(table_object_size)); WriteScalar(buf_.data(), max_voffset_); // Write the offsets into the table - for (auto it = buf_.scratch_end() - num_field_loc * sizeof(FieldLoc); it < buf_.scratch_end(); - it += sizeof(FieldLoc)) - { + for (auto it = buf_.scratch_end() - num_field_loc * sizeof(FieldLoc); + it < buf_.scratch_end(); it += sizeof(FieldLoc)) { auto field_location = reinterpret_cast(it); auto pos = static_cast(vtableoffsetloc - field_location->off); // If this asserts, it means you've set a field twice. - FLATBUFFERS_ASSERT(!ReadScalar(buf_.data() + field_location->id)); + FLATBUFFERS_ASSERT( + !ReadScalar(buf_.data() + field_location->id)); WriteScalar(buf_.data() + field_location->id, pos); } ClearOffsets(); @@ -1521,54 +1478,50 @@ class FlatBufferBuilder auto vt_use = GetSize(); // See if we already have generated a vtable with this exact same // layout before. If so, make it point to the old one, remove this one. - if (dedup_vtables_) - { - for (auto it = buf_.scratch_data(); it < buf_.scratch_end(); it += sizeof(uoffset_t)) - { + if (dedup_vtables_) { + for (auto it = buf_.scratch_data(); it < buf_.scratch_end(); + it += sizeof(uoffset_t)) { auto vt_offset_ptr = reinterpret_cast(it); auto vt2 = reinterpret_cast(buf_.data_at(*vt_offset_ptr)); auto vt2_size = ReadScalar(vt2); - if (vt1_size != vt2_size || 0 != memcmp(vt2, vt1, vt1_size)) - continue; + if (vt1_size != vt2_size || 0 != memcmp(vt2, vt1, vt1_size)) continue; vt_use = *vt_offset_ptr; buf_.pop(GetSize() - vtableoffsetloc); break; } } // If this is a new vtable, remember it. - if (vt_use == GetSize()) - { - buf_.scratch_push_small(vt_use); - } + if (vt_use == GetSize()) { buf_.scratch_push_small(vt_use); } // Fill the vtable offset we created above. // The offset points from the beginning of the object to where the // vtable is stored. // Offsets default direction is downward in memory for future format // flexibility (storing all vtables at the start of the file). WriteScalar(buf_.data_at(vtableoffsetloc), - static_cast(vt_use) - static_cast(vtableoffsetloc)); + static_cast(vt_use) - + static_cast(vtableoffsetloc)); nested = false; return vtableoffsetloc; } FLATBUFFERS_ATTRIBUTE(deprecated("call the version above instead")) - uoffset_t EndTable(uoffset_t start, voffset_t /*numfields*/) { return EndTable(start); } + uoffset_t EndTable(uoffset_t start, voffset_t /*numfields*/) { + return EndTable(start); + } // This checks a required field has been set in a given table that has // just been constructed. - template void Required(Offset table, voffset_t field); + template void Required(Offset table, voffset_t field); - uoffset_t StartStruct(size_t alignment) - { + uoffset_t StartStruct(size_t alignment) { Align(alignment); return GetSize(); } uoffset_t EndStruct() { return GetSize(); } - void ClearOffsets() - { + void ClearOffsets() { buf_.scratch_pop(num_field_loc * sizeof(FieldLoc)); num_field_loc = 0; max_voffset_ = 0; @@ -1576,13 +1529,11 @@ class FlatBufferBuilder // Aligns such that when "len" bytes are written, an object can be written // after it with "alignment" without padding. - void PreAlign(size_t len, size_t alignment) - { + void PreAlign(size_t len, size_t alignment) { TrackMinAlign(alignment); buf_.fill(PaddingBytes(GetSize() + len, alignment)); } - template void PreAlign(size_t len) - { + template void PreAlign(size_t len) { AssertScalarT(); PreAlign(len, sizeof(T)); } @@ -1592,10 +1543,9 @@ class FlatBufferBuilder /// @param[in] str A const char pointer to the data to be stored as a string. /// @param[in] len The number of bytes that should be stored from `str`. /// @return Returns the offset in the buffer where the string starts. - Offset CreateString(const char *str, size_t len) - { + Offset CreateString(const char *str, size_t len) { NotNested(); - PreAlign(len + 1); // Always 0-terminated. + PreAlign(len + 1); // Always 0-terminated. buf_.fill(1); PushBytes(reinterpret_cast(str), len); PushElement(static_cast(len)); @@ -1605,36 +1555,39 @@ class FlatBufferBuilder /// @brief Store a string in the buffer, which is null-terminated. /// @param[in] str A const char pointer to a C-string to add to the buffer. /// @return Returns the offset in the buffer where the string starts. - Offset CreateString(const char *str) { return CreateString(str, strlen(str)); } + Offset CreateString(const char *str) { + return CreateString(str, strlen(str)); + } /// @brief Store a string in the buffer, which is null-terminated. /// @param[in] str A char pointer to a C-string to add to the buffer. /// @return Returns the offset in the buffer where the string starts. - Offset CreateString(char *str) { return CreateString(str, strlen(str)); } + Offset CreateString(char *str) { + return CreateString(str, strlen(str)); + } /// @brief Store a string in the buffer, which can contain any binary data. /// @param[in] str A const reference to a std::string to store in the buffer. /// @return Returns the offset in the buffer where the string starts. - Offset CreateString(const std::string &str) - { + Offset CreateString(const std::string &str) { return CreateString(str.c_str(), str.length()); } -#ifdef FLATBUFFERS_HAS_STRING_VIEW + + // clang-format off + #ifdef FLATBUFFERS_HAS_STRING_VIEW /// @brief Store a string in the buffer, which can contain any binary data. /// @param[in] str A const string_view to copy in to the buffer. /// @return Returns the offset in the buffer where the string starts. - Offset CreateString(flatbuffers::string_view str) - { + Offset CreateString(flatbuffers::string_view str) { return CreateString(str.data(), str.size()); } -#endif // FLATBUFFERS_HAS_STRING_VIEW + #endif // FLATBUFFERS_HAS_STRING_VIEW // clang-format on /// @brief Store a string in the buffer, which can contain any binary data. /// @param[in] str A const pointer to a `String` struct to add to the buffer. /// @return Returns the offset in the buffer where the string starts - Offset CreateString(const String *str) - { + Offset CreateString(const String *str) { return str ? CreateString(str->c_str(), str->size()) : 0; } @@ -1642,8 +1595,7 @@ class FlatBufferBuilder /// @param[in] str A const reference to a std::string like type with support /// of T::c_str() and T::length() to store in the buffer. /// @return Returns the offset in the buffer where the string starts. - template Offset CreateString(const T &str) - { + template Offset CreateString(const T &str) { return CreateString(str.c_str(), str.length()); } @@ -1653,8 +1605,7 @@ class FlatBufferBuilder /// @param[in] str A const char pointer to the data to be stored as a string. /// @param[in] len The number of bytes that should be stored from `str`. /// @return Returns the offset in the buffer where the string starts. - Offset CreateSharedString(const char *str, size_t len) - { + Offset CreateSharedString(const char *str, size_t len) { if (!string_pool) string_pool = new StringOffsetMap(StringOffsetCompare(buf_)); auto size_before_string = buf_.size(); @@ -1663,8 +1614,7 @@ class FlatBufferBuilder auto off = CreateString(str, len); auto it = string_pool->find(off); // If it exists we reuse existing serialized data! - if (it != string_pool->end()) - { + if (it != string_pool->end()) { // We can remove the string we serialized. buf_.pop(buf_.size() - size_before_string); return *it; @@ -1680,8 +1630,7 @@ class FlatBufferBuilder /// instead simply returns the offset of the existing string. /// @param[in] str A const std::string_view to store in the buffer. /// @return Returns the offset in the buffer where the string starts - Offset CreateSharedString(const flatbuffers::string_view str) - { + Offset CreateSharedString(const flatbuffers::string_view str) { return CreateSharedString(str.data(), str.size()); } #else @@ -1690,8 +1639,7 @@ class FlatBufferBuilder /// instead simply returns the offset of the existing string. /// @param[in] str A const char pointer to a C-string to add to the buffer. /// @return Returns the offset in the buffer where the string starts. - Offset CreateSharedString(const char *str) - { + Offset CreateSharedString(const char *str) { return CreateSharedString(str, strlen(str)); } @@ -1700,8 +1648,7 @@ class FlatBufferBuilder /// instead simply returns the offset of the existing string. /// @param[in] str A const reference to a std::string to store in the buffer. /// @return Returns the offset in the buffer where the string starts. - Offset CreateSharedString(const std::string &str) - { + Offset CreateSharedString(const std::string &str) { return CreateSharedString(str.c_str(), str.length()); } #endif @@ -1711,25 +1658,22 @@ class FlatBufferBuilder /// instead simply returns the offset of the existing string. /// @param[in] str A const pointer to a `String` struct to add to the buffer. /// @return Returns the offset in the buffer where the string starts - Offset CreateSharedString(const String *str) - { + Offset CreateSharedString(const String *str) { return CreateSharedString(str->c_str(), str->size()); } /// @cond FLATBUFFERS_INTERNAL - uoffset_t EndVector(size_t len) - { - FLATBUFFERS_ASSERT(nested); // Hit if no corresponding StartVector. + uoffset_t EndVector(size_t len) { + FLATBUFFERS_ASSERT(nested); // Hit if no corresponding StartVector. nested = false; return PushElement(static_cast(len)); } - void StartVector(size_t len, size_t elemsize) - { + void StartVector(size_t len, size_t elemsize) { NotNested(); nested = true; PreAlign(len * elemsize); - PreAlign(len * elemsize, elemsize); // Just in case elemsize > uoffset_t. + PreAlign(len * elemsize, elemsize); // Just in case elemsize > uoffset_t. } // Call this right before StartVector/CreateVector if you want to force the @@ -1737,15 +1681,13 @@ class FlatBufferBuilder // normally dictate. // This is useful when storing a nested_flatbuffer in a vector of bytes, // or when storing SIMD floats, etc. - void ForceVectorAlignment(size_t len, size_t elemsize, size_t alignment) - { + void ForceVectorAlignment(size_t len, size_t elemsize, size_t alignment) { FLATBUFFERS_ASSERT(VerifyAlignmentRequirements(alignment)); PreAlign(len * elemsize, alignment); } // Similar to ForceVectorAlignment but for String fields. - void ForceStringAlignment(size_t len, size_t alignment) - { + void ForceStringAlignment(size_t len, size_t alignment) { FLATBUFFERS_ASSERT(VerifyAlignmentRequirements(alignment)); PreAlign((len + 1) * sizeof(char), alignment); } @@ -1759,43 +1701,32 @@ class FlatBufferBuilder /// @param[in] len The number of elements to serialize. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template Offset> CreateVector(const T *v, size_t len) - { + template Offset> CreateVector(const T *v, size_t len) { // If this assert hits, you're specifying a template argument that is // causing the wrong overload to be selected, remove it. AssertScalarT(); StartVector(len, sizeof(T)); - if (len == 0) - { - return Offset>(EndVector(len)); - } - -#if FLATBUFFERS_LITTLEENDIAN - PushBytes(reinterpret_cast(v), len * sizeof(T)); -#else - if (sizeof(T) == 1) - { - PushBytes(reinterpret_cast(v), len); - } - else - { - for (auto i = len; i > 0;) - { - PushElement(v[--i]); + if (len == 0) { return Offset>(EndVector(len)); } + // clang-format off + #if FLATBUFFERS_LITTLEENDIAN + PushBytes(reinterpret_cast(v), len * sizeof(T)); + #else + if (sizeof(T) == 1) { + PushBytes(reinterpret_cast(v), len); + } else { + for (auto i = len; i > 0; ) { + PushElement(v[--i]); + } } - } -#endif + #endif // clang-format on return Offset>(EndVector(len)); } - template Offset>> CreateVector(const Offset *v, size_t len) - { + template + Offset>> CreateVector(const Offset *v, size_t len) { StartVector(len, sizeof(Offset)); - for (auto i = len; i > 0;) - { - PushElement(v[--i]); - } + for (auto i = len; i > 0;) { PushElement(v[--i]); } return Offset>>(EndVector(len)); } @@ -1805,25 +1736,23 @@ class FlatBufferBuilder /// buffer as a `vector`. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template Offset> CreateVector(const std::vector &v) - { + template Offset> CreateVector(const std::vector &v) { return CreateVector(data(v), v.size()); } // vector may be implemented using a bit-set, so we can't access it as // an array. Instead, read elements manually. // Background: https://isocpp.org/blog/2012/11/on-vectorbool - Offset> CreateVector(const std::vector &v) - { + Offset> CreateVector(const std::vector &v) { StartVector(v.size(), sizeof(uint8_t)); - for (auto i = v.size(); i > 0;) - { + for (auto i = v.size(); i > 0;) { PushElement(static_cast(v[--i])); } return Offset>(EndVector(v.size())); } -#ifndef FLATBUFFERS_CPP98_STL + // clang-format off + #ifndef FLATBUFFERS_CPP98_STL /// @brief Serialize values returned by a function into a FlatBuffer `vector`. /// This is a convenience function that takes care of iteration for you. /// @tparam T The data type of the `std::vector` elements. @@ -1831,15 +1760,13 @@ class FlatBufferBuilder /// returns any type that you can construct a FlatBuffers vector out of. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset> CreateVector(size_t vector_size, const std::function &f) - { + template Offset> CreateVector(size_t vector_size, + const std::function &f) { std::vector elems(vector_size); - for (size_t i = 0; i < vector_size; i++) - elems[i] = f(i); + for (size_t i = 0; i < vector_size; i++) elems[i] = f(i); return CreateVector(elems); } -#endif + #endif // clang-format on /// @brief Serialize values returned by a function into a FlatBuffer `vector`. @@ -1851,12 +1778,10 @@ class FlatBufferBuilder /// @param state State passed to f. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset> CreateVector(size_t vector_size, F f, S *state) - { + template + Offset> CreateVector(size_t vector_size, F f, S *state) { std::vector elems(vector_size); - for (size_t i = 0; i < vector_size; i++) - elems[i] = f(i, state); + for (size_t i = 0; i < vector_size; i++) elems[i] = f(i, state); return CreateVector(elems); } @@ -1866,11 +1791,10 @@ class FlatBufferBuilder /// buffer as a `vector`. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - Offset>> CreateVectorOfStrings(const std::vector &v) - { + Offset>> CreateVectorOfStrings( + const std::vector &v) { std::vector> offsets(v.size()); - for (size_t i = 0; i < v.size(); i++) - offsets[i] = CreateString(v[i]); + for (size_t i = 0; i < v.size(); i++) offsets[i] = CreateString(v[i]); return CreateVector(offsets); } @@ -1881,8 +1805,8 @@ class FlatBufferBuilder /// @param[in] len The number of elements to serialize. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template Offset> CreateVectorOfStructs(const T *v, size_t len) - { + template + Offset> CreateVectorOfStructs(const T *v, size_t len) { StartVector(len * sizeof(T) / AlignOf(), AlignOf()); PushBytes(reinterpret_cast(v), sizeof(T) * len); return Offset>(EndVector(len)); @@ -1898,10 +1822,9 @@ class FlatBufferBuilder /// to the FlatBuffer struct. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset> CreateVectorOfNativeStructs(const S *v, size_t len, - T((*const pack_func)(const S &))) - { + template + Offset> CreateVectorOfNativeStructs( + const S *v, size_t len, T((*const pack_func)(const S &))) { FLATBUFFERS_ASSERT(pack_func); std::vector vv(len); std::transform(v, v + len, vv.begin(), pack_func); @@ -1916,14 +1839,15 @@ class FlatBufferBuilder /// @param[in] len The number of elements to serialize. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset> CreateVectorOfNativeStructs(const S *v, size_t len) - { + template + Offset> CreateVectorOfNativeStructs(const S *v, + size_t len) { extern T Pack(const S &); return CreateVectorOfNativeStructs(v, len, Pack); } -#ifndef FLATBUFFERS_CPP98_STL + // clang-format off + #ifndef FLATBUFFERS_CPP98_STL /// @brief Serialize an array of structs into a FlatBuffer `vector`. /// @tparam T The data type of the struct array elements. /// @param[in] filler A function that takes the current iteration 0..vector_size-1 @@ -1932,19 +1856,16 @@ class FlatBufferBuilder /// where the vector is stored. /// This is mostly useful when flatbuffers are generated with mutation /// accessors. - template - Offset> CreateVectorOfStructs(size_t vector_size, - const std::function &filler) - { - T *structs = StartVectorOfStructs(vector_size); - for (size_t i = 0; i < vector_size; i++) - { + template Offset> CreateVectorOfStructs( + size_t vector_size, const std::function &filler) { + T* structs = StartVectorOfStructs(vector_size); + for (size_t i = 0; i < vector_size; i++) { filler(i, structs); structs++; } return EndVectorOfStructs(vector_size); } -#endif + #endif // clang-format on /// @brief Serialize an array of structs into a FlatBuffer `vector`. @@ -1956,12 +1877,11 @@ class FlatBufferBuilder /// where the vector is stored. /// This is mostly useful when flatbuffers are generated with mutation /// accessors. - template - Offset> CreateVectorOfStructs(size_t vector_size, F f, S *state) - { + template + Offset> CreateVectorOfStructs(size_t vector_size, F f, + S *state) { T *structs = StartVectorOfStructs(vector_size); - for (size_t i = 0; i < vector_size; i++) - { + for (size_t i = 0; i < vector_size; i++) { f(i, structs, state); structs++; } @@ -1974,9 +1894,9 @@ class FlatBufferBuilder /// serialize into the buffer as a `vector`. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset> CreateVectorOfStructs(const std::vector &v) - { + template + Offset> CreateVectorOfStructs( + const std::vector &v) { return CreateVectorOfStructs(data(v), v.size()); } @@ -1990,10 +1910,9 @@ class FlatBufferBuilder /// to the FlatBuffer struct. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset> CreateVectorOfNativeStructs(const std::vector &v, - T((*const pack_func)(const S &))) - { + template + Offset> CreateVectorOfNativeStructs( + const std::vector &v, T((*const pack_func)(const S &))) { return CreateVectorOfNativeStructs(data(v), v.size(), pack_func); } @@ -2005,18 +1924,20 @@ class FlatBufferBuilder /// serialize into the buffer as a `vector`. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset> CreateVectorOfNativeStructs(const std::vector &v) - { + template + Offset> CreateVectorOfNativeStructs( + const std::vector &v) { return CreateVectorOfNativeStructs(data(v), v.size()); } /// @cond FLATBUFFERS_INTERNAL - template struct StructKeyComparator - { - bool operator()(const T &a, const T &b) const { return a.KeyCompareLessThan(&b); } + template struct StructKeyComparator { + bool operator()(const T &a, const T &b) const { + return a.KeyCompareLessThan(&b); + } - FLATBUFFERS_DELETE_FUNC(StructKeyComparator &operator=(const StructKeyComparator &)); + FLATBUFFERS_DELETE_FUNC( + StructKeyComparator &operator=(const StructKeyComparator &)); }; /// @endcond @@ -2027,8 +1948,8 @@ class FlatBufferBuilder /// serialize into the buffer as a `vector`. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template Offset> CreateVectorOfSortedStructs(std::vector *v) - { + template + Offset> CreateVectorOfSortedStructs(std::vector *v) { return CreateVectorOfSortedStructs(data(*v), v->size()); } @@ -2040,9 +1961,9 @@ class FlatBufferBuilder /// serialize into the buffer as a `vector`. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset> CreateVectorOfSortedNativeStructs(std::vector *v) - { + template + Offset> CreateVectorOfSortedNativeStructs( + std::vector *v) { return CreateVectorOfSortedNativeStructs(data(*v), v->size()); } @@ -2054,8 +1975,8 @@ class FlatBufferBuilder /// @param[in] len The number of elements to serialize. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template Offset> CreateVectorOfSortedStructs(T *v, size_t len) - { + template + Offset> CreateVectorOfSortedStructs(T *v, size_t len) { std::sort(v, v + len, StructKeyComparator()); return CreateVectorOfStructs(v, len); } @@ -2069,9 +1990,9 @@ class FlatBufferBuilder /// @param[in] len The number of elements to serialize. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset> CreateVectorOfSortedNativeStructs(S *v, size_t len) - { + template + Offset> CreateVectorOfSortedNativeStructs(S *v, + size_t len) { extern T Pack(const S &); typedef T (*Pack_t)(const S &); std::vector vv(len); @@ -2080,20 +2001,19 @@ class FlatBufferBuilder } /// @cond FLATBUFFERS_INTERNAL - template struct TableKeyComparator - { + template struct TableKeyComparator { TableKeyComparator(vector_downward &buf) : buf_(buf) {} TableKeyComparator(const TableKeyComparator &other) : buf_(other.buf_) {} - bool operator()(const Offset &a, const Offset &b) const - { + bool operator()(const Offset &a, const Offset &b) const { auto table_a = reinterpret_cast(buf_.data_at(a.o)); auto table_b = reinterpret_cast(buf_.data_at(b.o)); return table_a->KeyCompareLessThan(table_b); } vector_downward &buf_; - private: - FLATBUFFERS_DELETE_FUNC(TableKeyComparator &operator=(const TableKeyComparator &other)); + private: + FLATBUFFERS_DELETE_FUNC( + TableKeyComparator &operator=(const TableKeyComparator &other)); }; /// @endcond @@ -2105,9 +2025,9 @@ class FlatBufferBuilder /// @param[in] len The number of elements to store in the `vector`. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset>> CreateVectorOfSortedTables(Offset *v, size_t len) - { + template + Offset>> CreateVectorOfSortedTables(Offset *v, + size_t len) { std::sort(v, v + len, TableKeyComparator(buf_)); return CreateVector(v, len); } @@ -2119,9 +2039,9 @@ class FlatBufferBuilder /// offsets to store in the buffer in sorted order. /// @return Returns a typed `Offset` into the serialized data indicating /// where the vector is stored. - template - Offset>> CreateVectorOfSortedTables(std::vector> *v) - { + template + Offset>> CreateVectorOfSortedTables( + std::vector> *v) { return CreateVectorOfSortedTables(data(*v), v->size()); } @@ -2132,8 +2052,8 @@ class FlatBufferBuilder /// @param[out] buf A pointer to a `uint8_t` pointer that can be /// written to at a later time to serialize the data into a `vector` /// in the buffer. - uoffset_t CreateUninitializedVector(size_t len, size_t elemsize, uint8_t **buf) - { + uoffset_t CreateUninitializedVector(size_t len, size_t elemsize, + uint8_t **buf) { NotNested(); StartVector(len, elemsize); buf_.make_space(len * elemsize); @@ -2151,36 +2071,34 @@ class FlatBufferBuilder /// @param[out] buf A pointer to a pointer of type `T` that can be /// written to at a later time to serialize the data into a `vector` /// in the buffer. - template Offset> CreateUninitializedVector(size_t len, T **buf) - { + template + Offset> CreateUninitializedVector(size_t len, T **buf) { AssertScalarT(); - return CreateUninitializedVector(len, sizeof(T), reinterpret_cast(buf)); + return CreateUninitializedVector(len, sizeof(T), + reinterpret_cast(buf)); } - template - Offset> CreateUninitializedVectorOfStructs(size_t len, T **buf) - { - return CreateUninitializedVector(len, sizeof(T), reinterpret_cast(buf)); + template + Offset> CreateUninitializedVectorOfStructs(size_t len, + T **buf) { + return CreateUninitializedVector(len, sizeof(T), + reinterpret_cast(buf)); } // @brief Create a vector of scalar type T given as input a vector of scalar // type U, useful with e.g. pre "enum class" enums, or any existing scalar // data of the wrong type. - template Offset> CreateVectorScalarCast(const U *v, size_t len) - { + template + Offset> CreateVectorScalarCast(const U *v, size_t len) { AssertScalarT(); AssertScalarT(); StartVector(len, sizeof(T)); - for (auto i = len; i > 0;) - { - PushElement(static_cast(v[--i])); - } + for (auto i = len; i > 0;) { PushElement(static_cast(v[--i])); } return Offset>(EndVector(len)); } /// @brief Write a struct by itself, typically to be part of a union. - template Offset CreateStruct(const T &structobj) - { + template Offset CreateStruct(const T &structobj) { NotNested(); Align(AlignOf()); buf_.push_small(structobj); @@ -2193,8 +2111,8 @@ class FlatBufferBuilder /// @brief Finish serializing a buffer by writing the root offset. /// @param[in] file_identifier If a `file_identifier` is given, the buffer /// will be prefixed with a standard FlatBuffers file header. - template void Finish(Offset root, const char *file_identifier = nullptr) - { + template + void Finish(Offset root, const char *file_identifier = nullptr) { Finish(root.o, file_identifier, false); } @@ -2205,42 +2123,39 @@ class FlatBufferBuilder /// All >32 bit quantities in this buffer will be aligned when the whole /// size pre-fixed buffer is aligned. /// These kinds of buffers are useful for creating a stream of FlatBuffers. - template - void FinishSizePrefixed(Offset root, const char *file_identifier = nullptr) - { + template + void FinishSizePrefixed(Offset root, + const char *file_identifier = nullptr) { Finish(root.o, file_identifier, true); } - void SwapBufAllocator(FlatBufferBuilder &other) { buf_.swap_allocator(other.buf_); } + void SwapBufAllocator(FlatBufferBuilder &other) { + buf_.swap_allocator(other.buf_); + } -protected: + protected: // You shouldn't really be copying instances of this class. FlatBufferBuilder(const FlatBufferBuilder &); FlatBufferBuilder &operator=(const FlatBufferBuilder &); - void Finish(uoffset_t root, const char *file_identifier, bool size_prefix) - { + void Finish(uoffset_t root, const char *file_identifier, bool size_prefix) { NotNested(); buf_.clear_scratch(); // This will cause the whole buffer to be aligned. PreAlign((size_prefix ? sizeof(uoffset_t) : 0) + sizeof(uoffset_t) + - (file_identifier ? kFileIdentifierLength : 0), + (file_identifier ? kFileIdentifierLength : 0), minalign_); - if (file_identifier) - { + if (file_identifier) { FLATBUFFERS_ASSERT(strlen(file_identifier) == kFileIdentifierLength); - PushBytes(reinterpret_cast(file_identifier), kFileIdentifierLength); - } - PushElement(ReferTo(root)); // Location of root. - if (size_prefix) - { - PushElement(GetSize()); + PushBytes(reinterpret_cast(file_identifier), + kFileIdentifierLength); } + PushElement(ReferTo(root)); // Location of root. + if (size_prefix) { PushElement(GetSize()); } finished = true; } - struct FieldLoc - { + struct FieldLoc { uoffset_t off; voffset_t id; }; @@ -2262,18 +2177,17 @@ class FlatBufferBuilder size_t minalign_; - bool force_defaults_; // Serialize values equal to their defaults anyway. + bool force_defaults_; // Serialize values equal to their defaults anyway. bool dedup_vtables_; - struct StringOffsetCompare - { + struct StringOffsetCompare { StringOffsetCompare(const vector_downward &buf) : buf_(&buf) {} - bool operator()(const Offset &a, const Offset &b) const - { + bool operator()(const Offset &a, const Offset &b) const { auto stra = reinterpret_cast(buf_->data_at(a.o)); auto strb = reinterpret_cast(buf_->data_at(b.o)); - return StringLessThan(stra->data(), stra->size(), strb->data(), strb->size()); + return StringLessThan(stra->data(), stra->size(), strb->data(), + strb->size()); } const vector_downward *buf_; }; @@ -2282,19 +2196,18 @@ class FlatBufferBuilder typedef std::set, StringOffsetCompare> StringOffsetMap; StringOffsetMap *string_pool; -private: + private: // Allocates space for a vector of structures. // Must be completed with EndVectorOfStructs(). - template T *StartVectorOfStructs(size_t vector_size) - { + template T *StartVectorOfStructs(size_t vector_size) { StartVector(vector_size * sizeof(T) / AlignOf(), AlignOf()); return reinterpret_cast(buf_.make_space(vector_size * sizeof(T))); } // End the vector of structues in the flatbuffers. // Vector should have previously be started with StartVectorOfStructs(). - template Offset> EndVectorOfStructs(size_t vector_size) - { + template + Offset> EndVectorOfStructs(size_t vector_size) { return Offset>(EndVector(vector_size)); } }; @@ -2302,33 +2215,32 @@ class FlatBufferBuilder /// @cond FLATBUFFERS_INTERNAL // Helpers to get a typed pointer to the root object contained in the buffer. -template T *GetMutableRoot(void *buf) -{ +template T *GetMutableRoot(void *buf) { EndianCheck(); - return reinterpret_cast(reinterpret_cast(buf) + - EndianScalar(*reinterpret_cast(buf))); + return reinterpret_cast( + reinterpret_cast(buf) + + EndianScalar(*reinterpret_cast(buf))); } -template const T *GetRoot(const void *buf) -{ +template const T *GetRoot(const void *buf) { return GetMutableRoot(const_cast(buf)); } -template const T *GetSizePrefixedRoot(const void *buf) -{ +template const T *GetSizePrefixedRoot(const void *buf) { return GetRoot(reinterpret_cast(buf) + sizeof(uoffset_t)); } /// Helpers to get a typed pointer to objects that are currently being built. /// @warning Creating new objects will lead to reallocations and invalidates /// the pointer! -template T *GetMutableTemporaryPointer(FlatBufferBuilder &fbb, Offset offset) -{ - return reinterpret_cast(fbb.GetCurrentBufferPointer() + fbb.GetSize() - offset.o); +template +T *GetMutableTemporaryPointer(FlatBufferBuilder &fbb, Offset offset) { + return reinterpret_cast(fbb.GetCurrentBufferPointer() + fbb.GetSize() - + offset.o); } -template const T *GetTemporaryPointer(FlatBufferBuilder &fbb, Offset offset) -{ +template +const T *GetTemporaryPointer(FlatBufferBuilder &fbb, Offset offset) { return GetMutableTemporaryPointer(fbb, offset); } @@ -2339,162 +2251,152 @@ template const T *GetTemporaryPointer(FlatBufferBuilder &fbb, Offse /// This function is UNDEFINED for FlatBuffers whose schema does not include /// a file_identifier (likely points at padding or the start of a the root /// vtable). -inline const char *GetBufferIdentifier(const void *buf, bool size_prefixed = false) -{ +inline const char *GetBufferIdentifier(const void *buf, + bool size_prefixed = false) { return reinterpret_cast(buf) + ((size_prefixed) ? 2 * sizeof(uoffset_t) : sizeof(uoffset_t)); } // Helper to see if the identifier in a buffer has the expected value. -inline bool BufferHasIdentifier(const void *buf, const char *identifier, bool size_prefixed = false) -{ +inline bool BufferHasIdentifier(const void *buf, const char *identifier, + bool size_prefixed = false) { return strncmp(GetBufferIdentifier(buf, size_prefixed), identifier, FlatBufferBuilder::kFileIdentifierLength) == 0; } // Helper class to verify the integrity of a FlatBuffer -class Verifier FLATBUFFERS_FINAL_CLASS -{ -public: +class Verifier FLATBUFFERS_FINAL_CLASS { + public: Verifier(const uint8_t *buf, size_t buf_len, uoffset_t _max_depth = 64, uoffset_t _max_tables = 1000000, bool _check_alignment = true) - : buf_(buf), size_(buf_len), depth_(0), max_depth_(_max_depth), num_tables_(0), - max_tables_(_max_tables), upper_bound_(0), check_alignment_(_check_alignment) - { + : buf_(buf), + size_(buf_len), + depth_(0), + max_depth_(_max_depth), + num_tables_(0), + max_tables_(_max_tables), + upper_bound_(0), + check_alignment_(_check_alignment) { FLATBUFFERS_ASSERT(size_ < FLATBUFFERS_MAX_BUFFER_SIZE); } // Central location where any verification failures register. - bool Check(bool ok) const - { -#ifdef FLATBUFFERS_DEBUG_VERIFICATION_FAILURE - FLATBUFFERS_ASSERT(ok); -#endif -#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE - if (!ok) - upper_bound_ = 0; -#endif + bool Check(bool ok) const { + // clang-format off + #ifdef FLATBUFFERS_DEBUG_VERIFICATION_FAILURE + FLATBUFFERS_ASSERT(ok); + #endif + #ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE + if (!ok) + upper_bound_ = 0; + #endif // clang-format on return ok; } // Verify any range within the buffer. - bool Verify(size_t elem, size_t elem_len) const - { -#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE - auto upper_bound = elem + elem_len; - if (upper_bound_ < upper_bound) - upper_bound_ = upper_bound; -#endif + bool Verify(size_t elem, size_t elem_len) const { + // clang-format off + #ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE + auto upper_bound = elem + elem_len; + if (upper_bound_ < upper_bound) + upper_bound_ = upper_bound; + #endif // clang-format on return Check(elem_len < size_ && elem <= size_ - elem_len); } - template bool VerifyAlignment(size_t elem) const - { + template bool VerifyAlignment(size_t elem) const { return Check((elem & (sizeof(T) - 1)) == 0 || !check_alignment_); } // Verify a range indicated by sizeof(T). - template bool Verify(size_t elem) const - { + template bool Verify(size_t elem) const { return VerifyAlignment(elem) && Verify(elem, sizeof(T)); } - bool VerifyFromPointer(const uint8_t *p, size_t len) - { + bool VerifyFromPointer(const uint8_t *p, size_t len) { auto o = static_cast(p - buf_); return Verify(o, len); } // Verify relative to a known-good base pointer. - bool Verify(const uint8_t *base, voffset_t elem_off, size_t elem_len) const - { + bool Verify(const uint8_t *base, voffset_t elem_off, size_t elem_len) const { return Verify(static_cast(base - buf_) + elem_off, elem_len); } - template bool Verify(const uint8_t *base, voffset_t elem_off) const - { + template + bool Verify(const uint8_t *base, voffset_t elem_off) const { return Verify(static_cast(base - buf_) + elem_off, sizeof(T)); } // Verify a pointer (may be NULL) of a table type. - template bool VerifyTable(const T *table) { return !table || table->Verify(*this); } + template bool VerifyTable(const T *table) { + return !table || table->Verify(*this); + } // Verify a pointer (may be NULL) of any vector type. - template bool VerifyVector(const Vector *vec) const - { - return !vec || VerifyVectorOrString(reinterpret_cast(vec), sizeof(T)); + template bool VerifyVector(const Vector *vec) const { + return !vec || VerifyVectorOrString(reinterpret_cast(vec), + sizeof(T)); } // Verify a pointer (may be NULL) of a vector to struct. - template bool VerifyVector(const Vector *vec) const - { + template bool VerifyVector(const Vector *vec) const { return VerifyVector(reinterpret_cast *>(vec)); } // Verify a pointer (may be NULL) to string. - bool VerifyString(const String *str) const - { + bool VerifyString(const String *str) const { size_t end; - return !str || (VerifyVectorOrString(reinterpret_cast(str), 1, &end) && - Verify(end, 1) && // Must have terminator - Check(buf_[end] == '\0')); // Terminating byte must be 0. + return !str || (VerifyVectorOrString(reinterpret_cast(str), + 1, &end) && + Verify(end, 1) && // Must have terminator + Check(buf_[end] == '\0')); // Terminating byte must be 0. } // Common code between vectors and strings. - bool VerifyVectorOrString(const uint8_t *vec, size_t elem_size, size_t *end = nullptr) const - { + bool VerifyVectorOrString(const uint8_t *vec, size_t elem_size, + size_t *end = nullptr) const { auto veco = static_cast(vec - buf_); // Check we can read the size field. - if (!Verify(veco)) - return false; + if (!Verify(veco)) return false; // Check the whole array. If this is a string, the byte past the array // must be 0. auto size = ReadScalar(vec); auto max_elems = FLATBUFFERS_MAX_BUFFER_SIZE / elem_size; if (!Check(size < max_elems)) - return false; // Protect against byte_size overflowing. + return false; // Protect against byte_size overflowing. auto byte_size = sizeof(size) + elem_size * size; - if (end) - *end = veco + byte_size; + if (end) *end = veco + byte_size; return Verify(veco, byte_size); } // Special case for string contents, after the above has been called. - bool VerifyVectorOfStrings(const Vector> *vec) const - { - if (vec) - { - for (uoffset_t i = 0; i < vec->size(); i++) - { - if (!VerifyString(vec->Get(i))) - return false; + bool VerifyVectorOfStrings(const Vector> *vec) const { + if (vec) { + for (uoffset_t i = 0; i < vec->size(); i++) { + if (!VerifyString(vec->Get(i))) return false; } } return true; } // Special case for table contents, after the above has been called. - template bool VerifyVectorOfTables(const Vector> *vec) - { - if (vec) - { - for (uoffset_t i = 0; i < vec->size(); i++) - { - if (!vec->Get(i)->Verify(*this)) - return false; + template bool VerifyVectorOfTables(const Vector> *vec) { + if (vec) { + for (uoffset_t i = 0; i < vec->size(); i++) { + if (!vec->Get(i)->Verify(*this)) return false; } } return true; } - __supress_ubsan__("unsigned-integer-overflow") bool VerifyTableStart(const uint8_t *table) - { + __supress_ubsan__("unsigned-integer-overflow") bool VerifyTableStart( + const uint8_t *table) { // Check the vtable offset. auto tableo = static_cast(table - buf_); - if (!Verify(tableo)) - return false; + if (!Verify(tableo)) return false; // This offset may be signed, but doing the subtraction unsigned always // gives the result we want. auto vtableo = tableo - static_cast(ReadScalar(table)); @@ -2504,58 +2406,51 @@ class Verifier FLATBUFFERS_FINAL_CLASS Verify(vtableo, ReadScalar(buf_ + vtableo)); } - template bool VerifyBufferFromStart(const char *identifier, size_t start) - { + template + bool VerifyBufferFromStart(const char *identifier, size_t start) { if (identifier && !Check((size_ >= 2 * sizeof(flatbuffers::uoffset_t) && - BufferHasIdentifier(buf_ + start, identifier)))) - { + BufferHasIdentifier(buf_ + start, identifier)))) { return false; } // Call T::Verify, which must be in the generated code for this type. auto o = VerifyOffset(start); return o && reinterpret_cast(buf_ + start + o)->Verify(*this) -#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE + // clang-format off + #ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE && GetComputedSize() -#endif - ; + #endif + ; // clang-format on } // Verify this whole buffer, starting with root type T. - template bool VerifyBuffer() { return VerifyBuffer(nullptr); } + template bool VerifyBuffer() { return VerifyBuffer(nullptr); } - template bool VerifyBuffer(const char *identifier) - { + template bool VerifyBuffer(const char *identifier) { return VerifyBufferFromStart(identifier, 0); } - template bool VerifySizePrefixedBuffer(const char *identifier) - { - return Verify(0U) && ReadScalar(buf_) == size_ - sizeof(uoffset_t) && + template bool VerifySizePrefixedBuffer(const char *identifier) { + return Verify(0U) && + ReadScalar(buf_) == size_ - sizeof(uoffset_t) && VerifyBufferFromStart(identifier, sizeof(uoffset_t)); } - uoffset_t VerifyOffset(size_t start) const - { - if (!Verify(start)) - return 0; + uoffset_t VerifyOffset(size_t start) const { + if (!Verify(start)) return 0; auto o = ReadScalar(buf_ + start); // May not point to itself. - if (!Check(o != 0)) - return 0; + if (!Check(o != 0)) return 0; // Can't wrap around / buffers are max 2GB. - if (!Check(static_cast(o) >= 0)) - return 0; + if (!Check(static_cast(o) >= 0)) return 0; // Must be inside the buffer to create a pointer from it (pointer outside // buffer is UB). - if (!Verify(start + o, 1)) - return 0; + if (!Verify(start + o, 1)) return 0; return o; } - uoffset_t VerifyOffset(const uint8_t *base, voffset_t start) const - { + uoffset_t VerifyOffset(const uint8_t *base, voffset_t start) const { return VerifyOffset(static_cast(base - buf_) + start); } @@ -2563,38 +2458,36 @@ class Verifier FLATBUFFERS_FINAL_CLASS // structure depth and amount, and possibly bails out with false if // limits set by the constructor have been hit. Needs to be balanced // with EndTable(). - bool VerifyComplexity() - { + bool VerifyComplexity() { depth_++; num_tables_++; return Check(depth_ <= max_depth_ && num_tables_ <= max_tables_); } // Called at the end of a table to pop the depth count. - bool EndTable() - { + bool EndTable() { depth_--; return true; } // Returns the message size in bytes - size_t GetComputedSize() const - { -#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE - uintptr_t size = upper_bound_; - // Align the size to uoffset_t - size = (size - 1 + sizeof(uoffset_t)) & ~(sizeof(uoffset_t) - 1); - return (size > size_) ? 0 : size; -#else - // Must turn on FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE for this to work. - (void)upper_bound_; - FLATBUFFERS_ASSERT(false); - return 0; -#endif + size_t GetComputedSize() const { + // clang-format off + #ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE + uintptr_t size = upper_bound_; + // Align the size to uoffset_t + size = (size - 1 + sizeof(uoffset_t)) & ~(sizeof(uoffset_t) - 1); + return (size > size_) ? 0 : size; + #else + // Must turn on FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE for this to work. + (void)upper_bound_; + FLATBUFFERS_ASSERT(false); + return 0; + #endif // clang-format on } -private: + private: const uint8_t *buf_; size_t size_; uoffset_t depth_; @@ -2608,24 +2501,19 @@ class Verifier FLATBUFFERS_FINAL_CLASS // Convenient way to bundle a buffer and its length, to pass it around // typed by its root. // A BufferRef does not own its buffer. -struct BufferRefBase -{ -}; // for std::is_base_of -template struct BufferRef : BufferRefBase -{ +struct BufferRefBase {}; // for std::is_base_of +template struct BufferRef : BufferRefBase { BufferRef() : buf(nullptr), len(0), must_free(false) {} - BufferRef(uint8_t *_buf, uoffset_t _len) : buf(_buf), len(_len), must_free(false) {} + BufferRef(uint8_t *_buf, uoffset_t _len) + : buf(_buf), len(_len), must_free(false) {} - ~BufferRef() - { - if (must_free) - free(buf); + ~BufferRef() { + if (must_free) free(buf); } const T *GetRoot() const { return flatbuffers::GetRoot(buf); } - bool Verify() - { + bool Verify() { Verifier verifier(buf, len); return verifier.VerifyBuffer(nullptr); } @@ -2639,17 +2527,20 @@ template struct BufferRef : BufferRefBase // always have all members present and do not support forwards/backwards // compatible extensions. -class Struct FLATBUFFERS_FINAL_CLASS -{ -public: - template T GetField(uoffset_t o) const { return ReadScalar(&data_[o]); } +class Struct FLATBUFFERS_FINAL_CLASS { + public: + template T GetField(uoffset_t o) const { + return ReadScalar(&data_[o]); + } - template T GetStruct(uoffset_t o) const { return reinterpret_cast(&data_[o]); } + template T GetStruct(uoffset_t o) const { + return reinterpret_cast(&data_[o]); + } const uint8_t *GetAddressOf(uoffset_t o) const { return &data_[o]; } uint8_t *GetAddressOf(uoffset_t o) { return &data_[o]; } -private: + private: // private constructor & copy constructor: you obtain instances of this // class by pointing to existing data only Struct(); @@ -2661,15 +2552,15 @@ class Struct FLATBUFFERS_FINAL_CLASS // "tables" use an offset table (possibly shared) that allows fields to be // omitted and added at will, but uses an extra indirection to read. -class Table -{ -public: - const uint8_t *GetVTable() const { return data_ - ReadScalar(data_); } +class Table { + public: + const uint8_t *GetVTable() const { + return data_ - ReadScalar(data_); + } // This gets the field offset for any of the functions below it, or 0 // if the field was not present. - voffset_t GetOptionalFieldOffset(voffset_t field) const - { + voffset_t GetOptionalFieldOffset(voffset_t field) const { // The vtable offset is always at the start. auto vtable = GetVTable(); // The first element is the size of the vtable (fields + type id + itself). @@ -2679,83 +2570,77 @@ class Table return field < vtsize ? ReadScalar(vtable + field) : 0; } - template T GetField(voffset_t field, T defaultval) const - { + template T GetField(voffset_t field, T defaultval) const { auto field_offset = GetOptionalFieldOffset(field); return field_offset ? ReadScalar(data_ + field_offset) : defaultval; } - template P GetPointer(voffset_t field) - { + template P GetPointer(voffset_t field) { auto field_offset = GetOptionalFieldOffset(field); auto p = data_ + field_offset; - return field_offset ? reinterpret_cast

(p + ReadScalar(p)) : nullptr; + return field_offset ? reinterpret_cast

(p + ReadScalar(p)) + : nullptr; } - template P GetPointer(voffset_t field) const - { + template P GetPointer(voffset_t field) const { return const_cast(this)->GetPointer

(field); } - template P GetStruct(voffset_t field) const - { + template P GetStruct(voffset_t field) const { auto field_offset = GetOptionalFieldOffset(field); auto p = const_cast(data_ + field_offset); return field_offset ? reinterpret_cast

(p) : nullptr; } - template - flatbuffers::Optional GetOptional(voffset_t field) const - { + template + flatbuffers::Optional GetOptional(voffset_t field) const { auto field_offset = GetOptionalFieldOffset(field); auto p = data_ + field_offset; - return field_offset ? Optional(static_cast(ReadScalar(p))) : Optional(); + return field_offset ? Optional(static_cast(ReadScalar(p))) + : Optional(); } - template bool SetField(voffset_t field, T val, T def) - { + template bool SetField(voffset_t field, T val, T def) { auto field_offset = GetOptionalFieldOffset(field); - if (!field_offset) - return IsTheSameAs(val, def); + if (!field_offset) return IsTheSameAs(val, def); WriteScalar(data_ + field_offset, val); return true; } - template bool SetField(voffset_t field, T val) - { + template bool SetField(voffset_t field, T val) { auto field_offset = GetOptionalFieldOffset(field); - if (!field_offset) - return false; + if (!field_offset) return false; WriteScalar(data_ + field_offset, val); return true; } - bool SetPointer(voffset_t field, const uint8_t *val) - { + bool SetPointer(voffset_t field, const uint8_t *val) { auto field_offset = GetOptionalFieldOffset(field); - if (!field_offset) - return false; - WriteScalar(data_ + field_offset, static_cast(val - (data_ + field_offset))); + if (!field_offset) return false; + WriteScalar(data_ + field_offset, + static_cast(val - (data_ + field_offset))); return true; } - uint8_t *GetAddressOf(voffset_t field) - { + uint8_t *GetAddressOf(voffset_t field) { auto field_offset = GetOptionalFieldOffset(field); return field_offset ? data_ + field_offset : nullptr; } - const uint8_t *GetAddressOf(voffset_t field) const - { + const uint8_t *GetAddressOf(voffset_t field) const { return const_cast

(this)->GetAddressOf(field); } - bool CheckField(voffset_t field) const { return GetOptionalFieldOffset(field) != 0; } + bool CheckField(voffset_t field) const { + return GetOptionalFieldOffset(field) != 0; + } // Verify the vtable of this table. // Call this once per table, followed by VerifyField once per field. - bool VerifyTableStart(Verifier &verifier) const { return verifier.VerifyTableStart(data_); } + bool VerifyTableStart(Verifier &verifier) const { + return verifier.VerifyTableStart(data_); + } // Verify a particular field. - template bool VerifyField(const Verifier &verifier, voffset_t field) const - { + template + bool VerifyField(const Verifier &verifier, voffset_t field) const { // Calling GetOptionalFieldOffset should be safe now thanks to // VerifyTable(). auto field_offset = GetOptionalFieldOffset(field); @@ -2764,26 +2649,26 @@ class Table } // VerifyField for required fields. - template bool VerifyFieldRequired(const Verifier &verifier, voffset_t field) const - { + template + bool VerifyFieldRequired(const Verifier &verifier, voffset_t field) const { auto field_offset = GetOptionalFieldOffset(field); - return verifier.Check(field_offset != 0) && verifier.Verify(data_, field_offset); + return verifier.Check(field_offset != 0) && + verifier.Verify(data_, field_offset); } // Versions for offsets. - bool VerifyOffset(const Verifier &verifier, voffset_t field) const - { + bool VerifyOffset(const Verifier &verifier, voffset_t field) const { auto field_offset = GetOptionalFieldOffset(field); return !field_offset || verifier.VerifyOffset(data_, field_offset); } - bool VerifyOffsetRequired(const Verifier &verifier, voffset_t field) const - { + bool VerifyOffsetRequired(const Verifier &verifier, voffset_t field) const { auto field_offset = GetOptionalFieldOffset(field); - return verifier.Check(field_offset != 0) && verifier.VerifyOffset(data_, field_offset); + return verifier.Check(field_offset != 0) && + verifier.VerifyOffset(data_, field_offset); } -private: + private: // private constructor & copy constructor: you obtain instances of this // class by pointing to existing data only Table(); @@ -2795,16 +2680,17 @@ class Table // This specialization allows avoiding warnings like: // MSVC C4800: type: forcing value to bool 'true' or 'false'. -template <> -inline flatbuffers::Optional Table::GetOptional(voffset_t field) const -{ +template<> +inline flatbuffers::Optional Table::GetOptional( + voffset_t field) const { auto field_offset = GetOptionalFieldOffset(field); auto p = data_ + field_offset; - return field_offset ? Optional(ReadScalar(p) != 0) : Optional(); + return field_offset ? Optional(ReadScalar(p) != 0) + : Optional(); } -template void FlatBufferBuilder::Required(Offset table, voffset_t field) -{ +template +void FlatBufferBuilder::Required(Offset table, voffset_t field) { auto table_ptr = reinterpret_cast(buf_.data_at(table.o)); bool ok = table_ptr->GetOptionalFieldOffset(field) != 0; // If this fails, the caller will show what field needs to be set. @@ -2816,8 +2702,7 @@ template void FlatBufferBuilder::Required(Offset table, voffset_ /// it is the opposite transformation of GetRoot(). /// This may be useful if you want to pass on a root and have the recipient /// delete the buffer afterwards. -inline const uint8_t *GetBufferStartFromRootPointer(const void *root) -{ +inline const uint8_t *GetBufferStartFromRootPointer(const void *root) { auto table = reinterpret_cast(root); auto vtable = table->GetVTable(); // Either the vtable is before the root or after the root. @@ -2836,11 +2721,11 @@ inline const uint8_t *GetBufferStartFromRootPointer(const void *root) // be 0 or four ASCII characters. static_assert(FlatBufferBuilder::kFileIdentifierLength == sizeof(uoffset_t), "file_identifier is assumed to be the same size as uoffset_t"); - for (auto possible_roots = FLATBUFFERS_MAX_ALIGNMENT / sizeof(uoffset_t) + 1; possible_roots; - possible_roots--) - { + for (auto possible_roots = FLATBUFFERS_MAX_ALIGNMENT / sizeof(uoffset_t) + 1; + possible_roots; possible_roots--) { start -= sizeof(uoffset_t); - if (ReadScalar(start) + start == reinterpret_cast(root)) + if (ReadScalar(start) + start == + reinterpret_cast(root)) return start; } // We didn't find the root, either the "root" passed isn't really a root, @@ -2852,14 +2737,14 @@ inline const uint8_t *GetBufferStartFromRootPointer(const void *root) } /// @brief This return the prefixed size of a FlatBuffer. -inline uoffset_t GetPrefixedSize(const uint8_t *buf) { return ReadScalar(buf); } +inline uoffset_t GetPrefixedSize(const uint8_t *buf) { + return ReadScalar(buf); +} // Base class for native objects (FlatBuffer data de-serialized into native // C++ data structures). // Contains no functionality, purely documentative. -struct NativeTable -{ -}; +struct NativeTable {}; /// @brief Function types to be used with resolving hashes into objects and /// back again. The resolver gets a pointer to a field inside an object API @@ -2888,20 +2773,19 @@ typedef uint64_t hash_value_t; // Note: this function will return false for fields equal to the default // value, since they're not stored in the buffer (unless force_defaults was // used). -template bool IsFieldPresent(const T *table, typename T::FlatBuffersVTableOffset field) -{ +template +bool IsFieldPresent(const T *table, typename T::FlatBuffersVTableOffset field) { // Cast, since Table is a private baseclass of any table types. - return reinterpret_cast(table)->CheckField(static_cast(field)); + return reinterpret_cast(table)->CheckField( + static_cast(field)); } // Utility function for reverse lookups on the EnumNames*() functions // (in the generated C++ code) // names must be NULL terminated. -inline int LookupEnum(const char **names, const char *name) -{ +inline int LookupEnum(const char **names, const char *name) { for (const char **p = names; *p; p++) - if (!strcmp(*p, name)) - return static_cast(p - names); + if (!strcmp(*p, name)) return static_cast(p - names); return -1; } @@ -2945,13 +2829,7 @@ inline int LookupEnum(const char **names, const char *name) // See minireflect.h for utilities using this functionality. // These types are organized slightly differently as the ones in idl.h. -enum SequenceType -{ - ST_TABLE, - ST_STRUCT, - ST_UNION, - ST_ENUM -}; +enum SequenceType { ST_TABLE, ST_STRUCT, ST_UNION, ST_ENUM }; // Scalars have the same order as in idl.h // clang-format off @@ -2991,8 +2869,7 @@ inline const char * const *ElementaryTypeNames() { // We're explicitly defining the signedness since the signedness of integer // bitfields is otherwise implementation-defined and causes warnings on older // GCC compilers. -struct TypeCode -{ +struct TypeCode { // ElementaryType unsigned short base_type : 4; // Either vector (in table) or array (in struct) @@ -3008,15 +2885,14 @@ struct TypeTable; // Signature of the static method present in each type. typedef const TypeTable *(*TypeFunction)(); -struct TypeTable -{ +struct TypeTable { SequenceType st; - size_t num_elems; // of type_codes, values, names (but not type_refs). - const TypeCode *type_codes; // num_elems count - const TypeFunction *type_refs; // less than num_elems entries (see TypeCode). - const int16_t *array_sizes; // less than num_elems entries (see TypeCode). - const int64_t *values; // Only set for non-consecutive enum/union or structs. - const char *const *names; // Only set if compiled with --reflect-names. + size_t num_elems; // of type_codes, values, names (but not type_refs). + const TypeCode *type_codes; // num_elems count + const TypeFunction *type_refs; // less than num_elems entries (see TypeCode). + const int16_t *array_sizes; // less than num_elems entries (see TypeCode). + const int64_t *values; // Only set for non-consecutive enum/union or structs. + const char *const *names; // Only set if compiled with --reflect-names. }; // String which identifies the current version of FlatBuffers. @@ -3075,4 +2951,4 @@ volatile __attribute__((weak)) const char *flatbuffer_version_string = // clang-format on -#endif // FLATBUFFERS_H_ +#endif // FLATBUFFERS_H_ diff --git a/onert-micro/externals/flatbuffers/flatc.h b/onert-micro/externals/flatbuffers/flatc.h index 594bf792ac0..5e2709e73ed 100644 --- a/onert-micro/externals/flatbuffers/flatc.h +++ b/onert-micro/externals/flatbuffers/flatc.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2017 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,22 +25,21 @@ #include "flatbuffers/idl.h" #include "flatbuffers/util.h" -namespace flatbuffers -{ +namespace flatbuffers { extern void LogCompilerWarn(const std::string &warn); extern void LogCompilerError(const std::string &err); -class FlatCompiler -{ -public: +class FlatCompiler { + public: // Output generator for the various programming languages and formats we // support. - struct Generator - { - typedef bool (*GenerateFn)(const flatbuffers::Parser &parser, const std::string &path, + struct Generator { + typedef bool (*GenerateFn)(const flatbuffers::Parser &parser, + const std::string &path, const std::string &file_name); - typedef std::string (*MakeRuleFn)(const flatbuffers::Parser &parser, const std::string &path, + typedef std::string (*MakeRuleFn)(const flatbuffers::Parser &parser, + const std::string &path, const std::string &file_name); GenerateFn generate; @@ -55,15 +53,19 @@ class FlatCompiler MakeRuleFn make_rule; }; - typedef void (*WarnFn)(const FlatCompiler *flatc, const std::string &warn, bool show_exe_name); + typedef void (*WarnFn)(const FlatCompiler *flatc, const std::string &warn, + bool show_exe_name); - typedef void (*ErrorFn)(const FlatCompiler *flatc, const std::string &err, bool usage, - bool show_exe_name); + typedef void (*ErrorFn)(const FlatCompiler *flatc, const std::string &err, + bool usage, bool show_exe_name); // Parameters required to initialize the FlatCompiler. - struct InitParams - { - InitParams() : generators(nullptr), num_generators(0), warn_fn(nullptr), error_fn(nullptr) {} + struct InitParams { + InitParams() + : generators(nullptr), + num_generators(0), + warn_fn(nullptr), + error_fn(nullptr) {} const Generator *generators; size_t num_generators; @@ -77,19 +79,22 @@ class FlatCompiler std::string GetUsageString(const char *program_name) const; -private: + private: void ParseFile(flatbuffers::Parser &parser, const std::string &filename, - const std::string &contents, std::vector &include_directories) const; + const std::string &contents, + std::vector &include_directories) const; - void LoadBinarySchema(Parser &parser, const std::string &filename, const std::string &contents); + void LoadBinarySchema(Parser &parser, const std::string &filename, + const std::string &contents); void Warn(const std::string &warn, bool show_exe_name = true) const; - void Error(const std::string &err, bool usage = true, bool show_exe_name = true) const; + void Error(const std::string &err, bool usage = true, + bool show_exe_name = true) const; InitParams params_; }; -} // namespace flatbuffers +} // namespace flatbuffers -#endif // FLATBUFFERS_FLATC_H_ +#endif // FLATBUFFERS_FLATC_H_ diff --git a/onert-micro/externals/flatbuffers/flexbuffers.h b/onert-micro/externals/flatbuffers/flexbuffers.h index f6fcbf34baa..c71928e8a97 100644 --- a/onert-micro/externals/flatbuffers/flexbuffers.h +++ b/onert-micro/externals/flatbuffers/flexbuffers.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2017 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,24 +24,22 @@ #include "flatbuffers/util.h" #ifdef _MSC_VER -#include +# include #endif #if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable : 4127) // C4127: conditional expression is constant +# pragma warning(push) +# pragma warning(disable : 4127) // C4127: conditional expression is constant #endif -namespace flexbuffers -{ +namespace flexbuffers { class Reference; class Map; // These are used in the lower 2 bits of a type field to determine the size of // the elements (and or size field) of the item pointed to (e.g. vector). -enum BitWidth -{ +enum BitWidth { BIT_WIDTH_8 = 0, BIT_WIDTH_16 = 1, BIT_WIDTH_32 = 2, @@ -51,8 +48,7 @@ enum BitWidth // These are used as the upper 6 bits of a type field to indicate the actual // type. -enum Type -{ +enum Type { FBT_NULL = 0, FBT_INT = 1, FBT_UINT = 2, @@ -64,72 +60,65 @@ enum Type FBT_INDIRECT_UINT = 7, FBT_INDIRECT_FLOAT = 8, FBT_MAP = 9, - FBT_VECTOR = 10, // Untyped. - FBT_VECTOR_INT = 11, // Typed any size (stores no type table). + FBT_VECTOR = 10, // Untyped. + FBT_VECTOR_INT = 11, // Typed any size (stores no type table). FBT_VECTOR_UINT = 12, FBT_VECTOR_FLOAT = 13, FBT_VECTOR_KEY = 14, // DEPRECATED, use FBT_VECTOR or FBT_VECTOR_KEY instead. // Read test.cpp/FlexBuffersDeprecatedTest() for details on why. FBT_VECTOR_STRING_DEPRECATED = 15, - FBT_VECTOR_INT2 = 16, // Typed tuple (no type table, no size field). + FBT_VECTOR_INT2 = 16, // Typed tuple (no type table, no size field). FBT_VECTOR_UINT2 = 17, FBT_VECTOR_FLOAT2 = 18, - FBT_VECTOR_INT3 = 19, // Typed triple (no type table, no size field). + FBT_VECTOR_INT3 = 19, // Typed triple (no type table, no size field). FBT_VECTOR_UINT3 = 20, FBT_VECTOR_FLOAT3 = 21, - FBT_VECTOR_INT4 = 22, // Typed quad (no type table, no size field). + FBT_VECTOR_INT4 = 22, // Typed quad (no type table, no size field). FBT_VECTOR_UINT4 = 23, FBT_VECTOR_FLOAT4 = 24, FBT_BLOB = 25, FBT_BOOL = 26, - FBT_VECTOR_BOOL = 36, // To Allow the same type of conversion of type to vector type + FBT_VECTOR_BOOL = + 36, // To Allow the same type of conversion of type to vector type }; inline bool IsInline(Type t) { return t <= FBT_FLOAT || t == FBT_BOOL; } -inline bool IsTypedVectorElementType(Type t) -{ +inline bool IsTypedVectorElementType(Type t) { return (t >= FBT_INT && t <= FBT_STRING) || t == FBT_BOOL; } -inline bool IsTypedVector(Type t) -{ - return (t >= FBT_VECTOR_INT && t <= FBT_VECTOR_STRING_DEPRECATED) || t == FBT_VECTOR_BOOL; +inline bool IsTypedVector(Type t) { + return (t >= FBT_VECTOR_INT && t <= FBT_VECTOR_STRING_DEPRECATED) || + t == FBT_VECTOR_BOOL; } -inline bool IsFixedTypedVector(Type t) { return t >= FBT_VECTOR_INT2 && t <= FBT_VECTOR_FLOAT4; } +inline bool IsFixedTypedVector(Type t) { + return t >= FBT_VECTOR_INT2 && t <= FBT_VECTOR_FLOAT4; +} -inline Type ToTypedVector(Type t, size_t fixed_len = 0) -{ +inline Type ToTypedVector(Type t, size_t fixed_len = 0) { FLATBUFFERS_ASSERT(IsTypedVectorElementType(t)); - switch (fixed_len) - { - case 0: - return static_cast(t - FBT_INT + FBT_VECTOR_INT); - case 2: - return static_cast(t - FBT_INT + FBT_VECTOR_INT2); - case 3: - return static_cast(t - FBT_INT + FBT_VECTOR_INT3); - case 4: - return static_cast(t - FBT_INT + FBT_VECTOR_INT4); - default: - FLATBUFFERS_ASSERT(0); - return FBT_NULL; + switch (fixed_len) { + case 0: return static_cast(t - FBT_INT + FBT_VECTOR_INT); + case 2: return static_cast(t - FBT_INT + FBT_VECTOR_INT2); + case 3: return static_cast(t - FBT_INT + FBT_VECTOR_INT3); + case 4: return static_cast(t - FBT_INT + FBT_VECTOR_INT4); + default: FLATBUFFERS_ASSERT(0); return FBT_NULL; } } -inline Type ToTypedVectorElementType(Type t) -{ +inline Type ToTypedVectorElementType(Type t) { FLATBUFFERS_ASSERT(IsTypedVector(t)); return static_cast(t - FBT_VECTOR_INT + FBT_INT); } -inline Type ToFixedTypedVectorElementType(Type t, uint8_t *len) -{ +inline Type ToFixedTypedVectorElementType(Type t, uint8_t *len) { FLATBUFFERS_ASSERT(IsFixedTypedVector(t)); auto fixed_type = t - FBT_VECTOR_INT2; - *len = static_cast(fixed_type / 3 + 2); // 3 types each, starting from length 2. + *len = static_cast(fixed_type / 3 + + 2); // 3 types each, starting from length 2. return static_cast(fixed_type % 3 + FBT_INT); } @@ -143,53 +132,58 @@ typedef int8_t quarter; // decently quick, but it is the most frequently executed function. // We could do an (unaligned) 64-bit read if we ifdef out the platforms for // which that doesn't work (or where we'd read into un-owned memory). -template -R ReadSizedScalar(const uint8_t *data, uint8_t byte_width) -{ - return byte_width < 4 ? (byte_width < 2 ? static_cast(flatbuffers::ReadScalar(data)) - : static_cast(flatbuffers::ReadScalar(data))) - : (byte_width < 8 ? static_cast(flatbuffers::ReadScalar(data)) - : static_cast(flatbuffers::ReadScalar(data))); +template +R ReadSizedScalar(const uint8_t *data, uint8_t byte_width) { + return byte_width < 4 + ? (byte_width < 2 + ? static_cast(flatbuffers::ReadScalar(data)) + : static_cast(flatbuffers::ReadScalar(data))) + : (byte_width < 8 + ? static_cast(flatbuffers::ReadScalar(data)) + : static_cast(flatbuffers::ReadScalar(data))); } -inline int64_t ReadInt64(const uint8_t *data, uint8_t byte_width) -{ - return ReadSizedScalar(data, byte_width); +inline int64_t ReadInt64(const uint8_t *data, uint8_t byte_width) { + return ReadSizedScalar( + data, byte_width); } -inline uint64_t ReadUInt64(const uint8_t *data, uint8_t byte_width) -{ -#if defined(_MSC_VER) && ((defined(_M_X64) && !defined(_M_ARM64EC)) || defined _M_IX86) - uint64_t u = 0; - __movsb(reinterpret_cast(&u), reinterpret_cast(data), byte_width); - return flatbuffers::EndianScalar(u); -#else - return ReadSizedScalar(data, byte_width); -#endif +inline uint64_t ReadUInt64(const uint8_t *data, uint8_t byte_width) { + // This is the "hottest" function (all offset lookups use this), so worth + // optimizing if possible. + // TODO: GCC apparently replaces memcpy by a rep movsb, but only if count is a + // constant, which here it isn't. Test if memcpy is still faster than + // the conditionals in ReadSizedScalar. Can also use inline asm. + // clang-format off + #if defined(_MSC_VER) && ((defined(_M_X64) && !defined(_M_ARM64EC)) || defined _M_IX86) + uint64_t u = 0; + __movsb(reinterpret_cast(&u), + reinterpret_cast(data), byte_width); + return flatbuffers::EndianScalar(u); + #else + return ReadSizedScalar( + data, byte_width); + #endif // clang-format on } -inline double ReadDouble(const uint8_t *data, uint8_t byte_width) -{ - return ReadSizedScalar(data, byte_width); +inline double ReadDouble(const uint8_t *data, uint8_t byte_width) { + return ReadSizedScalar(data, + byte_width); } -inline const uint8_t *Indirect(const uint8_t *offset, uint8_t byte_width) -{ +inline const uint8_t *Indirect(const uint8_t *offset, uint8_t byte_width) { return offset - ReadUInt64(offset, byte_width); } -template const uint8_t *Indirect(const uint8_t *offset) -{ +template const uint8_t *Indirect(const uint8_t *offset) { return offset - flatbuffers::ReadScalar(offset); } -inline BitWidth WidthU(uint64_t u) -{ -#define FLATBUFFERS_GET_FIELD_BIT_WIDTH(value, width) \ - { \ - if (!((u) & ~((1ULL << (width)) - 1ULL))) \ - return BIT_WIDTH_##width; \ +inline BitWidth WidthU(uint64_t u) { +#define FLATBUFFERS_GET_FIELD_BIT_WIDTH(value, width) \ + { \ + if (!((u) & ~((1ULL << (width)) - 1ULL))) return BIT_WIDTH_##width; \ } FLATBUFFERS_GET_FIELD_BIT_WIDTH(u, 8); FLATBUFFERS_GET_FIELD_BIT_WIDTH(u, 16); @@ -198,155 +192,143 @@ inline BitWidth WidthU(uint64_t u) return BIT_WIDTH_64; } -inline BitWidth WidthI(int64_t i) -{ +inline BitWidth WidthI(int64_t i) { auto u = static_cast(i) << 1; return WidthU(i >= 0 ? u : ~u); } -inline BitWidth WidthF(double f) -{ - return static_cast(static_cast(f)) == f ? BIT_WIDTH_32 : BIT_WIDTH_64; +inline BitWidth WidthF(double f) { + return static_cast(static_cast(f)) == f ? BIT_WIDTH_32 + : BIT_WIDTH_64; } // Base class of all types below. // Points into the data buffer and allows access to one type. -class Object -{ -public: - Object(const uint8_t *data, uint8_t byte_width) : data_(data), byte_width_(byte_width) {} +class Object { + public: + Object(const uint8_t *data, uint8_t byte_width) + : data_(data), byte_width_(byte_width) {} -protected: + protected: const uint8_t *data_; uint8_t byte_width_; }; // Object that has a size, obtained either from size prefix, or elsewhere. -class Sized : public Object -{ -public: +class Sized : public Object { + public: // Size prefix. - Sized(const uint8_t *data, uint8_t byte_width) : Object(data, byte_width), size_(read_size()) {} + Sized(const uint8_t *data, uint8_t byte_width) + : Object(data, byte_width), size_(read_size()) {} // Manual size. - Sized(const uint8_t *data, uint8_t byte_width, size_t sz) : Object(data, byte_width), size_(sz) {} + Sized(const uint8_t *data, uint8_t byte_width, size_t sz) + : Object(data, byte_width), size_(sz) {} size_t size() const { return size_; } // Access size stored in `byte_width_` bytes before data_ pointer. - size_t read_size() const - { + size_t read_size() const { return static_cast(ReadUInt64(data_ - byte_width_, byte_width_)); } -protected: + protected: size_t size_; }; -class String : public Sized -{ -public: +class String : public Sized { + public: // Size prefix. String(const uint8_t *data, uint8_t byte_width) : Sized(data, byte_width) {} // Manual size. - String(const uint8_t *data, uint8_t byte_width, size_t sz) : Sized(data, byte_width, sz) {} + String(const uint8_t *data, uint8_t byte_width, size_t sz) + : Sized(data, byte_width, sz) {} size_t length() const { return size(); } const char *c_str() const { return reinterpret_cast(data_); } std::string str() const { return std::string(c_str(), size()); } - static String EmptyString() - { + static String EmptyString() { static const char *empty_string = ""; return String(reinterpret_cast(empty_string), 1, 0); } bool IsTheEmptyString() const { return data_ == EmptyString().data_; } }; -class Blob : public Sized -{ -public: - Blob(const uint8_t *data_buf, uint8_t byte_width) : Sized(data_buf, byte_width) {} +class Blob : public Sized { + public: + Blob(const uint8_t *data_buf, uint8_t byte_width) + : Sized(data_buf, byte_width) {} - static Blob EmptyBlob() - { - static const uint8_t empty_blob[] = {0 /*len*/}; + static Blob EmptyBlob() { + static const uint8_t empty_blob[] = { 0 /*len*/ }; return Blob(empty_blob + 1, 1); } bool IsTheEmptyBlob() const { return data_ == EmptyBlob().data_; } const uint8_t *data() const { return data_; } }; -class Vector : public Sized -{ -public: +class Vector : public Sized { + public: Vector(const uint8_t *data, uint8_t byte_width) : Sized(data, byte_width) {} Reference operator[](size_t i) const; - static Vector EmptyVector() - { - static const uint8_t empty_vector[] = {0 /*len*/}; + static Vector EmptyVector() { + static const uint8_t empty_vector[] = { 0 /*len*/ }; return Vector(empty_vector + 1, 1); } bool IsTheEmptyVector() const { return data_ == EmptyVector().data_; } }; -class TypedVector : public Sized -{ -public: +class TypedVector : public Sized { + public: TypedVector(const uint8_t *data, uint8_t byte_width, Type element_type) - : Sized(data, byte_width), type_(element_type) - { - } + : Sized(data, byte_width), type_(element_type) {} Reference operator[](size_t i) const; - static TypedVector EmptyTypedVector() - { - static const uint8_t empty_typed_vector[] = {0 /*len*/}; + static TypedVector EmptyTypedVector() { + static const uint8_t empty_typed_vector[] = { 0 /*len*/ }; return TypedVector(empty_typed_vector + 1, 1, FBT_INT); } - bool IsTheEmptyVector() const { return data_ == TypedVector::EmptyTypedVector().data_; } + bool IsTheEmptyVector() const { + return data_ == TypedVector::EmptyTypedVector().data_; + } Type ElementType() { return type_; } friend Reference; -private: + private: Type type_; friend Map; }; -class FixedTypedVector : public Object -{ -public: - FixedTypedVector(const uint8_t *data, uint8_t byte_width, Type element_type, uint8_t len) - : Object(data, byte_width), type_(element_type), len_(len) - { - } +class FixedTypedVector : public Object { + public: + FixedTypedVector(const uint8_t *data, uint8_t byte_width, Type element_type, + uint8_t len) + : Object(data, byte_width), type_(element_type), len_(len) {} Reference operator[](size_t i) const; - static FixedTypedVector EmptyFixedTypedVector() - { - static const uint8_t fixed_empty_vector[] = {0 /* unused */}; + static FixedTypedVector EmptyFixedTypedVector() { + static const uint8_t fixed_empty_vector[] = { 0 /* unused */ }; return FixedTypedVector(fixed_empty_vector, 1, FBT_INT, 0); } - bool IsTheEmptyFixedTypedVector() const - { + bool IsTheEmptyFixedTypedVector() const { return data_ == FixedTypedVector::EmptyFixedTypedVector().data_; } Type ElementType() { return type_; } uint8_t size() { return len_; } -private: + private: Type type_; uint8_t len_; }; -class Map : public Vector -{ -public: +class Map : public Vector { + public: Map(const uint8_t *data, uint8_t byte_width) : Vector(data, byte_width) {} Reference operator[](const char *key) const; @@ -354,17 +336,16 @@ class Map : public Vector Vector Values() const { return Vector(data_, byte_width_); } - TypedVector Keys() const - { + TypedVector Keys() const { const size_t num_prefixed_fields = 3; auto keys_offset = data_ - byte_width_ * num_prefixed_fields; return TypedVector(Indirect(keys_offset, byte_width_), - static_cast(ReadUInt64(keys_offset + byte_width_, byte_width_)), + static_cast( + ReadUInt64(keys_offset + byte_width_, byte_width_)), FBT_KEY); } - static Map EmptyMap() - { + static Map EmptyMap() { static const uint8_t empty_map[] = { 0 /*keys_len*/, 0 /*keys_offset*/, 1 /*keys_width*/, 0 /*len*/ }; @@ -374,31 +355,33 @@ class Map : public Vector bool IsTheEmptyMap() const { return data_ == EmptyMap().data_; } }; -template void AppendToString(std::string &s, T &&v, bool keys_quoted) -{ +template +void AppendToString(std::string &s, T &&v, bool keys_quoted) { s += "[ "; - for (size_t i = 0; i < v.size(); i++) - { - if (i) - s += ", "; + for (size_t i = 0; i < v.size(); i++) { + if (i) s += ", "; v[i].ToString(true, keys_quoted, s); } s += " ]"; } -class Reference -{ -public: - Reference() : data_(nullptr), parent_width_(0), byte_width_(BIT_WIDTH_8), type_(FBT_NULL) {} - - Reference(const uint8_t *data, uint8_t parent_width, uint8_t byte_width, Type type) - : data_(data), parent_width_(parent_width), byte_width_(byte_width), type_(type) - { - } +class Reference { + public: + Reference() + : data_(nullptr), + parent_width_(0), + byte_width_(BIT_WIDTH_8), + type_(FBT_NULL) {} + + Reference(const uint8_t *data, uint8_t parent_width, uint8_t byte_width, + Type type) + : data_(data), + parent_width_(parent_width), + byte_width_(byte_width), + type_(type) {} Reference(const uint8_t *data, uint8_t parent_width, uint8_t packed_type) - : data_(data), parent_width_(parent_width) - { + : data_(data), parent_width_(parent_width) { byte_width_ = 1U << static_cast(packed_type & 3); type_ = static_cast(packed_type >> 2); } @@ -408,55 +391,52 @@ class Reference bool IsNull() const { return type_ == FBT_NULL; } bool IsBool() const { return type_ == FBT_BOOL; } bool IsInt() const { return type_ == FBT_INT || type_ == FBT_INDIRECT_INT; } - bool IsUInt() const { return type_ == FBT_UINT || type_ == FBT_INDIRECT_UINT; } + bool IsUInt() const { + return type_ == FBT_UINT || type_ == FBT_INDIRECT_UINT; + } bool IsIntOrUint() const { return IsInt() || IsUInt(); } - bool IsFloat() const { return type_ == FBT_FLOAT || type_ == FBT_INDIRECT_FLOAT; } + bool IsFloat() const { + return type_ == FBT_FLOAT || type_ == FBT_INDIRECT_FLOAT; + } bool IsNumeric() const { return IsIntOrUint() || IsFloat(); } bool IsString() const { return type_ == FBT_STRING; } bool IsKey() const { return type_ == FBT_KEY; } bool IsVector() const { return type_ == FBT_VECTOR || type_ == FBT_MAP; } bool IsUntypedVector() const { return type_ == FBT_VECTOR; } bool IsTypedVector() const { return flexbuffers::IsTypedVector(type_); } - bool IsFixedTypedVector() const { return flexbuffers::IsFixedTypedVector(type_); } - bool IsAnyVector() const { return (IsTypedVector() || IsFixedTypedVector() || IsVector()); } + bool IsFixedTypedVector() const { + return flexbuffers::IsFixedTypedVector(type_); + } + bool IsAnyVector() const { + return (IsTypedVector() || IsFixedTypedVector() || IsVector()); + } bool IsMap() const { return type_ == FBT_MAP; } bool IsBlob() const { return type_ == FBT_BLOB; } - bool AsBool() const - { - return (type_ == FBT_BOOL ? ReadUInt64(data_, parent_width_) : AsUInt64()) != 0; + bool AsBool() const { + return (type_ == FBT_BOOL ? ReadUInt64(data_, parent_width_) + : AsUInt64()) != 0; } // Reads any type as a int64_t. Never fails, does most sensible conversion. // Truncates floats, strings are attempted to be parsed for a number, // vectors/maps return their size. Returns 0 if all else fails. - int64_t AsInt64() const - { - if (type_ == FBT_INT) - { + int64_t AsInt64() const { + if (type_ == FBT_INT) { // A fast path for the common case. return ReadInt64(data_, parent_width_); - } - else - switch (type_) - { - case FBT_INDIRECT_INT: - return ReadInt64(Indirect(), byte_width_); - case FBT_UINT: - return ReadUInt64(data_, parent_width_); - case FBT_INDIRECT_UINT: - return ReadUInt64(Indirect(), byte_width_); + } else + switch (type_) { + case FBT_INDIRECT_INT: return ReadInt64(Indirect(), byte_width_); + case FBT_UINT: return ReadUInt64(data_, parent_width_); + case FBT_INDIRECT_UINT: return ReadUInt64(Indirect(), byte_width_); case FBT_FLOAT: return static_cast(ReadDouble(data_, parent_width_)); case FBT_INDIRECT_FLOAT: return static_cast(ReadDouble(Indirect(), byte_width_)); - case FBT_NULL: - return 0; - case FBT_STRING: - return flatbuffers::StringToInt(AsString().c_str()); - case FBT_VECTOR: - return static_cast(AsVector().size()); - case FBT_BOOL: - return ReadInt64(data_, parent_width_); + case FBT_NULL: return 0; + case FBT_STRING: return flatbuffers::StringToInt(AsString().c_str()); + case FBT_VECTOR: return static_cast(AsVector().size()); + case FBT_BOOL: return ReadInt64(data_, parent_width_); default: // Convert other things to int. return 0; @@ -469,34 +449,23 @@ class Reference int16_t AsInt16() const { return static_cast(AsInt64()); } int8_t AsInt8() const { return static_cast(AsInt64()); } - uint64_t AsUInt64() const - { - if (type_ == FBT_UINT) - { + uint64_t AsUInt64() const { + if (type_ == FBT_UINT) { // A fast path for the common case. return ReadUInt64(data_, parent_width_); - } - else - switch (type_) - { - case FBT_INDIRECT_UINT: - return ReadUInt64(Indirect(), byte_width_); - case FBT_INT: - return ReadInt64(data_, parent_width_); - case FBT_INDIRECT_INT: - return ReadInt64(Indirect(), byte_width_); + } else + switch (type_) { + case FBT_INDIRECT_UINT: return ReadUInt64(Indirect(), byte_width_); + case FBT_INT: return ReadInt64(data_, parent_width_); + case FBT_INDIRECT_INT: return ReadInt64(Indirect(), byte_width_); case FBT_FLOAT: return static_cast(ReadDouble(data_, parent_width_)); case FBT_INDIRECT_FLOAT: return static_cast(ReadDouble(Indirect(), byte_width_)); - case FBT_NULL: - return 0; - case FBT_STRING: - return flatbuffers::StringToUInt(AsString().c_str()); - case FBT_VECTOR: - return static_cast(AsVector().size()); - case FBT_BOOL: - return ReadUInt64(data_, parent_width_); + case FBT_NULL: return 0; + case FBT_STRING: return flatbuffers::StringToUInt(AsString().c_str()); + case FBT_VECTOR: return static_cast(AsVector().size()); + case FBT_BOOL: return ReadUInt64(data_, parent_width_); default: // Convert other things to uint. return 0; @@ -507,18 +476,13 @@ class Reference uint16_t AsUInt16() const { return static_cast(AsUInt64()); } uint8_t AsUInt8() const { return static_cast(AsUInt64()); } - double AsDouble() const - { - if (type_ == FBT_FLOAT) - { + double AsDouble() const { + if (type_ == FBT_FLOAT) { // A fast path for the common case. return ReadDouble(data_, parent_width_); - } - else - switch (type_) - { - case FBT_INDIRECT_FLOAT: - return ReadDouble(Indirect(), byte_width_); + } else + switch (type_) { + case FBT_INDIRECT_FLOAT: return ReadDouble(Indirect(), byte_width_); case FBT_INT: return static_cast(ReadInt64(data_, parent_width_)); case FBT_UINT: @@ -527,16 +491,13 @@ class Reference return static_cast(ReadInt64(Indirect(), byte_width_)); case FBT_INDIRECT_UINT: return static_cast(ReadUInt64(Indirect(), byte_width_)); - case FBT_NULL: - return 0.0; - case FBT_STRING: - { + case FBT_NULL: return 0.0; + case FBT_STRING: { double d; flatbuffers::StringToNumber(AsString().c_str(), &d); return d; } - case FBT_VECTOR: - return static_cast(AsVector().size()); + case FBT_VECTOR: return static_cast(AsVector().size()); case FBT_BOOL: return static_cast(ReadUInt64(data_, parent_width_)); default: @@ -547,40 +508,30 @@ class Reference float AsFloat() const { return static_cast(AsDouble()); } - const char *AsKey() const - { - if (type_ == FBT_KEY || type_ == FBT_STRING) - { + const char *AsKey() const { + if (type_ == FBT_KEY || type_ == FBT_STRING) { return reinterpret_cast(Indirect()); - } - else - { + } else { return ""; } } // This function returns the empty string if you try to read something that // is not a string or key. - String AsString() const - { - if (type_ == FBT_STRING) - { + String AsString() const { + if (type_ == FBT_STRING) { return String(Indirect(), byte_width_); - } - else if (type_ == FBT_KEY) - { + } else if (type_ == FBT_KEY) { auto key = Indirect(); - return String(key, byte_width_, strlen(reinterpret_cast(key))); - } - else - { + return String(key, byte_width_, + strlen(reinterpret_cast(key))); + } else { return String::EmptyString(); } } // Unlike AsString(), this will convert any type to a std::string. - std::string ToString() const - { + std::string ToString() const { std::string s; ToString(false, false, s); return s; @@ -590,127 +541,83 @@ class Reference // string values at the top level receive "" quotes (inside other values // they always do). keys_quoted determines if keys are quoted, at any level. // TODO(wvo): add further options to have indentation/newlines. - void ToString(bool strings_quoted, bool keys_quoted, std::string &s) const - { - if (type_ == FBT_STRING) - { + void ToString(bool strings_quoted, bool keys_quoted, std::string &s) const { + if (type_ == FBT_STRING) { String str(Indirect(), byte_width_); - if (strings_quoted) - { + if (strings_quoted) { flatbuffers::EscapeString(str.c_str(), str.length(), &s, true, false); - } - else - { + } else { s.append(str.c_str(), str.length()); } - } - else if (IsKey()) - { + } else if (IsKey()) { auto str = AsKey(); - if (keys_quoted) - { + if (keys_quoted) { flatbuffers::EscapeString(str, strlen(str), &s, true, false); - } - else - { + } else { s += str; } - } - else if (IsInt()) - { + } else if (IsInt()) { s += flatbuffers::NumToString(AsInt64()); - } - else if (IsUInt()) - { + } else if (IsUInt()) { s += flatbuffers::NumToString(AsUInt64()); - } - else if (IsFloat()) - { + } else if (IsFloat()) { s += flatbuffers::NumToString(AsDouble()); - } - else if (IsNull()) - { + } else if (IsNull()) { s += "null"; - } - else if (IsBool()) - { + } else if (IsBool()) { s += AsBool() ? "true" : "false"; - } - else if (IsMap()) - { + } else if (IsMap()) { s += "{ "; auto m = AsMap(); auto keys = m.Keys(); auto vals = m.Values(); - for (size_t i = 0; i < keys.size(); i++) - { + for (size_t i = 0; i < keys.size(); i++) { keys[i].ToString(true, keys_quoted, s); s += ": "; vals[i].ToString(true, keys_quoted, s); - if (i < keys.size() - 1) - s += ", "; + if (i < keys.size() - 1) s += ", "; } s += " }"; - } - else if (IsVector()) - { + } else if (IsVector()) { AppendToString(s, AsVector(), keys_quoted); - } - else if (IsTypedVector()) - { + } else if (IsTypedVector()) { AppendToString(s, AsTypedVector(), keys_quoted); - } - else if (IsFixedTypedVector()) - { + } else if (IsFixedTypedVector()) { AppendToString(s, AsFixedTypedVector(), keys_quoted); - } - else if (IsBlob()) - { + } else if (IsBlob()) { auto blob = AsBlob(); - flatbuffers::EscapeString(reinterpret_cast(blob.data()), blob.size(), &s, true, - false); - } - else - { + flatbuffers::EscapeString(reinterpret_cast(blob.data()), + blob.size(), &s, true, false); + } else { s += "(?)"; } } // This function returns the empty blob if you try to read a not-blob. // Strings can be viewed as blobs too. - Blob AsBlob() const - { - if (type_ == FBT_BLOB || type_ == FBT_STRING) - { + Blob AsBlob() const { + if (type_ == FBT_BLOB || type_ == FBT_STRING) { return Blob(Indirect(), byte_width_); - } - else - { + } else { return Blob::EmptyBlob(); } } // This function returns the empty vector if you try to read a not-vector. // Maps can be viewed as vectors too. - Vector AsVector() const - { - if (type_ == FBT_VECTOR || type_ == FBT_MAP) - { + Vector AsVector() const { + if (type_ == FBT_VECTOR || type_ == FBT_MAP) { return Vector(Indirect(), byte_width_); - } - else - { + } else { return Vector::EmptyVector(); } } - TypedVector AsTypedVector() const - { - if (IsTypedVector()) - { - auto tv = TypedVector(Indirect(), byte_width_, ToTypedVectorElementType(type_)); - if (tv.type_ == FBT_STRING) - { + TypedVector AsTypedVector() const { + if (IsTypedVector()) { + auto tv = + TypedVector(Indirect(), byte_width_, ToTypedVectorElementType(type_)); + if (tv.type_ == FBT_STRING) { // These can't be accessed as strings, since we don't know the bit-width // of the size field, see the declaration of // FBT_VECTOR_STRING_DEPRECATED above for details. @@ -720,40 +627,30 @@ class Reference tv.type_ = FBT_KEY; } return tv; - } - else - { + } else { return TypedVector::EmptyTypedVector(); } } - FixedTypedVector AsFixedTypedVector() const - { - if (IsFixedTypedVector()) - { + FixedTypedVector AsFixedTypedVector() const { + if (IsFixedTypedVector()) { uint8_t len = 0; auto vtype = ToFixedTypedVectorElementType(type_, &len); return FixedTypedVector(Indirect(), byte_width_, vtype, len); - } - else - { + } else { return FixedTypedVector::EmptyFixedTypedVector(); } } - Map AsMap() const - { - if (type_ == FBT_MAP) - { + Map AsMap() const { + if (type_ == FBT_MAP) { return Map(Indirect(), byte_width_); - } - else - { + } else { return Map::EmptyMap(); } } - template T As() const; + template T As() const; // Experimental: Mutation functions. // These allow scalars in an already created buffer to be updated in-place. @@ -761,128 +658,96 @@ class Reference // the new value may not fit, in which case these functions return false. // To avoid this, you can construct the values you intend to mutate using // Builder::ForceMinimumBitWidth. - bool MutateInt(int64_t i) - { - if (type_ == FBT_INT) - { + bool MutateInt(int64_t i) { + if (type_ == FBT_INT) { return Mutate(data_, i, parent_width_, WidthI(i)); - } - else if (type_ == FBT_INDIRECT_INT) - { + } else if (type_ == FBT_INDIRECT_INT) { return Mutate(Indirect(), i, byte_width_, WidthI(i)); - } - else if (type_ == FBT_UINT) - { + } else if (type_ == FBT_UINT) { auto u = static_cast(i); return Mutate(data_, u, parent_width_, WidthU(u)); - } - else if (type_ == FBT_INDIRECT_UINT) - { + } else if (type_ == FBT_INDIRECT_UINT) { auto u = static_cast(i); return Mutate(Indirect(), u, byte_width_, WidthU(u)); - } - else - { + } else { return false; } } - bool MutateBool(bool b) - { + bool MutateBool(bool b) { return type_ == FBT_BOOL && Mutate(data_, b, parent_width_, BIT_WIDTH_8); } - bool MutateUInt(uint64_t u) - { - if (type_ == FBT_UINT) - { + bool MutateUInt(uint64_t u) { + if (type_ == FBT_UINT) { return Mutate(data_, u, parent_width_, WidthU(u)); - } - else if (type_ == FBT_INDIRECT_UINT) - { + } else if (type_ == FBT_INDIRECT_UINT) { return Mutate(Indirect(), u, byte_width_, WidthU(u)); - } - else if (type_ == FBT_INT) - { + } else if (type_ == FBT_INT) { auto i = static_cast(u); return Mutate(data_, i, parent_width_, WidthI(i)); - } - else if (type_ == FBT_INDIRECT_INT) - { + } else if (type_ == FBT_INDIRECT_INT) { auto i = static_cast(u); return Mutate(Indirect(), i, byte_width_, WidthI(i)); - } - else - { + } else { return false; } } - bool MutateFloat(float f) - { - if (type_ == FBT_FLOAT) - { + bool MutateFloat(float f) { + if (type_ == FBT_FLOAT) { return MutateF(data_, f, parent_width_, BIT_WIDTH_32); - } - else if (type_ == FBT_INDIRECT_FLOAT) - { + } else if (type_ == FBT_INDIRECT_FLOAT) { return MutateF(Indirect(), f, byte_width_, BIT_WIDTH_32); - } - else - { + } else { return false; } } - bool MutateFloat(double d) - { - if (type_ == FBT_FLOAT) - { + bool MutateFloat(double d) { + if (type_ == FBT_FLOAT) { return MutateF(data_, d, parent_width_, WidthF(d)); - } - else if (type_ == FBT_INDIRECT_FLOAT) - { + } else if (type_ == FBT_INDIRECT_FLOAT) { return MutateF(Indirect(), d, byte_width_, WidthF(d)); - } - else - { + } else { return false; } } - bool MutateString(const char *str, size_t len) - { + bool MutateString(const char *str, size_t len) { auto s = AsString(); - if (s.IsTheEmptyString()) - return false; + if (s.IsTheEmptyString()) return false; // This is very strict, could allow shorter strings, but that creates // garbage. - if (s.length() != len) - return false; + if (s.length() != len) return false; memcpy(const_cast(s.c_str()), str, len); return true; } bool MutateString(const char *str) { return MutateString(str, strlen(str)); } - bool MutateString(const std::string &str) { return MutateString(str.data(), str.length()); } + bool MutateString(const std::string &str) { + return MutateString(str.data(), str.length()); + } -private: - const uint8_t *Indirect() const { return flexbuffers::Indirect(data_, parent_width_); } + private: + const uint8_t *Indirect() const { + return flexbuffers::Indirect(data_, parent_width_); + } - template - bool Mutate(const uint8_t *dest, T t, size_t byte_width, BitWidth value_width) - { - auto fits = static_cast(static_cast(1U) << value_width) <= byte_width; - if (fits) - { + template + bool Mutate(const uint8_t *dest, T t, size_t byte_width, + BitWidth value_width) { + auto fits = static_cast(static_cast(1U) << value_width) <= + byte_width; + if (fits) { t = flatbuffers::EndianScalar(t); memcpy(const_cast(dest), &t, byte_width); } return fits; } - template - bool MutateF(const uint8_t *dest, T t, size_t byte_width, BitWidth value_width) - { + template + bool MutateF(const uint8_t *dest, T t, size_t byte_width, + BitWidth value_width) { if (byte_width == sizeof(double)) return Mutate(dest, static_cast(t), byte_width, value_width); if (byte_width == sizeof(float)) @@ -898,35 +763,43 @@ class Reference }; // Template specialization for As(). -template <> inline bool Reference::As() const { return AsBool(); } +template<> inline bool Reference::As() const { return AsBool(); } -template <> inline int8_t Reference::As() const { return AsInt8(); } -template <> inline int16_t Reference::As() const { return AsInt16(); } -template <> inline int32_t Reference::As() const { return AsInt32(); } -template <> inline int64_t Reference::As() const { return AsInt64(); } +template<> inline int8_t Reference::As() const { return AsInt8(); } +template<> inline int16_t Reference::As() const { return AsInt16(); } +template<> inline int32_t Reference::As() const { return AsInt32(); } +template<> inline int64_t Reference::As() const { return AsInt64(); } -template <> inline uint8_t Reference::As() const { return AsUInt8(); } -template <> inline uint16_t Reference::As() const { return AsUInt16(); } -template <> inline uint32_t Reference::As() const { return AsUInt32(); } -template <> inline uint64_t Reference::As() const { return AsUInt64(); } +template<> inline uint8_t Reference::As() const { return AsUInt8(); } +template<> inline uint16_t Reference::As() const { + return AsUInt16(); +} +template<> inline uint32_t Reference::As() const { + return AsUInt32(); +} +template<> inline uint64_t Reference::As() const { + return AsUInt64(); +} -template <> inline double Reference::As() const { return AsDouble(); } -template <> inline float Reference::As() const { return AsFloat(); } +template<> inline double Reference::As() const { return AsDouble(); } +template<> inline float Reference::As() const { return AsFloat(); } -template <> inline String Reference::As() const { return AsString(); } -template <> inline std::string Reference::As() const { return AsString().str(); } +template<> inline String Reference::As() const { return AsString(); } +template<> inline std::string Reference::As() const { + return AsString().str(); +} -template <> inline Blob Reference::As() const { return AsBlob(); } -template <> inline Vector Reference::As() const { return AsVector(); } -template <> inline TypedVector Reference::As() const { return AsTypedVector(); } -template <> inline FixedTypedVector Reference::As() const -{ +template<> inline Blob Reference::As() const { return AsBlob(); } +template<> inline Vector Reference::As() const { return AsVector(); } +template<> inline TypedVector Reference::As() const { + return AsTypedVector(); +} +template<> inline FixedTypedVector Reference::As() const { return AsFixedTypedVector(); } -template <> inline Map Reference::As() const { return AsMap(); } +template<> inline Map Reference::As() const { return AsMap(); } -inline uint8_t PackedType(BitWidth bit_width, Type type) -{ +inline uint8_t PackedType(BitWidth bit_width, Type type) { return static_cast(bit_width | (type << 2)); } @@ -939,84 +812,66 @@ inline uint8_t NullPackedType() { return PackedType(BIT_WIDTH_8, FBT_NULL); } // wanted 3d). // The Null converts seamlessly into a default value for any other type. // TODO(wvo): Could introduce an #ifdef that makes this into an assert? -inline Reference Vector::operator[](size_t i) const -{ +inline Reference Vector::operator[](size_t i) const { auto len = size(); - if (i >= len) - return Reference(nullptr, 1, NullPackedType()); + if (i >= len) return Reference(nullptr, 1, NullPackedType()); auto packed_type = (data_ + len * byte_width_)[i]; auto elem = data_ + i * byte_width_; return Reference(elem, byte_width_, packed_type); } -inline Reference TypedVector::operator[](size_t i) const -{ +inline Reference TypedVector::operator[](size_t i) const { auto len = size(); - if (i >= len) - return Reference(nullptr, 1, NullPackedType()); + if (i >= len) return Reference(nullptr, 1, NullPackedType()); auto elem = data_ + i * byte_width_; return Reference(elem, byte_width_, 1, type_); } -inline Reference FixedTypedVector::operator[](size_t i) const -{ - if (i >= len_) - return Reference(nullptr, 1, NullPackedType()); +inline Reference FixedTypedVector::operator[](size_t i) const { + if (i >= len_) return Reference(nullptr, 1, NullPackedType()); auto elem = data_ + i * byte_width_; return Reference(elem, byte_width_, 1, type_); } -template int KeyCompare(const void *key, const void *elem) -{ - auto str_elem = - reinterpret_cast(Indirect(reinterpret_cast(elem))); +template int KeyCompare(const void *key, const void *elem) { + auto str_elem = reinterpret_cast( + Indirect(reinterpret_cast(elem))); auto skey = reinterpret_cast(key); return strcmp(skey, str_elem); } -inline Reference Map::operator[](const char *key) const -{ +inline Reference Map::operator[](const char *key) const { auto keys = Keys(); // We can't pass keys.byte_width_ to the comparison function, so we have // to pick the right one ahead of time. int (*comp)(const void *, const void *) = nullptr; - switch (keys.byte_width_) - { - case 1: - comp = KeyCompare; - break; - case 2: - comp = KeyCompare; - break; - case 4: - comp = KeyCompare; - break; - case 8: - comp = KeyCompare; - break; + switch (keys.byte_width_) { + case 1: comp = KeyCompare; break; + case 2: comp = KeyCompare; break; + case 4: comp = KeyCompare; break; + case 8: comp = KeyCompare; break; } auto res = std::bsearch(key, keys.data_, keys.size(), keys.byte_width_, comp); - if (!res) - return Reference(nullptr, 1, NullPackedType()); + if (!res) return Reference(nullptr, 1, NullPackedType()); auto i = (reinterpret_cast(res) - keys.data_) / keys.byte_width_; return (*static_cast(this))[i]; } -inline Reference Map::operator[](const std::string &key) const { return (*this)[key.c_str()]; } +inline Reference Map::operator[](const std::string &key) const { + return (*this)[key.c_str()]; +} -inline Reference GetRoot(const uint8_t *buffer, size_t size) -{ +inline Reference GetRoot(const uint8_t *buffer, size_t size) { // See Finish() below for the serialization counterpart of this. // The root starts at the end of the buffer, so we parse backwards from there. auto end = buffer + size; auto byte_width = *--end; auto packed_type = *--end; - end -= byte_width; // The root data item. + end -= byte_width; // The root data item. return Reference(end, byte_width, packed_type); } -inline Reference GetRoot(const std::vector &buffer) -{ +inline Reference GetRoot(const std::vector &buffer) { return GetRoot(flatbuffers::vector_data(buffer), buffer.size()); } @@ -1030,8 +885,7 @@ inline Reference GetRoot(const std::vector &buffer) // Turn strings on if you expect many non-unique string values. // Additionally, sharing key vectors can save space if you have maps with // identical field populations. -enum BuilderFlag -{ +enum BuilderFlag { BUILDER_FLAG_NONE = 0, BUILDER_FLAG_SHARE_KEYS = 1, BUILDER_FLAG_SHARE_STRINGS = 2, @@ -1040,14 +894,17 @@ enum BuilderFlag BUILDER_FLAG_SHARE_ALL = 7, }; -class Builder FLATBUFFERS_FINAL_CLASS -{ -public: - Builder(size_t initial_size = 256, BuilderFlag flags = BUILDER_FLAG_SHARE_KEYS) - : buf_(initial_size), finished_(false), has_duplicate_keys_(false), flags_(flags), - force_min_bit_width_(BIT_WIDTH_8), key_pool(KeyOffsetCompare(buf_)), - string_pool(StringOffsetCompare(buf_)) - { +class Builder FLATBUFFERS_FINAL_CLASS { + public: + Builder(size_t initial_size = 256, + BuilderFlag flags = BUILDER_FLAG_SHARE_KEYS) + : buf_(initial_size), + finished_(false), + has_duplicate_keys_(false), + flags_(flags), + force_min_bit_width_(BIT_WIDTH_8), + key_pool(KeyOffsetCompare(buf_)), + string_pool(StringOffsetCompare(buf_)) { buf_.clear(); } @@ -1058,8 +915,7 @@ class Builder FLATBUFFERS_FINAL_CLASS /// @brief Get the serialized buffer (after you call `Finish()`). /// @return Returns a vector owned by this class. - const std::vector &GetBuffer() const - { + const std::vector &GetBuffer() const { Finished(); return buf_; } @@ -1068,8 +924,7 @@ class Builder FLATBUFFERS_FINAL_CLASS size_t GetSize() const { return buf_.size(); } // Reset all state so we can re-use the buffer. - void Clear() - { + void Clear() { buf_.clear(); stack_.clear(); finished_ = false; @@ -1084,91 +939,82 @@ class Builder FLATBUFFERS_FINAL_CLASS // vectors and elsewhere). void Null() { stack_.push_back(Value()); } - void Null(const char *key) - { + void Null(const char *key) { Key(key); Null(); } void Int(int64_t i) { stack_.push_back(Value(i, FBT_INT, WidthI(i))); } - void Int(const char *key, int64_t i) - { + void Int(const char *key, int64_t i) { Key(key); Int(i); } void UInt(uint64_t u) { stack_.push_back(Value(u, FBT_UINT, WidthU(u))); } - void UInt(const char *key, uint64_t u) - { + void UInt(const char *key, uint64_t u) { Key(key); UInt(u); } void Float(float f) { stack_.push_back(Value(f)); } - void Float(const char *key, float f) - { + void Float(const char *key, float f) { Key(key); Float(f); } void Double(double f) { stack_.push_back(Value(f)); } - void Double(const char *key, double d) - { + void Double(const char *key, double d) { Key(key); Double(d); } void Bool(bool b) { stack_.push_back(Value(b)); } - void Bool(const char *key, bool b) - { + void Bool(const char *key, bool b) { Key(key); Bool(b); } void IndirectInt(int64_t i) { PushIndirect(i, FBT_INDIRECT_INT, WidthI(i)); } - void IndirectInt(const char *key, int64_t i) - { + void IndirectInt(const char *key, int64_t i) { Key(key); IndirectInt(i); } - void IndirectUInt(uint64_t u) { PushIndirect(u, FBT_INDIRECT_UINT, WidthU(u)); } - void IndirectUInt(const char *key, uint64_t u) - { + void IndirectUInt(uint64_t u) { + PushIndirect(u, FBT_INDIRECT_UINT, WidthU(u)); + } + void IndirectUInt(const char *key, uint64_t u) { Key(key); IndirectUInt(u); } - void IndirectFloat(float f) { PushIndirect(f, FBT_INDIRECT_FLOAT, BIT_WIDTH_32); } - void IndirectFloat(const char *key, float f) - { + void IndirectFloat(float f) { + PushIndirect(f, FBT_INDIRECT_FLOAT, BIT_WIDTH_32); + } + void IndirectFloat(const char *key, float f) { Key(key); IndirectFloat(f); } - void IndirectDouble(double f) { PushIndirect(f, FBT_INDIRECT_FLOAT, WidthF(f)); } - void IndirectDouble(const char *key, double d) - { + void IndirectDouble(double f) { + PushIndirect(f, FBT_INDIRECT_FLOAT, WidthF(f)); + } + void IndirectDouble(const char *key, double d) { Key(key); IndirectDouble(d); } - size_t Key(const char *str, size_t len) - { + size_t Key(const char *str, size_t len) { auto sloc = buf_.size(); WriteBytes(str, len + 1); - if (flags_ & BUILDER_FLAG_SHARE_KEYS) - { + if (flags_ & BUILDER_FLAG_SHARE_KEYS) { auto it = key_pool.find(sloc); - if (it != key_pool.end()) - { + if (it != key_pool.end()) { // Already in the buffer. Remove key we just serialized, and use // existing offset instead. buf_.resize(sloc); sloc = *it; - } - else - { + } else { key_pool.insert(sloc); } } @@ -1179,52 +1025,49 @@ class Builder FLATBUFFERS_FINAL_CLASS size_t Key(const char *str) { return Key(str, strlen(str)); } size_t Key(const std::string &str) { return Key(str.c_str(), str.size()); } - size_t String(const char *str, size_t len) - { + size_t String(const char *str, size_t len) { auto reset_to = buf_.size(); auto sloc = CreateBlob(str, len, 1, FBT_STRING); - if (flags_ & BUILDER_FLAG_SHARE_STRINGS) - { + if (flags_ & BUILDER_FLAG_SHARE_STRINGS) { StringOffset so(sloc, len); auto it = string_pool.find(so); - if (it != string_pool.end()) - { + if (it != string_pool.end()) { // Already in the buffer. Remove string we just serialized, and use // existing offset instead. buf_.resize(reset_to); sloc = it->first; stack_.back().u_ = sloc; - } - else - { + } else { string_pool.insert(so); } } return sloc; } size_t String(const char *str) { return String(str, strlen(str)); } - size_t String(const std::string &str) { return String(str.c_str(), str.size()); } - void String(const flexbuffers::String &str) { String(str.c_str(), str.length()); } + size_t String(const std::string &str) { + return String(str.c_str(), str.size()); + } + void String(const flexbuffers::String &str) { + String(str.c_str(), str.length()); + } - void String(const char *key, const char *str) - { + void String(const char *key, const char *str) { Key(key); String(str); } - void String(const char *key, const std::string &str) - { + void String(const char *key, const std::string &str) { Key(key); String(str); } - void String(const char *key, const flexbuffers::String &str) - { + void String(const char *key, const flexbuffers::String &str) { Key(key); String(str); } - size_t Blob(const void *data, size_t len) { return CreateBlob(data, len, 0, FBT_BLOB); } - size_t Blob(const std::vector &v) - { + size_t Blob(const void *data, size_t len) { + return CreateBlob(data, len, 0, FBT_BLOB); + } + size_t Blob(const std::vector &v) { return CreateBlob(flatbuffers::vector_data(v), v.size(), 0, FBT_BLOB); } @@ -1233,22 +1076,19 @@ class Builder FLATBUFFERS_FINAL_CLASS // Also some FlatBuffers types? size_t StartVector() { return stack_.size(); } - size_t StartVector(const char *key) - { + size_t StartVector(const char *key) { Key(key); return stack_.size(); } size_t StartMap() { return stack_.size(); } - size_t StartMap(const char *key) - { + size_t StartMap(const char *key) { Key(key); return stack_.size(); } // TODO(wvo): allow this to specify an aligment greater than the natural // alignment. - size_t EndVector(size_t start, bool typed, bool fixed) - { + size_t EndVector(size_t start, bool typed, bool fixed) { auto vec = CreateVector(start, stack_.size() - start, 1, typed, fixed); // Remove temp elements and return vector. stack_.resize(start); @@ -1256,22 +1096,19 @@ class Builder FLATBUFFERS_FINAL_CLASS return static_cast(vec.u_); } - size_t EndMap(size_t start) - { + size_t EndMap(size_t start) { // We should have interleaved keys and values on the stack. // Make sure it is an even number: auto len = stack_.size() - start; FLATBUFFERS_ASSERT(!(len & 1)); len /= 2; // Make sure keys are all strings: - for (auto key = start; key < stack_.size(); key += 2) - { + for (auto key = start; key < stack_.size(); key += 2) { FLATBUFFERS_ASSERT(stack_[key].type_ == FBT_KEY); } // Now sort values, so later we can do a binary search lookup. // We want to sort 2 array elements at a time. - struct TwoValue - { + struct TwoValue { Value key; Value val; }; @@ -1284,24 +1121,27 @@ class Builder FLATBUFFERS_FINAL_CLASS // step automatically when appliccable, and encourage people to write in // sorted fashion. // std::sort is typically already a lot faster on sorted data though. - auto dict = reinterpret_cast(flatbuffers::vector_data(stack_) + start); - std::sort(dict, dict + len, [&](const TwoValue &a, const TwoValue &b) -> bool { - auto as = reinterpret_cast(flatbuffers::vector_data(buf_) + a.key.u_); - auto bs = reinterpret_cast(flatbuffers::vector_data(buf_) + b.key.u_); - auto comp = strcmp(as, bs); - // We want to disallow duplicate keys, since this results in a - // map where values cannot be found. - // But we can't assert here (since we don't want to fail on - // random JSON input) or have an error mechanism. - // Instead, we set has_duplicate_keys_ in the builder to - // signal this. - // TODO: Have to check for pointer equality, as some sort - // implementation apparently call this function with the same - // element?? Why? - if (!comp && &a != &b) - has_duplicate_keys_ = true; - return comp < 0; - }); + auto dict = + reinterpret_cast(flatbuffers::vector_data(stack_) + start); + std::sort(dict, dict + len, + [&](const TwoValue &a, const TwoValue &b) -> bool { + auto as = reinterpret_cast( + flatbuffers::vector_data(buf_) + a.key.u_); + auto bs = reinterpret_cast( + flatbuffers::vector_data(buf_) + b.key.u_); + auto comp = strcmp(as, bs); + // We want to disallow duplicate keys, since this results in a + // map where values cannot be found. + // But we can't assert here (since we don't want to fail on + // random JSON input) or have an error mechanism. + // Instead, we set has_duplicate_keys_ in the builder to + // signal this. + // TODO: Have to check for pointer equality, as some sort + // implementation apparently call this function with the same + // element?? Why? + if (!comp && &a != &b) has_duplicate_keys_ = true; + return comp < 0; + }); // First create a vector out of all keys. // TODO(wvo): if kBuilderFlagShareKeyVectors is true, see if we can share // the first vector. @@ -1317,83 +1157,70 @@ class Builder FLATBUFFERS_FINAL_CLASS // Any map with such keys won't be able to retrieve all values. bool HasDuplicateKeys() const { return has_duplicate_keys_; } - template size_t Vector(F f) - { + template size_t Vector(F f) { auto start = StartVector(); f(); return EndVector(start, false, false); } - template size_t Vector(F f, T &state) - { + template size_t Vector(F f, T &state) { auto start = StartVector(); f(state); return EndVector(start, false, false); } - template size_t Vector(const char *key, F f) - { + template size_t Vector(const char *key, F f) { auto start = StartVector(key); f(); return EndVector(start, false, false); } - template size_t Vector(const char *key, F f, T &state) - { + template + size_t Vector(const char *key, F f, T &state) { auto start = StartVector(key); f(state); return EndVector(start, false, false); } - template void Vector(const T *elems, size_t len) - { - if (flatbuffers::is_scalar::value) - { + template void Vector(const T *elems, size_t len) { + if (flatbuffers::is_scalar::value) { // This path should be a lot quicker and use less space. ScalarVector(elems, len, false); - } - else - { + } else { auto start = StartVector(); - for (size_t i = 0; i < len; i++) - Add(elems[i]); + for (size_t i = 0; i < len; i++) Add(elems[i]); EndVector(start, false, false); } } - template void Vector(const char *key, const T *elems, size_t len) - { + template + void Vector(const char *key, const T *elems, size_t len) { Key(key); Vector(elems, len); } - template void Vector(const std::vector &vec) - { + template void Vector(const std::vector &vec) { Vector(flatbuffers::vector_data(vec), vec.size()); } - template size_t TypedVector(F f) - { + template size_t TypedVector(F f) { auto start = StartVector(); f(); return EndVector(start, true, false); } - template size_t TypedVector(F f, T &state) - { + template size_t TypedVector(F f, T &state) { auto start = StartVector(); f(state); return EndVector(start, true, false); } - template size_t TypedVector(const char *key, F f) - { + template size_t TypedVector(const char *key, F f) { auto start = StartVector(key); f(); return EndVector(start, true, false); } - template size_t TypedVector(const char *key, F f, T &state) - { + template + size_t TypedVector(const char *key, F f, T &state) { auto start = StartVector(key); f(state); return EndVector(start, true, false); } - template size_t FixedTypedVector(const T *elems, size_t len) - { + template size_t FixedTypedVector(const T *elems, size_t len) { // We only support a few fixed vector lengths. Anything bigger use a // regular typed vector. FLATBUFFERS_ASSERT(len >= 2 && len <= 4); @@ -1402,38 +1229,33 @@ class Builder FLATBUFFERS_FINAL_CLASS return ScalarVector(elems, len, true); } - template size_t FixedTypedVector(const char *key, const T *elems, size_t len) - { + template + size_t FixedTypedVector(const char *key, const T *elems, size_t len) { Key(key); return FixedTypedVector(elems, len); } - template size_t Map(F f) - { + template size_t Map(F f) { auto start = StartMap(); f(); return EndMap(start); } - template size_t Map(F f, T &state) - { + template size_t Map(F f, T &state) { auto start = StartMap(); f(state); return EndMap(start); } - template size_t Map(const char *key, F f) - { + template size_t Map(const char *key, F f) { auto start = StartMap(key); f(); return EndMap(start); } - template size_t Map(const char *key, F f, T &state) - { + template size_t Map(const char *key, F f, T &state) { auto start = StartMap(key); f(state); return EndMap(start); } - template void Map(const std::map &map) - { + template void Map(const std::map &map) { auto start = StartMap(); for (auto it = map.begin(); it != map.end(); ++it) Add(it->first.c_str(), it->second); @@ -1453,8 +1275,7 @@ class Builder FLATBUFFERS_FINAL_CLASS struct Value; Value LastValue() { return stack_.back(); } void ReuseValue(Value v) { stack_.push_back(v); } - void ReuseValue(const char *key, Value v) - { + void ReuseValue(const char *key, Value v) { Key(key); ReuseValue(v); } @@ -1475,26 +1296,28 @@ class Builder FLATBUFFERS_FINAL_CLASS void Add(const std::string &str) { String(str); } void Add(const flexbuffers::String &str) { String(str); } - template void Add(const std::vector &vec) { Vector(vec); } + template void Add(const std::vector &vec) { Vector(vec); } - template void Add(const char *key, const T &t) - { + template void Add(const char *key, const T &t) { Key(key); Add(t); } - template void Add(const std::map &map) { Map(map); } + template void Add(const std::map &map) { + Map(map); + } - template void operator+=(const T &t) { Add(t); } + template void operator+=(const T &t) { Add(t); } // This function is useful in combination with the Mutate* functions above. // It forces elements of vectors and maps to have a minimum size, such that // they can later be updated without failing. // Call with no arguments to reset. - void ForceMinimumBitWidth(BitWidth bw = BIT_WIDTH_8) { force_min_bit_width_ = bw; } + void ForceMinimumBitWidth(BitWidth bw = BIT_WIDTH_8) { + force_min_bit_width_ = bw; + } - void Finish() - { + void Finish() { // If you hit this assert, you likely have objects that were never included // in a parent. You need to have exactly one root to finish a buffer. // Check your Start/End calls are matched, and all objects are inside @@ -1512,9 +1335,8 @@ class Builder FLATBUFFERS_FINAL_CLASS finished_ = true; } -private: - void Finished() const - { + private: + void Finished() const { // If you get this assert, you're attempting to get access a buffer // which hasn't been finished yet. Be sure to call // Builder::Finish with your root object. @@ -1522,90 +1344,70 @@ class Builder FLATBUFFERS_FINAL_CLASS } // Align to prepare for writing a scalar with a certain size. - uint8_t Align(BitWidth alignment) - { + uint8_t Align(BitWidth alignment) { auto byte_width = 1U << alignment; - buf_.insert(buf_.end(), flatbuffers::PaddingBytes(buf_.size(), byte_width), 0); + buf_.insert(buf_.end(), flatbuffers::PaddingBytes(buf_.size(), byte_width), + 0); return static_cast(byte_width); } - void WriteBytes(const void *val, size_t size) - { + void WriteBytes(const void *val, size_t size) { buf_.insert(buf_.end(), reinterpret_cast(val), reinterpret_cast(val) + size); } - template void Write(T val, size_t byte_width) - { + template void Write(T val, size_t byte_width) { FLATBUFFERS_ASSERT(sizeof(T) >= byte_width); val = flatbuffers::EndianScalar(val); WriteBytes(&val, byte_width); } - void WriteDouble(double f, uint8_t byte_width) - { - switch (byte_width) - { - case 8: - Write(f, byte_width); - break; - case 4: - Write(static_cast(f), byte_width); - break; + void WriteDouble(double f, uint8_t byte_width) { + switch (byte_width) { + case 8: Write(f, byte_width); break; + case 4: Write(static_cast(f), byte_width); break; // case 2: Write(static_cast(f), byte_width); break; // case 1: Write(static_cast(f), byte_width); break; - default: - FLATBUFFERS_ASSERT(0); + default: FLATBUFFERS_ASSERT(0); } } - void WriteOffset(uint64_t o, uint8_t byte_width) - { + void WriteOffset(uint64_t o, uint8_t byte_width) { auto reloff = buf_.size() - o; FLATBUFFERS_ASSERT(byte_width == 8 || reloff < 1ULL << (byte_width * 8)); Write(reloff, byte_width); } - template void PushIndirect(T val, Type type, BitWidth bit_width) - { + template void PushIndirect(T val, Type type, BitWidth bit_width) { auto byte_width = Align(bit_width); auto iloc = buf_.size(); Write(val, byte_width); stack_.push_back(Value(static_cast(iloc), type, bit_width)); } - static BitWidth WidthB(size_t byte_width) - { - switch (byte_width) - { - case 1: - return BIT_WIDTH_8; - case 2: - return BIT_WIDTH_16; - case 4: - return BIT_WIDTH_32; - case 8: - return BIT_WIDTH_64; - default: - FLATBUFFERS_ASSERT(false); - return BIT_WIDTH_64; + static BitWidth WidthB(size_t byte_width) { + switch (byte_width) { + case 1: return BIT_WIDTH_8; + case 2: return BIT_WIDTH_16; + case 4: return BIT_WIDTH_32; + case 8: return BIT_WIDTH_64; + default: FLATBUFFERS_ASSERT(false); return BIT_WIDTH_64; } } - template static Type GetScalarType() - { + template static Type GetScalarType() { static_assert(flatbuffers::is_scalar::value, "Unrelated types"); return flatbuffers::is_floating_point::value - ? FBT_FLOAT - : flatbuffers::is_same::value - ? FBT_BOOL - : (flatbuffers::is_unsigned::value ? FBT_UINT : FBT_INT); + ? FBT_FLOAT + : flatbuffers::is_same::value + ? FBT_BOOL + : (flatbuffers::is_unsigned::value ? FBT_UINT + : FBT_INT); } -public: + public: // This was really intended to be private, except for LastValue/ReuseValue. - struct Value - { + struct Value { union { int64_t i_; uint64_t u_; @@ -1619,87 +1421,77 @@ class Builder FLATBUFFERS_FINAL_CLASS Value() : i_(0), type_(FBT_NULL), min_bit_width_(BIT_WIDTH_8) {} - Value(bool b) : u_(static_cast(b)), type_(FBT_BOOL), min_bit_width_(BIT_WIDTH_8) {} + Value(bool b) + : u_(static_cast(b)), + type_(FBT_BOOL), + min_bit_width_(BIT_WIDTH_8) {} - Value(int64_t i, Type t, BitWidth bw) : i_(i), type_(t), min_bit_width_(bw) {} - Value(uint64_t u, Type t, BitWidth bw) : u_(u), type_(t), min_bit_width_(bw) {} + Value(int64_t i, Type t, BitWidth bw) + : i_(i), type_(t), min_bit_width_(bw) {} + Value(uint64_t u, Type t, BitWidth bw) + : u_(u), type_(t), min_bit_width_(bw) {} - Value(float f) : f_(static_cast(f)), type_(FBT_FLOAT), min_bit_width_(BIT_WIDTH_32) {} + Value(float f) + : f_(static_cast(f)), + type_(FBT_FLOAT), + min_bit_width_(BIT_WIDTH_32) {} Value(double f) : f_(f), type_(FBT_FLOAT), min_bit_width_(WidthF(f)) {} - uint8_t StoredPackedType(BitWidth parent_bit_width_ = BIT_WIDTH_8) const - { + uint8_t StoredPackedType(BitWidth parent_bit_width_ = BIT_WIDTH_8) const { return PackedType(StoredWidth(parent_bit_width_), type_); } - BitWidth ElemWidth(size_t buf_size, size_t elem_index) const - { - if (IsInline(type_)) - { + BitWidth ElemWidth(size_t buf_size, size_t elem_index) const { + if (IsInline(type_)) { return min_bit_width_; - } - else - { + } else { // We have an absolute offset, but want to store a relative offset // elem_index elements beyond the current buffer end. Since whether // the relative offset fits in a certain byte_width depends on // the size of the elements before it (and their alignment), we have // to test for each size in turn. - for (size_t byte_width = 1; byte_width <= sizeof(flatbuffers::largest_scalar_t); - byte_width *= 2) - { + for (size_t byte_width = 1; + byte_width <= sizeof(flatbuffers::largest_scalar_t); + byte_width *= 2) { // Where are we going to write this offset? - auto offset_loc = - buf_size + flatbuffers::PaddingBytes(buf_size, byte_width) + elem_index * byte_width; + auto offset_loc = buf_size + + flatbuffers::PaddingBytes(buf_size, byte_width) + + elem_index * byte_width; // Compute relative offset. auto offset = offset_loc - u_; // Does it fit? auto bit_width = WidthU(offset); - if (static_cast(static_cast(1U) << bit_width) == byte_width) + if (static_cast(static_cast(1U) << bit_width) == + byte_width) return bit_width; } - FLATBUFFERS_ASSERT(false); // Must match one of the sizes above. + FLATBUFFERS_ASSERT(false); // Must match one of the sizes above. return BIT_WIDTH_64; } } - BitWidth StoredWidth(BitWidth parent_bit_width_ = BIT_WIDTH_8) const - { - if (IsInline(type_)) - { + BitWidth StoredWidth(BitWidth parent_bit_width_ = BIT_WIDTH_8) const { + if (IsInline(type_)) { return (std::max)(min_bit_width_, parent_bit_width_); - } - else - { + } else { return min_bit_width_; } } }; -private: - void WriteAny(const Value &val, uint8_t byte_width) - { - switch (val.type_) - { + private: + void WriteAny(const Value &val, uint8_t byte_width) { + switch (val.type_) { case FBT_NULL: - case FBT_INT: - Write(val.i_, byte_width); - break; + case FBT_INT: Write(val.i_, byte_width); break; case FBT_BOOL: - case FBT_UINT: - Write(val.u_, byte_width); - break; - case FBT_FLOAT: - WriteDouble(val.f_, byte_width); - break; - default: - WriteOffset(val.u_, byte_width); - break; + case FBT_UINT: Write(val.u_, byte_width); break; + case FBT_FLOAT: WriteDouble(val.f_, byte_width); break; + default: WriteOffset(val.u_, byte_width); break; } } - size_t CreateBlob(const void *data, size_t len, size_t trailing, Type type) - { + size_t CreateBlob(const void *data, size_t len, size_t trailing, Type type) { auto bit_width = WidthU(len); auto byte_width = Align(bit_width); Write(len, byte_width); @@ -1709,8 +1501,8 @@ class Builder FLATBUFFERS_FINAL_CLASS return sloc; } - template size_t ScalarVector(const T *elems, size_t len, bool fixed) - { + template + size_t ScalarVector(const T *elems, size_t len, bool fixed) { auto vector_type = GetScalarType(); auto byte_width = sizeof(T); auto bit_width = WidthB(byte_width); @@ -1721,25 +1513,24 @@ class Builder FLATBUFFERS_FINAL_CLASS // instead, though that would be wasteful. FLATBUFFERS_ASSERT(WidthU(len) <= bit_width); Align(bit_width); - if (!fixed) - Write(len, byte_width); + if (!fixed) Write(len, byte_width); auto vloc = buf_.size(); - for (size_t i = 0; i < len; i++) - Write(elems[i], byte_width); - stack_.push_back( - Value(static_cast(vloc), ToTypedVector(vector_type, fixed ? len : 0), bit_width)); + for (size_t i = 0; i < len; i++) Write(elems[i], byte_width); + stack_.push_back(Value(static_cast(vloc), + ToTypedVector(vector_type, fixed ? len : 0), + bit_width)); return vloc; } - Value CreateVector(size_t start, size_t vec_len, size_t step, bool typed, bool fixed, - const Value *keys = nullptr) - { - FLATBUFFERS_ASSERT(!fixed || typed); // typed=false, fixed=true combination is not supported. + Value CreateVector(size_t start, size_t vec_len, size_t step, bool typed, + bool fixed, const Value *keys = nullptr) { + FLATBUFFERS_ASSERT( + !fixed || + typed); // typed=false, fixed=true combination is not supported. // Figure out smallest bit width we can store this vector with. auto bit_width = (std::max)(force_min_bit_width_, WidthU(vec_len)); auto prefix_elems = 1; - if (keys) - { + if (keys) { // If this vector is part of a map, we will pre-fix an offset to the keys // to this vector. bit_width = (std::max)(bit_width, keys->ElemWidth(buf_.size(), 0)); @@ -1747,18 +1538,14 @@ class Builder FLATBUFFERS_FINAL_CLASS } Type vector_type = FBT_KEY; // Check bit widths and types for all elements. - for (size_t i = start; i < stack_.size(); i += step) - { - auto elem_width = stack_[i].ElemWidth(buf_.size(), i - start + prefix_elems); + for (size_t i = start; i < stack_.size(); i += step) { + auto elem_width = + stack_[i].ElemWidth(buf_.size(), i - start + prefix_elems); bit_width = (std::max)(bit_width, elem_width); - if (typed) - { - if (i == start) - { + if (typed) { + if (i == start) { vector_type = stack_[i].type_; - } - else - { + } else { // If you get this assert, you are writing a typed vector with // elements that are not all the same type. FLATBUFFERS_ASSERT(vector_type == stack_[i].type_); @@ -1770,30 +1557,26 @@ class Builder FLATBUFFERS_FINAL_CLASS FLATBUFFERS_ASSERT(!fixed || IsTypedVectorElementType(vector_type)); auto byte_width = Align(bit_width); // Write vector. First the keys width/offset if available, and size. - if (keys) - { + if (keys) { WriteOffset(keys->u_, byte_width); Write(1ULL << keys->min_bit_width_, byte_width); } - if (!fixed) - Write(vec_len, byte_width); + if (!fixed) Write(vec_len, byte_width); // Then the actual data. auto vloc = buf_.size(); - for (size_t i = start; i < stack_.size(); i += step) - { + for (size_t i = start; i < stack_.size(); i += step) { WriteAny(stack_[i], byte_width); } // Then the types. - if (!typed) - { - for (size_t i = start; i < stack_.size(); i += step) - { + if (!typed) { + for (size_t i = start; i < stack_.size(); i += step) { buf_.push_back(stack_[i].StoredPackedType(bit_width)); } } return Value(static_cast(vloc), keys ? FBT_MAP - : (typed ? ToTypedVector(vector_type, fixed ? vec_len : 0) : FBT_VECTOR), + : (typed ? ToTypedVector(vector_type, fixed ? vec_len : 0) + : FBT_VECTOR), bit_width); } @@ -1811,26 +1594,27 @@ class Builder FLATBUFFERS_FINAL_CLASS BitWidth force_min_bit_width_; - struct KeyOffsetCompare - { + struct KeyOffsetCompare { explicit KeyOffsetCompare(const std::vector &buf) : buf_(&buf) {} - bool operator()(size_t a, size_t b) const - { - auto stra = reinterpret_cast(flatbuffers::vector_data(*buf_) + a); - auto strb = reinterpret_cast(flatbuffers::vector_data(*buf_) + b); + bool operator()(size_t a, size_t b) const { + auto stra = + reinterpret_cast(flatbuffers::vector_data(*buf_) + a); + auto strb = + reinterpret_cast(flatbuffers::vector_data(*buf_) + b); return strcmp(stra, strb) < 0; } const std::vector *buf_; }; typedef std::pair StringOffset; - struct StringOffsetCompare - { - explicit StringOffsetCompare(const std::vector &buf) : buf_(&buf) {} - bool operator()(const StringOffset &a, const StringOffset &b) const - { - auto stra = reinterpret_cast(flatbuffers::vector_data(*buf_) + a.first); - auto strb = reinterpret_cast(flatbuffers::vector_data(*buf_) + b.first); + struct StringOffsetCompare { + explicit StringOffsetCompare(const std::vector &buf) + : buf_(&buf) {} + bool operator()(const StringOffset &a, const StringOffset &b) const { + auto stra = reinterpret_cast( + flatbuffers::vector_data(*buf_) + a.first); + auto strb = reinterpret_cast( + flatbuffers::vector_data(*buf_) + b.first); return strncmp(stra, strb, (std::min)(a.second, b.second) + 1) < 0; } const std::vector *buf_; @@ -1843,10 +1627,10 @@ class Builder FLATBUFFERS_FINAL_CLASS StringOffsetMap string_pool; }; -} // namespace flexbuffers +} // namespace flexbuffers #if defined(_MSC_VER) -#pragma warning(pop) +# pragma warning(pop) #endif -#endif // FLATBUFFERS_FLEXBUFFERS_H_ +#endif // FLATBUFFERS_FLEXBUFFERS_H_ diff --git a/onert-micro/externals/flatbuffers/grpc.h b/onert-micro/externals/flatbuffers/grpc.h index 184c89e08c1..b7935551c79 100644 --- a/onert-micro/externals/flatbuffers/grpc.h +++ b/onert-micro/externals/flatbuffers/grpc.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,30 +23,29 @@ #include "grpc/byte_buffer_reader.h" #include "grpcpp/support/byte_buffer.h" -namespace flatbuffers -{ -namespace grpc -{ +namespace flatbuffers { +namespace grpc { // Message is a typed wrapper around a buffer that manages the underlying // `grpc_slice` and also provides flatbuffers-specific helpers such as `Verify` // and `GetRoot`. Since it is backed by a `grpc_slice`, the underlying buffer // is refcounted and ownership is be managed automatically. -template class Message -{ -public: +template class Message { + public: Message() : slice_(grpc_empty_slice()) {} - Message(grpc_slice slice, bool add_ref) : slice_(add_ref ? grpc_slice_ref(slice) : slice) {} + Message(grpc_slice slice, bool add_ref) + : slice_(add_ref ? grpc_slice_ref(slice) : slice) {} Message &operator=(const Message &other) = delete; - Message(Message &&other) : slice_(other.slice_) { other.slice_ = grpc_empty_slice(); } + Message(Message &&other) : slice_(other.slice_) { + other.slice_ = grpc_empty_slice(); + } Message(const Message &other) = delete; - Message &operator=(Message &&other) - { + Message &operator=(Message &&other) { grpc_slice_unref(slice_); slice_ = other.slice_; other.slice_ = grpc_empty_slice(); @@ -62,8 +60,7 @@ template class Message size_t size() const { return GRPC_SLICE_LENGTH(slice_); } - bool Verify() const - { + bool Verify() const { Verifier verifier(data(), size()); return verifier.VerifyBuffer(nullptr); } @@ -75,7 +72,7 @@ template class Message // This is only intended for serializer use, or if you know what you're doing const grpc_slice &BorrowSlice() const { return slice_; } -private: + private: grpc_slice slice_; }; @@ -84,69 +81,63 @@ class MessageBuilder; // SliceAllocator is a gRPC-specific allocator that uses the `grpc_slice` // refcounted slices to manage memory ownership. This makes it easy and // efficient to transfer buffers to gRPC. -class SliceAllocator : public Allocator -{ -public: +class SliceAllocator : public Allocator { + public: SliceAllocator() : slice_(grpc_empty_slice()) {} SliceAllocator(const SliceAllocator &other) = delete; SliceAllocator &operator=(const SliceAllocator &other) = delete; - SliceAllocator(SliceAllocator &&other) : slice_(grpc_empty_slice()) - { + SliceAllocator(SliceAllocator &&other) : slice_(grpc_empty_slice()) { // default-construct and swap idiom swap(other); } - SliceAllocator &operator=(SliceAllocator &&other) - { + SliceAllocator &operator=(SliceAllocator &&other) { // move-construct and swap idiom SliceAllocator temp(std::move(other)); swap(temp); return *this; } - void swap(SliceAllocator &other) - { + void swap(SliceAllocator &other) { using std::swap; swap(slice_, other.slice_); } virtual ~SliceAllocator() { grpc_slice_unref(slice_); } - virtual uint8_t *allocate(size_t size) override - { + virtual uint8_t *allocate(size_t size) override { FLATBUFFERS_ASSERT(GRPC_SLICE_IS_EMPTY(slice_)); slice_ = grpc_slice_malloc(size); return GRPC_SLICE_START_PTR(slice_); } - virtual void deallocate(uint8_t *p, size_t size) override - { + virtual void deallocate(uint8_t *p, size_t size) override { FLATBUFFERS_ASSERT(p == GRPC_SLICE_START_PTR(slice_)); FLATBUFFERS_ASSERT(size == GRPC_SLICE_LENGTH(slice_)); grpc_slice_unref(slice_); slice_ = grpc_empty_slice(); } - virtual uint8_t *reallocate_downward(uint8_t *old_p, size_t old_size, size_t new_size, - size_t in_use_back, size_t in_use_front) override - { + virtual uint8_t *reallocate_downward(uint8_t *old_p, size_t old_size, + size_t new_size, size_t in_use_back, + size_t in_use_front) override { FLATBUFFERS_ASSERT(old_p == GRPC_SLICE_START_PTR(slice_)); FLATBUFFERS_ASSERT(old_size == GRPC_SLICE_LENGTH(slice_)); FLATBUFFERS_ASSERT(new_size > old_size); grpc_slice old_slice = slice_; grpc_slice new_slice = grpc_slice_malloc(new_size); uint8_t *new_p = GRPC_SLICE_START_PTR(new_slice); - memcpy_downward(old_p, old_size, new_p, new_size, in_use_back, in_use_front); + memcpy_downward(old_p, old_size, new_p, new_size, in_use_back, + in_use_front); slice_ = new_slice; grpc_slice_unref(old_slice); return new_p; } -private: - grpc_slice &get_slice(uint8_t *p, size_t size) - { + private: + grpc_slice &get_slice(uint8_t *p, size_t size) { FLATBUFFERS_ASSERT(p == GRPC_SLICE_START_PTR(slice_)); FLATBUFFERS_ASSERT(size == GRPC_SLICE_LENGTH(slice_)); return slice_; @@ -160,48 +151,41 @@ class SliceAllocator : public Allocator // SliceAllocatorMember is a hack to ensure that the MessageBuilder's // slice_allocator_ member is constructed before the FlatBufferBuilder, since // the allocator is used in the FlatBufferBuilder ctor. -namespace detail -{ -struct SliceAllocatorMember -{ +namespace detail { +struct SliceAllocatorMember { SliceAllocator slice_allocator_; }; -} // namespace detail +} // namespace detail // MessageBuilder is a gRPC-specific FlatBufferBuilder that uses SliceAllocator // to allocate gRPC buffers. -class MessageBuilder : private detail::SliceAllocatorMember, public FlatBufferBuilder -{ -public: +class MessageBuilder : private detail::SliceAllocatorMember, + public FlatBufferBuilder { + public: explicit MessageBuilder(uoffset_t initial_size = 1024) - : FlatBufferBuilder(initial_size, &slice_allocator_, false) - { - } + : FlatBufferBuilder(initial_size, &slice_allocator_, false) {} MessageBuilder(const MessageBuilder &other) = delete; MessageBuilder &operator=(const MessageBuilder &other) = delete; - MessageBuilder(MessageBuilder &&other) : FlatBufferBuilder(1024, &slice_allocator_, false) - { + MessageBuilder(MessageBuilder &&other) + : FlatBufferBuilder(1024, &slice_allocator_, false) { // Default construct and swap idiom. Swap(other); } /// Create a MessageBuilder from a FlatBufferBuilder. explicit MessageBuilder(FlatBufferBuilder &&src, - void (*dealloc)(void *, size_t) = &DefaultAllocator::dealloc) - : FlatBufferBuilder(1024, &slice_allocator_, false) - { + void (*dealloc)(void *, + size_t) = &DefaultAllocator::dealloc) + : FlatBufferBuilder(1024, &slice_allocator_, false) { src.Swap(*this); src.SwapBufAllocator(*this); - if (buf_.capacity()) - { - uint8_t *buf = buf_.scratch_data(); // pointer to memory - size_t capacity = buf_.capacity(); // size of memory + if (buf_.capacity()) { + uint8_t *buf = buf_.scratch_data(); // pointer to memory + size_t capacity = buf_.capacity(); // size of memory slice_allocator_.slice_ = grpc_slice_new_with_len(buf, capacity, dealloc); - } - else - { + } else { slice_allocator_.slice_ = grpc_empty_slice(); } } @@ -209,24 +193,21 @@ class MessageBuilder : private detail::SliceAllocatorMember, public FlatBufferBu /// Move-assign a FlatBufferBuilder to a MessageBuilder. /// Only FlatBufferBuilder with default allocator (basically, nullptr) is /// supported. - MessageBuilder &operator=(FlatBufferBuilder &&src) - { + MessageBuilder &operator=(FlatBufferBuilder &&src) { // Move construct a temporary and swap MessageBuilder temp(std::move(src)); Swap(temp); return *this; } - MessageBuilder &operator=(MessageBuilder &&other) - { + MessageBuilder &operator=(MessageBuilder &&other) { // Move construct a temporary and swap MessageBuilder temp(std::move(other)); Swap(temp); return *this; } - void Swap(MessageBuilder &other) - { + void Swap(MessageBuilder &other) { slice_allocator_.swap(other.slice_allocator_); FlatBufferBuilder::Swap(other); // After swapping the FlatBufferBuilder, we swap back the allocator, which @@ -240,8 +221,7 @@ class MessageBuilder : private detail::SliceAllocatorMember, public FlatBufferBu // Releases the ownership of the buffer pointer. // Returns the size, offset, and the original grpc_slice that // allocated the buffer. Also see grpc_slice_unref(). - uint8_t *ReleaseRaw(size_t &size, size_t &offset, grpc_slice &slice) - { + uint8_t *ReleaseRaw(size_t &size, size_t &offset, grpc_slice &slice) { uint8_t *buf = FlatBufferBuilder::ReleaseRaw(size, offset); slice = slice_allocator_.slice_; slice_allocator_.slice_ = grpc_empty_slice(); @@ -253,12 +233,11 @@ class MessageBuilder : private detail::SliceAllocatorMember, public FlatBufferBu // GetMessage extracts the subslice of the buffer corresponding to the // flatbuffers-encoded region and wraps it in a `Message` to handle buffer // ownership. - template Message GetMessage() - { - auto buf_data = buf_.scratch_data(); // pointer to memory - auto buf_size = buf_.capacity(); // size of memory - auto msg_data = buf_.data(); // pointer to msg - auto msg_size = buf_.size(); // size of msg + template Message GetMessage() { + auto buf_data = buf_.scratch_data(); // pointer to memory + auto buf_size = buf_.capacity(); // size of memory + auto msg_data = buf_.data(); // pointer to msg + auto msg_size = buf_.size(); // size of msg // Do some sanity checks on data/size FLATBUFFERS_ASSERT(msg_data); FLATBUFFERS_ASSERT(msg_size); @@ -276,29 +255,25 @@ class MessageBuilder : private detail::SliceAllocatorMember, public FlatBufferBu return msg; } - template Message ReleaseMessage() - { + template Message ReleaseMessage() { Message msg = GetMessage(); Reset(); return msg; } -private: + private: // SliceAllocator slice_allocator_; // part of SliceAllocatorMember }; -} // namespace grpc -} // namespace flatbuffers +} // namespace grpc +} // namespace flatbuffers -namespace grpc -{ +namespace grpc { -template class SerializationTraits> -{ -public: - static grpc::Status Serialize(const flatbuffers::grpc::Message &msg, grpc_byte_buffer **buffer, - bool *own_buffer) - { +template class SerializationTraits> { + public: + static grpc::Status Serialize(const flatbuffers::grpc::Message &msg, + grpc_byte_buffer **buffer, bool *own_buffer) { // We are passed in a `Message`, which is a wrapper around a // `grpc_slice`. We extract it here using `BorrowSlice()`. The const cast // is necessary because the `grpc_raw_byte_buffer_create` func expects @@ -312,24 +287,21 @@ template class SerializationTraits> } // Deserialize by pulling the - static grpc::Status Deserialize(ByteBuffer *buf, flatbuffers::grpc::Message *msg) - { + static grpc::Status Deserialize(ByteBuffer *buf, + flatbuffers::grpc::Message *msg) { grpc_byte_buffer *buffer = *reinterpret_cast(buf); - if (!buffer) - { + if (!buffer) { return ::grpc::Status(::grpc::StatusCode::INTERNAL, "No payload"); } // Check if this is a single uncompressed slice. - if ((buffer->type == GRPC_BB_RAW) && (buffer->data.raw.compression == GRPC_COMPRESS_NONE) && - (buffer->data.raw.slice_buffer.count == 1)) - { + if ((buffer->type == GRPC_BB_RAW) && + (buffer->data.raw.compression == GRPC_COMPRESS_NONE) && + (buffer->data.raw.slice_buffer.count == 1)) { // If it is, then we can reference the `grpc_slice` directly. grpc_slice slice = buffer->data.raw.slice_buffer.slices[0]; // We wrap a `Message` around the slice, incrementing the refcount. *msg = flatbuffers::grpc::Message(slice, true); - } - else - { + } else { // Otherwise, we need to use `grpc_byte_buffer_reader_readall` to read // `buffer` into a single contiguous `grpc_slice`. The gRPC reader gives // us back a new slice with the refcount already incremented. @@ -344,18 +316,16 @@ template class SerializationTraits> #if FLATBUFFERS_GRPC_DISABLE_AUTO_VERIFICATION return ::grpc::Status::OK; #else - if (msg->Verify()) - { + if (msg->Verify()) { return ::grpc::Status::OK; - } - else - { - return ::grpc::Status(::grpc::StatusCode::INTERNAL, "Message verification failed"); + } else { + return ::grpc::Status(::grpc::StatusCode::INTERNAL, + "Message verification failed"); } #endif } }; -} // namespace grpc +} // namespace grpc -#endif // FLATBUFFERS_GRPC_H_ +#endif // FLATBUFFERS_GRPC_H_ diff --git a/onert-micro/externals/flatbuffers/hash.h b/onert-micro/externals/flatbuffers/hash.h index a83c0ff2098..aebf0713fd9 100644 --- a/onert-micro/externals/flatbuffers/hash.h +++ b/onert-micro/externals/flatbuffers/hash.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2015 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,63 +22,52 @@ #include "flatbuffers/flatbuffers.h" -namespace flatbuffers -{ +namespace flatbuffers { -template struct FnvTraits -{ +template struct FnvTraits { static const T kFnvPrime; static const T kOffsetBasis; }; -template <> struct FnvTraits -{ +template<> struct FnvTraits { static const uint32_t kFnvPrime = 0x01000193; static const uint32_t kOffsetBasis = 0x811C9DC5; }; -template <> struct FnvTraits -{ +template<> struct FnvTraits { static const uint64_t kFnvPrime = 0x00000100000001b3ULL; static const uint64_t kOffsetBasis = 0xcbf29ce484222645ULL; }; -template T HashFnv1(const char *input) -{ +template T HashFnv1(const char *input) { T hash = FnvTraits::kOffsetBasis; - for (const char *c = input; *c; ++c) - { + for (const char *c = input; *c; ++c) { hash *= FnvTraits::kFnvPrime; hash ^= static_cast(*c); } return hash; } -template T HashFnv1a(const char *input) -{ +template T HashFnv1a(const char *input) { T hash = FnvTraits::kOffsetBasis; - for (const char *c = input; *c; ++c) - { + for (const char *c = input; *c; ++c) { hash ^= static_cast(*c); hash *= FnvTraits::kFnvPrime; } return hash; } -template <> inline uint16_t HashFnv1(const char *input) -{ +template<> inline uint16_t HashFnv1(const char *input) { uint32_t hash = HashFnv1(input); return (hash >> 16) ^ (hash & 0xffff); } -template <> inline uint16_t HashFnv1a(const char *input) -{ +template<> inline uint16_t HashFnv1a(const char *input) { uint32_t hash = HashFnv1a(input); return (hash >> 16) ^ (hash & 0xffff); } -template struct NamedHashFunction -{ +template struct NamedHashFunction { const char *name; typedef T (*HashFunction)(const char *); @@ -87,59 +75,53 @@ template struct NamedHashFunction }; const NamedHashFunction kHashFunctions16[] = { - {"fnv1_16", HashFnv1}, - {"fnv1a_16", HashFnv1a}, + { "fnv1_16", HashFnv1 }, + { "fnv1a_16", HashFnv1a }, }; const NamedHashFunction kHashFunctions32[] = { - {"fnv1_32", HashFnv1}, - {"fnv1a_32", HashFnv1a}, + { "fnv1_32", HashFnv1 }, + { "fnv1a_32", HashFnv1a }, }; const NamedHashFunction kHashFunctions64[] = { - {"fnv1_64", HashFnv1}, - {"fnv1a_64", HashFnv1a}, + { "fnv1_64", HashFnv1 }, + { "fnv1a_64", HashFnv1a }, }; -inline NamedHashFunction::HashFunction FindHashFunction16(const char *name) -{ +inline NamedHashFunction::HashFunction FindHashFunction16( + const char *name) { std::size_t size = sizeof(kHashFunctions16) / sizeof(kHashFunctions16[0]); - for (std::size_t i = 0; i < size; ++i) - { - if (std::strcmp(name, kHashFunctions16[i].name) == 0) - { + for (std::size_t i = 0; i < size; ++i) { + if (std::strcmp(name, kHashFunctions16[i].name) == 0) { return kHashFunctions16[i].function; } } return nullptr; } -inline NamedHashFunction::HashFunction FindHashFunction32(const char *name) -{ +inline NamedHashFunction::HashFunction FindHashFunction32( + const char *name) { std::size_t size = sizeof(kHashFunctions32) / sizeof(kHashFunctions32[0]); - for (std::size_t i = 0; i < size; ++i) - { - if (std::strcmp(name, kHashFunctions32[i].name) == 0) - { + for (std::size_t i = 0; i < size; ++i) { + if (std::strcmp(name, kHashFunctions32[i].name) == 0) { return kHashFunctions32[i].function; } } return nullptr; } -inline NamedHashFunction::HashFunction FindHashFunction64(const char *name) -{ +inline NamedHashFunction::HashFunction FindHashFunction64( + const char *name) { std::size_t size = sizeof(kHashFunctions64) / sizeof(kHashFunctions64[0]); - for (std::size_t i = 0; i < size; ++i) - { - if (std::strcmp(name, kHashFunctions64[i].name) == 0) - { + for (std::size_t i = 0; i < size; ++i) { + if (std::strcmp(name, kHashFunctions64[i].name) == 0) { return kHashFunctions64[i].function; } } return nullptr; } -} // namespace flatbuffers +} // namespace flatbuffers -#endif // FLATBUFFERS_HASH_H_ +#endif // FLATBUFFERS_HASH_H_ diff --git a/onert-micro/externals/flatbuffers/idl.h b/onert-micro/externals/flatbuffers/idl.h index de0a22ab114..29bf6215317 100644 --- a/onert-micro/externals/flatbuffers/idl.h +++ b/onert-micro/externals/flatbuffers/idl.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -29,8 +28,8 @@ #include "flatbuffers/reflection.h" #if !defined(FLATBUFFERS_CPP98_STL) -#include -#endif // !defined(FLATBUFFERS_CPP98_STL) +# include +#endif // !defined(FLATBUFFERS_CPP98_STL) // This file defines the data types representing a parsed IDL (Interface // Definition Language) / schema file. @@ -38,11 +37,10 @@ // Limits maximum depth of nested objects. // Prevents stack overflow while parse scheme, or json, or flexbuffer. #if !defined(FLATBUFFERS_MAX_PARSING_DEPTH) -#define FLATBUFFERS_MAX_PARSING_DEPTH 64 +# define FLATBUFFERS_MAX_PARSING_DEPTH 64 #endif -namespace flatbuffers -{ +namespace flatbuffers { // The order of these matters for Is*() functions below. // Additionally, Parser::ParseType assumes bool..string is a contiguous range @@ -160,39 +158,41 @@ class Parser; // Represents any type in the IDL, which is a combination of the BaseType // and additional information for vectors/structs_. -struct Type -{ +struct Type { explicit Type(BaseType _base_type = BASE_TYPE_NONE, StructDef *_sd = nullptr, EnumDef *_ed = nullptr, uint16_t _fixed_length = 0) - : base_type(_base_type), element(BASE_TYPE_NONE), struct_def(_sd), enum_def(_ed), - fixed_length(_fixed_length) - { + : base_type(_base_type), + element(BASE_TYPE_NONE), + struct_def(_sd), + enum_def(_ed), + fixed_length(_fixed_length) {} + + bool operator==(const Type &o) { + return base_type == o.base_type && element == o.element && + struct_def == o.struct_def && enum_def == o.enum_def; } - bool operator==(const Type &o) - { - return base_type == o.base_type && element == o.element && struct_def == o.struct_def && - enum_def == o.enum_def; + Type VectorType() const { + return Type(element, struct_def, enum_def, fixed_length); } - Type VectorType() const { return Type(element, struct_def, enum_def, fixed_length); } - Offset Serialize(FlatBufferBuilder *builder) const; bool Deserialize(const Parser &parser, const reflection::Type *type); BaseType base_type; - BaseType element; // only set if t == BASE_TYPE_VECTOR - StructDef *struct_def; // only set if t or element == BASE_TYPE_STRUCT - EnumDef *enum_def; // set if t == BASE_TYPE_UNION / BASE_TYPE_UTYPE, - // or for an integral type derived from an enum. - uint16_t fixed_length; // only set if t == BASE_TYPE_ARRAY + BaseType element; // only set if t == BASE_TYPE_VECTOR + StructDef *struct_def; // only set if t or element == BASE_TYPE_STRUCT + EnumDef *enum_def; // set if t == BASE_TYPE_UNION / BASE_TYPE_UTYPE, + // or for an integral type derived from an enum. + uint16_t fixed_length; // only set if t == BASE_TYPE_ARRAY }; // Represents a parsed scalar value, it's type, and field offset. -struct Value -{ - Value() : constant("0"), offset(static_cast(~(static_cast(0U)))) {} +struct Value { + Value() + : constant("0"), + offset(static_cast(~(static_cast(0U)))) {} Type type; std::string constant; voffset_t offset; @@ -200,73 +200,59 @@ struct Value // Helper class that retains the original order of a set of identifiers and // also provides quick lookup. -template class SymbolTable -{ -public: - ~SymbolTable() - { - for (auto it = vec.begin(); it != vec.end(); ++it) - { - delete *it; - } +template class SymbolTable { + public: + ~SymbolTable() { + for (auto it = vec.begin(); it != vec.end(); ++it) { delete *it; } } - bool Add(const std::string &name, T *e) - { + bool Add(const std::string &name, T *e) { vector_emplace_back(&vec, e); auto it = dict.find(name); - if (it != dict.end()) - return true; + if (it != dict.end()) return true; dict[name] = e; return false; } - void Move(const std::string &oldname, const std::string &newname) - { + void Move(const std::string &oldname, const std::string &newname) { auto it = dict.find(oldname); - if (it != dict.end()) - { + if (it != dict.end()) { auto obj = it->second; dict.erase(it); dict[newname] = obj; - } - else - { + } else { FLATBUFFERS_ASSERT(false); } } - T *Lookup(const std::string &name) const - { + T *Lookup(const std::string &name) const { auto it = dict.find(name); return it == dict.end() ? nullptr : it->second; } -public: - std::map dict; // quick lookup - std::vector vec; // Used to iterate in order of insertion + public: + std::map dict; // quick lookup + std::vector vec; // Used to iterate in order of insertion }; // A name space, as set in the schema. -struct Namespace -{ +struct Namespace { Namespace() : from_table(0) {} // Given a (potentially unqualified) name, return the "fully qualified" name // which has a full namespaced descriptor. // With max_components you can request less than the number of components // the current namespace has. - std::string GetFullyQualifiedName(const std::string &name, size_t max_components = 1000) const; + std::string GetFullyQualifiedName(const std::string &name, + size_t max_components = 1000) const; std::vector components; - size_t from_table; // Part of the namespace corresponds to a message/table. + size_t from_table; // Part of the namespace corresponds to a message/table. }; -inline bool operator<(const Namespace &a, const Namespace &b) -{ +inline bool operator<(const Namespace &a, const Namespace &b) { size_t min_size = std::min(a.components.size(), b.components.size()); - for (size_t i = 0; i < min_size; ++i) - { + for (size_t i = 0; i < min_size; ++i) { if (a.components[i] != b.components[i]) return a.components[i] < b.components[i]; } @@ -274,61 +260,74 @@ inline bool operator<(const Namespace &a, const Namespace &b) } // Base class for all definition types (fields, structs_, enums_). -struct Definition -{ +struct Definition { Definition() - : generated(false), defined_namespace(nullptr), serialized_location(0), index(-1), refcount(1) - { - } - - flatbuffers::Offset>> + : generated(false), + defined_namespace(nullptr), + serialized_location(0), + index(-1), + refcount(1) {} + + flatbuffers::Offset< + flatbuffers::Vector>> SerializeAttributes(FlatBufferBuilder *builder, const Parser &parser) const; - bool DeserializeAttributes(Parser &parser, const Vector> *attrs); + bool DeserializeAttributes(Parser &parser, + const Vector> *attrs); std::string name; std::string file; std::vector doc_comment; SymbolTable attributes; - bool generated; // did we already output code for this definition? - Namespace *defined_namespace; // Where it was defined. + bool generated; // did we already output code for this definition? + Namespace *defined_namespace; // Where it was defined. // For use with Serialize() uoffset_t serialized_location; - int index; // Inside the vector it is stored. + int index; // Inside the vector it is stored. int refcount; }; -struct FieldDef : public Definition -{ +struct FieldDef : public Definition { FieldDef() - : deprecated(false), key(false), shared(false), native_inline(false), flexbuffer(false), - presence(kDefault), nested_flatbuffer(NULL), padding(0) - { - } + : deprecated(false), + key(false), + shared(false), + native_inline(false), + flexbuffer(false), + presence(kDefault), + nested_flatbuffer(NULL), + padding(0) {} Offset Serialize(FlatBufferBuilder *builder, uint16_t id, const Parser &parser) const; bool Deserialize(Parser &parser, const reflection::Field *field); - bool IsScalarOptional() const { return IsScalar(value.type.base_type) && IsOptional(); } - bool IsOptional() const { return presence == kOptional; } - bool IsRequired() const { return presence == kRequired; } - bool IsDefault() const { return presence == kDefault; } + bool IsScalarOptional() const { + return IsScalar(value.type.base_type) && IsOptional(); + } + bool IsOptional() const { + return presence == kOptional; + } + bool IsRequired() const { + return presence == kRequired; + } + bool IsDefault() const { + return presence == kDefault; + } Value value; - bool deprecated; // Field is allowed to be present in old data, but can't be. - // written in new data nor accessed in new code. - bool key; // Field functions as a key for creating sorted vectors. - bool shared; // Field will be using string pooling (i.e. CreateSharedString) - // as default serialization behavior if field is a string. - bool native_inline; // Field will be defined inline (instead of as a pointer) - // for native tables if field is a struct. - bool flexbuffer; // This field contains FlexBuffer data. - - enum Presence - { + bool deprecated; // Field is allowed to be present in old data, but can't be. + // written in new data nor accessed in new code. + bool key; // Field functions as a key for creating sorted vectors. + bool shared; // Field will be using string pooling (i.e. CreateSharedString) + // as default serialization behavior if field is a string. + bool native_inline; // Field will be defined inline (instead of as a pointer) + // for native tables if field is a struct. + bool flexbuffer; // This field contains FlexBuffer data. + + enum Presence { // Field must always be present. kRequired, // Non-presence should be signalled to and controlled by users. @@ -337,8 +336,7 @@ struct FieldDef : public Definition // Implementations may omit writing default values. kDefault, }; - Presence static MakeFieldPresence(bool optional, bool required) - { + Presence static MakeFieldPresence(bool optional, bool required) { FLATBUFFERS_ASSERT(!(required && optional)); // clang-format off return required ? FieldDef::kRequired @@ -348,37 +346,38 @@ struct FieldDef : public Definition } Presence presence; - StructDef *nested_flatbuffer; // This field contains nested FlatBuffer data. - size_t padding; // Bytes to always pad after this field. + StructDef *nested_flatbuffer; // This field contains nested FlatBuffer data. + size_t padding; // Bytes to always pad after this field. }; -struct StructDef : public Definition -{ +struct StructDef : public Definition { StructDef() - : fixed(false), predecl(true), sortbysize(true), has_key(false), minalign(1), bytesize(0) - { - } - - void PadLastField(size_t min_align) - { + : fixed(false), + predecl(true), + sortbysize(true), + has_key(false), + minalign(1), + bytesize(0) {} + + void PadLastField(size_t min_align) { auto padding = PaddingBytes(bytesize, min_align); bytesize += padding; - if (fields.vec.size()) - fields.vec.back()->padding = padding; + if (fields.vec.size()) fields.vec.back()->padding = padding; } - Offset Serialize(FlatBufferBuilder *builder, const Parser &parser) const; + Offset Serialize(FlatBufferBuilder *builder, + const Parser &parser) const; bool Deserialize(Parser &parser, const reflection::Object *object); SymbolTable fields; - bool fixed; // If it's struct, not a table. - bool predecl; // If it's used before it was defined. - bool sortbysize; // Whether fields come in the declaration or size order. - bool has_key; // It has a key field. - size_t minalign; // What the whole object needs to be aligned to. - size_t bytesize; // Size if fixed. + bool fixed; // If it's struct, not a table. + bool predecl; // If it's used before it was defined. + bool sortbysize; // Whether fields come in the declaration or size order. + bool has_key; // It has a key field. + size_t minalign; // What the whole object needs to be aligned to. + size_t bytesize; // Size if fixed. flatbuffers::unique_ptr original_location; }; @@ -386,9 +385,9 @@ struct StructDef : public Definition struct EnumDef; struct EnumValBuilder; -struct EnumVal -{ - Offset Serialize(FlatBufferBuilder *builder, const Parser &parser) const; +struct EnumVal { + Offset Serialize(FlatBufferBuilder *builder, + const Parser &parser) const; bool Deserialize(const Parser &parser, const reflection::EnumVal *val); @@ -401,7 +400,7 @@ struct EnumVal std::vector doc_comment; Type union_type; -private: + private: friend EnumDef; friend EnumValBuilder; friend bool operator==(const EnumVal &lhs, const EnumVal &rhs); @@ -412,15 +411,15 @@ struct EnumVal int64_t value; }; -struct EnumDef : public Definition -{ +struct EnumDef : public Definition { EnumDef() : is_union(false), uses_multiple_type_instances(false) {} - Offset Serialize(FlatBufferBuilder *builder, const Parser &parser) const; + Offset Serialize(FlatBufferBuilder *builder, + const Parser &parser) const; bool Deserialize(Parser &parser, const reflection::Enum *values); - template void ChangeEnumValue(EnumVal *ev, T new_val); + template void ChangeEnumValue(EnumVal *ev, T new_val); void SortByValue(); void RemoveDuplicates(); @@ -432,19 +431,22 @@ struct EnumDef : public Definition // Returns the number of integer steps from Min to Max. uint64_t Distance() const { return Distance(MinValue(), MaxValue()); } - EnumVal *ReverseLookup(int64_t enum_idx, bool skip_union_default = false) const; + EnumVal *ReverseLookup(int64_t enum_idx, + bool skip_union_default = false) const; EnumVal *FindByValue(const std::string &constant) const; - std::string ToString(const EnumVal &ev) const - { - return IsUInt64() ? NumToString(ev.GetAsUInt64()) : NumToString(ev.GetAsInt64()); + std::string ToString(const EnumVal &ev) const { + return IsUInt64() ? NumToString(ev.GetAsUInt64()) + : NumToString(ev.GetAsInt64()); } size_t size() const { return vals.vec.size(); } const std::vector &Vals() const { return vals.vec; } - const EnumVal *Lookup(const std::string &enum_name) const { return vals.Lookup(enum_name); } + const EnumVal *Lookup(const std::string &enum_name) const { + return vals.Lookup(enum_name); + } bool is_union; // Type is a union which uses type aliases where at least one type is @@ -452,88 +454,94 @@ struct EnumDef : public Definition bool uses_multiple_type_instances; Type underlying_type; -private: - bool IsUInt64() const { return (BASE_TYPE_ULONG == underlying_type.base_type); } + private: + bool IsUInt64() const { + return (BASE_TYPE_ULONG == underlying_type.base_type); + } friend EnumValBuilder; SymbolTable vals; }; -inline bool IsString(const Type &type) { return type.base_type == BASE_TYPE_STRING; } +inline bool IsString(const Type &type) { + return type.base_type == BASE_TYPE_STRING; +} -inline bool IsStruct(const Type &type) -{ +inline bool IsStruct(const Type &type) { return type.base_type == BASE_TYPE_STRUCT && type.struct_def->fixed; } -inline bool IsUnion(const Type &type) -{ +inline bool IsUnion(const Type &type) { return type.enum_def != nullptr && type.enum_def->is_union; } -inline bool IsVector(const Type &type) { return type.base_type == BASE_TYPE_VECTOR; } +inline bool IsVector(const Type &type) { + return type.base_type == BASE_TYPE_VECTOR; +} -inline bool IsArray(const Type &type) { return type.base_type == BASE_TYPE_ARRAY; } +inline bool IsArray(const Type &type) { + return type.base_type == BASE_TYPE_ARRAY; +} -inline bool IsSeries(const Type &type) { return IsVector(type) || IsArray(type); } +inline bool IsSeries(const Type &type) { + return IsVector(type) || IsArray(type); +} -inline bool IsEnum(const Type &type) -{ +inline bool IsEnum(const Type &type) { return type.enum_def != nullptr && IsInteger(type.base_type); } -inline size_t InlineSize(const Type &type) -{ - return IsStruct(type) ? type.struct_def->bytesize - : (IsArray(type) ? InlineSize(type.VectorType()) * type.fixed_length - : SizeOf(type.base_type)); +inline size_t InlineSize(const Type &type) { + return IsStruct(type) + ? type.struct_def->bytesize + : (IsArray(type) + ? InlineSize(type.VectorType()) * type.fixed_length + : SizeOf(type.base_type)); } -inline size_t InlineAlignment(const Type &type) -{ - if (IsStruct(type)) - { +inline size_t InlineAlignment(const Type &type) { + if (IsStruct(type)) { return type.struct_def->minalign; - } - else if (IsArray(type)) - { - return IsStruct(type.VectorType()) ? type.struct_def->minalign : SizeOf(type.element); - } - else - { + } else if (IsArray(type)) { + return IsStruct(type.VectorType()) ? type.struct_def->minalign + : SizeOf(type.element); + } else { return SizeOf(type.base_type); } } -inline bool operator==(const EnumVal &lhs, const EnumVal &rhs) { return lhs.value == rhs.value; } -inline bool operator!=(const EnumVal &lhs, const EnumVal &rhs) { return !(lhs == rhs); } +inline bool operator==(const EnumVal &lhs, const EnumVal &rhs) { + return lhs.value == rhs.value; +} +inline bool operator!=(const EnumVal &lhs, const EnumVal &rhs) { + return !(lhs == rhs); +} -inline bool EqualByName(const Type &a, const Type &b) -{ +inline bool EqualByName(const Type &a, const Type &b) { return a.base_type == b.base_type && a.element == b.element && - (a.struct_def == b.struct_def || a.struct_def->name == b.struct_def->name) && + (a.struct_def == b.struct_def || + a.struct_def->name == b.struct_def->name) && (a.enum_def == b.enum_def || a.enum_def->name == b.enum_def->name); } -struct RPCCall : public Definition -{ - Offset Serialize(FlatBufferBuilder *builder, const Parser &parser) const; +struct RPCCall : public Definition { + Offset Serialize(FlatBufferBuilder *builder, + const Parser &parser) const; bool Deserialize(Parser &parser, const reflection::RPCCall *call); StructDef *request, *response; }; -struct ServiceDef : public Definition -{ - Offset Serialize(FlatBufferBuilder *builder, const Parser &parser) const; +struct ServiceDef : public Definition { + Offset Serialize(FlatBufferBuilder *builder, + const Parser &parser) const; bool Deserialize(Parser &parser, const reflection::Service *service); SymbolTable calls; }; // Container of options that may apply to any of the source/text generators. -struct IDLOptions -{ +struct IDLOptions { bool gen_jvmstatic; // Use flexbuffers instead for binary and text generation bool use_flexbuffers; @@ -587,8 +595,7 @@ struct IDLOptions bool no_warnings; // Possible options for the more general generator below. - enum Language - { + enum Language { kJava = 1 << 0, kCSharp = 1 << 1, kGo = 1 << 2, @@ -610,12 +617,7 @@ struct IDLOptions Language lang; - enum MiniReflect - { - kNone, - kTypes, - kTypesAndNames - }; + enum MiniReflect { kNone, kTypes, kTypesAndNames }; MiniReflect mini_reflect; @@ -635,59 +637,84 @@ struct IDLOptions bool set_empty_vectors_to_null; IDLOptions() - : gen_jvmstatic(false), use_flexbuffers(false), strict_json(false), - output_default_scalars_in_json(false), indent_step(2), output_enum_identifiers(true), - prefixed_enums(true), scoped_enums(false), include_dependence_headers(true), - mutable_buffer(false), one_file(false), proto_mode(false), proto_oneof_union(false), - generate_all(false), skip_unexpected_fields_in_json(false), generate_name_strings(false), - generate_object_based_api(false), gen_compare(false), - cpp_object_api_pointer_type("std::unique_ptr"), - cpp_object_api_string_flexible_constructor(false), cpp_direct_copy(true), gen_nullable(false), - java_checkerframework(false), gen_generated(false), object_suffix("T"), - union_value_namespacing(true), allow_non_utf8(false), natural_utf8(false), - keep_include_path(false), binary_schema_comments(false), binary_schema_builtins(false), - binary_schema_gen_embed(false), protobuf_ascii_alike(false), size_prefixed(false), - force_defaults(false), java_primitive_has_method(false), cs_gen_json_serializer(false), - cpp_static_reflection(false), filename_suffix("_generated"), filename_extension(), - no_warnings(false), lang(IDLOptions::kJava), mini_reflect(IDLOptions::kNone), - require_explicit_ids(false), lang_to_generate(0), set_empty_strings_to_null(true), - set_empty_vectors_to_null(true) - { - } + : gen_jvmstatic(false), + use_flexbuffers(false), + strict_json(false), + output_default_scalars_in_json(false), + indent_step(2), + output_enum_identifiers(true), + prefixed_enums(true), + scoped_enums(false), + include_dependence_headers(true), + mutable_buffer(false), + one_file(false), + proto_mode(false), + proto_oneof_union(false), + generate_all(false), + skip_unexpected_fields_in_json(false), + generate_name_strings(false), + generate_object_based_api(false), + gen_compare(false), + cpp_object_api_pointer_type("std::unique_ptr"), + cpp_object_api_string_flexible_constructor(false), + cpp_direct_copy(true), + gen_nullable(false), + java_checkerframework(false), + gen_generated(false), + object_suffix("T"), + union_value_namespacing(true), + allow_non_utf8(false), + natural_utf8(false), + keep_include_path(false), + binary_schema_comments(false), + binary_schema_builtins(false), + binary_schema_gen_embed(false), + protobuf_ascii_alike(false), + size_prefixed(false), + force_defaults(false), + java_primitive_has_method(false), + cs_gen_json_serializer(false), + cpp_static_reflection(false), + filename_suffix("_generated"), + filename_extension(), + no_warnings(false), + lang(IDLOptions::kJava), + mini_reflect(IDLOptions::kNone), + require_explicit_ids(false), + lang_to_generate(0), + set_empty_strings_to_null(true), + set_empty_vectors_to_null(true) {} }; // This encapsulates where the parser is in the current source file. -struct ParserState -{ +struct ParserState { ParserState() - : cursor_(nullptr), line_start_(nullptr), line_(0), token_(-1), - attr_is_trivial_ascii_string_(true) - { - } - -protected: - void ResetState(const char *source) - { + : cursor_(nullptr), + line_start_(nullptr), + line_(0), + token_(-1), + attr_is_trivial_ascii_string_(true) {} + + protected: + void ResetState(const char *source) { cursor_ = source; line_ = 0; MarkNewLine(); } - void MarkNewLine() - { + void MarkNewLine() { line_start_ = cursor_; line_ += 1; } - int64_t CursorPosition() const - { + int64_t CursorPosition() const { FLATBUFFERS_ASSERT(cursor_ && line_start_ && cursor_ >= line_start_); return static_cast(cursor_ - line_start_); } const char *cursor_; const char *line_start_; - int line_; // the current line being parsed + int line_; // the current line being parsed int token_; // Flag: text in attribute_ is true ASCII string without escape @@ -705,33 +732,30 @@ struct ParserState // - Copy or assign it to another value. // Failure to do so leads to an assert. // This guarantees that this as return value cannot be ignored. -class CheckedError -{ -public: - explicit CheckedError(bool error) : is_error_(error), has_been_checked_(false) {} +class CheckedError { + public: + explicit CheckedError(bool error) + : is_error_(error), has_been_checked_(false) {} - CheckedError &operator=(const CheckedError &other) - { + CheckedError &operator=(const CheckedError &other) { is_error_ = other.is_error_; has_been_checked_ = false; other.has_been_checked_ = true; return *this; } - CheckedError(const CheckedError &other) - { - *this = other; // Use assignment operator. + CheckedError(const CheckedError &other) { + *this = other; // Use assignment operator. } ~CheckedError() { FLATBUFFERS_ASSERT(has_been_checked_); } - bool Check() - { + bool Check() { has_been_checked_ = true; return is_error_; } -private: + private: bool is_error_; mutable bool has_been_checked_; }; @@ -747,19 +771,20 @@ class CheckedError #endif // clang-format on -class Parser : public ParserState -{ -public: +class Parser : public ParserState { + public: explicit Parser(const IDLOptions &options = IDLOptions()) - : current_namespace_(nullptr), empty_namespace_(nullptr), - flex_builder_(256, flexbuffers::BUILDER_FLAG_SHARE_ALL), root_struct_def_(nullptr), - opts(options), uses_flexbuffers_(false), advanced_features_(0), source_(nullptr), - anonymous_counter_(0), parse_depth_counter_(0) - { - if (opts.force_defaults) - { - builder_.ForceDefaults(true); - } + : current_namespace_(nullptr), + empty_namespace_(nullptr), + flex_builder_(256, flexbuffers::BUILDER_FLAG_SHARE_ALL), + root_struct_def_(nullptr), + opts(options), + uses_flexbuffers_(false), + advanced_features_(0), + source_(nullptr), + anonymous_counter_(0), + parse_depth_counter_(0) { + if (opts.force_defaults) { builder_.ForceDefaults(true); } // Start out with the empty namespace being current. empty_namespace_ = new Namespace(); namespaces_.push_back(empty_namespace_); @@ -791,10 +816,8 @@ class Parser : public ParserState known_attributes_["private"] = true; } - ~Parser() - { - for (auto it = namespaces_.begin(); it != namespaces_.end(); ++it) - { + ~Parser() { + for (auto it = namespaces_.begin(); it != namespaces_.end(); ++it) { delete *it; } } @@ -823,7 +846,8 @@ class Parser : public ParserState // Get the files recursively included by the given file. The returned // container will have at least the given file. - std::set GetIncludedFilesRecursive(const std::string &file_name) const; + std::set GetIncludedFilesRecursive( + const std::string &file_name) const; // Fills builder_ with a binary version of the schema parsed. // See reflection/reflection.fbs @@ -859,7 +883,7 @@ class Parser : public ParserState // @param opts Options used to parce a schema and generate code. static bool SupportsOptionalScalars(const flatbuffers::IDLOptions &opts); -private: + private: class ParseDepthGuard; void Message(const std::string &msg); @@ -872,66 +896,86 @@ class Parser : public ParserState FLATBUFFERS_CHECKED_ERROR Expect(int t); std::string TokenToStringId(int t) const; EnumDef *LookupEnum(const std::string &id); - FLATBUFFERS_CHECKED_ERROR ParseNamespacing(std::string *id, std::string *last); + FLATBUFFERS_CHECKED_ERROR ParseNamespacing(std::string *id, + std::string *last); FLATBUFFERS_CHECKED_ERROR ParseTypeIdent(Type &type); FLATBUFFERS_CHECKED_ERROR ParseType(Type &type); - FLATBUFFERS_CHECKED_ERROR AddField(StructDef &struct_def, const std::string &name, - const Type &type, FieldDef **dest); + FLATBUFFERS_CHECKED_ERROR AddField(StructDef &struct_def, + const std::string &name, const Type &type, + FieldDef **dest); FLATBUFFERS_CHECKED_ERROR ParseField(StructDef &struct_def); FLATBUFFERS_CHECKED_ERROR ParseString(Value &val, bool use_string_pooling); FLATBUFFERS_CHECKED_ERROR ParseComma(); - FLATBUFFERS_CHECKED_ERROR ParseAnyValue(Value &val, FieldDef *field, size_t parent_fieldn, - const StructDef *parent_struct_def, uoffset_t count, + FLATBUFFERS_CHECKED_ERROR ParseAnyValue(Value &val, FieldDef *field, + size_t parent_fieldn, + const StructDef *parent_struct_def, + uoffset_t count, bool inside_vector = false); - template - FLATBUFFERS_CHECKED_ERROR ParseTableDelimiters(size_t &fieldn, const StructDef *struct_def, + template + FLATBUFFERS_CHECKED_ERROR ParseTableDelimiters(size_t &fieldn, + const StructDef *struct_def, F body); - FLATBUFFERS_CHECKED_ERROR ParseTable(const StructDef &struct_def, std::string *value, - uoffset_t *ovalue); + FLATBUFFERS_CHECKED_ERROR ParseTable(const StructDef &struct_def, + std::string *value, uoffset_t *ovalue); void SerializeStruct(const StructDef &struct_def, const Value &val); - void SerializeStruct(FlatBufferBuilder &builder, const StructDef &struct_def, const Value &val); - template FLATBUFFERS_CHECKED_ERROR ParseVectorDelimiters(uoffset_t &count, F body); - FLATBUFFERS_CHECKED_ERROR ParseVector(const Type &type, uoffset_t *ovalue, FieldDef *field, - size_t fieldn); + void SerializeStruct(FlatBufferBuilder &builder, const StructDef &struct_def, + const Value &val); + template + FLATBUFFERS_CHECKED_ERROR ParseVectorDelimiters(uoffset_t &count, F body); + FLATBUFFERS_CHECKED_ERROR ParseVector(const Type &type, uoffset_t *ovalue, + FieldDef *field, size_t fieldn); FLATBUFFERS_CHECKED_ERROR ParseArray(Value &array); - FLATBUFFERS_CHECKED_ERROR ParseNestedFlatbuffer(Value &val, FieldDef *field, size_t fieldn, - const StructDef *parent_struct_def); + FLATBUFFERS_CHECKED_ERROR ParseNestedFlatbuffer( + Value &val, FieldDef *field, size_t fieldn, + const StructDef *parent_struct_def); FLATBUFFERS_CHECKED_ERROR ParseMetaData(SymbolTable *attributes); - FLATBUFFERS_CHECKED_ERROR TryTypedValue(const std::string *name, int dtoken, bool check, Value &e, - BaseType req, bool *destmatch); + FLATBUFFERS_CHECKED_ERROR TryTypedValue(const std::string *name, int dtoken, + bool check, Value &e, BaseType req, + bool *destmatch); FLATBUFFERS_CHECKED_ERROR ParseHash(Value &e, FieldDef *field); FLATBUFFERS_CHECKED_ERROR TokenError(); - FLATBUFFERS_CHECKED_ERROR ParseSingleValue(const std::string *name, Value &e, bool check_now); + FLATBUFFERS_CHECKED_ERROR ParseSingleValue(const std::string *name, Value &e, + bool check_now); FLATBUFFERS_CHECKED_ERROR ParseFunction(const std::string *name, Value &e); - FLATBUFFERS_CHECKED_ERROR ParseEnumFromString(const Type &type, std::string *result); - StructDef *LookupCreateStruct(const std::string &name, bool create_if_new = true, + FLATBUFFERS_CHECKED_ERROR ParseEnumFromString(const Type &type, + std::string *result); + StructDef *LookupCreateStruct(const std::string &name, + bool create_if_new = true, bool definition = false); FLATBUFFERS_CHECKED_ERROR ParseEnum(bool is_union, EnumDef **dest); FLATBUFFERS_CHECKED_ERROR ParseNamespace(); - FLATBUFFERS_CHECKED_ERROR StartStruct(const std::string &name, StructDef **dest); - FLATBUFFERS_CHECKED_ERROR StartEnum(const std::string &name, bool is_union, EnumDef **dest); + FLATBUFFERS_CHECKED_ERROR StartStruct(const std::string &name, + StructDef **dest); + FLATBUFFERS_CHECKED_ERROR StartEnum(const std::string &name, bool is_union, + EnumDef **dest); FLATBUFFERS_CHECKED_ERROR ParseDecl(); FLATBUFFERS_CHECKED_ERROR ParseService(); - FLATBUFFERS_CHECKED_ERROR ParseProtoFields(StructDef *struct_def, bool isextend, - bool inside_oneof); + FLATBUFFERS_CHECKED_ERROR ParseProtoFields(StructDef *struct_def, + bool isextend, bool inside_oneof); FLATBUFFERS_CHECKED_ERROR ParseProtoOption(); FLATBUFFERS_CHECKED_ERROR ParseProtoKey(); FLATBUFFERS_CHECKED_ERROR ParseProtoDecl(); FLATBUFFERS_CHECKED_ERROR ParseProtoCurliesOrIdent(); FLATBUFFERS_CHECKED_ERROR ParseTypeFromProtoType(Type *type); FLATBUFFERS_CHECKED_ERROR SkipAnyJsonValue(); - FLATBUFFERS_CHECKED_ERROR ParseFlexBufferNumericConstant(flexbuffers::Builder *builder); + FLATBUFFERS_CHECKED_ERROR ParseFlexBufferNumericConstant( + flexbuffers::Builder *builder); FLATBUFFERS_CHECKED_ERROR ParseFlexBufferValue(flexbuffers::Builder *builder); - FLATBUFFERS_CHECKED_ERROR StartParseFile(const char *source, const char *source_filename); - FLATBUFFERS_CHECKED_ERROR ParseRoot(const char *_source, const char **include_paths, + FLATBUFFERS_CHECKED_ERROR StartParseFile(const char *source, + const char *source_filename); + FLATBUFFERS_CHECKED_ERROR ParseRoot(const char *_source, + const char **include_paths, const char *source_filename); - FLATBUFFERS_CHECKED_ERROR DoParse(const char *_source, const char **include_paths, - const char *source_filename, const char *include_filename); + FLATBUFFERS_CHECKED_ERROR DoParse(const char *_source, + const char **include_paths, + const char *source_filename, + const char *include_filename); FLATBUFFERS_CHECKED_ERROR DoParseJson(); - FLATBUFFERS_CHECKED_ERROR CheckClash(std::vector &fields, StructDef *struct_def, + FLATBUFFERS_CHECKED_ERROR CheckClash(std::vector &fields, + StructDef *struct_def, const char *suffix, BaseType baseType); - FLATBUFFERS_CHECKED_ERROR ParseAlignAttribute(const std::string &align_constant, size_t min_align, - size_t *align); + FLATBUFFERS_CHECKED_ERROR ParseAlignAttribute( + const std::string &align_constant, size_t min_align, size_t *align); bool SupportsAdvancedUnionFeatures() const; bool SupportsAdvancedArrayFeatures() const; @@ -940,9 +984,9 @@ class Parser : public ParserState Namespace *UniqueNamespace(Namespace *ns); FLATBUFFERS_CHECKED_ERROR RecurseError(); - template CheckedError Recurse(F f); + template CheckedError Recurse(F f); -public: + public: SymbolTable types_; SymbolTable structs_; SymbolTable enums_; @@ -950,9 +994,9 @@ class Parser : public ParserState std::vector namespaces_; Namespace *current_namespace_; Namespace *empty_namespace_; - std::string error_; // User readable error_ if Parse() == false + std::string error_; // User readable error_ if Parse() == false - FlatBufferBuilder builder_; // any data contained in the file + FlatBufferBuilder builder_; // any data contained in the file flexbuffers::Builder flex_builder_; flexbuffers::Reference flex_root_; StructDef *root_struct_def_; @@ -970,7 +1014,7 @@ class Parser : public ParserState uint64_t advanced_features_; -private: + private: const char *source_; std::string file_being_parsed_; @@ -978,7 +1022,7 @@ class Parser : public ParserState std::vector> field_stack_; int anonymous_counter_; - int parse_depth_counter_; // stack-overflow guard + int parse_depth_counter_; // stack-overflow guard }; // Utility functions for multiple generators: @@ -996,8 +1040,10 @@ extern std::string MakeScreamingCamel(const std::string &in); // If the flatbuffer cannot be encoded in JSON (e.g., it contains non-UTF-8 // byte arrays in String values), returns false. extern bool GenerateTextFromTable(const Parser &parser, const void *table, - const std::string &tablename, std::string *text); -extern bool GenerateText(const Parser &parser, const void *flatbuffer, std::string *text); + const std::string &tablename, + std::string *text); +extern bool GenerateText(const Parser &parser, const void *flatbuffer, + std::string *text); extern bool GenerateTextFile(const Parser &parser, const std::string &path, const std::string &file_name); @@ -1031,11 +1077,13 @@ extern bool GenerateJava(const Parser &parser, const std::string &path, // Generate JavaScript or TypeScript code from the definitions in the Parser // object. See idl_gen_js. -extern bool GenerateTS(const Parser &parser, const std::string &path, const std::string &file_name); +extern bool GenerateTS(const Parser &parser, const std::string &path, + const std::string &file_name); // Generate Go files from the definitions in the Parser object. // See idl_gen_go.cpp. -extern bool GenerateGo(const Parser &parser, const std::string &path, const std::string &file_name); +extern bool GenerateGo(const Parser &parser, const std::string &path, + const std::string &file_name); // Generate Php code from the definitions in the Parser object. // See idl_gen_php. @@ -1077,7 +1125,8 @@ extern bool GenerateSwift(const Parser &parser, const std::string &path, // Generate a schema file from the internal representation, useful after // parsing a .proto schema. -extern std::string GenerateFBS(const Parser &parser, const std::string &file_name); +extern std::string GenerateFBS(const Parser &parser, + const std::string &file_name); extern bool GenerateFBS(const Parser &parser, const std::string &path, const std::string &file_name); @@ -1103,7 +1152,8 @@ extern std::string RustMakeRule(const Parser &parser, const std::string &path, // Generate a make rule for generated Java or C# files. // See code_generators.cpp. -extern std::string JavaCSharpMakeRule(const Parser &parser, const std::string &path, +extern std::string JavaCSharpMakeRule(const Parser &parser, + const std::string &path, const std::string &file_name); // Generate a make rule for the generated text (JSON) files. @@ -1118,15 +1168,18 @@ extern std::string BinaryMakeRule(const Parser &parser, const std::string &path, // Generate GRPC Cpp interfaces. // See idl_gen_grpc.cpp. -bool GenerateCppGRPC(const Parser &parser, const std::string &path, const std::string &file_name); +bool GenerateCppGRPC(const Parser &parser, const std::string &path, + const std::string &file_name); // Generate GRPC Go interfaces. // See idl_gen_grpc.cpp. -bool GenerateGoGRPC(const Parser &parser, const std::string &path, const std::string &file_name); +bool GenerateGoGRPC(const Parser &parser, const std::string &path, + const std::string &file_name); // Generate GRPC Java classes. // See idl_gen_grpc.cpp -bool GenerateJavaGRPC(const Parser &parser, const std::string &path, const std::string &file_name); +bool GenerateJavaGRPC(const Parser &parser, const std::string &path, + const std::string &file_name); // Generate GRPC Python interfaces. // See idl_gen_grpc.cpp. @@ -1140,6 +1193,6 @@ extern bool GenerateSwiftGRPC(const Parser &parser, const std::string &path, extern bool GenerateTSGRPC(const Parser &parser, const std::string &path, const std::string &file_name); -} // namespace flatbuffers +} // namespace flatbuffers -#endif // FLATBUFFERS_IDL_H_ +#endif // FLATBUFFERS_IDL_H_ diff --git a/onert-micro/externals/flatbuffers/minireflect.h b/onert-micro/externals/flatbuffers/minireflect.h index 8b733a4a5bc..26fd86c96aa 100644 --- a/onert-micro/externals/flatbuffers/minireflect.h +++ b/onert-micro/externals/flatbuffers/minireflect.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2017 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,8 +20,7 @@ #include "flatbuffers/flatbuffers.h" #include "flatbuffers/util.h" -namespace flatbuffers -{ +namespace flatbuffers { // Utilities that can be used with the "mini reflection" tables present // in generated code with --reflect-types (only types) or --reflect-names @@ -36,18 +34,16 @@ namespace flatbuffers // First, a generic iterator that can be used by multiple algorithms. -struct IterationVisitor -{ +struct IterationVisitor { // These mark the scope of a table or struct. virtual void StartSequence() {} virtual void EndSequence() {} // Called for each field regardless of whether it is present or not. // If not present, val == nullptr. set_idx is the index of all set fields. - virtual void Field(size_t /*field_idx*/, size_t /*set_idx*/, ElementaryType /*type*/, - bool /*is_vector*/, const TypeTable * /*type_table*/, const char * /*name*/, - const uint8_t * /*val*/) - { - } + virtual void Field(size_t /*field_idx*/, size_t /*set_idx*/, + ElementaryType /*type*/, bool /*is_vector*/, + const TypeTable * /*type_table*/, const char * /*name*/, + const uint8_t * /*val*/) {} // Called for a value that is actually present, after a field, or as part // of a vector. virtual void UType(uint8_t, const char *) {} @@ -63,189 +59,151 @@ struct IterationVisitor virtual void Float(float) {} virtual void Double(double) {} virtual void String(const String *) {} - virtual void Unknown(const uint8_t *) {} // From a future version. + virtual void Unknown(const uint8_t *) {} // From a future version. // These mark the scope of a vector. virtual void StartVector() {} virtual void EndVector() {} - virtual void Element(size_t /*i*/, ElementaryType /*type*/, const TypeTable * /*type_table*/, - const uint8_t * /*val*/) - { - } + virtual void Element(size_t /*i*/, ElementaryType /*type*/, + const TypeTable * /*type_table*/, + const uint8_t * /*val*/) {} virtual ~IterationVisitor() {} }; -inline size_t InlineSize(ElementaryType type, const TypeTable *type_table) -{ - switch (type) - { +inline size_t InlineSize(ElementaryType type, const TypeTable *type_table) { + switch (type) { case ET_UTYPE: case ET_BOOL: case ET_CHAR: - case ET_UCHAR: - return 1; + case ET_UCHAR: return 1; case ET_SHORT: - case ET_USHORT: - return 2; + case ET_USHORT: return 2; case ET_INT: case ET_UINT: case ET_FLOAT: - case ET_STRING: - return 4; + case ET_STRING: return 4; case ET_LONG: case ET_ULONG: - case ET_DOUBLE: - return 8; + case ET_DOUBLE: return 8; case ET_SEQUENCE: - switch (type_table->st) - { + switch (type_table->st) { case ST_TABLE: - case ST_UNION: - return 4; + case ST_UNION: return 4; case ST_STRUCT: return static_cast(type_table->values[type_table->num_elems]); - default: - FLATBUFFERS_ASSERT(false); - return 1; + default: FLATBUFFERS_ASSERT(false); return 1; } - default: - FLATBUFFERS_ASSERT(false); - return 1; + default: FLATBUFFERS_ASSERT(false); return 1; } } -inline int64_t LookupEnum(int64_t enum_val, const int64_t *values, size_t num_values) -{ - if (!values) - return enum_val; - for (size_t i = 0; i < num_values; i++) - { - if (enum_val == values[i]) - return static_cast(i); +inline int64_t LookupEnum(int64_t enum_val, const int64_t *values, + size_t num_values) { + if (!values) return enum_val; + for (size_t i = 0; i < num_values; i++) { + if (enum_val == values[i]) return static_cast(i); } - return -1; // Unknown enum value. + return -1; // Unknown enum value. } -template const char *EnumName(T tval, const TypeTable *type_table) -{ - if (!type_table || !type_table->names) - return nullptr; - auto i = LookupEnum(static_cast(tval), type_table->values, type_table->num_elems); - if (i >= 0 && i < static_cast(type_table->num_elems)) - { +template const char *EnumName(T tval, const TypeTable *type_table) { + if (!type_table || !type_table->names) return nullptr; + auto i = LookupEnum(static_cast(tval), type_table->values, + type_table->num_elems); + if (i >= 0 && i < static_cast(type_table->num_elems)) { return type_table->names[i]; } return nullptr; } -void IterateObject(const uint8_t *obj, const TypeTable *type_table, IterationVisitor *visitor); +void IterateObject(const uint8_t *obj, const TypeTable *type_table, + IterationVisitor *visitor); -inline void IterateValue(ElementaryType type, const uint8_t *val, const TypeTable *type_table, - const uint8_t *prev_val, soffset_t vector_index, IterationVisitor *visitor) -{ - switch (type) - { - case ET_UTYPE: - { +inline void IterateValue(ElementaryType type, const uint8_t *val, + const TypeTable *type_table, const uint8_t *prev_val, + soffset_t vector_index, IterationVisitor *visitor) { + switch (type) { + case ET_UTYPE: { auto tval = ReadScalar(val); visitor->UType(tval, EnumName(tval, type_table)); break; } - case ET_BOOL: - { + case ET_BOOL: { visitor->Bool(ReadScalar(val) != 0); break; } - case ET_CHAR: - { + case ET_CHAR: { auto tval = ReadScalar(val); visitor->Char(tval, EnumName(tval, type_table)); break; } - case ET_UCHAR: - { + case ET_UCHAR: { auto tval = ReadScalar(val); visitor->UChar(tval, EnumName(tval, type_table)); break; } - case ET_SHORT: - { + case ET_SHORT: { auto tval = ReadScalar(val); visitor->Short(tval, EnumName(tval, type_table)); break; } - case ET_USHORT: - { + case ET_USHORT: { auto tval = ReadScalar(val); visitor->UShort(tval, EnumName(tval, type_table)); break; } - case ET_INT: - { + case ET_INT: { auto tval = ReadScalar(val); visitor->Int(tval, EnumName(tval, type_table)); break; } - case ET_UINT: - { + case ET_UINT: { auto tval = ReadScalar(val); visitor->UInt(tval, EnumName(tval, type_table)); break; } - case ET_LONG: - { + case ET_LONG: { visitor->Long(ReadScalar(val)); break; } - case ET_ULONG: - { + case ET_ULONG: { visitor->ULong(ReadScalar(val)); break; } - case ET_FLOAT: - { + case ET_FLOAT: { visitor->Float(ReadScalar(val)); break; } - case ET_DOUBLE: - { + case ET_DOUBLE: { visitor->Double(ReadScalar(val)); break; } - case ET_STRING: - { + case ET_STRING: { val += ReadScalar(val); visitor->String(reinterpret_cast(val)); break; } - case ET_SEQUENCE: - { - switch (type_table->st) - { + case ET_SEQUENCE: { + switch (type_table->st) { case ST_TABLE: val += ReadScalar(val); IterateObject(val, type_table, visitor); break; - case ST_STRUCT: - IterateObject(val, type_table, visitor); - break; - case ST_UNION: - { + case ST_STRUCT: IterateObject(val, type_table, visitor); break; + case ST_UNION: { val += ReadScalar(val); FLATBUFFERS_ASSERT(prev_val); - auto union_type = *prev_val; // Always a uint8_t. - if (vector_index >= 0) - { + auto union_type = *prev_val; // Always a uint8_t. + if (vector_index >= 0) { auto type_vec = reinterpret_cast *>(prev_val); union_type = type_vec->Get(static_cast(vector_index)); } - auto type_code_idx = LookupEnum(union_type, type_table->values, type_table->num_elems); - if (type_code_idx >= 0 && type_code_idx < static_cast(type_table->num_elems)) - { + auto type_code_idx = + LookupEnum(union_type, type_table->values, type_table->num_elems); + if (type_code_idx >= 0 && + type_code_idx < static_cast(type_table->num_elems)) { auto type_code = type_table->type_codes[type_code_idx]; - switch (type_code.base_type) - { - case ET_SEQUENCE: - { + switch (type_code.base_type) { + case ET_SEQUENCE: { auto ref = type_table->type_refs[type_code.sequence_ref](); IterateObject(val, ref, visitor); break; @@ -253,24 +211,18 @@ inline void IterateValue(ElementaryType type, const uint8_t *val, const TypeTabl case ET_STRING: visitor->String(reinterpret_cast(val)); break; - default: - visitor->Unknown(val); + default: visitor->Unknown(val); } - } - else - { + } else { visitor->Unknown(val); } break; } - case ST_ENUM: - FLATBUFFERS_ASSERT(false); - break; + case ST_ENUM: FLATBUFFERS_ASSERT(false); break; } break; } - default: - { + default: { visitor->Unknown(val); break; } @@ -278,67 +230,52 @@ inline void IterateValue(ElementaryType type, const uint8_t *val, const TypeTabl } inline void IterateObject(const uint8_t *obj, const TypeTable *type_table, - IterationVisitor *visitor) -{ + IterationVisitor *visitor) { visitor->StartSequence(); const uint8_t *prev_val = nullptr; size_t set_idx = 0; size_t array_idx = 0; - for (size_t i = 0; i < type_table->num_elems; i++) - { + for (size_t i = 0; i < type_table->num_elems; i++) { auto type_code = type_table->type_codes[i]; auto type = static_cast(type_code.base_type); auto is_repeating = type_code.is_repeating != 0; auto ref_idx = type_code.sequence_ref; const TypeTable *ref = nullptr; - if (ref_idx >= 0) - { - ref = type_table->type_refs[ref_idx](); - } + if (ref_idx >= 0) { ref = type_table->type_refs[ref_idx](); } auto name = type_table->names ? type_table->names[i] : nullptr; const uint8_t *val = nullptr; - if (type_table->st == ST_TABLE) - { + if (type_table->st == ST_TABLE) { val = reinterpret_cast(obj)->GetAddressOf( - FieldIndexToOffset(static_cast(i))); - } - else - { + FieldIndexToOffset(static_cast(i))); + } else { val = obj + type_table->values[i]; } visitor->Field(i, set_idx, type, is_repeating, ref, name, val); - if (val) - { + if (val) { set_idx++; - if (is_repeating) - { + if (is_repeating) { auto elem_ptr = val; size_t size = 0; - if (type_table->st == ST_TABLE) - { + if (type_table->st == ST_TABLE) { // variable length vector val += ReadScalar(val); auto vec = reinterpret_cast *>(val); elem_ptr = vec->Data(); size = vec->size(); - } - else - { + } else { // otherwise fixed size array size = type_table->array_sizes[array_idx]; ++array_idx; } visitor->StartVector(); - for (size_t j = 0; j < size; j++) - { + for (size_t j = 0; j < size; j++) { visitor->Element(j, type, ref, elem_ptr); - IterateValue(type, elem_ptr, ref, prev_val, static_cast(j), visitor); + IterateValue(type, elem_ptr, ref, prev_val, static_cast(j), + visitor); elem_ptr += InlineSize(type, ref); } visitor->EndVector(); - } - else - { + } else { IterateValue(type, val, ref, prev_val, -1, visitor); } } @@ -347,86 +284,73 @@ inline void IterateObject(const uint8_t *obj, const TypeTable *type_table, visitor->EndSequence(); } -inline void IterateFlatBuffer(const uint8_t *buffer, const TypeTable *type_table, - IterationVisitor *callback) -{ +inline void IterateFlatBuffer(const uint8_t *buffer, + const TypeTable *type_table, + IterationVisitor *callback) { IterateObject(GetRoot(buffer), type_table, callback); } // Outputting a Flatbuffer to a string. Tries to conform as close to JSON / // the output generated by idl_gen_text.cpp. -struct ToStringVisitor : public IterationVisitor -{ +struct ToStringVisitor : public IterationVisitor { std::string s; std::string d; bool q; std::string in; size_t indent_level; bool vector_delimited; - ToStringVisitor(std::string delimiter, bool quotes, std::string indent, bool vdelimited = true) - : d(delimiter), q(quotes), in(indent), indent_level(0), vector_delimited(vdelimited) - { - } + ToStringVisitor(std::string delimiter, bool quotes, std::string indent, + bool vdelimited = true) + : d(delimiter), + q(quotes), + in(indent), + indent_level(0), + vector_delimited(vdelimited) {} ToStringVisitor(std::string delimiter) - : d(delimiter), q(false), in(""), indent_level(0), vector_delimited(true) - { - } + : d(delimiter), + q(false), + in(""), + indent_level(0), + vector_delimited(true) {} - void append_indent() - { - for (size_t i = 0; i < indent_level; i++) - { - s += in; - } + void append_indent() { + for (size_t i = 0; i < indent_level; i++) { s += in; } } - void StartSequence() - { + void StartSequence() { s += "{"; s += d; indent_level++; } - void EndSequence() - { + void EndSequence() { s += d; indent_level--; append_indent(); s += "}"; } - void Field(size_t /*field_idx*/, size_t set_idx, ElementaryType /*type*/, bool /*is_vector*/, - const TypeTable * /*type_table*/, const char *name, const uint8_t *val) - { - if (!val) - return; - if (set_idx) - { + void Field(size_t /*field_idx*/, size_t set_idx, ElementaryType /*type*/, + bool /*is_vector*/, const TypeTable * /*type_table*/, + const char *name, const uint8_t *val) { + if (!val) return; + if (set_idx) { s += ","; s += d; } append_indent(); - if (name) - { - if (q) - s += "\""; + if (name) { + if (q) s += "\""; s += name; - if (q) - s += "\""; + if (q) s += "\""; s += ": "; } } - template void Named(T x, const char *name) - { - if (name) - { - if (q) - s += "\""; + template void Named(T x, const char *name) { + if (name) { + if (q) s += "\""; s += name; - if (q) - s += "\""; - } - else - { + if (q) s += "\""; + } else { s += NumToString(x); } } @@ -442,66 +366,54 @@ struct ToStringVisitor : public IterationVisitor void ULong(uint64_t x) { s += NumToString(x); } void Float(float x) { s += NumToString(x); } void Double(double x) { s += NumToString(x); } - void String(const struct String *str) - { + void String(const struct String *str) { EscapeString(str->c_str(), str->size(), &s, true, false); } void Unknown(const uint8_t *) { s += "(?)"; } - void StartVector() - { + void StartVector() { s += "["; - if (vector_delimited) - { + if (vector_delimited) { s += d; indent_level++; append_indent(); - } - else - { + } else { s += " "; } } - void EndVector() - { - if (vector_delimited) - { + void EndVector() { + if (vector_delimited) { s += d; indent_level--; append_indent(); - } - else - { + } else { s += " "; } s += "]"; } - void Element(size_t i, ElementaryType /*type*/, const TypeTable * /*type_table*/, - const uint8_t * /*val*/) - { - if (i) - { + void Element(size_t i, ElementaryType /*type*/, + const TypeTable * /*type_table*/, const uint8_t * /*val*/) { + if (i) { s += ","; - if (vector_delimited) - { + if (vector_delimited) { s += d; append_indent(); - } - else - { + } else { s += " "; } } } }; -inline std::string FlatBufferToString(const uint8_t *buffer, const TypeTable *type_table, - bool multi_line = false, bool vector_delimited = true) -{ - ToStringVisitor tostring_visitor(multi_line ? "\n" : " ", false, "", vector_delimited); +inline std::string FlatBufferToString(const uint8_t *buffer, + const TypeTable *type_table, + bool multi_line = false, + bool vector_delimited = true) { + ToStringVisitor tostring_visitor(multi_line ? "\n" : " ", false, "", + vector_delimited); IterateFlatBuffer(buffer, type_table, &tostring_visitor); return tostring_visitor.s; } -} // namespace flatbuffers +} // namespace flatbuffers -#endif // FLATBUFFERS_MINIREFLECT_H_ +#endif // FLATBUFFERS_MINIREFLECT_H_ diff --git a/onert-micro/externals/flatbuffers/pch/flatc_pch.h b/onert-micro/externals/flatbuffers/pch/flatc_pch.h index 988fcf371a6..77132790b66 100644 --- a/onert-micro/externals/flatbuffers/pch/flatc_pch.h +++ b/onert-micro/externals/flatbuffers/pch/flatc_pch.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2017 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/onert-micro/externals/flatbuffers/pch/pch.h b/onert-micro/externals/flatbuffers/pch/pch.h index 0e7886fb444..804e99ed04a 100644 --- a/onert-micro/externals/flatbuffers/pch/pch.h +++ b/onert-micro/externals/flatbuffers/pch/pch.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2017 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/onert-micro/externals/flatbuffers/reflection.h b/onert-micro/externals/flatbuffers/reflection.h index 8e2b155f758..c6fa411afe8 100644 --- a/onert-micro/externals/flatbuffers/reflection.h +++ b/onert-micro/externals/flatbuffers/reflection.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2015 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,54 +26,48 @@ // Helper functionality for reflection. -namespace flatbuffers -{ +namespace flatbuffers { // ------------------------- GETTERS ------------------------- -inline bool IsScalar(reflection::BaseType t) -{ +inline bool IsScalar(reflection::BaseType t) { return t >= reflection::UType && t <= reflection::Double; } -inline bool IsInteger(reflection::BaseType t) -{ +inline bool IsInteger(reflection::BaseType t) { return t >= reflection::UType && t <= reflection::ULong; } -inline bool IsFloat(reflection::BaseType t) -{ +inline bool IsFloat(reflection::BaseType t) { return t == reflection::Float || t == reflection::Double; } -inline bool IsLong(reflection::BaseType t) -{ +inline bool IsLong(reflection::BaseType t) { return t == reflection::Long || t == reflection::ULong; } // Size of a basic type, don't use with structs. -inline size_t GetTypeSize(reflection::BaseType base_type) -{ +inline size_t GetTypeSize(reflection::BaseType base_type) { // This needs to correspond to the BaseType enum. static size_t sizes[] = { - 0, // None - 1, // UType - 1, // Bool - 1, // Byte - 1, // UByte - 2, // Short - 2, // UShort - 4, // Int - 4, // UInt - 8, // Long - 8, // ULong - 4, // Float - 8, // Double - 4, // String - 4, // Vector - 4, // Obj - 4, // Union - 0, // Array. Only used in structs. 0 was chosen to prevent out-of-bounds - // errors. - - 0 // MaxBaseType. This must be kept the last entry in this array. + 0, // None + 1, // UType + 1, // Bool + 1, // Byte + 1, // UByte + 2, // Short + 2, // UShort + 4, // Int + 4, // UInt + 8, // Long + 8, // ULong + 4, // Float + 8, // Double + 4, // String + 4, // Vector + 4, // Obj + 4, // Union + 0, // Array. Only used in structs. 0 was chosen to prevent out-of-bounds + // errors. + + 0 // MaxBaseType. This must be kept the last entry in this array. }; static_assert(sizeof(sizes) / sizeof(size_t) == reflection::MaxBaseType + 1, "Size of sizes[] array does not match the count of BaseType " @@ -85,60 +78,61 @@ inline size_t GetTypeSize(reflection::BaseType base_type) // Same as above, but now correctly returns the size of a struct if // the field (or vector element) is a struct. inline size_t GetTypeSizeInline(reflection::BaseType base_type, int type_index, - const reflection::Schema &schema) -{ - if (base_type == reflection::Obj && schema.objects()->Get(type_index)->is_struct()) - { + const reflection::Schema &schema) { + if (base_type == reflection::Obj && + schema.objects()->Get(type_index)->is_struct()) { return schema.objects()->Get(type_index)->bytesize(); - } - else - { + } else { return GetTypeSize(base_type); } } // Get the root, regardless of what type it is. -inline Table *GetAnyRoot(uint8_t *flatbuf) { return GetMutableRoot
(flatbuf); } -inline const Table *GetAnyRoot(const uint8_t *flatbuf) { return GetRoot
(flatbuf); } +inline Table *GetAnyRoot(uint8_t *flatbuf) { + return GetMutableRoot
(flatbuf); +} +inline const Table *GetAnyRoot(const uint8_t *flatbuf) { + return GetRoot
(flatbuf); +} // Get a field's default, if you know it's an integer, and its exact type. -template T GetFieldDefaultI(const reflection::Field &field) -{ +template T GetFieldDefaultI(const reflection::Field &field) { FLATBUFFERS_ASSERT(sizeof(T) == GetTypeSize(field.type()->base_type())); return static_cast(field.default_integer()); } // Get a field's default, if you know it's floating point and its exact type. -template T GetFieldDefaultF(const reflection::Field &field) -{ +template T GetFieldDefaultF(const reflection::Field &field) { FLATBUFFERS_ASSERT(sizeof(T) == GetTypeSize(field.type()->base_type())); return static_cast(field.default_real()); } // Get a field, if you know it's an integer, and its exact type. -template T GetFieldI(const Table &table, const reflection::Field &field) -{ +template +T GetFieldI(const Table &table, const reflection::Field &field) { FLATBUFFERS_ASSERT(sizeof(T) == GetTypeSize(field.type()->base_type())); - return table.GetField(field.offset(), static_cast(field.default_integer())); + return table.GetField(field.offset(), + static_cast(field.default_integer())); } // Get a field, if you know it's floating point and its exact type. -template T GetFieldF(const Table &table, const reflection::Field &field) -{ +template +T GetFieldF(const Table &table, const reflection::Field &field) { FLATBUFFERS_ASSERT(sizeof(T) == GetTypeSize(field.type()->base_type())); - return table.GetField(field.offset(), static_cast(field.default_real())); + return table.GetField(field.offset(), + static_cast(field.default_real())); } // Get a field, if you know it's a string. -inline const String *GetFieldS(const Table &table, const reflection::Field &field) -{ +inline const String *GetFieldS(const Table &table, + const reflection::Field &field) { FLATBUFFERS_ASSERT(field.type()->base_type() == reflection::String); return table.GetPointer(field.offset()); } // Get a field, if you know it's a vector. -template Vector *GetFieldV(const Table &table, const reflection::Field &field) -{ +template +Vector *GetFieldV(const Table &table, const reflection::Field &field) { FLATBUFFERS_ASSERT(field.type()->base_type() == reflection::Vector && sizeof(T) == GetTypeSize(field.type()->element())); return table.GetPointer *>(field.offset()); @@ -147,22 +141,21 @@ template Vector *GetFieldV(const Table &table, const reflection: // Get a field, if you know it's a vector, generically. // To actually access elements, use the return value together with // field.type()->element() in any of GetAnyVectorElemI below etc. -inline VectorOfAny *GetFieldAnyV(const Table &table, const reflection::Field &field) -{ +inline VectorOfAny *GetFieldAnyV(const Table &table, + const reflection::Field &field) { return table.GetPointer(field.offset()); } // Get a field, if you know it's a table. -inline Table *GetFieldT(const Table &table, const reflection::Field &field) -{ +inline Table *GetFieldT(const Table &table, const reflection::Field &field) { FLATBUFFERS_ASSERT(field.type()->base_type() == reflection::Obj || field.type()->base_type() == reflection::Union); return table.GetPointer
(field.offset()); } // Get a field, if you know it's a struct. -inline const Struct *GetFieldStruct(const Table &table, const reflection::Field &field) -{ +inline const Struct *GetFieldStruct(const Table &table, + const reflection::Field &field) { // TODO: This does NOT check if the field is a table or struct, but we'd need // access to the schema to check the is_struct flag. FLATBUFFERS_ASSERT(field.type()->base_type() == reflection::Obj); @@ -170,8 +163,8 @@ inline const Struct *GetFieldStruct(const Table &table, const reflection::Field } // Get a structure's field, if you know it's a struct. -inline const Struct *GetFieldStruct(const Struct &structure, const reflection::Field &field) -{ +inline const Struct *GetFieldStruct(const Struct &structure, + const reflection::Field &field) { FLATBUFFERS_ASSERT(field.type()->base_type() == reflection::Obj); return structure.GetStruct(field.offset()); } @@ -190,73 +183,75 @@ std::string GetAnyValueS(reflection::BaseType type, const uint8_t *data, const reflection::Schema *schema, int type_index); // Get any table field as a 64bit int, regardless of what type it is. -inline int64_t GetAnyFieldI(const Table &table, const reflection::Field &field) -{ +inline int64_t GetAnyFieldI(const Table &table, + const reflection::Field &field) { auto field_ptr = table.GetAddressOf(field.offset()); - return field_ptr ? GetAnyValueI(field.type()->base_type(), field_ptr) : field.default_integer(); + return field_ptr ? GetAnyValueI(field.type()->base_type(), field_ptr) + : field.default_integer(); } // Get any table field as a double, regardless of what type it is. -inline double GetAnyFieldF(const Table &table, const reflection::Field &field) -{ +inline double GetAnyFieldF(const Table &table, const reflection::Field &field) { auto field_ptr = table.GetAddressOf(field.offset()); - return field_ptr ? GetAnyValueF(field.type()->base_type(), field_ptr) : field.default_real(); + return field_ptr ? GetAnyValueF(field.type()->base_type(), field_ptr) + : field.default_real(); } // Get any table field as a string, regardless of what type it is. // You may pass nullptr for the schema if you don't care to have fields that // are of table type pretty-printed. -inline std::string GetAnyFieldS(const Table &table, const reflection::Field &field, - const reflection::Schema *schema) -{ +inline std::string GetAnyFieldS(const Table &table, + const reflection::Field &field, + const reflection::Schema *schema) { auto field_ptr = table.GetAddressOf(field.offset()); - return field_ptr - ? GetAnyValueS(field.type()->base_type(), field_ptr, schema, field.type()->index()) - : ""; + return field_ptr ? GetAnyValueS(field.type()->base_type(), field_ptr, schema, + field.type()->index()) + : ""; } // Get any struct field as a 64bit int, regardless of what type it is. -inline int64_t GetAnyFieldI(const Struct &st, const reflection::Field &field) -{ - return GetAnyValueI(field.type()->base_type(), st.GetAddressOf(field.offset())); +inline int64_t GetAnyFieldI(const Struct &st, const reflection::Field &field) { + return GetAnyValueI(field.type()->base_type(), + st.GetAddressOf(field.offset())); } // Get any struct field as a double, regardless of what type it is. -inline double GetAnyFieldF(const Struct &st, const reflection::Field &field) -{ - return GetAnyValueF(field.type()->base_type(), st.GetAddressOf(field.offset())); +inline double GetAnyFieldF(const Struct &st, const reflection::Field &field) { + return GetAnyValueF(field.type()->base_type(), + st.GetAddressOf(field.offset())); } // Get any struct field as a string, regardless of what type it is. -inline std::string GetAnyFieldS(const Struct &st, const reflection::Field &field) -{ - return GetAnyValueS(field.type()->base_type(), st.GetAddressOf(field.offset()), nullptr, -1); +inline std::string GetAnyFieldS(const Struct &st, + const reflection::Field &field) { + return GetAnyValueS(field.type()->base_type(), + st.GetAddressOf(field.offset()), nullptr, -1); } // Get any vector element as a 64bit int, regardless of what type it is. -inline int64_t GetAnyVectorElemI(const VectorOfAny *vec, reflection::BaseType elem_type, size_t i) -{ +inline int64_t GetAnyVectorElemI(const VectorOfAny *vec, + reflection::BaseType elem_type, size_t i) { return GetAnyValueI(elem_type, vec->Data() + GetTypeSize(elem_type) * i); } // Get any vector element as a double, regardless of what type it is. -inline double GetAnyVectorElemF(const VectorOfAny *vec, reflection::BaseType elem_type, size_t i) -{ +inline double GetAnyVectorElemF(const VectorOfAny *vec, + reflection::BaseType elem_type, size_t i) { return GetAnyValueF(elem_type, vec->Data() + GetTypeSize(elem_type) * i); } // Get any vector element as a string, regardless of what type it is. -inline std::string GetAnyVectorElemS(const VectorOfAny *vec, reflection::BaseType elem_type, - size_t i) -{ - return GetAnyValueS(elem_type, vec->Data() + GetTypeSize(elem_type) * i, nullptr, -1); +inline std::string GetAnyVectorElemS(const VectorOfAny *vec, + reflection::BaseType elem_type, size_t i) { + return GetAnyValueS(elem_type, vec->Data() + GetTypeSize(elem_type) * i, + nullptr, -1); } // Get a vector element that's a table/string/vector from a generic vector. // Pass Table/String/VectorOfAny as template parameter. // Warning: does no typechecking. -template T *GetAnyVectorElemPointer(const VectorOfAny *vec, size_t i) -{ +template +T *GetAnyVectorElemPointer(const VectorOfAny *vec, size_t i) { auto elem_ptr = vec->Data() + sizeof(uoffset_t) * i; return reinterpret_cast(elem_ptr + ReadScalar(elem_ptr)); } @@ -266,42 +261,36 @@ template T *GetAnyVectorElemPointer(const VectorOfAny *vec, size_t // Get elem_size from GetTypeSizeInline(). // Note: little-endian data on all platforms, use EndianScalar() instead of // raw pointer access with scalars). -template -T *GetAnyVectorElemAddressOf(const VectorOfAny *vec, size_t i, size_t elem_size) -{ +template +T *GetAnyVectorElemAddressOf(const VectorOfAny *vec, size_t i, + size_t elem_size) { return reinterpret_cast(vec->Data() + elem_size * i); } // Similarly, for elements of tables. -template T *GetAnyFieldAddressOf(const Table &table, const reflection::Field &field) -{ +template +T *GetAnyFieldAddressOf(const Table &table, const reflection::Field &field) { return reinterpret_cast(table.GetAddressOf(field.offset())); } // Similarly, for elements of structs. -template T *GetAnyFieldAddressOf(const Struct &st, const reflection::Field &field) -{ +template +T *GetAnyFieldAddressOf(const Struct &st, const reflection::Field &field) { return reinterpret_cast(st.GetAddressOf(field.offset())); } // ------------------------- SETTERS ------------------------- // Set any scalar field, if you know its exact type. -template bool SetField(Table *table, const reflection::Field &field, T val) -{ +template +bool SetField(Table *table, const reflection::Field &field, T val) { reflection::BaseType type = field.type()->base_type(); - if (!IsScalar(type)) - { - return false; - } + if (!IsScalar(type)) { return false; } FLATBUFFERS_ASSERT(sizeof(T) == GetTypeSize(type)); T def; - if (IsInteger(type)) - { + if (IsInteger(type)) { def = GetFieldDefaultI(field); - } - else - { + } else { FLATBUFFERS_ASSERT(IsFloat(type)); def = GetFieldDefaultF(field); } @@ -317,71 +306,68 @@ void SetAnyValueF(reflection::BaseType type, uint8_t *data, double val); void SetAnyValueS(reflection::BaseType type, uint8_t *data, const char *val); // Set any table field as a 64bit int, regardless of type what it is. -inline bool SetAnyFieldI(Table *table, const reflection::Field &field, int64_t val) -{ +inline bool SetAnyFieldI(Table *table, const reflection::Field &field, + int64_t val) { auto field_ptr = table->GetAddressOf(field.offset()); - if (!field_ptr) - return val == GetFieldDefaultI(field); + if (!field_ptr) return val == GetFieldDefaultI(field); SetAnyValueI(field.type()->base_type(), field_ptr, val); return true; } // Set any table field as a double, regardless of what type it is. -inline bool SetAnyFieldF(Table *table, const reflection::Field &field, double val) -{ +inline bool SetAnyFieldF(Table *table, const reflection::Field &field, + double val) { auto field_ptr = table->GetAddressOf(field.offset()); - if (!field_ptr) - return val == GetFieldDefaultF(field); + if (!field_ptr) return val == GetFieldDefaultF(field); SetAnyValueF(field.type()->base_type(), field_ptr, val); return true; } // Set any table field as a string, regardless of what type it is. -inline bool SetAnyFieldS(Table *table, const reflection::Field &field, const char *val) -{ +inline bool SetAnyFieldS(Table *table, const reflection::Field &field, + const char *val) { auto field_ptr = table->GetAddressOf(field.offset()); - if (!field_ptr) - return false; + if (!field_ptr) return false; SetAnyValueS(field.type()->base_type(), field_ptr, val); return true; } // Set any struct field as a 64bit int, regardless of type what it is. -inline void SetAnyFieldI(Struct *st, const reflection::Field &field, int64_t val) -{ - SetAnyValueI(field.type()->base_type(), st->GetAddressOf(field.offset()), val); +inline void SetAnyFieldI(Struct *st, const reflection::Field &field, + int64_t val) { + SetAnyValueI(field.type()->base_type(), st->GetAddressOf(field.offset()), + val); } // Set any struct field as a double, regardless of type what it is. -inline void SetAnyFieldF(Struct *st, const reflection::Field &field, double val) -{ - SetAnyValueF(field.type()->base_type(), st->GetAddressOf(field.offset()), val); +inline void SetAnyFieldF(Struct *st, const reflection::Field &field, + double val) { + SetAnyValueF(field.type()->base_type(), st->GetAddressOf(field.offset()), + val); } // Set any struct field as a string, regardless of type what it is. -inline void SetAnyFieldS(Struct *st, const reflection::Field &field, const char *val) -{ - SetAnyValueS(field.type()->base_type(), st->GetAddressOf(field.offset()), val); +inline void SetAnyFieldS(Struct *st, const reflection::Field &field, + const char *val) { + SetAnyValueS(field.type()->base_type(), st->GetAddressOf(field.offset()), + val); } // Set any vector element as a 64bit int, regardless of type what it is. -inline void SetAnyVectorElemI(VectorOfAny *vec, reflection::BaseType elem_type, size_t i, - int64_t val) -{ +inline void SetAnyVectorElemI(VectorOfAny *vec, reflection::BaseType elem_type, + size_t i, int64_t val) { SetAnyValueI(elem_type, vec->Data() + GetTypeSize(elem_type) * i, val); } // Set any vector element as a double, regardless of type what it is. -inline void SetAnyVectorElemF(VectorOfAny *vec, reflection::BaseType elem_type, size_t i, - double val) -{ +inline void SetAnyVectorElemF(VectorOfAny *vec, reflection::BaseType elem_type, + size_t i, double val) { SetAnyValueF(elem_type, vec->Data() + GetTypeSize(elem_type) * i, val); } // Set any vector element as a string, regardless of type what it is. -inline void SetAnyVectorElemS(VectorOfAny *vec, reflection::BaseType elem_type, size_t i, - const char *val) -{ +inline void SetAnyVectorElemS(VectorOfAny *vec, reflection::BaseType elem_type, + size_t i, const char *val) { SetAnyValueS(elem_type, vec->Data() + GetTypeSize(elem_type) * i, val); } @@ -389,46 +375,40 @@ inline void SetAnyVectorElemS(VectorOfAny *vec, reflection::BaseType elem_type, // "smart" pointer for use with resizing vectors: turns a pointer inside // a vector into a relative offset, such that it is not affected by resizes. -template class pointer_inside_vector -{ -public: +template class pointer_inside_vector { + public: pointer_inside_vector(T *ptr, std::vector &vec) - : offset_(reinterpret_cast(ptr) - - reinterpret_cast(flatbuffers::vector_data(vec))), - vec_(vec) - { - } + : offset_(reinterpret_cast(ptr) - + reinterpret_cast(flatbuffers::vector_data(vec))), + vec_(vec) {} - T *operator*() const - { - return reinterpret_cast(reinterpret_cast(flatbuffers::vector_data(vec_)) + - offset_); + T *operator*() const { + return reinterpret_cast( + reinterpret_cast(flatbuffers::vector_data(vec_)) + offset_); } T *operator->() const { return operator*(); } -private: + private: size_t offset_; std::vector &vec_; }; // Helper to create the above easily without specifying template args. -template pointer_inside_vector piv(T *ptr, std::vector &vec) -{ +template +pointer_inside_vector piv(T *ptr, std::vector &vec) { return pointer_inside_vector(ptr, vec); } inline const char *UnionTypeFieldSuffix() { return "_type"; } // Helper to figure out the actual table type a union refers to. -inline const reflection::Object &GetUnionType(const reflection::Schema &schema, - const reflection::Object &parent, - const reflection::Field &unionfield, - const Table &table) -{ +inline const reflection::Object &GetUnionType( + const reflection::Schema &schema, const reflection::Object &parent, + const reflection::Field &unionfield, const Table &table) { auto enumdef = schema.enums()->Get(unionfield.type()->index()); // TODO: this is clumsy and slow, but no other way to find it? - auto type_field = - parent.fields()->LookupByKey((unionfield.name()->str() + UnionTypeFieldSuffix()).c_str()); + auto type_field = parent.fields()->LookupByKey( + (unionfield.name()->str() + UnionTypeFieldSuffix()).c_str()); FLATBUFFERS_ASSERT(type_field); auto union_type = GetFieldI(table, *type_field); auto enumval = enumdef->values()->LookupByKey(union_type); @@ -440,8 +420,9 @@ inline const reflection::Object &GetUnionType(const reflection::Schema &schema, // "str" must live inside "flatbuf" and may be invalidated after this call. // If your FlatBuffer's root table is not the schema's root table, you should // pass in your root_table type as well. -void SetString(const reflection::Schema &schema, const std::string &val, const String *str, - std::vector *flatbuf, const reflection::Object *root_table = nullptr); +void SetString(const reflection::Schema &schema, const std::string &val, + const String *str, std::vector *flatbuf, + const reflection::Object *root_table = nullptr); // Resizes a flatbuffers::Vector inside a FlatBuffer. FlatBuffer must // live inside a std::vector so we can resize the buffer if needed. @@ -449,29 +430,25 @@ void SetString(const reflection::Schema &schema, const std::string &val, const S // If your FlatBuffer's root table is not the schema's root table, you should // pass in your root_table type as well. uint8_t *ResizeAnyVector(const reflection::Schema &schema, uoffset_t newsize, - const VectorOfAny *vec, uoffset_t num_elems, uoffset_t elem_size, - std::vector *flatbuf, + const VectorOfAny *vec, uoffset_t num_elems, + uoffset_t elem_size, std::vector *flatbuf, const reflection::Object *root_table = nullptr); -template -void ResizeVector(const reflection::Schema &schema, uoffset_t newsize, T val, const Vector *vec, - std::vector *flatbuf, const reflection::Object *root_table = nullptr) -{ +template +void ResizeVector(const reflection::Schema &schema, uoffset_t newsize, T val, + const Vector *vec, std::vector *flatbuf, + const reflection::Object *root_table = nullptr) { auto delta_elem = static_cast(newsize) - static_cast(vec->size()); - auto newelems = - ResizeAnyVector(schema, newsize, reinterpret_cast(vec), vec->size(), - static_cast(sizeof(T)), flatbuf, root_table); + auto newelems = ResizeAnyVector( + schema, newsize, reinterpret_cast(vec), vec->size(), + static_cast(sizeof(T)), flatbuf, root_table); // Set new elements to "val". - for (int i = 0; i < delta_elem; i++) - { + for (int i = 0; i < delta_elem; i++) { auto loc = newelems + i * sizeof(T); auto is_scalar = flatbuffers::is_scalar::value; - if (is_scalar) - { + if (is_scalar) { WriteScalar(loc, val); - } - else - { // struct + } else { // struct *reinterpret_cast(loc) = val; } } @@ -485,11 +462,13 @@ void ResizeVector(const reflection::Schema &schema, uoffset_t newsize, T val, co // existing one. // The return value can now be set using Vector::MutateOffset or SetFieldT // below. -const uint8_t *AddFlatBuffer(std::vector &flatbuf, const uint8_t *newbuf, size_t newlen); +const uint8_t *AddFlatBuffer(std::vector &flatbuf, + const uint8_t *newbuf, size_t newlen); -inline bool SetFieldT(Table *table, const reflection::Field &field, const uint8_t *val) -{ - FLATBUFFERS_ASSERT(sizeof(uoffset_t) == GetTypeSize(field.type()->base_type())); +inline bool SetFieldT(Table *table, const reflection::Field &field, + const uint8_t *val) { + FLATBUFFERS_ASSERT(sizeof(uoffset_t) == + GetTypeSize(field.type()->base_type())); return table->SetPointer(field.offset(), val); } @@ -504,17 +483,20 @@ inline bool SetFieldT(Table *table, const reflection::Field &field, const uint8_ // DAG, the copy will be a tree instead (with duplicates). Strings can be // shared however, by passing true for use_string_pooling. -Offset CopyTable(FlatBufferBuilder &fbb, const reflection::Schema &schema, - const reflection::Object &objectdef, const Table &table, +Offset CopyTable(FlatBufferBuilder &fbb, + const reflection::Schema &schema, + const reflection::Object &objectdef, + const Table &table, bool use_string_pooling = false); // Verifies the provided flatbuffer using reflection. // root should point to the root type for this flatbuffer. // buf should point to the start of flatbuffer data. // length specifies the size of the flatbuffer data. -bool Verify(const reflection::Schema &schema, const reflection::Object &root, const uint8_t *buf, - size_t length, uoffset_t max_depth = 64, uoffset_t max_tables = 1000000); +bool Verify(const reflection::Schema &schema, const reflection::Object &root, + const uint8_t *buf, size_t length, uoffset_t max_depth = 64, + uoffset_t max_tables = 1000000); -} // namespace flatbuffers +} // namespace flatbuffers -#endif // FLATBUFFERS_REFLECTION_H_ +#endif // FLATBUFFERS_REFLECTION_H_ diff --git a/onert-micro/externals/flatbuffers/reflection_generated.h b/onert-micro/externals/flatbuffers/reflection_generated.h index 9c57dd1f3c0..235146e1656 100644 --- a/onert-micro/externals/flatbuffers/reflection_generated.h +++ b/onert-micro/externals/flatbuffers/reflection_generated.h @@ -1,28 +1,12 @@ -/* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved - * Copyright 2017 Google Inc. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // automatically generated by the FlatBuffers compiler, do not modify + #ifndef FLATBUFFERS_GENERATED_REFLECTION_REFLECTION_H_ #define FLATBUFFERS_GENERATED_REFLECTION_REFLECTION_H_ #include "flatbuffers/flatbuffers.h" -namespace reflection -{ +namespace reflection { struct Type; struct TypeBuilder; @@ -51,8 +35,7 @@ struct ServiceBuilder; struct Schema; struct SchemaBuilder; -enum BaseType -{ +enum BaseType { None = 0, UType = 1, Bool = 2, @@ -74,131 +57,164 @@ enum BaseType MaxBaseType = 18 }; -inline const BaseType (&EnumValuesBaseType())[19] -{ - static const BaseType values[] = {None, UType, Bool, Byte, UByte, Short, UShort, - Int, UInt, Long, ULong, Float, Double, String, - Vector, Obj, Union, Array, MaxBaseType}; +inline const BaseType (&EnumValuesBaseType())[19] { + static const BaseType values[] = { + None, + UType, + Bool, + Byte, + UByte, + Short, + UShort, + Int, + UInt, + Long, + ULong, + Float, + Double, + String, + Vector, + Obj, + Union, + Array, + MaxBaseType + }; return values; } -inline const char *const *EnumNamesBaseType() -{ - static const char *const names[20] = {"None", "UType", "Bool", "Byte", "UByte", - "Short", "UShort", "Int", "UInt", "Long", - "ULong", "Float", "Double", "String", "Vector", - "Obj", "Union", "Array", "MaxBaseType", nullptr}; +inline const char * const *EnumNamesBaseType() { + static const char * const names[20] = { + "None", + "UType", + "Bool", + "Byte", + "UByte", + "Short", + "UShort", + "Int", + "UInt", + "Long", + "ULong", + "Float", + "Double", + "String", + "Vector", + "Obj", + "Union", + "Array", + "MaxBaseType", + nullptr + }; return names; } -inline const char *EnumNameBaseType(BaseType e) -{ - if (flatbuffers::IsOutRange(e, None, MaxBaseType)) - return ""; +inline const char *EnumNameBaseType(BaseType e) { + if (flatbuffers::IsOutRange(e, None, MaxBaseType)) return ""; const size_t index = static_cast(e); return EnumNamesBaseType()[index]; } -enum AdvancedFeatures -{ +enum AdvancedFeatures { AdvancedArrayFeatures = 1ULL, AdvancedUnionFeatures = 2ULL, OptionalScalars = 4ULL, DefaultVectorsAndStrings = 8ULL }; -inline const AdvancedFeatures (&EnumValuesAdvancedFeatures())[4] -{ - static const AdvancedFeatures values[] = {AdvancedArrayFeatures, AdvancedUnionFeatures, - OptionalScalars, DefaultVectorsAndStrings}; +inline const AdvancedFeatures (&EnumValuesAdvancedFeatures())[4] { + static const AdvancedFeatures values[] = { + AdvancedArrayFeatures, + AdvancedUnionFeatures, + OptionalScalars, + DefaultVectorsAndStrings + }; return values; } -inline const char *const *EnumNamesAdvancedFeatures() -{ - static const char *const names[9] = {"AdvancedArrayFeatures", - "AdvancedUnionFeatures", - "", - "OptionalScalars", - "", - "", - "", - "DefaultVectorsAndStrings", - nullptr}; +inline const char * const *EnumNamesAdvancedFeatures() { + static const char * const names[9] = { + "AdvancedArrayFeatures", + "AdvancedUnionFeatures", + "", + "OptionalScalars", + "", + "", + "", + "DefaultVectorsAndStrings", + nullptr + }; return names; } -inline const char *EnumNameAdvancedFeatures(AdvancedFeatures e) -{ - if (flatbuffers::IsOutRange(e, AdvancedArrayFeatures, DefaultVectorsAndStrings)) - return ""; +inline const char *EnumNameAdvancedFeatures(AdvancedFeatures e) { + if (flatbuffers::IsOutRange(e, AdvancedArrayFeatures, DefaultVectorsAndStrings)) return ""; const size_t index = static_cast(e) - static_cast(AdvancedArrayFeatures); return EnumNamesAdvancedFeatures()[index]; } -struct Type FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ +struct Type FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef TypeBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_BASE_TYPE = 4, VT_ELEMENT = 6, VT_INDEX = 8, VT_FIXED_LENGTH = 10 }; - reflection::BaseType base_type() const - { + reflection::BaseType base_type() const { return static_cast(GetField(VT_BASE_TYPE, 0)); } - reflection::BaseType element() const - { + reflection::BaseType element() const { return static_cast(GetField(VT_ELEMENT, 0)); } - int32_t index() const { return GetField(VT_INDEX, -1); } - uint16_t fixed_length() const { return GetField(VT_FIXED_LENGTH, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_BASE_TYPE) && - VerifyField(verifier, VT_ELEMENT) && VerifyField(verifier, VT_INDEX) && - VerifyField(verifier, VT_FIXED_LENGTH) && verifier.EndTable(); + int32_t index() const { + return GetField(VT_INDEX, -1); + } + uint16_t fixed_length() const { + return GetField(VT_FIXED_LENGTH, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_BASE_TYPE) && + VerifyField(verifier, VT_ELEMENT) && + VerifyField(verifier, VT_INDEX) && + VerifyField(verifier, VT_FIXED_LENGTH) && + verifier.EndTable(); } }; -struct TypeBuilder -{ +struct TypeBuilder { typedef Type Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_base_type(reflection::BaseType base_type) - { + void add_base_type(reflection::BaseType base_type) { fbb_.AddElement(Type::VT_BASE_TYPE, static_cast(base_type), 0); } - void add_element(reflection::BaseType element) - { + void add_element(reflection::BaseType element) { fbb_.AddElement(Type::VT_ELEMENT, static_cast(element), 0); } - void add_index(int32_t index) { fbb_.AddElement(Type::VT_INDEX, index, -1); } - void add_fixed_length(uint16_t fixed_length) - { + void add_index(int32_t index) { + fbb_.AddElement(Type::VT_INDEX, index, -1); + } + void add_fixed_length(uint16_t fixed_length) { fbb_.AddElement(Type::VT_FIXED_LENGTH, fixed_length, 0); } - explicit TypeBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit TypeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateType(flatbuffers::FlatBufferBuilder &_fbb, - reflection::BaseType base_type = reflection::None, - reflection::BaseType element = reflection::None, - int32_t index = -1, uint16_t fixed_length = 0) -{ +inline flatbuffers::Offset CreateType( + flatbuffers::FlatBufferBuilder &_fbb, + reflection::BaseType base_type = reflection::None, + reflection::BaseType element = reflection::None, + int32_t index = -1, + uint16_t fixed_length = 0) { TypeBuilder builder_(_fbb); builder_.add_index(index); builder_.add_fixed_length(fixed_length); @@ -207,48 +223,49 @@ inline flatbuffers::Offset CreateType(flatbuffers::FlatBufferBuilder &_fbb return builder_.Finish(); } -struct KeyValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ +struct KeyValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef KeyValueBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_KEY = 4, VT_VALUE = 6 }; - const flatbuffers::String *key() const { return GetPointer(VT_KEY); } - bool KeyCompareLessThan(const KeyValue *o) const { return *key() < *o->key(); } - int KeyCompareWithValue(const char *val) const { return strcmp(key()->c_str(), val); } - const flatbuffers::String *value() const - { + const flatbuffers::String *key() const { + return GetPointer(VT_KEY); + } + bool KeyCompareLessThan(const KeyValue *o) const { + return *key() < *o->key(); + } + int KeyCompareWithValue(const char *val) const { + return strcmp(key()->c_str(), val); + } + const flatbuffers::String *value() const { return GetPointer(VT_VALUE); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffsetRequired(verifier, VT_KEY) && - verifier.VerifyString(key()) && VerifyOffset(verifier, VT_VALUE) && - verifier.VerifyString(value()) && verifier.EndTable(); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffsetRequired(verifier, VT_KEY) && + verifier.VerifyString(key()) && + VerifyOffset(verifier, VT_VALUE) && + verifier.VerifyString(value()) && + verifier.EndTable(); } }; -struct KeyValueBuilder -{ +struct KeyValueBuilder { typedef KeyValue Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_key(flatbuffers::Offset key) - { + void add_key(flatbuffers::Offset key) { fbb_.AddOffset(KeyValue::VT_KEY, key); } - void add_value(flatbuffers::Offset value) - { + void add_value(flatbuffers::Offset value) { fbb_.AddOffset(KeyValue::VT_VALUE, value); } - explicit KeyValueBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit KeyValueBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); fbb_.Required(o, KeyValue::VT_KEY); @@ -256,101 +273,98 @@ struct KeyValueBuilder } }; -inline flatbuffers::Offset -CreateKeyValue(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset key = 0, - flatbuffers::Offset value = 0) -{ +inline flatbuffers::Offset CreateKeyValue( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset key = 0, + flatbuffers::Offset value = 0) { KeyValueBuilder builder_(_fbb); builder_.add_value(value); builder_.add_key(key); return builder_.Finish(); } -inline flatbuffers::Offset CreateKeyValueDirect(flatbuffers::FlatBufferBuilder &_fbb, - const char *key = nullptr, - const char *value = nullptr) -{ +inline flatbuffers::Offset CreateKeyValueDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *key = nullptr, + const char *value = nullptr) { auto key__ = key ? _fbb.CreateString(key) : 0; auto value__ = value ? _fbb.CreateString(value) : 0; - return reflection::CreateKeyValue(_fbb, key__, value__); + return reflection::CreateKeyValue( + _fbb, + key__, + value__); } -struct EnumVal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ +struct EnumVal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef EnumValBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_NAME = 4, VT_VALUE = 6, VT_OBJECT = 8, VT_UNION_TYPE = 10, VT_DOCUMENTATION = 12 }; - const flatbuffers::String *name() const - { + const flatbuffers::String *name() const { return GetPointer(VT_NAME); } - int64_t value() const { return GetField(VT_VALUE, 0); } - bool KeyCompareLessThan(const EnumVal *o) const { return value() < o->value(); } - int KeyCompareWithValue(int64_t val) const - { + int64_t value() const { + return GetField(VT_VALUE, 0); + } + bool KeyCompareLessThan(const EnumVal *o) const { + return value() < o->value(); + } + int KeyCompareWithValue(int64_t val) const { return static_cast(value() > val) - static_cast(value() < val); } - const reflection::Object *object() const - { + const reflection::Object *object() const { return GetPointer(VT_OBJECT); } - const reflection::Type *union_type() const - { + const reflection::Type *union_type() const { return GetPointer(VT_UNION_TYPE); } - const flatbuffers::Vector> *documentation() const - { - return GetPointer> *>( - VT_DOCUMENTATION); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffsetRequired(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyField(verifier, VT_VALUE) && - VerifyOffset(verifier, VT_OBJECT) && verifier.VerifyTable(object()) && - VerifyOffset(verifier, VT_UNION_TYPE) && verifier.VerifyTable(union_type()) && - VerifyOffset(verifier, VT_DOCUMENTATION) && verifier.VerifyVector(documentation()) && - verifier.VerifyVectorOfStrings(documentation()) && verifier.EndTable(); + const flatbuffers::Vector> *documentation() const { + return GetPointer> *>(VT_DOCUMENTATION); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffsetRequired(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyField(verifier, VT_VALUE) && + VerifyOffset(verifier, VT_OBJECT) && + verifier.VerifyTable(object()) && + VerifyOffset(verifier, VT_UNION_TYPE) && + verifier.VerifyTable(union_type()) && + VerifyOffset(verifier, VT_DOCUMENTATION) && + verifier.VerifyVector(documentation()) && + verifier.VerifyVectorOfStrings(documentation()) && + verifier.EndTable(); } }; -struct EnumValBuilder -{ +struct EnumValBuilder { typedef EnumVal Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) - { + void add_name(flatbuffers::Offset name) { fbb_.AddOffset(EnumVal::VT_NAME, name); } - void add_value(int64_t value) { fbb_.AddElement(EnumVal::VT_VALUE, value, 0); } - void add_object(flatbuffers::Offset object) - { + void add_value(int64_t value) { + fbb_.AddElement(EnumVal::VT_VALUE, value, 0); + } + void add_object(flatbuffers::Offset object) { fbb_.AddOffset(EnumVal::VT_OBJECT, object); } - void add_union_type(flatbuffers::Offset union_type) - { + void add_union_type(flatbuffers::Offset union_type) { fbb_.AddOffset(EnumVal::VT_UNION_TYPE, union_type); } - void add_documentation( - flatbuffers::Offset>> - documentation) - { + void add_documentation(flatbuffers::Offset>> documentation) { fbb_.AddOffset(EnumVal::VT_DOCUMENTATION, documentation); } - explicit EnumValBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit EnumValBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); fbb_.Required(o, EnumVal::VT_NAME); @@ -359,12 +373,12 @@ struct EnumValBuilder }; inline flatbuffers::Offset CreateEnumVal( - flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset name = 0, - int64_t value = 0, flatbuffers::Offset object = 0, - flatbuffers::Offset union_type = 0, - flatbuffers::Offset>> documentation = - 0) -{ + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + int64_t value = 0, + flatbuffers::Offset object = 0, + flatbuffers::Offset union_type = 0, + flatbuffers::Offset>> documentation = 0) { EnumValBuilder builder_(_fbb); builder_.add_value(value); builder_.add_documentation(documentation); @@ -375,22 +389,26 @@ inline flatbuffers::Offset CreateEnumVal( } inline flatbuffers::Offset CreateEnumValDirect( - flatbuffers::FlatBufferBuilder &_fbb, const char *name = nullptr, int64_t value = 0, - flatbuffers::Offset object = 0, - flatbuffers::Offset union_type = 0, - const std::vector> *documentation = nullptr) -{ + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + int64_t value = 0, + flatbuffers::Offset object = 0, + flatbuffers::Offset union_type = 0, + const std::vector> *documentation = nullptr) { auto name__ = name ? _fbb.CreateString(name) : 0; - auto documentation__ = - documentation ? _fbb.CreateVector>(*documentation) : 0; - return reflection::CreateEnumVal(_fbb, name__, value, object, union_type, documentation__); + auto documentation__ = documentation ? _fbb.CreateVector>(*documentation) : 0; + return reflection::CreateEnumVal( + _fbb, + name__, + value, + object, + union_type, + documentation__); } -struct Enum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ +struct Enum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef EnumBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_NAME = 4, VT_VALUES = 6, VT_IS_UNION = 8, @@ -398,85 +416,77 @@ struct Enum FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table VT_ATTRIBUTES = 12, VT_DOCUMENTATION = 14 }; - const flatbuffers::String *name() const - { + const flatbuffers::String *name() const { return GetPointer(VT_NAME); } - bool KeyCompareLessThan(const Enum *o) const { return *name() < *o->name(); } - int KeyCompareWithValue(const char *val) const { return strcmp(name()->c_str(), val); } - const flatbuffers::Vector> *values() const - { - return GetPointer> *>( - VT_VALUES); + bool KeyCompareLessThan(const Enum *o) const { + return *name() < *o->name(); } - bool is_union() const { return GetField(VT_IS_UNION, 0) != 0; } - const reflection::Type *underlying_type() const - { + int KeyCompareWithValue(const char *val) const { + return strcmp(name()->c_str(), val); + } + const flatbuffers::Vector> *values() const { + return GetPointer> *>(VT_VALUES); + } + bool is_union() const { + return GetField(VT_IS_UNION, 0) != 0; + } + const reflection::Type *underlying_type() const { return GetPointer(VT_UNDERLYING_TYPE); } - const flatbuffers::Vector> *attributes() const - { - return GetPointer> *>( - VT_ATTRIBUTES); - } - const flatbuffers::Vector> *documentation() const - { - return GetPointer> *>( - VT_DOCUMENTATION); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffsetRequired(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyOffsetRequired(verifier, VT_VALUES) && - verifier.VerifyVector(values()) && verifier.VerifyVectorOfTables(values()) && + const flatbuffers::Vector> *attributes() const { + return GetPointer> *>(VT_ATTRIBUTES); + } + const flatbuffers::Vector> *documentation() const { + return GetPointer> *>(VT_DOCUMENTATION); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffsetRequired(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffsetRequired(verifier, VT_VALUES) && + verifier.VerifyVector(values()) && + verifier.VerifyVectorOfTables(values()) && VerifyField(verifier, VT_IS_UNION) && VerifyOffsetRequired(verifier, VT_UNDERLYING_TYPE) && - verifier.VerifyTable(underlying_type()) && VerifyOffset(verifier, VT_ATTRIBUTES) && - verifier.VerifyVector(attributes()) && verifier.VerifyVectorOfTables(attributes()) && - VerifyOffset(verifier, VT_DOCUMENTATION) && verifier.VerifyVector(documentation()) && - verifier.VerifyVectorOfStrings(documentation()) && verifier.EndTable(); + verifier.VerifyTable(underlying_type()) && + VerifyOffset(verifier, VT_ATTRIBUTES) && + verifier.VerifyVector(attributes()) && + verifier.VerifyVectorOfTables(attributes()) && + VerifyOffset(verifier, VT_DOCUMENTATION) && + verifier.VerifyVector(documentation()) && + verifier.VerifyVectorOfStrings(documentation()) && + verifier.EndTable(); } }; -struct EnumBuilder -{ +struct EnumBuilder { typedef Enum Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) - { + void add_name(flatbuffers::Offset name) { fbb_.AddOffset(Enum::VT_NAME, name); } - void add_values( - flatbuffers::Offset>> values) - { + void add_values(flatbuffers::Offset>> values) { fbb_.AddOffset(Enum::VT_VALUES, values); } - void add_is_union(bool is_union) - { + void add_is_union(bool is_union) { fbb_.AddElement(Enum::VT_IS_UNION, static_cast(is_union), 0); } - void add_underlying_type(flatbuffers::Offset underlying_type) - { + void add_underlying_type(flatbuffers::Offset underlying_type) { fbb_.AddOffset(Enum::VT_UNDERLYING_TYPE, underlying_type); } - void add_attributes( - flatbuffers::Offset>> attributes) - { + void add_attributes(flatbuffers::Offset>> attributes) { fbb_.AddOffset(Enum::VT_ATTRIBUTES, attributes); } - void add_documentation( - flatbuffers::Offset>> - documentation) - { + void add_documentation(flatbuffers::Offset>> documentation) { fbb_.AddOffset(Enum::VT_DOCUMENTATION, documentation); } - explicit EnumBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit EnumBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); fbb_.Required(o, Enum::VT_NAME); @@ -487,14 +497,13 @@ struct EnumBuilder }; inline flatbuffers::Offset CreateEnum( - flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset name = 0, - flatbuffers::Offset>> values = 0, - bool is_union = false, flatbuffers::Offset underlying_type = 0, - flatbuffers::Offset>> attributes = - 0, - flatbuffers::Offset>> documentation = - 0) -{ + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + flatbuffers::Offset>> values = 0, + bool is_union = false, + flatbuffers::Offset underlying_type = 0, + flatbuffers::Offset>> attributes = 0, + flatbuffers::Offset>> documentation = 0) { EnumBuilder builder_(_fbb); builder_.add_documentation(documentation); builder_.add_attributes(attributes); @@ -506,27 +515,30 @@ inline flatbuffers::Offset CreateEnum( } inline flatbuffers::Offset CreateEnumDirect( - flatbuffers::FlatBufferBuilder &_fbb, const char *name = nullptr, - std::vector> *values = nullptr, bool is_union = false, - flatbuffers::Offset underlying_type = 0, - std::vector> *attributes = nullptr, - const std::vector> *documentation = nullptr) -{ + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + std::vector> *values = nullptr, + bool is_union = false, + flatbuffers::Offset underlying_type = 0, + std::vector> *attributes = nullptr, + const std::vector> *documentation = nullptr) { auto name__ = name ? _fbb.CreateString(name) : 0; auto values__ = values ? _fbb.CreateVectorOfSortedTables(values) : 0; - auto attributes__ = - attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; - auto documentation__ = - documentation ? _fbb.CreateVector>(*documentation) : 0; - return reflection::CreateEnum(_fbb, name__, values__, is_union, underlying_type, attributes__, - documentation__); + auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; + auto documentation__ = documentation ? _fbb.CreateVector>(*documentation) : 0; + return reflection::CreateEnum( + _fbb, + name__, + values__, + is_union, + underlying_type, + attributes__, + documentation__); } -struct Field FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ +struct Field FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef FieldBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_NAME = 4, VT_TYPE = 6, VT_ID = 8, @@ -540,102 +552,117 @@ struct Field FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table VT_DOCUMENTATION = 24, VT_OPTIONAL = 26 }; - const flatbuffers::String *name() const - { + const flatbuffers::String *name() const { return GetPointer(VT_NAME); } - bool KeyCompareLessThan(const Field *o) const { return *name() < *o->name(); } - int KeyCompareWithValue(const char *val) const { return strcmp(name()->c_str(), val); } - const reflection::Type *type() const { return GetPointer(VT_TYPE); } - uint16_t id() const { return GetField(VT_ID, 0); } - uint16_t offset() const { return GetField(VT_OFFSET, 0); } - int64_t default_integer() const { return GetField(VT_DEFAULT_INTEGER, 0); } - double default_real() const { return GetField(VT_DEFAULT_REAL, 0.0); } - bool deprecated() const { return GetField(VT_DEPRECATED, 0) != 0; } - bool required() const { return GetField(VT_REQUIRED, 0) != 0; } - bool key() const { return GetField(VT_KEY, 0) != 0; } - const flatbuffers::Vector> *attributes() const - { - return GetPointer> *>( - VT_ATTRIBUTES); - } - const flatbuffers::Vector> *documentation() const - { - return GetPointer> *>( - VT_DOCUMENTATION); - } - bool optional() const { return GetField(VT_OPTIONAL, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffsetRequired(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyOffsetRequired(verifier, VT_TYPE) && - verifier.VerifyTable(type()) && VerifyField(verifier, VT_ID) && + bool KeyCompareLessThan(const Field *o) const { + return *name() < *o->name(); + } + int KeyCompareWithValue(const char *val) const { + return strcmp(name()->c_str(), val); + } + const reflection::Type *type() const { + return GetPointer(VT_TYPE); + } + uint16_t id() const { + return GetField(VT_ID, 0); + } + uint16_t offset() const { + return GetField(VT_OFFSET, 0); + } + int64_t default_integer() const { + return GetField(VT_DEFAULT_INTEGER, 0); + } + double default_real() const { + return GetField(VT_DEFAULT_REAL, 0.0); + } + bool deprecated() const { + return GetField(VT_DEPRECATED, 0) != 0; + } + bool required() const { + return GetField(VT_REQUIRED, 0) != 0; + } + bool key() const { + return GetField(VT_KEY, 0) != 0; + } + const flatbuffers::Vector> *attributes() const { + return GetPointer> *>(VT_ATTRIBUTES); + } + const flatbuffers::Vector> *documentation() const { + return GetPointer> *>(VT_DOCUMENTATION); + } + bool optional() const { + return GetField(VT_OPTIONAL, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffsetRequired(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffsetRequired(verifier, VT_TYPE) && + verifier.VerifyTable(type()) && + VerifyField(verifier, VT_ID) && VerifyField(verifier, VT_OFFSET) && VerifyField(verifier, VT_DEFAULT_INTEGER) && VerifyField(verifier, VT_DEFAULT_REAL) && VerifyField(verifier, VT_DEPRECATED) && - VerifyField(verifier, VT_REQUIRED) && VerifyField(verifier, VT_KEY) && - VerifyOffset(verifier, VT_ATTRIBUTES) && verifier.VerifyVector(attributes()) && + VerifyField(verifier, VT_REQUIRED) && + VerifyField(verifier, VT_KEY) && + VerifyOffset(verifier, VT_ATTRIBUTES) && + verifier.VerifyVector(attributes()) && verifier.VerifyVectorOfTables(attributes()) && - VerifyOffset(verifier, VT_DOCUMENTATION) && verifier.VerifyVector(documentation()) && + VerifyOffset(verifier, VT_DOCUMENTATION) && + verifier.VerifyVector(documentation()) && verifier.VerifyVectorOfStrings(documentation()) && - VerifyField(verifier, VT_OPTIONAL) && verifier.EndTable(); + VerifyField(verifier, VT_OPTIONAL) && + verifier.EndTable(); } }; -struct FieldBuilder -{ +struct FieldBuilder { typedef Field Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) - { + void add_name(flatbuffers::Offset name) { fbb_.AddOffset(Field::VT_NAME, name); } - void add_type(flatbuffers::Offset type) - { + void add_type(flatbuffers::Offset type) { fbb_.AddOffset(Field::VT_TYPE, type); } - void add_id(uint16_t id) { fbb_.AddElement(Field::VT_ID, id, 0); } - void add_offset(uint16_t offset) { fbb_.AddElement(Field::VT_OFFSET, offset, 0); } - void add_default_integer(int64_t default_integer) - { + void add_id(uint16_t id) { + fbb_.AddElement(Field::VT_ID, id, 0); + } + void add_offset(uint16_t offset) { + fbb_.AddElement(Field::VT_OFFSET, offset, 0); + } + void add_default_integer(int64_t default_integer) { fbb_.AddElement(Field::VT_DEFAULT_INTEGER, default_integer, 0); } - void add_default_real(double default_real) - { + void add_default_real(double default_real) { fbb_.AddElement(Field::VT_DEFAULT_REAL, default_real, 0.0); } - void add_deprecated(bool deprecated) - { + void add_deprecated(bool deprecated) { fbb_.AddElement(Field::VT_DEPRECATED, static_cast(deprecated), 0); } - void add_required(bool required) - { + void add_required(bool required) { fbb_.AddElement(Field::VT_REQUIRED, static_cast(required), 0); } - void add_key(bool key) { fbb_.AddElement(Field::VT_KEY, static_cast(key), 0); } - void add_attributes( - flatbuffers::Offset>> attributes) - { + void add_key(bool key) { + fbb_.AddElement(Field::VT_KEY, static_cast(key), 0); + } + void add_attributes(flatbuffers::Offset>> attributes) { fbb_.AddOffset(Field::VT_ATTRIBUTES, attributes); } - void add_documentation( - flatbuffers::Offset>> - documentation) - { + void add_documentation(flatbuffers::Offset>> documentation) { fbb_.AddOffset(Field::VT_DOCUMENTATION, documentation); } - void add_optional(bool optional) - { + void add_optional(bool optional) { fbb_.AddElement(Field::VT_OPTIONAL, static_cast(optional), 0); } - explicit FieldBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit FieldBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); fbb_.Required(o, Field::VT_NAME); @@ -645,16 +672,19 @@ struct FieldBuilder }; inline flatbuffers::Offset CreateField( - flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset name = 0, - flatbuffers::Offset type = 0, uint16_t id = 0, uint16_t offset = 0, - int64_t default_integer = 0, double default_real = 0.0, bool deprecated = false, - bool required = false, bool key = false, - flatbuffers::Offset>> attributes = - 0, - flatbuffers::Offset>> documentation = - 0, - bool optional = false) -{ + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + flatbuffers::Offset type = 0, + uint16_t id = 0, + uint16_t offset = 0, + int64_t default_integer = 0, + double default_real = 0.0, + bool deprecated = false, + bool required = false, + bool key = false, + flatbuffers::Offset>> attributes = 0, + flatbuffers::Offset>> documentation = 0, + bool optional = false) { FieldBuilder builder_(_fbb); builder_.add_default_real(default_real); builder_.add_default_integer(default_integer); @@ -672,29 +702,41 @@ inline flatbuffers::Offset CreateField( } inline flatbuffers::Offset CreateFieldDirect( - flatbuffers::FlatBufferBuilder &_fbb, const char *name = nullptr, - flatbuffers::Offset type = 0, uint16_t id = 0, uint16_t offset = 0, - int64_t default_integer = 0, double default_real = 0.0, bool deprecated = false, - bool required = false, bool key = false, - std::vector> *attributes = nullptr, - const std::vector> *documentation = nullptr, - bool optional = false) -{ + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + flatbuffers::Offset type = 0, + uint16_t id = 0, + uint16_t offset = 0, + int64_t default_integer = 0, + double default_real = 0.0, + bool deprecated = false, + bool required = false, + bool key = false, + std::vector> *attributes = nullptr, + const std::vector> *documentation = nullptr, + bool optional = false) { auto name__ = name ? _fbb.CreateString(name) : 0; - auto attributes__ = - attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; - auto documentation__ = - documentation ? _fbb.CreateVector>(*documentation) : 0; - return reflection::CreateField(_fbb, name__, type, id, offset, default_integer, default_real, - deprecated, required, key, attributes__, documentation__, - optional); + auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; + auto documentation__ = documentation ? _fbb.CreateVector>(*documentation) : 0; + return reflection::CreateField( + _fbb, + name__, + type, + id, + offset, + default_integer, + default_real, + deprecated, + required, + key, + attributes__, + documentation__, + optional); } -struct Object FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ +struct Object FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef ObjectBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_NAME = 4, VT_FIELDS = 6, VT_IS_STRUCT = 8, @@ -703,87 +745,83 @@ struct Object FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table VT_ATTRIBUTES = 14, VT_DOCUMENTATION = 16 }; - const flatbuffers::String *name() const - { + const flatbuffers::String *name() const { return GetPointer(VT_NAME); } - bool KeyCompareLessThan(const Object *o) const { return *name() < *o->name(); } - int KeyCompareWithValue(const char *val) const { return strcmp(name()->c_str(), val); } - const flatbuffers::Vector> *fields() const - { - return GetPointer> *>( - VT_FIELDS); - } - bool is_struct() const { return GetField(VT_IS_STRUCT, 0) != 0; } - int32_t minalign() const { return GetField(VT_MINALIGN, 0); } - int32_t bytesize() const { return GetField(VT_BYTESIZE, 0); } - const flatbuffers::Vector> *attributes() const - { - return GetPointer> *>( - VT_ATTRIBUTES); - } - const flatbuffers::Vector> *documentation() const - { - return GetPointer> *>( - VT_DOCUMENTATION); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffsetRequired(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyOffsetRequired(verifier, VT_FIELDS) && - verifier.VerifyVector(fields()) && verifier.VerifyVectorOfTables(fields()) && + bool KeyCompareLessThan(const Object *o) const { + return *name() < *o->name(); + } + int KeyCompareWithValue(const char *val) const { + return strcmp(name()->c_str(), val); + } + const flatbuffers::Vector> *fields() const { + return GetPointer> *>(VT_FIELDS); + } + bool is_struct() const { + return GetField(VT_IS_STRUCT, 0) != 0; + } + int32_t minalign() const { + return GetField(VT_MINALIGN, 0); + } + int32_t bytesize() const { + return GetField(VT_BYTESIZE, 0); + } + const flatbuffers::Vector> *attributes() const { + return GetPointer> *>(VT_ATTRIBUTES); + } + const flatbuffers::Vector> *documentation() const { + return GetPointer> *>(VT_DOCUMENTATION); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffsetRequired(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffsetRequired(verifier, VT_FIELDS) && + verifier.VerifyVector(fields()) && + verifier.VerifyVectorOfTables(fields()) && VerifyField(verifier, VT_IS_STRUCT) && VerifyField(verifier, VT_MINALIGN) && - VerifyField(verifier, VT_BYTESIZE) && VerifyOffset(verifier, VT_ATTRIBUTES) && - verifier.VerifyVector(attributes()) && verifier.VerifyVectorOfTables(attributes()) && - VerifyOffset(verifier, VT_DOCUMENTATION) && verifier.VerifyVector(documentation()) && - verifier.VerifyVectorOfStrings(documentation()) && verifier.EndTable(); + VerifyField(verifier, VT_BYTESIZE) && + VerifyOffset(verifier, VT_ATTRIBUTES) && + verifier.VerifyVector(attributes()) && + verifier.VerifyVectorOfTables(attributes()) && + VerifyOffset(verifier, VT_DOCUMENTATION) && + verifier.VerifyVector(documentation()) && + verifier.VerifyVectorOfStrings(documentation()) && + verifier.EndTable(); } }; -struct ObjectBuilder -{ +struct ObjectBuilder { typedef Object Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) - { + void add_name(flatbuffers::Offset name) { fbb_.AddOffset(Object::VT_NAME, name); } - void add_fields( - flatbuffers::Offset>> fields) - { + void add_fields(flatbuffers::Offset>> fields) { fbb_.AddOffset(Object::VT_FIELDS, fields); } - void add_is_struct(bool is_struct) - { + void add_is_struct(bool is_struct) { fbb_.AddElement(Object::VT_IS_STRUCT, static_cast(is_struct), 0); } - void add_minalign(int32_t minalign) - { + void add_minalign(int32_t minalign) { fbb_.AddElement(Object::VT_MINALIGN, minalign, 0); } - void add_bytesize(int32_t bytesize) - { + void add_bytesize(int32_t bytesize) { fbb_.AddElement(Object::VT_BYTESIZE, bytesize, 0); } - void add_attributes( - flatbuffers::Offset>> attributes) - { + void add_attributes(flatbuffers::Offset>> attributes) { fbb_.AddOffset(Object::VT_ATTRIBUTES, attributes); } - void add_documentation( - flatbuffers::Offset>> - documentation) - { + void add_documentation(flatbuffers::Offset>> documentation) { fbb_.AddOffset(Object::VT_DOCUMENTATION, documentation); } - explicit ObjectBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit ObjectBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); fbb_.Required(o, Object::VT_NAME); @@ -793,14 +831,14 @@ struct ObjectBuilder }; inline flatbuffers::Offset CreateObject( - flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset name = 0, - flatbuffers::Offset>> fields = 0, - bool is_struct = false, int32_t minalign = 0, int32_t bytesize = 0, - flatbuffers::Offset>> attributes = - 0, - flatbuffers::Offset>> documentation = - 0) -{ + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + flatbuffers::Offset>> fields = 0, + bool is_struct = false, + int32_t minalign = 0, + int32_t bytesize = 0, + flatbuffers::Offset>> attributes = 0, + flatbuffers::Offset>> documentation = 0) { ObjectBuilder builder_(_fbb); builder_.add_documentation(documentation); builder_.add_attributes(attributes); @@ -813,103 +851,101 @@ inline flatbuffers::Offset CreateObject( } inline flatbuffers::Offset CreateObjectDirect( - flatbuffers::FlatBufferBuilder &_fbb, const char *name = nullptr, - std::vector> *fields = nullptr, bool is_struct = false, - int32_t minalign = 0, int32_t bytesize = 0, - std::vector> *attributes = nullptr, - const std::vector> *documentation = nullptr) -{ + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + std::vector> *fields = nullptr, + bool is_struct = false, + int32_t minalign = 0, + int32_t bytesize = 0, + std::vector> *attributes = nullptr, + const std::vector> *documentation = nullptr) { auto name__ = name ? _fbb.CreateString(name) : 0; auto fields__ = fields ? _fbb.CreateVectorOfSortedTables(fields) : 0; - auto attributes__ = - attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; - auto documentation__ = - documentation ? _fbb.CreateVector>(*documentation) : 0; - return reflection::CreateObject(_fbb, name__, fields__, is_struct, minalign, bytesize, - attributes__, documentation__); + auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; + auto documentation__ = documentation ? _fbb.CreateVector>(*documentation) : 0; + return reflection::CreateObject( + _fbb, + name__, + fields__, + is_struct, + minalign, + bytesize, + attributes__, + documentation__); } -struct RPCCall FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ +struct RPCCall FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef RPCCallBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_NAME = 4, VT_REQUEST = 6, VT_RESPONSE = 8, VT_ATTRIBUTES = 10, VT_DOCUMENTATION = 12 }; - const flatbuffers::String *name() const - { + const flatbuffers::String *name() const { return GetPointer(VT_NAME); } - bool KeyCompareLessThan(const RPCCall *o) const { return *name() < *o->name(); } - int KeyCompareWithValue(const char *val) const { return strcmp(name()->c_str(), val); } - const reflection::Object *request() const - { + bool KeyCompareLessThan(const RPCCall *o) const { + return *name() < *o->name(); + } + int KeyCompareWithValue(const char *val) const { + return strcmp(name()->c_str(), val); + } + const reflection::Object *request() const { return GetPointer(VT_REQUEST); } - const reflection::Object *response() const - { + const reflection::Object *response() const { return GetPointer(VT_RESPONSE); } - const flatbuffers::Vector> *attributes() const - { - return GetPointer> *>( - VT_ATTRIBUTES); - } - const flatbuffers::Vector> *documentation() const - { - return GetPointer> *>( - VT_DOCUMENTATION); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffsetRequired(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyOffsetRequired(verifier, VT_REQUEST) && - verifier.VerifyTable(request()) && VerifyOffsetRequired(verifier, VT_RESPONSE) && - verifier.VerifyTable(response()) && VerifyOffset(verifier, VT_ATTRIBUTES) && - verifier.VerifyVector(attributes()) && verifier.VerifyVectorOfTables(attributes()) && - VerifyOffset(verifier, VT_DOCUMENTATION) && verifier.VerifyVector(documentation()) && - verifier.VerifyVectorOfStrings(documentation()) && verifier.EndTable(); + const flatbuffers::Vector> *attributes() const { + return GetPointer> *>(VT_ATTRIBUTES); + } + const flatbuffers::Vector> *documentation() const { + return GetPointer> *>(VT_DOCUMENTATION); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffsetRequired(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffsetRequired(verifier, VT_REQUEST) && + verifier.VerifyTable(request()) && + VerifyOffsetRequired(verifier, VT_RESPONSE) && + verifier.VerifyTable(response()) && + VerifyOffset(verifier, VT_ATTRIBUTES) && + verifier.VerifyVector(attributes()) && + verifier.VerifyVectorOfTables(attributes()) && + VerifyOffset(verifier, VT_DOCUMENTATION) && + verifier.VerifyVector(documentation()) && + verifier.VerifyVectorOfStrings(documentation()) && + verifier.EndTable(); } }; -struct RPCCallBuilder -{ +struct RPCCallBuilder { typedef RPCCall Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) - { + void add_name(flatbuffers::Offset name) { fbb_.AddOffset(RPCCall::VT_NAME, name); } - void add_request(flatbuffers::Offset request) - { + void add_request(flatbuffers::Offset request) { fbb_.AddOffset(RPCCall::VT_REQUEST, request); } - void add_response(flatbuffers::Offset response) - { + void add_response(flatbuffers::Offset response) { fbb_.AddOffset(RPCCall::VT_RESPONSE, response); } - void add_attributes( - flatbuffers::Offset>> attributes) - { + void add_attributes(flatbuffers::Offset>> attributes) { fbb_.AddOffset(RPCCall::VT_ATTRIBUTES, attributes); } - void add_documentation( - flatbuffers::Offset>> - documentation) - { + void add_documentation(flatbuffers::Offset>> documentation) { fbb_.AddOffset(RPCCall::VT_DOCUMENTATION, documentation); } - explicit RPCCallBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit RPCCallBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); fbb_.Required(o, RPCCall::VT_NAME); @@ -920,14 +956,12 @@ struct RPCCallBuilder }; inline flatbuffers::Offset CreateRPCCall( - flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset name = 0, - flatbuffers::Offset request = 0, - flatbuffers::Offset response = 0, - flatbuffers::Offset>> attributes = - 0, - flatbuffers::Offset>> documentation = - 0) -{ + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + flatbuffers::Offset request = 0, + flatbuffers::Offset response = 0, + flatbuffers::Offset>> attributes = 0, + flatbuffers::Offset>> documentation = 0) { RPCCallBuilder builder_(_fbb); builder_.add_documentation(documentation); builder_.add_attributes(attributes); @@ -938,94 +972,88 @@ inline flatbuffers::Offset CreateRPCCall( } inline flatbuffers::Offset CreateRPCCallDirect( - flatbuffers::FlatBufferBuilder &_fbb, const char *name = nullptr, - flatbuffers::Offset request = 0, - flatbuffers::Offset response = 0, - std::vector> *attributes = nullptr, - const std::vector> *documentation = nullptr) -{ + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + flatbuffers::Offset request = 0, + flatbuffers::Offset response = 0, + std::vector> *attributes = nullptr, + const std::vector> *documentation = nullptr) { auto name__ = name ? _fbb.CreateString(name) : 0; - auto attributes__ = - attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; - auto documentation__ = - documentation ? _fbb.CreateVector>(*documentation) : 0; - return reflection::CreateRPCCall(_fbb, name__, request, response, attributes__, documentation__); + auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; + auto documentation__ = documentation ? _fbb.CreateVector>(*documentation) : 0; + return reflection::CreateRPCCall( + _fbb, + name__, + request, + response, + attributes__, + documentation__); } -struct Service FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ +struct Service FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef ServiceBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_NAME = 4, VT_CALLS = 6, VT_ATTRIBUTES = 8, VT_DOCUMENTATION = 10 }; - const flatbuffers::String *name() const - { + const flatbuffers::String *name() const { return GetPointer(VT_NAME); } - bool KeyCompareLessThan(const Service *o) const { return *name() < *o->name(); } - int KeyCompareWithValue(const char *val) const { return strcmp(name()->c_str(), val); } - const flatbuffers::Vector> *calls() const - { - return GetPointer> *>( - VT_CALLS); - } - const flatbuffers::Vector> *attributes() const - { - return GetPointer> *>( - VT_ATTRIBUTES); - } - const flatbuffers::Vector> *documentation() const - { - return GetPointer> *>( - VT_DOCUMENTATION); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffsetRequired(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyOffset(verifier, VT_CALLS) && - verifier.VerifyVector(calls()) && verifier.VerifyVectorOfTables(calls()) && - VerifyOffset(verifier, VT_ATTRIBUTES) && verifier.VerifyVector(attributes()) && + bool KeyCompareLessThan(const Service *o) const { + return *name() < *o->name(); + } + int KeyCompareWithValue(const char *val) const { + return strcmp(name()->c_str(), val); + } + const flatbuffers::Vector> *calls() const { + return GetPointer> *>(VT_CALLS); + } + const flatbuffers::Vector> *attributes() const { + return GetPointer> *>(VT_ATTRIBUTES); + } + const flatbuffers::Vector> *documentation() const { + return GetPointer> *>(VT_DOCUMENTATION); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffsetRequired(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffset(verifier, VT_CALLS) && + verifier.VerifyVector(calls()) && + verifier.VerifyVectorOfTables(calls()) && + VerifyOffset(verifier, VT_ATTRIBUTES) && + verifier.VerifyVector(attributes()) && verifier.VerifyVectorOfTables(attributes()) && - VerifyOffset(verifier, VT_DOCUMENTATION) && verifier.VerifyVector(documentation()) && - verifier.VerifyVectorOfStrings(documentation()) && verifier.EndTable(); + VerifyOffset(verifier, VT_DOCUMENTATION) && + verifier.VerifyVector(documentation()) && + verifier.VerifyVectorOfStrings(documentation()) && + verifier.EndTable(); } }; -struct ServiceBuilder -{ +struct ServiceBuilder { typedef Service Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) - { + void add_name(flatbuffers::Offset name) { fbb_.AddOffset(Service::VT_NAME, name); } - void add_calls( - flatbuffers::Offset>> calls) - { + void add_calls(flatbuffers::Offset>> calls) { fbb_.AddOffset(Service::VT_CALLS, calls); } - void add_attributes( - flatbuffers::Offset>> attributes) - { + void add_attributes(flatbuffers::Offset>> attributes) { fbb_.AddOffset(Service::VT_ATTRIBUTES, attributes); } - void add_documentation( - flatbuffers::Offset>> - documentation) - { + void add_documentation(flatbuffers::Offset>> documentation) { fbb_.AddOffset(Service::VT_DOCUMENTATION, documentation); } - explicit ServiceBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit ServiceBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); fbb_.Required(o, Service::VT_NAME); @@ -1034,13 +1062,11 @@ struct ServiceBuilder }; inline flatbuffers::Offset CreateService( - flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset name = 0, - flatbuffers::Offset>> calls = 0, - flatbuffers::Offset>> attributes = - 0, - flatbuffers::Offset>> documentation = - 0) -{ + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + flatbuffers::Offset>> calls = 0, + flatbuffers::Offset>> attributes = 0, + flatbuffers::Offset>> documentation = 0) { ServiceBuilder builder_(_fbb); builder_.add_documentation(documentation); builder_.add_attributes(attributes); @@ -1050,25 +1076,26 @@ inline flatbuffers::Offset CreateService( } inline flatbuffers::Offset CreateServiceDirect( - flatbuffers::FlatBufferBuilder &_fbb, const char *name = nullptr, - std::vector> *calls = nullptr, - std::vector> *attributes = nullptr, - const std::vector> *documentation = nullptr) -{ + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + std::vector> *calls = nullptr, + std::vector> *attributes = nullptr, + const std::vector> *documentation = nullptr) { auto name__ = name ? _fbb.CreateString(name) : 0; auto calls__ = calls ? _fbb.CreateVectorOfSortedTables(calls) : 0; - auto attributes__ = - attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; - auto documentation__ = - documentation ? _fbb.CreateVector>(*documentation) : 0; - return reflection::CreateService(_fbb, name__, calls__, attributes__, documentation__); + auto attributes__ = attributes ? _fbb.CreateVectorOfSortedTables(attributes) : 0; + auto documentation__ = documentation ? _fbb.CreateVector>(*documentation) : 0; + return reflection::CreateService( + _fbb, + name__, + calls__, + attributes__, + documentation__); } -struct Schema FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ +struct Schema FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef SchemaBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_OBJECTS = 4, VT_ENUMS = 6, VT_FILE_IDENT = 8, @@ -1077,93 +1104,79 @@ struct Schema FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table VT_SERVICES = 14, VT_ADVANCED_FEATURES = 16 }; - const flatbuffers::Vector> *objects() const - { - return GetPointer> *>( - VT_OBJECTS); + const flatbuffers::Vector> *objects() const { + return GetPointer> *>(VT_OBJECTS); } - const flatbuffers::Vector> *enums() const - { + const flatbuffers::Vector> *enums() const { return GetPointer> *>(VT_ENUMS); } - const flatbuffers::String *file_ident() const - { + const flatbuffers::String *file_ident() const { return GetPointer(VT_FILE_IDENT); } - const flatbuffers::String *file_ext() const - { + const flatbuffers::String *file_ext() const { return GetPointer(VT_FILE_EXT); } - const reflection::Object *root_table() const - { + const reflection::Object *root_table() const { return GetPointer(VT_ROOT_TABLE); } - const flatbuffers::Vector> *services() const - { - return GetPointer> *>( - VT_SERVICES); + const flatbuffers::Vector> *services() const { + return GetPointer> *>(VT_SERVICES); } - reflection::AdvancedFeatures advanced_features() const - { + reflection::AdvancedFeatures advanced_features() const { return static_cast(GetField(VT_ADVANCED_FEATURES, 0)); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffsetRequired(verifier, VT_OBJECTS) && - verifier.VerifyVector(objects()) && verifier.VerifyVectorOfTables(objects()) && - VerifyOffsetRequired(verifier, VT_ENUMS) && verifier.VerifyVector(enums()) && - verifier.VerifyVectorOfTables(enums()) && VerifyOffset(verifier, VT_FILE_IDENT) && - verifier.VerifyString(file_ident()) && VerifyOffset(verifier, VT_FILE_EXT) && - verifier.VerifyString(file_ext()) && VerifyOffset(verifier, VT_ROOT_TABLE) && - verifier.VerifyTable(root_table()) && VerifyOffset(verifier, VT_SERVICES) && - verifier.VerifyVector(services()) && verifier.VerifyVectorOfTables(services()) && - VerifyField(verifier, VT_ADVANCED_FEATURES) && verifier.EndTable(); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffsetRequired(verifier, VT_OBJECTS) && + verifier.VerifyVector(objects()) && + verifier.VerifyVectorOfTables(objects()) && + VerifyOffsetRequired(verifier, VT_ENUMS) && + verifier.VerifyVector(enums()) && + verifier.VerifyVectorOfTables(enums()) && + VerifyOffset(verifier, VT_FILE_IDENT) && + verifier.VerifyString(file_ident()) && + VerifyOffset(verifier, VT_FILE_EXT) && + verifier.VerifyString(file_ext()) && + VerifyOffset(verifier, VT_ROOT_TABLE) && + verifier.VerifyTable(root_table()) && + VerifyOffset(verifier, VT_SERVICES) && + verifier.VerifyVector(services()) && + verifier.VerifyVectorOfTables(services()) && + VerifyField(verifier, VT_ADVANCED_FEATURES) && + verifier.EndTable(); } }; -struct SchemaBuilder -{ +struct SchemaBuilder { typedef Schema Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_objects( - flatbuffers::Offset>> objects) - { + void add_objects(flatbuffers::Offset>> objects) { fbb_.AddOffset(Schema::VT_OBJECTS, objects); } - void - add_enums(flatbuffers::Offset>> enums) - { + void add_enums(flatbuffers::Offset>> enums) { fbb_.AddOffset(Schema::VT_ENUMS, enums); } - void add_file_ident(flatbuffers::Offset file_ident) - { + void add_file_ident(flatbuffers::Offset file_ident) { fbb_.AddOffset(Schema::VT_FILE_IDENT, file_ident); } - void add_file_ext(flatbuffers::Offset file_ext) - { + void add_file_ext(flatbuffers::Offset file_ext) { fbb_.AddOffset(Schema::VT_FILE_EXT, file_ext); } - void add_root_table(flatbuffers::Offset root_table) - { + void add_root_table(flatbuffers::Offset root_table) { fbb_.AddOffset(Schema::VT_ROOT_TABLE, root_table); } - void add_services( - flatbuffers::Offset>> services) - { + void add_services(flatbuffers::Offset>> services) { fbb_.AddOffset(Schema::VT_SERVICES, services); } - void add_advanced_features(reflection::AdvancedFeatures advanced_features) - { - fbb_.AddElement(Schema::VT_ADVANCED_FEATURES, - static_cast(advanced_features), 0); + void add_advanced_features(reflection::AdvancedFeatures advanced_features) { + fbb_.AddElement(Schema::VT_ADVANCED_FEATURES, static_cast(advanced_features), 0); } - explicit SchemaBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit SchemaBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); fbb_.Required(o, Schema::VT_OBJECTS); @@ -1173,15 +1186,14 @@ struct SchemaBuilder }; inline flatbuffers::Offset CreateSchema( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> objects = 0, - flatbuffers::Offset>> enums = 0, - flatbuffers::Offset file_ident = 0, - flatbuffers::Offset file_ext = 0, - flatbuffers::Offset root_table = 0, - flatbuffers::Offset>> services = 0, - reflection::AdvancedFeatures advanced_features = static_cast(0)) -{ + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> objects = 0, + flatbuffers::Offset>> enums = 0, + flatbuffers::Offset file_ident = 0, + flatbuffers::Offset file_ext = 0, + flatbuffers::Offset root_table = 0, + flatbuffers::Offset>> services = 0, + reflection::AdvancedFeatures advanced_features = static_cast(0)) { SchemaBuilder builder_(_fbb); builder_.add_advanced_features(advanced_features); builder_.add_services(services); @@ -1194,64 +1206,73 @@ inline flatbuffers::Offset CreateSchema( } inline flatbuffers::Offset CreateSchemaDirect( - flatbuffers::FlatBufferBuilder &_fbb, - std::vector> *objects = nullptr, - std::vector> *enums = nullptr, - const char *file_ident = nullptr, const char *file_ext = nullptr, - flatbuffers::Offset root_table = 0, - std::vector> *services = nullptr, - reflection::AdvancedFeatures advanced_features = static_cast(0)) -{ + flatbuffers::FlatBufferBuilder &_fbb, + std::vector> *objects = nullptr, + std::vector> *enums = nullptr, + const char *file_ident = nullptr, + const char *file_ext = nullptr, + flatbuffers::Offset root_table = 0, + std::vector> *services = nullptr, + reflection::AdvancedFeatures advanced_features = static_cast(0)) { auto objects__ = objects ? _fbb.CreateVectorOfSortedTables(objects) : 0; auto enums__ = enums ? _fbb.CreateVectorOfSortedTables(enums) : 0; auto file_ident__ = file_ident ? _fbb.CreateString(file_ident) : 0; auto file_ext__ = file_ext ? _fbb.CreateString(file_ext) : 0; auto services__ = services ? _fbb.CreateVectorOfSortedTables(services) : 0; - return reflection::CreateSchema(_fbb, objects__, enums__, file_ident__, file_ext__, root_table, - services__, advanced_features); + return reflection::CreateSchema( + _fbb, + objects__, + enums__, + file_ident__, + file_ext__, + root_table, + services__, + advanced_features); } -inline const reflection::Schema *GetSchema(const void *buf) -{ +inline const reflection::Schema *GetSchema(const void *buf) { return flatbuffers::GetRoot(buf); } -inline const reflection::Schema *GetSizePrefixedSchema(const void *buf) -{ +inline const reflection::Schema *GetSizePrefixedSchema(const void *buf) { return flatbuffers::GetSizePrefixedRoot(buf); } -inline const char *SchemaIdentifier() { return "BFBS"; } +inline const char *SchemaIdentifier() { + return "BFBS"; +} -inline bool SchemaBufferHasIdentifier(const void *buf) -{ - return flatbuffers::BufferHasIdentifier(buf, SchemaIdentifier()); +inline bool SchemaBufferHasIdentifier(const void *buf) { + return flatbuffers::BufferHasIdentifier( + buf, SchemaIdentifier()); } -inline bool VerifySchemaBuffer(flatbuffers::Verifier &verifier) -{ +inline bool VerifySchemaBuffer( + flatbuffers::Verifier &verifier) { return verifier.VerifyBuffer(SchemaIdentifier()); } -inline bool VerifySizePrefixedSchemaBuffer(flatbuffers::Verifier &verifier) -{ +inline bool VerifySizePrefixedSchemaBuffer( + flatbuffers::Verifier &verifier) { return verifier.VerifySizePrefixedBuffer(SchemaIdentifier()); } -inline const char *SchemaExtension() { return "bfbs"; } +inline const char *SchemaExtension() { + return "bfbs"; +} -inline void FinishSchemaBuffer(flatbuffers::FlatBufferBuilder &fbb, - flatbuffers::Offset root) -{ +inline void FinishSchemaBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { fbb.Finish(root, SchemaIdentifier()); } -inline void FinishSizePrefixedSchemaBuffer(flatbuffers::FlatBufferBuilder &fbb, - flatbuffers::Offset root) -{ +inline void FinishSizePrefixedSchemaBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { fbb.FinishSizePrefixed(root, SchemaIdentifier()); } -} // namespace reflection +} // namespace reflection -#endif // FLATBUFFERS_GENERATED_REFLECTION_REFLECTION_H_ +#endif // FLATBUFFERS_GENERATED_REFLECTION_REFLECTION_H_ diff --git a/onert-micro/externals/flatbuffers/registry.h b/onert-micro/externals/flatbuffers/registry.h index c06bd568788..9ea425b3978 100644 --- a/onert-micro/externals/flatbuffers/registry.h +++ b/onert-micro/externals/flatbuffers/registry.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2017 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,20 +19,17 @@ #include "flatbuffers/idl.h" -namespace flatbuffers -{ +namespace flatbuffers { // Convenience class to easily parse or generate text for arbitrary FlatBuffers. // Simply pre-populate it with all schema filenames that may be in use, and // This class will look them up using the file_identifier declared in the // schema. -class Registry -{ -public: +class Registry { + public: // Call this for all schemas that may be in use. The identifier has // a function in the generated code, e.g. MonsterIdentifier(). - void Register(const char *file_identifier, const char *schema_path) - { + void Register(const char *file_identifier, const char *schema_path) { Schema schema; schema.path_ = schema_path; schemas_[file_identifier] = schema; @@ -41,24 +37,21 @@ class Registry // Generate text from an arbitrary FlatBuffer by looking up its // file_identifier in the registry. - bool FlatBufferToText(const uint8_t *flatbuf, size_t len, std::string *dest) - { + bool FlatBufferToText(const uint8_t *flatbuf, size_t len, std::string *dest) { // Get the identifier out of the buffer. // If the buffer is truncated, exit. - if (len < sizeof(uoffset_t) + FlatBufferBuilder::kFileIdentifierLength) - { + if (len < sizeof(uoffset_t) + FlatBufferBuilder::kFileIdentifierLength) { lasterror_ = "buffer truncated"; return false; } - std::string ident(reinterpret_cast(flatbuf) + sizeof(uoffset_t), - FlatBufferBuilder::kFileIdentifierLength); + std::string ident( + reinterpret_cast(flatbuf) + sizeof(uoffset_t), + FlatBufferBuilder::kFileIdentifierLength); // Load and parse the schema. Parser parser; - if (!LoadSchema(ident, &parser)) - return false; + if (!LoadSchema(ident, &parser)) return false; // Now we're ready to generate text. - if (!GenerateText(parser, flatbuf, dest)) - { + if (!GenerateText(parser, flatbuf, dest)) { lasterror_ = "unable to generate text for FlatBuffer binary"; return false; } @@ -68,15 +61,13 @@ class Registry // Converts a binary buffer to text using one of the schemas in the registry, // use the file_identifier to indicate which. // If DetachedBuffer::data() is null then parsing failed. - DetachedBuffer TextToFlatBuffer(const char *text, const char *file_identifier) - { + DetachedBuffer TextToFlatBuffer(const char *text, + const char *file_identifier) { // Load and parse the schema. Parser parser; - if (!LoadSchema(file_identifier, &parser)) - return DetachedBuffer(); + if (!LoadSchema(file_identifier, &parser)) return DetachedBuffer(); // Parse the text. - if (!parser.Parse(text)) - { + if (!parser.Parse(text)) { lasterror_ = parser.error_; return DetachedBuffer(); } @@ -94,13 +85,11 @@ class Registry // Returns a human readable error if any of the above functions fail. const std::string &GetLastError() { return lasterror_; } -private: - bool LoadSchema(const std::string &ident, Parser *parser) - { + private: + bool LoadSchema(const std::string &ident, Parser *parser) { // Find the schema, if not, exit. auto it = schemas_.find(ident); - if (it == schemas_.end()) - { + if (it == schemas_.end()) { // Don't attach the identifier, since it may not be human readable. lasterror_ = "identifier for this buffer not in the registry"; return false; @@ -108,23 +97,21 @@ class Registry auto &schema = it->second; // Load the schema from disk. If not, exit. std::string schematext; - if (!LoadFile(schema.path_.c_str(), false, &schematext)) - { + if (!LoadFile(schema.path_.c_str(), false, &schematext)) { lasterror_ = "could not load schema: " + schema.path_; return false; } // Parse schema. parser->opts = opts_; - if (!parser->Parse(schematext.c_str(), vector_data(include_paths_), schema.path_.c_str())) - { + if (!parser->Parse(schematext.c_str(), vector_data(include_paths_), + schema.path_.c_str())) { lasterror_ = parser->error_; return false; } return true; } - struct Schema - { + struct Schema { std::string path_; // TODO(wvo) optionally cache schema file or parsed schema here. }; @@ -135,6 +122,6 @@ class Registry std::map schemas_; }; -} // namespace flatbuffers +} // namespace flatbuffers -#endif // FLATBUFFERS_REGISTRY_H_ +#endif // FLATBUFFERS_REGISTRY_H_ diff --git a/onert-micro/externals/flatbuffers/stl_emulation.h b/onert-micro/externals/flatbuffers/stl_emulation.h index 3f11fb9cb0d..70e5dc944e3 100644 --- a/onert-micro/externals/flatbuffers/stl_emulation.h +++ b/onert-micro/externals/flatbuffers/stl_emulation.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2017 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/onert-micro/externals/flatbuffers/util.h b/onert-micro/externals/flatbuffers/util.h index e255801af26..f30bd98c9a0 100644 --- a/onert-micro/externals/flatbuffers/util.h +++ b/onert-micro/externals/flatbuffers/util.h @@ -1,5 +1,4 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,24 +23,22 @@ #include "flatbuffers/stl_emulation.h" #ifndef FLATBUFFERS_PREFER_PRINTF -#include -#else // FLATBUFFERS_PREFER_PRINTF -#include -#include -#endif // FLATBUFFERS_PREFER_PRINTF +# include +#else // FLATBUFFERS_PREFER_PRINTF +# include +# include +#endif // FLATBUFFERS_PREFER_PRINTF #include #include -namespace flatbuffers -{ +namespace flatbuffers { // @locale-independent functions for ASCII characters set. // Fast checking that character lies in closed range: [a <= x <= b] // using one compare (conditional branch) operator. -inline bool check_ascii_range(char x, char a, char b) -{ +inline bool check_ascii_range(char x, char a, char b) { FLATBUFFERS_ASSERT(a <= b); // (Hacker's Delight): `a <= x <= b` <=> `(x-a) <={u} (b-a)`. // The x, a, b will be promoted to int and subtracted without overflow. @@ -49,8 +46,7 @@ inline bool check_ascii_range(char x, char a, char b) } // Case-insensitive isalpha -inline bool is_alpha(char c) -{ +inline bool is_alpha(char c) { // ASCII only: alpha to upper case => reset bit 0x20 (~0x20 = 0xDF). return check_ascii_range(c & 0xDF, 'a' & 0xDF, 'z' & 0xDF); } @@ -59,8 +55,7 @@ inline bool is_alpha(char c) inline bool is_alpha_upper(char c) { return check_ascii_range(c, 'A', 'Z'); } // Check (case-insensitive) that `c` is equal to alpha. -inline bool is_alpha_char(char c, char alpha) -{ +inline bool is_alpha_char(char c, char alpha) { FLATBUFFERS_ASSERT(is_alpha(alpha)); // ASCII only: alpha to upper case => reset bit 0x20 (~0x20 = 0xDF). return ((c & 0xDF) == (alpha & 0xDF)); @@ -73,8 +68,7 @@ inline bool is_alpha_char(char c, char alpha) // additional single-byte characters as digits. inline bool is_digit(char c) { return check_ascii_range(c, '0', '9'); } -inline bool is_xdigit(char c) -{ +inline bool is_xdigit(char c) { // Replace by look-up table. return is_digit(c) || check_ascii_range(c & 0xDF, 'a' & 0xDF, 'f' & 0xDF); } @@ -82,62 +76,53 @@ inline bool is_xdigit(char c) // Case-insensitive isalnum inline bool is_alnum(char c) { return is_alpha(c) || is_digit(c); } -inline char CharToUpper(char c) -{ +inline char CharToUpper(char c) { return static_cast(::toupper(static_cast(c))); } -inline char CharToLower(char c) -{ +inline char CharToLower(char c) { return static_cast(::tolower(static_cast(c))); } // @end-locale-independent functions for ASCII character set #ifdef FLATBUFFERS_PREFER_PRINTF -template size_t IntToDigitCount(T t) -{ +template size_t IntToDigitCount(T t) { size_t digit_count = 0; // Count the sign for negative numbers - if (t < 0) - digit_count++; + if (t < 0) digit_count++; // Count a single 0 left of the dot for fractional numbers - if (-1 < t && t < 1) - digit_count++; + if (-1 < t && t < 1) digit_count++; // Count digits until fractional part T eps = std::numeric_limits::epsilon(); - while (t <= (-1 + eps) || (1 - eps) <= t) - { + while (t <= (-1 + eps) || (1 - eps) <= t) { t /= 10; digit_count++; } return digit_count; } -template size_t NumToStringWidth(T t, int precision = 0) -{ +template size_t NumToStringWidth(T t, int precision = 0) { size_t string_width = IntToDigitCount(t); // Count the dot for floating point numbers - if (precision) - string_width += (precision + 1); + if (precision) string_width += (precision + 1); return string_width; } -template std::string NumToStringImplWrapper(T t, const char *fmt, int precision = 0) -{ +template +std::string NumToStringImplWrapper(T t, const char *fmt, int precision = 0) { size_t string_width = NumToStringWidth(t, precision); std::string s(string_width, 0x00); // Allow snprintf to use std::string trailing null to detect buffer overflow snprintf(const_cast(s.data()), (s.size() + 1), fmt, string_width, t); return s; } -#endif // FLATBUFFERS_PREFER_PRINTF +#endif // FLATBUFFERS_PREFER_PRINTF // Convert an integer or floating point value to a string. // In contrast to std::stringstream, "char" values are // converted to a string of digits, and we don't use scientific notation. -template std::string NumToString(T t) -{ +template std::string NumToString(T t) { // clang-format off #ifndef FLATBUFFERS_PREFER_PRINTF @@ -151,37 +136,32 @@ template std::string NumToString(T t) // clang-format on } // Avoid char types used as character data. -template <> inline std::string NumToString(signed char t) -{ +template<> inline std::string NumToString(signed char t) { return NumToString(static_cast(t)); } -template <> inline std::string NumToString(unsigned char t) -{ +template<> inline std::string NumToString(unsigned char t) { return NumToString(static_cast(t)); } -template <> inline std::string NumToString(char t) -{ +template<> inline std::string NumToString(char t) { return NumToString(static_cast(t)); } #if defined(FLATBUFFERS_CPP98_STL) -template <> inline std::string NumToString(long long t) -{ - char buf[21]; // (log((1 << 63) - 1) / log(10)) + 2 +template<> inline std::string NumToString(long long t) { + char buf[21]; // (log((1 << 63) - 1) / log(10)) + 2 snprintf(buf, sizeof(buf), "%lld", t); return std::string(buf); } -template <> inline std::string NumToString(unsigned long long t) -{ - char buf[22]; // (log((1 << 63) - 1) / log(10)) + 1 +template<> +inline std::string NumToString(unsigned long long t) { + char buf[22]; // (log((1 << 63) - 1) / log(10)) + 1 snprintf(buf, sizeof(buf), "%llu", t); return std::string(buf); } -#endif // defined(FLATBUFFERS_CPP98_STL) +#endif // defined(FLATBUFFERS_CPP98_STL) // Special versions for floats/doubles. -template std::string FloatToString(T t, int precision) -{ +template std::string FloatToString(T t, int precision) { // clang-format off #ifndef FLATBUFFERS_PREFER_PRINTF @@ -201,22 +181,24 @@ template std::string FloatToString(T t, int precision) // clang-format on // Sadly, std::fixed turns "1" into "1.00000", so here we undo that. auto p = s.find_last_not_of('0'); - if (p != std::string::npos) - { + if (p != std::string::npos) { // Strip trailing zeroes. If it is a whole number, keep one zero. s.resize(p + (s[p] == '.' ? 2 : 1)); } return s; } -template <> inline std::string NumToString(double t) { return FloatToString(t, 12); } -template <> inline std::string NumToString(float t) { return FloatToString(t, 6); } +template<> inline std::string NumToString(double t) { + return FloatToString(t, 12); +} +template<> inline std::string NumToString(float t) { + return FloatToString(t, 6); +} // Convert an integer value to a hexadecimal string. // The returned string length is always xdigits long, prefixed by 0 digits. // For example, IntToStringHex(0x23, 8) returns the string "00000023". -inline std::string IntToStringHex(int i, int xdigits) -{ +inline std::string IntToStringHex(int i, int xdigits) { FLATBUFFERS_ASSERT(i >= 0); // clang-format off @@ -308,49 +290,41 @@ inline void strtoval_impl(float *val, const char *str, char **endptr) { // - If full string conversion can't be performed, 0 is returned. // - If the converted value falls out of range of corresponding return type, a // range error occurs. In this case value MAX(T)/MIN(T) is returned. -template -inline bool StringToIntegerImpl(T *val, const char *const str, const int base = 0, - const bool check_errno = true) -{ +template +inline bool StringToIntegerImpl(T *val, const char *const str, + const int base = 0, + const bool check_errno = true) { // T is int64_t or uint64_T FLATBUFFERS_ASSERT(str); - if (base <= 0) - { + if (base <= 0) { auto s = str; - while (*s && !is_digit(*s)) - s++; + while (*s && !is_digit(*s)) s++; if (s[0] == '0' && is_alpha_char(s[1], 'X')) return StringToIntegerImpl(val, str, 16, check_errno); // if a prefix not match, try base=10 return StringToIntegerImpl(val, str, 10, check_errno); - } - else - { - if (check_errno) - errno = 0; // clear thread-local errno + } else { + if (check_errno) errno = 0; // clear thread-local errno auto endptr = str; strtoval_impl(val, str, const_cast(&endptr), base); - if ((*endptr != '\0') || (endptr == str)) - { - *val = 0; // erase partial result - return false; // invalid string + if ((*endptr != '\0') || (endptr == str)) { + *val = 0; // erase partial result + return false; // invalid string } // errno is out-of-range, return MAX/MIN - if (check_errno && errno) - return false; + if (check_errno && errno) return false; return true; } } -template inline bool StringToFloatImpl(T *val, const char *const str) -{ +template +inline bool StringToFloatImpl(T *val, const char *const str) { // Type T must be either float or double. FLATBUFFERS_ASSERT(str && val); auto end = str; strtoval_impl(val, str, const_cast(&end)); auto done = (end != str) && (*end == '\0'); - if (!done) - *val = 0; // erase partial result + if (!done) *val = 0; // erase partial result return done; } @@ -360,25 +334,21 @@ template inline bool StringToFloatImpl(T *val, const char *const st // - If full string conversion can't be performed, 0 is returned. // - If the converted value falls out of range of corresponding return type, a // range error occurs. In this case value MAX(T)/MIN(T) is returned. -template inline bool StringToNumber(const char *s, T *val) -{ +template inline bool StringToNumber(const char *s, T *val) { // Assert on `unsigned long` and `signed long` on LP64. // If it is necessary, it could be solved with flatbuffers::enable_if. static_assert(sizeof(T) < sizeof(int64_t), "unexpected type T"); FLATBUFFERS_ASSERT(s && val); int64_t i64; // The errno check isn't needed, will return MAX/MIN on overflow. - if (StringToIntegerImpl(&i64, s, 0, false)) - { + if (StringToIntegerImpl(&i64, s, 0, false)) { const int64_t max = (flatbuffers::numeric_limits::max)(); const int64_t min = flatbuffers::numeric_limits::lowest(); - if (i64 > max) - { + if (i64 > max) { *val = static_cast(max); return false; } - if (i64 < min) - { + if (i64 < min) { // For unsigned types return max to distinguish from // "no conversion can be performed" when 0 is returned. *val = static_cast(flatbuffers::is_unsigned::value ? max : min); @@ -391,28 +361,23 @@ template inline bool StringToNumber(const char *s, T *val) return false; } -template <> inline bool StringToNumber(const char *str, int64_t *val) -{ +template<> inline bool StringToNumber(const char *str, int64_t *val) { return StringToIntegerImpl(val, str); } -template <> inline bool StringToNumber(const char *str, uint64_t *val) -{ - if (!StringToIntegerImpl(val, str)) - return false; +template<> +inline bool StringToNumber(const char *str, uint64_t *val) { + if (!StringToIntegerImpl(val, str)) return false; // The strtoull accepts negative numbers: // If the minus sign was part of the input sequence, the numeric value // calculated from the sequence of digits is negated as if by unary minus // in the result type, which applies unsigned integer wraparound rules. // Fix this behaviour (except -0). - if (*val) - { + if (*val) { auto s = str; - while (*s && !is_digit(*s)) - s++; - s = (s > str) ? (s - 1) : s; // step back to one symbol - if (*s == '-') - { + while (*s && !is_digit(*s)) s++; + s = (s > str) ? (s - 1) : s; // step back to one symbol + if (*s == '-') { // For unsigned types return the max to distinguish from // "no conversion can be performed". *val = (flatbuffers::numeric_limits::max)(); @@ -422,34 +387,32 @@ template <> inline bool StringToNumber(const char *str, uint64_t *val) return true; } -template <> inline bool StringToNumber(const char *s, float *val) -{ +template<> inline bool StringToNumber(const char *s, float *val) { return StringToFloatImpl(val, s); } -template <> inline bool StringToNumber(const char *s, double *val) -{ +template<> inline bool StringToNumber(const char *s, double *val) { return StringToFloatImpl(val, s); } -inline int64_t StringToInt(const char *s, int base = 10) -{ +inline int64_t StringToInt(const char *s, int base = 10) { int64_t val; return StringToIntegerImpl(&val, s, base) ? val : 0; } -inline uint64_t StringToUInt(const char *s, int base = 10) -{ +inline uint64_t StringToUInt(const char *s, int base = 10) { uint64_t val; return StringToIntegerImpl(&val, s, base) ? val : 0; } -typedef bool (*LoadFileFunction)(const char *filename, bool binary, std::string *dest); +typedef bool (*LoadFileFunction)(const char *filename, bool binary, + std::string *dest); typedef bool (*FileExistsFunction)(const char *filename); LoadFileFunction SetLoadFileFunction(LoadFileFunction load_file_function); -FileExistsFunction SetFileExistsFunction(FileExistsFunction file_exists_function); +FileExistsFunction SetFileExistsFunction( + FileExistsFunction file_exists_function); // Check if file "name" exists. bool FileExists(const char *name); @@ -474,8 +437,7 @@ bool SaveFile(const char *name, const char *buf, size_t len, bool binary); // successful, false otherwise. If "binary" is false // data is written using ifstream's text mode, otherwise // data is written with no transcoding. -inline bool SaveFile(const char *name, const std::string &buf, bool binary) -{ +inline bool SaveFile(const char *name, const std::string &buf, bool binary) { return SaveFile(name, buf.c_str(), buf.size(), binary); } @@ -501,7 +463,8 @@ std::string StripFileName(const std::string &filepath); // Concatenates a path with a filename, regardless of whether the path // ends in a separator or not. -std::string ConCatPathFileName(const std::string &path, const std::string &filename); +std::string ConCatPathFileName(const std::string &path, + const std::string &filename); // Replaces any '\\' separators with '/' std::string PosixPath(const char *path); @@ -518,29 +481,26 @@ std::string AbsolutePath(const std::string &filepath); // Convert a unicode code point into a UTF-8 representation by appending it // to a string. Returns the number of bytes generated. -inline int ToUTF8(uint32_t ucc, std::string *out) -{ - FLATBUFFERS_ASSERT(!(ucc & 0x80000000)); // Top bit can't be set. +inline int ToUTF8(uint32_t ucc, std::string *out) { + FLATBUFFERS_ASSERT(!(ucc & 0x80000000)); // Top bit can't be set. // 6 possible encodings: http://en.wikipedia.org/wiki/UTF-8 - for (int i = 0; i < 6; i++) - { + for (int i = 0; i < 6; i++) { // Max bits this encoding can represent. uint32_t max_bits = 6 + i * 5 + static_cast(!i); - if (ucc < (1u << max_bits)) - { // does it fit? + if (ucc < (1u << max_bits)) { // does it fit? // Remaining bits not encoded in the first byte, store 6 bits each uint32_t remain_bits = i * 6; // Store first byte: - (*out) += static_cast((0xFE << (max_bits - remain_bits)) | (ucc >> remain_bits)); + (*out) += static_cast((0xFE << (max_bits - remain_bits)) | + (ucc >> remain_bits)); // Store remaining bytes: - for (int j = i - 1; j >= 0; j--) - { + for (int j = i - 1; j >= 0; j--) { (*out) += static_cast(((ucc >> (j * 6)) & 0x3F) | 0x80); } - return i + 1; // Return the number of bytes added. + return i + 1; // Return the number of bytes added. } } - FLATBUFFERS_ASSERT(0); // Impossible to arrive here. + FLATBUFFERS_ASSERT(0); // Impossible to arrive here. return -1; } @@ -549,68 +509,44 @@ inline int ToUTF8(uint32_t ucc, std::string *out) // advanced past all bytes parsed. // returns -1 upon corrupt UTF-8 encoding (ignore the incoming pointer in // this case). -inline int FromUTF8(const char **in) -{ +inline int FromUTF8(const char **in) { int len = 0; // Count leading 1 bits. - for (int mask = 0x80; mask >= 0x04; mask >>= 1) - { - if (**in & mask) - { + for (int mask = 0x80; mask >= 0x04; mask >>= 1) { + if (**in & mask) { len++; - } - else - { + } else { break; } } if ((static_cast(**in) << len) & 0x80) - return -1; // Bit after leading 1's must be 0. - if (!len) - return *(*in)++; + return -1; // Bit after leading 1's must be 0. + if (!len) return *(*in)++; // UTF-8 encoded values with a length are between 2 and 4 bytes. - if (len < 2 || len > 4) - { - return -1; - } + if (len < 2 || len > 4) { return -1; } // Grab initial bits of the code. int ucc = *(*in)++ & ((1 << (7 - len)) - 1); - for (int i = 0; i < len - 1; i++) - { - if ((**in & 0xC0) != 0x80) - return -1; // Upper bits must 1 0. + for (int i = 0; i < len - 1; i++) { + if ((**in & 0xC0) != 0x80) return -1; // Upper bits must 1 0. ucc <<= 6; - ucc |= *(*in)++ & 0x3F; // Grab 6 more bits of the code. + ucc |= *(*in)++ & 0x3F; // Grab 6 more bits of the code. } // UTF-8 cannot encode values between 0xD800 and 0xDFFF (reserved for // UTF-16 surrogate pairs). - if (ucc >= 0xD800 && ucc <= 0xDFFF) - { - return -1; - } + if (ucc >= 0xD800 && ucc <= 0xDFFF) { return -1; } // UTF-8 must represent code points in their shortest possible encoding. - switch (len) - { + switch (len) { case 2: // Two bytes of UTF-8 can represent code points from U+0080 to U+07FF. - if (ucc < 0x0080 || ucc > 0x07FF) - { - return -1; - } + if (ucc < 0x0080 || ucc > 0x07FF) { return -1; } break; case 3: // Three bytes of UTF-8 can represent code points from U+0800 to U+FFFF. - if (ucc < 0x0800 || ucc > 0xFFFF) - { - return -1; - } + if (ucc < 0x0800 || ucc > 0xFFFF) { return -1; } break; case 4: // Four bytes of UTF-8 can represent code points from U+10000 to U+10FFFF. - if (ucc < 0x10000 || ucc > 0x10FFFF) - { - return -1; - } + if (ucc < 0x10000 || ucc > 0x10FFFF) { return -1; } break; } return ucc; @@ -623,22 +559,18 @@ inline int FromUTF8(const char **in) // line, respectively. inline std::string WordWrap(const std::string in, size_t max_length, const std::string wrapped_line_prefix, - const std::string wrapped_line_suffix) -{ + const std::string wrapped_line_suffix) { std::istringstream in_stream(in); std::string wrapped, line, word; in_stream >> word; line = word; - while (in_stream >> word) - { - if ((line.length() + 1 + word.length() + wrapped_line_suffix.length()) < max_length) - { + while (in_stream >> word) { + if ((line.length() + 1 + word.length() + wrapped_line_suffix.length()) < + max_length) { line += " " + word; - } - else - { + } else { wrapped += line + wrapped_line_suffix + "\n"; line = wrapped_line_prefix + word; } @@ -647,58 +579,34 @@ inline std::string WordWrap(const std::string in, size_t max_length, return wrapped; } -#endif // !FLATBUFFERS_PREFER_PRINTF +#endif // !FLATBUFFERS_PREFER_PRINTF -inline bool EscapeString(const char *s, size_t length, std::string *_text, bool allow_non_utf8, - bool natural_utf8) -{ +inline bool EscapeString(const char *s, size_t length, std::string *_text, + bool allow_non_utf8, bool natural_utf8) { std::string &text = *_text; text += "\""; - for (uoffset_t i = 0; i < length; i++) - { + for (uoffset_t i = 0; i < length; i++) { char c = s[i]; - switch (c) - { - case '\n': - text += "\\n"; - break; - case '\t': - text += "\\t"; - break; - case '\r': - text += "\\r"; - break; - case '\b': - text += "\\b"; - break; - case '\f': - text += "\\f"; - break; - case '\"': - text += "\\\""; - break; - case '\\': - text += "\\\\"; - break; + switch (c) { + case '\n': text += "\\n"; break; + case '\t': text += "\\t"; break; + case '\r': text += "\\r"; break; + case '\b': text += "\\b"; break; + case '\f': text += "\\f"; break; + case '\"': text += "\\\""; break; + case '\\': text += "\\\\"; break; default: - if (c >= ' ' && c <= '~') - { + if (c >= ' ' && c <= '~') { text += c; - } - else - { + } else { // Not printable ASCII data. Let's see if it's valid UTF-8 first: const char *utf8 = s + i; int ucc = FromUTF8(&utf8); - if (ucc < 0) - { - if (allow_non_utf8) - { + if (ucc < 0) { + if (allow_non_utf8) { text += "\\x"; text += IntToStringHex(static_cast(c), 2); - } - else - { + } else { // There are two cases here: // // 1) We reached here by parsing an IDL file. In that case, @@ -713,22 +621,15 @@ inline bool EscapeString(const char *s, size_t length, std::string *_text, bool // they have no JSON. return false; } - } - else - { - if (natural_utf8) - { + } else { + if (natural_utf8) { // utf8 points to past all utf-8 bytes parsed text.append(s + i, static_cast(utf8 - s - i)); - } - else if (ucc <= 0xFFFF) - { + } else if (ucc <= 0xFFFF) { // Parses as Unicode within JSON's \uXXXX range, so use that. text += "\\u"; text += IntToStringHex(ucc, 4); - } - else if (ucc <= 0x10FFFF) - { + } else if (ucc <= 0x10FFFF) { // Encode Unicode SMP values to a surrogate pair using two \u // escapes. uint32_t base = ucc - 0x10000; @@ -750,26 +651,22 @@ inline bool EscapeString(const char *s, size_t length, std::string *_text, bool return true; } -inline std::string BufferToHexText(const void *buffer, size_t buffer_size, size_t max_length, +inline std::string BufferToHexText(const void *buffer, size_t buffer_size, + size_t max_length, const std::string &wrapped_line_prefix, - const std::string &wrapped_line_suffix) -{ + const std::string &wrapped_line_suffix) { std::string text = wrapped_line_prefix; size_t start_offset = 0; const char *s = reinterpret_cast(buffer); - for (size_t i = 0; s && i < buffer_size; i++) - { + for (size_t i = 0; s && i < buffer_size; i++) { // Last iteration or do we have more? bool have_more = i + 1 < buffer_size; text += "0x"; text += IntToStringHex(static_cast(s[i]), 2); - if (have_more) - { - text += ','; - } + if (have_more) { text += ','; } // If we have more to process and we reached max_length - if (have_more && text.size() + wrapped_line_suffix.size() >= start_offset + max_length) - { + if (have_more && + text.size() + wrapped_line_suffix.size() >= start_offset + max_length) { text += wrapped_line_suffix; text += '\n'; start_offset = text.size(); @@ -786,14 +683,16 @@ std::string RemoveStringQuotes(const std::string &s); // Change th global C-locale to locale with name . // Returns an actual locale name in <_value>, useful if locale_name is "" or // null. -bool SetGlobalTestLocale(const char *locale_name, std::string *_value = nullptr); +bool SetGlobalTestLocale(const char *locale_name, + std::string *_value = nullptr); // Read (or test) a value of environment variable. -bool ReadEnvironmentVariable(const char *var_name, std::string *_value = nullptr); +bool ReadEnvironmentVariable(const char *var_name, + std::string *_value = nullptr); // MSVC specific: Send all assert reports to STDOUT to prevent CI hangs. void SetupDefaultCRTReportMode(); -} // namespace flatbuffers +} // namespace flatbuffers -#endif // FLATBUFFERS_UTIL_H_ +#endif // FLATBUFFERS_UTIL_H_ diff --git a/onert-micro/externals/gen/circle-generated/circle/schema_generated.h b/onert-micro/externals/gen/circle-generated/circle/schema_generated.h index d71257de7f7..0545b276df6 100644 --- a/onert-micro/externals/gen/circle-generated/circle/schema_generated.h +++ b/onert-micro/externals/gen/circle-generated/circle/schema_generated.h @@ -1,12 +1,12 @@ // automatically generated by the FlatBuffers compiler, do not modify + #ifndef FLATBUFFERS_GENERATED_SCHEMA_CIRCLE_H_ #define FLATBUFFERS_GENERATED_SCHEMA_CIRCLE_H_ #include "flatbuffers/flatbuffers.h" -namespace circle -{ +namespace circle { struct CustomQuantization; struct CustomQuantizationBuilder; @@ -44,6 +44,78 @@ struct Tensor; struct TensorBuilder; struct TensorT; +struct StablehloGatherOptions; +struct StablehloGatherOptionsBuilder; +struct StablehloGatherOptionsT; + +struct StablehloTransposeOptions; +struct StablehloTransposeOptionsBuilder; +struct StablehloTransposeOptionsT; + +struct StablehloDotGeneralOptions; +struct StablehloDotGeneralOptionsBuilder; +struct StablehloDotGeneralOptionsT; + +struct StablehloReduceWindowOptions; +struct StablehloReduceWindowOptionsBuilder; +struct StablehloReduceWindowOptionsT; + +struct StablehloWhileOptions; +struct StablehloWhileOptionsBuilder; +struct StablehloWhileOptionsT; + +struct StablehloSortOptions; +struct StablehloSortOptionsBuilder; +struct StablehloSortOptionsT; + +struct StablehloConcatenateOptions; +struct StablehloConcatenateOptionsBuilder; +struct StablehloConcatenateOptionsT; + +struct StablehloBroadcastInDimOptions; +struct StablehloBroadcastInDimOptionsBuilder; +struct StablehloBroadcastInDimOptionsT; + +struct StablehloCompareOptions; +struct StablehloCompareOptionsBuilder; +struct StablehloCompareOptionsT; + +struct StablehloDynamicSliceOptions; +struct StablehloDynamicSliceOptionsBuilder; +struct StablehloDynamicSliceOptionsT; + +struct StablehloPadOptions; +struct StablehloPadOptionsBuilder; +struct StablehloPadOptionsT; + +struct StablehloIotaOptions; +struct StablehloIotaOptionsBuilder; +struct StablehloIotaOptionsT; + +struct StablehloCustomCallOptions; +struct StablehloCustomCallOptionsBuilder; +struct StablehloCustomCallOptionsT; + +struct StablehloReduceOptions; +struct StablehloReduceOptionsBuilder; +struct StablehloReduceOptionsT; + +struct StablehloSliceOptions; +struct StablehloSliceOptionsBuilder; +struct StablehloSliceOptionsT; + +struct StablehloConvolutionOptions; +struct StablehloConvolutionOptionsBuilder; +struct StablehloConvolutionOptionsT; + +struct StablehloScatterOptions; +struct StablehloScatterOptionsBuilder; +struct StablehloScatterOptionsT; + +struct StablehloRngBitGeneratorOptions; +struct StablehloRngBitGeneratorOptionsBuilder; +struct StablehloRngBitGeneratorOptionsT; + struct Conv2DOptions; struct Conv2DOptionsBuilder; struct Conv2DOptionsT; @@ -548,6 +620,18 @@ struct RightShiftOptions; struct RightShiftOptionsBuilder; struct RightShiftOptionsT; +struct DilateOptions; +struct DilateOptionsBuilder; +struct DilateOptionsT; + +struct ReduceWindowOptions; +struct ReduceWindowOptionsBuilder; +struct ReduceWindowOptionsT; + +struct GRUOptions; +struct GRUOptionsBuilder; +struct GRUOptionsT; + struct BCQGatherOptions; struct BCQGatherOptionsBuilder; struct BCQGatherOptionsT; @@ -592,8 +676,8 @@ struct Model; struct ModelBuilder; struct ModelT; -enum TensorType : int8_t -{ +enum TensorType : int8_t { + TensorType_UINT4 = -1, TensorType_FLOAT32 = 0, TensorType_FLOAT16 = 1, TensorType_INT32 = 2, @@ -612,176 +696,181 @@ enum TensorType : int8_t TensorType_UINT32 = 15, TensorType_UINT16 = 16, TensorType_INT4 = 17, - TensorType_MIN = TensorType_FLOAT32, + TensorType_MIN = TensorType_UINT4, TensorType_MAX = TensorType_INT4 }; -inline const TensorType (&EnumValuesTensorType())[18] -{ +inline const TensorType (&EnumValuesTensorType())[19] { static const TensorType values[] = { - TensorType_FLOAT32, TensorType_FLOAT16, TensorType_INT32, TensorType_UINT8, - TensorType_INT64, TensorType_STRING, TensorType_BOOL, TensorType_INT16, - TensorType_COMPLEX64, TensorType_INT8, TensorType_FLOAT64, TensorType_COMPLEX128, - TensorType_UINT64, TensorType_RESOURCE, TensorType_VARIANT, TensorType_UINT32, - TensorType_UINT16, TensorType_INT4}; + TensorType_UINT4, + TensorType_FLOAT32, + TensorType_FLOAT16, + TensorType_INT32, + TensorType_UINT8, + TensorType_INT64, + TensorType_STRING, + TensorType_BOOL, + TensorType_INT16, + TensorType_COMPLEX64, + TensorType_INT8, + TensorType_FLOAT64, + TensorType_COMPLEX128, + TensorType_UINT64, + TensorType_RESOURCE, + TensorType_VARIANT, + TensorType_UINT32, + TensorType_UINT16, + TensorType_INT4 + }; return values; } -inline const char *const *EnumNamesTensorType() -{ - static const char *const names[19] = {"FLOAT32", "FLOAT16", "INT32", "UINT8", "INT64", - "STRING", "BOOL", "INT16", "COMPLEX64", "INT8", - "FLOAT64", "COMPLEX128", "UINT64", "RESOURCE", "VARIANT", - "UINT32", "UINT16", "INT4", nullptr}; +inline const char * const *EnumNamesTensorType() { + static const char * const names[20] = { + "UINT4", + "FLOAT32", + "FLOAT16", + "INT32", + "UINT8", + "INT64", + "STRING", + "BOOL", + "INT16", + "COMPLEX64", + "INT8", + "FLOAT64", + "COMPLEX128", + "UINT64", + "RESOURCE", + "VARIANT", + "UINT32", + "UINT16", + "INT4", + nullptr + }; return names; } -inline const char *EnumNameTensorType(TensorType e) -{ - if (flatbuffers::IsOutRange(e, TensorType_FLOAT32, TensorType_INT4)) - return ""; - const size_t index = static_cast(e); +inline const char *EnumNameTensorType(TensorType e) { + if (flatbuffers::IsOutRange(e, TensorType_UINT4, TensorType_INT4)) return ""; + const size_t index = static_cast(e) - static_cast(TensorType_UINT4); return EnumNamesTensorType()[index]; } -enum QuantizationDetails : uint8_t -{ +enum QuantizationDetails : uint8_t { QuantizationDetails_NONE = 0, QuantizationDetails_CustomQuantization = 1, QuantizationDetails_MIN = QuantizationDetails_NONE, QuantizationDetails_MAX = QuantizationDetails_CustomQuantization }; -inline const QuantizationDetails (&EnumValuesQuantizationDetails())[2] -{ - static const QuantizationDetails values[] = {QuantizationDetails_NONE, - QuantizationDetails_CustomQuantization}; +inline const QuantizationDetails (&EnumValuesQuantizationDetails())[2] { + static const QuantizationDetails values[] = { + QuantizationDetails_NONE, + QuantizationDetails_CustomQuantization + }; return values; } -inline const char *const *EnumNamesQuantizationDetails() -{ - static const char *const names[3] = {"NONE", "CustomQuantization", nullptr}; +inline const char * const *EnumNamesQuantizationDetails() { + static const char * const names[3] = { + "NONE", + "CustomQuantization", + nullptr + }; return names; } -inline const char *EnumNameQuantizationDetails(QuantizationDetails e) -{ - if (flatbuffers::IsOutRange(e, QuantizationDetails_NONE, QuantizationDetails_CustomQuantization)) - return ""; +inline const char *EnumNameQuantizationDetails(QuantizationDetails e) { + if (flatbuffers::IsOutRange(e, QuantizationDetails_NONE, QuantizationDetails_CustomQuantization)) return ""; const size_t index = static_cast(e); return EnumNamesQuantizationDetails()[index]; } -template struct QuantizationDetailsTraits -{ +template struct QuantizationDetailsTraits { static const QuantizationDetails enum_value = QuantizationDetails_NONE; }; -template <> struct QuantizationDetailsTraits -{ +template<> struct QuantizationDetailsTraits { static const QuantizationDetails enum_value = QuantizationDetails_CustomQuantization; }; -struct QuantizationDetailsUnion -{ +struct QuantizationDetailsUnion { QuantizationDetails type; void *value; QuantizationDetailsUnion() : type(QuantizationDetails_NONE), value(nullptr) {} - QuantizationDetailsUnion(QuantizationDetailsUnion &&u) FLATBUFFERS_NOEXCEPT - : type(QuantizationDetails_NONE), - value(nullptr) - { - std::swap(type, u.type); - std::swap(value, u.value); - } + QuantizationDetailsUnion(QuantizationDetailsUnion&& u) FLATBUFFERS_NOEXCEPT : + type(QuantizationDetails_NONE), value(nullptr) + { std::swap(type, u.type); std::swap(value, u.value); } QuantizationDetailsUnion(const QuantizationDetailsUnion &); QuantizationDetailsUnion &operator=(const QuantizationDetailsUnion &u) - { - QuantizationDetailsUnion t(u); - std::swap(type, t.type); - std::swap(value, t.value); - return *this; - } + { QuantizationDetailsUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } QuantizationDetailsUnion &operator=(QuantizationDetailsUnion &&u) FLATBUFFERS_NOEXCEPT - { - std::swap(type, u.type); - std::swap(value, u.value); - return *this; - } + { std::swap(type, u.type); std::swap(value, u.value); return *this; } ~QuantizationDetailsUnion() { Reset(); } void Reset(); #ifndef FLATBUFFERS_CPP98_STL - template void Set(T &&val) - { + template + void Set(T&& val) { using RT = typename std::remove_reference::type; Reset(); type = QuantizationDetailsTraits::enum_value; - if (type != QuantizationDetails_NONE) - { + if (type != QuantizationDetails_NONE) { value = new RT(std::forward(val)); } } -#endif // FLATBUFFERS_CPP98_STL +#endif // FLATBUFFERS_CPP98_STL - static void *UnPack(const void *obj, QuantizationDetails type, - const flatbuffers::resolver_function_t *resolver); - flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, - const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; + static void *UnPack(const void *obj, QuantizationDetails type, const flatbuffers::resolver_function_t *resolver); + flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; - circle::CustomQuantizationT *AsCustomQuantization() - { - return type == QuantizationDetails_CustomQuantization - ? reinterpret_cast(value) - : nullptr; + circle::CustomQuantizationT *AsCustomQuantization() { + return type == QuantizationDetails_CustomQuantization ? + reinterpret_cast(value) : nullptr; } - const circle::CustomQuantizationT *AsCustomQuantization() const - { - return type == QuantizationDetails_CustomQuantization - ? reinterpret_cast(value) - : nullptr; + const circle::CustomQuantizationT *AsCustomQuantization() const { + return type == QuantizationDetails_CustomQuantization ? + reinterpret_cast(value) : nullptr; } }; -bool VerifyQuantizationDetails(flatbuffers::Verifier &verifier, const void *obj, - QuantizationDetails type); -bool VerifyQuantizationDetailsVector(flatbuffers::Verifier &verifier, - const flatbuffers::Vector> *values, - const flatbuffers::Vector *types); +bool VerifyQuantizationDetails(flatbuffers::Verifier &verifier, const void *obj, QuantizationDetails type); +bool VerifyQuantizationDetailsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); -enum DimensionType : int8_t -{ +enum DimensionType : int8_t { DimensionType_DENSE = 0, DimensionType_SPARSE_CSR = 1, DimensionType_MIN = DimensionType_DENSE, DimensionType_MAX = DimensionType_SPARSE_CSR }; -inline const DimensionType (&EnumValuesDimensionType())[2] -{ - static const DimensionType values[] = {DimensionType_DENSE, DimensionType_SPARSE_CSR}; +inline const DimensionType (&EnumValuesDimensionType())[2] { + static const DimensionType values[] = { + DimensionType_DENSE, + DimensionType_SPARSE_CSR + }; return values; } -inline const char *const *EnumNamesDimensionType() -{ - static const char *const names[3] = {"DENSE", "SPARSE_CSR", nullptr}; +inline const char * const *EnumNamesDimensionType() { + static const char * const names[3] = { + "DENSE", + "SPARSE_CSR", + nullptr + }; return names; } -inline const char *EnumNameDimensionType(DimensionType e) -{ - if (flatbuffers::IsOutRange(e, DimensionType_DENSE, DimensionType_SPARSE_CSR)) - return ""; +inline const char *EnumNameDimensionType(DimensionType e) { + if (flatbuffers::IsOutRange(e, DimensionType_DENSE, DimensionType_SPARSE_CSR)) return ""; const size_t index = static_cast(e); return EnumNamesDimensionType()[index]; } -enum SparseIndexVector : uint8_t -{ +enum SparseIndexVector : uint8_t { SparseIndexVector_NONE = 0, SparseIndexVector_Int32Vector = 1, SparseIndexVector_Uint16Vector = 2, @@ -790,141 +879,112 @@ enum SparseIndexVector : uint8_t SparseIndexVector_MAX = SparseIndexVector_Uint8Vector }; -inline const SparseIndexVector (&EnumValuesSparseIndexVector())[4] -{ - static const SparseIndexVector values[] = {SparseIndexVector_NONE, SparseIndexVector_Int32Vector, - SparseIndexVector_Uint16Vector, - SparseIndexVector_Uint8Vector}; +inline const SparseIndexVector (&EnumValuesSparseIndexVector())[4] { + static const SparseIndexVector values[] = { + SparseIndexVector_NONE, + SparseIndexVector_Int32Vector, + SparseIndexVector_Uint16Vector, + SparseIndexVector_Uint8Vector + }; return values; } -inline const char *const *EnumNamesSparseIndexVector() -{ - static const char *const names[5] = {"NONE", "Int32Vector", "Uint16Vector", "Uint8Vector", - nullptr}; +inline const char * const *EnumNamesSparseIndexVector() { + static const char * const names[5] = { + "NONE", + "Int32Vector", + "Uint16Vector", + "Uint8Vector", + nullptr + }; return names; } -inline const char *EnumNameSparseIndexVector(SparseIndexVector e) -{ - if (flatbuffers::IsOutRange(e, SparseIndexVector_NONE, SparseIndexVector_Uint8Vector)) - return ""; +inline const char *EnumNameSparseIndexVector(SparseIndexVector e) { + if (flatbuffers::IsOutRange(e, SparseIndexVector_NONE, SparseIndexVector_Uint8Vector)) return ""; const size_t index = static_cast(e); return EnumNamesSparseIndexVector()[index]; } -template struct SparseIndexVectorTraits -{ +template struct SparseIndexVectorTraits { static const SparseIndexVector enum_value = SparseIndexVector_NONE; }; -template <> struct SparseIndexVectorTraits -{ +template<> struct SparseIndexVectorTraits { static const SparseIndexVector enum_value = SparseIndexVector_Int32Vector; }; -template <> struct SparseIndexVectorTraits -{ +template<> struct SparseIndexVectorTraits { static const SparseIndexVector enum_value = SparseIndexVector_Uint16Vector; }; -template <> struct SparseIndexVectorTraits -{ +template<> struct SparseIndexVectorTraits { static const SparseIndexVector enum_value = SparseIndexVector_Uint8Vector; }; -struct SparseIndexVectorUnion -{ +struct SparseIndexVectorUnion { SparseIndexVector type; void *value; SparseIndexVectorUnion() : type(SparseIndexVector_NONE), value(nullptr) {} - SparseIndexVectorUnion(SparseIndexVectorUnion &&u) FLATBUFFERS_NOEXCEPT - : type(SparseIndexVector_NONE), - value(nullptr) - { - std::swap(type, u.type); - std::swap(value, u.value); - } + SparseIndexVectorUnion(SparseIndexVectorUnion&& u) FLATBUFFERS_NOEXCEPT : + type(SparseIndexVector_NONE), value(nullptr) + { std::swap(type, u.type); std::swap(value, u.value); } SparseIndexVectorUnion(const SparseIndexVectorUnion &); SparseIndexVectorUnion &operator=(const SparseIndexVectorUnion &u) - { - SparseIndexVectorUnion t(u); - std::swap(type, t.type); - std::swap(value, t.value); - return *this; - } + { SparseIndexVectorUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } SparseIndexVectorUnion &operator=(SparseIndexVectorUnion &&u) FLATBUFFERS_NOEXCEPT - { - std::swap(type, u.type); - std::swap(value, u.value); - return *this; - } + { std::swap(type, u.type); std::swap(value, u.value); return *this; } ~SparseIndexVectorUnion() { Reset(); } void Reset(); #ifndef FLATBUFFERS_CPP98_STL - template void Set(T &&val) - { + template + void Set(T&& val) { using RT = typename std::remove_reference::type; Reset(); type = SparseIndexVectorTraits::enum_value; - if (type != SparseIndexVector_NONE) - { + if (type != SparseIndexVector_NONE) { value = new RT(std::forward(val)); } } -#endif // FLATBUFFERS_CPP98_STL +#endif // FLATBUFFERS_CPP98_STL - static void *UnPack(const void *obj, SparseIndexVector type, - const flatbuffers::resolver_function_t *resolver); - flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, - const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; + static void *UnPack(const void *obj, SparseIndexVector type, const flatbuffers::resolver_function_t *resolver); + flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; - circle::Int32VectorT *AsInt32Vector() - { - return type == SparseIndexVector_Int32Vector ? reinterpret_cast(value) - : nullptr; + circle::Int32VectorT *AsInt32Vector() { + return type == SparseIndexVector_Int32Vector ? + reinterpret_cast(value) : nullptr; } - const circle::Int32VectorT *AsInt32Vector() const - { - return type == SparseIndexVector_Int32Vector - ? reinterpret_cast(value) - : nullptr; + const circle::Int32VectorT *AsInt32Vector() const { + return type == SparseIndexVector_Int32Vector ? + reinterpret_cast(value) : nullptr; } - circle::Uint16VectorT *AsUint16Vector() - { - return type == SparseIndexVector_Uint16Vector ? reinterpret_cast(value) - : nullptr; + circle::Uint16VectorT *AsUint16Vector() { + return type == SparseIndexVector_Uint16Vector ? + reinterpret_cast(value) : nullptr; } - const circle::Uint16VectorT *AsUint16Vector() const - { - return type == SparseIndexVector_Uint16Vector - ? reinterpret_cast(value) - : nullptr; + const circle::Uint16VectorT *AsUint16Vector() const { + return type == SparseIndexVector_Uint16Vector ? + reinterpret_cast(value) : nullptr; } - circle::Uint8VectorT *AsUint8Vector() - { - return type == SparseIndexVector_Uint8Vector ? reinterpret_cast(value) - : nullptr; + circle::Uint8VectorT *AsUint8Vector() { + return type == SparseIndexVector_Uint8Vector ? + reinterpret_cast(value) : nullptr; } - const circle::Uint8VectorT *AsUint8Vector() const - { - return type == SparseIndexVector_Uint8Vector - ? reinterpret_cast(value) - : nullptr; + const circle::Uint8VectorT *AsUint8Vector() const { + return type == SparseIndexVector_Uint8Vector ? + reinterpret_cast(value) : nullptr; } }; -bool VerifySparseIndexVector(flatbuffers::Verifier &verifier, const void *obj, - SparseIndexVector type); -bool VerifySparseIndexVectorVector(flatbuffers::Verifier &verifier, - const flatbuffers::Vector> *values, - const flatbuffers::Vector *types); +bool VerifySparseIndexVector(flatbuffers::Verifier &verifier, const void *obj, SparseIndexVector type); +bool VerifySparseIndexVectorVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); -enum BuiltinOperator : int32_t -{ +enum BuiltinOperator : int32_t { + BuiltinOperator_GRU = -5, BuiltinOperator_BCQ_GATHER = -4, BuiltinOperator_BCQ_FULLY_CONNECTED = -3, BuiltinOperator_INSTANCE_NORM = -2, @@ -1090,362 +1150,495 @@ enum BuiltinOperator : int32_t BuiltinOperator_BITCAST = 159, BuiltinOperator_BITWISE_XOR = 160, BuiltinOperator_RIGHT_SHIFT = 161, - BuiltinOperator_MIN = BuiltinOperator_BCQ_GATHER, - BuiltinOperator_MAX = BuiltinOperator_RIGHT_SHIFT -}; - -inline const BuiltinOperator (&EnumValuesBuiltinOperator())[165] -{ - static const BuiltinOperator values[] = {BuiltinOperator_BCQ_GATHER, - BuiltinOperator_BCQ_FULLY_CONNECTED, - BuiltinOperator_INSTANCE_NORM, - BuiltinOperator_ADD, - BuiltinOperator_AVERAGE_POOL_2D, - BuiltinOperator_CONCATENATION, - BuiltinOperator_CONV_2D, - BuiltinOperator_DEPTHWISE_CONV_2D, - BuiltinOperator_DEPTH_TO_SPACE, - BuiltinOperator_DEQUANTIZE, - BuiltinOperator_EMBEDDING_LOOKUP, - BuiltinOperator_FLOOR, - BuiltinOperator_FULLY_CONNECTED, - BuiltinOperator_HASHTABLE_LOOKUP, - BuiltinOperator_L2_NORMALIZATION, - BuiltinOperator_L2_POOL_2D, - BuiltinOperator_LOCAL_RESPONSE_NORMALIZATION, - BuiltinOperator_LOGISTIC, - BuiltinOperator_LSH_PROJECTION, - BuiltinOperator_LSTM, - BuiltinOperator_MAX_POOL_2D, - BuiltinOperator_MUL, - BuiltinOperator_RELU, - BuiltinOperator_RELU_N1_TO_1, - BuiltinOperator_RELU6, - BuiltinOperator_RESHAPE, - BuiltinOperator_RESIZE_BILINEAR, - BuiltinOperator_RNN, - BuiltinOperator_SOFTMAX, - BuiltinOperator_SPACE_TO_DEPTH, - BuiltinOperator_SVDF, - BuiltinOperator_TANH, - BuiltinOperator_CONCAT_EMBEDDINGS, - BuiltinOperator_SKIP_GRAM, - BuiltinOperator_CALL, - BuiltinOperator_CUSTOM, - BuiltinOperator_EMBEDDING_LOOKUP_SPARSE, - BuiltinOperator_PAD, - BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_RNN, - BuiltinOperator_GATHER, - BuiltinOperator_BATCH_TO_SPACE_ND, - BuiltinOperator_SPACE_TO_BATCH_ND, - BuiltinOperator_TRANSPOSE, - BuiltinOperator_MEAN, - BuiltinOperator_SUB, - BuiltinOperator_DIV, - BuiltinOperator_SQUEEZE, - BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_LSTM, - BuiltinOperator_STRIDED_SLICE, - BuiltinOperator_BIDIRECTIONAL_SEQUENCE_RNN, - BuiltinOperator_EXP, - BuiltinOperator_TOPK_V2, - BuiltinOperator_SPLIT, - BuiltinOperator_LOG_SOFTMAX, - BuiltinOperator_DELEGATE, - BuiltinOperator_BIDIRECTIONAL_SEQUENCE_LSTM, - BuiltinOperator_CAST, - BuiltinOperator_PRELU, - BuiltinOperator_MAXIMUM, - BuiltinOperator_ARG_MAX, - BuiltinOperator_MINIMUM, - BuiltinOperator_LESS, - BuiltinOperator_NEG, - BuiltinOperator_PADV2, - BuiltinOperator_GREATER, - BuiltinOperator_GREATER_EQUAL, - BuiltinOperator_LESS_EQUAL, - BuiltinOperator_SELECT, - BuiltinOperator_SLICE, - BuiltinOperator_SIN, - BuiltinOperator_TRANSPOSE_CONV, - BuiltinOperator_SPARSE_TO_DENSE, - BuiltinOperator_TILE, - BuiltinOperator_EXPAND_DIMS, - BuiltinOperator_EQUAL, - BuiltinOperator_NOT_EQUAL, - BuiltinOperator_LOG, - BuiltinOperator_SUM, - BuiltinOperator_SQRT, - BuiltinOperator_RSQRT, - BuiltinOperator_SHAPE, - BuiltinOperator_POW, - BuiltinOperator_ARG_MIN, - BuiltinOperator_FAKE_QUANT, - BuiltinOperator_REDUCE_PROD, - BuiltinOperator_REDUCE_MAX, - BuiltinOperator_PACK, - BuiltinOperator_LOGICAL_OR, - BuiltinOperator_ONE_HOT, - BuiltinOperator_LOGICAL_AND, - BuiltinOperator_LOGICAL_NOT, - BuiltinOperator_UNPACK, - BuiltinOperator_REDUCE_MIN, - BuiltinOperator_FLOOR_DIV, - BuiltinOperator_REDUCE_ANY, - BuiltinOperator_SQUARE, - BuiltinOperator_ZEROS_LIKE, - BuiltinOperator_FILL, - BuiltinOperator_FLOOR_MOD, - BuiltinOperator_RANGE, - BuiltinOperator_RESIZE_NEAREST_NEIGHBOR, - BuiltinOperator_LEAKY_RELU, - BuiltinOperator_SQUARED_DIFFERENCE, - BuiltinOperator_MIRROR_PAD, - BuiltinOperator_ABS, - BuiltinOperator_SPLIT_V, - BuiltinOperator_UNIQUE, - BuiltinOperator_CEIL, - BuiltinOperator_REVERSE_V2, - BuiltinOperator_ADD_N, - BuiltinOperator_GATHER_ND, - BuiltinOperator_COS, - BuiltinOperator_WHERE, - BuiltinOperator_RANK, - BuiltinOperator_ELU, - BuiltinOperator_REVERSE_SEQUENCE, - BuiltinOperator_MATRIX_DIAG, - BuiltinOperator_QUANTIZE, - BuiltinOperator_MATRIX_SET_DIAG, - BuiltinOperator_ROUND, - BuiltinOperator_HARD_SWISH, - BuiltinOperator_IF, - BuiltinOperator_WHILE, - BuiltinOperator_NON_MAX_SUPPRESSION_V4, - BuiltinOperator_NON_MAX_SUPPRESSION_V5, - BuiltinOperator_SCATTER_ND, - BuiltinOperator_SELECT_V2, - BuiltinOperator_DENSIFY, - BuiltinOperator_SEGMENT_SUM, - BuiltinOperator_BATCH_MATMUL, - BuiltinOperator_PLACEHOLDER_FOR_GREATER_OP_CODES, - BuiltinOperator_CUMSUM, - BuiltinOperator_CALL_ONCE, - BuiltinOperator_BROADCAST_TO, - BuiltinOperator_RFFT2D, - BuiltinOperator_CONV_3D, - BuiltinOperator_IMAG, - BuiltinOperator_REAL, - BuiltinOperator_COMPLEX_ABS, - BuiltinOperator_HASHTABLE, - BuiltinOperator_HASHTABLE_FIND, - BuiltinOperator_HASHTABLE_IMPORT, - BuiltinOperator_HASHTABLE_SIZE, - BuiltinOperator_REDUCE_ALL, - BuiltinOperator_CONV_3D_TRANSPOSE, - BuiltinOperator_VAR_HANDLE, - BuiltinOperator_READ_VARIABLE, - BuiltinOperator_ASSIGN_VARIABLE, - BuiltinOperator_BROADCAST_ARGS, - BuiltinOperator_RANDOM_STANDARD_NORMAL, - BuiltinOperator_BUCKETIZE, - BuiltinOperator_RANDOM_UNIFORM, - BuiltinOperator_MULTINOMIAL, - BuiltinOperator_GELU, - BuiltinOperator_DYNAMIC_UPDATE_SLICE, - BuiltinOperator_RELU_0_TO_1, - BuiltinOperator_UNSORTED_SEGMENT_PROD, - BuiltinOperator_UNSORTED_SEGMENT_MAX, - BuiltinOperator_UNSORTED_SEGMENT_SUM, - BuiltinOperator_ATAN2, - BuiltinOperator_UNSORTED_SEGMENT_MIN, - BuiltinOperator_SIGN, - BuiltinOperator_BITCAST, - BuiltinOperator_BITWISE_XOR, - BuiltinOperator_RIGHT_SHIFT}; + BuiltinOperator_STABLEHLO_LOGISTIC = 162, + BuiltinOperator_STABLEHLO_ADD = 163, + BuiltinOperator_STABLEHLO_DIVIDE = 164, + BuiltinOperator_STABLEHLO_MULTIPLY = 165, + BuiltinOperator_STABLEHLO_MAXIMUM = 166, + BuiltinOperator_STABLEHLO_RESHAPE = 167, + BuiltinOperator_STABLEHLO_CLAMP = 168, + BuiltinOperator_STABLEHLO_CONCATENATE = 169, + BuiltinOperator_STABLEHLO_BROADCAST_IN_DIM = 170, + BuiltinOperator_STABLEHLO_CONVOLUTION = 171, + BuiltinOperator_STABLEHLO_SLICE = 172, + BuiltinOperator_STABLEHLO_CUSTOM_CALL = 173, + BuiltinOperator_STABLEHLO_REDUCE = 174, + BuiltinOperator_STABLEHLO_ABS = 175, + BuiltinOperator_STABLEHLO_AND = 176, + BuiltinOperator_STABLEHLO_COSINE = 177, + BuiltinOperator_STABLEHLO_EXPONENTIAL = 178, + BuiltinOperator_STABLEHLO_FLOOR = 179, + BuiltinOperator_STABLEHLO_LOG = 180, + BuiltinOperator_STABLEHLO_MINIMUM = 181, + BuiltinOperator_STABLEHLO_NEGATE = 182, + BuiltinOperator_STABLEHLO_OR = 183, + BuiltinOperator_STABLEHLO_POWER = 184, + BuiltinOperator_STABLEHLO_REMAINDER = 185, + BuiltinOperator_STABLEHLO_RSQRT = 186, + BuiltinOperator_STABLEHLO_SELECT = 187, + BuiltinOperator_STABLEHLO_SUBTRACT = 188, + BuiltinOperator_STABLEHLO_TANH = 189, + BuiltinOperator_STABLEHLO_SCATTER = 190, + BuiltinOperator_STABLEHLO_COMPARE = 191, + BuiltinOperator_STABLEHLO_CONVERT = 192, + BuiltinOperator_STABLEHLO_DYNAMIC_SLICE = 193, + BuiltinOperator_STABLEHLO_DYNAMIC_UPDATE_SLICE = 194, + BuiltinOperator_STABLEHLO_PAD = 195, + BuiltinOperator_STABLEHLO_IOTA = 196, + BuiltinOperator_STABLEHLO_DOT_GENERAL = 197, + BuiltinOperator_STABLEHLO_REDUCE_WINDOW = 198, + BuiltinOperator_STABLEHLO_SORT = 199, + BuiltinOperator_STABLEHLO_WHILE = 200, + BuiltinOperator_STABLEHLO_GATHER = 201, + BuiltinOperator_STABLEHLO_TRANSPOSE = 202, + BuiltinOperator_DILATE = 203, + BuiltinOperator_STABLEHLO_RNG_BIT_GENERATOR = 204, + BuiltinOperator_REDUCE_WINDOW = 205, + BuiltinOperator_MIN = BuiltinOperator_GRU, + BuiltinOperator_MAX = BuiltinOperator_REDUCE_WINDOW +}; + +inline const BuiltinOperator (&EnumValuesBuiltinOperator())[210] { + static const BuiltinOperator values[] = { + BuiltinOperator_GRU, + BuiltinOperator_BCQ_GATHER, + BuiltinOperator_BCQ_FULLY_CONNECTED, + BuiltinOperator_INSTANCE_NORM, + BuiltinOperator_ADD, + BuiltinOperator_AVERAGE_POOL_2D, + BuiltinOperator_CONCATENATION, + BuiltinOperator_CONV_2D, + BuiltinOperator_DEPTHWISE_CONV_2D, + BuiltinOperator_DEPTH_TO_SPACE, + BuiltinOperator_DEQUANTIZE, + BuiltinOperator_EMBEDDING_LOOKUP, + BuiltinOperator_FLOOR, + BuiltinOperator_FULLY_CONNECTED, + BuiltinOperator_HASHTABLE_LOOKUP, + BuiltinOperator_L2_NORMALIZATION, + BuiltinOperator_L2_POOL_2D, + BuiltinOperator_LOCAL_RESPONSE_NORMALIZATION, + BuiltinOperator_LOGISTIC, + BuiltinOperator_LSH_PROJECTION, + BuiltinOperator_LSTM, + BuiltinOperator_MAX_POOL_2D, + BuiltinOperator_MUL, + BuiltinOperator_RELU, + BuiltinOperator_RELU_N1_TO_1, + BuiltinOperator_RELU6, + BuiltinOperator_RESHAPE, + BuiltinOperator_RESIZE_BILINEAR, + BuiltinOperator_RNN, + BuiltinOperator_SOFTMAX, + BuiltinOperator_SPACE_TO_DEPTH, + BuiltinOperator_SVDF, + BuiltinOperator_TANH, + BuiltinOperator_CONCAT_EMBEDDINGS, + BuiltinOperator_SKIP_GRAM, + BuiltinOperator_CALL, + BuiltinOperator_CUSTOM, + BuiltinOperator_EMBEDDING_LOOKUP_SPARSE, + BuiltinOperator_PAD, + BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_RNN, + BuiltinOperator_GATHER, + BuiltinOperator_BATCH_TO_SPACE_ND, + BuiltinOperator_SPACE_TO_BATCH_ND, + BuiltinOperator_TRANSPOSE, + BuiltinOperator_MEAN, + BuiltinOperator_SUB, + BuiltinOperator_DIV, + BuiltinOperator_SQUEEZE, + BuiltinOperator_UNIDIRECTIONAL_SEQUENCE_LSTM, + BuiltinOperator_STRIDED_SLICE, + BuiltinOperator_BIDIRECTIONAL_SEQUENCE_RNN, + BuiltinOperator_EXP, + BuiltinOperator_TOPK_V2, + BuiltinOperator_SPLIT, + BuiltinOperator_LOG_SOFTMAX, + BuiltinOperator_DELEGATE, + BuiltinOperator_BIDIRECTIONAL_SEQUENCE_LSTM, + BuiltinOperator_CAST, + BuiltinOperator_PRELU, + BuiltinOperator_MAXIMUM, + BuiltinOperator_ARG_MAX, + BuiltinOperator_MINIMUM, + BuiltinOperator_LESS, + BuiltinOperator_NEG, + BuiltinOperator_PADV2, + BuiltinOperator_GREATER, + BuiltinOperator_GREATER_EQUAL, + BuiltinOperator_LESS_EQUAL, + BuiltinOperator_SELECT, + BuiltinOperator_SLICE, + BuiltinOperator_SIN, + BuiltinOperator_TRANSPOSE_CONV, + BuiltinOperator_SPARSE_TO_DENSE, + BuiltinOperator_TILE, + BuiltinOperator_EXPAND_DIMS, + BuiltinOperator_EQUAL, + BuiltinOperator_NOT_EQUAL, + BuiltinOperator_LOG, + BuiltinOperator_SUM, + BuiltinOperator_SQRT, + BuiltinOperator_RSQRT, + BuiltinOperator_SHAPE, + BuiltinOperator_POW, + BuiltinOperator_ARG_MIN, + BuiltinOperator_FAKE_QUANT, + BuiltinOperator_REDUCE_PROD, + BuiltinOperator_REDUCE_MAX, + BuiltinOperator_PACK, + BuiltinOperator_LOGICAL_OR, + BuiltinOperator_ONE_HOT, + BuiltinOperator_LOGICAL_AND, + BuiltinOperator_LOGICAL_NOT, + BuiltinOperator_UNPACK, + BuiltinOperator_REDUCE_MIN, + BuiltinOperator_FLOOR_DIV, + BuiltinOperator_REDUCE_ANY, + BuiltinOperator_SQUARE, + BuiltinOperator_ZEROS_LIKE, + BuiltinOperator_FILL, + BuiltinOperator_FLOOR_MOD, + BuiltinOperator_RANGE, + BuiltinOperator_RESIZE_NEAREST_NEIGHBOR, + BuiltinOperator_LEAKY_RELU, + BuiltinOperator_SQUARED_DIFFERENCE, + BuiltinOperator_MIRROR_PAD, + BuiltinOperator_ABS, + BuiltinOperator_SPLIT_V, + BuiltinOperator_UNIQUE, + BuiltinOperator_CEIL, + BuiltinOperator_REVERSE_V2, + BuiltinOperator_ADD_N, + BuiltinOperator_GATHER_ND, + BuiltinOperator_COS, + BuiltinOperator_WHERE, + BuiltinOperator_RANK, + BuiltinOperator_ELU, + BuiltinOperator_REVERSE_SEQUENCE, + BuiltinOperator_MATRIX_DIAG, + BuiltinOperator_QUANTIZE, + BuiltinOperator_MATRIX_SET_DIAG, + BuiltinOperator_ROUND, + BuiltinOperator_HARD_SWISH, + BuiltinOperator_IF, + BuiltinOperator_WHILE, + BuiltinOperator_NON_MAX_SUPPRESSION_V4, + BuiltinOperator_NON_MAX_SUPPRESSION_V5, + BuiltinOperator_SCATTER_ND, + BuiltinOperator_SELECT_V2, + BuiltinOperator_DENSIFY, + BuiltinOperator_SEGMENT_SUM, + BuiltinOperator_BATCH_MATMUL, + BuiltinOperator_PLACEHOLDER_FOR_GREATER_OP_CODES, + BuiltinOperator_CUMSUM, + BuiltinOperator_CALL_ONCE, + BuiltinOperator_BROADCAST_TO, + BuiltinOperator_RFFT2D, + BuiltinOperator_CONV_3D, + BuiltinOperator_IMAG, + BuiltinOperator_REAL, + BuiltinOperator_COMPLEX_ABS, + BuiltinOperator_HASHTABLE, + BuiltinOperator_HASHTABLE_FIND, + BuiltinOperator_HASHTABLE_IMPORT, + BuiltinOperator_HASHTABLE_SIZE, + BuiltinOperator_REDUCE_ALL, + BuiltinOperator_CONV_3D_TRANSPOSE, + BuiltinOperator_VAR_HANDLE, + BuiltinOperator_READ_VARIABLE, + BuiltinOperator_ASSIGN_VARIABLE, + BuiltinOperator_BROADCAST_ARGS, + BuiltinOperator_RANDOM_STANDARD_NORMAL, + BuiltinOperator_BUCKETIZE, + BuiltinOperator_RANDOM_UNIFORM, + BuiltinOperator_MULTINOMIAL, + BuiltinOperator_GELU, + BuiltinOperator_DYNAMIC_UPDATE_SLICE, + BuiltinOperator_RELU_0_TO_1, + BuiltinOperator_UNSORTED_SEGMENT_PROD, + BuiltinOperator_UNSORTED_SEGMENT_MAX, + BuiltinOperator_UNSORTED_SEGMENT_SUM, + BuiltinOperator_ATAN2, + BuiltinOperator_UNSORTED_SEGMENT_MIN, + BuiltinOperator_SIGN, + BuiltinOperator_BITCAST, + BuiltinOperator_BITWISE_XOR, + BuiltinOperator_RIGHT_SHIFT, + BuiltinOperator_STABLEHLO_LOGISTIC, + BuiltinOperator_STABLEHLO_ADD, + BuiltinOperator_STABLEHLO_DIVIDE, + BuiltinOperator_STABLEHLO_MULTIPLY, + BuiltinOperator_STABLEHLO_MAXIMUM, + BuiltinOperator_STABLEHLO_RESHAPE, + BuiltinOperator_STABLEHLO_CLAMP, + BuiltinOperator_STABLEHLO_CONCATENATE, + BuiltinOperator_STABLEHLO_BROADCAST_IN_DIM, + BuiltinOperator_STABLEHLO_CONVOLUTION, + BuiltinOperator_STABLEHLO_SLICE, + BuiltinOperator_STABLEHLO_CUSTOM_CALL, + BuiltinOperator_STABLEHLO_REDUCE, + BuiltinOperator_STABLEHLO_ABS, + BuiltinOperator_STABLEHLO_AND, + BuiltinOperator_STABLEHLO_COSINE, + BuiltinOperator_STABLEHLO_EXPONENTIAL, + BuiltinOperator_STABLEHLO_FLOOR, + BuiltinOperator_STABLEHLO_LOG, + BuiltinOperator_STABLEHLO_MINIMUM, + BuiltinOperator_STABLEHLO_NEGATE, + BuiltinOperator_STABLEHLO_OR, + BuiltinOperator_STABLEHLO_POWER, + BuiltinOperator_STABLEHLO_REMAINDER, + BuiltinOperator_STABLEHLO_RSQRT, + BuiltinOperator_STABLEHLO_SELECT, + BuiltinOperator_STABLEHLO_SUBTRACT, + BuiltinOperator_STABLEHLO_TANH, + BuiltinOperator_STABLEHLO_SCATTER, + BuiltinOperator_STABLEHLO_COMPARE, + BuiltinOperator_STABLEHLO_CONVERT, + BuiltinOperator_STABLEHLO_DYNAMIC_SLICE, + BuiltinOperator_STABLEHLO_DYNAMIC_UPDATE_SLICE, + BuiltinOperator_STABLEHLO_PAD, + BuiltinOperator_STABLEHLO_IOTA, + BuiltinOperator_STABLEHLO_DOT_GENERAL, + BuiltinOperator_STABLEHLO_REDUCE_WINDOW, + BuiltinOperator_STABLEHLO_SORT, + BuiltinOperator_STABLEHLO_WHILE, + BuiltinOperator_STABLEHLO_GATHER, + BuiltinOperator_STABLEHLO_TRANSPOSE, + BuiltinOperator_DILATE, + BuiltinOperator_STABLEHLO_RNG_BIT_GENERATOR, + BuiltinOperator_REDUCE_WINDOW + }; return values; } -inline const char *const *EnumNamesBuiltinOperator() -{ - static const char *const names[167] = {"BCQ_GATHER", - "BCQ_FULLY_CONNECTED", - "INSTANCE_NORM", - "", - "ADD", - "AVERAGE_POOL_2D", - "CONCATENATION", - "CONV_2D", - "DEPTHWISE_CONV_2D", - "DEPTH_TO_SPACE", - "DEQUANTIZE", - "EMBEDDING_LOOKUP", - "FLOOR", - "FULLY_CONNECTED", - "HASHTABLE_LOOKUP", - "L2_NORMALIZATION", - "L2_POOL_2D", - "LOCAL_RESPONSE_NORMALIZATION", - "LOGISTIC", - "LSH_PROJECTION", - "LSTM", - "MAX_POOL_2D", - "MUL", - "RELU", - "RELU_N1_TO_1", - "RELU6", - "RESHAPE", - "RESIZE_BILINEAR", - "RNN", - "SOFTMAX", - "SPACE_TO_DEPTH", - "SVDF", - "TANH", - "CONCAT_EMBEDDINGS", - "SKIP_GRAM", - "CALL", - "CUSTOM", - "EMBEDDING_LOOKUP_SPARSE", - "PAD", - "UNIDIRECTIONAL_SEQUENCE_RNN", - "GATHER", - "BATCH_TO_SPACE_ND", - "SPACE_TO_BATCH_ND", - "TRANSPOSE", - "MEAN", - "SUB", - "DIV", - "SQUEEZE", - "UNIDIRECTIONAL_SEQUENCE_LSTM", - "STRIDED_SLICE", - "BIDIRECTIONAL_SEQUENCE_RNN", - "EXP", - "TOPK_V2", - "SPLIT", - "LOG_SOFTMAX", - "DELEGATE", - "BIDIRECTIONAL_SEQUENCE_LSTM", - "CAST", - "PRELU", - "MAXIMUM", - "ARG_MAX", - "MINIMUM", - "LESS", - "NEG", - "PADV2", - "GREATER", - "GREATER_EQUAL", - "LESS_EQUAL", - "SELECT", - "SLICE", - "SIN", - "TRANSPOSE_CONV", - "SPARSE_TO_DENSE", - "TILE", - "EXPAND_DIMS", - "EQUAL", - "NOT_EQUAL", - "LOG", - "SUM", - "SQRT", - "RSQRT", - "SHAPE", - "POW", - "ARG_MIN", - "FAKE_QUANT", - "REDUCE_PROD", - "REDUCE_MAX", - "PACK", - "LOGICAL_OR", - "ONE_HOT", - "LOGICAL_AND", - "LOGICAL_NOT", - "UNPACK", - "REDUCE_MIN", - "FLOOR_DIV", - "REDUCE_ANY", - "SQUARE", - "ZEROS_LIKE", - "FILL", - "FLOOR_MOD", - "RANGE", - "RESIZE_NEAREST_NEIGHBOR", - "LEAKY_RELU", - "SQUARED_DIFFERENCE", - "MIRROR_PAD", - "ABS", - "SPLIT_V", - "UNIQUE", - "CEIL", - "REVERSE_V2", - "ADD_N", - "GATHER_ND", - "COS", - "WHERE", - "RANK", - "ELU", - "REVERSE_SEQUENCE", - "MATRIX_DIAG", - "QUANTIZE", - "MATRIX_SET_DIAG", - "ROUND", - "HARD_SWISH", - "IF", - "WHILE", - "NON_MAX_SUPPRESSION_V4", - "NON_MAX_SUPPRESSION_V5", - "SCATTER_ND", - "SELECT_V2", - "DENSIFY", - "SEGMENT_SUM", - "BATCH_MATMUL", - "PLACEHOLDER_FOR_GREATER_OP_CODES", - "CUMSUM", - "CALL_ONCE", - "BROADCAST_TO", - "RFFT2D", - "CONV_3D", - "IMAG", - "REAL", - "COMPLEX_ABS", - "HASHTABLE", - "HASHTABLE_FIND", - "HASHTABLE_IMPORT", - "HASHTABLE_SIZE", - "REDUCE_ALL", - "CONV_3D_TRANSPOSE", - "VAR_HANDLE", - "READ_VARIABLE", - "ASSIGN_VARIABLE", - "BROADCAST_ARGS", - "RANDOM_STANDARD_NORMAL", - "BUCKETIZE", - "RANDOM_UNIFORM", - "MULTINOMIAL", - "GELU", - "DYNAMIC_UPDATE_SLICE", - "RELU_0_TO_1", - "UNSORTED_SEGMENT_PROD", - "UNSORTED_SEGMENT_MAX", - "UNSORTED_SEGMENT_SUM", - "ATAN2", - "UNSORTED_SEGMENT_MIN", - "SIGN", - "BITCAST", - "BITWISE_XOR", - "RIGHT_SHIFT", - nullptr}; +inline const char * const *EnumNamesBuiltinOperator() { + static const char * const names[212] = { + "GRU", + "BCQ_GATHER", + "BCQ_FULLY_CONNECTED", + "INSTANCE_NORM", + "", + "ADD", + "AVERAGE_POOL_2D", + "CONCATENATION", + "CONV_2D", + "DEPTHWISE_CONV_2D", + "DEPTH_TO_SPACE", + "DEQUANTIZE", + "EMBEDDING_LOOKUP", + "FLOOR", + "FULLY_CONNECTED", + "HASHTABLE_LOOKUP", + "L2_NORMALIZATION", + "L2_POOL_2D", + "LOCAL_RESPONSE_NORMALIZATION", + "LOGISTIC", + "LSH_PROJECTION", + "LSTM", + "MAX_POOL_2D", + "MUL", + "RELU", + "RELU_N1_TO_1", + "RELU6", + "RESHAPE", + "RESIZE_BILINEAR", + "RNN", + "SOFTMAX", + "SPACE_TO_DEPTH", + "SVDF", + "TANH", + "CONCAT_EMBEDDINGS", + "SKIP_GRAM", + "CALL", + "CUSTOM", + "EMBEDDING_LOOKUP_SPARSE", + "PAD", + "UNIDIRECTIONAL_SEQUENCE_RNN", + "GATHER", + "BATCH_TO_SPACE_ND", + "SPACE_TO_BATCH_ND", + "TRANSPOSE", + "MEAN", + "SUB", + "DIV", + "SQUEEZE", + "UNIDIRECTIONAL_SEQUENCE_LSTM", + "STRIDED_SLICE", + "BIDIRECTIONAL_SEQUENCE_RNN", + "EXP", + "TOPK_V2", + "SPLIT", + "LOG_SOFTMAX", + "DELEGATE", + "BIDIRECTIONAL_SEQUENCE_LSTM", + "CAST", + "PRELU", + "MAXIMUM", + "ARG_MAX", + "MINIMUM", + "LESS", + "NEG", + "PADV2", + "GREATER", + "GREATER_EQUAL", + "LESS_EQUAL", + "SELECT", + "SLICE", + "SIN", + "TRANSPOSE_CONV", + "SPARSE_TO_DENSE", + "TILE", + "EXPAND_DIMS", + "EQUAL", + "NOT_EQUAL", + "LOG", + "SUM", + "SQRT", + "RSQRT", + "SHAPE", + "POW", + "ARG_MIN", + "FAKE_QUANT", + "REDUCE_PROD", + "REDUCE_MAX", + "PACK", + "LOGICAL_OR", + "ONE_HOT", + "LOGICAL_AND", + "LOGICAL_NOT", + "UNPACK", + "REDUCE_MIN", + "FLOOR_DIV", + "REDUCE_ANY", + "SQUARE", + "ZEROS_LIKE", + "FILL", + "FLOOR_MOD", + "RANGE", + "RESIZE_NEAREST_NEIGHBOR", + "LEAKY_RELU", + "SQUARED_DIFFERENCE", + "MIRROR_PAD", + "ABS", + "SPLIT_V", + "UNIQUE", + "CEIL", + "REVERSE_V2", + "ADD_N", + "GATHER_ND", + "COS", + "WHERE", + "RANK", + "ELU", + "REVERSE_SEQUENCE", + "MATRIX_DIAG", + "QUANTIZE", + "MATRIX_SET_DIAG", + "ROUND", + "HARD_SWISH", + "IF", + "WHILE", + "NON_MAX_SUPPRESSION_V4", + "NON_MAX_SUPPRESSION_V5", + "SCATTER_ND", + "SELECT_V2", + "DENSIFY", + "SEGMENT_SUM", + "BATCH_MATMUL", + "PLACEHOLDER_FOR_GREATER_OP_CODES", + "CUMSUM", + "CALL_ONCE", + "BROADCAST_TO", + "RFFT2D", + "CONV_3D", + "IMAG", + "REAL", + "COMPLEX_ABS", + "HASHTABLE", + "HASHTABLE_FIND", + "HASHTABLE_IMPORT", + "HASHTABLE_SIZE", + "REDUCE_ALL", + "CONV_3D_TRANSPOSE", + "VAR_HANDLE", + "READ_VARIABLE", + "ASSIGN_VARIABLE", + "BROADCAST_ARGS", + "RANDOM_STANDARD_NORMAL", + "BUCKETIZE", + "RANDOM_UNIFORM", + "MULTINOMIAL", + "GELU", + "DYNAMIC_UPDATE_SLICE", + "RELU_0_TO_1", + "UNSORTED_SEGMENT_PROD", + "UNSORTED_SEGMENT_MAX", + "UNSORTED_SEGMENT_SUM", + "ATAN2", + "UNSORTED_SEGMENT_MIN", + "SIGN", + "BITCAST", + "BITWISE_XOR", + "RIGHT_SHIFT", + "STABLEHLO_LOGISTIC", + "STABLEHLO_ADD", + "STABLEHLO_DIVIDE", + "STABLEHLO_MULTIPLY", + "STABLEHLO_MAXIMUM", + "STABLEHLO_RESHAPE", + "STABLEHLO_CLAMP", + "STABLEHLO_CONCATENATE", + "STABLEHLO_BROADCAST_IN_DIM", + "STABLEHLO_CONVOLUTION", + "STABLEHLO_SLICE", + "STABLEHLO_CUSTOM_CALL", + "STABLEHLO_REDUCE", + "STABLEHLO_ABS", + "STABLEHLO_AND", + "STABLEHLO_COSINE", + "STABLEHLO_EXPONENTIAL", + "STABLEHLO_FLOOR", + "STABLEHLO_LOG", + "STABLEHLO_MINIMUM", + "STABLEHLO_NEGATE", + "STABLEHLO_OR", + "STABLEHLO_POWER", + "STABLEHLO_REMAINDER", + "STABLEHLO_RSQRT", + "STABLEHLO_SELECT", + "STABLEHLO_SUBTRACT", + "STABLEHLO_TANH", + "STABLEHLO_SCATTER", + "STABLEHLO_COMPARE", + "STABLEHLO_CONVERT", + "STABLEHLO_DYNAMIC_SLICE", + "STABLEHLO_DYNAMIC_UPDATE_SLICE", + "STABLEHLO_PAD", + "STABLEHLO_IOTA", + "STABLEHLO_DOT_GENERAL", + "STABLEHLO_REDUCE_WINDOW", + "STABLEHLO_SORT", + "STABLEHLO_WHILE", + "STABLEHLO_GATHER", + "STABLEHLO_TRANSPOSE", + "DILATE", + "STABLEHLO_RNG_BIT_GENERATOR", + "REDUCE_WINDOW", + nullptr + }; return names; } -inline const char *EnumNameBuiltinOperator(BuiltinOperator e) -{ - if (flatbuffers::IsOutRange(e, BuiltinOperator_BCQ_GATHER, BuiltinOperator_RIGHT_SHIFT)) - return ""; - const size_t index = static_cast(e) - static_cast(BuiltinOperator_BCQ_GATHER); +inline const char *EnumNameBuiltinOperator(BuiltinOperator e) { + if (flatbuffers::IsOutRange(e, BuiltinOperator_GRU, BuiltinOperator_REDUCE_WINDOW)) return ""; + const size_t index = static_cast(e) - static_cast(BuiltinOperator_GRU); return EnumNamesBuiltinOperator()[index]; } -enum BuiltinOptions : uint8_t -{ +enum BuiltinOptions : uint8_t { BuiltinOptions_NONE = 0, BuiltinOptions_Conv2DOptions = 1, BuiltinOptions_DepthwiseConv2DOptions = 2, @@ -1573,6 +1766,7 @@ enum BuiltinOptions : uint8_t BuiltinOptions_BitcastOptions = 124, BuiltinOptions_BitwiseXorOptions = 125, BuiltinOptions_RightShiftOptions = 126, + BuiltinOptions_GRUOptions = 251, BuiltinOptions_BCQGatherOptions = 252, BuiltinOptions_BCQFullyConnectedOptions = 253, BuiltinOptions_InstanceNormOptions = 254, @@ -1580,15463 +1774,15625 @@ enum BuiltinOptions : uint8_t BuiltinOptions_MAX = BuiltinOptions_InstanceNormOptions }; -inline const BuiltinOptions (&EnumValuesBuiltinOptions())[130] -{ - static const BuiltinOptions values[] = {BuiltinOptions_NONE, - BuiltinOptions_Conv2DOptions, - BuiltinOptions_DepthwiseConv2DOptions, - BuiltinOptions_ConcatEmbeddingsOptions, - BuiltinOptions_LSHProjectionOptions, - BuiltinOptions_Pool2DOptions, - BuiltinOptions_SVDFOptions, - BuiltinOptions_RNNOptions, - BuiltinOptions_FullyConnectedOptions, - BuiltinOptions_SoftmaxOptions, - BuiltinOptions_ConcatenationOptions, - BuiltinOptions_AddOptions, - BuiltinOptions_L2NormOptions, - BuiltinOptions_LocalResponseNormalizationOptions, - BuiltinOptions_LSTMOptions, - BuiltinOptions_ResizeBilinearOptions, - BuiltinOptions_CallOptions, - BuiltinOptions_ReshapeOptions, - BuiltinOptions_SkipGramOptions, - BuiltinOptions_SpaceToDepthOptions, - BuiltinOptions_EmbeddingLookupSparseOptions, - BuiltinOptions_MulOptions, - BuiltinOptions_PadOptions, - BuiltinOptions_GatherOptions, - BuiltinOptions_BatchToSpaceNDOptions, - BuiltinOptions_SpaceToBatchNDOptions, - BuiltinOptions_TransposeOptions, - BuiltinOptions_ReducerOptions, - BuiltinOptions_SubOptions, - BuiltinOptions_DivOptions, - BuiltinOptions_SqueezeOptions, - BuiltinOptions_SequenceRNNOptions, - BuiltinOptions_StridedSliceOptions, - BuiltinOptions_ExpOptions, - BuiltinOptions_TopKV2Options, - BuiltinOptions_SplitOptions, - BuiltinOptions_LogSoftmaxOptions, - BuiltinOptions_CastOptions, - BuiltinOptions_DequantizeOptions, - BuiltinOptions_MaximumMinimumOptions, - BuiltinOptions_ArgMaxOptions, - BuiltinOptions_LessOptions, - BuiltinOptions_NegOptions, - BuiltinOptions_PadV2Options, - BuiltinOptions_GreaterOptions, - BuiltinOptions_GreaterEqualOptions, - BuiltinOptions_LessEqualOptions, - BuiltinOptions_SelectOptions, - BuiltinOptions_SliceOptions, - BuiltinOptions_TransposeConvOptions, - BuiltinOptions_SparseToDenseOptions, - BuiltinOptions_TileOptions, - BuiltinOptions_ExpandDimsOptions, - BuiltinOptions_EqualOptions, - BuiltinOptions_NotEqualOptions, - BuiltinOptions_ShapeOptions, - BuiltinOptions_PowOptions, - BuiltinOptions_ArgMinOptions, - BuiltinOptions_FakeQuantOptions, - BuiltinOptions_PackOptions, - BuiltinOptions_LogicalOrOptions, - BuiltinOptions_OneHotOptions, - BuiltinOptions_LogicalAndOptions, - BuiltinOptions_LogicalNotOptions, - BuiltinOptions_UnpackOptions, - BuiltinOptions_FloorDivOptions, - BuiltinOptions_SquareOptions, - BuiltinOptions_ZerosLikeOptions, - BuiltinOptions_FillOptions, - BuiltinOptions_BidirectionalSequenceLSTMOptions, - BuiltinOptions_BidirectionalSequenceRNNOptions, - BuiltinOptions_UnidirectionalSequenceLSTMOptions, - BuiltinOptions_FloorModOptions, - BuiltinOptions_RangeOptions, - BuiltinOptions_ResizeNearestNeighborOptions, - BuiltinOptions_LeakyReluOptions, - BuiltinOptions_SquaredDifferenceOptions, - BuiltinOptions_MirrorPadOptions, - BuiltinOptions_AbsOptions, - BuiltinOptions_SplitVOptions, - BuiltinOptions_UniqueOptions, - BuiltinOptions_ReverseV2Options, - BuiltinOptions_AddNOptions, - BuiltinOptions_GatherNdOptions, - BuiltinOptions_CosOptions, - BuiltinOptions_WhereOptions, - BuiltinOptions_RankOptions, - BuiltinOptions_ReverseSequenceOptions, - BuiltinOptions_MatrixDiagOptions, - BuiltinOptions_QuantizeOptions, - BuiltinOptions_MatrixSetDiagOptions, - BuiltinOptions_HardSwishOptions, - BuiltinOptions_IfOptions, - BuiltinOptions_WhileOptions, - BuiltinOptions_DepthToSpaceOptions, - BuiltinOptions_NonMaxSuppressionV4Options, - BuiltinOptions_NonMaxSuppressionV5Options, - BuiltinOptions_ScatterNdOptions, - BuiltinOptions_SelectV2Options, - BuiltinOptions_DensifyOptions, - BuiltinOptions_SegmentSumOptions, - BuiltinOptions_BatchMatMulOptions, - BuiltinOptions_CumsumOptions, - BuiltinOptions_CallOnceOptions, - BuiltinOptions_BroadcastToOptions, - BuiltinOptions_Rfft2dOptions, - BuiltinOptions_Conv3DOptions, - BuiltinOptions_HashtableOptions, - BuiltinOptions_HashtableFindOptions, - BuiltinOptions_HashtableImportOptions, - BuiltinOptions_HashtableSizeOptions, - BuiltinOptions_VarHandleOptions, - BuiltinOptions_ReadVariableOptions, - BuiltinOptions_AssignVariableOptions, - BuiltinOptions_RandomOptions, - BuiltinOptions_BucketizeOptions, - BuiltinOptions_GeluOptions, - BuiltinOptions_DynamicUpdateSliceOptions, - BuiltinOptions_UnsortedSegmentProdOptions, - BuiltinOptions_UnsortedSegmentMaxOptions, - BuiltinOptions_UnsortedSegmentMinOptions, - BuiltinOptions_UnsortedSegmentSumOptions, - BuiltinOptions_ATan2Options, - BuiltinOptions_SignOptions, - BuiltinOptions_BitcastOptions, - BuiltinOptions_BitwiseXorOptions, - BuiltinOptions_RightShiftOptions, - BuiltinOptions_BCQGatherOptions, - BuiltinOptions_BCQFullyConnectedOptions, - BuiltinOptions_InstanceNormOptions}; +inline const BuiltinOptions (&EnumValuesBuiltinOptions())[131] { + static const BuiltinOptions values[] = { + BuiltinOptions_NONE, + BuiltinOptions_Conv2DOptions, + BuiltinOptions_DepthwiseConv2DOptions, + BuiltinOptions_ConcatEmbeddingsOptions, + BuiltinOptions_LSHProjectionOptions, + BuiltinOptions_Pool2DOptions, + BuiltinOptions_SVDFOptions, + BuiltinOptions_RNNOptions, + BuiltinOptions_FullyConnectedOptions, + BuiltinOptions_SoftmaxOptions, + BuiltinOptions_ConcatenationOptions, + BuiltinOptions_AddOptions, + BuiltinOptions_L2NormOptions, + BuiltinOptions_LocalResponseNormalizationOptions, + BuiltinOptions_LSTMOptions, + BuiltinOptions_ResizeBilinearOptions, + BuiltinOptions_CallOptions, + BuiltinOptions_ReshapeOptions, + BuiltinOptions_SkipGramOptions, + BuiltinOptions_SpaceToDepthOptions, + BuiltinOptions_EmbeddingLookupSparseOptions, + BuiltinOptions_MulOptions, + BuiltinOptions_PadOptions, + BuiltinOptions_GatherOptions, + BuiltinOptions_BatchToSpaceNDOptions, + BuiltinOptions_SpaceToBatchNDOptions, + BuiltinOptions_TransposeOptions, + BuiltinOptions_ReducerOptions, + BuiltinOptions_SubOptions, + BuiltinOptions_DivOptions, + BuiltinOptions_SqueezeOptions, + BuiltinOptions_SequenceRNNOptions, + BuiltinOptions_StridedSliceOptions, + BuiltinOptions_ExpOptions, + BuiltinOptions_TopKV2Options, + BuiltinOptions_SplitOptions, + BuiltinOptions_LogSoftmaxOptions, + BuiltinOptions_CastOptions, + BuiltinOptions_DequantizeOptions, + BuiltinOptions_MaximumMinimumOptions, + BuiltinOptions_ArgMaxOptions, + BuiltinOptions_LessOptions, + BuiltinOptions_NegOptions, + BuiltinOptions_PadV2Options, + BuiltinOptions_GreaterOptions, + BuiltinOptions_GreaterEqualOptions, + BuiltinOptions_LessEqualOptions, + BuiltinOptions_SelectOptions, + BuiltinOptions_SliceOptions, + BuiltinOptions_TransposeConvOptions, + BuiltinOptions_SparseToDenseOptions, + BuiltinOptions_TileOptions, + BuiltinOptions_ExpandDimsOptions, + BuiltinOptions_EqualOptions, + BuiltinOptions_NotEqualOptions, + BuiltinOptions_ShapeOptions, + BuiltinOptions_PowOptions, + BuiltinOptions_ArgMinOptions, + BuiltinOptions_FakeQuantOptions, + BuiltinOptions_PackOptions, + BuiltinOptions_LogicalOrOptions, + BuiltinOptions_OneHotOptions, + BuiltinOptions_LogicalAndOptions, + BuiltinOptions_LogicalNotOptions, + BuiltinOptions_UnpackOptions, + BuiltinOptions_FloorDivOptions, + BuiltinOptions_SquareOptions, + BuiltinOptions_ZerosLikeOptions, + BuiltinOptions_FillOptions, + BuiltinOptions_BidirectionalSequenceLSTMOptions, + BuiltinOptions_BidirectionalSequenceRNNOptions, + BuiltinOptions_UnidirectionalSequenceLSTMOptions, + BuiltinOptions_FloorModOptions, + BuiltinOptions_RangeOptions, + BuiltinOptions_ResizeNearestNeighborOptions, + BuiltinOptions_LeakyReluOptions, + BuiltinOptions_SquaredDifferenceOptions, + BuiltinOptions_MirrorPadOptions, + BuiltinOptions_AbsOptions, + BuiltinOptions_SplitVOptions, + BuiltinOptions_UniqueOptions, + BuiltinOptions_ReverseV2Options, + BuiltinOptions_AddNOptions, + BuiltinOptions_GatherNdOptions, + BuiltinOptions_CosOptions, + BuiltinOptions_WhereOptions, + BuiltinOptions_RankOptions, + BuiltinOptions_ReverseSequenceOptions, + BuiltinOptions_MatrixDiagOptions, + BuiltinOptions_QuantizeOptions, + BuiltinOptions_MatrixSetDiagOptions, + BuiltinOptions_HardSwishOptions, + BuiltinOptions_IfOptions, + BuiltinOptions_WhileOptions, + BuiltinOptions_DepthToSpaceOptions, + BuiltinOptions_NonMaxSuppressionV4Options, + BuiltinOptions_NonMaxSuppressionV5Options, + BuiltinOptions_ScatterNdOptions, + BuiltinOptions_SelectV2Options, + BuiltinOptions_DensifyOptions, + BuiltinOptions_SegmentSumOptions, + BuiltinOptions_BatchMatMulOptions, + BuiltinOptions_CumsumOptions, + BuiltinOptions_CallOnceOptions, + BuiltinOptions_BroadcastToOptions, + BuiltinOptions_Rfft2dOptions, + BuiltinOptions_Conv3DOptions, + BuiltinOptions_HashtableOptions, + BuiltinOptions_HashtableFindOptions, + BuiltinOptions_HashtableImportOptions, + BuiltinOptions_HashtableSizeOptions, + BuiltinOptions_VarHandleOptions, + BuiltinOptions_ReadVariableOptions, + BuiltinOptions_AssignVariableOptions, + BuiltinOptions_RandomOptions, + BuiltinOptions_BucketizeOptions, + BuiltinOptions_GeluOptions, + BuiltinOptions_DynamicUpdateSliceOptions, + BuiltinOptions_UnsortedSegmentProdOptions, + BuiltinOptions_UnsortedSegmentMaxOptions, + BuiltinOptions_UnsortedSegmentMinOptions, + BuiltinOptions_UnsortedSegmentSumOptions, + BuiltinOptions_ATan2Options, + BuiltinOptions_SignOptions, + BuiltinOptions_BitcastOptions, + BuiltinOptions_BitwiseXorOptions, + BuiltinOptions_RightShiftOptions, + BuiltinOptions_GRUOptions, + BuiltinOptions_BCQGatherOptions, + BuiltinOptions_BCQFullyConnectedOptions, + BuiltinOptions_InstanceNormOptions + }; return values; } -inline const char *const *EnumNamesBuiltinOptions() -{ - static const char *const names[256] = {"NONE", - "Conv2DOptions", - "DepthwiseConv2DOptions", - "ConcatEmbeddingsOptions", - "LSHProjectionOptions", - "Pool2DOptions", - "SVDFOptions", - "RNNOptions", - "FullyConnectedOptions", - "SoftmaxOptions", - "ConcatenationOptions", - "AddOptions", - "L2NormOptions", - "LocalResponseNormalizationOptions", - "LSTMOptions", - "ResizeBilinearOptions", - "CallOptions", - "ReshapeOptions", - "SkipGramOptions", - "SpaceToDepthOptions", - "EmbeddingLookupSparseOptions", - "MulOptions", - "PadOptions", - "GatherOptions", - "BatchToSpaceNDOptions", - "SpaceToBatchNDOptions", - "TransposeOptions", - "ReducerOptions", - "SubOptions", - "DivOptions", - "SqueezeOptions", - "SequenceRNNOptions", - "StridedSliceOptions", - "ExpOptions", - "TopKV2Options", - "SplitOptions", - "LogSoftmaxOptions", - "CastOptions", - "DequantizeOptions", - "MaximumMinimumOptions", - "ArgMaxOptions", - "LessOptions", - "NegOptions", - "PadV2Options", - "GreaterOptions", - "GreaterEqualOptions", - "LessEqualOptions", - "SelectOptions", - "SliceOptions", - "TransposeConvOptions", - "SparseToDenseOptions", - "TileOptions", - "ExpandDimsOptions", - "EqualOptions", - "NotEqualOptions", - "ShapeOptions", - "PowOptions", - "ArgMinOptions", - "FakeQuantOptions", - "PackOptions", - "LogicalOrOptions", - "OneHotOptions", - "LogicalAndOptions", - "LogicalNotOptions", - "UnpackOptions", - "FloorDivOptions", - "SquareOptions", - "ZerosLikeOptions", - "FillOptions", - "BidirectionalSequenceLSTMOptions", - "BidirectionalSequenceRNNOptions", - "UnidirectionalSequenceLSTMOptions", - "FloorModOptions", - "RangeOptions", - "ResizeNearestNeighborOptions", - "LeakyReluOptions", - "SquaredDifferenceOptions", - "MirrorPadOptions", - "AbsOptions", - "SplitVOptions", - "UniqueOptions", - "ReverseV2Options", - "AddNOptions", - "GatherNdOptions", - "CosOptions", - "WhereOptions", - "RankOptions", - "ReverseSequenceOptions", - "MatrixDiagOptions", - "QuantizeOptions", - "MatrixSetDiagOptions", - "HardSwishOptions", - "IfOptions", - "WhileOptions", - "DepthToSpaceOptions", - "NonMaxSuppressionV4Options", - "NonMaxSuppressionV5Options", - "ScatterNdOptions", - "SelectV2Options", - "DensifyOptions", - "SegmentSumOptions", - "BatchMatMulOptions", - "CumsumOptions", - "CallOnceOptions", - "BroadcastToOptions", - "Rfft2dOptions", - "Conv3DOptions", - "HashtableOptions", - "HashtableFindOptions", - "HashtableImportOptions", - "HashtableSizeOptions", - "VarHandleOptions", - "ReadVariableOptions", - "AssignVariableOptions", - "RandomOptions", - "BucketizeOptions", - "GeluOptions", - "DynamicUpdateSliceOptions", - "UnsortedSegmentProdOptions", - "UnsortedSegmentMaxOptions", - "UnsortedSegmentMinOptions", - "UnsortedSegmentSumOptions", - "ATan2Options", - "SignOptions", - "BitcastOptions", - "BitwiseXorOptions", - "RightShiftOptions", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "BCQGatherOptions", - "BCQFullyConnectedOptions", - "InstanceNormOptions", - nullptr}; +inline const char * const *EnumNamesBuiltinOptions() { + static const char * const names[256] = { + "NONE", + "Conv2DOptions", + "DepthwiseConv2DOptions", + "ConcatEmbeddingsOptions", + "LSHProjectionOptions", + "Pool2DOptions", + "SVDFOptions", + "RNNOptions", + "FullyConnectedOptions", + "SoftmaxOptions", + "ConcatenationOptions", + "AddOptions", + "L2NormOptions", + "LocalResponseNormalizationOptions", + "LSTMOptions", + "ResizeBilinearOptions", + "CallOptions", + "ReshapeOptions", + "SkipGramOptions", + "SpaceToDepthOptions", + "EmbeddingLookupSparseOptions", + "MulOptions", + "PadOptions", + "GatherOptions", + "BatchToSpaceNDOptions", + "SpaceToBatchNDOptions", + "TransposeOptions", + "ReducerOptions", + "SubOptions", + "DivOptions", + "SqueezeOptions", + "SequenceRNNOptions", + "StridedSliceOptions", + "ExpOptions", + "TopKV2Options", + "SplitOptions", + "LogSoftmaxOptions", + "CastOptions", + "DequantizeOptions", + "MaximumMinimumOptions", + "ArgMaxOptions", + "LessOptions", + "NegOptions", + "PadV2Options", + "GreaterOptions", + "GreaterEqualOptions", + "LessEqualOptions", + "SelectOptions", + "SliceOptions", + "TransposeConvOptions", + "SparseToDenseOptions", + "TileOptions", + "ExpandDimsOptions", + "EqualOptions", + "NotEqualOptions", + "ShapeOptions", + "PowOptions", + "ArgMinOptions", + "FakeQuantOptions", + "PackOptions", + "LogicalOrOptions", + "OneHotOptions", + "LogicalAndOptions", + "LogicalNotOptions", + "UnpackOptions", + "FloorDivOptions", + "SquareOptions", + "ZerosLikeOptions", + "FillOptions", + "BidirectionalSequenceLSTMOptions", + "BidirectionalSequenceRNNOptions", + "UnidirectionalSequenceLSTMOptions", + "FloorModOptions", + "RangeOptions", + "ResizeNearestNeighborOptions", + "LeakyReluOptions", + "SquaredDifferenceOptions", + "MirrorPadOptions", + "AbsOptions", + "SplitVOptions", + "UniqueOptions", + "ReverseV2Options", + "AddNOptions", + "GatherNdOptions", + "CosOptions", + "WhereOptions", + "RankOptions", + "ReverseSequenceOptions", + "MatrixDiagOptions", + "QuantizeOptions", + "MatrixSetDiagOptions", + "HardSwishOptions", + "IfOptions", + "WhileOptions", + "DepthToSpaceOptions", + "NonMaxSuppressionV4Options", + "NonMaxSuppressionV5Options", + "ScatterNdOptions", + "SelectV2Options", + "DensifyOptions", + "SegmentSumOptions", + "BatchMatMulOptions", + "CumsumOptions", + "CallOnceOptions", + "BroadcastToOptions", + "Rfft2dOptions", + "Conv3DOptions", + "HashtableOptions", + "HashtableFindOptions", + "HashtableImportOptions", + "HashtableSizeOptions", + "VarHandleOptions", + "ReadVariableOptions", + "AssignVariableOptions", + "RandomOptions", + "BucketizeOptions", + "GeluOptions", + "DynamicUpdateSliceOptions", + "UnsortedSegmentProdOptions", + "UnsortedSegmentMaxOptions", + "UnsortedSegmentMinOptions", + "UnsortedSegmentSumOptions", + "ATan2Options", + "SignOptions", + "BitcastOptions", + "BitwiseXorOptions", + "RightShiftOptions", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "GRUOptions", + "BCQGatherOptions", + "BCQFullyConnectedOptions", + "InstanceNormOptions", + nullptr + }; return names; } -inline const char *EnumNameBuiltinOptions(BuiltinOptions e) -{ - if (flatbuffers::IsOutRange(e, BuiltinOptions_NONE, BuiltinOptions_InstanceNormOptions)) - return ""; +inline const char *EnumNameBuiltinOptions(BuiltinOptions e) { + if (flatbuffers::IsOutRange(e, BuiltinOptions_NONE, BuiltinOptions_InstanceNormOptions)) return ""; const size_t index = static_cast(e); return EnumNamesBuiltinOptions()[index]; } -template struct BuiltinOptionsTraits -{ +template struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_NONE; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_Conv2DOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_DepthwiseConv2DOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ConcatEmbeddingsOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LSHProjectionOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_Pool2DOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SVDFOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_RNNOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_FullyConnectedOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SoftmaxOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ConcatenationOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_AddOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_L2NormOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LocalResponseNormalizationOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LSTMOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ResizeBilinearOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_CallOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ReshapeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SkipGramOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SpaceToDepthOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_EmbeddingLookupSparseOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_MulOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_PadOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_GatherOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BatchToSpaceNDOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SpaceToBatchNDOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_TransposeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ReducerOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SubOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_DivOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SqueezeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SequenceRNNOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_StridedSliceOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ExpOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_TopKV2Options; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SplitOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LogSoftmaxOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_CastOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_DequantizeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_MaximumMinimumOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ArgMaxOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LessOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_NegOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_PadV2Options; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_GreaterOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_GreaterEqualOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LessEqualOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SelectOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SliceOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_TransposeConvOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SparseToDenseOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_TileOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ExpandDimsOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_EqualOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_NotEqualOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ShapeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_PowOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ArgMinOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_FakeQuantOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_PackOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LogicalOrOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_OneHotOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LogicalAndOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LogicalNotOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_UnpackOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_FloorDivOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SquareOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ZerosLikeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_FillOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BidirectionalSequenceLSTMOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BidirectionalSequenceRNNOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_UnidirectionalSequenceLSTMOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_FloorModOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_RangeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ResizeNearestNeighborOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_LeakyReluOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SquaredDifferenceOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_MirrorPadOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_AbsOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SplitVOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_UniqueOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ReverseV2Options; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_AddNOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_GatherNdOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_CosOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_WhereOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_RankOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ReverseSequenceOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_MatrixDiagOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_QuantizeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_MatrixSetDiagOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_HardSwishOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_IfOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_WhileOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_DepthToSpaceOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_NonMaxSuppressionV4Options; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_NonMaxSuppressionV5Options; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ScatterNdOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SelectV2Options; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_DensifyOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SegmentSumOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BatchMatMulOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_CumsumOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_CallOnceOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BroadcastToOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_Rfft2dOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_Conv3DOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_HashtableOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_HashtableFindOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_HashtableImportOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_HashtableSizeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_VarHandleOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ReadVariableOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_AssignVariableOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_RandomOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BucketizeOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_GeluOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_DynamicUpdateSliceOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_UnsortedSegmentProdOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_UnsortedSegmentMaxOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_UnsortedSegmentMinOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_UnsortedSegmentSumOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_ATan2Options; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_SignOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BitcastOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BitwiseXorOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_RightShiftOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { + static const BuiltinOptions enum_value = BuiltinOptions_GRUOptions; +}; + +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BCQGatherOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_BCQFullyConnectedOptions; }; -template <> struct BuiltinOptionsTraits -{ +template<> struct BuiltinOptionsTraits { static const BuiltinOptions enum_value = BuiltinOptions_InstanceNormOptions; }; -struct BuiltinOptionsUnion -{ +struct BuiltinOptionsUnion { BuiltinOptions type; void *value; BuiltinOptionsUnion() : type(BuiltinOptions_NONE), value(nullptr) {} - BuiltinOptionsUnion(BuiltinOptionsUnion &&u) FLATBUFFERS_NOEXCEPT : type(BuiltinOptions_NONE), - value(nullptr) - { - std::swap(type, u.type); - std::swap(value, u.value); - } + BuiltinOptionsUnion(BuiltinOptionsUnion&& u) FLATBUFFERS_NOEXCEPT : + type(BuiltinOptions_NONE), value(nullptr) + { std::swap(type, u.type); std::swap(value, u.value); } BuiltinOptionsUnion(const BuiltinOptionsUnion &); BuiltinOptionsUnion &operator=(const BuiltinOptionsUnion &u) - { - BuiltinOptionsUnion t(u); - std::swap(type, t.type); - std::swap(value, t.value); - return *this; - } + { BuiltinOptionsUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } BuiltinOptionsUnion &operator=(BuiltinOptionsUnion &&u) FLATBUFFERS_NOEXCEPT - { - std::swap(type, u.type); - std::swap(value, u.value); - return *this; - } + { std::swap(type, u.type); std::swap(value, u.value); return *this; } ~BuiltinOptionsUnion() { Reset(); } void Reset(); #ifndef FLATBUFFERS_CPP98_STL - template void Set(T &&val) - { + template + void Set(T&& val) { using RT = typename std::remove_reference::type; Reset(); type = BuiltinOptionsTraits::enum_value; - if (type != BuiltinOptions_NONE) - { + if (type != BuiltinOptions_NONE) { value = new RT(std::forward(val)); } } -#endif // FLATBUFFERS_CPP98_STL - - static void *UnPack(const void *obj, BuiltinOptions type, - const flatbuffers::resolver_function_t *resolver); - flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, - const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; - - circle::Conv2DOptionsT *AsConv2DOptions() - { - return type == BuiltinOptions_Conv2DOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::Conv2DOptionsT *AsConv2DOptions() const - { - return type == BuiltinOptions_Conv2DOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::DepthwiseConv2DOptionsT *AsDepthwiseConv2DOptions() - { - return type == BuiltinOptions_DepthwiseConv2DOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::DepthwiseConv2DOptionsT *AsDepthwiseConv2DOptions() const - { - return type == BuiltinOptions_DepthwiseConv2DOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ConcatEmbeddingsOptionsT *AsConcatEmbeddingsOptions() - { - return type == BuiltinOptions_ConcatEmbeddingsOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ConcatEmbeddingsOptionsT *AsConcatEmbeddingsOptions() const - { - return type == BuiltinOptions_ConcatEmbeddingsOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LSHProjectionOptionsT *AsLSHProjectionOptions() - { - return type == BuiltinOptions_LSHProjectionOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::LSHProjectionOptionsT *AsLSHProjectionOptions() const - { - return type == BuiltinOptions_LSHProjectionOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::Pool2DOptionsT *AsPool2DOptions() - { - return type == BuiltinOptions_Pool2DOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::Pool2DOptionsT *AsPool2DOptions() const - { - return type == BuiltinOptions_Pool2DOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SVDFOptionsT *AsSVDFOptions() - { - return type == BuiltinOptions_SVDFOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::SVDFOptionsT *AsSVDFOptions() const - { - return type == BuiltinOptions_SVDFOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::RNNOptionsT *AsRNNOptions() - { - return type == BuiltinOptions_RNNOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::RNNOptionsT *AsRNNOptions() const - { - return type == BuiltinOptions_RNNOptions ? reinterpret_cast(value) - : nullptr; - } - circle::FullyConnectedOptionsT *AsFullyConnectedOptions() - { - return type == BuiltinOptions_FullyConnectedOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::FullyConnectedOptionsT *AsFullyConnectedOptions() const - { - return type == BuiltinOptions_FullyConnectedOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SoftmaxOptionsT *AsSoftmaxOptions() - { - return type == BuiltinOptions_SoftmaxOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::SoftmaxOptionsT *AsSoftmaxOptions() const - { - return type == BuiltinOptions_SoftmaxOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ConcatenationOptionsT *AsConcatenationOptions() - { - return type == BuiltinOptions_ConcatenationOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ConcatenationOptionsT *AsConcatenationOptions() const - { - return type == BuiltinOptions_ConcatenationOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::AddOptionsT *AsAddOptions() - { - return type == BuiltinOptions_AddOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::AddOptionsT *AsAddOptions() const - { - return type == BuiltinOptions_AddOptions ? reinterpret_cast(value) - : nullptr; - } - circle::L2NormOptionsT *AsL2NormOptions() - { - return type == BuiltinOptions_L2NormOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::L2NormOptionsT *AsL2NormOptions() const - { - return type == BuiltinOptions_L2NormOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LocalResponseNormalizationOptionsT *AsLocalResponseNormalizationOptions() - { - return type == BuiltinOptions_LocalResponseNormalizationOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::LocalResponseNormalizationOptionsT *AsLocalResponseNormalizationOptions() const - { - return type == BuiltinOptions_LocalResponseNormalizationOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LSTMOptionsT *AsLSTMOptions() - { - return type == BuiltinOptions_LSTMOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::LSTMOptionsT *AsLSTMOptions() const - { - return type == BuiltinOptions_LSTMOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ResizeBilinearOptionsT *AsResizeBilinearOptions() - { - return type == BuiltinOptions_ResizeBilinearOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ResizeBilinearOptionsT *AsResizeBilinearOptions() const - { - return type == BuiltinOptions_ResizeBilinearOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::CallOptionsT *AsCallOptions() - { - return type == BuiltinOptions_CallOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::CallOptionsT *AsCallOptions() const - { - return type == BuiltinOptions_CallOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ReshapeOptionsT *AsReshapeOptions() - { - return type == BuiltinOptions_ReshapeOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ReshapeOptionsT *AsReshapeOptions() const - { - return type == BuiltinOptions_ReshapeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SkipGramOptionsT *AsSkipGramOptions() - { - return type == BuiltinOptions_SkipGramOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::SkipGramOptionsT *AsSkipGramOptions() const - { - return type == BuiltinOptions_SkipGramOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SpaceToDepthOptionsT *AsSpaceToDepthOptions() - { - return type == BuiltinOptions_SpaceToDepthOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::SpaceToDepthOptionsT *AsSpaceToDepthOptions() const - { - return type == BuiltinOptions_SpaceToDepthOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::EmbeddingLookupSparseOptionsT *AsEmbeddingLookupSparseOptions() - { - return type == BuiltinOptions_EmbeddingLookupSparseOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::EmbeddingLookupSparseOptionsT *AsEmbeddingLookupSparseOptions() const - { - return type == BuiltinOptions_EmbeddingLookupSparseOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::MulOptionsT *AsMulOptions() - { - return type == BuiltinOptions_MulOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::MulOptionsT *AsMulOptions() const - { - return type == BuiltinOptions_MulOptions ? reinterpret_cast(value) - : nullptr; - } - circle::PadOptionsT *AsPadOptions() - { - return type == BuiltinOptions_PadOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::PadOptionsT *AsPadOptions() const - { - return type == BuiltinOptions_PadOptions ? reinterpret_cast(value) - : nullptr; - } - circle::GatherOptionsT *AsGatherOptions() - { - return type == BuiltinOptions_GatherOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::GatherOptionsT *AsGatherOptions() const - { - return type == BuiltinOptions_GatherOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BatchToSpaceNDOptionsT *AsBatchToSpaceNDOptions() - { - return type == BuiltinOptions_BatchToSpaceNDOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BatchToSpaceNDOptionsT *AsBatchToSpaceNDOptions() const - { - return type == BuiltinOptions_BatchToSpaceNDOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SpaceToBatchNDOptionsT *AsSpaceToBatchNDOptions() - { - return type == BuiltinOptions_SpaceToBatchNDOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::SpaceToBatchNDOptionsT *AsSpaceToBatchNDOptions() const - { - return type == BuiltinOptions_SpaceToBatchNDOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::TransposeOptionsT *AsTransposeOptions() - { - return type == BuiltinOptions_TransposeOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::TransposeOptionsT *AsTransposeOptions() const - { - return type == BuiltinOptions_TransposeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ReducerOptionsT *AsReducerOptions() - { - return type == BuiltinOptions_ReducerOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ReducerOptionsT *AsReducerOptions() const - { - return type == BuiltinOptions_ReducerOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SubOptionsT *AsSubOptions() - { - return type == BuiltinOptions_SubOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::SubOptionsT *AsSubOptions() const - { - return type == BuiltinOptions_SubOptions ? reinterpret_cast(value) - : nullptr; - } - circle::DivOptionsT *AsDivOptions() - { - return type == BuiltinOptions_DivOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::DivOptionsT *AsDivOptions() const - { - return type == BuiltinOptions_DivOptions ? reinterpret_cast(value) - : nullptr; - } - circle::SqueezeOptionsT *AsSqueezeOptions() - { - return type == BuiltinOptions_SqueezeOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::SqueezeOptionsT *AsSqueezeOptions() const - { - return type == BuiltinOptions_SqueezeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SequenceRNNOptionsT *AsSequenceRNNOptions() - { - return type == BuiltinOptions_SequenceRNNOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::SequenceRNNOptionsT *AsSequenceRNNOptions() const - { - return type == BuiltinOptions_SequenceRNNOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::StridedSliceOptionsT *AsStridedSliceOptions() - { - return type == BuiltinOptions_StridedSliceOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::StridedSliceOptionsT *AsStridedSliceOptions() const - { - return type == BuiltinOptions_StridedSliceOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ExpOptionsT *AsExpOptions() - { - return type == BuiltinOptions_ExpOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::ExpOptionsT *AsExpOptions() const - { - return type == BuiltinOptions_ExpOptions ? reinterpret_cast(value) - : nullptr; - } - circle::TopKV2OptionsT *AsTopKV2Options() - { - return type == BuiltinOptions_TopKV2Options ? reinterpret_cast(value) - : nullptr; - } - const circle::TopKV2OptionsT *AsTopKV2Options() const - { - return type == BuiltinOptions_TopKV2Options - ? reinterpret_cast(value) - : nullptr; - } - circle::SplitOptionsT *AsSplitOptions() - { - return type == BuiltinOptions_SplitOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::SplitOptionsT *AsSplitOptions() const - { - return type == BuiltinOptions_SplitOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LogSoftmaxOptionsT *AsLogSoftmaxOptions() - { - return type == BuiltinOptions_LogSoftmaxOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::LogSoftmaxOptionsT *AsLogSoftmaxOptions() const - { - return type == BuiltinOptions_LogSoftmaxOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::CastOptionsT *AsCastOptions() - { - return type == BuiltinOptions_CastOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::CastOptionsT *AsCastOptions() const - { - return type == BuiltinOptions_CastOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::DequantizeOptionsT *AsDequantizeOptions() - { - return type == BuiltinOptions_DequantizeOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::DequantizeOptionsT *AsDequantizeOptions() const - { - return type == BuiltinOptions_DequantizeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::MaximumMinimumOptionsT *AsMaximumMinimumOptions() - { - return type == BuiltinOptions_MaximumMinimumOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::MaximumMinimumOptionsT *AsMaximumMinimumOptions() const - { - return type == BuiltinOptions_MaximumMinimumOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ArgMaxOptionsT *AsArgMaxOptions() - { - return type == BuiltinOptions_ArgMaxOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::ArgMaxOptionsT *AsArgMaxOptions() const - { - return type == BuiltinOptions_ArgMaxOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LessOptionsT *AsLessOptions() - { - return type == BuiltinOptions_LessOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::LessOptionsT *AsLessOptions() const - { - return type == BuiltinOptions_LessOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::NegOptionsT *AsNegOptions() - { - return type == BuiltinOptions_NegOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::NegOptionsT *AsNegOptions() const - { - return type == BuiltinOptions_NegOptions ? reinterpret_cast(value) - : nullptr; - } - circle::PadV2OptionsT *AsPadV2Options() - { - return type == BuiltinOptions_PadV2Options ? reinterpret_cast(value) - : nullptr; - } - const circle::PadV2OptionsT *AsPadV2Options() const - { - return type == BuiltinOptions_PadV2Options - ? reinterpret_cast(value) - : nullptr; - } - circle::GreaterOptionsT *AsGreaterOptions() - { - return type == BuiltinOptions_GreaterOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::GreaterOptionsT *AsGreaterOptions() const - { - return type == BuiltinOptions_GreaterOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::GreaterEqualOptionsT *AsGreaterEqualOptions() - { - return type == BuiltinOptions_GreaterEqualOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::GreaterEqualOptionsT *AsGreaterEqualOptions() const - { - return type == BuiltinOptions_GreaterEqualOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LessEqualOptionsT *AsLessEqualOptions() - { - return type == BuiltinOptions_LessEqualOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::LessEqualOptionsT *AsLessEqualOptions() const - { - return type == BuiltinOptions_LessEqualOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SelectOptionsT *AsSelectOptions() - { - return type == BuiltinOptions_SelectOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::SelectOptionsT *AsSelectOptions() const - { - return type == BuiltinOptions_SelectOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SliceOptionsT *AsSliceOptions() - { - return type == BuiltinOptions_SliceOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::SliceOptionsT *AsSliceOptions() const - { - return type == BuiltinOptions_SliceOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::TransposeConvOptionsT *AsTransposeConvOptions() - { - return type == BuiltinOptions_TransposeConvOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::TransposeConvOptionsT *AsTransposeConvOptions() const - { - return type == BuiltinOptions_TransposeConvOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SparseToDenseOptionsT *AsSparseToDenseOptions() - { - return type == BuiltinOptions_SparseToDenseOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::SparseToDenseOptionsT *AsSparseToDenseOptions() const - { - return type == BuiltinOptions_SparseToDenseOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::TileOptionsT *AsTileOptions() - { - return type == BuiltinOptions_TileOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::TileOptionsT *AsTileOptions() const - { - return type == BuiltinOptions_TileOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ExpandDimsOptionsT *AsExpandDimsOptions() - { - return type == BuiltinOptions_ExpandDimsOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ExpandDimsOptionsT *AsExpandDimsOptions() const - { - return type == BuiltinOptions_ExpandDimsOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::EqualOptionsT *AsEqualOptions() - { - return type == BuiltinOptions_EqualOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::EqualOptionsT *AsEqualOptions() const - { - return type == BuiltinOptions_EqualOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::NotEqualOptionsT *AsNotEqualOptions() - { - return type == BuiltinOptions_NotEqualOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::NotEqualOptionsT *AsNotEqualOptions() const - { - return type == BuiltinOptions_NotEqualOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ShapeOptionsT *AsShapeOptions() - { - return type == BuiltinOptions_ShapeOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::ShapeOptionsT *AsShapeOptions() const - { - return type == BuiltinOptions_ShapeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::PowOptionsT *AsPowOptions() - { - return type == BuiltinOptions_PowOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::PowOptionsT *AsPowOptions() const - { - return type == BuiltinOptions_PowOptions ? reinterpret_cast(value) - : nullptr; - } - circle::ArgMinOptionsT *AsArgMinOptions() - { - return type == BuiltinOptions_ArgMinOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::ArgMinOptionsT *AsArgMinOptions() const - { - return type == BuiltinOptions_ArgMinOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::FakeQuantOptionsT *AsFakeQuantOptions() - { - return type == BuiltinOptions_FakeQuantOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::FakeQuantOptionsT *AsFakeQuantOptions() const - { - return type == BuiltinOptions_FakeQuantOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::PackOptionsT *AsPackOptions() - { - return type == BuiltinOptions_PackOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::PackOptionsT *AsPackOptions() const - { - return type == BuiltinOptions_PackOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LogicalOrOptionsT *AsLogicalOrOptions() - { - return type == BuiltinOptions_LogicalOrOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::LogicalOrOptionsT *AsLogicalOrOptions() const - { - return type == BuiltinOptions_LogicalOrOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::OneHotOptionsT *AsOneHotOptions() - { - return type == BuiltinOptions_OneHotOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::OneHotOptionsT *AsOneHotOptions() const - { - return type == BuiltinOptions_OneHotOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LogicalAndOptionsT *AsLogicalAndOptions() - { - return type == BuiltinOptions_LogicalAndOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::LogicalAndOptionsT *AsLogicalAndOptions() const - { - return type == BuiltinOptions_LogicalAndOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LogicalNotOptionsT *AsLogicalNotOptions() - { - return type == BuiltinOptions_LogicalNotOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::LogicalNotOptionsT *AsLogicalNotOptions() const - { - return type == BuiltinOptions_LogicalNotOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::UnpackOptionsT *AsUnpackOptions() - { - return type == BuiltinOptions_UnpackOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::UnpackOptionsT *AsUnpackOptions() const - { - return type == BuiltinOptions_UnpackOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::FloorDivOptionsT *AsFloorDivOptions() - { - return type == BuiltinOptions_FloorDivOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::FloorDivOptionsT *AsFloorDivOptions() const - { - return type == BuiltinOptions_FloorDivOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SquareOptionsT *AsSquareOptions() - { - return type == BuiltinOptions_SquareOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::SquareOptionsT *AsSquareOptions() const - { - return type == BuiltinOptions_SquareOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ZerosLikeOptionsT *AsZerosLikeOptions() - { - return type == BuiltinOptions_ZerosLikeOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ZerosLikeOptionsT *AsZerosLikeOptions() const - { - return type == BuiltinOptions_ZerosLikeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::FillOptionsT *AsFillOptions() - { - return type == BuiltinOptions_FillOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::FillOptionsT *AsFillOptions() const - { - return type == BuiltinOptions_FillOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BidirectionalSequenceLSTMOptionsT *AsBidirectionalSequenceLSTMOptions() - { - return type == BuiltinOptions_BidirectionalSequenceLSTMOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BidirectionalSequenceLSTMOptionsT *AsBidirectionalSequenceLSTMOptions() const - { - return type == BuiltinOptions_BidirectionalSequenceLSTMOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BidirectionalSequenceRNNOptionsT *AsBidirectionalSequenceRNNOptions() - { - return type == BuiltinOptions_BidirectionalSequenceRNNOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BidirectionalSequenceRNNOptionsT *AsBidirectionalSequenceRNNOptions() const - { - return type == BuiltinOptions_BidirectionalSequenceRNNOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::UnidirectionalSequenceLSTMOptionsT *AsUnidirectionalSequenceLSTMOptions() - { - return type == BuiltinOptions_UnidirectionalSequenceLSTMOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::UnidirectionalSequenceLSTMOptionsT *AsUnidirectionalSequenceLSTMOptions() const - { - return type == BuiltinOptions_UnidirectionalSequenceLSTMOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::FloorModOptionsT *AsFloorModOptions() - { - return type == BuiltinOptions_FloorModOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::FloorModOptionsT *AsFloorModOptions() const - { - return type == BuiltinOptions_FloorModOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::RangeOptionsT *AsRangeOptions() - { - return type == BuiltinOptions_RangeOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::RangeOptionsT *AsRangeOptions() const - { - return type == BuiltinOptions_RangeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ResizeNearestNeighborOptionsT *AsResizeNearestNeighborOptions() - { - return type == BuiltinOptions_ResizeNearestNeighborOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ResizeNearestNeighborOptionsT *AsResizeNearestNeighborOptions() const - { - return type == BuiltinOptions_ResizeNearestNeighborOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::LeakyReluOptionsT *AsLeakyReluOptions() - { - return type == BuiltinOptions_LeakyReluOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::LeakyReluOptionsT *AsLeakyReluOptions() const - { - return type == BuiltinOptions_LeakyReluOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SquaredDifferenceOptionsT *AsSquaredDifferenceOptions() - { - return type == BuiltinOptions_SquaredDifferenceOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::SquaredDifferenceOptionsT *AsSquaredDifferenceOptions() const - { - return type == BuiltinOptions_SquaredDifferenceOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::MirrorPadOptionsT *AsMirrorPadOptions() - { - return type == BuiltinOptions_MirrorPadOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::MirrorPadOptionsT *AsMirrorPadOptions() const - { - return type == BuiltinOptions_MirrorPadOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::AbsOptionsT *AsAbsOptions() - { - return type == BuiltinOptions_AbsOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::AbsOptionsT *AsAbsOptions() const - { - return type == BuiltinOptions_AbsOptions ? reinterpret_cast(value) - : nullptr; - } - circle::SplitVOptionsT *AsSplitVOptions() - { - return type == BuiltinOptions_SplitVOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::SplitVOptionsT *AsSplitVOptions() const - { - return type == BuiltinOptions_SplitVOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::UniqueOptionsT *AsUniqueOptions() - { - return type == BuiltinOptions_UniqueOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::UniqueOptionsT *AsUniqueOptions() const - { - return type == BuiltinOptions_UniqueOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ReverseV2OptionsT *AsReverseV2Options() - { - return type == BuiltinOptions_ReverseV2Options - ? reinterpret_cast(value) - : nullptr; - } - const circle::ReverseV2OptionsT *AsReverseV2Options() const - { - return type == BuiltinOptions_ReverseV2Options - ? reinterpret_cast(value) - : nullptr; - } - circle::AddNOptionsT *AsAddNOptions() - { - return type == BuiltinOptions_AddNOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::AddNOptionsT *AsAddNOptions() const - { - return type == BuiltinOptions_AddNOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::GatherNdOptionsT *AsGatherNdOptions() - { - return type == BuiltinOptions_GatherNdOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::GatherNdOptionsT *AsGatherNdOptions() const - { - return type == BuiltinOptions_GatherNdOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::CosOptionsT *AsCosOptions() - { - return type == BuiltinOptions_CosOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::CosOptionsT *AsCosOptions() const - { - return type == BuiltinOptions_CosOptions ? reinterpret_cast(value) - : nullptr; - } - circle::WhereOptionsT *AsWhereOptions() - { - return type == BuiltinOptions_WhereOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::WhereOptionsT *AsWhereOptions() const - { - return type == BuiltinOptions_WhereOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::RankOptionsT *AsRankOptions() - { - return type == BuiltinOptions_RankOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::RankOptionsT *AsRankOptions() const - { - return type == BuiltinOptions_RankOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ReverseSequenceOptionsT *AsReverseSequenceOptions() - { - return type == BuiltinOptions_ReverseSequenceOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ReverseSequenceOptionsT *AsReverseSequenceOptions() const - { - return type == BuiltinOptions_ReverseSequenceOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::MatrixDiagOptionsT *AsMatrixDiagOptions() - { - return type == BuiltinOptions_MatrixDiagOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::MatrixDiagOptionsT *AsMatrixDiagOptions() const - { - return type == BuiltinOptions_MatrixDiagOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::QuantizeOptionsT *AsQuantizeOptions() - { - return type == BuiltinOptions_QuantizeOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::QuantizeOptionsT *AsQuantizeOptions() const - { - return type == BuiltinOptions_QuantizeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::MatrixSetDiagOptionsT *AsMatrixSetDiagOptions() - { - return type == BuiltinOptions_MatrixSetDiagOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::MatrixSetDiagOptionsT *AsMatrixSetDiagOptions() const - { - return type == BuiltinOptions_MatrixSetDiagOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::HardSwishOptionsT *AsHardSwishOptions() - { - return type == BuiltinOptions_HardSwishOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::HardSwishOptionsT *AsHardSwishOptions() const - { - return type == BuiltinOptions_HardSwishOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::IfOptionsT *AsIfOptions() - { - return type == BuiltinOptions_IfOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::IfOptionsT *AsIfOptions() const - { - return type == BuiltinOptions_IfOptions ? reinterpret_cast(value) - : nullptr; - } - circle::WhileOptionsT *AsWhileOptions() - { - return type == BuiltinOptions_WhileOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::WhileOptionsT *AsWhileOptions() const - { - return type == BuiltinOptions_WhileOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::DepthToSpaceOptionsT *AsDepthToSpaceOptions() - { - return type == BuiltinOptions_DepthToSpaceOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::DepthToSpaceOptionsT *AsDepthToSpaceOptions() const - { - return type == BuiltinOptions_DepthToSpaceOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::NonMaxSuppressionV4OptionsT *AsNonMaxSuppressionV4Options() - { - return type == BuiltinOptions_NonMaxSuppressionV4Options - ? reinterpret_cast(value) - : nullptr; - } - const circle::NonMaxSuppressionV4OptionsT *AsNonMaxSuppressionV4Options() const - { - return type == BuiltinOptions_NonMaxSuppressionV4Options - ? reinterpret_cast(value) - : nullptr; - } - circle::NonMaxSuppressionV5OptionsT *AsNonMaxSuppressionV5Options() - { - return type == BuiltinOptions_NonMaxSuppressionV5Options - ? reinterpret_cast(value) - : nullptr; - } - const circle::NonMaxSuppressionV5OptionsT *AsNonMaxSuppressionV5Options() const - { - return type == BuiltinOptions_NonMaxSuppressionV5Options - ? reinterpret_cast(value) - : nullptr; - } - circle::ScatterNdOptionsT *AsScatterNdOptions() - { - return type == BuiltinOptions_ScatterNdOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ScatterNdOptionsT *AsScatterNdOptions() const - { - return type == BuiltinOptions_ScatterNdOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SelectV2OptionsT *AsSelectV2Options() - { - return type == BuiltinOptions_SelectV2Options - ? reinterpret_cast(value) - : nullptr; - } - const circle::SelectV2OptionsT *AsSelectV2Options() const - { - return type == BuiltinOptions_SelectV2Options - ? reinterpret_cast(value) - : nullptr; - } - circle::DensifyOptionsT *AsDensifyOptions() - { - return type == BuiltinOptions_DensifyOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::DensifyOptionsT *AsDensifyOptions() const - { - return type == BuiltinOptions_DensifyOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::SegmentSumOptionsT *AsSegmentSumOptions() - { - return type == BuiltinOptions_SegmentSumOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::SegmentSumOptionsT *AsSegmentSumOptions() const - { - return type == BuiltinOptions_SegmentSumOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BatchMatMulOptionsT *AsBatchMatMulOptions() - { - return type == BuiltinOptions_BatchMatMulOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BatchMatMulOptionsT *AsBatchMatMulOptions() const - { - return type == BuiltinOptions_BatchMatMulOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::CumsumOptionsT *AsCumsumOptions() - { - return type == BuiltinOptions_CumsumOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::CumsumOptionsT *AsCumsumOptions() const - { - return type == BuiltinOptions_CumsumOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::CallOnceOptionsT *AsCallOnceOptions() - { - return type == BuiltinOptions_CallOnceOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::CallOnceOptionsT *AsCallOnceOptions() const - { - return type == BuiltinOptions_CallOnceOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BroadcastToOptionsT *AsBroadcastToOptions() - { - return type == BuiltinOptions_BroadcastToOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BroadcastToOptionsT *AsBroadcastToOptions() const - { - return type == BuiltinOptions_BroadcastToOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::Rfft2dOptionsT *AsRfft2dOptions() - { - return type == BuiltinOptions_Rfft2dOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::Rfft2dOptionsT *AsRfft2dOptions() const - { - return type == BuiltinOptions_Rfft2dOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::Conv3DOptionsT *AsConv3DOptions() - { - return type == BuiltinOptions_Conv3DOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::Conv3DOptionsT *AsConv3DOptions() const - { - return type == BuiltinOptions_Conv3DOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::HashtableOptionsT *AsHashtableOptions() - { - return type == BuiltinOptions_HashtableOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::HashtableOptionsT *AsHashtableOptions() const - { - return type == BuiltinOptions_HashtableOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::HashtableFindOptionsT *AsHashtableFindOptions() - { - return type == BuiltinOptions_HashtableFindOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::HashtableFindOptionsT *AsHashtableFindOptions() const - { - return type == BuiltinOptions_HashtableFindOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::HashtableImportOptionsT *AsHashtableImportOptions() - { - return type == BuiltinOptions_HashtableImportOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::HashtableImportOptionsT *AsHashtableImportOptions() const - { - return type == BuiltinOptions_HashtableImportOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::HashtableSizeOptionsT *AsHashtableSizeOptions() - { - return type == BuiltinOptions_HashtableSizeOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::HashtableSizeOptionsT *AsHashtableSizeOptions() const - { - return type == BuiltinOptions_HashtableSizeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::VarHandleOptionsT *AsVarHandleOptions() - { - return type == BuiltinOptions_VarHandleOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::VarHandleOptionsT *AsVarHandleOptions() const - { - return type == BuiltinOptions_VarHandleOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ReadVariableOptionsT *AsReadVariableOptions() - { - return type == BuiltinOptions_ReadVariableOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::ReadVariableOptionsT *AsReadVariableOptions() const - { - return type == BuiltinOptions_ReadVariableOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::AssignVariableOptionsT *AsAssignVariableOptions() - { - return type == BuiltinOptions_AssignVariableOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::AssignVariableOptionsT *AsAssignVariableOptions() const - { - return type == BuiltinOptions_AssignVariableOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::RandomOptionsT *AsRandomOptions() - { - return type == BuiltinOptions_RandomOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::RandomOptionsT *AsRandomOptions() const - { - return type == BuiltinOptions_RandomOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BucketizeOptionsT *AsBucketizeOptions() - { - return type == BuiltinOptions_BucketizeOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BucketizeOptionsT *AsBucketizeOptions() const - { - return type == BuiltinOptions_BucketizeOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::GeluOptionsT *AsGeluOptions() - { - return type == BuiltinOptions_GeluOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::GeluOptionsT *AsGeluOptions() const - { - return type == BuiltinOptions_GeluOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::DynamicUpdateSliceOptionsT *AsDynamicUpdateSliceOptions() - { - return type == BuiltinOptions_DynamicUpdateSliceOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::DynamicUpdateSliceOptionsT *AsDynamicUpdateSliceOptions() const - { - return type == BuiltinOptions_DynamicUpdateSliceOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::UnsortedSegmentProdOptionsT *AsUnsortedSegmentProdOptions() - { - return type == BuiltinOptions_UnsortedSegmentProdOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::UnsortedSegmentProdOptionsT *AsUnsortedSegmentProdOptions() const - { - return type == BuiltinOptions_UnsortedSegmentProdOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::UnsortedSegmentMaxOptionsT *AsUnsortedSegmentMaxOptions() - { - return type == BuiltinOptions_UnsortedSegmentMaxOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::UnsortedSegmentMaxOptionsT *AsUnsortedSegmentMaxOptions() const - { - return type == BuiltinOptions_UnsortedSegmentMaxOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::UnsortedSegmentMinOptionsT *AsUnsortedSegmentMinOptions() - { - return type == BuiltinOptions_UnsortedSegmentMinOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::UnsortedSegmentMinOptionsT *AsUnsortedSegmentMinOptions() const - { - return type == BuiltinOptions_UnsortedSegmentMinOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::UnsortedSegmentSumOptionsT *AsUnsortedSegmentSumOptions() - { - return type == BuiltinOptions_UnsortedSegmentSumOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::UnsortedSegmentSumOptionsT *AsUnsortedSegmentSumOptions() const - { - return type == BuiltinOptions_UnsortedSegmentSumOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::ATan2OptionsT *AsATan2Options() - { - return type == BuiltinOptions_ATan2Options ? reinterpret_cast(value) - : nullptr; - } - const circle::ATan2OptionsT *AsATan2Options() const - { - return type == BuiltinOptions_ATan2Options - ? reinterpret_cast(value) - : nullptr; - } - circle::SignOptionsT *AsSignOptions() - { - return type == BuiltinOptions_SignOptions ? reinterpret_cast(value) - : nullptr; - } - const circle::SignOptionsT *AsSignOptions() const - { - return type == BuiltinOptions_SignOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BitcastOptionsT *AsBitcastOptions() - { - return type == BuiltinOptions_BitcastOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BitcastOptionsT *AsBitcastOptions() const - { - return type == BuiltinOptions_BitcastOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BitwiseXorOptionsT *AsBitwiseXorOptions() - { - return type == BuiltinOptions_BitwiseXorOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BitwiseXorOptionsT *AsBitwiseXorOptions() const - { - return type == BuiltinOptions_BitwiseXorOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::RightShiftOptionsT *AsRightShiftOptions() - { - return type == BuiltinOptions_RightShiftOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::RightShiftOptionsT *AsRightShiftOptions() const - { - return type == BuiltinOptions_RightShiftOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BCQGatherOptionsT *AsBCQGatherOptions() - { - return type == BuiltinOptions_BCQGatherOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BCQGatherOptionsT *AsBCQGatherOptions() const - { - return type == BuiltinOptions_BCQGatherOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::BCQFullyConnectedOptionsT *AsBCQFullyConnectedOptions() - { - return type == BuiltinOptions_BCQFullyConnectedOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::BCQFullyConnectedOptionsT *AsBCQFullyConnectedOptions() const - { - return type == BuiltinOptions_BCQFullyConnectedOptions - ? reinterpret_cast(value) - : nullptr; - } - circle::InstanceNormOptionsT *AsInstanceNormOptions() - { - return type == BuiltinOptions_InstanceNormOptions - ? reinterpret_cast(value) - : nullptr; - } - const circle::InstanceNormOptionsT *AsInstanceNormOptions() const - { - return type == BuiltinOptions_InstanceNormOptions - ? reinterpret_cast(value) - : nullptr; - } -}; - -bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *obj, BuiltinOptions type); -bool VerifyBuiltinOptionsVector(flatbuffers::Verifier &verifier, - const flatbuffers::Vector> *values, - const flatbuffers::Vector *types); - -enum Padding : int8_t -{ - Padding_SAME = 0, - Padding_VALID = 1, - Padding_MIN = Padding_SAME, - Padding_MAX = Padding_VALID -}; - -inline const Padding (&EnumValuesPadding())[2] -{ - static const Padding values[] = {Padding_SAME, Padding_VALID}; - return values; -} - -inline const char *const *EnumNamesPadding() -{ - static const char *const names[3] = {"SAME", "VALID", nullptr}; - return names; -} - -inline const char *EnumNamePadding(Padding e) -{ - if (flatbuffers::IsOutRange(e, Padding_SAME, Padding_VALID)) - return ""; - const size_t index = static_cast(e); - return EnumNamesPadding()[index]; -} - -enum ActivationFunctionType : int8_t -{ - ActivationFunctionType_NONE = 0, - ActivationFunctionType_RELU = 1, - ActivationFunctionType_RELU_N1_TO_1 = 2, - ActivationFunctionType_RELU6 = 3, - ActivationFunctionType_TANH = 4, - ActivationFunctionType_SIGN_BIT = 5, - ActivationFunctionType_MIN = ActivationFunctionType_NONE, - ActivationFunctionType_MAX = ActivationFunctionType_SIGN_BIT -}; - -inline const ActivationFunctionType (&EnumValuesActivationFunctionType())[6] -{ - static const ActivationFunctionType values[] = { - ActivationFunctionType_NONE, ActivationFunctionType_RELU, ActivationFunctionType_RELU_N1_TO_1, - ActivationFunctionType_RELU6, ActivationFunctionType_TANH, ActivationFunctionType_SIGN_BIT}; - return values; -} - -inline const char *const *EnumNamesActivationFunctionType() -{ - static const char *const names[7] = {"NONE", "RELU", "RELU_N1_TO_1", "RELU6", - "TANH", "SIGN_BIT", nullptr}; - return names; -} - -inline const char *EnumNameActivationFunctionType(ActivationFunctionType e) -{ - if (flatbuffers::IsOutRange(e, ActivationFunctionType_NONE, ActivationFunctionType_SIGN_BIT)) - return ""; - const size_t index = static_cast(e); - return EnumNamesActivationFunctionType()[index]; -} - -enum LSHProjectionType : int8_t -{ - LSHProjectionType_UNKNOWN = 0, - LSHProjectionType_SPARSE = 1, - LSHProjectionType_DENSE = 2, - LSHProjectionType_MIN = LSHProjectionType_UNKNOWN, - LSHProjectionType_MAX = LSHProjectionType_DENSE -}; - -inline const LSHProjectionType (&EnumValuesLSHProjectionType())[3] -{ - static const LSHProjectionType values[] = {LSHProjectionType_UNKNOWN, LSHProjectionType_SPARSE, - LSHProjectionType_DENSE}; - return values; -} - -inline const char *const *EnumNamesLSHProjectionType() -{ - static const char *const names[4] = {"UNKNOWN", "SPARSE", "DENSE", nullptr}; - return names; -} - -inline const char *EnumNameLSHProjectionType(LSHProjectionType e) -{ - if (flatbuffers::IsOutRange(e, LSHProjectionType_UNKNOWN, LSHProjectionType_DENSE)) - return ""; - const size_t index = static_cast(e); - return EnumNamesLSHProjectionType()[index]; -} +#endif // FLATBUFFERS_CPP98_STL -enum FullyConnectedOptionsWeightsFormat : int8_t -{ - FullyConnectedOptionsWeightsFormat_DEFAULT = 0, - FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8 = 1, - FullyConnectedOptionsWeightsFormat_SHUFFLED16x1FLOAT32 = 127, - FullyConnectedOptionsWeightsFormat_MIN = FullyConnectedOptionsWeightsFormat_DEFAULT, - FullyConnectedOptionsWeightsFormat_MAX = FullyConnectedOptionsWeightsFormat_SHUFFLED16x1FLOAT32 -}; - -inline const FullyConnectedOptionsWeightsFormat (&EnumValuesFullyConnectedOptionsWeightsFormat())[3] -{ - static const FullyConnectedOptionsWeightsFormat values[] = { - FullyConnectedOptionsWeightsFormat_DEFAULT, FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8, - FullyConnectedOptionsWeightsFormat_SHUFFLED16x1FLOAT32}; - return values; -} + static void *UnPack(const void *obj, BuiltinOptions type, const flatbuffers::resolver_function_t *resolver); + flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; -inline const char *EnumNameFullyConnectedOptionsWeightsFormat(FullyConnectedOptionsWeightsFormat e) -{ - switch (e) - { - case FullyConnectedOptionsWeightsFormat_DEFAULT: - return "DEFAULT"; - case FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8: - return "SHUFFLED4x16INT8"; - case FullyConnectedOptionsWeightsFormat_SHUFFLED16x1FLOAT32: - return "SHUFFLED16x1FLOAT32"; - default: - return ""; + circle::Conv2DOptionsT *AsConv2DOptions() { + return type == BuiltinOptions_Conv2DOptions ? + reinterpret_cast(value) : nullptr; } -} - -enum LSTMKernelType : int8_t -{ - LSTMKernelType_FULL = 0, - LSTMKernelType_BASIC = 1, - LSTMKernelType_MIN = LSTMKernelType_FULL, - LSTMKernelType_MAX = LSTMKernelType_BASIC -}; - -inline const LSTMKernelType (&EnumValuesLSTMKernelType())[2] -{ - static const LSTMKernelType values[] = {LSTMKernelType_FULL, LSTMKernelType_BASIC}; - return values; -} - -inline const char *const *EnumNamesLSTMKernelType() -{ - static const char *const names[3] = {"FULL", "BASIC", nullptr}; - return names; -} - -inline const char *EnumNameLSTMKernelType(LSTMKernelType e) -{ - if (flatbuffers::IsOutRange(e, LSTMKernelType_FULL, LSTMKernelType_BASIC)) - return ""; - const size_t index = static_cast(e); - return EnumNamesLSTMKernelType()[index]; -} - -enum CombinerType : int8_t -{ - CombinerType_SUM = 0, - CombinerType_MEAN = 1, - CombinerType_SQRTN = 2, - CombinerType_MIN = CombinerType_SUM, - CombinerType_MAX = CombinerType_SQRTN -}; - -inline const CombinerType (&EnumValuesCombinerType())[3] -{ - static const CombinerType values[] = {CombinerType_SUM, CombinerType_MEAN, CombinerType_SQRTN}; - return values; -} - -inline const char *const *EnumNamesCombinerType() -{ - static const char *const names[4] = {"SUM", "MEAN", "SQRTN", nullptr}; - return names; -} - -inline const char *EnumNameCombinerType(CombinerType e) -{ - if (flatbuffers::IsOutRange(e, CombinerType_SUM, CombinerType_SQRTN)) - return ""; - const size_t index = static_cast(e); - return EnumNamesCombinerType()[index]; -} - -enum MirrorPadMode : int8_t -{ - MirrorPadMode_REFLECT = 0, - MirrorPadMode_SYMMETRIC = 1, - MirrorPadMode_MIN = MirrorPadMode_REFLECT, - MirrorPadMode_MAX = MirrorPadMode_SYMMETRIC -}; - -inline const MirrorPadMode (&EnumValuesMirrorPadMode())[2] -{ - static const MirrorPadMode values[] = {MirrorPadMode_REFLECT, MirrorPadMode_SYMMETRIC}; - return values; -} - -inline const char *const *EnumNamesMirrorPadMode() -{ - static const char *const names[3] = {"REFLECT", "SYMMETRIC", nullptr}; - return names; -} - -inline const char *EnumNameMirrorPadMode(MirrorPadMode e) -{ - if (flatbuffers::IsOutRange(e, MirrorPadMode_REFLECT, MirrorPadMode_SYMMETRIC)) - return ""; - const size_t index = static_cast(e); - return EnumNamesMirrorPadMode()[index]; -} - -enum CustomOptionsFormat : int8_t -{ - CustomOptionsFormat_FLEXBUFFERS = 0, - CustomOptionsFormat_MIN = CustomOptionsFormat_FLEXBUFFERS, - CustomOptionsFormat_MAX = CustomOptionsFormat_FLEXBUFFERS -}; - -inline const CustomOptionsFormat (&EnumValuesCustomOptionsFormat())[1] -{ - static const CustomOptionsFormat values[] = {CustomOptionsFormat_FLEXBUFFERS}; - return values; -} - -inline const char *const *EnumNamesCustomOptionsFormat() -{ - static const char *const names[2] = {"FLEXBUFFERS", nullptr}; - return names; -} - -inline const char *EnumNameCustomOptionsFormat(CustomOptionsFormat e) -{ - if (flatbuffers::IsOutRange(e, CustomOptionsFormat_FLEXBUFFERS, CustomOptionsFormat_FLEXBUFFERS)) - return ""; - const size_t index = static_cast(e); - return EnumNamesCustomOptionsFormat()[index]; -} - -enum DataFormat : int8_t -{ - DataFormat_CHANNELS_LAST = 0, - DataFormat_CHANNELS_FIRST = 1, - DataFormat_MIN = DataFormat_CHANNELS_LAST, - DataFormat_MAX = DataFormat_CHANNELS_FIRST -}; - -inline const DataFormat (&EnumValuesDataFormat())[2] -{ - static const DataFormat values[] = {DataFormat_CHANNELS_LAST, DataFormat_CHANNELS_FIRST}; - return values; -} - -inline const char *const *EnumNamesDataFormat() -{ - static const char *const names[3] = {"CHANNELS_LAST", "CHANNELS_FIRST", nullptr}; - return names; -} - -inline const char *EnumNameDataFormat(DataFormat e) -{ - if (flatbuffers::IsOutRange(e, DataFormat_CHANNELS_LAST, DataFormat_CHANNELS_FIRST)) - return ""; - const size_t index = static_cast(e); - return EnumNamesDataFormat()[index]; -} - -struct CustomQuantizationT : public flatbuffers::NativeTable -{ - typedef CustomQuantization TableType; - std::vector custom{}; -}; - -struct CustomQuantization FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef CustomQuantizationT NativeTableType; - typedef CustomQuantizationBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_CUSTOM = 4 - }; - const flatbuffers::Vector *custom() const - { - return GetPointer *>(VT_CUSTOM); + const circle::Conv2DOptionsT *AsConv2DOptions() const { + return type == BuiltinOptions_Conv2DOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_CUSTOM) && - verifier.VerifyVector(custom()) && verifier.EndTable(); + circle::DepthwiseConv2DOptionsT *AsDepthwiseConv2DOptions() { + return type == BuiltinOptions_DepthwiseConv2DOptions ? + reinterpret_cast(value) : nullptr; } - CustomQuantizationT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(CustomQuantizationT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const CustomQuantizationT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct CustomQuantizationBuilder -{ - typedef CustomQuantization Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_custom(flatbuffers::Offset> custom) - { - fbb_.AddOffset(CustomQuantization::VT_CUSTOM, custom); + const circle::DepthwiseConv2DOptionsT *AsDepthwiseConv2DOptions() const { + return type == BuiltinOptions_DepthwiseConv2DOptions ? + reinterpret_cast(value) : nullptr; } - explicit CustomQuantizationBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::ConcatEmbeddingsOptionsT *AsConcatEmbeddingsOptions() { + return type == BuiltinOptions_ConcatEmbeddingsOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::ConcatEmbeddingsOptionsT *AsConcatEmbeddingsOptions() const { + return type == BuiltinOptions_ConcatEmbeddingsOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset -CreateCustomQuantization(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> custom = 0) -{ - CustomQuantizationBuilder builder_(_fbb); - builder_.add_custom(custom); - return builder_.Finish(); -} - -inline flatbuffers::Offset -CreateCustomQuantizationDirect(flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *custom = nullptr) -{ - if (custom) - { - _fbb.ForceVectorAlignment(custom->size(), sizeof(uint8_t), 16); + circle::LSHProjectionOptionsT *AsLSHProjectionOptions() { + return type == BuiltinOptions_LSHProjectionOptions ? + reinterpret_cast(value) : nullptr; } - auto custom__ = custom ? _fbb.CreateVector(*custom) : 0; - return circle::CreateCustomQuantization(_fbb, custom__); -} - -flatbuffers::Offset -CreateCustomQuantization(flatbuffers::FlatBufferBuilder &_fbb, const CustomQuantizationT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct QuantizationParametersT : public flatbuffers::NativeTable -{ - typedef QuantizationParameters TableType; - std::vector min{}; - std::vector max{}; - std::vector scale{}; - std::vector zero_point{}; - circle::QuantizationDetailsUnion details{}; - int32_t quantized_dimension = 0; -}; - -struct QuantizationParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef QuantizationParametersT NativeTableType; - typedef QuantizationParametersBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_MIN = 4, - VT_MAX = 6, - VT_SCALE = 8, - VT_ZERO_POINT = 10, - VT_DETAILS_TYPE = 12, - VT_DETAILS = 14, - VT_QUANTIZED_DIMENSION = 16 - }; - const flatbuffers::Vector *min() const - { - return GetPointer *>(VT_MIN); + const circle::LSHProjectionOptionsT *AsLSHProjectionOptions() const { + return type == BuiltinOptions_LSHProjectionOptions ? + reinterpret_cast(value) : nullptr; } - const flatbuffers::Vector *max() const - { - return GetPointer *>(VT_MAX); + circle::Pool2DOptionsT *AsPool2DOptions() { + return type == BuiltinOptions_Pool2DOptions ? + reinterpret_cast(value) : nullptr; } - const flatbuffers::Vector *scale() const - { - return GetPointer *>(VT_SCALE); + const circle::Pool2DOptionsT *AsPool2DOptions() const { + return type == BuiltinOptions_Pool2DOptions ? + reinterpret_cast(value) : nullptr; } - const flatbuffers::Vector *zero_point() const - { - return GetPointer *>(VT_ZERO_POINT); + circle::SVDFOptionsT *AsSVDFOptions() { + return type == BuiltinOptions_SVDFOptions ? + reinterpret_cast(value) : nullptr; } - circle::QuantizationDetails details_type() const - { - return static_cast(GetField(VT_DETAILS_TYPE, 0)); + const circle::SVDFOptionsT *AsSVDFOptions() const { + return type == BuiltinOptions_SVDFOptions ? + reinterpret_cast(value) : nullptr; } - const void *details() const { return GetPointer(VT_DETAILS); } - template const T *details_as() const; - const circle::CustomQuantization *details_as_CustomQuantization() const - { - return details_type() == circle::QuantizationDetails_CustomQuantization - ? static_cast(details()) - : nullptr; - } - int32_t quantized_dimension() const { return GetField(VT_QUANTIZED_DIMENSION, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_MIN) && - verifier.VerifyVector(min()) && VerifyOffset(verifier, VT_MAX) && - verifier.VerifyVector(max()) && VerifyOffset(verifier, VT_SCALE) && - verifier.VerifyVector(scale()) && VerifyOffset(verifier, VT_ZERO_POINT) && - verifier.VerifyVector(zero_point()) && VerifyField(verifier, VT_DETAILS_TYPE) && - VerifyOffset(verifier, VT_DETAILS) && - VerifyQuantizationDetails(verifier, details(), details_type()) && - VerifyField(verifier, VT_QUANTIZED_DIMENSION) && verifier.EndTable(); + circle::RNNOptionsT *AsRNNOptions() { + return type == BuiltinOptions_RNNOptions ? + reinterpret_cast(value) : nullptr; } - QuantizationParametersT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(QuantizationParametersT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizationParametersT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -template <> -inline const circle::CustomQuantization * -QuantizationParameters::details_as() const -{ - return details_as_CustomQuantization(); -} - -struct QuantizationParametersBuilder -{ - typedef QuantizationParameters Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_min(flatbuffers::Offset> min) - { - fbb_.AddOffset(QuantizationParameters::VT_MIN, min); + const circle::RNNOptionsT *AsRNNOptions() const { + return type == BuiltinOptions_RNNOptions ? + reinterpret_cast(value) : nullptr; } - void add_max(flatbuffers::Offset> max) - { - fbb_.AddOffset(QuantizationParameters::VT_MAX, max); + circle::FullyConnectedOptionsT *AsFullyConnectedOptions() { + return type == BuiltinOptions_FullyConnectedOptions ? + reinterpret_cast(value) : nullptr; } - void add_scale(flatbuffers::Offset> scale) - { - fbb_.AddOffset(QuantizationParameters::VT_SCALE, scale); + const circle::FullyConnectedOptionsT *AsFullyConnectedOptions() const { + return type == BuiltinOptions_FullyConnectedOptions ? + reinterpret_cast(value) : nullptr; } - void add_zero_point(flatbuffers::Offset> zero_point) - { - fbb_.AddOffset(QuantizationParameters::VT_ZERO_POINT, zero_point); + circle::SoftmaxOptionsT *AsSoftmaxOptions() { + return type == BuiltinOptions_SoftmaxOptions ? + reinterpret_cast(value) : nullptr; } - void add_details_type(circle::QuantizationDetails details_type) - { - fbb_.AddElement(QuantizationParameters::VT_DETAILS_TYPE, - static_cast(details_type), 0); + const circle::SoftmaxOptionsT *AsSoftmaxOptions() const { + return type == BuiltinOptions_SoftmaxOptions ? + reinterpret_cast(value) : nullptr; } - void add_details(flatbuffers::Offset details) - { - fbb_.AddOffset(QuantizationParameters::VT_DETAILS, details); + circle::ConcatenationOptionsT *AsConcatenationOptions() { + return type == BuiltinOptions_ConcatenationOptions ? + reinterpret_cast(value) : nullptr; } - void add_quantized_dimension(int32_t quantized_dimension) - { - fbb_.AddElement(QuantizationParameters::VT_QUANTIZED_DIMENSION, quantized_dimension, - 0); + const circle::ConcatenationOptionsT *AsConcatenationOptions() const { + return type == BuiltinOptions_ConcatenationOptions ? + reinterpret_cast(value) : nullptr; } - explicit QuantizationParametersBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::AddOptionsT *AsAddOptions() { + return type == BuiltinOptions_AddOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::AddOptionsT *AsAddOptions() const { + return type == BuiltinOptions_AddOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateQuantizationParameters( - flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset> min = 0, - flatbuffers::Offset> max = 0, - flatbuffers::Offset> scale = 0, - flatbuffers::Offset> zero_point = 0, - circle::QuantizationDetails details_type = circle::QuantizationDetails_NONE, - flatbuffers::Offset details = 0, int32_t quantized_dimension = 0) -{ - QuantizationParametersBuilder builder_(_fbb); - builder_.add_quantized_dimension(quantized_dimension); - builder_.add_details(details); - builder_.add_zero_point(zero_point); - builder_.add_scale(scale); - builder_.add_max(max); - builder_.add_min(min); - builder_.add_details_type(details_type); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateQuantizationParametersDirect( - flatbuffers::FlatBufferBuilder &_fbb, const std::vector *min = nullptr, - const std::vector *max = nullptr, const std::vector *scale = nullptr, - const std::vector *zero_point = nullptr, - circle::QuantizationDetails details_type = circle::QuantizationDetails_NONE, - flatbuffers::Offset details = 0, int32_t quantized_dimension = 0) -{ - auto min__ = min ? _fbb.CreateVector(*min) : 0; - auto max__ = max ? _fbb.CreateVector(*max) : 0; - auto scale__ = scale ? _fbb.CreateVector(*scale) : 0; - auto zero_point__ = zero_point ? _fbb.CreateVector(*zero_point) : 0; - return circle::CreateQuantizationParameters(_fbb, min__, max__, scale__, zero_point__, - details_type, details, quantized_dimension); -} - -flatbuffers::Offset -CreateQuantizationParameters(flatbuffers::FlatBufferBuilder &_fbb, - const QuantizationParametersT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct Int32VectorT : public flatbuffers::NativeTable -{ - typedef Int32Vector TableType; - std::vector values{}; -}; - -struct Int32Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef Int32VectorT NativeTableType; - typedef Int32VectorBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_VALUES = 4 - }; - const flatbuffers::Vector *values() const - { - return GetPointer *>(VT_VALUES); + circle::L2NormOptionsT *AsL2NormOptions() { + return type == BuiltinOptions_L2NormOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_VALUES) && - verifier.VerifyVector(values()) && verifier.EndTable(); + const circle::L2NormOptionsT *AsL2NormOptions() const { + return type == BuiltinOptions_L2NormOptions ? + reinterpret_cast(value) : nullptr; } - Int32VectorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(Int32VectorT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const Int32VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct Int32VectorBuilder -{ - typedef Int32Vector Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_values(flatbuffers::Offset> values) - { - fbb_.AddOffset(Int32Vector::VT_VALUES, values); + circle::LocalResponseNormalizationOptionsT *AsLocalResponseNormalizationOptions() { + return type == BuiltinOptions_LocalResponseNormalizationOptions ? + reinterpret_cast(value) : nullptr; } - explicit Int32VectorBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::LocalResponseNormalizationOptionsT *AsLocalResponseNormalizationOptions() const { + return type == BuiltinOptions_LocalResponseNormalizationOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::LSTMOptionsT *AsLSTMOptions() { + return type == BuiltinOptions_LSTMOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset -CreateInt32Vector(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> values = 0) -{ - Int32VectorBuilder builder_(_fbb); - builder_.add_values(values); - return builder_.Finish(); -} - -inline flatbuffers::Offset -CreateInt32VectorDirect(flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *values = nullptr) -{ - auto values__ = values ? _fbb.CreateVector(*values) : 0; - return circle::CreateInt32Vector(_fbb, values__); -} - -flatbuffers::Offset -CreateInt32Vector(flatbuffers::FlatBufferBuilder &_fbb, const Int32VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct Uint16VectorT : public flatbuffers::NativeTable -{ - typedef Uint16Vector TableType; - std::vector values{}; -}; - -struct Uint16Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef Uint16VectorT NativeTableType; - typedef Uint16VectorBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_VALUES = 4 - }; - const flatbuffers::Vector *values() const - { - return GetPointer *>(VT_VALUES); + const circle::LSTMOptionsT *AsLSTMOptions() const { + return type == BuiltinOptions_LSTMOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_VALUES) && - verifier.VerifyVector(values()) && verifier.EndTable(); + circle::ResizeBilinearOptionsT *AsResizeBilinearOptions() { + return type == BuiltinOptions_ResizeBilinearOptions ? + reinterpret_cast(value) : nullptr; } - Uint16VectorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(Uint16VectorT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const Uint16VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct Uint16VectorBuilder -{ - typedef Uint16Vector Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_values(flatbuffers::Offset> values) - { - fbb_.AddOffset(Uint16Vector::VT_VALUES, values); + const circle::ResizeBilinearOptionsT *AsResizeBilinearOptions() const { + return type == BuiltinOptions_ResizeBilinearOptions ? + reinterpret_cast(value) : nullptr; } - explicit Uint16VectorBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::CallOptionsT *AsCallOptions() { + return type == BuiltinOptions_CallOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::CallOptionsT *AsCallOptions() const { + return type == BuiltinOptions_CallOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset -CreateUint16Vector(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> values = 0) -{ - Uint16VectorBuilder builder_(_fbb); - builder_.add_values(values); - return builder_.Finish(); -} - -inline flatbuffers::Offset -CreateUint16VectorDirect(flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *values = nullptr) -{ - if (values) - { - _fbb.ForceVectorAlignment(values->size(), sizeof(uint16_t), 4); + circle::ReshapeOptionsT *AsReshapeOptions() { + return type == BuiltinOptions_ReshapeOptions ? + reinterpret_cast(value) : nullptr; } - auto values__ = values ? _fbb.CreateVector(*values) : 0; - return circle::CreateUint16Vector(_fbb, values__); -} - -flatbuffers::Offset -CreateUint16Vector(flatbuffers::FlatBufferBuilder &_fbb, const Uint16VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct Uint8VectorT : public flatbuffers::NativeTable -{ - typedef Uint8Vector TableType; - std::vector values{}; -}; - -struct Uint8Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef Uint8VectorT NativeTableType; - typedef Uint8VectorBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_VALUES = 4 - }; - const flatbuffers::Vector *values() const - { - return GetPointer *>(VT_VALUES); + const circle::ReshapeOptionsT *AsReshapeOptions() const { + return type == BuiltinOptions_ReshapeOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_VALUES) && - verifier.VerifyVector(values()) && verifier.EndTable(); + circle::SkipGramOptionsT *AsSkipGramOptions() { + return type == BuiltinOptions_SkipGramOptions ? + reinterpret_cast(value) : nullptr; } - Uint8VectorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(Uint8VectorT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const Uint8VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct Uint8VectorBuilder -{ - typedef Uint8Vector Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_values(flatbuffers::Offset> values) - { - fbb_.AddOffset(Uint8Vector::VT_VALUES, values); + const circle::SkipGramOptionsT *AsSkipGramOptions() const { + return type == BuiltinOptions_SkipGramOptions ? + reinterpret_cast(value) : nullptr; } - explicit Uint8VectorBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::SpaceToDepthOptionsT *AsSpaceToDepthOptions() { + return type == BuiltinOptions_SpaceToDepthOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::SpaceToDepthOptionsT *AsSpaceToDepthOptions() const { + return type == BuiltinOptions_SpaceToDepthOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset -CreateUint8Vector(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> values = 0) -{ - Uint8VectorBuilder builder_(_fbb); - builder_.add_values(values); - return builder_.Finish(); -} - -inline flatbuffers::Offset -CreateUint8VectorDirect(flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *values = nullptr) -{ - if (values) - { - _fbb.ForceVectorAlignment(values->size(), sizeof(uint8_t), 4); + circle::EmbeddingLookupSparseOptionsT *AsEmbeddingLookupSparseOptions() { + return type == BuiltinOptions_EmbeddingLookupSparseOptions ? + reinterpret_cast(value) : nullptr; } - auto values__ = values ? _fbb.CreateVector(*values) : 0; - return circle::CreateUint8Vector(_fbb, values__); -} - -flatbuffers::Offset -CreateUint8Vector(flatbuffers::FlatBufferBuilder &_fbb, const Uint8VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct DimensionMetadataT : public flatbuffers::NativeTable -{ - typedef DimensionMetadata TableType; - circle::DimensionType format = circle::DimensionType_DENSE; - int32_t dense_size = 0; - circle::SparseIndexVectorUnion array_segments{}; - circle::SparseIndexVectorUnion array_indices{}; -}; - -struct DimensionMetadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef DimensionMetadataT NativeTableType; - typedef DimensionMetadataBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FORMAT = 4, - VT_DENSE_SIZE = 6, - VT_ARRAY_SEGMENTS_TYPE = 8, - VT_ARRAY_SEGMENTS = 10, - VT_ARRAY_INDICES_TYPE = 12, - VT_ARRAY_INDICES = 14 - }; - circle::DimensionType format() const - { - return static_cast(GetField(VT_FORMAT, 0)); + const circle::EmbeddingLookupSparseOptionsT *AsEmbeddingLookupSparseOptions() const { + return type == BuiltinOptions_EmbeddingLookupSparseOptions ? + reinterpret_cast(value) : nullptr; } - int32_t dense_size() const { return GetField(VT_DENSE_SIZE, 0); } - circle::SparseIndexVector array_segments_type() const - { - return static_cast(GetField(VT_ARRAY_SEGMENTS_TYPE, 0)); + circle::MulOptionsT *AsMulOptions() { + return type == BuiltinOptions_MulOptions ? + reinterpret_cast(value) : nullptr; } - const void *array_segments() const { return GetPointer(VT_ARRAY_SEGMENTS); } - template const T *array_segments_as() const; - const circle::Int32Vector *array_segments_as_Int32Vector() const - { - return array_segments_type() == circle::SparseIndexVector_Int32Vector - ? static_cast(array_segments()) - : nullptr; - } - const circle::Uint16Vector *array_segments_as_Uint16Vector() const - { - return array_segments_type() == circle::SparseIndexVector_Uint16Vector - ? static_cast(array_segments()) - : nullptr; - } - const circle::Uint8Vector *array_segments_as_Uint8Vector() const - { - return array_segments_type() == circle::SparseIndexVector_Uint8Vector - ? static_cast(array_segments()) - : nullptr; - } - circle::SparseIndexVector array_indices_type() const - { - return static_cast(GetField(VT_ARRAY_INDICES_TYPE, 0)); + const circle::MulOptionsT *AsMulOptions() const { + return type == BuiltinOptions_MulOptions ? + reinterpret_cast(value) : nullptr; } - const void *array_indices() const { return GetPointer(VT_ARRAY_INDICES); } - template const T *array_indices_as() const; - const circle::Int32Vector *array_indices_as_Int32Vector() const - { - return array_indices_type() == circle::SparseIndexVector_Int32Vector - ? static_cast(array_indices()) - : nullptr; - } - const circle::Uint16Vector *array_indices_as_Uint16Vector() const - { - return array_indices_type() == circle::SparseIndexVector_Uint16Vector - ? static_cast(array_indices()) - : nullptr; - } - const circle::Uint8Vector *array_indices_as_Uint8Vector() const - { - return array_indices_type() == circle::SparseIndexVector_Uint8Vector - ? static_cast(array_indices()) - : nullptr; - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_FORMAT) && - VerifyField(verifier, VT_DENSE_SIZE) && - VerifyField(verifier, VT_ARRAY_SEGMENTS_TYPE) && - VerifyOffset(verifier, VT_ARRAY_SEGMENTS) && - VerifySparseIndexVector(verifier, array_segments(), array_segments_type()) && - VerifyField(verifier, VT_ARRAY_INDICES_TYPE) && - VerifyOffset(verifier, VT_ARRAY_INDICES) && - VerifySparseIndexVector(verifier, array_indices(), array_indices_type()) && - verifier.EndTable(); + circle::PadOptionsT *AsPadOptions() { + return type == BuiltinOptions_PadOptions ? + reinterpret_cast(value) : nullptr; } - DimensionMetadataT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(DimensionMetadataT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const DimensionMetadataT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -template <> -inline const circle::Int32Vector *DimensionMetadata::array_segments_as() const -{ - return array_segments_as_Int32Vector(); -} - -template <> -inline const circle::Uint16Vector * -DimensionMetadata::array_segments_as() const -{ - return array_segments_as_Uint16Vector(); -} - -template <> -inline const circle::Uint8Vector *DimensionMetadata::array_segments_as() const -{ - return array_segments_as_Uint8Vector(); -} - -template <> -inline const circle::Int32Vector *DimensionMetadata::array_indices_as() const -{ - return array_indices_as_Int32Vector(); -} - -template <> -inline const circle::Uint16Vector *DimensionMetadata::array_indices_as() const -{ - return array_indices_as_Uint16Vector(); -} - -template <> -inline const circle::Uint8Vector *DimensionMetadata::array_indices_as() const -{ - return array_indices_as_Uint8Vector(); -} - -struct DimensionMetadataBuilder -{ - typedef DimensionMetadata Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_format(circle::DimensionType format) - { - fbb_.AddElement(DimensionMetadata::VT_FORMAT, static_cast(format), 0); + const circle::PadOptionsT *AsPadOptions() const { + return type == BuiltinOptions_PadOptions ? + reinterpret_cast(value) : nullptr; } - void add_dense_size(int32_t dense_size) - { - fbb_.AddElement(DimensionMetadata::VT_DENSE_SIZE, dense_size, 0); + circle::GatherOptionsT *AsGatherOptions() { + return type == BuiltinOptions_GatherOptions ? + reinterpret_cast(value) : nullptr; } - void add_array_segments_type(circle::SparseIndexVector array_segments_type) - { - fbb_.AddElement(DimensionMetadata::VT_ARRAY_SEGMENTS_TYPE, - static_cast(array_segments_type), 0); + const circle::GatherOptionsT *AsGatherOptions() const { + return type == BuiltinOptions_GatherOptions ? + reinterpret_cast(value) : nullptr; } - void add_array_segments(flatbuffers::Offset array_segments) - { - fbb_.AddOffset(DimensionMetadata::VT_ARRAY_SEGMENTS, array_segments); + circle::BatchToSpaceNDOptionsT *AsBatchToSpaceNDOptions() { + return type == BuiltinOptions_BatchToSpaceNDOptions ? + reinterpret_cast(value) : nullptr; } - void add_array_indices_type(circle::SparseIndexVector array_indices_type) - { - fbb_.AddElement(DimensionMetadata::VT_ARRAY_INDICES_TYPE, - static_cast(array_indices_type), 0); + const circle::BatchToSpaceNDOptionsT *AsBatchToSpaceNDOptions() const { + return type == BuiltinOptions_BatchToSpaceNDOptions ? + reinterpret_cast(value) : nullptr; } - void add_array_indices(flatbuffers::Offset array_indices) - { - fbb_.AddOffset(DimensionMetadata::VT_ARRAY_INDICES, array_indices); + circle::SpaceToBatchNDOptionsT *AsSpaceToBatchNDOptions() { + return type == BuiltinOptions_SpaceToBatchNDOptions ? + reinterpret_cast(value) : nullptr; } - explicit DimensionMetadataBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::SpaceToBatchNDOptionsT *AsSpaceToBatchNDOptions() const { + return type == BuiltinOptions_SpaceToBatchNDOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::TransposeOptionsT *AsTransposeOptions() { + return type == BuiltinOptions_TransposeOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateDimensionMetadata( - flatbuffers::FlatBufferBuilder &_fbb, circle::DimensionType format = circle::DimensionType_DENSE, - int32_t dense_size = 0, - circle::SparseIndexVector array_segments_type = circle::SparseIndexVector_NONE, - flatbuffers::Offset array_segments = 0, - circle::SparseIndexVector array_indices_type = circle::SparseIndexVector_NONE, - flatbuffers::Offset array_indices = 0) -{ - DimensionMetadataBuilder builder_(_fbb); - builder_.add_array_indices(array_indices); - builder_.add_array_segments(array_segments); - builder_.add_dense_size(dense_size); - builder_.add_array_indices_type(array_indices_type); - builder_.add_array_segments_type(array_segments_type); - builder_.add_format(format); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateDimensionMetadata(flatbuffers::FlatBufferBuilder &_fbb, const DimensionMetadataT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct SparsityParametersT : public flatbuffers::NativeTable -{ - typedef SparsityParameters TableType; - std::vector traversal_order{}; - std::vector block_map{}; - std::vector> dim_metadata{}; -}; - -struct SparsityParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SparsityParametersT NativeTableType; - typedef SparsityParametersBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_TRAVERSAL_ORDER = 4, - VT_BLOCK_MAP = 6, - VT_DIM_METADATA = 8 - }; - const flatbuffers::Vector *traversal_order() const - { - return GetPointer *>(VT_TRAVERSAL_ORDER); + const circle::TransposeOptionsT *AsTransposeOptions() const { + return type == BuiltinOptions_TransposeOptions ? + reinterpret_cast(value) : nullptr; } - const flatbuffers::Vector *block_map() const - { - return GetPointer *>(VT_BLOCK_MAP); + circle::ReducerOptionsT *AsReducerOptions() { + return type == BuiltinOptions_ReducerOptions ? + reinterpret_cast(value) : nullptr; } - const flatbuffers::Vector> *dim_metadata() const - { - return GetPointer> *>( - VT_DIM_METADATA); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_TRAVERSAL_ORDER) && - verifier.VerifyVector(traversal_order()) && VerifyOffset(verifier, VT_BLOCK_MAP) && - verifier.VerifyVector(block_map()) && VerifyOffset(verifier, VT_DIM_METADATA) && - verifier.VerifyVector(dim_metadata()) && verifier.VerifyVectorOfTables(dim_metadata()) && - verifier.EndTable(); + const circle::ReducerOptionsT *AsReducerOptions() const { + return type == BuiltinOptions_ReducerOptions ? + reinterpret_cast(value) : nullptr; } - SparsityParametersT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SparsityParametersT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparsityParametersT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct SparsityParametersBuilder -{ - typedef SparsityParameters Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_traversal_order(flatbuffers::Offset> traversal_order) - { - fbb_.AddOffset(SparsityParameters::VT_TRAVERSAL_ORDER, traversal_order); + circle::SubOptionsT *AsSubOptions() { + return type == BuiltinOptions_SubOptions ? + reinterpret_cast(value) : nullptr; } - void add_block_map(flatbuffers::Offset> block_map) - { - fbb_.AddOffset(SparsityParameters::VT_BLOCK_MAP, block_map); + const circle::SubOptionsT *AsSubOptions() const { + return type == BuiltinOptions_SubOptions ? + reinterpret_cast(value) : nullptr; } - void add_dim_metadata( - flatbuffers::Offset>> - dim_metadata) - { - fbb_.AddOffset(SparsityParameters::VT_DIM_METADATA, dim_metadata); + circle::DivOptionsT *AsDivOptions() { + return type == BuiltinOptions_DivOptions ? + reinterpret_cast(value) : nullptr; } - explicit SparsityParametersBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::DivOptionsT *AsDivOptions() const { + return type == BuiltinOptions_DivOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::SqueezeOptionsT *AsSqueezeOptions() { + return type == BuiltinOptions_SqueezeOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateSparsityParameters( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> traversal_order = 0, - flatbuffers::Offset> block_map = 0, - flatbuffers::Offset>> - dim_metadata = 0) -{ - SparsityParametersBuilder builder_(_fbb); - builder_.add_dim_metadata(dim_metadata); - builder_.add_block_map(block_map); - builder_.add_traversal_order(traversal_order); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateSparsityParametersDirect( - flatbuffers::FlatBufferBuilder &_fbb, const std::vector *traversal_order = nullptr, - const std::vector *block_map = nullptr, - const std::vector> *dim_metadata = nullptr) -{ - auto traversal_order__ = traversal_order ? _fbb.CreateVector(*traversal_order) : 0; - auto block_map__ = block_map ? _fbb.CreateVector(*block_map) : 0; - auto dim_metadata__ = - dim_metadata ? _fbb.CreateVector>(*dim_metadata) - : 0; - return circle::CreateSparsityParameters(_fbb, traversal_order__, block_map__, dim_metadata__); -} - -flatbuffers::Offset -CreateSparsityParameters(flatbuffers::FlatBufferBuilder &_fbb, const SparsityParametersT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct VariantSubTypeT : public flatbuffers::NativeTable -{ - typedef VariantSubType TableType; - std::vector shape{}; - circle::TensorType type = circle::TensorType_FLOAT32; - bool has_rank = false; -}; - -struct VariantSubType FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef VariantSubTypeT NativeTableType; - typedef VariantSubTypeBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_SHAPE = 4, - VT_TYPE = 6, - VT_HAS_RANK = 8 - }; - const flatbuffers::Vector *shape() const - { - return GetPointer *>(VT_SHAPE); + const circle::SqueezeOptionsT *AsSqueezeOptions() const { + return type == BuiltinOptions_SqueezeOptions ? + reinterpret_cast(value) : nullptr; } - circle::TensorType type() const - { - return static_cast(GetField(VT_TYPE, 0)); + circle::SequenceRNNOptionsT *AsSequenceRNNOptions() { + return type == BuiltinOptions_SequenceRNNOptions ? + reinterpret_cast(value) : nullptr; } - bool has_rank() const { return GetField(VT_HAS_RANK, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_SHAPE) && - verifier.VerifyVector(shape()) && VerifyField(verifier, VT_TYPE) && - VerifyField(verifier, VT_HAS_RANK) && verifier.EndTable(); + const circle::SequenceRNNOptionsT *AsSequenceRNNOptions() const { + return type == BuiltinOptions_SequenceRNNOptions ? + reinterpret_cast(value) : nullptr; } - VariantSubTypeT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(VariantSubTypeT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const VariantSubTypeT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct VariantSubTypeBuilder -{ - typedef VariantSubType Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_shape(flatbuffers::Offset> shape) - { - fbb_.AddOffset(VariantSubType::VT_SHAPE, shape); + circle::StridedSliceOptionsT *AsStridedSliceOptions() { + return type == BuiltinOptions_StridedSliceOptions ? + reinterpret_cast(value) : nullptr; } - void add_type(circle::TensorType type) - { - fbb_.AddElement(VariantSubType::VT_TYPE, static_cast(type), 0); + const circle::StridedSliceOptionsT *AsStridedSliceOptions() const { + return type == BuiltinOptions_StridedSliceOptions ? + reinterpret_cast(value) : nullptr; } - void add_has_rank(bool has_rank) - { - fbb_.AddElement(VariantSubType::VT_HAS_RANK, static_cast(has_rank), 0); + circle::ExpOptionsT *AsExpOptions() { + return type == BuiltinOptions_ExpOptions ? + reinterpret_cast(value) : nullptr; } - explicit VariantSubTypeBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::ExpOptionsT *AsExpOptions() const { + return type == BuiltinOptions_ExpOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::TopKV2OptionsT *AsTopKV2Options() { + return type == BuiltinOptions_TopKV2Options ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset -CreateVariantSubType(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> shape = 0, - circle::TensorType type = circle::TensorType_FLOAT32, bool has_rank = false) -{ - VariantSubTypeBuilder builder_(_fbb); - builder_.add_shape(shape); - builder_.add_has_rank(has_rank); - builder_.add_type(type); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateVariantSubTypeDirect( - flatbuffers::FlatBufferBuilder &_fbb, const std::vector *shape = nullptr, - circle::TensorType type = circle::TensorType_FLOAT32, bool has_rank = false) -{ - auto shape__ = shape ? _fbb.CreateVector(*shape) : 0; - return circle::CreateVariantSubType(_fbb, shape__, type, has_rank); -} - -flatbuffers::Offset -CreateVariantSubType(flatbuffers::FlatBufferBuilder &_fbb, const VariantSubTypeT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct TensorT : public flatbuffers::NativeTable -{ - typedef Tensor TableType; - std::vector shape{}; - circle::TensorType type = circle::TensorType_FLOAT32; - uint32_t buffer = 0; - std::string name{}; - std::unique_ptr quantization{}; - bool is_variable = false; - std::unique_ptr sparsity{}; - std::vector shape_signature{}; - bool has_rank = false; - std::vector> variant_tensors{}; -}; - -struct Tensor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef TensorT NativeTableType; - typedef TensorBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_SHAPE = 4, - VT_TYPE = 6, - VT_BUFFER = 8, - VT_NAME = 10, - VT_QUANTIZATION = 12, - VT_IS_VARIABLE = 14, - VT_SPARSITY = 16, - VT_SHAPE_SIGNATURE = 18, - VT_HAS_RANK = 20, - VT_VARIANT_TENSORS = 22 - }; - const flatbuffers::Vector *shape() const - { - return GetPointer *>(VT_SHAPE); + const circle::TopKV2OptionsT *AsTopKV2Options() const { + return type == BuiltinOptions_TopKV2Options ? + reinterpret_cast(value) : nullptr; } - circle::TensorType type() const - { - return static_cast(GetField(VT_TYPE, 0)); + circle::SplitOptionsT *AsSplitOptions() { + return type == BuiltinOptions_SplitOptions ? + reinterpret_cast(value) : nullptr; } - uint32_t buffer() const { return GetField(VT_BUFFER, 0); } - const flatbuffers::String *name() const - { - return GetPointer(VT_NAME); + const circle::SplitOptionsT *AsSplitOptions() const { + return type == BuiltinOptions_SplitOptions ? + reinterpret_cast(value) : nullptr; } - const circle::QuantizationParameters *quantization() const - { - return GetPointer(VT_QUANTIZATION); + circle::LogSoftmaxOptionsT *AsLogSoftmaxOptions() { + return type == BuiltinOptions_LogSoftmaxOptions ? + reinterpret_cast(value) : nullptr; } - bool is_variable() const { return GetField(VT_IS_VARIABLE, 0) != 0; } - const circle::SparsityParameters *sparsity() const - { - return GetPointer(VT_SPARSITY); + const circle::LogSoftmaxOptionsT *AsLogSoftmaxOptions() const { + return type == BuiltinOptions_LogSoftmaxOptions ? + reinterpret_cast(value) : nullptr; } - const flatbuffers::Vector *shape_signature() const - { - return GetPointer *>(VT_SHAPE_SIGNATURE); + circle::CastOptionsT *AsCastOptions() { + return type == BuiltinOptions_CastOptions ? + reinterpret_cast(value) : nullptr; } - bool has_rank() const { return GetField(VT_HAS_RANK, 0) != 0; } - const flatbuffers::Vector> *variant_tensors() const - { - return GetPointer> *>( - VT_VARIANT_TENSORS); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_SHAPE) && - verifier.VerifyVector(shape()) && VerifyField(verifier, VT_TYPE) && - VerifyField(verifier, VT_BUFFER) && VerifyOffset(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyOffset(verifier, VT_QUANTIZATION) && - verifier.VerifyTable(quantization()) && VerifyField(verifier, VT_IS_VARIABLE) && - VerifyOffset(verifier, VT_SPARSITY) && verifier.VerifyTable(sparsity()) && - VerifyOffset(verifier, VT_SHAPE_SIGNATURE) && verifier.VerifyVector(shape_signature()) && - VerifyField(verifier, VT_HAS_RANK) && - VerifyOffset(verifier, VT_VARIANT_TENSORS) && verifier.VerifyVector(variant_tensors()) && - verifier.VerifyVectorOfTables(variant_tensors()) && verifier.EndTable(); + const circle::CastOptionsT *AsCastOptions() const { + return type == BuiltinOptions_CastOptions ? + reinterpret_cast(value) : nullptr; } - TensorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(TensorT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct TensorBuilder -{ - typedef Tensor Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_shape(flatbuffers::Offset> shape) - { - fbb_.AddOffset(Tensor::VT_SHAPE, shape); + circle::DequantizeOptionsT *AsDequantizeOptions() { + return type == BuiltinOptions_DequantizeOptions ? + reinterpret_cast(value) : nullptr; } - void add_type(circle::TensorType type) - { - fbb_.AddElement(Tensor::VT_TYPE, static_cast(type), 0); + const circle::DequantizeOptionsT *AsDequantizeOptions() const { + return type == BuiltinOptions_DequantizeOptions ? + reinterpret_cast(value) : nullptr; } - void add_buffer(uint32_t buffer) { fbb_.AddElement(Tensor::VT_BUFFER, buffer, 0); } - void add_name(flatbuffers::Offset name) - { - fbb_.AddOffset(Tensor::VT_NAME, name); + circle::MaximumMinimumOptionsT *AsMaximumMinimumOptions() { + return type == BuiltinOptions_MaximumMinimumOptions ? + reinterpret_cast(value) : nullptr; } - void add_quantization(flatbuffers::Offset quantization) - { - fbb_.AddOffset(Tensor::VT_QUANTIZATION, quantization); + const circle::MaximumMinimumOptionsT *AsMaximumMinimumOptions() const { + return type == BuiltinOptions_MaximumMinimumOptions ? + reinterpret_cast(value) : nullptr; } - void add_is_variable(bool is_variable) - { - fbb_.AddElement(Tensor::VT_IS_VARIABLE, static_cast(is_variable), 0); + circle::ArgMaxOptionsT *AsArgMaxOptions() { + return type == BuiltinOptions_ArgMaxOptions ? + reinterpret_cast(value) : nullptr; } - void add_sparsity(flatbuffers::Offset sparsity) - { - fbb_.AddOffset(Tensor::VT_SPARSITY, sparsity); + const circle::ArgMaxOptionsT *AsArgMaxOptions() const { + return type == BuiltinOptions_ArgMaxOptions ? + reinterpret_cast(value) : nullptr; } - void add_shape_signature(flatbuffers::Offset> shape_signature) - { - fbb_.AddOffset(Tensor::VT_SHAPE_SIGNATURE, shape_signature); + circle::LessOptionsT *AsLessOptions() { + return type == BuiltinOptions_LessOptions ? + reinterpret_cast(value) : nullptr; } - void add_has_rank(bool has_rank) - { - fbb_.AddElement(Tensor::VT_HAS_RANK, static_cast(has_rank), 0); + const circle::LessOptionsT *AsLessOptions() const { + return type == BuiltinOptions_LessOptions ? + reinterpret_cast(value) : nullptr; } - void add_variant_tensors( - flatbuffers::Offset>> - variant_tensors) - { - fbb_.AddOffset(Tensor::VT_VARIANT_TENSORS, variant_tensors); + circle::NegOptionsT *AsNegOptions() { + return type == BuiltinOptions_NegOptions ? + reinterpret_cast(value) : nullptr; } - explicit TensorBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::NegOptionsT *AsNegOptions() const { + return type == BuiltinOptions_NegOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::PadV2OptionsT *AsPadV2Options() { + return type == BuiltinOptions_PadV2Options ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateTensor( - flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset> shape = 0, - circle::TensorType type = circle::TensorType_FLOAT32, uint32_t buffer = 0, - flatbuffers::Offset name = 0, - flatbuffers::Offset quantization = 0, bool is_variable = false, - flatbuffers::Offset sparsity = 0, - flatbuffers::Offset> shape_signature = 0, bool has_rank = false, - flatbuffers::Offset>> - variant_tensors = 0) -{ - TensorBuilder builder_(_fbb); - builder_.add_variant_tensors(variant_tensors); - builder_.add_shape_signature(shape_signature); - builder_.add_sparsity(sparsity); - builder_.add_quantization(quantization); - builder_.add_name(name); - builder_.add_buffer(buffer); - builder_.add_shape(shape); - builder_.add_has_rank(has_rank); - builder_.add_is_variable(is_variable); - builder_.add_type(type); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateTensorDirect( - flatbuffers::FlatBufferBuilder &_fbb, const std::vector *shape = nullptr, - circle::TensorType type = circle::TensorType_FLOAT32, uint32_t buffer = 0, - const char *name = nullptr, flatbuffers::Offset quantization = 0, - bool is_variable = false, flatbuffers::Offset sparsity = 0, - const std::vector *shape_signature = nullptr, bool has_rank = false, - const std::vector> *variant_tensors = nullptr) -{ - auto shape__ = shape ? _fbb.CreateVector(*shape) : 0; - auto name__ = name ? _fbb.CreateString(name) : 0; - auto shape_signature__ = shape_signature ? _fbb.CreateVector(*shape_signature) : 0; - auto variant_tensors__ = - variant_tensors - ? _fbb.CreateVector>(*variant_tensors) - : 0; - return circle::CreateTensor(_fbb, shape__, type, buffer, name__, quantization, is_variable, - sparsity, shape_signature__, has_rank, variant_tensors__); -} - -flatbuffers::Offset -CreateTensor(flatbuffers::FlatBufferBuilder &_fbb, const TensorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct Conv2DOptionsT : public flatbuffers::NativeTable -{ - typedef Conv2DOptions TableType; - circle::Padding padding = circle::Padding_SAME; - int32_t stride_w = 0; - int32_t stride_h = 0; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - int32_t dilation_w_factor = 1; - int32_t dilation_h_factor = 1; -}; - -struct Conv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef Conv2DOptionsT NativeTableType; - typedef Conv2DOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_PADDING = 4, - VT_STRIDE_W = 6, - VT_STRIDE_H = 8, - VT_FUSED_ACTIVATION_FUNCTION = 10, - VT_DILATION_W_FACTOR = 12, - VT_DILATION_H_FACTOR = 14 - }; - circle::Padding padding() const - { - return static_cast(GetField(VT_PADDING, 0)); + const circle::PadV2OptionsT *AsPadV2Options() const { + return type == BuiltinOptions_PadV2Options ? + reinterpret_cast(value) : nullptr; } - int32_t stride_w() const { return GetField(VT_STRIDE_W, 0); } - int32_t stride_h() const { return GetField(VT_STRIDE_H, 0); } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - int32_t dilation_w_factor() const { return GetField(VT_DILATION_W_FACTOR, 1); } - int32_t dilation_h_factor() const { return GetField(VT_DILATION_H_FACTOR, 1); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_PADDING) && - VerifyField(verifier, VT_STRIDE_W) && - VerifyField(verifier, VT_STRIDE_H) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_DILATION_W_FACTOR) && - VerifyField(verifier, VT_DILATION_H_FACTOR) && verifier.EndTable(); + circle::GreaterOptionsT *AsGreaterOptions() { + return type == BuiltinOptions_GreaterOptions ? + reinterpret_cast(value) : nullptr; } - Conv2DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(Conv2DOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const Conv2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct Conv2DOptionsBuilder -{ - typedef Conv2DOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_padding(circle::Padding padding) - { - fbb_.AddElement(Conv2DOptions::VT_PADDING, static_cast(padding), 0); + const circle::GreaterOptionsT *AsGreaterOptions() const { + return type == BuiltinOptions_GreaterOptions ? + reinterpret_cast(value) : nullptr; } - void add_stride_w(int32_t stride_w) - { - fbb_.AddElement(Conv2DOptions::VT_STRIDE_W, stride_w, 0); + circle::GreaterEqualOptionsT *AsGreaterEqualOptions() { + return type == BuiltinOptions_GreaterEqualOptions ? + reinterpret_cast(value) : nullptr; } - void add_stride_h(int32_t stride_h) - { - fbb_.AddElement(Conv2DOptions::VT_STRIDE_H, stride_h, 0); + const circle::GreaterEqualOptionsT *AsGreaterEqualOptions() const { + return type == BuiltinOptions_GreaterEqualOptions ? + reinterpret_cast(value) : nullptr; } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(Conv2DOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + circle::LessEqualOptionsT *AsLessEqualOptions() { + return type == BuiltinOptions_LessEqualOptions ? + reinterpret_cast(value) : nullptr; } - void add_dilation_w_factor(int32_t dilation_w_factor) - { - fbb_.AddElement(Conv2DOptions::VT_DILATION_W_FACTOR, dilation_w_factor, 1); + const circle::LessEqualOptionsT *AsLessEqualOptions() const { + return type == BuiltinOptions_LessEqualOptions ? + reinterpret_cast(value) : nullptr; } - void add_dilation_h_factor(int32_t dilation_h_factor) - { - fbb_.AddElement(Conv2DOptions::VT_DILATION_H_FACTOR, dilation_h_factor, 1); + circle::SelectOptionsT *AsSelectOptions() { + return type == BuiltinOptions_SelectOptions ? + reinterpret_cast(value) : nullptr; } - explicit Conv2DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::SelectOptionsT *AsSelectOptions() const { + return type == BuiltinOptions_SelectOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::SliceOptionsT *AsSliceOptions() { + return type == BuiltinOptions_SliceOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateConv2DOptions( - flatbuffers::FlatBufferBuilder &_fbb, circle::Padding padding = circle::Padding_SAME, - int32_t stride_w = 0, int32_t stride_h = 0, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - int32_t dilation_w_factor = 1, int32_t dilation_h_factor = 1) -{ - Conv2DOptionsBuilder builder_(_fbb); - builder_.add_dilation_h_factor(dilation_h_factor); - builder_.add_dilation_w_factor(dilation_w_factor); - builder_.add_stride_h(stride_h); - builder_.add_stride_w(stride_w); - builder_.add_fused_activation_function(fused_activation_function); - builder_.add_padding(padding); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateConv2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Conv2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct Conv3DOptionsT : public flatbuffers::NativeTable -{ - typedef Conv3DOptions TableType; - circle::Padding padding = circle::Padding_SAME; - int32_t stride_d = 0; - int32_t stride_w = 0; - int32_t stride_h = 0; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - int32_t dilation_d_factor = 1; - int32_t dilation_w_factor = 1; - int32_t dilation_h_factor = 1; -}; - -struct Conv3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef Conv3DOptionsT NativeTableType; - typedef Conv3DOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_PADDING = 4, - VT_STRIDE_D = 6, - VT_STRIDE_W = 8, - VT_STRIDE_H = 10, - VT_FUSED_ACTIVATION_FUNCTION = 12, - VT_DILATION_D_FACTOR = 14, - VT_DILATION_W_FACTOR = 16, - VT_DILATION_H_FACTOR = 18 - }; - circle::Padding padding() const - { - return static_cast(GetField(VT_PADDING, 0)); + const circle::SliceOptionsT *AsSliceOptions() const { + return type == BuiltinOptions_SliceOptions ? + reinterpret_cast(value) : nullptr; } - int32_t stride_d() const { return GetField(VT_STRIDE_D, 0); } - int32_t stride_w() const { return GetField(VT_STRIDE_W, 0); } - int32_t stride_h() const { return GetField(VT_STRIDE_H, 0); } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - int32_t dilation_d_factor() const { return GetField(VT_DILATION_D_FACTOR, 1); } - int32_t dilation_w_factor() const { return GetField(VT_DILATION_W_FACTOR, 1); } - int32_t dilation_h_factor() const { return GetField(VT_DILATION_H_FACTOR, 1); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_PADDING) && - VerifyField(verifier, VT_STRIDE_D) && - VerifyField(verifier, VT_STRIDE_W) && - VerifyField(verifier, VT_STRIDE_H) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_DILATION_D_FACTOR) && - VerifyField(verifier, VT_DILATION_W_FACTOR) && - VerifyField(verifier, VT_DILATION_H_FACTOR) && verifier.EndTable(); + circle::TransposeConvOptionsT *AsTransposeConvOptions() { + return type == BuiltinOptions_TransposeConvOptions ? + reinterpret_cast(value) : nullptr; } - Conv3DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(Conv3DOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const Conv3DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct Conv3DOptionsBuilder -{ - typedef Conv3DOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_padding(circle::Padding padding) - { - fbb_.AddElement(Conv3DOptions::VT_PADDING, static_cast(padding), 0); + const circle::TransposeConvOptionsT *AsTransposeConvOptions() const { + return type == BuiltinOptions_TransposeConvOptions ? + reinterpret_cast(value) : nullptr; } - void add_stride_d(int32_t stride_d) - { - fbb_.AddElement(Conv3DOptions::VT_STRIDE_D, stride_d, 0); + circle::SparseToDenseOptionsT *AsSparseToDenseOptions() { + return type == BuiltinOptions_SparseToDenseOptions ? + reinterpret_cast(value) : nullptr; } - void add_stride_w(int32_t stride_w) - { - fbb_.AddElement(Conv3DOptions::VT_STRIDE_W, stride_w, 0); + const circle::SparseToDenseOptionsT *AsSparseToDenseOptions() const { + return type == BuiltinOptions_SparseToDenseOptions ? + reinterpret_cast(value) : nullptr; } - void add_stride_h(int32_t stride_h) - { - fbb_.AddElement(Conv3DOptions::VT_STRIDE_H, stride_h, 0); + circle::TileOptionsT *AsTileOptions() { + return type == BuiltinOptions_TileOptions ? + reinterpret_cast(value) : nullptr; } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(Conv3DOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + const circle::TileOptionsT *AsTileOptions() const { + return type == BuiltinOptions_TileOptions ? + reinterpret_cast(value) : nullptr; } - void add_dilation_d_factor(int32_t dilation_d_factor) - { - fbb_.AddElement(Conv3DOptions::VT_DILATION_D_FACTOR, dilation_d_factor, 1); + circle::ExpandDimsOptionsT *AsExpandDimsOptions() { + return type == BuiltinOptions_ExpandDimsOptions ? + reinterpret_cast(value) : nullptr; } - void add_dilation_w_factor(int32_t dilation_w_factor) - { - fbb_.AddElement(Conv3DOptions::VT_DILATION_W_FACTOR, dilation_w_factor, 1); + const circle::ExpandDimsOptionsT *AsExpandDimsOptions() const { + return type == BuiltinOptions_ExpandDimsOptions ? + reinterpret_cast(value) : nullptr; } - void add_dilation_h_factor(int32_t dilation_h_factor) - { - fbb_.AddElement(Conv3DOptions::VT_DILATION_H_FACTOR, dilation_h_factor, 1); + circle::EqualOptionsT *AsEqualOptions() { + return type == BuiltinOptions_EqualOptions ? + reinterpret_cast(value) : nullptr; } - explicit Conv3DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::EqualOptionsT *AsEqualOptions() const { + return type == BuiltinOptions_EqualOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::NotEqualOptionsT *AsNotEqualOptions() { + return type == BuiltinOptions_NotEqualOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateConv3DOptions( - flatbuffers::FlatBufferBuilder &_fbb, circle::Padding padding = circle::Padding_SAME, - int32_t stride_d = 0, int32_t stride_w = 0, int32_t stride_h = 0, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - int32_t dilation_d_factor = 1, int32_t dilation_w_factor = 1, int32_t dilation_h_factor = 1) -{ - Conv3DOptionsBuilder builder_(_fbb); - builder_.add_dilation_h_factor(dilation_h_factor); - builder_.add_dilation_w_factor(dilation_w_factor); - builder_.add_dilation_d_factor(dilation_d_factor); - builder_.add_stride_h(stride_h); - builder_.add_stride_w(stride_w); - builder_.add_stride_d(stride_d); - builder_.add_fused_activation_function(fused_activation_function); - builder_.add_padding(padding); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateConv3DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Conv3DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct Pool2DOptionsT : public flatbuffers::NativeTable -{ - typedef Pool2DOptions TableType; - circle::Padding padding = circle::Padding_SAME; - int32_t stride_w = 0; - int32_t stride_h = 0; - int32_t filter_width = 0; - int32_t filter_height = 0; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; -}; - -struct Pool2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef Pool2DOptionsT NativeTableType; - typedef Pool2DOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_PADDING = 4, - VT_STRIDE_W = 6, - VT_STRIDE_H = 8, - VT_FILTER_WIDTH = 10, - VT_FILTER_HEIGHT = 12, - VT_FUSED_ACTIVATION_FUNCTION = 14 - }; - circle::Padding padding() const - { - return static_cast(GetField(VT_PADDING, 0)); + const circle::NotEqualOptionsT *AsNotEqualOptions() const { + return type == BuiltinOptions_NotEqualOptions ? + reinterpret_cast(value) : nullptr; } - int32_t stride_w() const { return GetField(VT_STRIDE_W, 0); } - int32_t stride_h() const { return GetField(VT_STRIDE_H, 0); } - int32_t filter_width() const { return GetField(VT_FILTER_WIDTH, 0); } - int32_t filter_height() const { return GetField(VT_FILTER_HEIGHT, 0); } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_PADDING) && - VerifyField(verifier, VT_STRIDE_W) && - VerifyField(verifier, VT_STRIDE_H) && - VerifyField(verifier, VT_FILTER_WIDTH) && - VerifyField(verifier, VT_FILTER_HEIGHT) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && verifier.EndTable(); + circle::ShapeOptionsT *AsShapeOptions() { + return type == BuiltinOptions_ShapeOptions ? + reinterpret_cast(value) : nullptr; } - Pool2DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(Pool2DOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const Pool2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct Pool2DOptionsBuilder -{ - typedef Pool2DOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_padding(circle::Padding padding) - { - fbb_.AddElement(Pool2DOptions::VT_PADDING, static_cast(padding), 0); + const circle::ShapeOptionsT *AsShapeOptions() const { + return type == BuiltinOptions_ShapeOptions ? + reinterpret_cast(value) : nullptr; } - void add_stride_w(int32_t stride_w) - { - fbb_.AddElement(Pool2DOptions::VT_STRIDE_W, stride_w, 0); + circle::PowOptionsT *AsPowOptions() { + return type == BuiltinOptions_PowOptions ? + reinterpret_cast(value) : nullptr; } - void add_stride_h(int32_t stride_h) - { - fbb_.AddElement(Pool2DOptions::VT_STRIDE_H, stride_h, 0); + const circle::PowOptionsT *AsPowOptions() const { + return type == BuiltinOptions_PowOptions ? + reinterpret_cast(value) : nullptr; } - void add_filter_width(int32_t filter_width) - { - fbb_.AddElement(Pool2DOptions::VT_FILTER_WIDTH, filter_width, 0); + circle::ArgMinOptionsT *AsArgMinOptions() { + return type == BuiltinOptions_ArgMinOptions ? + reinterpret_cast(value) : nullptr; } - void add_filter_height(int32_t filter_height) - { - fbb_.AddElement(Pool2DOptions::VT_FILTER_HEIGHT, filter_height, 0); + const circle::ArgMinOptionsT *AsArgMinOptions() const { + return type == BuiltinOptions_ArgMinOptions ? + reinterpret_cast(value) : nullptr; } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(Pool2DOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + circle::FakeQuantOptionsT *AsFakeQuantOptions() { + return type == BuiltinOptions_FakeQuantOptions ? + reinterpret_cast(value) : nullptr; } - explicit Pool2DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::FakeQuantOptionsT *AsFakeQuantOptions() const { + return type == BuiltinOptions_FakeQuantOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::PackOptionsT *AsPackOptions() { + return type == BuiltinOptions_PackOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreatePool2DOptions( - flatbuffers::FlatBufferBuilder &_fbb, circle::Padding padding = circle::Padding_SAME, - int32_t stride_w = 0, int32_t stride_h = 0, int32_t filter_width = 0, int32_t filter_height = 0, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) -{ - Pool2DOptionsBuilder builder_(_fbb); - builder_.add_filter_height(filter_height); - builder_.add_filter_width(filter_width); - builder_.add_stride_h(stride_h); - builder_.add_stride_w(stride_w); - builder_.add_fused_activation_function(fused_activation_function); - builder_.add_padding(padding); - return builder_.Finish(); -} - -flatbuffers::Offset -CreatePool2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Pool2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct DepthwiseConv2DOptionsT : public flatbuffers::NativeTable -{ - typedef DepthwiseConv2DOptions TableType; - circle::Padding padding = circle::Padding_SAME; - int32_t stride_w = 0; - int32_t stride_h = 0; - int32_t depth_multiplier = 0; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - int32_t dilation_w_factor = 1; - int32_t dilation_h_factor = 1; -}; - -struct DepthwiseConv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef DepthwiseConv2DOptionsT NativeTableType; - typedef DepthwiseConv2DOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_PADDING = 4, - VT_STRIDE_W = 6, - VT_STRIDE_H = 8, - VT_DEPTH_MULTIPLIER = 10, - VT_FUSED_ACTIVATION_FUNCTION = 12, - VT_DILATION_W_FACTOR = 14, - VT_DILATION_H_FACTOR = 16 - }; - circle::Padding padding() const - { - return static_cast(GetField(VT_PADDING, 0)); + const circle::PackOptionsT *AsPackOptions() const { + return type == BuiltinOptions_PackOptions ? + reinterpret_cast(value) : nullptr; } - int32_t stride_w() const { return GetField(VT_STRIDE_W, 0); } - int32_t stride_h() const { return GetField(VT_STRIDE_H, 0); } - int32_t depth_multiplier() const { return GetField(VT_DEPTH_MULTIPLIER, 0); } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - int32_t dilation_w_factor() const { return GetField(VT_DILATION_W_FACTOR, 1); } - int32_t dilation_h_factor() const { return GetField(VT_DILATION_H_FACTOR, 1); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_PADDING) && - VerifyField(verifier, VT_STRIDE_W) && - VerifyField(verifier, VT_STRIDE_H) && - VerifyField(verifier, VT_DEPTH_MULTIPLIER) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_DILATION_W_FACTOR) && - VerifyField(verifier, VT_DILATION_H_FACTOR) && verifier.EndTable(); + circle::LogicalOrOptionsT *AsLogicalOrOptions() { + return type == BuiltinOptions_LogicalOrOptions ? + reinterpret_cast(value) : nullptr; } - DepthwiseConv2DOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(DepthwiseConv2DOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const DepthwiseConv2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct DepthwiseConv2DOptionsBuilder -{ - typedef DepthwiseConv2DOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_padding(circle::Padding padding) - { - fbb_.AddElement(DepthwiseConv2DOptions::VT_PADDING, static_cast(padding), 0); + const circle::LogicalOrOptionsT *AsLogicalOrOptions() const { + return type == BuiltinOptions_LogicalOrOptions ? + reinterpret_cast(value) : nullptr; } - void add_stride_w(int32_t stride_w) - { - fbb_.AddElement(DepthwiseConv2DOptions::VT_STRIDE_W, stride_w, 0); + circle::OneHotOptionsT *AsOneHotOptions() { + return type == BuiltinOptions_OneHotOptions ? + reinterpret_cast(value) : nullptr; } - void add_stride_h(int32_t stride_h) - { - fbb_.AddElement(DepthwiseConv2DOptions::VT_STRIDE_H, stride_h, 0); + const circle::OneHotOptionsT *AsOneHotOptions() const { + return type == BuiltinOptions_OneHotOptions ? + reinterpret_cast(value) : nullptr; } - void add_depth_multiplier(int32_t depth_multiplier) - { - fbb_.AddElement(DepthwiseConv2DOptions::VT_DEPTH_MULTIPLIER, depth_multiplier, 0); + circle::LogicalAndOptionsT *AsLogicalAndOptions() { + return type == BuiltinOptions_LogicalAndOptions ? + reinterpret_cast(value) : nullptr; } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(DepthwiseConv2DOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + const circle::LogicalAndOptionsT *AsLogicalAndOptions() const { + return type == BuiltinOptions_LogicalAndOptions ? + reinterpret_cast(value) : nullptr; } - void add_dilation_w_factor(int32_t dilation_w_factor) - { - fbb_.AddElement(DepthwiseConv2DOptions::VT_DILATION_W_FACTOR, dilation_w_factor, 1); + circle::LogicalNotOptionsT *AsLogicalNotOptions() { + return type == BuiltinOptions_LogicalNotOptions ? + reinterpret_cast(value) : nullptr; } - void add_dilation_h_factor(int32_t dilation_h_factor) - { - fbb_.AddElement(DepthwiseConv2DOptions::VT_DILATION_H_FACTOR, dilation_h_factor, 1); + const circle::LogicalNotOptionsT *AsLogicalNotOptions() const { + return type == BuiltinOptions_LogicalNotOptions ? + reinterpret_cast(value) : nullptr; } - explicit DepthwiseConv2DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::UnpackOptionsT *AsUnpackOptions() { + return type == BuiltinOptions_UnpackOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::UnpackOptionsT *AsUnpackOptions() const { + return type == BuiltinOptions_UnpackOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateDepthwiseConv2DOptions( - flatbuffers::FlatBufferBuilder &_fbb, circle::Padding padding = circle::Padding_SAME, - int32_t stride_w = 0, int32_t stride_h = 0, int32_t depth_multiplier = 0, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - int32_t dilation_w_factor = 1, int32_t dilation_h_factor = 1) -{ - DepthwiseConv2DOptionsBuilder builder_(_fbb); - builder_.add_dilation_h_factor(dilation_h_factor); - builder_.add_dilation_w_factor(dilation_w_factor); - builder_.add_depth_multiplier(depth_multiplier); - builder_.add_stride_h(stride_h); - builder_.add_stride_w(stride_w); - builder_.add_fused_activation_function(fused_activation_function); - builder_.add_padding(padding); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateDepthwiseConv2DOptions(flatbuffers::FlatBufferBuilder &_fbb, - const DepthwiseConv2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct ConcatEmbeddingsOptionsT : public flatbuffers::NativeTable -{ - typedef ConcatEmbeddingsOptions TableType; - int32_t num_channels = 0; - std::vector num_columns_per_channel{}; - std::vector embedding_dim_per_channel{}; -}; - -struct ConcatEmbeddingsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ConcatEmbeddingsOptionsT NativeTableType; - typedef ConcatEmbeddingsOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_NUM_CHANNELS = 4, - VT_NUM_COLUMNS_PER_CHANNEL = 6, - VT_EMBEDDING_DIM_PER_CHANNEL = 8 - }; - int32_t num_channels() const { return GetField(VT_NUM_CHANNELS, 0); } - const flatbuffers::Vector *num_columns_per_channel() const - { - return GetPointer *>(VT_NUM_COLUMNS_PER_CHANNEL); + circle::FloorDivOptionsT *AsFloorDivOptions() { + return type == BuiltinOptions_FloorDivOptions ? + reinterpret_cast(value) : nullptr; } - const flatbuffers::Vector *embedding_dim_per_channel() const - { - return GetPointer *>(VT_EMBEDDING_DIM_PER_CHANNEL); + const circle::FloorDivOptionsT *AsFloorDivOptions() const { + return type == BuiltinOptions_FloorDivOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_NUM_CHANNELS) && - VerifyOffset(verifier, VT_NUM_COLUMNS_PER_CHANNEL) && - verifier.VerifyVector(num_columns_per_channel()) && - VerifyOffset(verifier, VT_EMBEDDING_DIM_PER_CHANNEL) && - verifier.VerifyVector(embedding_dim_per_channel()) && verifier.EndTable(); + circle::SquareOptionsT *AsSquareOptions() { + return type == BuiltinOptions_SquareOptions ? + reinterpret_cast(value) : nullptr; } - ConcatEmbeddingsOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ConcatEmbeddingsOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ConcatEmbeddingsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct ConcatEmbeddingsOptionsBuilder -{ - typedef ConcatEmbeddingsOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_num_channels(int32_t num_channels) - { - fbb_.AddElement(ConcatEmbeddingsOptions::VT_NUM_CHANNELS, num_channels, 0); + const circle::SquareOptionsT *AsSquareOptions() const { + return type == BuiltinOptions_SquareOptions ? + reinterpret_cast(value) : nullptr; } - void add_num_columns_per_channel( - flatbuffers::Offset> num_columns_per_channel) - { - fbb_.AddOffset(ConcatEmbeddingsOptions::VT_NUM_COLUMNS_PER_CHANNEL, num_columns_per_channel); + circle::ZerosLikeOptionsT *AsZerosLikeOptions() { + return type == BuiltinOptions_ZerosLikeOptions ? + reinterpret_cast(value) : nullptr; } - void add_embedding_dim_per_channel( - flatbuffers::Offset> embedding_dim_per_channel) - { - fbb_.AddOffset(ConcatEmbeddingsOptions::VT_EMBEDDING_DIM_PER_CHANNEL, - embedding_dim_per_channel); + const circle::ZerosLikeOptionsT *AsZerosLikeOptions() const { + return type == BuiltinOptions_ZerosLikeOptions ? + reinterpret_cast(value) : nullptr; } - explicit ConcatEmbeddingsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::FillOptionsT *AsFillOptions() { + return type == BuiltinOptions_FillOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::FillOptionsT *AsFillOptions() const { + return type == BuiltinOptions_FillOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateConcatEmbeddingsOptions( - flatbuffers::FlatBufferBuilder &_fbb, int32_t num_channels = 0, - flatbuffers::Offset> num_columns_per_channel = 0, - flatbuffers::Offset> embedding_dim_per_channel = 0) -{ - ConcatEmbeddingsOptionsBuilder builder_(_fbb); - builder_.add_embedding_dim_per_channel(embedding_dim_per_channel); - builder_.add_num_columns_per_channel(num_columns_per_channel); - builder_.add_num_channels(num_channels); - return builder_.Finish(); -} - -inline flatbuffers::Offset -CreateConcatEmbeddingsOptionsDirect(flatbuffers::FlatBufferBuilder &_fbb, int32_t num_channels = 0, - const std::vector *num_columns_per_channel = nullptr, - const std::vector *embedding_dim_per_channel = nullptr) -{ - auto num_columns_per_channel__ = - num_columns_per_channel ? _fbb.CreateVector(*num_columns_per_channel) : 0; - auto embedding_dim_per_channel__ = - embedding_dim_per_channel ? _fbb.CreateVector(*embedding_dim_per_channel) : 0; - return circle::CreateConcatEmbeddingsOptions(_fbb, num_channels, num_columns_per_channel__, - embedding_dim_per_channel__); -} - -flatbuffers::Offset -CreateConcatEmbeddingsOptions(flatbuffers::FlatBufferBuilder &_fbb, - const ConcatEmbeddingsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct LSHProjectionOptionsT : public flatbuffers::NativeTable -{ - typedef LSHProjectionOptions TableType; - circle::LSHProjectionType type = circle::LSHProjectionType_UNKNOWN; -}; - -struct LSHProjectionOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LSHProjectionOptionsT NativeTableType; - typedef LSHProjectionOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_TYPE = 4 - }; - circle::LSHProjectionType type() const - { - return static_cast(GetField(VT_TYPE, 0)); + circle::BidirectionalSequenceLSTMOptionsT *AsBidirectionalSequenceLSTMOptions() { + return type == BuiltinOptions_BidirectionalSequenceLSTMOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_TYPE) && - verifier.EndTable(); + const circle::BidirectionalSequenceLSTMOptionsT *AsBidirectionalSequenceLSTMOptions() const { + return type == BuiltinOptions_BidirectionalSequenceLSTMOptions ? + reinterpret_cast(value) : nullptr; } - LSHProjectionOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LSHProjectionOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSHProjectionOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct LSHProjectionOptionsBuilder -{ - typedef LSHProjectionOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_type(circle::LSHProjectionType type) - { - fbb_.AddElement(LSHProjectionOptions::VT_TYPE, static_cast(type), 0); + circle::BidirectionalSequenceRNNOptionsT *AsBidirectionalSequenceRNNOptions() { + return type == BuiltinOptions_BidirectionalSequenceRNNOptions ? + reinterpret_cast(value) : nullptr; } - explicit LSHProjectionOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::BidirectionalSequenceRNNOptionsT *AsBidirectionalSequenceRNNOptions() const { + return type == BuiltinOptions_BidirectionalSequenceRNNOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::UnidirectionalSequenceLSTMOptionsT *AsUnidirectionalSequenceLSTMOptions() { + return type == BuiltinOptions_UnidirectionalSequenceLSTMOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset -CreateLSHProjectionOptions(flatbuffers::FlatBufferBuilder &_fbb, - circle::LSHProjectionType type = circle::LSHProjectionType_UNKNOWN) -{ - LSHProjectionOptionsBuilder builder_(_fbb); - builder_.add_type(type); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateLSHProjectionOptions(flatbuffers::FlatBufferBuilder &_fbb, const LSHProjectionOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct SVDFOptionsT : public flatbuffers::NativeTable -{ - typedef SVDFOptions TableType; - int32_t rank = 0; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - bool asymmetric_quantize_inputs = false; -}; - -struct SVDFOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SVDFOptionsT NativeTableType; - typedef SVDFOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_RANK = 4, - VT_FUSED_ACTIVATION_FUNCTION = 6, - VT_ASYMMETRIC_QUANTIZE_INPUTS = 8 - }; - int32_t rank() const { return GetField(VT_RANK, 0); } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool asymmetric_quantize_inputs() const - { - return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + const circle::UnidirectionalSequenceLSTMOptionsT *AsUnidirectionalSequenceLSTMOptions() const { + return type == BuiltinOptions_UnidirectionalSequenceLSTMOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_RANK) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && verifier.EndTable(); + circle::FloorModOptionsT *AsFloorModOptions() { + return type == BuiltinOptions_FloorModOptions ? + reinterpret_cast(value) : nullptr; } - SVDFOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SVDFOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SVDFOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct SVDFOptionsBuilder -{ - typedef SVDFOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_rank(int32_t rank) { fbb_.AddElement(SVDFOptions::VT_RANK, rank, 0); } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(SVDFOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) - { - fbb_.AddElement(SVDFOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, - static_cast(asymmetric_quantize_inputs), 0); - } - explicit SVDFOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::FloorModOptionsT *AsFloorModOptions() const { + return type == BuiltinOptions_FloorModOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::RangeOptionsT *AsRangeOptions() { + return type == BuiltinOptions_RangeOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateSVDFOptions( - flatbuffers::FlatBufferBuilder &_fbb, int32_t rank = 0, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - bool asymmetric_quantize_inputs = false) -{ - SVDFOptionsBuilder builder_(_fbb); - builder_.add_rank(rank); - builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateSVDFOptions(flatbuffers::FlatBufferBuilder &_fbb, const SVDFOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct RNNOptionsT : public flatbuffers::NativeTable -{ - typedef RNNOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - bool asymmetric_quantize_inputs = false; -}; - -struct RNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef RNNOptionsT NativeTableType; - typedef RNNOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4, - VT_ASYMMETRIC_QUANTIZE_INPUTS = 6 - }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + const circle::RangeOptionsT *AsRangeOptions() const { + return type == BuiltinOptions_RangeOptions ? + reinterpret_cast(value) : nullptr; } - bool asymmetric_quantize_inputs() const - { - return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + circle::ResizeNearestNeighborOptionsT *AsResizeNearestNeighborOptions() { + return type == BuiltinOptions_ResizeNearestNeighborOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && verifier.EndTable(); + const circle::ResizeNearestNeighborOptionsT *AsResizeNearestNeighborOptions() const { + return type == BuiltinOptions_ResizeNearestNeighborOptions ? + reinterpret_cast(value) : nullptr; } - RNNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(RNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const RNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct RNNOptionsBuilder -{ - typedef RNNOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(RNNOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) - { - fbb_.AddElement(RNNOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, - static_cast(asymmetric_quantize_inputs), 0); - } - explicit RNNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::LeakyReluOptionsT *AsLeakyReluOptions() { + return type == BuiltinOptions_LeakyReluOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::LeakyReluOptionsT *AsLeakyReluOptions() const { + return type == BuiltinOptions_LeakyReluOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateRNNOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - bool asymmetric_quantize_inputs = false) -{ - RNNOptionsBuilder builder_(_fbb); - builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const RNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct SequenceRNNOptionsT : public flatbuffers::NativeTable -{ - typedef SequenceRNNOptions TableType; - bool time_major = false; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - bool asymmetric_quantize_inputs = false; -}; - -struct SequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SequenceRNNOptionsT NativeTableType; - typedef SequenceRNNOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_TIME_MAJOR = 4, - VT_FUSED_ACTIVATION_FUNCTION = 6, - VT_ASYMMETRIC_QUANTIZE_INPUTS = 8 - }; - bool time_major() const { return GetField(VT_TIME_MAJOR, 0) != 0; } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool asymmetric_quantize_inputs() const - { - return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + circle::SquaredDifferenceOptionsT *AsSquaredDifferenceOptions() { + return type == BuiltinOptions_SquaredDifferenceOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_TIME_MAJOR) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && verifier.EndTable(); + const circle::SquaredDifferenceOptionsT *AsSquaredDifferenceOptions() const { + return type == BuiltinOptions_SquaredDifferenceOptions ? + reinterpret_cast(value) : nullptr; } - SequenceRNNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SequenceRNNOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SequenceRNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct SequenceRNNOptionsBuilder -{ - typedef SequenceRNNOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_time_major(bool time_major) - { - fbb_.AddElement(SequenceRNNOptions::VT_TIME_MAJOR, static_cast(time_major), - 0); - } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(SequenceRNNOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) - { - fbb_.AddElement(SequenceRNNOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, - static_cast(asymmetric_quantize_inputs), 0); - } - explicit SequenceRNNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::MirrorPadOptionsT *AsMirrorPadOptions() { + return type == BuiltinOptions_MirrorPadOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::MirrorPadOptionsT *AsMirrorPadOptions() const { + return type == BuiltinOptions_MirrorPadOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateSequenceRNNOptions( - flatbuffers::FlatBufferBuilder &_fbb, bool time_major = false, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - bool asymmetric_quantize_inputs = false) -{ - SequenceRNNOptionsBuilder builder_(_fbb); - builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); - builder_.add_fused_activation_function(fused_activation_function); - builder_.add_time_major(time_major); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateSequenceRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const SequenceRNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct BidirectionalSequenceRNNOptionsT : public flatbuffers::NativeTable -{ - typedef BidirectionalSequenceRNNOptions TableType; - bool time_major = false; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - bool merge_outputs = false; - bool asymmetric_quantize_inputs = false; -}; - -struct BidirectionalSequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BidirectionalSequenceRNNOptionsT NativeTableType; - typedef BidirectionalSequenceRNNOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_TIME_MAJOR = 4, - VT_FUSED_ACTIVATION_FUNCTION = 6, - VT_MERGE_OUTPUTS = 8, - VT_ASYMMETRIC_QUANTIZE_INPUTS = 10 - }; - bool time_major() const { return GetField(VT_TIME_MAJOR, 0) != 0; } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool merge_outputs() const { return GetField(VT_MERGE_OUTPUTS, 0) != 0; } - bool asymmetric_quantize_inputs() const - { - return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + circle::AbsOptionsT *AsAbsOptions() { + return type == BuiltinOptions_AbsOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_TIME_MAJOR) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_MERGE_OUTPUTS) && - VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && verifier.EndTable(); + const circle::AbsOptionsT *AsAbsOptions() const { + return type == BuiltinOptions_AbsOptions ? + reinterpret_cast(value) : nullptr; } - BidirectionalSequenceRNNOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BidirectionalSequenceRNNOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceRNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct BidirectionalSequenceRNNOptionsBuilder -{ - typedef BidirectionalSequenceRNNOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_time_major(bool time_major) - { - fbb_.AddElement(BidirectionalSequenceRNNOptions::VT_TIME_MAJOR, - static_cast(time_major), 0); - } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(BidirectionalSequenceRNNOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - void add_merge_outputs(bool merge_outputs) - { - fbb_.AddElement(BidirectionalSequenceRNNOptions::VT_MERGE_OUTPUTS, - static_cast(merge_outputs), 0); - } - void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) - { - fbb_.AddElement(BidirectionalSequenceRNNOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, - static_cast(asymmetric_quantize_inputs), 0); - } - explicit BidirectionalSequenceRNNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::SplitVOptionsT *AsSplitVOptions() { + return type == BuiltinOptions_SplitVOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::SplitVOptionsT *AsSplitVOptions() const { + return type == BuiltinOptions_SplitVOptions ? + reinterpret_cast(value) : nullptr; + } + circle::UniqueOptionsT *AsUniqueOptions() { + return type == BuiltinOptions_UniqueOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::UniqueOptionsT *AsUniqueOptions() const { + return type == BuiltinOptions_UniqueOptions ? + reinterpret_cast(value) : nullptr; + } + circle::ReverseV2OptionsT *AsReverseV2Options() { + return type == BuiltinOptions_ReverseV2Options ? + reinterpret_cast(value) : nullptr; + } + const circle::ReverseV2OptionsT *AsReverseV2Options() const { + return type == BuiltinOptions_ReverseV2Options ? + reinterpret_cast(value) : nullptr; + } + circle::AddNOptionsT *AsAddNOptions() { + return type == BuiltinOptions_AddNOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::AddNOptionsT *AsAddNOptions() const { + return type == BuiltinOptions_AddNOptions ? + reinterpret_cast(value) : nullptr; + } + circle::GatherNdOptionsT *AsGatherNdOptions() { + return type == BuiltinOptions_GatherNdOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::GatherNdOptionsT *AsGatherNdOptions() const { + return type == BuiltinOptions_GatherNdOptions ? + reinterpret_cast(value) : nullptr; + } + circle::CosOptionsT *AsCosOptions() { + return type == BuiltinOptions_CosOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::CosOptionsT *AsCosOptions() const { + return type == BuiltinOptions_CosOptions ? + reinterpret_cast(value) : nullptr; + } + circle::WhereOptionsT *AsWhereOptions() { + return type == BuiltinOptions_WhereOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::WhereOptionsT *AsWhereOptions() const { + return type == BuiltinOptions_WhereOptions ? + reinterpret_cast(value) : nullptr; + } + circle::RankOptionsT *AsRankOptions() { + return type == BuiltinOptions_RankOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::RankOptionsT *AsRankOptions() const { + return type == BuiltinOptions_RankOptions ? + reinterpret_cast(value) : nullptr; + } + circle::ReverseSequenceOptionsT *AsReverseSequenceOptions() { + return type == BuiltinOptions_ReverseSequenceOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::ReverseSequenceOptionsT *AsReverseSequenceOptions() const { + return type == BuiltinOptions_ReverseSequenceOptions ? + reinterpret_cast(value) : nullptr; + } + circle::MatrixDiagOptionsT *AsMatrixDiagOptions() { + return type == BuiltinOptions_MatrixDiagOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::MatrixDiagOptionsT *AsMatrixDiagOptions() const { + return type == BuiltinOptions_MatrixDiagOptions ? + reinterpret_cast(value) : nullptr; + } + circle::QuantizeOptionsT *AsQuantizeOptions() { + return type == BuiltinOptions_QuantizeOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::QuantizeOptionsT *AsQuantizeOptions() const { + return type == BuiltinOptions_QuantizeOptions ? + reinterpret_cast(value) : nullptr; + } + circle::MatrixSetDiagOptionsT *AsMatrixSetDiagOptions() { + return type == BuiltinOptions_MatrixSetDiagOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::MatrixSetDiagOptionsT *AsMatrixSetDiagOptions() const { + return type == BuiltinOptions_MatrixSetDiagOptions ? + reinterpret_cast(value) : nullptr; + } + circle::HardSwishOptionsT *AsHardSwishOptions() { + return type == BuiltinOptions_HardSwishOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::HardSwishOptionsT *AsHardSwishOptions() const { + return type == BuiltinOptions_HardSwishOptions ? + reinterpret_cast(value) : nullptr; + } + circle::IfOptionsT *AsIfOptions() { + return type == BuiltinOptions_IfOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::IfOptionsT *AsIfOptions() const { + return type == BuiltinOptions_IfOptions ? + reinterpret_cast(value) : nullptr; + } + circle::WhileOptionsT *AsWhileOptions() { + return type == BuiltinOptions_WhileOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::WhileOptionsT *AsWhileOptions() const { + return type == BuiltinOptions_WhileOptions ? + reinterpret_cast(value) : nullptr; + } + circle::DepthToSpaceOptionsT *AsDepthToSpaceOptions() { + return type == BuiltinOptions_DepthToSpaceOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::DepthToSpaceOptionsT *AsDepthToSpaceOptions() const { + return type == BuiltinOptions_DepthToSpaceOptions ? + reinterpret_cast(value) : nullptr; + } + circle::NonMaxSuppressionV4OptionsT *AsNonMaxSuppressionV4Options() { + return type == BuiltinOptions_NonMaxSuppressionV4Options ? + reinterpret_cast(value) : nullptr; + } + const circle::NonMaxSuppressionV4OptionsT *AsNonMaxSuppressionV4Options() const { + return type == BuiltinOptions_NonMaxSuppressionV4Options ? + reinterpret_cast(value) : nullptr; + } + circle::NonMaxSuppressionV5OptionsT *AsNonMaxSuppressionV5Options() { + return type == BuiltinOptions_NonMaxSuppressionV5Options ? + reinterpret_cast(value) : nullptr; + } + const circle::NonMaxSuppressionV5OptionsT *AsNonMaxSuppressionV5Options() const { + return type == BuiltinOptions_NonMaxSuppressionV5Options ? + reinterpret_cast(value) : nullptr; + } + circle::ScatterNdOptionsT *AsScatterNdOptions() { + return type == BuiltinOptions_ScatterNdOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::ScatterNdOptionsT *AsScatterNdOptions() const { + return type == BuiltinOptions_ScatterNdOptions ? + reinterpret_cast(value) : nullptr; + } + circle::SelectV2OptionsT *AsSelectV2Options() { + return type == BuiltinOptions_SelectV2Options ? + reinterpret_cast(value) : nullptr; + } + const circle::SelectV2OptionsT *AsSelectV2Options() const { + return type == BuiltinOptions_SelectV2Options ? + reinterpret_cast(value) : nullptr; + } + circle::DensifyOptionsT *AsDensifyOptions() { + return type == BuiltinOptions_DensifyOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::DensifyOptionsT *AsDensifyOptions() const { + return type == BuiltinOptions_DensifyOptions ? + reinterpret_cast(value) : nullptr; + } + circle::SegmentSumOptionsT *AsSegmentSumOptions() { + return type == BuiltinOptions_SegmentSumOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::SegmentSumOptionsT *AsSegmentSumOptions() const { + return type == BuiltinOptions_SegmentSumOptions ? + reinterpret_cast(value) : nullptr; + } + circle::BatchMatMulOptionsT *AsBatchMatMulOptions() { + return type == BuiltinOptions_BatchMatMulOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::BatchMatMulOptionsT *AsBatchMatMulOptions() const { + return type == BuiltinOptions_BatchMatMulOptions ? + reinterpret_cast(value) : nullptr; + } + circle::CumsumOptionsT *AsCumsumOptions() { + return type == BuiltinOptions_CumsumOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::CumsumOptionsT *AsCumsumOptions() const { + return type == BuiltinOptions_CumsumOptions ? + reinterpret_cast(value) : nullptr; + } + circle::CallOnceOptionsT *AsCallOnceOptions() { + return type == BuiltinOptions_CallOnceOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::CallOnceOptionsT *AsCallOnceOptions() const { + return type == BuiltinOptions_CallOnceOptions ? + reinterpret_cast(value) : nullptr; + } + circle::BroadcastToOptionsT *AsBroadcastToOptions() { + return type == BuiltinOptions_BroadcastToOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::BroadcastToOptionsT *AsBroadcastToOptions() const { + return type == BuiltinOptions_BroadcastToOptions ? + reinterpret_cast(value) : nullptr; + } + circle::Rfft2dOptionsT *AsRfft2dOptions() { + return type == BuiltinOptions_Rfft2dOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::Rfft2dOptionsT *AsRfft2dOptions() const { + return type == BuiltinOptions_Rfft2dOptions ? + reinterpret_cast(value) : nullptr; + } + circle::Conv3DOptionsT *AsConv3DOptions() { + return type == BuiltinOptions_Conv3DOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::Conv3DOptionsT *AsConv3DOptions() const { + return type == BuiltinOptions_Conv3DOptions ? + reinterpret_cast(value) : nullptr; + } + circle::HashtableOptionsT *AsHashtableOptions() { + return type == BuiltinOptions_HashtableOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::HashtableOptionsT *AsHashtableOptions() const { + return type == BuiltinOptions_HashtableOptions ? + reinterpret_cast(value) : nullptr; + } + circle::HashtableFindOptionsT *AsHashtableFindOptions() { + return type == BuiltinOptions_HashtableFindOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::HashtableFindOptionsT *AsHashtableFindOptions() const { + return type == BuiltinOptions_HashtableFindOptions ? + reinterpret_cast(value) : nullptr; + } + circle::HashtableImportOptionsT *AsHashtableImportOptions() { + return type == BuiltinOptions_HashtableImportOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::HashtableImportOptionsT *AsHashtableImportOptions() const { + return type == BuiltinOptions_HashtableImportOptions ? + reinterpret_cast(value) : nullptr; + } + circle::HashtableSizeOptionsT *AsHashtableSizeOptions() { + return type == BuiltinOptions_HashtableSizeOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::HashtableSizeOptionsT *AsHashtableSizeOptions() const { + return type == BuiltinOptions_HashtableSizeOptions ? + reinterpret_cast(value) : nullptr; + } + circle::VarHandleOptionsT *AsVarHandleOptions() { + return type == BuiltinOptions_VarHandleOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::VarHandleOptionsT *AsVarHandleOptions() const { + return type == BuiltinOptions_VarHandleOptions ? + reinterpret_cast(value) : nullptr; + } + circle::ReadVariableOptionsT *AsReadVariableOptions() { + return type == BuiltinOptions_ReadVariableOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::ReadVariableOptionsT *AsReadVariableOptions() const { + return type == BuiltinOptions_ReadVariableOptions ? + reinterpret_cast(value) : nullptr; + } + circle::AssignVariableOptionsT *AsAssignVariableOptions() { + return type == BuiltinOptions_AssignVariableOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::AssignVariableOptionsT *AsAssignVariableOptions() const { + return type == BuiltinOptions_AssignVariableOptions ? + reinterpret_cast(value) : nullptr; + } + circle::RandomOptionsT *AsRandomOptions() { + return type == BuiltinOptions_RandomOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::RandomOptionsT *AsRandomOptions() const { + return type == BuiltinOptions_RandomOptions ? + reinterpret_cast(value) : nullptr; + } + circle::BucketizeOptionsT *AsBucketizeOptions() { + return type == BuiltinOptions_BucketizeOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::BucketizeOptionsT *AsBucketizeOptions() const { + return type == BuiltinOptions_BucketizeOptions ? + reinterpret_cast(value) : nullptr; + } + circle::GeluOptionsT *AsGeluOptions() { + return type == BuiltinOptions_GeluOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::GeluOptionsT *AsGeluOptions() const { + return type == BuiltinOptions_GeluOptions ? + reinterpret_cast(value) : nullptr; + } + circle::DynamicUpdateSliceOptionsT *AsDynamicUpdateSliceOptions() { + return type == BuiltinOptions_DynamicUpdateSliceOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::DynamicUpdateSliceOptionsT *AsDynamicUpdateSliceOptions() const { + return type == BuiltinOptions_DynamicUpdateSliceOptions ? + reinterpret_cast(value) : nullptr; + } + circle::UnsortedSegmentProdOptionsT *AsUnsortedSegmentProdOptions() { + return type == BuiltinOptions_UnsortedSegmentProdOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::UnsortedSegmentProdOptionsT *AsUnsortedSegmentProdOptions() const { + return type == BuiltinOptions_UnsortedSegmentProdOptions ? + reinterpret_cast(value) : nullptr; + } + circle::UnsortedSegmentMaxOptionsT *AsUnsortedSegmentMaxOptions() { + return type == BuiltinOptions_UnsortedSegmentMaxOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::UnsortedSegmentMaxOptionsT *AsUnsortedSegmentMaxOptions() const { + return type == BuiltinOptions_UnsortedSegmentMaxOptions ? + reinterpret_cast(value) : nullptr; + } + circle::UnsortedSegmentMinOptionsT *AsUnsortedSegmentMinOptions() { + return type == BuiltinOptions_UnsortedSegmentMinOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::UnsortedSegmentMinOptionsT *AsUnsortedSegmentMinOptions() const { + return type == BuiltinOptions_UnsortedSegmentMinOptions ? + reinterpret_cast(value) : nullptr; + } + circle::UnsortedSegmentSumOptionsT *AsUnsortedSegmentSumOptions() { + return type == BuiltinOptions_UnsortedSegmentSumOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::UnsortedSegmentSumOptionsT *AsUnsortedSegmentSumOptions() const { + return type == BuiltinOptions_UnsortedSegmentSumOptions ? + reinterpret_cast(value) : nullptr; + } + circle::ATan2OptionsT *AsATan2Options() { + return type == BuiltinOptions_ATan2Options ? + reinterpret_cast(value) : nullptr; + } + const circle::ATan2OptionsT *AsATan2Options() const { + return type == BuiltinOptions_ATan2Options ? + reinterpret_cast(value) : nullptr; + } + circle::SignOptionsT *AsSignOptions() { + return type == BuiltinOptions_SignOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::SignOptionsT *AsSignOptions() const { + return type == BuiltinOptions_SignOptions ? + reinterpret_cast(value) : nullptr; + } + circle::BitcastOptionsT *AsBitcastOptions() { + return type == BuiltinOptions_BitcastOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::BitcastOptionsT *AsBitcastOptions() const { + return type == BuiltinOptions_BitcastOptions ? + reinterpret_cast(value) : nullptr; + } + circle::BitwiseXorOptionsT *AsBitwiseXorOptions() { + return type == BuiltinOptions_BitwiseXorOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::BitwiseXorOptionsT *AsBitwiseXorOptions() const { + return type == BuiltinOptions_BitwiseXorOptions ? + reinterpret_cast(value) : nullptr; + } + circle::RightShiftOptionsT *AsRightShiftOptions() { + return type == BuiltinOptions_RightShiftOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::RightShiftOptionsT *AsRightShiftOptions() const { + return type == BuiltinOptions_RightShiftOptions ? + reinterpret_cast(value) : nullptr; + } + circle::GRUOptionsT *AsGRUOptions() { + return type == BuiltinOptions_GRUOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::GRUOptionsT *AsGRUOptions() const { + return type == BuiltinOptions_GRUOptions ? + reinterpret_cast(value) : nullptr; + } + circle::BCQGatherOptionsT *AsBCQGatherOptions() { + return type == BuiltinOptions_BCQGatherOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::BCQGatherOptionsT *AsBCQGatherOptions() const { + return type == BuiltinOptions_BCQGatherOptions ? + reinterpret_cast(value) : nullptr; + } + circle::BCQFullyConnectedOptionsT *AsBCQFullyConnectedOptions() { + return type == BuiltinOptions_BCQFullyConnectedOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::BCQFullyConnectedOptionsT *AsBCQFullyConnectedOptions() const { + return type == BuiltinOptions_BCQFullyConnectedOptions ? + reinterpret_cast(value) : nullptr; + } + circle::InstanceNormOptionsT *AsInstanceNormOptions() { + return type == BuiltinOptions_InstanceNormOptions ? + reinterpret_cast(value) : nullptr; + } + const circle::InstanceNormOptionsT *AsInstanceNormOptions() const { + return type == BuiltinOptions_InstanceNormOptions ? + reinterpret_cast(value) : nullptr; } }; -inline flatbuffers::Offset CreateBidirectionalSequenceRNNOptions( - flatbuffers::FlatBufferBuilder &_fbb, bool time_major = false, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - bool merge_outputs = false, bool asymmetric_quantize_inputs = false) -{ - BidirectionalSequenceRNNOptionsBuilder builder_(_fbb); - builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); - builder_.add_merge_outputs(merge_outputs); - builder_.add_fused_activation_function(fused_activation_function); - builder_.add_time_major(time_major); - return builder_.Finish(); +bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *obj, BuiltinOptions type); +bool VerifyBuiltinOptionsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +enum BuiltinOptions2 : uint8_t { + BuiltinOptions2_NONE = 0, + BuiltinOptions2_StablehloConcatenateOptions = 1, + BuiltinOptions2_StablehloBroadcastInDimOptions = 2, + BuiltinOptions2_StablehloSliceOptions = 3, + BuiltinOptions2_StablehloConvolutionOptions = 4, + BuiltinOptions2_StablehloCustomCallOptions = 5, + BuiltinOptions2_StablehloReduceOptions = 6, + BuiltinOptions2_StablehloScatterOptions = 7, + BuiltinOptions2_StablehloCompareOptions = 8, + BuiltinOptions2_StablehloDynamicSliceOptions = 9, + BuiltinOptions2_StablehloPadOptions = 10, + BuiltinOptions2_StablehloIotaOptions = 11, + BuiltinOptions2_StablehloDotGeneralOptions = 12, + BuiltinOptions2_StablehloReduceWindowOptions = 13, + BuiltinOptions2_StablehloSortOptions = 14, + BuiltinOptions2_StablehloWhileOptions = 15, + BuiltinOptions2_StablehloGatherOptions = 16, + BuiltinOptions2_StablehloTransposeOptions = 17, + BuiltinOptions2_DilateOptions = 18, + BuiltinOptions2_StablehloRngBitGeneratorOptions = 19, + BuiltinOptions2_ReduceWindowOptions = 20, + BuiltinOptions2_MIN = BuiltinOptions2_NONE, + BuiltinOptions2_MAX = BuiltinOptions2_ReduceWindowOptions +}; + +inline const BuiltinOptions2 (&EnumValuesBuiltinOptions2())[21] { + static const BuiltinOptions2 values[] = { + BuiltinOptions2_NONE, + BuiltinOptions2_StablehloConcatenateOptions, + BuiltinOptions2_StablehloBroadcastInDimOptions, + BuiltinOptions2_StablehloSliceOptions, + BuiltinOptions2_StablehloConvolutionOptions, + BuiltinOptions2_StablehloCustomCallOptions, + BuiltinOptions2_StablehloReduceOptions, + BuiltinOptions2_StablehloScatterOptions, + BuiltinOptions2_StablehloCompareOptions, + BuiltinOptions2_StablehloDynamicSliceOptions, + BuiltinOptions2_StablehloPadOptions, + BuiltinOptions2_StablehloIotaOptions, + BuiltinOptions2_StablehloDotGeneralOptions, + BuiltinOptions2_StablehloReduceWindowOptions, + BuiltinOptions2_StablehloSortOptions, + BuiltinOptions2_StablehloWhileOptions, + BuiltinOptions2_StablehloGatherOptions, + BuiltinOptions2_StablehloTransposeOptions, + BuiltinOptions2_DilateOptions, + BuiltinOptions2_StablehloRngBitGeneratorOptions, + BuiltinOptions2_ReduceWindowOptions + }; + return values; } -flatbuffers::Offset -CreateBidirectionalSequenceRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, - const BidirectionalSequenceRNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline const char * const *EnumNamesBuiltinOptions2() { + static const char * const names[22] = { + "NONE", + "StablehloConcatenateOptions", + "StablehloBroadcastInDimOptions", + "StablehloSliceOptions", + "StablehloConvolutionOptions", + "StablehloCustomCallOptions", + "StablehloReduceOptions", + "StablehloScatterOptions", + "StablehloCompareOptions", + "StablehloDynamicSliceOptions", + "StablehloPadOptions", + "StablehloIotaOptions", + "StablehloDotGeneralOptions", + "StablehloReduceWindowOptions", + "StablehloSortOptions", + "StablehloWhileOptions", + "StablehloGatherOptions", + "StablehloTransposeOptions", + "DilateOptions", + "StablehloRngBitGeneratorOptions", + "ReduceWindowOptions", + nullptr + }; + return names; +} -struct FullyConnectedOptionsT : public flatbuffers::NativeTable -{ - typedef FullyConnectedOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - circle::FullyConnectedOptionsWeightsFormat weights_format = - circle::FullyConnectedOptionsWeightsFormat_DEFAULT; - bool keep_num_dims = false; - bool asymmetric_quantize_inputs = false; +inline const char *EnumNameBuiltinOptions2(BuiltinOptions2 e) { + if (flatbuffers::IsOutRange(e, BuiltinOptions2_NONE, BuiltinOptions2_ReduceWindowOptions)) return ""; + const size_t index = static_cast(e); + return EnumNamesBuiltinOptions2()[index]; +} + +template struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_NONE; }; -struct FullyConnectedOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef FullyConnectedOptionsT NativeTableType; - typedef FullyConnectedOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4, - VT_WEIGHTS_FORMAT = 6, - VT_KEEP_NUM_DIMS = 8, - VT_ASYMMETRIC_QUANTIZE_INPUTS = 10 - }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - circle::FullyConnectedOptionsWeightsFormat weights_format() const - { - return static_cast( - GetField(VT_WEIGHTS_FORMAT, 0)); - } - bool keep_num_dims() const { return GetField(VT_KEEP_NUM_DIMS, 0) != 0; } - bool asymmetric_quantize_inputs() const - { - return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_WEIGHTS_FORMAT) && - VerifyField(verifier, VT_KEEP_NUM_DIMS) && - VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && verifier.EndTable(); - } - FullyConnectedOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(FullyConnectedOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const FullyConnectedOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloConcatenateOptions; }; -struct FullyConnectedOptionsBuilder -{ - typedef FullyConnectedOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(FullyConnectedOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - void add_weights_format(circle::FullyConnectedOptionsWeightsFormat weights_format) - { - fbb_.AddElement(FullyConnectedOptions::VT_WEIGHTS_FORMAT, - static_cast(weights_format), 0); - } - void add_keep_num_dims(bool keep_num_dims) - { - fbb_.AddElement(FullyConnectedOptions::VT_KEEP_NUM_DIMS, - static_cast(keep_num_dims), 0); - } - void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) - { - fbb_.AddElement(FullyConnectedOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, - static_cast(asymmetric_quantize_inputs), 0); - } - explicit FullyConnectedOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloBroadcastInDimOptions; }; -inline flatbuffers::Offset CreateFullyConnectedOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - circle::FullyConnectedOptionsWeightsFormat weights_format = - circle::FullyConnectedOptionsWeightsFormat_DEFAULT, - bool keep_num_dims = false, bool asymmetric_quantize_inputs = false) -{ - FullyConnectedOptionsBuilder builder_(_fbb); - builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); - builder_.add_keep_num_dims(keep_num_dims); - builder_.add_weights_format(weights_format); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloSliceOptions; +}; -flatbuffers::Offset -CreateFullyConnectedOptions(flatbuffers::FlatBufferBuilder &_fbb, const FullyConnectedOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloConvolutionOptions; +}; -struct SoftmaxOptionsT : public flatbuffers::NativeTable -{ - typedef SoftmaxOptions TableType; - float beta = 0.0f; +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloCustomCallOptions; }; -struct SoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SoftmaxOptionsT NativeTableType; - typedef SoftmaxOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_BETA = 4 - }; - float beta() const { return GetField(VT_BETA, 0.0f); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_BETA) && - verifier.EndTable(); - } - SoftmaxOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SoftmaxOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SoftmaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloReduceOptions; }; -struct SoftmaxOptionsBuilder -{ - typedef SoftmaxOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_beta(float beta) { fbb_.AddElement(SoftmaxOptions::VT_BETA, beta, 0.0f); } - explicit SoftmaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloScatterOptions; }; -inline flatbuffers::Offset -CreateSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb, float beta = 0.0f) -{ - SoftmaxOptionsBuilder builder_(_fbb); - builder_.add_beta(beta); - return builder_.Finish(); -} +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloCompareOptions; +}; -flatbuffers::Offset -CreateSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const SoftmaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloDynamicSliceOptions; +}; -struct ConcatenationOptionsT : public flatbuffers::NativeTable -{ - typedef ConcatenationOptions TableType; - int32_t axis = 0; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloPadOptions; }; -struct ConcatenationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ConcatenationOptionsT NativeTableType; - typedef ConcatenationOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_AXIS = 4, - VT_FUSED_ACTIVATION_FUNCTION = 6 - }; - int32_t axis() const { return GetField(VT_AXIS, 0); } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_AXIS) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && verifier.EndTable(); - } - ConcatenationOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ConcatenationOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ConcatenationOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloIotaOptions; }; -struct ConcatenationOptionsBuilder -{ - typedef ConcatenationOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_axis(int32_t axis) { fbb_.AddElement(ConcatenationOptions::VT_AXIS, axis, 0); } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(ConcatenationOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - explicit ConcatenationOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloDotGeneralOptions; }; -inline flatbuffers::Offset CreateConcatenationOptions( - flatbuffers::FlatBufferBuilder &_fbb, int32_t axis = 0, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) -{ - ConcatenationOptionsBuilder builder_(_fbb); - builder_.add_axis(axis); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloReduceWindowOptions; +}; -flatbuffers::Offset -CreateConcatenationOptions(flatbuffers::FlatBufferBuilder &_fbb, const ConcatenationOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloSortOptions; +}; -struct AddOptionsT : public flatbuffers::NativeTable -{ - typedef AddOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - bool pot_scale_int16 = true; +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloWhileOptions; }; -struct AddOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef AddOptionsT NativeTableType; - typedef AddOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4, - VT_POT_SCALE_INT16 = 6 - }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool pot_scale_int16() const { return GetField(VT_POT_SCALE_INT16, 1) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_POT_SCALE_INT16) && verifier.EndTable(); - } - AddOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(AddOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const AddOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloGatherOptions; }; -struct AddOptionsBuilder -{ - typedef AddOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(AddOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - void add_pot_scale_int16(bool pot_scale_int16) - { - fbb_.AddElement(AddOptions::VT_POT_SCALE_INT16, static_cast(pot_scale_int16), - 1); - } - explicit AddOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloTransposeOptions; }; -inline flatbuffers::Offset CreateAddOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - bool pot_scale_int16 = true) -{ - AddOptionsBuilder builder_(_fbb); - builder_.add_pot_scale_int16(pot_scale_int16); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_DilateOptions; +}; -flatbuffers::Offset -CreateAddOptions(flatbuffers::FlatBufferBuilder &_fbb, const AddOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_StablehloRngBitGeneratorOptions; +}; -struct MulOptionsT : public flatbuffers::NativeTable -{ - typedef MulOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; -}; - -struct MulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef MulOptionsT NativeTableType; - typedef MulOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4 - }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && verifier.EndTable(); - } - MulOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(MulOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const MulOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct MulOptionsBuilder -{ - typedef MulOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(MulOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - explicit MulOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } +template<> struct BuiltinOptions2Traits { + static const BuiltinOptions2 enum_value = BuiltinOptions2_ReduceWindowOptions; }; -inline flatbuffers::Offset CreateMulOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) -{ - MulOptionsBuilder builder_(_fbb); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} +struct BuiltinOptions2Union { + BuiltinOptions2 type; + void *value; -flatbuffers::Offset -CreateMulOptions(flatbuffers::FlatBufferBuilder &_fbb, const MulOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + BuiltinOptions2Union() : type(BuiltinOptions2_NONE), value(nullptr) {} + BuiltinOptions2Union(BuiltinOptions2Union&& u) FLATBUFFERS_NOEXCEPT : + type(BuiltinOptions2_NONE), value(nullptr) + { std::swap(type, u.type); std::swap(value, u.value); } + BuiltinOptions2Union(const BuiltinOptions2Union &); + BuiltinOptions2Union &operator=(const BuiltinOptions2Union &u) + { BuiltinOptions2Union t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } + BuiltinOptions2Union &operator=(BuiltinOptions2Union &&u) FLATBUFFERS_NOEXCEPT + { std::swap(type, u.type); std::swap(value, u.value); return *this; } + ~BuiltinOptions2Union() { Reset(); } -struct L2NormOptionsT : public flatbuffers::NativeTable -{ - typedef L2NormOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; -}; + void Reset(); -struct L2NormOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef L2NormOptionsT NativeTableType; - typedef L2NormOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4 - }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && verifier.EndTable(); +#ifndef FLATBUFFERS_CPP98_STL + template + void Set(T&& val) { + using RT = typename std::remove_reference::type; + Reset(); + type = BuiltinOptions2Traits::enum_value; + if (type != BuiltinOptions2_NONE) { + value = new RT(std::forward(val)); + } } - L2NormOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(L2NormOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const L2NormOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; +#endif // FLATBUFFERS_CPP98_STL -struct L2NormOptionsBuilder -{ - typedef L2NormOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(L2NormOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + static void *UnPack(const void *obj, BuiltinOptions2 type, const flatbuffers::resolver_function_t *resolver); + flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; + + circle::StablehloConcatenateOptionsT *AsStablehloConcatenateOptions() { + return type == BuiltinOptions2_StablehloConcatenateOptions ? + reinterpret_cast(value) : nullptr; } - explicit L2NormOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::StablehloConcatenateOptionsT *AsStablehloConcatenateOptions() const { + return type == BuiltinOptions2_StablehloConcatenateOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::StablehloBroadcastInDimOptionsT *AsStablehloBroadcastInDimOptions() { + return type == BuiltinOptions2_StablehloBroadcastInDimOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateL2NormOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) -{ - L2NormOptionsBuilder builder_(_fbb); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateL2NormOptions(flatbuffers::FlatBufferBuilder &_fbb, const L2NormOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct LocalResponseNormalizationOptionsT : public flatbuffers::NativeTable -{ - typedef LocalResponseNormalizationOptions TableType; - int32_t radius = 0; - float bias = 0.0f; - float alpha = 0.0f; - float beta = 0.0f; -}; - -struct LocalResponseNormalizationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LocalResponseNormalizationOptionsT NativeTableType; - typedef LocalResponseNormalizationOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_RADIUS = 4, - VT_BIAS = 6, - VT_ALPHA = 8, - VT_BETA = 10 - }; - int32_t radius() const { return GetField(VT_RADIUS, 0); } - float bias() const { return GetField(VT_BIAS, 0.0f); } - float alpha() const { return GetField(VT_ALPHA, 0.0f); } - float beta() const { return GetField(VT_BETA, 0.0f); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_RADIUS) && - VerifyField(verifier, VT_BIAS) && VerifyField(verifier, VT_ALPHA) && - VerifyField(verifier, VT_BETA) && verifier.EndTable(); - } - LocalResponseNormalizationOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LocalResponseNormalizationOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LocalResponseNormalizationOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct LocalResponseNormalizationOptionsBuilder -{ - typedef LocalResponseNormalizationOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_radius(int32_t radius) - { - fbb_.AddElement(LocalResponseNormalizationOptions::VT_RADIUS, radius, 0); + const circle::StablehloBroadcastInDimOptionsT *AsStablehloBroadcastInDimOptions() const { + return type == BuiltinOptions2_StablehloBroadcastInDimOptions ? + reinterpret_cast(value) : nullptr; } - void add_bias(float bias) - { - fbb_.AddElement(LocalResponseNormalizationOptions::VT_BIAS, bias, 0.0f); + circle::StablehloSliceOptionsT *AsStablehloSliceOptions() { + return type == BuiltinOptions2_StablehloSliceOptions ? + reinterpret_cast(value) : nullptr; } - void add_alpha(float alpha) - { - fbb_.AddElement(LocalResponseNormalizationOptions::VT_ALPHA, alpha, 0.0f); + const circle::StablehloSliceOptionsT *AsStablehloSliceOptions() const { + return type == BuiltinOptions2_StablehloSliceOptions ? + reinterpret_cast(value) : nullptr; } - void add_beta(float beta) - { - fbb_.AddElement(LocalResponseNormalizationOptions::VT_BETA, beta, 0.0f); + circle::StablehloConvolutionOptionsT *AsStablehloConvolutionOptions() { + return type == BuiltinOptions2_StablehloConvolutionOptions ? + reinterpret_cast(value) : nullptr; } - explicit LocalResponseNormalizationOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::StablehloConvolutionOptionsT *AsStablehloConvolutionOptions() const { + return type == BuiltinOptions2_StablehloConvolutionOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::StablehloCustomCallOptionsT *AsStablehloCustomCallOptions() { + return type == BuiltinOptions2_StablehloCustomCallOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset -CreateLocalResponseNormalizationOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t radius = 0, - float bias = 0.0f, float alpha = 0.0f, float beta = 0.0f) -{ - LocalResponseNormalizationOptionsBuilder builder_(_fbb); - builder_.add_beta(beta); - builder_.add_alpha(alpha); - builder_.add_bias(bias); - builder_.add_radius(radius); - return builder_.Finish(); -} - -flatbuffers::Offset CreateLocalResponseNormalizationOptions( - flatbuffers::FlatBufferBuilder &_fbb, const LocalResponseNormalizationOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct LSTMOptionsT : public flatbuffers::NativeTable -{ - typedef LSTMOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - float cell_clip = 0.0f; - float proj_clip = 0.0f; - circle::LSTMKernelType kernel_type = circle::LSTMKernelType_FULL; - bool asymmetric_quantize_inputs = false; -}; - -struct LSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LSTMOptionsT NativeTableType; - typedef LSTMOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4, - VT_CELL_CLIP = 6, - VT_PROJ_CLIP = 8, - VT_KERNEL_TYPE = 10, - VT_ASYMMETRIC_QUANTIZE_INPUTS = 12 - }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - float cell_clip() const { return GetField(VT_CELL_CLIP, 0.0f); } - float proj_clip() const { return GetField(VT_PROJ_CLIP, 0.0f); } - circle::LSTMKernelType kernel_type() const - { - return static_cast(GetField(VT_KERNEL_TYPE, 0)); + const circle::StablehloCustomCallOptionsT *AsStablehloCustomCallOptions() const { + return type == BuiltinOptions2_StablehloCustomCallOptions ? + reinterpret_cast(value) : nullptr; } - bool asymmetric_quantize_inputs() const - { - return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + circle::StablehloReduceOptionsT *AsStablehloReduceOptions() { + return type == BuiltinOptions2_StablehloReduceOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_CELL_CLIP) && - VerifyField(verifier, VT_PROJ_CLIP) && - VerifyField(verifier, VT_KERNEL_TYPE) && - VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && verifier.EndTable(); + const circle::StablehloReduceOptionsT *AsStablehloReduceOptions() const { + return type == BuiltinOptions2_StablehloReduceOptions ? + reinterpret_cast(value) : nullptr; } - LSTMOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LSTMOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct LSTMOptionsBuilder -{ - typedef LSTMOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(LSTMOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + circle::StablehloScatterOptionsT *AsStablehloScatterOptions() { + return type == BuiltinOptions2_StablehloScatterOptions ? + reinterpret_cast(value) : nullptr; } - void add_cell_clip(float cell_clip) - { - fbb_.AddElement(LSTMOptions::VT_CELL_CLIP, cell_clip, 0.0f); + const circle::StablehloScatterOptionsT *AsStablehloScatterOptions() const { + return type == BuiltinOptions2_StablehloScatterOptions ? + reinterpret_cast(value) : nullptr; } - void add_proj_clip(float proj_clip) - { - fbb_.AddElement(LSTMOptions::VT_PROJ_CLIP, proj_clip, 0.0f); + circle::StablehloCompareOptionsT *AsStablehloCompareOptions() { + return type == BuiltinOptions2_StablehloCompareOptions ? + reinterpret_cast(value) : nullptr; } - void add_kernel_type(circle::LSTMKernelType kernel_type) - { - fbb_.AddElement(LSTMOptions::VT_KERNEL_TYPE, static_cast(kernel_type), 0); + const circle::StablehloCompareOptionsT *AsStablehloCompareOptions() const { + return type == BuiltinOptions2_StablehloCompareOptions ? + reinterpret_cast(value) : nullptr; } - void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) - { - fbb_.AddElement(LSTMOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, - static_cast(asymmetric_quantize_inputs), 0); + circle::StablehloDynamicSliceOptionsT *AsStablehloDynamicSliceOptions() { + return type == BuiltinOptions2_StablehloDynamicSliceOptions ? + reinterpret_cast(value) : nullptr; } - explicit LSTMOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::StablehloDynamicSliceOptionsT *AsStablehloDynamicSliceOptions() const { + return type == BuiltinOptions2_StablehloDynamicSliceOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + circle::StablehloPadOptionsT *AsStablehloPadOptions() { + return type == BuiltinOptions2_StablehloPadOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset CreateLSTMOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - float cell_clip = 0.0f, float proj_clip = 0.0f, - circle::LSTMKernelType kernel_type = circle::LSTMKernelType_FULL, - bool asymmetric_quantize_inputs = false) -{ - LSTMOptionsBuilder builder_(_fbb); - builder_.add_proj_clip(proj_clip); - builder_.add_cell_clip(cell_clip); - builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); - builder_.add_kernel_type(kernel_type); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, const LSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct UnidirectionalSequenceLSTMOptionsT : public flatbuffers::NativeTable -{ - typedef UnidirectionalSequenceLSTMOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - float cell_clip = 0.0f; - float proj_clip = 0.0f; - bool time_major = false; - bool asymmetric_quantize_inputs = false; - bool diagonal_recurrent_tensors = false; -}; - -struct UnidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef UnidirectionalSequenceLSTMOptionsT NativeTableType; - typedef UnidirectionalSequenceLSTMOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4, - VT_CELL_CLIP = 6, - VT_PROJ_CLIP = 8, - VT_TIME_MAJOR = 10, - VT_ASYMMETRIC_QUANTIZE_INPUTS = 12, - VT_DIAGONAL_RECURRENT_TENSORS = 14 - }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - float cell_clip() const { return GetField(VT_CELL_CLIP, 0.0f); } - float proj_clip() const { return GetField(VT_PROJ_CLIP, 0.0f); } - bool time_major() const { return GetField(VT_TIME_MAJOR, 0) != 0; } - bool asymmetric_quantize_inputs() const - { - return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + const circle::StablehloPadOptionsT *AsStablehloPadOptions() const { + return type == BuiltinOptions2_StablehloPadOptions ? + reinterpret_cast(value) : nullptr; } - bool diagonal_recurrent_tensors() const - { - return GetField(VT_DIAGONAL_RECURRENT_TENSORS, 0) != 0; + circle::StablehloIotaOptionsT *AsStablehloIotaOptions() { + return type == BuiltinOptions2_StablehloIotaOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_CELL_CLIP) && - VerifyField(verifier, VT_PROJ_CLIP) && - VerifyField(verifier, VT_TIME_MAJOR) && - VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && - VerifyField(verifier, VT_DIAGONAL_RECURRENT_TENSORS) && verifier.EndTable(); + const circle::StablehloIotaOptionsT *AsStablehloIotaOptions() const { + return type == BuiltinOptions2_StablehloIotaOptions ? + reinterpret_cast(value) : nullptr; } - UnidirectionalSequenceLSTMOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(UnidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct UnidirectionalSequenceLSTMOptionsBuilder -{ - typedef UnidirectionalSequenceLSTMOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + circle::StablehloDotGeneralOptionsT *AsStablehloDotGeneralOptions() { + return type == BuiltinOptions2_StablehloDotGeneralOptions ? + reinterpret_cast(value) : nullptr; } - void add_cell_clip(float cell_clip) - { - fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_CELL_CLIP, cell_clip, 0.0f); + const circle::StablehloDotGeneralOptionsT *AsStablehloDotGeneralOptions() const { + return type == BuiltinOptions2_StablehloDotGeneralOptions ? + reinterpret_cast(value) : nullptr; } - void add_proj_clip(float proj_clip) - { - fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_PROJ_CLIP, proj_clip, 0.0f); + circle::StablehloReduceWindowOptionsT *AsStablehloReduceWindowOptions() { + return type == BuiltinOptions2_StablehloReduceWindowOptions ? + reinterpret_cast(value) : nullptr; } - void add_time_major(bool time_major) - { - fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_TIME_MAJOR, - static_cast(time_major), 0); + const circle::StablehloReduceWindowOptionsT *AsStablehloReduceWindowOptions() const { + return type == BuiltinOptions2_StablehloReduceWindowOptions ? + reinterpret_cast(value) : nullptr; } - void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) - { - fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, - static_cast(asymmetric_quantize_inputs), 0); + circle::StablehloSortOptionsT *AsStablehloSortOptions() { + return type == BuiltinOptions2_StablehloSortOptions ? + reinterpret_cast(value) : nullptr; } - void add_diagonal_recurrent_tensors(bool diagonal_recurrent_tensors) - { - fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_DIAGONAL_RECURRENT_TENSORS, - static_cast(diagonal_recurrent_tensors), 0); + const circle::StablehloSortOptionsT *AsStablehloSortOptions() const { + return type == BuiltinOptions2_StablehloSortOptions ? + reinterpret_cast(value) : nullptr; } - explicit UnidirectionalSequenceLSTMOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::StablehloWhileOptionsT *AsStablehloWhileOptions() { + return type == BuiltinOptions2_StablehloWhileOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::StablehloWhileOptionsT *AsStablehloWhileOptions() const { + return type == BuiltinOptions2_StablehloWhileOptions ? + reinterpret_cast(value) : nullptr; } -}; - -inline flatbuffers::Offset -CreateUnidirectionalSequenceLSTMOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - float cell_clip = 0.0f, float proj_clip = 0.0f, bool time_major = false, - bool asymmetric_quantize_inputs = false, bool diagonal_recurrent_tensors = false) -{ - UnidirectionalSequenceLSTMOptionsBuilder builder_(_fbb); - builder_.add_proj_clip(proj_clip); - builder_.add_cell_clip(cell_clip); - builder_.add_diagonal_recurrent_tensors(diagonal_recurrent_tensors); - builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); - builder_.add_time_major(time_major); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} - -flatbuffers::Offset CreateUnidirectionalSequenceLSTMOptions( - flatbuffers::FlatBufferBuilder &_fbb, const UnidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct BidirectionalSequenceLSTMOptionsT : public flatbuffers::NativeTable -{ - typedef BidirectionalSequenceLSTMOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - float cell_clip = 0.0f; - float proj_clip = 0.0f; - bool merge_outputs = false; - bool time_major = true; - bool asymmetric_quantize_inputs = false; -}; - -struct BidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BidirectionalSequenceLSTMOptionsT NativeTableType; - typedef BidirectionalSequenceLSTMOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4, - VT_CELL_CLIP = 6, - VT_PROJ_CLIP = 8, - VT_MERGE_OUTPUTS = 10, - VT_TIME_MAJOR = 12, - VT_ASYMMETRIC_QUANTIZE_INPUTS = 14 - }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - float cell_clip() const { return GetField(VT_CELL_CLIP, 0.0f); } - float proj_clip() const { return GetField(VT_PROJ_CLIP, 0.0f); } - bool merge_outputs() const { return GetField(VT_MERGE_OUTPUTS, 0) != 0; } - bool time_major() const { return GetField(VT_TIME_MAJOR, 1) != 0; } - bool asymmetric_quantize_inputs() const - { - return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + circle::StablehloGatherOptionsT *AsStablehloGatherOptions() { + return type == BuiltinOptions2_StablehloGatherOptions ? + reinterpret_cast(value) : nullptr; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_CELL_CLIP) && - VerifyField(verifier, VT_PROJ_CLIP) && - VerifyField(verifier, VT_MERGE_OUTPUTS) && - VerifyField(verifier, VT_TIME_MAJOR) && - VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && verifier.EndTable(); + const circle::StablehloGatherOptionsT *AsStablehloGatherOptions() const { + return type == BuiltinOptions2_StablehloGatherOptions ? + reinterpret_cast(value) : nullptr; } - BidirectionalSequenceLSTMOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct BidirectionalSequenceLSTMOptionsBuilder -{ - typedef BidirectionalSequenceLSTMOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + circle::StablehloTransposeOptionsT *AsStablehloTransposeOptions() { + return type == BuiltinOptions2_StablehloTransposeOptions ? + reinterpret_cast(value) : nullptr; } - void add_cell_clip(float cell_clip) - { - fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_CELL_CLIP, cell_clip, 0.0f); + const circle::StablehloTransposeOptionsT *AsStablehloTransposeOptions() const { + return type == BuiltinOptions2_StablehloTransposeOptions ? + reinterpret_cast(value) : nullptr; } - void add_proj_clip(float proj_clip) - { - fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_PROJ_CLIP, proj_clip, 0.0f); + circle::DilateOptionsT *AsDilateOptions() { + return type == BuiltinOptions2_DilateOptions ? + reinterpret_cast(value) : nullptr; } - void add_merge_outputs(bool merge_outputs) - { - fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_MERGE_OUTPUTS, - static_cast(merge_outputs), 0); + const circle::DilateOptionsT *AsDilateOptions() const { + return type == BuiltinOptions2_DilateOptions ? + reinterpret_cast(value) : nullptr; } - void add_time_major(bool time_major) - { - fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_TIME_MAJOR, - static_cast(time_major), 1); + circle::StablehloRngBitGeneratorOptionsT *AsStablehloRngBitGeneratorOptions() { + return type == BuiltinOptions2_StablehloRngBitGeneratorOptions ? + reinterpret_cast(value) : nullptr; } - void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) - { - fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, - static_cast(asymmetric_quantize_inputs), 0); + const circle::StablehloRngBitGeneratorOptionsT *AsStablehloRngBitGeneratorOptions() const { + return type == BuiltinOptions2_StablehloRngBitGeneratorOptions ? + reinterpret_cast(value) : nullptr; } - explicit BidirectionalSequenceLSTMOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::ReduceWindowOptionsT *AsReduceWindowOptions() { + return type == BuiltinOptions2_ReduceWindowOptions ? + reinterpret_cast(value) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::ReduceWindowOptionsT *AsReduceWindowOptions() const { + return type == BuiltinOptions2_ReduceWindowOptions ? + reinterpret_cast(value) : nullptr; } }; -inline flatbuffers::Offset CreateBidirectionalSequenceLSTMOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - float cell_clip = 0.0f, float proj_clip = 0.0f, bool merge_outputs = false, - bool time_major = true, bool asymmetric_quantize_inputs = false) -{ - BidirectionalSequenceLSTMOptionsBuilder builder_(_fbb); - builder_.add_proj_clip(proj_clip); - builder_.add_cell_clip(cell_clip); - builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); - builder_.add_time_major(time_major); - builder_.add_merge_outputs(merge_outputs); - builder_.add_fused_activation_function(fused_activation_function); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateBidirectionalSequenceLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, - const BidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +bool VerifyBuiltinOptions2(flatbuffers::Verifier &verifier, const void *obj, BuiltinOptions2 type); +bool VerifyBuiltinOptions2Vector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); -struct ResizeBilinearOptionsT : public flatbuffers::NativeTable -{ - typedef ResizeBilinearOptions TableType; - bool align_corners = false; - bool half_pixel_centers = false; +enum StablehloPrecisionConfig : uint32_t { + StablehloPrecisionConfig_DEFAULT = 0, + StablehloPrecisionConfig_HIGH = 1, + StablehloPrecisionConfig_HIGHEST = 2, + StablehloPrecisionConfig_MIN = StablehloPrecisionConfig_DEFAULT, + StablehloPrecisionConfig_MAX = StablehloPrecisionConfig_HIGHEST }; -struct ResizeBilinearOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ResizeBilinearOptionsT NativeTableType; - typedef ResizeBilinearOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_ALIGN_CORNERS = 8, - VT_HALF_PIXEL_CENTERS = 10 +inline const StablehloPrecisionConfig (&EnumValuesStablehloPrecisionConfig())[3] { + static const StablehloPrecisionConfig values[] = { + StablehloPrecisionConfig_DEFAULT, + StablehloPrecisionConfig_HIGH, + StablehloPrecisionConfig_HIGHEST }; - bool align_corners() const { return GetField(VT_ALIGN_CORNERS, 0) != 0; } - bool half_pixel_centers() const { return GetField(VT_HALF_PIXEL_CENTERS, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_ALIGN_CORNERS) && - VerifyField(verifier, VT_HALF_PIXEL_CENTERS) && verifier.EndTable(); - } - ResizeBilinearOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ResizeBilinearOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ResizeBilinearOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct ResizeBilinearOptionsBuilder -{ - typedef ResizeBilinearOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_align_corners(bool align_corners) - { - fbb_.AddElement(ResizeBilinearOptions::VT_ALIGN_CORNERS, - static_cast(align_corners), 0); - } - void add_half_pixel_centers(bool half_pixel_centers) - { - fbb_.AddElement(ResizeBilinearOptions::VT_HALF_PIXEL_CENTERS, - static_cast(half_pixel_centers), 0); - } - explicit ResizeBilinearOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; + return values; +} -inline flatbuffers::Offset -CreateResizeBilinearOptions(flatbuffers::FlatBufferBuilder &_fbb, bool align_corners = false, - bool half_pixel_centers = false) -{ - ResizeBilinearOptionsBuilder builder_(_fbb); - builder_.add_half_pixel_centers(half_pixel_centers); - builder_.add_align_corners(align_corners); - return builder_.Finish(); +inline const char * const *EnumNamesStablehloPrecisionConfig() { + static const char * const names[4] = { + "DEFAULT", + "HIGH", + "HIGHEST", + nullptr + }; + return names; } -flatbuffers::Offset -CreateResizeBilinearOptions(flatbuffers::FlatBufferBuilder &_fbb, const ResizeBilinearOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline const char *EnumNameStablehloPrecisionConfig(StablehloPrecisionConfig e) { + if (flatbuffers::IsOutRange(e, StablehloPrecisionConfig_DEFAULT, StablehloPrecisionConfig_HIGHEST)) return ""; + const size_t index = static_cast(e); + return EnumNamesStablehloPrecisionConfig()[index]; +} + +enum StablehloComparisonDirection : uint32_t { + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_EQ = 0, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_NE = 1, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_GE = 2, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_GT = 3, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_LE = 4, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_LT = 5, + StablehloComparisonDirection_MIN = StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_EQ, + StablehloComparisonDirection_MAX = StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_LT +}; + +inline const StablehloComparisonDirection (&EnumValuesStablehloComparisonDirection())[6] { + static const StablehloComparisonDirection values[] = { + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_EQ, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_NE, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_GE, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_GT, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_LE, + StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_LT + }; + return values; +} -struct ResizeNearestNeighborOptionsT : public flatbuffers::NativeTable -{ - typedef ResizeNearestNeighborOptions TableType; - bool align_corners = false; - bool half_pixel_centers = false; -}; +inline const char * const *EnumNamesStablehloComparisonDirection() { + static const char * const names[7] = { + "STABLEHLO_COMPARISON_DIRECTION_EQ", + "STABLEHLO_COMPARISON_DIRECTION_NE", + "STABLEHLO_COMPARISON_DIRECTION_GE", + "STABLEHLO_COMPARISON_DIRECTION_GT", + "STABLEHLO_COMPARISON_DIRECTION_LE", + "STABLEHLO_COMPARISON_DIRECTION_LT", + nullptr + }; + return names; +} -struct ResizeNearestNeighborOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ResizeNearestNeighborOptionsT NativeTableType; - typedef ResizeNearestNeighborOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_ALIGN_CORNERS = 4, - VT_HALF_PIXEL_CENTERS = 6 +inline const char *EnumNameStablehloComparisonDirection(StablehloComparisonDirection e) { + if (flatbuffers::IsOutRange(e, StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_EQ, StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_LT)) return ""; + const size_t index = static_cast(e); + return EnumNamesStablehloComparisonDirection()[index]; +} + +enum StablehloComparisonType : uint32_t { + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_NOTYPE = 0, + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_FLOAT = 1, + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_FLOAT_TOTAL_ORDER = 2, + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_SIGNED = 3, + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_UNSIGNED = 4, + StablehloComparisonType_MIN = StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_NOTYPE, + StablehloComparisonType_MAX = StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_UNSIGNED +}; + +inline const StablehloComparisonType (&EnumValuesStablehloComparisonType())[5] { + static const StablehloComparisonType values[] = { + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_NOTYPE, + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_FLOAT, + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_FLOAT_TOTAL_ORDER, + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_SIGNED, + StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_UNSIGNED }; - bool align_corners() const { return GetField(VT_ALIGN_CORNERS, 0) != 0; } - bool half_pixel_centers() const { return GetField(VT_HALF_PIXEL_CENTERS, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_ALIGN_CORNERS) && - VerifyField(verifier, VT_HALF_PIXEL_CENTERS) && verifier.EndTable(); - } - ResizeNearestNeighborOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ResizeNearestNeighborOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ResizeNearestNeighborOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct ResizeNearestNeighborOptionsBuilder -{ - typedef ResizeNearestNeighborOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_align_corners(bool align_corners) - { - fbb_.AddElement(ResizeNearestNeighborOptions::VT_ALIGN_CORNERS, - static_cast(align_corners), 0); - } - void add_half_pixel_centers(bool half_pixel_centers) - { - fbb_.AddElement(ResizeNearestNeighborOptions::VT_HALF_PIXEL_CENTERS, - static_cast(half_pixel_centers), 0); - } - explicit ResizeNearestNeighborOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; + return values; +} -inline flatbuffers::Offset -CreateResizeNearestNeighborOptions(flatbuffers::FlatBufferBuilder &_fbb, bool align_corners = false, - bool half_pixel_centers = false) -{ - ResizeNearestNeighborOptionsBuilder builder_(_fbb); - builder_.add_half_pixel_centers(half_pixel_centers); - builder_.add_align_corners(align_corners); - return builder_.Finish(); +inline const char * const *EnumNamesStablehloComparisonType() { + static const char * const names[6] = { + "STABLEHLO_COMPARISON_TYPE_NOTYPE", + "STABLEHLO_COMPARISON_TYPE_FLOAT", + "STABLEHLO_COMPARISON_TYPE_FLOAT_TOTAL_ORDER", + "STABLEHLO_COMPARISON_TYPE_SIGNED", + "STABLEHLO_COMPARISON_TYPE_UNSIGNED", + nullptr + }; + return names; } -flatbuffers::Offset -CreateResizeNearestNeighborOptions(flatbuffers::FlatBufferBuilder &_fbb, - const ResizeNearestNeighborOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline const char *EnumNameStablehloComparisonType(StablehloComparisonType e) { + if (flatbuffers::IsOutRange(e, StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_NOTYPE, StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_UNSIGNED)) return ""; + const size_t index = static_cast(e); + return EnumNamesStablehloComparisonType()[index]; +} -struct CallOptionsT : public flatbuffers::NativeTable -{ - typedef CallOptions TableType; - uint32_t subgraph = 0; +enum RngAlgorithm : int8_t { + RngAlgorithm_DEFAULT = 0, + RngAlgorithm_PHILOX = 1, + RngAlgorithm_THREEFRY = 2, + RngAlgorithm_MIN = RngAlgorithm_DEFAULT, + RngAlgorithm_MAX = RngAlgorithm_THREEFRY }; -struct CallOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef CallOptionsT NativeTableType; - typedef CallOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_SUBGRAPH = 4 +inline const RngAlgorithm (&EnumValuesRngAlgorithm())[3] { + static const RngAlgorithm values[] = { + RngAlgorithm_DEFAULT, + RngAlgorithm_PHILOX, + RngAlgorithm_THREEFRY }; - uint32_t subgraph() const { return GetField(VT_SUBGRAPH, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_SUBGRAPH) && - verifier.EndTable(); - } - CallOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(CallOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const CallOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct CallOptionsBuilder -{ - typedef CallOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_subgraph(uint32_t subgraph) - { - fbb_.AddElement(CallOptions::VT_SUBGRAPH, subgraph, 0); - } - explicit CallOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; + return values; +} -inline flatbuffers::Offset CreateCallOptions(flatbuffers::FlatBufferBuilder &_fbb, - uint32_t subgraph = 0) -{ - CallOptionsBuilder builder_(_fbb); - builder_.add_subgraph(subgraph); - return builder_.Finish(); +inline const char * const *EnumNamesRngAlgorithm() { + static const char * const names[4] = { + "DEFAULT", + "PHILOX", + "THREEFRY", + nullptr + }; + return names; } -flatbuffers::Offset -CreateCallOptions(flatbuffers::FlatBufferBuilder &_fbb, const CallOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline const char *EnumNameRngAlgorithm(RngAlgorithm e) { + if (flatbuffers::IsOutRange(e, RngAlgorithm_DEFAULT, RngAlgorithm_THREEFRY)) return ""; + const size_t index = static_cast(e); + return EnumNamesRngAlgorithm()[index]; +} -struct PadOptionsT : public flatbuffers::NativeTable -{ - typedef PadOptions TableType; +enum Padding : int8_t { + Padding_SAME = 0, + Padding_VALID = 1, + Padding_MIN = Padding_SAME, + Padding_MAX = Padding_VALID }; -struct PadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef PadOptionsT NativeTableType; - typedef PadOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); - } - PadOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(PadOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; +inline const Padding (&EnumValuesPadding())[2] { + static const Padding values[] = { + Padding_SAME, + Padding_VALID + }; + return values; +} -struct PadOptionsBuilder -{ - typedef PadOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit PadOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } +inline const char * const *EnumNamesPadding() { + static const char * const names[3] = { + "SAME", + "VALID", + nullptr + }; + return names; +} + +inline const char *EnumNamePadding(Padding e) { + if (flatbuffers::IsOutRange(e, Padding_SAME, Padding_VALID)) return ""; + const size_t index = static_cast(e); + return EnumNamesPadding()[index]; +} + +enum ActivationFunctionType : int8_t { + ActivationFunctionType_NONE = 0, + ActivationFunctionType_RELU = 1, + ActivationFunctionType_RELU_N1_TO_1 = 2, + ActivationFunctionType_RELU6 = 3, + ActivationFunctionType_TANH = 4, + ActivationFunctionType_SIGN_BIT = 5, + ActivationFunctionType_MIN = ActivationFunctionType_NONE, + ActivationFunctionType_MAX = ActivationFunctionType_SIGN_BIT }; -inline flatbuffers::Offset CreatePadOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - PadOptionsBuilder builder_(_fbb); - return builder_.Finish(); +inline const ActivationFunctionType (&EnumValuesActivationFunctionType())[6] { + static const ActivationFunctionType values[] = { + ActivationFunctionType_NONE, + ActivationFunctionType_RELU, + ActivationFunctionType_RELU_N1_TO_1, + ActivationFunctionType_RELU6, + ActivationFunctionType_TANH, + ActivationFunctionType_SIGN_BIT + }; + return values; } -flatbuffers::Offset -CreatePadOptions(flatbuffers::FlatBufferBuilder &_fbb, const PadOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline const char * const *EnumNamesActivationFunctionType() { + static const char * const names[7] = { + "NONE", + "RELU", + "RELU_N1_TO_1", + "RELU6", + "TANH", + "SIGN_BIT", + nullptr + }; + return names; +} -struct PadV2OptionsT : public flatbuffers::NativeTable -{ - typedef PadV2Options TableType; -}; +inline const char *EnumNameActivationFunctionType(ActivationFunctionType e) { + if (flatbuffers::IsOutRange(e, ActivationFunctionType_NONE, ActivationFunctionType_SIGN_BIT)) return ""; + const size_t index = static_cast(e); + return EnumNamesActivationFunctionType()[index]; +} -struct PadV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef PadV2OptionsT NativeTableType; - typedef PadV2OptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); - } - PadV2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(PadV2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +enum LSHProjectionType : int8_t { + LSHProjectionType_UNKNOWN = 0, + LSHProjectionType_SPARSE = 1, + LSHProjectionType_DENSE = 2, + LSHProjectionType_MIN = LSHProjectionType_UNKNOWN, + LSHProjectionType_MAX = LSHProjectionType_DENSE }; -struct PadV2OptionsBuilder -{ - typedef PadV2Options Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit PadV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; +inline const LSHProjectionType (&EnumValuesLSHProjectionType())[3] { + static const LSHProjectionType values[] = { + LSHProjectionType_UNKNOWN, + LSHProjectionType_SPARSE, + LSHProjectionType_DENSE + }; + return values; +} -inline flatbuffers::Offset CreatePadV2Options(flatbuffers::FlatBufferBuilder &_fbb) -{ - PadV2OptionsBuilder builder_(_fbb); - return builder_.Finish(); +inline const char * const *EnumNamesLSHProjectionType() { + static const char * const names[4] = { + "UNKNOWN", + "SPARSE", + "DENSE", + nullptr + }; + return names; } -flatbuffers::Offset -CreatePadV2Options(flatbuffers::FlatBufferBuilder &_fbb, const PadV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline const char *EnumNameLSHProjectionType(LSHProjectionType e) { + if (flatbuffers::IsOutRange(e, LSHProjectionType_UNKNOWN, LSHProjectionType_DENSE)) return ""; + const size_t index = static_cast(e); + return EnumNamesLSHProjectionType()[index]; +} -struct ReshapeOptionsT : public flatbuffers::NativeTable -{ - typedef ReshapeOptions TableType; - std::vector new_shape{}; +enum FullyConnectedOptionsWeightsFormat : int8_t { + FullyConnectedOptionsWeightsFormat_DEFAULT = 0, + FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8 = 1, + FullyConnectedOptionsWeightsFormat_SHUFFLED16x1FLOAT32 = 127, + FullyConnectedOptionsWeightsFormat_MIN = FullyConnectedOptionsWeightsFormat_DEFAULT, + FullyConnectedOptionsWeightsFormat_MAX = FullyConnectedOptionsWeightsFormat_SHUFFLED16x1FLOAT32 }; -struct ReshapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ReshapeOptionsT NativeTableType; - typedef ReshapeOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_NEW_SHAPE = 4 +inline const FullyConnectedOptionsWeightsFormat (&EnumValuesFullyConnectedOptionsWeightsFormat())[3] { + static const FullyConnectedOptionsWeightsFormat values[] = { + FullyConnectedOptionsWeightsFormat_DEFAULT, + FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8, + FullyConnectedOptionsWeightsFormat_SHUFFLED16x1FLOAT32 }; - const flatbuffers::Vector *new_shape() const - { - return GetPointer *>(VT_NEW_SHAPE); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_NEW_SHAPE) && - verifier.VerifyVector(new_shape()) && verifier.EndTable(); - } - ReshapeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ReshapeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; + return values; +} -struct ReshapeOptionsBuilder -{ - typedef ReshapeOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_new_shape(flatbuffers::Offset> new_shape) - { - fbb_.AddOffset(ReshapeOptions::VT_NEW_SHAPE, new_shape); - } - explicit ReshapeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; +inline const char *EnumNameFullyConnectedOptionsWeightsFormat(FullyConnectedOptionsWeightsFormat e) { + switch (e) { + case FullyConnectedOptionsWeightsFormat_DEFAULT: return "DEFAULT"; + case FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8: return "SHUFFLED4x16INT8"; + case FullyConnectedOptionsWeightsFormat_SHUFFLED16x1FLOAT32: return "SHUFFLED16x1FLOAT32"; + default: return ""; } +} + +enum LSTMKernelType : int8_t { + LSTMKernelType_FULL = 0, + LSTMKernelType_BASIC = 1, + LSTMKernelType_MIN = LSTMKernelType_FULL, + LSTMKernelType_MAX = LSTMKernelType_BASIC }; -inline flatbuffers::Offset -CreateReshapeOptions(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> new_shape = 0) -{ - ReshapeOptionsBuilder builder_(_fbb); - builder_.add_new_shape(new_shape); - return builder_.Finish(); +inline const LSTMKernelType (&EnumValuesLSTMKernelType())[2] { + static const LSTMKernelType values[] = { + LSTMKernelType_FULL, + LSTMKernelType_BASIC + }; + return values; } -inline flatbuffers::Offset -CreateReshapeOptionsDirect(flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *new_shape = nullptr) -{ - auto new_shape__ = new_shape ? _fbb.CreateVector(*new_shape) : 0; - return circle::CreateReshapeOptions(_fbb, new_shape__); +inline const char * const *EnumNamesLSTMKernelType() { + static const char * const names[3] = { + "FULL", + "BASIC", + nullptr + }; + return names; } -flatbuffers::Offset -CreateReshapeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct SpaceToBatchNDOptionsT : public flatbuffers::NativeTable -{ - typedef SpaceToBatchNDOptions TableType; -}; +inline const char *EnumNameLSTMKernelType(LSTMKernelType e) { + if (flatbuffers::IsOutRange(e, LSTMKernelType_FULL, LSTMKernelType_BASIC)) return ""; + const size_t index = static_cast(e); + return EnumNamesLSTMKernelType()[index]; +} -struct SpaceToBatchNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SpaceToBatchNDOptionsT NativeTableType; - typedef SpaceToBatchNDOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); - } - SpaceToBatchNDOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SpaceToBatchNDOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToBatchNDOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +enum CombinerType : int8_t { + CombinerType_SUM = 0, + CombinerType_MEAN = 1, + CombinerType_SQRTN = 2, + CombinerType_MIN = CombinerType_SUM, + CombinerType_MAX = CombinerType_SQRTN }; -struct SpaceToBatchNDOptionsBuilder -{ - typedef SpaceToBatchNDOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit SpaceToBatchNDOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; +inline const CombinerType (&EnumValuesCombinerType())[3] { + static const CombinerType values[] = { + CombinerType_SUM, + CombinerType_MEAN, + CombinerType_SQRTN + }; + return values; +} -inline flatbuffers::Offset -CreateSpaceToBatchNDOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - SpaceToBatchNDOptionsBuilder builder_(_fbb); - return builder_.Finish(); +inline const char * const *EnumNamesCombinerType() { + static const char * const names[4] = { + "SUM", + "MEAN", + "SQRTN", + nullptr + }; + return names; } -flatbuffers::Offset -CreateSpaceToBatchNDOptions(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToBatchNDOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline const char *EnumNameCombinerType(CombinerType e) { + if (flatbuffers::IsOutRange(e, CombinerType_SUM, CombinerType_SQRTN)) return ""; + const size_t index = static_cast(e); + return EnumNamesCombinerType()[index]; +} -struct BatchToSpaceNDOptionsT : public flatbuffers::NativeTable -{ - typedef BatchToSpaceNDOptions TableType; +enum MirrorPadMode : int8_t { + MirrorPadMode_REFLECT = 0, + MirrorPadMode_SYMMETRIC = 1, + MirrorPadMode_MIN = MirrorPadMode_REFLECT, + MirrorPadMode_MAX = MirrorPadMode_SYMMETRIC }; -struct BatchToSpaceNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BatchToSpaceNDOptionsT NativeTableType; - typedef BatchToSpaceNDOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); - } - BatchToSpaceNDOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BatchToSpaceNDOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchToSpaceNDOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; +inline const MirrorPadMode (&EnumValuesMirrorPadMode())[2] { + static const MirrorPadMode values[] = { + MirrorPadMode_REFLECT, + MirrorPadMode_SYMMETRIC + }; + return values; +} -struct BatchToSpaceNDOptionsBuilder -{ - typedef BatchToSpaceNDOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit BatchToSpaceNDOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; +inline const char * const *EnumNamesMirrorPadMode() { + static const char * const names[3] = { + "REFLECT", + "SYMMETRIC", + nullptr + }; + return names; +} -inline flatbuffers::Offset -CreateBatchToSpaceNDOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - BatchToSpaceNDOptionsBuilder builder_(_fbb); - return builder_.Finish(); +inline const char *EnumNameMirrorPadMode(MirrorPadMode e) { + if (flatbuffers::IsOutRange(e, MirrorPadMode_REFLECT, MirrorPadMode_SYMMETRIC)) return ""; + const size_t index = static_cast(e); + return EnumNamesMirrorPadMode()[index]; } -flatbuffers::Offset -CreateBatchToSpaceNDOptions(flatbuffers::FlatBufferBuilder &_fbb, const BatchToSpaceNDOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +enum ReduceWindowFunction : int32_t { + ReduceWindowFunction_UNSUPPORTED = 0, + ReduceWindowFunction_ADD = 1, + ReduceWindowFunction_MUL = 2, + ReduceWindowFunction_MINIMUM = 3, + ReduceWindowFunction_MAXIMUM = 4, + ReduceWindowFunction_ALL = 5, + ReduceWindowFunction_ANY = 6, + ReduceWindowFunction_MIN = ReduceWindowFunction_UNSUPPORTED, + ReduceWindowFunction_MAX = ReduceWindowFunction_ANY +}; + +inline const ReduceWindowFunction (&EnumValuesReduceWindowFunction())[7] { + static const ReduceWindowFunction values[] = { + ReduceWindowFunction_UNSUPPORTED, + ReduceWindowFunction_ADD, + ReduceWindowFunction_MUL, + ReduceWindowFunction_MINIMUM, + ReduceWindowFunction_MAXIMUM, + ReduceWindowFunction_ALL, + ReduceWindowFunction_ANY + }; + return values; +} -struct SkipGramOptionsT : public flatbuffers::NativeTable -{ - typedef SkipGramOptions TableType; - int32_t ngram_size = 0; - int32_t max_skip_size = 0; - bool include_all_ngrams = false; +inline const char * const *EnumNamesReduceWindowFunction() { + static const char * const names[8] = { + "UNSUPPORTED", + "ADD", + "MUL", + "MINIMUM", + "MAXIMUM", + "ALL", + "ANY", + nullptr + }; + return names; +} + +inline const char *EnumNameReduceWindowFunction(ReduceWindowFunction e) { + if (flatbuffers::IsOutRange(e, ReduceWindowFunction_UNSUPPORTED, ReduceWindowFunction_ANY)) return ""; + const size_t index = static_cast(e); + return EnumNamesReduceWindowFunction()[index]; +} + +enum CustomOptionsFormat : int8_t { + CustomOptionsFormat_FLEXBUFFERS = 0, + CustomOptionsFormat_MIN = CustomOptionsFormat_FLEXBUFFERS, + CustomOptionsFormat_MAX = CustomOptionsFormat_FLEXBUFFERS }; -struct SkipGramOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SkipGramOptionsT NativeTableType; - typedef SkipGramOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_NGRAM_SIZE = 4, - VT_MAX_SKIP_SIZE = 6, - VT_INCLUDE_ALL_NGRAMS = 8 +inline const CustomOptionsFormat (&EnumValuesCustomOptionsFormat())[1] { + static const CustomOptionsFormat values[] = { + CustomOptionsFormat_FLEXBUFFERS }; - int32_t ngram_size() const { return GetField(VT_NGRAM_SIZE, 0); } - int32_t max_skip_size() const { return GetField(VT_MAX_SKIP_SIZE, 0); } - bool include_all_ngrams() const { return GetField(VT_INCLUDE_ALL_NGRAMS, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_NGRAM_SIZE) && - VerifyField(verifier, VT_MAX_SKIP_SIZE) && - VerifyField(verifier, VT_INCLUDE_ALL_NGRAMS) && verifier.EndTable(); - } - SkipGramOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SkipGramOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SkipGramOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; + return values; +} -struct SkipGramOptionsBuilder -{ - typedef SkipGramOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_ngram_size(int32_t ngram_size) - { - fbb_.AddElement(SkipGramOptions::VT_NGRAM_SIZE, ngram_size, 0); - } - void add_max_skip_size(int32_t max_skip_size) - { - fbb_.AddElement(SkipGramOptions::VT_MAX_SKIP_SIZE, max_skip_size, 0); - } - void add_include_all_ngrams(bool include_all_ngrams) - { - fbb_.AddElement(SkipGramOptions::VT_INCLUDE_ALL_NGRAMS, - static_cast(include_all_ngrams), 0); - } - explicit SkipGramOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } +inline const char * const *EnumNamesCustomOptionsFormat() { + static const char * const names[2] = { + "FLEXBUFFERS", + nullptr + }; + return names; +} + +inline const char *EnumNameCustomOptionsFormat(CustomOptionsFormat e) { + if (flatbuffers::IsOutRange(e, CustomOptionsFormat_FLEXBUFFERS, CustomOptionsFormat_FLEXBUFFERS)) return ""; + const size_t index = static_cast(e); + return EnumNamesCustomOptionsFormat()[index]; +} + +enum DataFormat : int8_t { + DataFormat_CHANNELS_LAST = 0, + DataFormat_CHANNELS_FIRST = 1, + DataFormat_MIN = DataFormat_CHANNELS_LAST, + DataFormat_MAX = DataFormat_CHANNELS_FIRST }; -inline flatbuffers::Offset -CreateSkipGramOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t ngram_size = 0, - int32_t max_skip_size = 0, bool include_all_ngrams = false) -{ - SkipGramOptionsBuilder builder_(_fbb); - builder_.add_max_skip_size(max_skip_size); - builder_.add_ngram_size(ngram_size); - builder_.add_include_all_ngrams(include_all_ngrams); - return builder_.Finish(); +inline const DataFormat (&EnumValuesDataFormat())[2] { + static const DataFormat values[] = { + DataFormat_CHANNELS_LAST, + DataFormat_CHANNELS_FIRST + }; + return values; } -flatbuffers::Offset -CreateSkipGramOptions(flatbuffers::FlatBufferBuilder &_fbb, const SkipGramOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline const char * const *EnumNamesDataFormat() { + static const char * const names[3] = { + "CHANNELS_LAST", + "CHANNELS_FIRST", + nullptr + }; + return names; +} -struct SpaceToDepthOptionsT : public flatbuffers::NativeTable -{ - typedef SpaceToDepthOptions TableType; - int32_t block_size = 0; +inline const char *EnumNameDataFormat(DataFormat e) { + if (flatbuffers::IsOutRange(e, DataFormat_CHANNELS_LAST, DataFormat_CHANNELS_FIRST)) return ""; + const size_t index = static_cast(e); + return EnumNamesDataFormat()[index]; +} + +struct CustomQuantizationT : public flatbuffers::NativeTable { + typedef CustomQuantization TableType; + std::vector custom{}; }; -struct SpaceToDepthOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SpaceToDepthOptionsT NativeTableType; - typedef SpaceToDepthOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_BLOCK_SIZE = 4 +struct CustomQuantization FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CustomQuantizationT NativeTableType; + typedef CustomQuantizationBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CUSTOM = 4 }; - int32_t block_size() const { return GetField(VT_BLOCK_SIZE, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_BLOCK_SIZE) && + const flatbuffers::Vector *custom() const { + return GetPointer *>(VT_CUSTOM); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_CUSTOM) && + verifier.VerifyVector(custom()) && verifier.EndTable(); } - SpaceToDepthOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SpaceToDepthOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToDepthOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + CustomQuantizationT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(CustomQuantizationT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const CustomQuantizationT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SpaceToDepthOptionsBuilder -{ - typedef SpaceToDepthOptions Table; +struct CustomQuantizationBuilder { + typedef CustomQuantization Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_block_size(int32_t block_size) - { - fbb_.AddElement(SpaceToDepthOptions::VT_BLOCK_SIZE, block_size, 0); + void add_custom(flatbuffers::Offset> custom) { + fbb_.AddOffset(CustomQuantization::VT_CUSTOM, custom); } - explicit SpaceToDepthOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit CustomQuantizationBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateSpaceToDepthOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t block_size = 0) -{ - SpaceToDepthOptionsBuilder builder_(_fbb); - builder_.add_block_size(block_size); +inline flatbuffers::Offset CreateCustomQuantization( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> custom = 0) { + CustomQuantizationBuilder builder_(_fbb); + builder_.add_custom(custom); return builder_.Finish(); } -flatbuffers::Offset -CreateSpaceToDepthOptions(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToDepthOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateCustomQuantizationDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *custom = nullptr) { + if (custom) { _fbb.ForceVectorAlignment(custom->size(), sizeof(uint8_t), 16); } + auto custom__ = custom ? _fbb.CreateVector(*custom) : 0; + return circle::CreateCustomQuantization( + _fbb, + custom__); +} + +flatbuffers::Offset CreateCustomQuantization(flatbuffers::FlatBufferBuilder &_fbb, const CustomQuantizationT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct DepthToSpaceOptionsT : public flatbuffers::NativeTable -{ - typedef DepthToSpaceOptions TableType; - int32_t block_size = 0; +struct QuantizationParametersT : public flatbuffers::NativeTable { + typedef QuantizationParameters TableType; + std::vector min{}; + std::vector max{}; + std::vector scale{}; + std::vector zero_point{}; + circle::QuantizationDetailsUnion details{}; + int32_t quantized_dimension = 0; }; -struct DepthToSpaceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef DepthToSpaceOptionsT NativeTableType; - typedef DepthToSpaceOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_BLOCK_SIZE = 4 +struct QuantizationParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizationParametersT NativeTableType; + typedef QuantizationParametersBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MIN = 4, + VT_MAX = 6, + VT_SCALE = 8, + VT_ZERO_POINT = 10, + VT_DETAILS_TYPE = 12, + VT_DETAILS = 14, + VT_QUANTIZED_DIMENSION = 16 }; - int32_t block_size() const { return GetField(VT_BLOCK_SIZE, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_BLOCK_SIZE) && + const flatbuffers::Vector *min() const { + return GetPointer *>(VT_MIN); + } + const flatbuffers::Vector *max() const { + return GetPointer *>(VT_MAX); + } + const flatbuffers::Vector *scale() const { + return GetPointer *>(VT_SCALE); + } + const flatbuffers::Vector *zero_point() const { + return GetPointer *>(VT_ZERO_POINT); + } + circle::QuantizationDetails details_type() const { + return static_cast(GetField(VT_DETAILS_TYPE, 0)); + } + const void *details() const { + return GetPointer(VT_DETAILS); + } + template const T *details_as() const; + const circle::CustomQuantization *details_as_CustomQuantization() const { + return details_type() == circle::QuantizationDetails_CustomQuantization ? static_cast(details()) : nullptr; + } + int32_t quantized_dimension() const { + return GetField(VT_QUANTIZED_DIMENSION, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_MIN) && + verifier.VerifyVector(min()) && + VerifyOffset(verifier, VT_MAX) && + verifier.VerifyVector(max()) && + VerifyOffset(verifier, VT_SCALE) && + verifier.VerifyVector(scale()) && + VerifyOffset(verifier, VT_ZERO_POINT) && + verifier.VerifyVector(zero_point()) && + VerifyField(verifier, VT_DETAILS_TYPE) && + VerifyOffset(verifier, VT_DETAILS) && + VerifyQuantizationDetails(verifier, details(), details_type()) && + VerifyField(verifier, VT_QUANTIZED_DIMENSION) && verifier.EndTable(); } - DepthToSpaceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(DepthToSpaceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const DepthToSpaceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + QuantizationParametersT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(QuantizationParametersT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizationParametersT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct DepthToSpaceOptionsBuilder -{ - typedef DepthToSpaceOptions Table; +template<> inline const circle::CustomQuantization *QuantizationParameters::details_as() const { + return details_as_CustomQuantization(); +} + +struct QuantizationParametersBuilder { + typedef QuantizationParameters Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_block_size(int32_t block_size) - { - fbb_.AddElement(DepthToSpaceOptions::VT_BLOCK_SIZE, block_size, 0); + void add_min(flatbuffers::Offset> min) { + fbb_.AddOffset(QuantizationParameters::VT_MIN, min); + } + void add_max(flatbuffers::Offset> max) { + fbb_.AddOffset(QuantizationParameters::VT_MAX, max); + } + void add_scale(flatbuffers::Offset> scale) { + fbb_.AddOffset(QuantizationParameters::VT_SCALE, scale); + } + void add_zero_point(flatbuffers::Offset> zero_point) { + fbb_.AddOffset(QuantizationParameters::VT_ZERO_POINT, zero_point); + } + void add_details_type(circle::QuantizationDetails details_type) { + fbb_.AddElement(QuantizationParameters::VT_DETAILS_TYPE, static_cast(details_type), 0); + } + void add_details(flatbuffers::Offset details) { + fbb_.AddOffset(QuantizationParameters::VT_DETAILS, details); } - explicit DepthToSpaceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_quantized_dimension(int32_t quantized_dimension) { + fbb_.AddElement(QuantizationParameters::VT_QUANTIZED_DIMENSION, quantized_dimension, 0); + } + explicit QuantizationParametersBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateDepthToSpaceOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t block_size = 0) -{ - DepthToSpaceOptionsBuilder builder_(_fbb); - builder_.add_block_size(block_size); +inline flatbuffers::Offset CreateQuantizationParameters( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> min = 0, + flatbuffers::Offset> max = 0, + flatbuffers::Offset> scale = 0, + flatbuffers::Offset> zero_point = 0, + circle::QuantizationDetails details_type = circle::QuantizationDetails_NONE, + flatbuffers::Offset details = 0, + int32_t quantized_dimension = 0) { + QuantizationParametersBuilder builder_(_fbb); + builder_.add_quantized_dimension(quantized_dimension); + builder_.add_details(details); + builder_.add_zero_point(zero_point); + builder_.add_scale(scale); + builder_.add_max(max); + builder_.add_min(min); + builder_.add_details_type(details_type); return builder_.Finish(); } -flatbuffers::Offset -CreateDepthToSpaceOptions(flatbuffers::FlatBufferBuilder &_fbb, const DepthToSpaceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateQuantizationParametersDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *min = nullptr, + const std::vector *max = nullptr, + const std::vector *scale = nullptr, + const std::vector *zero_point = nullptr, + circle::QuantizationDetails details_type = circle::QuantizationDetails_NONE, + flatbuffers::Offset details = 0, + int32_t quantized_dimension = 0) { + auto min__ = min ? _fbb.CreateVector(*min) : 0; + auto max__ = max ? _fbb.CreateVector(*max) : 0; + auto scale__ = scale ? _fbb.CreateVector(*scale) : 0; + auto zero_point__ = zero_point ? _fbb.CreateVector(*zero_point) : 0; + return circle::CreateQuantizationParameters( + _fbb, + min__, + max__, + scale__, + zero_point__, + details_type, + details, + quantized_dimension); +} + +flatbuffers::Offset CreateQuantizationParameters(flatbuffers::FlatBufferBuilder &_fbb, const QuantizationParametersT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct SubOptionsT : public flatbuffers::NativeTable -{ - typedef SubOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; - bool pot_scale_int16 = true; +struct Int32VectorT : public flatbuffers::NativeTable { + typedef Int32Vector TableType; + std::vector values{}; }; -struct SubOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SubOptionsT NativeTableType; - typedef SubOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4, - VT_POT_SCALE_INT16 = 6 +struct Int32Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Int32VectorT NativeTableType; + typedef Int32VectorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALUES = 4 }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool pot_scale_int16() const { return GetField(VT_POT_SCALE_INT16, 1) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { + const flatbuffers::Vector *values() const { + return GetPointer *>(VT_VALUES); + } + bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && - VerifyField(verifier, VT_POT_SCALE_INT16) && verifier.EndTable(); + VerifyOffset(verifier, VT_VALUES) && + verifier.VerifyVector(values()) && + verifier.EndTable(); } - SubOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SubOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + Int32VectorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(Int32VectorT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const Int32VectorT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SubOptionsBuilder -{ - typedef SubOptions Table; +struct Int32VectorBuilder { + typedef Int32Vector Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(SubOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - void add_pot_scale_int16(bool pot_scale_int16) - { - fbb_.AddElement(SubOptions::VT_POT_SCALE_INT16, static_cast(pot_scale_int16), - 1); - } - explicit SubOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_values(flatbuffers::Offset> values) { + fbb_.AddOffset(Int32Vector::VT_VALUES, values); + } + explicit Int32VectorBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateSubOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, - bool pot_scale_int16 = true) -{ - SubOptionsBuilder builder_(_fbb); - builder_.add_pot_scale_int16(pot_scale_int16); - builder_.add_fused_activation_function(fused_activation_function); +inline flatbuffers::Offset CreateInt32Vector( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> values = 0) { + Int32VectorBuilder builder_(_fbb); + builder_.add_values(values); return builder_.Finish(); } -flatbuffers::Offset -CreateSubOptions(flatbuffers::FlatBufferBuilder &_fbb, const SubOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateInt32VectorDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *values = nullptr) { + auto values__ = values ? _fbb.CreateVector(*values) : 0; + return circle::CreateInt32Vector( + _fbb, + values__); +} -struct DivOptionsT : public flatbuffers::NativeTable -{ - typedef DivOptions TableType; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; +flatbuffers::Offset CreateInt32Vector(flatbuffers::FlatBufferBuilder &_fbb, const Int32VectorT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct Uint16VectorT : public flatbuffers::NativeTable { + typedef Uint16Vector TableType; + std::vector values{}; }; -struct DivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef DivOptionsT NativeTableType; - typedef DivOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_FUSED_ACTIVATION_FUNCTION = 4 +struct Uint16Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Uint16VectorT NativeTableType; + typedef Uint16VectorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALUES = 4 }; - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + const flatbuffers::Vector *values() const { + return GetPointer *>(VT_VALUES); } - bool Verify(flatbuffers::Verifier &verifier) const - { + bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && verifier.EndTable(); + VerifyOffset(verifier, VT_VALUES) && + verifier.VerifyVector(values()) && + verifier.EndTable(); } - DivOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(DivOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const DivOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + Uint16VectorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(Uint16VectorT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const Uint16VectorT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct DivOptionsBuilder -{ - typedef DivOptions Table; +struct Uint16VectorBuilder { + typedef Uint16Vector Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(DivOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + void add_values(flatbuffers::Offset> values) { + fbb_.AddOffset(Uint16Vector::VT_VALUES, values); } - explicit DivOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit Uint16VectorBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateDivOptions( - flatbuffers::FlatBufferBuilder &_fbb, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) -{ - DivOptionsBuilder builder_(_fbb); - builder_.add_fused_activation_function(fused_activation_function); +inline flatbuffers::Offset CreateUint16Vector( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> values = 0) { + Uint16VectorBuilder builder_(_fbb); + builder_.add_values(values); return builder_.Finish(); } -flatbuffers::Offset -CreateDivOptions(flatbuffers::FlatBufferBuilder &_fbb, const DivOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateUint16VectorDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *values = nullptr) { + if (values) { _fbb.ForceVectorAlignment(values->size(), sizeof(uint16_t), 4); } + auto values__ = values ? _fbb.CreateVector(*values) : 0; + return circle::CreateUint16Vector( + _fbb, + values__); +} -struct TopKV2OptionsT : public flatbuffers::NativeTable -{ - typedef TopKV2Options TableType; -}; +flatbuffers::Offset CreateUint16Vector(flatbuffers::FlatBufferBuilder &_fbb, const Uint16VectorT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct TopKV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef TopKV2OptionsT NativeTableType; - typedef TopKV2OptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); - } - TopKV2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(TopKV2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct TopKV2OptionsBuilder -{ - typedef TopKV2Options Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit TopKV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; - -inline flatbuffers::Offset CreateTopKV2Options(flatbuffers::FlatBufferBuilder &_fbb) -{ - TopKV2OptionsBuilder builder_(_fbb); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateTopKV2Options(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct EmbeddingLookupSparseOptionsT : public flatbuffers::NativeTable -{ - typedef EmbeddingLookupSparseOptions TableType; - circle::CombinerType combiner = circle::CombinerType_SUM; +struct Uint8VectorT : public flatbuffers::NativeTable { + typedef Uint8Vector TableType; + std::vector values{}; }; -struct EmbeddingLookupSparseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef EmbeddingLookupSparseOptionsT NativeTableType; - typedef EmbeddingLookupSparseOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_COMBINER = 4 +struct Uint8Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Uint8VectorT NativeTableType; + typedef Uint8VectorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALUES = 4 }; - circle::CombinerType combiner() const - { - return static_cast(GetField(VT_COMBINER, 0)); + const flatbuffers::Vector *values() const { + return GetPointer *>(VT_VALUES); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_COMBINER) && + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_VALUES) && + verifier.VerifyVector(values()) && verifier.EndTable(); } - EmbeddingLookupSparseOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(EmbeddingLookupSparseOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const EmbeddingLookupSparseOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + Uint8VectorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(Uint8VectorT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const Uint8VectorT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct EmbeddingLookupSparseOptionsBuilder -{ - typedef EmbeddingLookupSparseOptions Table; +struct Uint8VectorBuilder { + typedef Uint8Vector Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_combiner(circle::CombinerType combiner) - { - fbb_.AddElement(EmbeddingLookupSparseOptions::VT_COMBINER, - static_cast(combiner), 0); + void add_values(flatbuffers::Offset> values) { + fbb_.AddOffset(Uint8Vector::VT_VALUES, values); } - explicit EmbeddingLookupSparseOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit Uint8VectorBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateEmbeddingLookupSparseOptions(flatbuffers::FlatBufferBuilder &_fbb, - circle::CombinerType combiner = circle::CombinerType_SUM) -{ - EmbeddingLookupSparseOptionsBuilder builder_(_fbb); - builder_.add_combiner(combiner); +inline flatbuffers::Offset CreateUint8Vector( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> values = 0) { + Uint8VectorBuilder builder_(_fbb); + builder_.add_values(values); return builder_.Finish(); } -flatbuffers::Offset -CreateEmbeddingLookupSparseOptions(flatbuffers::FlatBufferBuilder &_fbb, - const EmbeddingLookupSparseOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateUint8VectorDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *values = nullptr) { + if (values) { _fbb.ForceVectorAlignment(values->size(), sizeof(uint8_t), 4); } + auto values__ = values ? _fbb.CreateVector(*values) : 0; + return circle::CreateUint8Vector( + _fbb, + values__); +} -struct GatherOptionsT : public flatbuffers::NativeTable -{ - typedef GatherOptions TableType; - int32_t axis = 0; - int32_t batch_dims = 0; +flatbuffers::Offset CreateUint8Vector(flatbuffers::FlatBufferBuilder &_fbb, const Uint8VectorT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct DimensionMetadataT : public flatbuffers::NativeTable { + typedef DimensionMetadata TableType; + circle::DimensionType format = circle::DimensionType_DENSE; + int32_t dense_size = 0; + circle::SparseIndexVectorUnion array_segments{}; + circle::SparseIndexVectorUnion array_indices{}; }; -struct GatherOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef GatherOptionsT NativeTableType; - typedef GatherOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_AXIS = 4, - VT_BATCH_DIMS = 6 +struct DimensionMetadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DimensionMetadataT NativeTableType; + typedef DimensionMetadataBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FORMAT = 4, + VT_DENSE_SIZE = 6, + VT_ARRAY_SEGMENTS_TYPE = 8, + VT_ARRAY_SEGMENTS = 10, + VT_ARRAY_INDICES_TYPE = 12, + VT_ARRAY_INDICES = 14 }; - int32_t axis() const { return GetField(VT_AXIS, 0); } - int32_t batch_dims() const { return GetField(VT_BATCH_DIMS, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_AXIS) && - VerifyField(verifier, VT_BATCH_DIMS) && verifier.EndTable(); + circle::DimensionType format() const { + return static_cast(GetField(VT_FORMAT, 0)); } - GatherOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(GatherOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct GatherOptionsBuilder -{ - typedef GatherOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_axis(int32_t axis) { fbb_.AddElement(GatherOptions::VT_AXIS, axis, 0); } - void add_batch_dims(int32_t batch_dims) - { - fbb_.AddElement(GatherOptions::VT_BATCH_DIMS, batch_dims, 0); + int32_t dense_size() const { + return GetField(VT_DENSE_SIZE, 0); } - explicit GatherOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + circle::SparseIndexVector array_segments_type() const { + return static_cast(GetField(VT_ARRAY_SEGMENTS_TYPE, 0)); } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const void *array_segments() const { + return GetPointer(VT_ARRAY_SEGMENTS); } -}; - -inline flatbuffers::Offset -CreateGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t axis = 0, int32_t batch_dims = 0) -{ - GatherOptionsBuilder builder_(_fbb); - builder_.add_batch_dims(batch_dims); - builder_.add_axis(axis); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const GatherOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct TransposeOptionsT : public flatbuffers::NativeTable -{ - typedef TransposeOptions TableType; -}; - -struct TransposeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef TransposeOptionsT NativeTableType; - typedef TransposeOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); + template const T *array_segments_as() const; + const circle::Int32Vector *array_segments_as_Int32Vector() const { + return array_segments_type() == circle::SparseIndexVector_Int32Vector ? static_cast(array_segments()) : nullptr; } - TransposeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(TransposeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct TransposeOptionsBuilder -{ - typedef TransposeOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit TransposeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); + const circle::Uint16Vector *array_segments_as_Uint16Vector() const { + return array_segments_type() == circle::SparseIndexVector_Uint16Vector ? static_cast(array_segments()) : nullptr; } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + const circle::Uint8Vector *array_segments_as_Uint8Vector() const { + return array_segments_type() == circle::SparseIndexVector_Uint8Vector ? static_cast(array_segments()) : nullptr; + } + circle::SparseIndexVector array_indices_type() const { + return static_cast(GetField(VT_ARRAY_INDICES_TYPE, 0)); + } + const void *array_indices() const { + return GetPointer(VT_ARRAY_INDICES); + } + template const T *array_indices_as() const; + const circle::Int32Vector *array_indices_as_Int32Vector() const { + return array_indices_type() == circle::SparseIndexVector_Int32Vector ? static_cast(array_indices()) : nullptr; + } + const circle::Uint16Vector *array_indices_as_Uint16Vector() const { + return array_indices_type() == circle::SparseIndexVector_Uint16Vector ? static_cast(array_indices()) : nullptr; + } + const circle::Uint8Vector *array_indices_as_Uint8Vector() const { + return array_indices_type() == circle::SparseIndexVector_Uint8Vector ? static_cast(array_indices()) : nullptr; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FORMAT) && + VerifyField(verifier, VT_DENSE_SIZE) && + VerifyField(verifier, VT_ARRAY_SEGMENTS_TYPE) && + VerifyOffset(verifier, VT_ARRAY_SEGMENTS) && + VerifySparseIndexVector(verifier, array_segments(), array_segments_type()) && + VerifyField(verifier, VT_ARRAY_INDICES_TYPE) && + VerifyOffset(verifier, VT_ARRAY_INDICES) && + VerifySparseIndexVector(verifier, array_indices(), array_indices_type()) && + verifier.EndTable(); } + DimensionMetadataT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(DimensionMetadataT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const DimensionMetadataT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -inline flatbuffers::Offset -CreateTransposeOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - TransposeOptionsBuilder builder_(_fbb); - return builder_.Finish(); +template<> inline const circle::Int32Vector *DimensionMetadata::array_segments_as() const { + return array_segments_as_Int32Vector(); } -flatbuffers::Offset -CreateTransposeOptions(flatbuffers::FlatBufferBuilder &_fbb, const TransposeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +template<> inline const circle::Uint16Vector *DimensionMetadata::array_segments_as() const { + return array_segments_as_Uint16Vector(); +} -struct ExpOptionsT : public flatbuffers::NativeTable -{ - typedef ExpOptions TableType; -}; +template<> inline const circle::Uint8Vector *DimensionMetadata::array_segments_as() const { + return array_segments_as_Uint8Vector(); +} -struct ExpOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ExpOptionsT NativeTableType; - typedef ExpOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); - } - ExpOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ExpOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; +template<> inline const circle::Int32Vector *DimensionMetadata::array_indices_as() const { + return array_indices_as_Int32Vector(); +} -struct ExpOptionsBuilder -{ - typedef ExpOptions Table; +template<> inline const circle::Uint16Vector *DimensionMetadata::array_indices_as() const { + return array_indices_as_Uint16Vector(); +} + +template<> inline const circle::Uint8Vector *DimensionMetadata::array_indices_as() const { + return array_indices_as_Uint8Vector(); +} + +struct DimensionMetadataBuilder { + typedef DimensionMetadata Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit ExpOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_format(circle::DimensionType format) { + fbb_.AddElement(DimensionMetadata::VT_FORMAT, static_cast(format), 0); + } + void add_dense_size(int32_t dense_size) { + fbb_.AddElement(DimensionMetadata::VT_DENSE_SIZE, dense_size, 0); + } + void add_array_segments_type(circle::SparseIndexVector array_segments_type) { + fbb_.AddElement(DimensionMetadata::VT_ARRAY_SEGMENTS_TYPE, static_cast(array_segments_type), 0); + } + void add_array_segments(flatbuffers::Offset array_segments) { + fbb_.AddOffset(DimensionMetadata::VT_ARRAY_SEGMENTS, array_segments); + } + void add_array_indices_type(circle::SparseIndexVector array_indices_type) { + fbb_.AddElement(DimensionMetadata::VT_ARRAY_INDICES_TYPE, static_cast(array_indices_type), 0); + } + void add_array_indices(flatbuffers::Offset array_indices) { + fbb_.AddOffset(DimensionMetadata::VT_ARRAY_INDICES, array_indices); + } + explicit DimensionMetadataBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateExpOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - ExpOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateDimensionMetadata( + flatbuffers::FlatBufferBuilder &_fbb, + circle::DimensionType format = circle::DimensionType_DENSE, + int32_t dense_size = 0, + circle::SparseIndexVector array_segments_type = circle::SparseIndexVector_NONE, + flatbuffers::Offset array_segments = 0, + circle::SparseIndexVector array_indices_type = circle::SparseIndexVector_NONE, + flatbuffers::Offset array_indices = 0) { + DimensionMetadataBuilder builder_(_fbb); + builder_.add_array_indices(array_indices); + builder_.add_array_segments(array_segments); + builder_.add_dense_size(dense_size); + builder_.add_array_indices_type(array_indices_type); + builder_.add_array_segments_type(array_segments_type); + builder_.add_format(format); return builder_.Finish(); } -flatbuffers::Offset -CreateExpOptions(flatbuffers::FlatBufferBuilder &_fbb, const ExpOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateDimensionMetadata(flatbuffers::FlatBufferBuilder &_fbb, const DimensionMetadataT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct CosOptionsT : public flatbuffers::NativeTable -{ - typedef CosOptions TableType; +struct SparsityParametersT : public flatbuffers::NativeTable { + typedef SparsityParameters TableType; + std::vector traversal_order{}; + std::vector block_map{}; + std::vector> dim_metadata{}; }; -struct CosOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef CosOptionsT NativeTableType; - typedef CosOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SparsityParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SparsityParametersT NativeTableType; + typedef SparsityParametersBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRAVERSAL_ORDER = 4, + VT_BLOCK_MAP = 6, + VT_DIM_METADATA = 8 + }; + const flatbuffers::Vector *traversal_order() const { + return GetPointer *>(VT_TRAVERSAL_ORDER); } - CosOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(CosOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const CosOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + const flatbuffers::Vector *block_map() const { + return GetPointer *>(VT_BLOCK_MAP); + } + const flatbuffers::Vector> *dim_metadata() const { + return GetPointer> *>(VT_DIM_METADATA); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TRAVERSAL_ORDER) && + verifier.VerifyVector(traversal_order()) && + VerifyOffset(verifier, VT_BLOCK_MAP) && + verifier.VerifyVector(block_map()) && + VerifyOffset(verifier, VT_DIM_METADATA) && + verifier.VerifyVector(dim_metadata()) && + verifier.VerifyVectorOfTables(dim_metadata()) && + verifier.EndTable(); + } + SparsityParametersT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SparsityParametersT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparsityParametersT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct CosOptionsBuilder -{ - typedef CosOptions Table; +struct SparsityParametersBuilder { + typedef SparsityParameters Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit CosOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_traversal_order(flatbuffers::Offset> traversal_order) { + fbb_.AddOffset(SparsityParameters::VT_TRAVERSAL_ORDER, traversal_order); + } + void add_block_map(flatbuffers::Offset> block_map) { + fbb_.AddOffset(SparsityParameters::VT_BLOCK_MAP, block_map); + } + void add_dim_metadata(flatbuffers::Offset>> dim_metadata) { + fbb_.AddOffset(SparsityParameters::VT_DIM_METADATA, dim_metadata); + } + explicit SparsityParametersBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateCosOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - CosOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSparsityParameters( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> traversal_order = 0, + flatbuffers::Offset> block_map = 0, + flatbuffers::Offset>> dim_metadata = 0) { + SparsityParametersBuilder builder_(_fbb); + builder_.add_dim_metadata(dim_metadata); + builder_.add_block_map(block_map); + builder_.add_traversal_order(traversal_order); return builder_.Finish(); } -flatbuffers::Offset -CreateCosOptions(flatbuffers::FlatBufferBuilder &_fbb, const CosOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateSparsityParametersDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *traversal_order = nullptr, + const std::vector *block_map = nullptr, + const std::vector> *dim_metadata = nullptr) { + auto traversal_order__ = traversal_order ? _fbb.CreateVector(*traversal_order) : 0; + auto block_map__ = block_map ? _fbb.CreateVector(*block_map) : 0; + auto dim_metadata__ = dim_metadata ? _fbb.CreateVector>(*dim_metadata) : 0; + return circle::CreateSparsityParameters( + _fbb, + traversal_order__, + block_map__, + dim_metadata__); +} + +flatbuffers::Offset CreateSparsityParameters(flatbuffers::FlatBufferBuilder &_fbb, const SparsityParametersT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct ReducerOptionsT : public flatbuffers::NativeTable -{ - typedef ReducerOptions TableType; - bool keep_dims = false; +struct VariantSubTypeT : public flatbuffers::NativeTable { + typedef VariantSubType TableType; + std::vector shape{}; + circle::TensorType type = circle::TensorType_FLOAT32; + bool has_rank = false; }; -struct ReducerOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ReducerOptionsT NativeTableType; - typedef ReducerOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_KEEP_DIMS = 4 +struct VariantSubType FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef VariantSubTypeT NativeTableType; + typedef VariantSubTypeBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SHAPE = 4, + VT_TYPE = 6, + VT_HAS_RANK = 8 }; - bool keep_dims() const { return GetField(VT_KEEP_DIMS, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_KEEP_DIMS) && + const flatbuffers::Vector *shape() const { + return GetPointer *>(VT_SHAPE); + } + circle::TensorType type() const { + return static_cast(GetField(VT_TYPE, 0)); + } + bool has_rank() const { + return GetField(VT_HAS_RANK, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_SHAPE) && + verifier.VerifyVector(shape()) && + VerifyField(verifier, VT_TYPE) && + VerifyField(verifier, VT_HAS_RANK) && verifier.EndTable(); } - ReducerOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ReducerOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReducerOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + VariantSubTypeT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(VariantSubTypeT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const VariantSubTypeT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct ReducerOptionsBuilder -{ - typedef ReducerOptions Table; +struct VariantSubTypeBuilder { + typedef VariantSubType Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_keep_dims(bool keep_dims) - { - fbb_.AddElement(ReducerOptions::VT_KEEP_DIMS, static_cast(keep_dims), 0); + void add_shape(flatbuffers::Offset> shape) { + fbb_.AddOffset(VariantSubType::VT_SHAPE, shape); + } + void add_type(circle::TensorType type) { + fbb_.AddElement(VariantSubType::VT_TYPE, static_cast(type), 0); + } + void add_has_rank(bool has_rank) { + fbb_.AddElement(VariantSubType::VT_HAS_RANK, static_cast(has_rank), 0); } - explicit ReducerOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit VariantSubTypeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateReducerOptions(flatbuffers::FlatBufferBuilder &_fbb, bool keep_dims = false) -{ - ReducerOptionsBuilder builder_(_fbb); - builder_.add_keep_dims(keep_dims); +inline flatbuffers::Offset CreateVariantSubType( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> shape = 0, + circle::TensorType type = circle::TensorType_FLOAT32, + bool has_rank = false) { + VariantSubTypeBuilder builder_(_fbb); + builder_.add_shape(shape); + builder_.add_has_rank(has_rank); + builder_.add_type(type); return builder_.Finish(); } -flatbuffers::Offset -CreateReducerOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReducerOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateVariantSubTypeDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *shape = nullptr, + circle::TensorType type = circle::TensorType_FLOAT32, + bool has_rank = false) { + auto shape__ = shape ? _fbb.CreateVector(*shape) : 0; + return circle::CreateVariantSubType( + _fbb, + shape__, + type, + has_rank); +} -struct SqueezeOptionsT : public flatbuffers::NativeTable -{ - typedef SqueezeOptions TableType; - std::vector squeeze_dims{}; +flatbuffers::Offset CreateVariantSubType(flatbuffers::FlatBufferBuilder &_fbb, const VariantSubTypeT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct TensorT : public flatbuffers::NativeTable { + typedef Tensor TableType; + std::vector shape{}; + circle::TensorType type = circle::TensorType_FLOAT32; + uint32_t buffer = 0; + std::string name{}; + std::unique_ptr quantization{}; + bool is_variable = false; + std::unique_ptr sparsity{}; + std::vector shape_signature{}; + bool has_rank = false; + std::vector> variant_tensors{}; }; -struct SqueezeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SqueezeOptionsT NativeTableType; - typedef SqueezeOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_SQUEEZE_DIMS = 4 +struct Tensor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TensorT NativeTableType; + typedef TensorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SHAPE = 4, + VT_TYPE = 6, + VT_BUFFER = 8, + VT_NAME = 10, + VT_QUANTIZATION = 12, + VT_IS_VARIABLE = 14, + VT_SPARSITY = 16, + VT_SHAPE_SIGNATURE = 18, + VT_HAS_RANK = 20, + VT_VARIANT_TENSORS = 22 }; - const flatbuffers::Vector *squeeze_dims() const - { - return GetPointer *>(VT_SQUEEZE_DIMS); + const flatbuffers::Vector *shape() const { + return GetPointer *>(VT_SHAPE); + } + circle::TensorType type() const { + return static_cast(GetField(VT_TYPE, 0)); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_SQUEEZE_DIMS) && - verifier.VerifyVector(squeeze_dims()) && verifier.EndTable(); + uint32_t buffer() const { + return GetField(VT_BUFFER, 0); } - SqueezeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SqueezeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + const circle::QuantizationParameters *quantization() const { + return GetPointer(VT_QUANTIZATION); + } + bool is_variable() const { + return GetField(VT_IS_VARIABLE, 0) != 0; + } + const circle::SparsityParameters *sparsity() const { + return GetPointer(VT_SPARSITY); + } + const flatbuffers::Vector *shape_signature() const { + return GetPointer *>(VT_SHAPE_SIGNATURE); + } + bool has_rank() const { + return GetField(VT_HAS_RANK, 0) != 0; + } + const flatbuffers::Vector> *variant_tensors() const { + return GetPointer> *>(VT_VARIANT_TENSORS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_SHAPE) && + verifier.VerifyVector(shape()) && + VerifyField(verifier, VT_TYPE) && + VerifyField(verifier, VT_BUFFER) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffset(verifier, VT_QUANTIZATION) && + verifier.VerifyTable(quantization()) && + VerifyField(verifier, VT_IS_VARIABLE) && + VerifyOffset(verifier, VT_SPARSITY) && + verifier.VerifyTable(sparsity()) && + VerifyOffset(verifier, VT_SHAPE_SIGNATURE) && + verifier.VerifyVector(shape_signature()) && + VerifyField(verifier, VT_HAS_RANK) && + VerifyOffset(verifier, VT_VARIANT_TENSORS) && + verifier.VerifyVector(variant_tensors()) && + verifier.VerifyVectorOfTables(variant_tensors()) && + verifier.EndTable(); + } + TensorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(TensorT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SqueezeOptionsBuilder -{ - typedef SqueezeOptions Table; +struct TensorBuilder { + typedef Tensor Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_squeeze_dims(flatbuffers::Offset> squeeze_dims) - { - fbb_.AddOffset(SqueezeOptions::VT_SQUEEZE_DIMS, squeeze_dims); + void add_shape(flatbuffers::Offset> shape) { + fbb_.AddOffset(Tensor::VT_SHAPE, shape); + } + void add_type(circle::TensorType type) { + fbb_.AddElement(Tensor::VT_TYPE, static_cast(type), 0); + } + void add_buffer(uint32_t buffer) { + fbb_.AddElement(Tensor::VT_BUFFER, buffer, 0); + } + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(Tensor::VT_NAME, name); + } + void add_quantization(flatbuffers::Offset quantization) { + fbb_.AddOffset(Tensor::VT_QUANTIZATION, quantization); + } + void add_is_variable(bool is_variable) { + fbb_.AddElement(Tensor::VT_IS_VARIABLE, static_cast(is_variable), 0); + } + void add_sparsity(flatbuffers::Offset sparsity) { + fbb_.AddOffset(Tensor::VT_SPARSITY, sparsity); } - explicit SqueezeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_shape_signature(flatbuffers::Offset> shape_signature) { + fbb_.AddOffset(Tensor::VT_SHAPE_SIGNATURE, shape_signature); + } + void add_has_rank(bool has_rank) { + fbb_.AddElement(Tensor::VT_HAS_RANK, static_cast(has_rank), 0); + } + void add_variant_tensors(flatbuffers::Offset>> variant_tensors) { + fbb_.AddOffset(Tensor::VT_VARIANT_TENSORS, variant_tensors); + } + explicit TensorBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateSqueezeOptions(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> squeeze_dims = 0) -{ - SqueezeOptionsBuilder builder_(_fbb); - builder_.add_squeeze_dims(squeeze_dims); +inline flatbuffers::Offset CreateTensor( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> shape = 0, + circle::TensorType type = circle::TensorType_FLOAT32, + uint32_t buffer = 0, + flatbuffers::Offset name = 0, + flatbuffers::Offset quantization = 0, + bool is_variable = false, + flatbuffers::Offset sparsity = 0, + flatbuffers::Offset> shape_signature = 0, + bool has_rank = false, + flatbuffers::Offset>> variant_tensors = 0) { + TensorBuilder builder_(_fbb); + builder_.add_variant_tensors(variant_tensors); + builder_.add_shape_signature(shape_signature); + builder_.add_sparsity(sparsity); + builder_.add_quantization(quantization); + builder_.add_name(name); + builder_.add_buffer(buffer); + builder_.add_shape(shape); + builder_.add_has_rank(has_rank); + builder_.add_is_variable(is_variable); + builder_.add_type(type); return builder_.Finish(); } -inline flatbuffers::Offset -CreateSqueezeOptionsDirect(flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *squeeze_dims = nullptr) -{ - auto squeeze_dims__ = squeeze_dims ? _fbb.CreateVector(*squeeze_dims) : 0; - return circle::CreateSqueezeOptions(_fbb, squeeze_dims__); -} - -flatbuffers::Offset -CreateSqueezeOptions(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct SplitOptionsT : public flatbuffers::NativeTable -{ - typedef SplitOptions TableType; - int32_t num_splits = 0; -}; - -struct SplitOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SplitOptionsT NativeTableType; - typedef SplitOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_NUM_SPLITS = 4 +inline flatbuffers::Offset CreateTensorDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *shape = nullptr, + circle::TensorType type = circle::TensorType_FLOAT32, + uint32_t buffer = 0, + const char *name = nullptr, + flatbuffers::Offset quantization = 0, + bool is_variable = false, + flatbuffers::Offset sparsity = 0, + const std::vector *shape_signature = nullptr, + bool has_rank = false, + const std::vector> *variant_tensors = nullptr) { + auto shape__ = shape ? _fbb.CreateVector(*shape) : 0; + auto name__ = name ? _fbb.CreateString(name) : 0; + auto shape_signature__ = shape_signature ? _fbb.CreateVector(*shape_signature) : 0; + auto variant_tensors__ = variant_tensors ? _fbb.CreateVector>(*variant_tensors) : 0; + return circle::CreateTensor( + _fbb, + shape__, + type, + buffer, + name__, + quantization, + is_variable, + sparsity, + shape_signature__, + has_rank, + variant_tensors__); +} + +flatbuffers::Offset CreateTensor(flatbuffers::FlatBufferBuilder &_fbb, const TensorT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloGatherOptionsT : public flatbuffers::NativeTable { + typedef StablehloGatherOptions TableType; + std::vector offset_dims{}; + std::vector collapsed_slice_dims{}; + std::vector start_index_map{}; + int64_t index_vector_dim = 0; + std::vector slice_sizes{}; + bool indices_are_sorted = false; +}; + +struct StablehloGatherOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloGatherOptionsT NativeTableType; + typedef StablehloGatherOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OFFSET_DIMS = 4, + VT_COLLAPSED_SLICE_DIMS = 6, + VT_START_INDEX_MAP = 8, + VT_INDEX_VECTOR_DIM = 10, + VT_SLICE_SIZES = 12, + VT_INDICES_ARE_SORTED = 14 }; - int32_t num_splits() const { return GetField(VT_NUM_SPLITS, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_NUM_SPLITS) && + const flatbuffers::Vector *offset_dims() const { + return GetPointer *>(VT_OFFSET_DIMS); + } + const flatbuffers::Vector *collapsed_slice_dims() const { + return GetPointer *>(VT_COLLAPSED_SLICE_DIMS); + } + const flatbuffers::Vector *start_index_map() const { + return GetPointer *>(VT_START_INDEX_MAP); + } + int64_t index_vector_dim() const { + return GetField(VT_INDEX_VECTOR_DIM, 0); + } + const flatbuffers::Vector *slice_sizes() const { + return GetPointer *>(VT_SLICE_SIZES); + } + bool indices_are_sorted() const { + return GetField(VT_INDICES_ARE_SORTED, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_OFFSET_DIMS) && + verifier.VerifyVector(offset_dims()) && + VerifyOffset(verifier, VT_COLLAPSED_SLICE_DIMS) && + verifier.VerifyVector(collapsed_slice_dims()) && + VerifyOffset(verifier, VT_START_INDEX_MAP) && + verifier.VerifyVector(start_index_map()) && + VerifyField(verifier, VT_INDEX_VECTOR_DIM) && + VerifyOffset(verifier, VT_SLICE_SIZES) && + verifier.VerifyVector(slice_sizes()) && + VerifyField(verifier, VT_INDICES_ARE_SORTED) && verifier.EndTable(); } - SplitOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SplitOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SplitOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + StablehloGatherOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloGatherOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloGatherOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SplitOptionsBuilder -{ - typedef SplitOptions Table; +struct StablehloGatherOptionsBuilder { + typedef StablehloGatherOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_num_splits(int32_t num_splits) - { - fbb_.AddElement(SplitOptions::VT_NUM_SPLITS, num_splits, 0); + void add_offset_dims(flatbuffers::Offset> offset_dims) { + fbb_.AddOffset(StablehloGatherOptions::VT_OFFSET_DIMS, offset_dims); + } + void add_collapsed_slice_dims(flatbuffers::Offset> collapsed_slice_dims) { + fbb_.AddOffset(StablehloGatherOptions::VT_COLLAPSED_SLICE_DIMS, collapsed_slice_dims); } - explicit SplitOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_start_index_map(flatbuffers::Offset> start_index_map) { + fbb_.AddOffset(StablehloGatherOptions::VT_START_INDEX_MAP, start_index_map); + } + void add_index_vector_dim(int64_t index_vector_dim) { + fbb_.AddElement(StablehloGatherOptions::VT_INDEX_VECTOR_DIM, index_vector_dim, 0); + } + void add_slice_sizes(flatbuffers::Offset> slice_sizes) { + fbb_.AddOffset(StablehloGatherOptions::VT_SLICE_SIZES, slice_sizes); + } + void add_indices_are_sorted(bool indices_are_sorted) { + fbb_.AddElement(StablehloGatherOptions::VT_INDICES_ARE_SORTED, static_cast(indices_are_sorted), 0); + } + explicit StablehloGatherOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateSplitOptions(flatbuffers::FlatBufferBuilder &_fbb, - int32_t num_splits = 0) -{ - SplitOptionsBuilder builder_(_fbb); - builder_.add_num_splits(num_splits); +inline flatbuffers::Offset CreateStablehloGatherOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> offset_dims = 0, + flatbuffers::Offset> collapsed_slice_dims = 0, + flatbuffers::Offset> start_index_map = 0, + int64_t index_vector_dim = 0, + flatbuffers::Offset> slice_sizes = 0, + bool indices_are_sorted = false) { + StablehloGatherOptionsBuilder builder_(_fbb); + builder_.add_index_vector_dim(index_vector_dim); + builder_.add_slice_sizes(slice_sizes); + builder_.add_start_index_map(start_index_map); + builder_.add_collapsed_slice_dims(collapsed_slice_dims); + builder_.add_offset_dims(offset_dims); + builder_.add_indices_are_sorted(indices_are_sorted); return builder_.Finish(); } -flatbuffers::Offset -CreateSplitOptions(flatbuffers::FlatBufferBuilder &_fbb, const SplitOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct SplitVOptionsT : public flatbuffers::NativeTable -{ - typedef SplitVOptions TableType; - int32_t num_splits = 0; -}; - -struct SplitVOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SplitVOptionsT NativeTableType; - typedef SplitVOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_NUM_SPLITS = 4 +inline flatbuffers::Offset CreateStablehloGatherOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *offset_dims = nullptr, + const std::vector *collapsed_slice_dims = nullptr, + const std::vector *start_index_map = nullptr, + int64_t index_vector_dim = 0, + const std::vector *slice_sizes = nullptr, + bool indices_are_sorted = false) { + auto offset_dims__ = offset_dims ? _fbb.CreateVector(*offset_dims) : 0; + auto collapsed_slice_dims__ = collapsed_slice_dims ? _fbb.CreateVector(*collapsed_slice_dims) : 0; + auto start_index_map__ = start_index_map ? _fbb.CreateVector(*start_index_map) : 0; + auto slice_sizes__ = slice_sizes ? _fbb.CreateVector(*slice_sizes) : 0; + return circle::CreateStablehloGatherOptions( + _fbb, + offset_dims__, + collapsed_slice_dims__, + start_index_map__, + index_vector_dim, + slice_sizes__, + indices_are_sorted); +} + +flatbuffers::Offset CreateStablehloGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloGatherOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloTransposeOptionsT : public flatbuffers::NativeTable { + typedef StablehloTransposeOptions TableType; + std::vector permutation{}; +}; + +struct StablehloTransposeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloTransposeOptionsT NativeTableType; + typedef StablehloTransposeOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PERMUTATION = 4 }; - int32_t num_splits() const { return GetField(VT_NUM_SPLITS, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_NUM_SPLITS) && + const flatbuffers::Vector *permutation() const { + return GetPointer *>(VT_PERMUTATION); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_PERMUTATION) && + verifier.VerifyVector(permutation()) && verifier.EndTable(); } - SplitVOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SplitVOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SplitVOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + StablehloTransposeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloTransposeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloTransposeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SplitVOptionsBuilder -{ - typedef SplitVOptions Table; +struct StablehloTransposeOptionsBuilder { + typedef StablehloTransposeOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_num_splits(int32_t num_splits) - { - fbb_.AddElement(SplitVOptions::VT_NUM_SPLITS, num_splits, 0); + void add_permutation(flatbuffers::Offset> permutation) { + fbb_.AddOffset(StablehloTransposeOptions::VT_PERMUTATION, permutation); } - explicit SplitVOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit StablehloTransposeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateSplitVOptions(flatbuffers::FlatBufferBuilder &_fbb, - int32_t num_splits = 0) -{ - SplitVOptionsBuilder builder_(_fbb); - builder_.add_num_splits(num_splits); +inline flatbuffers::Offset CreateStablehloTransposeOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> permutation = 0) { + StablehloTransposeOptionsBuilder builder_(_fbb); + builder_.add_permutation(permutation); return builder_.Finish(); } -flatbuffers::Offset -CreateSplitVOptions(flatbuffers::FlatBufferBuilder &_fbb, const SplitVOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateStablehloTransposeOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *permutation = nullptr) { + auto permutation__ = permutation ? _fbb.CreateVector(*permutation) : 0; + return circle::CreateStablehloTransposeOptions( + _fbb, + permutation__); +} + +flatbuffers::Offset CreateStablehloTransposeOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloTransposeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct StridedSliceOptionsT : public flatbuffers::NativeTable -{ - typedef StridedSliceOptions TableType; - int32_t begin_mask = 0; - int32_t end_mask = 0; - int32_t ellipsis_mask = 0; - int32_t new_axis_mask = 0; - int32_t shrink_axis_mask = 0; +struct StablehloDotGeneralOptionsT : public flatbuffers::NativeTable { + typedef StablehloDotGeneralOptions TableType; + std::vector lhs_batching_dimensions{}; + std::vector rhs_batching_dimensions{}; + std::vector lhs_contracting_dimensions{}; + std::vector rhs_contracting_dimensions{}; + std::vector precision_config{}; }; -struct StridedSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef StridedSliceOptionsT NativeTableType; - typedef StridedSliceOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_BEGIN_MASK = 4, - VT_END_MASK = 6, - VT_ELLIPSIS_MASK = 8, - VT_NEW_AXIS_MASK = 10, - VT_SHRINK_AXIS_MASK = 12 +struct StablehloDotGeneralOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloDotGeneralOptionsT NativeTableType; + typedef StablehloDotGeneralOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_LHS_BATCHING_DIMENSIONS = 4, + VT_RHS_BATCHING_DIMENSIONS = 6, + VT_LHS_CONTRACTING_DIMENSIONS = 8, + VT_RHS_CONTRACTING_DIMENSIONS = 10, + VT_PRECISION_CONFIG = 12 }; - int32_t begin_mask() const { return GetField(VT_BEGIN_MASK, 0); } - int32_t end_mask() const { return GetField(VT_END_MASK, 0); } - int32_t ellipsis_mask() const { return GetField(VT_ELLIPSIS_MASK, 0); } - int32_t new_axis_mask() const { return GetField(VT_NEW_AXIS_MASK, 0); } - int32_t shrink_axis_mask() const { return GetField(VT_SHRINK_AXIS_MASK, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_BEGIN_MASK) && - VerifyField(verifier, VT_END_MASK) && - VerifyField(verifier, VT_ELLIPSIS_MASK) && - VerifyField(verifier, VT_NEW_AXIS_MASK) && - VerifyField(verifier, VT_SHRINK_AXIS_MASK) && verifier.EndTable(); + const flatbuffers::Vector *lhs_batching_dimensions() const { + return GetPointer *>(VT_LHS_BATCHING_DIMENSIONS); } - StridedSliceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(StridedSliceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + const flatbuffers::Vector *rhs_batching_dimensions() const { + return GetPointer *>(VT_RHS_BATCHING_DIMENSIONS); + } + const flatbuffers::Vector *lhs_contracting_dimensions() const { + return GetPointer *>(VT_LHS_CONTRACTING_DIMENSIONS); + } + const flatbuffers::Vector *rhs_contracting_dimensions() const { + return GetPointer *>(VT_RHS_CONTRACTING_DIMENSIONS); + } + const flatbuffers::Vector *precision_config() const { + return GetPointer *>(VT_PRECISION_CONFIG); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_LHS_BATCHING_DIMENSIONS) && + verifier.VerifyVector(lhs_batching_dimensions()) && + VerifyOffset(verifier, VT_RHS_BATCHING_DIMENSIONS) && + verifier.VerifyVector(rhs_batching_dimensions()) && + VerifyOffset(verifier, VT_LHS_CONTRACTING_DIMENSIONS) && + verifier.VerifyVector(lhs_contracting_dimensions()) && + VerifyOffset(verifier, VT_RHS_CONTRACTING_DIMENSIONS) && + verifier.VerifyVector(rhs_contracting_dimensions()) && + VerifyOffset(verifier, VT_PRECISION_CONFIG) && + verifier.VerifyVector(precision_config()) && + verifier.EndTable(); + } + StablehloDotGeneralOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloDotGeneralOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloDotGeneralOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct StridedSliceOptionsBuilder -{ - typedef StridedSliceOptions Table; +struct StablehloDotGeneralOptionsBuilder { + typedef StablehloDotGeneralOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_begin_mask(int32_t begin_mask) - { - fbb_.AddElement(StridedSliceOptions::VT_BEGIN_MASK, begin_mask, 0); + void add_lhs_batching_dimensions(flatbuffers::Offset> lhs_batching_dimensions) { + fbb_.AddOffset(StablehloDotGeneralOptions::VT_LHS_BATCHING_DIMENSIONS, lhs_batching_dimensions); } - void add_end_mask(int32_t end_mask) - { - fbb_.AddElement(StridedSliceOptions::VT_END_MASK, end_mask, 0); + void add_rhs_batching_dimensions(flatbuffers::Offset> rhs_batching_dimensions) { + fbb_.AddOffset(StablehloDotGeneralOptions::VT_RHS_BATCHING_DIMENSIONS, rhs_batching_dimensions); } - void add_ellipsis_mask(int32_t ellipsis_mask) - { - fbb_.AddElement(StridedSliceOptions::VT_ELLIPSIS_MASK, ellipsis_mask, 0); + void add_lhs_contracting_dimensions(flatbuffers::Offset> lhs_contracting_dimensions) { + fbb_.AddOffset(StablehloDotGeneralOptions::VT_LHS_CONTRACTING_DIMENSIONS, lhs_contracting_dimensions); } - void add_new_axis_mask(int32_t new_axis_mask) - { - fbb_.AddElement(StridedSliceOptions::VT_NEW_AXIS_MASK, new_axis_mask, 0); + void add_rhs_contracting_dimensions(flatbuffers::Offset> rhs_contracting_dimensions) { + fbb_.AddOffset(StablehloDotGeneralOptions::VT_RHS_CONTRACTING_DIMENSIONS, rhs_contracting_dimensions); } - void add_shrink_axis_mask(int32_t shrink_axis_mask) - { - fbb_.AddElement(StridedSliceOptions::VT_SHRINK_AXIS_MASK, shrink_axis_mask, 0); + void add_precision_config(flatbuffers::Offset> precision_config) { + fbb_.AddOffset(StablehloDotGeneralOptions::VT_PRECISION_CONFIG, precision_config); } - explicit StridedSliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit StablehloDotGeneralOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateStridedSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t begin_mask = 0, - int32_t end_mask = 0, int32_t ellipsis_mask = 0, - int32_t new_axis_mask = 0, int32_t shrink_axis_mask = 0) -{ - StridedSliceOptionsBuilder builder_(_fbb); - builder_.add_shrink_axis_mask(shrink_axis_mask); - builder_.add_new_axis_mask(new_axis_mask); - builder_.add_ellipsis_mask(ellipsis_mask); - builder_.add_end_mask(end_mask); - builder_.add_begin_mask(begin_mask); +inline flatbuffers::Offset CreateStablehloDotGeneralOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> lhs_batching_dimensions = 0, + flatbuffers::Offset> rhs_batching_dimensions = 0, + flatbuffers::Offset> lhs_contracting_dimensions = 0, + flatbuffers::Offset> rhs_contracting_dimensions = 0, + flatbuffers::Offset> precision_config = 0) { + StablehloDotGeneralOptionsBuilder builder_(_fbb); + builder_.add_precision_config(precision_config); + builder_.add_rhs_contracting_dimensions(rhs_contracting_dimensions); + builder_.add_lhs_contracting_dimensions(lhs_contracting_dimensions); + builder_.add_rhs_batching_dimensions(rhs_batching_dimensions); + builder_.add_lhs_batching_dimensions(lhs_batching_dimensions); return builder_.Finish(); } -flatbuffers::Offset -CreateStridedSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct LogSoftmaxOptionsT : public flatbuffers::NativeTable -{ - typedef LogSoftmaxOptions TableType; +inline flatbuffers::Offset CreateStablehloDotGeneralOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *lhs_batching_dimensions = nullptr, + const std::vector *rhs_batching_dimensions = nullptr, + const std::vector *lhs_contracting_dimensions = nullptr, + const std::vector *rhs_contracting_dimensions = nullptr, + const std::vector *precision_config = nullptr) { + auto lhs_batching_dimensions__ = lhs_batching_dimensions ? _fbb.CreateVector(*lhs_batching_dimensions) : 0; + auto rhs_batching_dimensions__ = rhs_batching_dimensions ? _fbb.CreateVector(*rhs_batching_dimensions) : 0; + auto lhs_contracting_dimensions__ = lhs_contracting_dimensions ? _fbb.CreateVector(*lhs_contracting_dimensions) : 0; + auto rhs_contracting_dimensions__ = rhs_contracting_dimensions ? _fbb.CreateVector(*rhs_contracting_dimensions) : 0; + auto precision_config__ = precision_config ? _fbb.CreateVector(*precision_config) : 0; + return circle::CreateStablehloDotGeneralOptions( + _fbb, + lhs_batching_dimensions__, + rhs_batching_dimensions__, + lhs_contracting_dimensions__, + rhs_contracting_dimensions__, + precision_config__); +} + +flatbuffers::Offset CreateStablehloDotGeneralOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloDotGeneralOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloReduceWindowOptionsT : public flatbuffers::NativeTable { + typedef StablehloReduceWindowOptions TableType; + std::vector window_dimensions{}; + std::vector window_strides{}; + std::vector base_dilations{}; + std::vector window_dilations{}; + std::vector padding{}; + int32_t body_subgraph_index = 0; }; -struct LogSoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LogSoftmaxOptionsT NativeTableType; - typedef LogSoftmaxOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct StablehloReduceWindowOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloReduceWindowOptionsT NativeTableType; + typedef StablehloReduceWindowOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_WINDOW_DIMENSIONS = 4, + VT_WINDOW_STRIDES = 6, + VT_BASE_DILATIONS = 8, + VT_WINDOW_DILATIONS = 10, + VT_PADDING = 12, + VT_BODY_SUBGRAPH_INDEX = 14 + }; + const flatbuffers::Vector *window_dimensions() const { + return GetPointer *>(VT_WINDOW_DIMENSIONS); } - LogSoftmaxOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LogSoftmaxOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogSoftmaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + const flatbuffers::Vector *window_strides() const { + return GetPointer *>(VT_WINDOW_STRIDES); + } + const flatbuffers::Vector *base_dilations() const { + return GetPointer *>(VT_BASE_DILATIONS); + } + const flatbuffers::Vector *window_dilations() const { + return GetPointer *>(VT_WINDOW_DILATIONS); + } + const flatbuffers::Vector *padding() const { + return GetPointer *>(VT_PADDING); + } + int32_t body_subgraph_index() const { + return GetField(VT_BODY_SUBGRAPH_INDEX, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_WINDOW_DIMENSIONS) && + verifier.VerifyVector(window_dimensions()) && + VerifyOffset(verifier, VT_WINDOW_STRIDES) && + verifier.VerifyVector(window_strides()) && + VerifyOffset(verifier, VT_BASE_DILATIONS) && + verifier.VerifyVector(base_dilations()) && + VerifyOffset(verifier, VT_WINDOW_DILATIONS) && + verifier.VerifyVector(window_dilations()) && + VerifyOffset(verifier, VT_PADDING) && + verifier.VerifyVector(padding()) && + VerifyField(verifier, VT_BODY_SUBGRAPH_INDEX) && + verifier.EndTable(); + } + StablehloReduceWindowOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloReduceWindowOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloReduceWindowOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct LogSoftmaxOptionsBuilder -{ - typedef LogSoftmaxOptions Table; +struct StablehloReduceWindowOptionsBuilder { + typedef StablehloReduceWindowOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit LogSoftmaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_window_dimensions(flatbuffers::Offset> window_dimensions) { + fbb_.AddOffset(StablehloReduceWindowOptions::VT_WINDOW_DIMENSIONS, window_dimensions); + } + void add_window_strides(flatbuffers::Offset> window_strides) { + fbb_.AddOffset(StablehloReduceWindowOptions::VT_WINDOW_STRIDES, window_strides); + } + void add_base_dilations(flatbuffers::Offset> base_dilations) { + fbb_.AddOffset(StablehloReduceWindowOptions::VT_BASE_DILATIONS, base_dilations); + } + void add_window_dilations(flatbuffers::Offset> window_dilations) { + fbb_.AddOffset(StablehloReduceWindowOptions::VT_WINDOW_DILATIONS, window_dilations); + } + void add_padding(flatbuffers::Offset> padding) { + fbb_.AddOffset(StablehloReduceWindowOptions::VT_PADDING, padding); + } + void add_body_subgraph_index(int32_t body_subgraph_index) { + fbb_.AddElement(StablehloReduceWindowOptions::VT_BODY_SUBGRAPH_INDEX, body_subgraph_index, 0); + } + explicit StablehloReduceWindowOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateLogSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - LogSoftmaxOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloReduceWindowOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> window_dimensions = 0, + flatbuffers::Offset> window_strides = 0, + flatbuffers::Offset> base_dilations = 0, + flatbuffers::Offset> window_dilations = 0, + flatbuffers::Offset> padding = 0, + int32_t body_subgraph_index = 0) { + StablehloReduceWindowOptionsBuilder builder_(_fbb); + builder_.add_body_subgraph_index(body_subgraph_index); + builder_.add_padding(padding); + builder_.add_window_dilations(window_dilations); + builder_.add_base_dilations(base_dilations); + builder_.add_window_strides(window_strides); + builder_.add_window_dimensions(window_dimensions); return builder_.Finish(); } -flatbuffers::Offset -CreateLogSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogSoftmaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct CastOptionsT : public flatbuffers::NativeTable -{ - typedef CastOptions TableType; - circle::TensorType in_data_type = circle::TensorType_FLOAT32; - circle::TensorType out_data_type = circle::TensorType_FLOAT32; +inline flatbuffers::Offset CreateStablehloReduceWindowOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *window_dimensions = nullptr, + const std::vector *window_strides = nullptr, + const std::vector *base_dilations = nullptr, + const std::vector *window_dilations = nullptr, + const std::vector *padding = nullptr, + int32_t body_subgraph_index = 0) { + auto window_dimensions__ = window_dimensions ? _fbb.CreateVector(*window_dimensions) : 0; + auto window_strides__ = window_strides ? _fbb.CreateVector(*window_strides) : 0; + auto base_dilations__ = base_dilations ? _fbb.CreateVector(*base_dilations) : 0; + auto window_dilations__ = window_dilations ? _fbb.CreateVector(*window_dilations) : 0; + auto padding__ = padding ? _fbb.CreateVector(*padding) : 0; + return circle::CreateStablehloReduceWindowOptions( + _fbb, + window_dimensions__, + window_strides__, + base_dilations__, + window_dilations__, + padding__, + body_subgraph_index); +} + +flatbuffers::Offset CreateStablehloReduceWindowOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloReduceWindowOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloWhileOptionsT : public flatbuffers::NativeTable { + typedef StablehloWhileOptions TableType; + int32_t cond_subgraph_index = 0; + int32_t body_subgraph_index = 0; }; -struct CastOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef CastOptionsT NativeTableType; - typedef CastOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_IN_DATA_TYPE = 4, - VT_OUT_DATA_TYPE = 6 +struct StablehloWhileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloWhileOptionsT NativeTableType; + typedef StablehloWhileOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_COND_SUBGRAPH_INDEX = 4, + VT_BODY_SUBGRAPH_INDEX = 6 }; - circle::TensorType in_data_type() const - { - return static_cast(GetField(VT_IN_DATA_TYPE, 0)); + int32_t cond_subgraph_index() const { + return GetField(VT_COND_SUBGRAPH_INDEX, 0); } - circle::TensorType out_data_type() const - { - return static_cast(GetField(VT_OUT_DATA_TYPE, 0)); + int32_t body_subgraph_index() const { + return GetField(VT_BODY_SUBGRAPH_INDEX, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_IN_DATA_TYPE) && - VerifyField(verifier, VT_OUT_DATA_TYPE) && verifier.EndTable(); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_COND_SUBGRAPH_INDEX) && + VerifyField(verifier, VT_BODY_SUBGRAPH_INDEX) && + verifier.EndTable(); } - CastOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(CastOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const CastOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + StablehloWhileOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloWhileOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloWhileOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct CastOptionsBuilder -{ - typedef CastOptions Table; +struct StablehloWhileOptionsBuilder { + typedef StablehloWhileOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_in_data_type(circle::TensorType in_data_type) - { - fbb_.AddElement(CastOptions::VT_IN_DATA_TYPE, static_cast(in_data_type), 0); + void add_cond_subgraph_index(int32_t cond_subgraph_index) { + fbb_.AddElement(StablehloWhileOptions::VT_COND_SUBGRAPH_INDEX, cond_subgraph_index, 0); } - void add_out_data_type(circle::TensorType out_data_type) - { - fbb_.AddElement(CastOptions::VT_OUT_DATA_TYPE, static_cast(out_data_type), 0); + void add_body_subgraph_index(int32_t body_subgraph_index) { + fbb_.AddElement(StablehloWhileOptions::VT_BODY_SUBGRAPH_INDEX, body_subgraph_index, 0); } - explicit CastOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit StablehloWhileOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateCastOptions(flatbuffers::FlatBufferBuilder &_fbb, - circle::TensorType in_data_type = circle::TensorType_FLOAT32, - circle::TensorType out_data_type = circle::TensorType_FLOAT32) -{ - CastOptionsBuilder builder_(_fbb); - builder_.add_out_data_type(out_data_type); - builder_.add_in_data_type(in_data_type); +inline flatbuffers::Offset CreateStablehloWhileOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t cond_subgraph_index = 0, + int32_t body_subgraph_index = 0) { + StablehloWhileOptionsBuilder builder_(_fbb); + builder_.add_body_subgraph_index(body_subgraph_index); + builder_.add_cond_subgraph_index(cond_subgraph_index); return builder_.Finish(); } -flatbuffers::Offset -CreateCastOptions(flatbuffers::FlatBufferBuilder &_fbb, const CastOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateStablehloWhileOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloWhileOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct DequantizeOptionsT : public flatbuffers::NativeTable -{ - typedef DequantizeOptions TableType; +struct StablehloSortOptionsT : public flatbuffers::NativeTable { + typedef StablehloSortOptions TableType; + int64_t dimension = 0; + bool is_stable = false; + int32_t comparator_subgraph_index = 0; }; -struct DequantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef DequantizeOptionsT NativeTableType; - typedef DequantizeOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct StablehloSortOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloSortOptionsT NativeTableType; + typedef StablehloSortOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DIMENSION = 4, + VT_IS_STABLE = 6, + VT_COMPARATOR_SUBGRAPH_INDEX = 8 + }; + int64_t dimension() const { + return GetField(VT_DIMENSION, 0); } - DequantizeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(DequantizeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool is_stable() const { + return GetField(VT_IS_STABLE, 0) != 0; + } + int32_t comparator_subgraph_index() const { + return GetField(VT_COMPARATOR_SUBGRAPH_INDEX, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_DIMENSION) && + VerifyField(verifier, VT_IS_STABLE) && + VerifyField(verifier, VT_COMPARATOR_SUBGRAPH_INDEX) && + verifier.EndTable(); + } + StablehloSortOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloSortOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloSortOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct DequantizeOptionsBuilder -{ - typedef DequantizeOptions Table; +struct StablehloSortOptionsBuilder { + typedef StablehloSortOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit DequantizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_dimension(int64_t dimension) { + fbb_.AddElement(StablehloSortOptions::VT_DIMENSION, dimension, 0); + } + void add_is_stable(bool is_stable) { + fbb_.AddElement(StablehloSortOptions::VT_IS_STABLE, static_cast(is_stable), 0); + } + void add_comparator_subgraph_index(int32_t comparator_subgraph_index) { + fbb_.AddElement(StablehloSortOptions::VT_COMPARATOR_SUBGRAPH_INDEX, comparator_subgraph_index, 0); + } + explicit StablehloSortOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateDequantizeOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - DequantizeOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloSortOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t dimension = 0, + bool is_stable = false, + int32_t comparator_subgraph_index = 0) { + StablehloSortOptionsBuilder builder_(_fbb); + builder_.add_dimension(dimension); + builder_.add_comparator_subgraph_index(comparator_subgraph_index); + builder_.add_is_stable(is_stable); return builder_.Finish(); } -flatbuffers::Offset -CreateDequantizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateStablehloSortOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloSortOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct MaximumMinimumOptionsT : public flatbuffers::NativeTable -{ - typedef MaximumMinimumOptions TableType; +struct StablehloConcatenateOptionsT : public flatbuffers::NativeTable { + typedef StablehloConcatenateOptions TableType; + int64_t dimension = 0; }; -struct MaximumMinimumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef MaximumMinimumOptionsT NativeTableType; - typedef MaximumMinimumOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct StablehloConcatenateOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloConcatenateOptionsT NativeTableType; + typedef StablehloConcatenateOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DIMENSION = 4 + }; + int64_t dimension() const { + return GetField(VT_DIMENSION, 0); } - MaximumMinimumOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(MaximumMinimumOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const MaximumMinimumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_DIMENSION) && + verifier.EndTable(); + } + StablehloConcatenateOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloConcatenateOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloConcatenateOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct MaximumMinimumOptionsBuilder -{ - typedef MaximumMinimumOptions Table; +struct StablehloConcatenateOptionsBuilder { + typedef StablehloConcatenateOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit MaximumMinimumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_dimension(int64_t dimension) { + fbb_.AddElement(StablehloConcatenateOptions::VT_DIMENSION, dimension, 0); + } + explicit StablehloConcatenateOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateMaximumMinimumOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - MaximumMinimumOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloConcatenateOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t dimension = 0) { + StablehloConcatenateOptionsBuilder builder_(_fbb); + builder_.add_dimension(dimension); return builder_.Finish(); } -flatbuffers::Offset -CreateMaximumMinimumOptions(flatbuffers::FlatBufferBuilder &_fbb, const MaximumMinimumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateStablehloConcatenateOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloConcatenateOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct TileOptionsT : public flatbuffers::NativeTable -{ - typedef TileOptions TableType; +struct StablehloBroadcastInDimOptionsT : public flatbuffers::NativeTable { + typedef StablehloBroadcastInDimOptions TableType; + std::vector broadcast_dimensions{}; }; -struct TileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef TileOptionsT NativeTableType; - typedef TileOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct StablehloBroadcastInDimOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloBroadcastInDimOptionsT NativeTableType; + typedef StablehloBroadcastInDimOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BROADCAST_DIMENSIONS = 4 + }; + const flatbuffers::Vector *broadcast_dimensions() const { + return GetPointer *>(VT_BROADCAST_DIMENSIONS); } - TileOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(TileOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const TileOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_BROADCAST_DIMENSIONS) && + verifier.VerifyVector(broadcast_dimensions()) && + verifier.EndTable(); + } + StablehloBroadcastInDimOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloBroadcastInDimOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloBroadcastInDimOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct TileOptionsBuilder -{ - typedef TileOptions Table; +struct StablehloBroadcastInDimOptionsBuilder { + typedef StablehloBroadcastInDimOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit TileOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_broadcast_dimensions(flatbuffers::Offset> broadcast_dimensions) { + fbb_.AddOffset(StablehloBroadcastInDimOptions::VT_BROADCAST_DIMENSIONS, broadcast_dimensions); + } + explicit StablehloBroadcastInDimOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateTileOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - TileOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloBroadcastInDimOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> broadcast_dimensions = 0) { + StablehloBroadcastInDimOptionsBuilder builder_(_fbb); + builder_.add_broadcast_dimensions(broadcast_dimensions); return builder_.Finish(); } -flatbuffers::Offset -CreateTileOptions(flatbuffers::FlatBufferBuilder &_fbb, const TileOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateStablehloBroadcastInDimOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *broadcast_dimensions = nullptr) { + auto broadcast_dimensions__ = broadcast_dimensions ? _fbb.CreateVector(*broadcast_dimensions) : 0; + return circle::CreateStablehloBroadcastInDimOptions( + _fbb, + broadcast_dimensions__); +} -struct ArgMaxOptionsT : public flatbuffers::NativeTable -{ - typedef ArgMaxOptions TableType; - circle::TensorType output_type = circle::TensorType_FLOAT32; +flatbuffers::Offset CreateStablehloBroadcastInDimOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloBroadcastInDimOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloCompareOptionsT : public flatbuffers::NativeTable { + typedef StablehloCompareOptions TableType; + circle::StablehloComparisonDirection comparison_direction = circle::StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_EQ; + circle::StablehloComparisonType compare_type = circle::StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_NOTYPE; }; -struct ArgMaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ArgMaxOptionsT NativeTableType; - typedef ArgMaxOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_OUTPUT_TYPE = 4 +struct StablehloCompareOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloCompareOptionsT NativeTableType; + typedef StablehloCompareOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_COMPARISON_DIRECTION = 4, + VT_COMPARE_TYPE = 6 }; - circle::TensorType output_type() const - { - return static_cast(GetField(VT_OUTPUT_TYPE, 0)); + circle::StablehloComparisonDirection comparison_direction() const { + return static_cast(GetField(VT_COMPARISON_DIRECTION, 0)); + } + circle::StablehloComparisonType compare_type() const { + return static_cast(GetField(VT_COMPARE_TYPE, 0)); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_OUTPUT_TYPE) && + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_COMPARISON_DIRECTION) && + VerifyField(verifier, VT_COMPARE_TYPE) && verifier.EndTable(); } - ArgMaxOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ArgMaxOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + StablehloCompareOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloCompareOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloCompareOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct ArgMaxOptionsBuilder -{ - typedef ArgMaxOptions Table; +struct StablehloCompareOptionsBuilder { + typedef StablehloCompareOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_output_type(circle::TensorType output_type) - { - fbb_.AddElement(ArgMaxOptions::VT_OUTPUT_TYPE, static_cast(output_type), 0); + void add_comparison_direction(circle::StablehloComparisonDirection comparison_direction) { + fbb_.AddElement(StablehloCompareOptions::VT_COMPARISON_DIRECTION, static_cast(comparison_direction), 0); } - explicit ArgMaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_compare_type(circle::StablehloComparisonType compare_type) { + fbb_.AddElement(StablehloCompareOptions::VT_COMPARE_TYPE, static_cast(compare_type), 0); + } + explicit StablehloCompareOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateArgMaxOptions(flatbuffers::FlatBufferBuilder &_fbb, - circle::TensorType output_type = circle::TensorType_FLOAT32) -{ - ArgMaxOptionsBuilder builder_(_fbb); - builder_.add_output_type(output_type); +inline flatbuffers::Offset CreateStablehloCompareOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::StablehloComparisonDirection comparison_direction = circle::StablehloComparisonDirection_STABLEHLO_COMPARISON_DIRECTION_EQ, + circle::StablehloComparisonType compare_type = circle::StablehloComparisonType_STABLEHLO_COMPARISON_TYPE_NOTYPE) { + StablehloCompareOptionsBuilder builder_(_fbb); + builder_.add_compare_type(compare_type); + builder_.add_comparison_direction(comparison_direction); return builder_.Finish(); } -flatbuffers::Offset -CreateArgMaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateStablehloCompareOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloCompareOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct ArgMinOptionsT : public flatbuffers::NativeTable -{ - typedef ArgMinOptions TableType; - circle::TensorType output_type = circle::TensorType_FLOAT32; +struct StablehloDynamicSliceOptionsT : public flatbuffers::NativeTable { + typedef StablehloDynamicSliceOptions TableType; + std::vector slice_sizes{}; }; -struct ArgMinOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ArgMinOptionsT NativeTableType; - typedef ArgMinOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_OUTPUT_TYPE = 4 +struct StablehloDynamicSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloDynamicSliceOptionsT NativeTableType; + typedef StablehloDynamicSliceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SLICE_SIZES = 4 }; - circle::TensorType output_type() const - { - return static_cast(GetField(VT_OUTPUT_TYPE, 0)); + const flatbuffers::Vector *slice_sizes() const { + return GetPointer *>(VT_SLICE_SIZES); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_OUTPUT_TYPE) && + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_SLICE_SIZES) && + verifier.VerifyVector(slice_sizes()) && verifier.EndTable(); } - ArgMinOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ArgMinOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMinOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + StablehloDynamicSliceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloDynamicSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloDynamicSliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct ArgMinOptionsBuilder -{ - typedef ArgMinOptions Table; +struct StablehloDynamicSliceOptionsBuilder { + typedef StablehloDynamicSliceOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_output_type(circle::TensorType output_type) - { - fbb_.AddElement(ArgMinOptions::VT_OUTPUT_TYPE, static_cast(output_type), 0); + void add_slice_sizes(flatbuffers::Offset> slice_sizes) { + fbb_.AddOffset(StablehloDynamicSliceOptions::VT_SLICE_SIZES, slice_sizes); } - explicit ArgMinOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit StablehloDynamicSliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateArgMinOptions(flatbuffers::FlatBufferBuilder &_fbb, - circle::TensorType output_type = circle::TensorType_FLOAT32) -{ - ArgMinOptionsBuilder builder_(_fbb); - builder_.add_output_type(output_type); +inline flatbuffers::Offset CreateStablehloDynamicSliceOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> slice_sizes = 0) { + StablehloDynamicSliceOptionsBuilder builder_(_fbb); + builder_.add_slice_sizes(slice_sizes); return builder_.Finish(); } -flatbuffers::Offset -CreateArgMinOptions(flatbuffers::FlatBufferBuilder &_fbb, const ArgMinOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateStablehloDynamicSliceOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *slice_sizes = nullptr) { + auto slice_sizes__ = slice_sizes ? _fbb.CreateVector(*slice_sizes) : 0; + return circle::CreateStablehloDynamicSliceOptions( + _fbb, + slice_sizes__); +} + +flatbuffers::Offset CreateStablehloDynamicSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloDynamicSliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct GreaterOptionsT : public flatbuffers::NativeTable -{ - typedef GreaterOptions TableType; +struct StablehloPadOptionsT : public flatbuffers::NativeTable { + typedef StablehloPadOptions TableType; + std::vector edge_padding_low{}; + std::vector edge_padding_high{}; + std::vector interior_padding{}; }; -struct GreaterOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef GreaterOptionsT NativeTableType; - typedef GreaterOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct StablehloPadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloPadOptionsT NativeTableType; + typedef StablehloPadOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_EDGE_PADDING_LOW = 4, + VT_EDGE_PADDING_HIGH = 6, + VT_INTERIOR_PADDING = 8 + }; + const flatbuffers::Vector *edge_padding_low() const { + return GetPointer *>(VT_EDGE_PADDING_LOW); } - GreaterOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(GreaterOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const GreaterOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + const flatbuffers::Vector *edge_padding_high() const { + return GetPointer *>(VT_EDGE_PADDING_HIGH); + } + const flatbuffers::Vector *interior_padding() const { + return GetPointer *>(VT_INTERIOR_PADDING); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_EDGE_PADDING_LOW) && + verifier.VerifyVector(edge_padding_low()) && + VerifyOffset(verifier, VT_EDGE_PADDING_HIGH) && + verifier.VerifyVector(edge_padding_high()) && + VerifyOffset(verifier, VT_INTERIOR_PADDING) && + verifier.VerifyVector(interior_padding()) && + verifier.EndTable(); + } + StablehloPadOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloPadOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloPadOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct GreaterOptionsBuilder -{ - typedef GreaterOptions Table; +struct StablehloPadOptionsBuilder { + typedef StablehloPadOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit GreaterOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_edge_padding_low(flatbuffers::Offset> edge_padding_low) { + fbb_.AddOffset(StablehloPadOptions::VT_EDGE_PADDING_LOW, edge_padding_low); + } + void add_edge_padding_high(flatbuffers::Offset> edge_padding_high) { + fbb_.AddOffset(StablehloPadOptions::VT_EDGE_PADDING_HIGH, edge_padding_high); + } + void add_interior_padding(flatbuffers::Offset> interior_padding) { + fbb_.AddOffset(StablehloPadOptions::VT_INTERIOR_PADDING, interior_padding); + } + explicit StablehloPadOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateGreaterOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - GreaterOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloPadOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> edge_padding_low = 0, + flatbuffers::Offset> edge_padding_high = 0, + flatbuffers::Offset> interior_padding = 0) { + StablehloPadOptionsBuilder builder_(_fbb); + builder_.add_interior_padding(interior_padding); + builder_.add_edge_padding_high(edge_padding_high); + builder_.add_edge_padding_low(edge_padding_low); return builder_.Finish(); } -flatbuffers::Offset -CreateGreaterOptions(flatbuffers::FlatBufferBuilder &_fbb, const GreaterOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateStablehloPadOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *edge_padding_low = nullptr, + const std::vector *edge_padding_high = nullptr, + const std::vector *interior_padding = nullptr) { + auto edge_padding_low__ = edge_padding_low ? _fbb.CreateVector(*edge_padding_low) : 0; + auto edge_padding_high__ = edge_padding_high ? _fbb.CreateVector(*edge_padding_high) : 0; + auto interior_padding__ = interior_padding ? _fbb.CreateVector(*interior_padding) : 0; + return circle::CreateStablehloPadOptions( + _fbb, + edge_padding_low__, + edge_padding_high__, + interior_padding__); +} + +flatbuffers::Offset CreateStablehloPadOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloPadOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct GreaterEqualOptionsT : public flatbuffers::NativeTable -{ - typedef GreaterEqualOptions TableType; +struct StablehloIotaOptionsT : public flatbuffers::NativeTable { + typedef StablehloIotaOptions TableType; + int64_t iota_dimension = 0; }; -struct GreaterEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef GreaterEqualOptionsT NativeTableType; - typedef GreaterEqualOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct StablehloIotaOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloIotaOptionsT NativeTableType; + typedef StablehloIotaOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IOTA_DIMENSION = 4 + }; + int64_t iota_dimension() const { + return GetField(VT_IOTA_DIMENSION, 0); } - GreaterEqualOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(GreaterEqualOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const GreaterEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_IOTA_DIMENSION) && + verifier.EndTable(); + } + StablehloIotaOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloIotaOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloIotaOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct GreaterEqualOptionsBuilder -{ - typedef GreaterEqualOptions Table; +struct StablehloIotaOptionsBuilder { + typedef StablehloIotaOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit GreaterEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_iota_dimension(int64_t iota_dimension) { + fbb_.AddElement(StablehloIotaOptions::VT_IOTA_DIMENSION, iota_dimension, 0); + } + explicit StablehloIotaOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateGreaterEqualOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - GreaterEqualOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloIotaOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t iota_dimension = 0) { + StablehloIotaOptionsBuilder builder_(_fbb); + builder_.add_iota_dimension(iota_dimension); return builder_.Finish(); } -flatbuffers::Offset -CreateGreaterEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const GreaterEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct LessOptionsT : public flatbuffers::NativeTable -{ - typedef LessOptions TableType; -}; - -struct LessOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LessOptionsT NativeTableType; - typedef LessOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +flatbuffers::Offset CreateStablehloIotaOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloIotaOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloCustomCallOptionsT : public flatbuffers::NativeTable { + typedef StablehloCustomCallOptions TableType; + std::string call_target_name{}; + bool has_side_effect = false; + std::string backend_config{}; + int32_t api_version = 0; + std::vector called_computations{}; + std::vector custom_attributes{}; +}; + +struct StablehloCustomCallOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloCustomCallOptionsT NativeTableType; + typedef StablehloCustomCallOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CALL_TARGET_NAME = 4, + VT_HAS_SIDE_EFFECT = 6, + VT_BACKEND_CONFIG = 8, + VT_API_VERSION = 10, + VT_CALLED_COMPUTATIONS = 12, + VT_CUSTOM_ATTRIBUTES = 14 + }; + const flatbuffers::String *call_target_name() const { + return GetPointer(VT_CALL_TARGET_NAME); } - LessOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LessOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LessOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool has_side_effect() const { + return GetField(VT_HAS_SIDE_EFFECT, 0) != 0; + } + const flatbuffers::String *backend_config() const { + return GetPointer(VT_BACKEND_CONFIG); + } + int32_t api_version() const { + return GetField(VT_API_VERSION, 0); + } + const flatbuffers::Vector *called_computations() const { + return GetPointer *>(VT_CALLED_COMPUTATIONS); + } + const flatbuffers::Vector *custom_attributes() const { + return GetPointer *>(VT_CUSTOM_ATTRIBUTES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_CALL_TARGET_NAME) && + verifier.VerifyString(call_target_name()) && + VerifyField(verifier, VT_HAS_SIDE_EFFECT) && + VerifyOffset(verifier, VT_BACKEND_CONFIG) && + verifier.VerifyString(backend_config()) && + VerifyField(verifier, VT_API_VERSION) && + VerifyOffset(verifier, VT_CALLED_COMPUTATIONS) && + verifier.VerifyVector(called_computations()) && + VerifyOffset(verifier, VT_CUSTOM_ATTRIBUTES) && + verifier.VerifyVector(custom_attributes()) && + verifier.EndTable(); + } + StablehloCustomCallOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloCustomCallOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloCustomCallOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct LessOptionsBuilder -{ - typedef LessOptions Table; +struct StablehloCustomCallOptionsBuilder { + typedef StablehloCustomCallOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit LessOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_call_target_name(flatbuffers::Offset call_target_name) { + fbb_.AddOffset(StablehloCustomCallOptions::VT_CALL_TARGET_NAME, call_target_name); + } + void add_has_side_effect(bool has_side_effect) { + fbb_.AddElement(StablehloCustomCallOptions::VT_HAS_SIDE_EFFECT, static_cast(has_side_effect), 0); + } + void add_backend_config(flatbuffers::Offset backend_config) { + fbb_.AddOffset(StablehloCustomCallOptions::VT_BACKEND_CONFIG, backend_config); + } + void add_api_version(int32_t api_version) { + fbb_.AddElement(StablehloCustomCallOptions::VT_API_VERSION, api_version, 0); + } + void add_called_computations(flatbuffers::Offset> called_computations) { + fbb_.AddOffset(StablehloCustomCallOptions::VT_CALLED_COMPUTATIONS, called_computations); + } + void add_custom_attributes(flatbuffers::Offset> custom_attributes) { + fbb_.AddOffset(StablehloCustomCallOptions::VT_CUSTOM_ATTRIBUTES, custom_attributes); + } + explicit StablehloCustomCallOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateLessOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - LessOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloCustomCallOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset call_target_name = 0, + bool has_side_effect = false, + flatbuffers::Offset backend_config = 0, + int32_t api_version = 0, + flatbuffers::Offset> called_computations = 0, + flatbuffers::Offset> custom_attributes = 0) { + StablehloCustomCallOptionsBuilder builder_(_fbb); + builder_.add_custom_attributes(custom_attributes); + builder_.add_called_computations(called_computations); + builder_.add_api_version(api_version); + builder_.add_backend_config(backend_config); + builder_.add_call_target_name(call_target_name); + builder_.add_has_side_effect(has_side_effect); return builder_.Finish(); } -flatbuffers::Offset -CreateLessOptions(flatbuffers::FlatBufferBuilder &_fbb, const LessOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct LessEqualOptionsT : public flatbuffers::NativeTable -{ - typedef LessEqualOptions TableType; +inline flatbuffers::Offset CreateStablehloCustomCallOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *call_target_name = nullptr, + bool has_side_effect = false, + const char *backend_config = nullptr, + int32_t api_version = 0, + const std::vector *called_computations = nullptr, + const std::vector *custom_attributes = nullptr) { + auto call_target_name__ = call_target_name ? _fbb.CreateString(call_target_name) : 0; + auto backend_config__ = backend_config ? _fbb.CreateString(backend_config) : 0; + auto called_computations__ = called_computations ? _fbb.CreateVector(*called_computations) : 0; + auto custom_attributes__ = custom_attributes ? _fbb.CreateVector(*custom_attributes) : 0; + return circle::CreateStablehloCustomCallOptions( + _fbb, + call_target_name__, + has_side_effect, + backend_config__, + api_version, + called_computations__, + custom_attributes__); +} + +flatbuffers::Offset CreateStablehloCustomCallOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloCustomCallOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloReduceOptionsT : public flatbuffers::NativeTable { + typedef StablehloReduceOptions TableType; + std::vector dimensions{}; + int32_t body_subgraph_index = 0; }; -struct LessEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LessEqualOptionsT NativeTableType; - typedef LessEqualOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct StablehloReduceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloReduceOptionsT NativeTableType; + typedef StablehloReduceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DIMENSIONS = 4, + VT_BODY_SUBGRAPH_INDEX = 6 + }; + const flatbuffers::Vector *dimensions() const { + return GetPointer *>(VT_DIMENSIONS); } - LessEqualOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LessEqualOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LessEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + int32_t body_subgraph_index() const { + return GetField(VT_BODY_SUBGRAPH_INDEX, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DIMENSIONS) && + verifier.VerifyVector(dimensions()) && + VerifyField(verifier, VT_BODY_SUBGRAPH_INDEX) && + verifier.EndTable(); + } + StablehloReduceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloReduceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloReduceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct LessEqualOptionsBuilder -{ - typedef LessEqualOptions Table; +struct StablehloReduceOptionsBuilder { + typedef StablehloReduceOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit LessEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_dimensions(flatbuffers::Offset> dimensions) { + fbb_.AddOffset(StablehloReduceOptions::VT_DIMENSIONS, dimensions); + } + void add_body_subgraph_index(int32_t body_subgraph_index) { + fbb_.AddElement(StablehloReduceOptions::VT_BODY_SUBGRAPH_INDEX, body_subgraph_index, 0); + } + explicit StablehloReduceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateLessEqualOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - LessEqualOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloReduceOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> dimensions = 0, + int32_t body_subgraph_index = 0) { + StablehloReduceOptionsBuilder builder_(_fbb); + builder_.add_body_subgraph_index(body_subgraph_index); + builder_.add_dimensions(dimensions); return builder_.Finish(); } -flatbuffers::Offset -CreateLessEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const LessEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateStablehloReduceOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *dimensions = nullptr, + int32_t body_subgraph_index = 0) { + auto dimensions__ = dimensions ? _fbb.CreateVector(*dimensions) : 0; + return circle::CreateStablehloReduceOptions( + _fbb, + dimensions__, + body_subgraph_index); +} -struct NegOptionsT : public flatbuffers::NativeTable -{ - typedef NegOptions TableType; +flatbuffers::Offset CreateStablehloReduceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloReduceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloSliceOptionsT : public flatbuffers::NativeTable { + typedef StablehloSliceOptions TableType; + std::vector start_indices{}; + std::vector limit_indices{}; + std::vector strides{}; }; -struct NegOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef NegOptionsT NativeTableType; - typedef NegOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct StablehloSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloSliceOptionsT NativeTableType; + typedef StablehloSliceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_START_INDICES = 4, + VT_LIMIT_INDICES = 6, + VT_STRIDES = 8 + }; + const flatbuffers::Vector *start_indices() const { + return GetPointer *>(VT_START_INDICES); } - NegOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(NegOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const NegOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + const flatbuffers::Vector *limit_indices() const { + return GetPointer *>(VT_LIMIT_INDICES); + } + const flatbuffers::Vector *strides() const { + return GetPointer *>(VT_STRIDES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_START_INDICES) && + verifier.VerifyVector(start_indices()) && + VerifyOffset(verifier, VT_LIMIT_INDICES) && + verifier.VerifyVector(limit_indices()) && + VerifyOffset(verifier, VT_STRIDES) && + verifier.VerifyVector(strides()) && + verifier.EndTable(); + } + StablehloSliceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloSliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct NegOptionsBuilder -{ - typedef NegOptions Table; +struct StablehloSliceOptionsBuilder { + typedef StablehloSliceOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit NegOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_start_indices(flatbuffers::Offset> start_indices) { + fbb_.AddOffset(StablehloSliceOptions::VT_START_INDICES, start_indices); + } + void add_limit_indices(flatbuffers::Offset> limit_indices) { + fbb_.AddOffset(StablehloSliceOptions::VT_LIMIT_INDICES, limit_indices); + } + void add_strides(flatbuffers::Offset> strides) { + fbb_.AddOffset(StablehloSliceOptions::VT_STRIDES, strides); + } + explicit StablehloSliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateNegOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - NegOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloSliceOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> start_indices = 0, + flatbuffers::Offset> limit_indices = 0, + flatbuffers::Offset> strides = 0) { + StablehloSliceOptionsBuilder builder_(_fbb); + builder_.add_strides(strides); + builder_.add_limit_indices(limit_indices); + builder_.add_start_indices(start_indices); return builder_.Finish(); } -flatbuffers::Offset -CreateNegOptions(flatbuffers::FlatBufferBuilder &_fbb, const NegOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct SelectOptionsT : public flatbuffers::NativeTable -{ - typedef SelectOptions TableType; -}; - -struct SelectOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SelectOptionsT NativeTableType; - typedef SelectOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +inline flatbuffers::Offset CreateStablehloSliceOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *start_indices = nullptr, + const std::vector *limit_indices = nullptr, + const std::vector *strides = nullptr) { + auto start_indices__ = start_indices ? _fbb.CreateVector(*start_indices) : 0; + auto limit_indices__ = limit_indices ? _fbb.CreateVector(*limit_indices) : 0; + auto strides__ = strides ? _fbb.CreateVector(*strides) : 0; + return circle::CreateStablehloSliceOptions( + _fbb, + start_indices__, + limit_indices__, + strides__); +} + +flatbuffers::Offset CreateStablehloSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloSliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloConvolutionOptionsT : public flatbuffers::NativeTable { + typedef StablehloConvolutionOptions TableType; + std::vector window_strides{}; + std::vector padding{}; + std::vector lhs_dilation{}; + std::vector rhs_dilation{}; + std::vector window_reversal{}; + int64_t input_batch_dimension = 0; + int64_t input_feature_dimension = 0; + std::vector input_spatial_dimensions{}; + int64_t kernel_input_feature_dimension = 0; + int64_t kernel_output_feature_dimension = 0; + std::vector kernel_spatial_dimensions{}; + int64_t output_batch_dimension = 0; + int64_t output_feature_dimension = 0; + std::vector output_spatial_dimensions{}; + int64_t feature_group_count = 0; + int64_t batch_group_count = 0; + std::vector precision_config{}; +}; + +struct StablehloConvolutionOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloConvolutionOptionsT NativeTableType; + typedef StablehloConvolutionOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_WINDOW_STRIDES = 4, + VT_PADDING = 6, + VT_LHS_DILATION = 8, + VT_RHS_DILATION = 10, + VT_WINDOW_REVERSAL = 12, + VT_INPUT_BATCH_DIMENSION = 14, + VT_INPUT_FEATURE_DIMENSION = 16, + VT_INPUT_SPATIAL_DIMENSIONS = 18, + VT_KERNEL_INPUT_FEATURE_DIMENSION = 20, + VT_KERNEL_OUTPUT_FEATURE_DIMENSION = 22, + VT_KERNEL_SPATIAL_DIMENSIONS = 24, + VT_OUTPUT_BATCH_DIMENSION = 26, + VT_OUTPUT_FEATURE_DIMENSION = 28, + VT_OUTPUT_SPATIAL_DIMENSIONS = 30, + VT_FEATURE_GROUP_COUNT = 32, + VT_BATCH_GROUP_COUNT = 34, + VT_PRECISION_CONFIG = 36 + }; + const flatbuffers::Vector *window_strides() const { + return GetPointer *>(VT_WINDOW_STRIDES); } - SelectOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SelectOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SelectOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + const flatbuffers::Vector *padding() const { + return GetPointer *>(VT_PADDING); + } + const flatbuffers::Vector *lhs_dilation() const { + return GetPointer *>(VT_LHS_DILATION); + } + const flatbuffers::Vector *rhs_dilation() const { + return GetPointer *>(VT_RHS_DILATION); + } + const flatbuffers::Vector *window_reversal() const { + return GetPointer *>(VT_WINDOW_REVERSAL); + } + int64_t input_batch_dimension() const { + return GetField(VT_INPUT_BATCH_DIMENSION, 0); + } + int64_t input_feature_dimension() const { + return GetField(VT_INPUT_FEATURE_DIMENSION, 0); + } + const flatbuffers::Vector *input_spatial_dimensions() const { + return GetPointer *>(VT_INPUT_SPATIAL_DIMENSIONS); + } + int64_t kernel_input_feature_dimension() const { + return GetField(VT_KERNEL_INPUT_FEATURE_DIMENSION, 0); + } + int64_t kernel_output_feature_dimension() const { + return GetField(VT_KERNEL_OUTPUT_FEATURE_DIMENSION, 0); + } + const flatbuffers::Vector *kernel_spatial_dimensions() const { + return GetPointer *>(VT_KERNEL_SPATIAL_DIMENSIONS); + } + int64_t output_batch_dimension() const { + return GetField(VT_OUTPUT_BATCH_DIMENSION, 0); + } + int64_t output_feature_dimension() const { + return GetField(VT_OUTPUT_FEATURE_DIMENSION, 0); + } + const flatbuffers::Vector *output_spatial_dimensions() const { + return GetPointer *>(VT_OUTPUT_SPATIAL_DIMENSIONS); + } + int64_t feature_group_count() const { + return GetField(VT_FEATURE_GROUP_COUNT, 0); + } + int64_t batch_group_count() const { + return GetField(VT_BATCH_GROUP_COUNT, 0); + } + const flatbuffers::Vector *precision_config() const { + return GetPointer *>(VT_PRECISION_CONFIG); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_WINDOW_STRIDES) && + verifier.VerifyVector(window_strides()) && + VerifyOffset(verifier, VT_PADDING) && + verifier.VerifyVector(padding()) && + VerifyOffset(verifier, VT_LHS_DILATION) && + verifier.VerifyVector(lhs_dilation()) && + VerifyOffset(verifier, VT_RHS_DILATION) && + verifier.VerifyVector(rhs_dilation()) && + VerifyOffset(verifier, VT_WINDOW_REVERSAL) && + verifier.VerifyVector(window_reversal()) && + VerifyField(verifier, VT_INPUT_BATCH_DIMENSION) && + VerifyField(verifier, VT_INPUT_FEATURE_DIMENSION) && + VerifyOffset(verifier, VT_INPUT_SPATIAL_DIMENSIONS) && + verifier.VerifyVector(input_spatial_dimensions()) && + VerifyField(verifier, VT_KERNEL_INPUT_FEATURE_DIMENSION) && + VerifyField(verifier, VT_KERNEL_OUTPUT_FEATURE_DIMENSION) && + VerifyOffset(verifier, VT_KERNEL_SPATIAL_DIMENSIONS) && + verifier.VerifyVector(kernel_spatial_dimensions()) && + VerifyField(verifier, VT_OUTPUT_BATCH_DIMENSION) && + VerifyField(verifier, VT_OUTPUT_FEATURE_DIMENSION) && + VerifyOffset(verifier, VT_OUTPUT_SPATIAL_DIMENSIONS) && + verifier.VerifyVector(output_spatial_dimensions()) && + VerifyField(verifier, VT_FEATURE_GROUP_COUNT) && + VerifyField(verifier, VT_BATCH_GROUP_COUNT) && + VerifyOffset(verifier, VT_PRECISION_CONFIG) && + verifier.VerifyVector(precision_config()) && + verifier.EndTable(); + } + StablehloConvolutionOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloConvolutionOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloConvolutionOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SelectOptionsBuilder -{ - typedef SelectOptions Table; +struct StablehloConvolutionOptionsBuilder { + typedef StablehloConvolutionOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit SelectOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_window_strides(flatbuffers::Offset> window_strides) { + fbb_.AddOffset(StablehloConvolutionOptions::VT_WINDOW_STRIDES, window_strides); + } + void add_padding(flatbuffers::Offset> padding) { + fbb_.AddOffset(StablehloConvolutionOptions::VT_PADDING, padding); + } + void add_lhs_dilation(flatbuffers::Offset> lhs_dilation) { + fbb_.AddOffset(StablehloConvolutionOptions::VT_LHS_DILATION, lhs_dilation); + } + void add_rhs_dilation(flatbuffers::Offset> rhs_dilation) { + fbb_.AddOffset(StablehloConvolutionOptions::VT_RHS_DILATION, rhs_dilation); + } + void add_window_reversal(flatbuffers::Offset> window_reversal) { + fbb_.AddOffset(StablehloConvolutionOptions::VT_WINDOW_REVERSAL, window_reversal); + } + void add_input_batch_dimension(int64_t input_batch_dimension) { + fbb_.AddElement(StablehloConvolutionOptions::VT_INPUT_BATCH_DIMENSION, input_batch_dimension, 0); + } + void add_input_feature_dimension(int64_t input_feature_dimension) { + fbb_.AddElement(StablehloConvolutionOptions::VT_INPUT_FEATURE_DIMENSION, input_feature_dimension, 0); + } + void add_input_spatial_dimensions(flatbuffers::Offset> input_spatial_dimensions) { + fbb_.AddOffset(StablehloConvolutionOptions::VT_INPUT_SPATIAL_DIMENSIONS, input_spatial_dimensions); + } + void add_kernel_input_feature_dimension(int64_t kernel_input_feature_dimension) { + fbb_.AddElement(StablehloConvolutionOptions::VT_KERNEL_INPUT_FEATURE_DIMENSION, kernel_input_feature_dimension, 0); + } + void add_kernel_output_feature_dimension(int64_t kernel_output_feature_dimension) { + fbb_.AddElement(StablehloConvolutionOptions::VT_KERNEL_OUTPUT_FEATURE_DIMENSION, kernel_output_feature_dimension, 0); + } + void add_kernel_spatial_dimensions(flatbuffers::Offset> kernel_spatial_dimensions) { + fbb_.AddOffset(StablehloConvolutionOptions::VT_KERNEL_SPATIAL_DIMENSIONS, kernel_spatial_dimensions); + } + void add_output_batch_dimension(int64_t output_batch_dimension) { + fbb_.AddElement(StablehloConvolutionOptions::VT_OUTPUT_BATCH_DIMENSION, output_batch_dimension, 0); + } + void add_output_feature_dimension(int64_t output_feature_dimension) { + fbb_.AddElement(StablehloConvolutionOptions::VT_OUTPUT_FEATURE_DIMENSION, output_feature_dimension, 0); + } + void add_output_spatial_dimensions(flatbuffers::Offset> output_spatial_dimensions) { + fbb_.AddOffset(StablehloConvolutionOptions::VT_OUTPUT_SPATIAL_DIMENSIONS, output_spatial_dimensions); + } + void add_feature_group_count(int64_t feature_group_count) { + fbb_.AddElement(StablehloConvolutionOptions::VT_FEATURE_GROUP_COUNT, feature_group_count, 0); + } + void add_batch_group_count(int64_t batch_group_count) { + fbb_.AddElement(StablehloConvolutionOptions::VT_BATCH_GROUP_COUNT, batch_group_count, 0); + } + void add_precision_config(flatbuffers::Offset> precision_config) { + fbb_.AddOffset(StablehloConvolutionOptions::VT_PRECISION_CONFIG, precision_config); + } + explicit StablehloConvolutionOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateSelectOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - SelectOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloConvolutionOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> window_strides = 0, + flatbuffers::Offset> padding = 0, + flatbuffers::Offset> lhs_dilation = 0, + flatbuffers::Offset> rhs_dilation = 0, + flatbuffers::Offset> window_reversal = 0, + int64_t input_batch_dimension = 0, + int64_t input_feature_dimension = 0, + flatbuffers::Offset> input_spatial_dimensions = 0, + int64_t kernel_input_feature_dimension = 0, + int64_t kernel_output_feature_dimension = 0, + flatbuffers::Offset> kernel_spatial_dimensions = 0, + int64_t output_batch_dimension = 0, + int64_t output_feature_dimension = 0, + flatbuffers::Offset> output_spatial_dimensions = 0, + int64_t feature_group_count = 0, + int64_t batch_group_count = 0, + flatbuffers::Offset> precision_config = 0) { + StablehloConvolutionOptionsBuilder builder_(_fbb); + builder_.add_batch_group_count(batch_group_count); + builder_.add_feature_group_count(feature_group_count); + builder_.add_output_feature_dimension(output_feature_dimension); + builder_.add_output_batch_dimension(output_batch_dimension); + builder_.add_kernel_output_feature_dimension(kernel_output_feature_dimension); + builder_.add_kernel_input_feature_dimension(kernel_input_feature_dimension); + builder_.add_input_feature_dimension(input_feature_dimension); + builder_.add_input_batch_dimension(input_batch_dimension); + builder_.add_precision_config(precision_config); + builder_.add_output_spatial_dimensions(output_spatial_dimensions); + builder_.add_kernel_spatial_dimensions(kernel_spatial_dimensions); + builder_.add_input_spatial_dimensions(input_spatial_dimensions); + builder_.add_window_reversal(window_reversal); + builder_.add_rhs_dilation(rhs_dilation); + builder_.add_lhs_dilation(lhs_dilation); + builder_.add_padding(padding); + builder_.add_window_strides(window_strides); return builder_.Finish(); } -flatbuffers::Offset -CreateSelectOptions(flatbuffers::FlatBufferBuilder &_fbb, const SelectOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateStablehloConvolutionOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *window_strides = nullptr, + const std::vector *padding = nullptr, + const std::vector *lhs_dilation = nullptr, + const std::vector *rhs_dilation = nullptr, + const std::vector *window_reversal = nullptr, + int64_t input_batch_dimension = 0, + int64_t input_feature_dimension = 0, + const std::vector *input_spatial_dimensions = nullptr, + int64_t kernel_input_feature_dimension = 0, + int64_t kernel_output_feature_dimension = 0, + const std::vector *kernel_spatial_dimensions = nullptr, + int64_t output_batch_dimension = 0, + int64_t output_feature_dimension = 0, + const std::vector *output_spatial_dimensions = nullptr, + int64_t feature_group_count = 0, + int64_t batch_group_count = 0, + const std::vector *precision_config = nullptr) { + auto window_strides__ = window_strides ? _fbb.CreateVector(*window_strides) : 0; + auto padding__ = padding ? _fbb.CreateVector(*padding) : 0; + auto lhs_dilation__ = lhs_dilation ? _fbb.CreateVector(*lhs_dilation) : 0; + auto rhs_dilation__ = rhs_dilation ? _fbb.CreateVector(*rhs_dilation) : 0; + auto window_reversal__ = window_reversal ? _fbb.CreateVector(*window_reversal) : 0; + auto input_spatial_dimensions__ = input_spatial_dimensions ? _fbb.CreateVector(*input_spatial_dimensions) : 0; + auto kernel_spatial_dimensions__ = kernel_spatial_dimensions ? _fbb.CreateVector(*kernel_spatial_dimensions) : 0; + auto output_spatial_dimensions__ = output_spatial_dimensions ? _fbb.CreateVector(*output_spatial_dimensions) : 0; + auto precision_config__ = precision_config ? _fbb.CreateVector(*precision_config) : 0; + return circle::CreateStablehloConvolutionOptions( + _fbb, + window_strides__, + padding__, + lhs_dilation__, + rhs_dilation__, + window_reversal__, + input_batch_dimension, + input_feature_dimension, + input_spatial_dimensions__, + kernel_input_feature_dimension, + kernel_output_feature_dimension, + kernel_spatial_dimensions__, + output_batch_dimension, + output_feature_dimension, + output_spatial_dimensions__, + feature_group_count, + batch_group_count, + precision_config__); +} + +flatbuffers::Offset CreateStablehloConvolutionOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloConvolutionOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloScatterOptionsT : public flatbuffers::NativeTable { + typedef StablehloScatterOptions TableType; + bool indices_are_sorted = false; + std::vector update_window_dims{}; + std::vector inserted_window_dims{}; + std::vector scatter_dims_to_operand_dims{}; + int64_t index_vector_dim = 0; + bool unique_indices = false; + int32_t update_computation_subgraph_index = 0; +}; + +struct StablehloScatterOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloScatterOptionsT NativeTableType; + typedef StablehloScatterOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INDICES_ARE_SORTED = 4, + VT_UPDATE_WINDOW_DIMS = 6, + VT_INSERTED_WINDOW_DIMS = 8, + VT_SCATTER_DIMS_TO_OPERAND_DIMS = 10, + VT_INDEX_VECTOR_DIM = 12, + VT_UNIQUE_INDICES = 14, + VT_UPDATE_COMPUTATION_SUBGRAPH_INDEX = 16 + }; + bool indices_are_sorted() const { + return GetField(VT_INDICES_ARE_SORTED, 0) != 0; + } + const flatbuffers::Vector *update_window_dims() const { + return GetPointer *>(VT_UPDATE_WINDOW_DIMS); + } + const flatbuffers::Vector *inserted_window_dims() const { + return GetPointer *>(VT_INSERTED_WINDOW_DIMS); + } + const flatbuffers::Vector *scatter_dims_to_operand_dims() const { + return GetPointer *>(VT_SCATTER_DIMS_TO_OPERAND_DIMS); + } + int64_t index_vector_dim() const { + return GetField(VT_INDEX_VECTOR_DIM, 0); + } + bool unique_indices() const { + return GetField(VT_UNIQUE_INDICES, 0) != 0; + } + int32_t update_computation_subgraph_index() const { + return GetField(VT_UPDATE_COMPUTATION_SUBGRAPH_INDEX, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_INDICES_ARE_SORTED) && + VerifyOffset(verifier, VT_UPDATE_WINDOW_DIMS) && + verifier.VerifyVector(update_window_dims()) && + VerifyOffset(verifier, VT_INSERTED_WINDOW_DIMS) && + verifier.VerifyVector(inserted_window_dims()) && + VerifyOffset(verifier, VT_SCATTER_DIMS_TO_OPERAND_DIMS) && + verifier.VerifyVector(scatter_dims_to_operand_dims()) && + VerifyField(verifier, VT_INDEX_VECTOR_DIM) && + VerifyField(verifier, VT_UNIQUE_INDICES) && + VerifyField(verifier, VT_UPDATE_COMPUTATION_SUBGRAPH_INDEX) && + verifier.EndTable(); + } + StablehloScatterOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloScatterOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloScatterOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -struct SliceOptionsT : public flatbuffers::NativeTable -{ - typedef SliceOptions TableType; +struct StablehloScatterOptionsBuilder { + typedef StablehloScatterOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_indices_are_sorted(bool indices_are_sorted) { + fbb_.AddElement(StablehloScatterOptions::VT_INDICES_ARE_SORTED, static_cast(indices_are_sorted), 0); + } + void add_update_window_dims(flatbuffers::Offset> update_window_dims) { + fbb_.AddOffset(StablehloScatterOptions::VT_UPDATE_WINDOW_DIMS, update_window_dims); + } + void add_inserted_window_dims(flatbuffers::Offset> inserted_window_dims) { + fbb_.AddOffset(StablehloScatterOptions::VT_INSERTED_WINDOW_DIMS, inserted_window_dims); + } + void add_scatter_dims_to_operand_dims(flatbuffers::Offset> scatter_dims_to_operand_dims) { + fbb_.AddOffset(StablehloScatterOptions::VT_SCATTER_DIMS_TO_OPERAND_DIMS, scatter_dims_to_operand_dims); + } + void add_index_vector_dim(int64_t index_vector_dim) { + fbb_.AddElement(StablehloScatterOptions::VT_INDEX_VECTOR_DIM, index_vector_dim, 0); + } + void add_unique_indices(bool unique_indices) { + fbb_.AddElement(StablehloScatterOptions::VT_UNIQUE_INDICES, static_cast(unique_indices), 0); + } + void add_update_computation_subgraph_index(int32_t update_computation_subgraph_index) { + fbb_.AddElement(StablehloScatterOptions::VT_UPDATE_COMPUTATION_SUBGRAPH_INDEX, update_computation_subgraph_index, 0); + } + explicit StablehloScatterOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } }; -struct SliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SliceOptionsT NativeTableType; - typedef SliceOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +inline flatbuffers::Offset CreateStablehloScatterOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool indices_are_sorted = false, + flatbuffers::Offset> update_window_dims = 0, + flatbuffers::Offset> inserted_window_dims = 0, + flatbuffers::Offset> scatter_dims_to_operand_dims = 0, + int64_t index_vector_dim = 0, + bool unique_indices = false, + int32_t update_computation_subgraph_index = 0) { + StablehloScatterOptionsBuilder builder_(_fbb); + builder_.add_index_vector_dim(index_vector_dim); + builder_.add_update_computation_subgraph_index(update_computation_subgraph_index); + builder_.add_scatter_dims_to_operand_dims(scatter_dims_to_operand_dims); + builder_.add_inserted_window_dims(inserted_window_dims); + builder_.add_update_window_dims(update_window_dims); + builder_.add_unique_indices(unique_indices); + builder_.add_indices_are_sorted(indices_are_sorted); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateStablehloScatterOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + bool indices_are_sorted = false, + const std::vector *update_window_dims = nullptr, + const std::vector *inserted_window_dims = nullptr, + const std::vector *scatter_dims_to_operand_dims = nullptr, + int64_t index_vector_dim = 0, + bool unique_indices = false, + int32_t update_computation_subgraph_index = 0) { + auto update_window_dims__ = update_window_dims ? _fbb.CreateVector(*update_window_dims) : 0; + auto inserted_window_dims__ = inserted_window_dims ? _fbb.CreateVector(*inserted_window_dims) : 0; + auto scatter_dims_to_operand_dims__ = scatter_dims_to_operand_dims ? _fbb.CreateVector(*scatter_dims_to_operand_dims) : 0; + return circle::CreateStablehloScatterOptions( + _fbb, + indices_are_sorted, + update_window_dims__, + inserted_window_dims__, + scatter_dims_to_operand_dims__, + index_vector_dim, + unique_indices, + update_computation_subgraph_index); +} + +flatbuffers::Offset CreateStablehloScatterOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloScatterOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct StablehloRngBitGeneratorOptionsT : public flatbuffers::NativeTable { + typedef StablehloRngBitGeneratorOptions TableType; + circle::RngAlgorithm algorithm = circle::RngAlgorithm_DEFAULT; +}; + +struct StablehloRngBitGeneratorOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StablehloRngBitGeneratorOptionsT NativeTableType; + typedef StablehloRngBitGeneratorOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ALGORITHM = 4 + }; + circle::RngAlgorithm algorithm() const { + return static_cast(GetField(VT_ALGORITHM, 0)); } - SliceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SliceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ALGORITHM) && + verifier.EndTable(); + } + StablehloRngBitGeneratorOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StablehloRngBitGeneratorOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloRngBitGeneratorOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SliceOptionsBuilder -{ - typedef SliceOptions Table; +struct StablehloRngBitGeneratorOptionsBuilder { + typedef StablehloRngBitGeneratorOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit SliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_algorithm(circle::RngAlgorithm algorithm) { + fbb_.AddElement(StablehloRngBitGeneratorOptions::VT_ALGORITHM, static_cast(algorithm), 0); + } + explicit StablehloRngBitGeneratorOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - SliceOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateStablehloRngBitGeneratorOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::RngAlgorithm algorithm = circle::RngAlgorithm_DEFAULT) { + StablehloRngBitGeneratorOptionsBuilder builder_(_fbb); + builder_.add_algorithm(algorithm); return builder_.Finish(); } -flatbuffers::Offset -CreateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const SliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateStablehloRngBitGeneratorOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloRngBitGeneratorOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct TransposeConvOptionsT : public flatbuffers::NativeTable -{ - typedef TransposeConvOptions TableType; +struct Conv2DOptionsT : public flatbuffers::NativeTable { + typedef Conv2DOptions TableType; circle::Padding padding = circle::Padding_SAME; int32_t stride_w = 0; int32_t stride_h = 0; circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + int32_t dilation_w_factor = 1; + int32_t dilation_h_factor = 1; + circle::TensorType quantized_bias_type = circle::TensorType_FLOAT32; }; -struct TransposeConvOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef TransposeConvOptionsT NativeTableType; - typedef TransposeConvOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { +struct Conv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Conv2DOptionsT NativeTableType; + typedef Conv2DOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_PADDING = 4, VT_STRIDE_W = 6, VT_STRIDE_H = 8, - VT_FUSED_ACTIVATION_FUNCTION = 10 + VT_FUSED_ACTIVATION_FUNCTION = 10, + VT_DILATION_W_FACTOR = 12, + VT_DILATION_H_FACTOR = 14, + VT_QUANTIZED_BIAS_TYPE = 16 }; - circle::Padding padding() const - { + circle::Padding padding() const { return static_cast(GetField(VT_PADDING, 0)); } - int32_t stride_w() const { return GetField(VT_STRIDE_W, 0); } - int32_t stride_h() const { return GetField(VT_STRIDE_H, 0); } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + int32_t stride_w() const { + return GetField(VT_STRIDE_W, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_PADDING) && + int32_t stride_h() const { + return GetField(VT_STRIDE_H, 0); + } + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + int32_t dilation_w_factor() const { + return GetField(VT_DILATION_W_FACTOR, 1); + } + int32_t dilation_h_factor() const { + return GetField(VT_DILATION_H_FACTOR, 1); + } + circle::TensorType quantized_bias_type() const { + return static_cast(GetField(VT_QUANTIZED_BIAS_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PADDING) && VerifyField(verifier, VT_STRIDE_W) && VerifyField(verifier, VT_STRIDE_H) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && verifier.EndTable(); + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_DILATION_W_FACTOR) && + VerifyField(verifier, VT_DILATION_H_FACTOR) && + VerifyField(verifier, VT_QUANTIZED_BIAS_TYPE) && + verifier.EndTable(); } - TransposeConvOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(TransposeConvOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeConvOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + Conv2DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(Conv2DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const Conv2DOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct TransposeConvOptionsBuilder -{ - typedef TransposeConvOptions Table; +struct Conv2DOptionsBuilder { + typedef Conv2DOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_padding(circle::Padding padding) - { - fbb_.AddElement(TransposeConvOptions::VT_PADDING, static_cast(padding), 0); + void add_padding(circle::Padding padding) { + fbb_.AddElement(Conv2DOptions::VT_PADDING, static_cast(padding), 0); } - void add_stride_w(int32_t stride_w) - { - fbb_.AddElement(TransposeConvOptions::VT_STRIDE_W, stride_w, 0); + void add_stride_w(int32_t stride_w) { + fbb_.AddElement(Conv2DOptions::VT_STRIDE_W, stride_w, 0); } - void add_stride_h(int32_t stride_h) - { - fbb_.AddElement(TransposeConvOptions::VT_STRIDE_H, stride_h, 0); + void add_stride_h(int32_t stride_h) { + fbb_.AddElement(Conv2DOptions::VT_STRIDE_H, stride_h, 0); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(Conv2DOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_dilation_w_factor(int32_t dilation_w_factor) { + fbb_.AddElement(Conv2DOptions::VT_DILATION_W_FACTOR, dilation_w_factor, 1); + } + void add_dilation_h_factor(int32_t dilation_h_factor) { + fbb_.AddElement(Conv2DOptions::VT_DILATION_H_FACTOR, dilation_h_factor, 1); } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(TransposeConvOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + void add_quantized_bias_type(circle::TensorType quantized_bias_type) { + fbb_.AddElement(Conv2DOptions::VT_QUANTIZED_BIAS_TYPE, static_cast(quantized_bias_type), 0); } - explicit TransposeConvOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit Conv2DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateTransposeConvOptions( - flatbuffers::FlatBufferBuilder &_fbb, circle::Padding padding = circle::Padding_SAME, - int32_t stride_w = 0, int32_t stride_h = 0, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) -{ - TransposeConvOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateConv2DOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::Padding padding = circle::Padding_SAME, + int32_t stride_w = 0, + int32_t stride_h = 0, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + int32_t dilation_w_factor = 1, + int32_t dilation_h_factor = 1, + circle::TensorType quantized_bias_type = circle::TensorType_FLOAT32) { + Conv2DOptionsBuilder builder_(_fbb); + builder_.add_dilation_h_factor(dilation_h_factor); + builder_.add_dilation_w_factor(dilation_w_factor); builder_.add_stride_h(stride_h); builder_.add_stride_w(stride_w); + builder_.add_quantized_bias_type(quantized_bias_type); builder_.add_fused_activation_function(fused_activation_function); builder_.add_padding(padding); return builder_.Finish(); } -flatbuffers::Offset -CreateTransposeConvOptions(flatbuffers::FlatBufferBuilder &_fbb, const TransposeConvOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateConv2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Conv2DOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct ExpandDimsOptionsT : public flatbuffers::NativeTable -{ - typedef ExpandDimsOptions TableType; +struct Conv3DOptionsT : public flatbuffers::NativeTable { + typedef Conv3DOptions TableType; + circle::Padding padding = circle::Padding_SAME; + int32_t stride_d = 0; + int32_t stride_w = 0; + int32_t stride_h = 0; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + int32_t dilation_d_factor = 1; + int32_t dilation_w_factor = 1; + int32_t dilation_h_factor = 1; }; -struct ExpandDimsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ExpandDimsOptionsT NativeTableType; - typedef ExpandDimsOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct Conv3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Conv3DOptionsT NativeTableType; + typedef Conv3DOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PADDING = 4, + VT_STRIDE_D = 6, + VT_STRIDE_W = 8, + VT_STRIDE_H = 10, + VT_FUSED_ACTIVATION_FUNCTION = 12, + VT_DILATION_D_FACTOR = 14, + VT_DILATION_W_FACTOR = 16, + VT_DILATION_H_FACTOR = 18 + }; + circle::Padding padding() const { + return static_cast(GetField(VT_PADDING, 0)); } - ExpandDimsOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ExpandDimsOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + int32_t stride_d() const { + return GetField(VT_STRIDE_D, 0); + } + int32_t stride_w() const { + return GetField(VT_STRIDE_W, 0); + } + int32_t stride_h() const { + return GetField(VT_STRIDE_H, 0); + } + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + int32_t dilation_d_factor() const { + return GetField(VT_DILATION_D_FACTOR, 1); + } + int32_t dilation_w_factor() const { + return GetField(VT_DILATION_W_FACTOR, 1); + } + int32_t dilation_h_factor() const { + return GetField(VT_DILATION_H_FACTOR, 1); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PADDING) && + VerifyField(verifier, VT_STRIDE_D) && + VerifyField(verifier, VT_STRIDE_W) && + VerifyField(verifier, VT_STRIDE_H) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_DILATION_D_FACTOR) && + VerifyField(verifier, VT_DILATION_W_FACTOR) && + VerifyField(verifier, VT_DILATION_H_FACTOR) && + verifier.EndTable(); + } + Conv3DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(Conv3DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const Conv3DOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct ExpandDimsOptionsBuilder -{ - typedef ExpandDimsOptions Table; +struct Conv3DOptionsBuilder { + typedef Conv3DOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit ExpandDimsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_padding(circle::Padding padding) { + fbb_.AddElement(Conv3DOptions::VT_PADDING, static_cast(padding), 0); + } + void add_stride_d(int32_t stride_d) { + fbb_.AddElement(Conv3DOptions::VT_STRIDE_D, stride_d, 0); + } + void add_stride_w(int32_t stride_w) { + fbb_.AddElement(Conv3DOptions::VT_STRIDE_W, stride_w, 0); + } + void add_stride_h(int32_t stride_h) { + fbb_.AddElement(Conv3DOptions::VT_STRIDE_H, stride_h, 0); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(Conv3DOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_dilation_d_factor(int32_t dilation_d_factor) { + fbb_.AddElement(Conv3DOptions::VT_DILATION_D_FACTOR, dilation_d_factor, 1); + } + void add_dilation_w_factor(int32_t dilation_w_factor) { + fbb_.AddElement(Conv3DOptions::VT_DILATION_W_FACTOR, dilation_w_factor, 1); + } + void add_dilation_h_factor(int32_t dilation_h_factor) { + fbb_.AddElement(Conv3DOptions::VT_DILATION_H_FACTOR, dilation_h_factor, 1); + } + explicit Conv3DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateExpandDimsOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - ExpandDimsOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateConv3DOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::Padding padding = circle::Padding_SAME, + int32_t stride_d = 0, + int32_t stride_w = 0, + int32_t stride_h = 0, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + int32_t dilation_d_factor = 1, + int32_t dilation_w_factor = 1, + int32_t dilation_h_factor = 1) { + Conv3DOptionsBuilder builder_(_fbb); + builder_.add_dilation_h_factor(dilation_h_factor); + builder_.add_dilation_w_factor(dilation_w_factor); + builder_.add_dilation_d_factor(dilation_d_factor); + builder_.add_stride_h(stride_h); + builder_.add_stride_w(stride_w); + builder_.add_stride_d(stride_d); + builder_.add_fused_activation_function(fused_activation_function); + builder_.add_padding(padding); return builder_.Finish(); } -flatbuffers::Offset -CreateExpandDimsOptions(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateConv3DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Conv3DOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct SparseToDenseOptionsT : public flatbuffers::NativeTable -{ - typedef SparseToDenseOptions TableType; - bool validate_indices = false; +struct Pool2DOptionsT : public flatbuffers::NativeTable { + typedef Pool2DOptions TableType; + circle::Padding padding = circle::Padding_SAME; + int32_t stride_w = 0; + int32_t stride_h = 0; + int32_t filter_width = 0; + int32_t filter_height = 0; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; }; -struct SparseToDenseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SparseToDenseOptionsT NativeTableType; - typedef SparseToDenseOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_VALIDATE_INDICES = 4 +struct Pool2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Pool2DOptionsT NativeTableType; + typedef Pool2DOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PADDING = 4, + VT_STRIDE_W = 6, + VT_STRIDE_H = 8, + VT_FILTER_WIDTH = 10, + VT_FILTER_HEIGHT = 12, + VT_FUSED_ACTIVATION_FUNCTION = 14 }; - bool validate_indices() const { return GetField(VT_VALIDATE_INDICES, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_VALIDATE_INDICES) && + circle::Padding padding() const { + return static_cast(GetField(VT_PADDING, 0)); + } + int32_t stride_w() const { + return GetField(VT_STRIDE_W, 0); + } + int32_t stride_h() const { + return GetField(VT_STRIDE_H, 0); + } + int32_t filter_width() const { + return GetField(VT_FILTER_WIDTH, 0); + } + int32_t filter_height() const { + return GetField(VT_FILTER_HEIGHT, 0); + } + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PADDING) && + VerifyField(verifier, VT_STRIDE_W) && + VerifyField(verifier, VT_STRIDE_H) && + VerifyField(verifier, VT_FILTER_WIDTH) && + VerifyField(verifier, VT_FILTER_HEIGHT) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && verifier.EndTable(); } - SparseToDenseOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SparseToDenseOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparseToDenseOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + Pool2DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(Pool2DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const Pool2DOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SparseToDenseOptionsBuilder -{ - typedef SparseToDenseOptions Table; +struct Pool2DOptionsBuilder { + typedef Pool2DOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_validate_indices(bool validate_indices) - { - fbb_.AddElement(SparseToDenseOptions::VT_VALIDATE_INDICES, - static_cast(validate_indices), 0); + void add_padding(circle::Padding padding) { + fbb_.AddElement(Pool2DOptions::VT_PADDING, static_cast(padding), 0); + } + void add_stride_w(int32_t stride_w) { + fbb_.AddElement(Pool2DOptions::VT_STRIDE_W, stride_w, 0); } - explicit SparseToDenseOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_stride_h(int32_t stride_h) { + fbb_.AddElement(Pool2DOptions::VT_STRIDE_H, stride_h, 0); + } + void add_filter_width(int32_t filter_width) { + fbb_.AddElement(Pool2DOptions::VT_FILTER_WIDTH, filter_width, 0); + } + void add_filter_height(int32_t filter_height) { + fbb_.AddElement(Pool2DOptions::VT_FILTER_HEIGHT, filter_height, 0); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(Pool2DOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + explicit Pool2DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateSparseToDenseOptions(flatbuffers::FlatBufferBuilder &_fbb, bool validate_indices = false) -{ - SparseToDenseOptionsBuilder builder_(_fbb); - builder_.add_validate_indices(validate_indices); +inline flatbuffers::Offset CreatePool2DOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::Padding padding = circle::Padding_SAME, + int32_t stride_w = 0, + int32_t stride_h = 0, + int32_t filter_width = 0, + int32_t filter_height = 0, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) { + Pool2DOptionsBuilder builder_(_fbb); + builder_.add_filter_height(filter_height); + builder_.add_filter_width(filter_width); + builder_.add_stride_h(stride_h); + builder_.add_stride_w(stride_w); + builder_.add_fused_activation_function(fused_activation_function); + builder_.add_padding(padding); return builder_.Finish(); } -flatbuffers::Offset -CreateSparseToDenseOptions(flatbuffers::FlatBufferBuilder &_fbb, const SparseToDenseOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreatePool2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Pool2DOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct EqualOptionsT : public flatbuffers::NativeTable -{ - typedef EqualOptions TableType; +struct DepthwiseConv2DOptionsT : public flatbuffers::NativeTable { + typedef DepthwiseConv2DOptions TableType; + circle::Padding padding = circle::Padding_SAME; + int32_t stride_w = 0; + int32_t stride_h = 0; + int32_t depth_multiplier = 0; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + int32_t dilation_w_factor = 1; + int32_t dilation_h_factor = 1; }; -struct EqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef EqualOptionsT NativeTableType; - typedef EqualOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct DepthwiseConv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DepthwiseConv2DOptionsT NativeTableType; + typedef DepthwiseConv2DOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PADDING = 4, + VT_STRIDE_W = 6, + VT_STRIDE_H = 8, + VT_DEPTH_MULTIPLIER = 10, + VT_FUSED_ACTIVATION_FUNCTION = 12, + VT_DILATION_W_FACTOR = 14, + VT_DILATION_H_FACTOR = 16 + }; + circle::Padding padding() const { + return static_cast(GetField(VT_PADDING, 0)); } - EqualOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(EqualOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const EqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + int32_t stride_w() const { + return GetField(VT_STRIDE_W, 0); + } + int32_t stride_h() const { + return GetField(VT_STRIDE_H, 0); + } + int32_t depth_multiplier() const { + return GetField(VT_DEPTH_MULTIPLIER, 0); + } + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + int32_t dilation_w_factor() const { + return GetField(VT_DILATION_W_FACTOR, 1); + } + int32_t dilation_h_factor() const { + return GetField(VT_DILATION_H_FACTOR, 1); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PADDING) && + VerifyField(verifier, VT_STRIDE_W) && + VerifyField(verifier, VT_STRIDE_H) && + VerifyField(verifier, VT_DEPTH_MULTIPLIER) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_DILATION_W_FACTOR) && + VerifyField(verifier, VT_DILATION_H_FACTOR) && + verifier.EndTable(); + } + DepthwiseConv2DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(DepthwiseConv2DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const DepthwiseConv2DOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct EqualOptionsBuilder -{ - typedef EqualOptions Table; +struct DepthwiseConv2DOptionsBuilder { + typedef DepthwiseConv2DOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit EqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_padding(circle::Padding padding) { + fbb_.AddElement(DepthwiseConv2DOptions::VT_PADDING, static_cast(padding), 0); + } + void add_stride_w(int32_t stride_w) { + fbb_.AddElement(DepthwiseConv2DOptions::VT_STRIDE_W, stride_w, 0); + } + void add_stride_h(int32_t stride_h) { + fbb_.AddElement(DepthwiseConv2DOptions::VT_STRIDE_H, stride_h, 0); + } + void add_depth_multiplier(int32_t depth_multiplier) { + fbb_.AddElement(DepthwiseConv2DOptions::VT_DEPTH_MULTIPLIER, depth_multiplier, 0); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(DepthwiseConv2DOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_dilation_w_factor(int32_t dilation_w_factor) { + fbb_.AddElement(DepthwiseConv2DOptions::VT_DILATION_W_FACTOR, dilation_w_factor, 1); + } + void add_dilation_h_factor(int32_t dilation_h_factor) { + fbb_.AddElement(DepthwiseConv2DOptions::VT_DILATION_H_FACTOR, dilation_h_factor, 1); + } + explicit DepthwiseConv2DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateEqualOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - EqualOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateDepthwiseConv2DOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::Padding padding = circle::Padding_SAME, + int32_t stride_w = 0, + int32_t stride_h = 0, + int32_t depth_multiplier = 0, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + int32_t dilation_w_factor = 1, + int32_t dilation_h_factor = 1) { + DepthwiseConv2DOptionsBuilder builder_(_fbb); + builder_.add_dilation_h_factor(dilation_h_factor); + builder_.add_dilation_w_factor(dilation_w_factor); + builder_.add_depth_multiplier(depth_multiplier); + builder_.add_stride_h(stride_h); + builder_.add_stride_w(stride_w); + builder_.add_fused_activation_function(fused_activation_function); + builder_.add_padding(padding); return builder_.Finish(); } -flatbuffers::Offset -CreateEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const EqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateDepthwiseConv2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const DepthwiseConv2DOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct NotEqualOptionsT : public flatbuffers::NativeTable -{ - typedef NotEqualOptions TableType; +struct ConcatEmbeddingsOptionsT : public flatbuffers::NativeTable { + typedef ConcatEmbeddingsOptions TableType; + int32_t num_channels = 0; + std::vector num_columns_per_channel{}; + std::vector embedding_dim_per_channel{}; }; -struct NotEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef NotEqualOptionsT NativeTableType; - typedef NotEqualOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ConcatEmbeddingsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ConcatEmbeddingsOptionsT NativeTableType; + typedef ConcatEmbeddingsOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM_CHANNELS = 4, + VT_NUM_COLUMNS_PER_CHANNEL = 6, + VT_EMBEDDING_DIM_PER_CHANNEL = 8 + }; + int32_t num_channels() const { + return GetField(VT_NUM_CHANNELS, 0); } - NotEqualOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(NotEqualOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const NotEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + const flatbuffers::Vector *num_columns_per_channel() const { + return GetPointer *>(VT_NUM_COLUMNS_PER_CHANNEL); + } + const flatbuffers::Vector *embedding_dim_per_channel() const { + return GetPointer *>(VT_EMBEDDING_DIM_PER_CHANNEL); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_NUM_CHANNELS) && + VerifyOffset(verifier, VT_NUM_COLUMNS_PER_CHANNEL) && + verifier.VerifyVector(num_columns_per_channel()) && + VerifyOffset(verifier, VT_EMBEDDING_DIM_PER_CHANNEL) && + verifier.VerifyVector(embedding_dim_per_channel()) && + verifier.EndTable(); + } + ConcatEmbeddingsOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ConcatEmbeddingsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ConcatEmbeddingsOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct NotEqualOptionsBuilder -{ - typedef NotEqualOptions Table; +struct ConcatEmbeddingsOptionsBuilder { + typedef ConcatEmbeddingsOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit NotEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_num_channels(int32_t num_channels) { + fbb_.AddElement(ConcatEmbeddingsOptions::VT_NUM_CHANNELS, num_channels, 0); + } + void add_num_columns_per_channel(flatbuffers::Offset> num_columns_per_channel) { + fbb_.AddOffset(ConcatEmbeddingsOptions::VT_NUM_COLUMNS_PER_CHANNEL, num_columns_per_channel); + } + void add_embedding_dim_per_channel(flatbuffers::Offset> embedding_dim_per_channel) { + fbb_.AddOffset(ConcatEmbeddingsOptions::VT_EMBEDDING_DIM_PER_CHANNEL, embedding_dim_per_channel); + } + explicit ConcatEmbeddingsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateNotEqualOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - NotEqualOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateConcatEmbeddingsOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t num_channels = 0, + flatbuffers::Offset> num_columns_per_channel = 0, + flatbuffers::Offset> embedding_dim_per_channel = 0) { + ConcatEmbeddingsOptionsBuilder builder_(_fbb); + builder_.add_embedding_dim_per_channel(embedding_dim_per_channel); + builder_.add_num_columns_per_channel(num_columns_per_channel); + builder_.add_num_channels(num_channels); return builder_.Finish(); } -flatbuffers::Offset -CreateNotEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const NotEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateConcatEmbeddingsOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t num_channels = 0, + const std::vector *num_columns_per_channel = nullptr, + const std::vector *embedding_dim_per_channel = nullptr) { + auto num_columns_per_channel__ = num_columns_per_channel ? _fbb.CreateVector(*num_columns_per_channel) : 0; + auto embedding_dim_per_channel__ = embedding_dim_per_channel ? _fbb.CreateVector(*embedding_dim_per_channel) : 0; + return circle::CreateConcatEmbeddingsOptions( + _fbb, + num_channels, + num_columns_per_channel__, + embedding_dim_per_channel__); +} -struct ShapeOptionsT : public flatbuffers::NativeTable -{ - typedef ShapeOptions TableType; - circle::TensorType out_type = circle::TensorType_FLOAT32; +flatbuffers::Offset CreateConcatEmbeddingsOptions(flatbuffers::FlatBufferBuilder &_fbb, const ConcatEmbeddingsOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct LSHProjectionOptionsT : public flatbuffers::NativeTable { + typedef LSHProjectionOptions TableType; + circle::LSHProjectionType type = circle::LSHProjectionType_UNKNOWN; }; -struct ShapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ShapeOptionsT NativeTableType; - typedef ShapeOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_OUT_TYPE = 4 +struct LSHProjectionOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LSHProjectionOptionsT NativeTableType; + typedef LSHProjectionOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TYPE = 4 }; - circle::TensorType out_type() const - { - return static_cast(GetField(VT_OUT_TYPE, 0)); + circle::LSHProjectionType type() const { + return static_cast(GetField(VT_TYPE, 0)); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_OUT_TYPE) && + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TYPE) && verifier.EndTable(); } - ShapeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ShapeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ShapeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + LSHProjectionOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LSHProjectionOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSHProjectionOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct ShapeOptionsBuilder -{ - typedef ShapeOptions Table; +struct LSHProjectionOptionsBuilder { + typedef LSHProjectionOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_out_type(circle::TensorType out_type) - { - fbb_.AddElement(ShapeOptions::VT_OUT_TYPE, static_cast(out_type), 0); + void add_type(circle::LSHProjectionType type) { + fbb_.AddElement(LSHProjectionOptions::VT_TYPE, static_cast(type), 0); } - explicit ShapeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit LSHProjectionOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateShapeOptions(flatbuffers::FlatBufferBuilder &_fbb, - circle::TensorType out_type = circle::TensorType_FLOAT32) -{ - ShapeOptionsBuilder builder_(_fbb); - builder_.add_out_type(out_type); +inline flatbuffers::Offset CreateLSHProjectionOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::LSHProjectionType type = circle::LSHProjectionType_UNKNOWN) { + LSHProjectionOptionsBuilder builder_(_fbb); + builder_.add_type(type); return builder_.Finish(); } -flatbuffers::Offset -CreateShapeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ShapeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateLSHProjectionOptions(flatbuffers::FlatBufferBuilder &_fbb, const LSHProjectionOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct RankOptionsT : public flatbuffers::NativeTable -{ - typedef RankOptions TableType; +struct SVDFOptionsT : public flatbuffers::NativeTable { + typedef SVDFOptions TableType; + int32_t rank = 0; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + bool asymmetric_quantize_inputs = false; }; -struct RankOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef RankOptionsT NativeTableType; - typedef RankOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SVDFOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SVDFOptionsT NativeTableType; + typedef SVDFOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_RANK = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 8 + }; + int32_t rank() const { + return GetField(VT_RANK, 0); } - RankOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(RankOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const RankOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + bool asymmetric_quantize_inputs() const { + return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_RANK) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && + verifier.EndTable(); + } + SVDFOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SVDFOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SVDFOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct RankOptionsBuilder -{ - typedef RankOptions Table; +struct SVDFOptionsBuilder { + typedef SVDFOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit RankOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_rank(int32_t rank) { + fbb_.AddElement(SVDFOptions::VT_RANK, rank, 0); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(SVDFOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { + fbb_.AddElement(SVDFOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast(asymmetric_quantize_inputs), 0); + } + explicit SVDFOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateRankOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - RankOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSVDFOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t rank = 0, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + bool asymmetric_quantize_inputs = false) { + SVDFOptionsBuilder builder_(_fbb); + builder_.add_rank(rank); + builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateRankOptions(flatbuffers::FlatBufferBuilder &_fbb, const RankOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSVDFOptions(flatbuffers::FlatBufferBuilder &_fbb, const SVDFOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct PowOptionsT : public flatbuffers::NativeTable -{ - typedef PowOptions TableType; +struct RNNOptionsT : public flatbuffers::NativeTable { + typedef RNNOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + bool asymmetric_quantize_inputs = false; }; -struct PowOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef PowOptionsT NativeTableType; - typedef PowOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct RNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RNNOptionsT NativeTableType; + typedef RNNOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 6 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - PowOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(PowOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const PowOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool asymmetric_quantize_inputs() const { + return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && + verifier.EndTable(); + } + RNNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(RNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const RNNOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct PowOptionsBuilder -{ - typedef PowOptions Table; +struct RNNOptionsBuilder { + typedef RNNOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit PowOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(RNNOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { + fbb_.AddElement(RNNOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast(asymmetric_quantize_inputs), 0); + } + explicit RNNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreatePowOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - PowOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateRNNOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + bool asymmetric_quantize_inputs = false) { + RNNOptionsBuilder builder_(_fbb); + builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreatePowOptions(flatbuffers::FlatBufferBuilder &_fbb, const PowOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const RNNOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct FakeQuantOptionsT : public flatbuffers::NativeTable -{ - typedef FakeQuantOptions TableType; - float min = 0.0f; - float max = 0.0f; - int32_t num_bits = 0; - bool narrow_range = false; +struct SequenceRNNOptionsT : public flatbuffers::NativeTable { + typedef SequenceRNNOptions TableType; + bool time_major = false; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + bool asymmetric_quantize_inputs = false; }; -struct FakeQuantOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef FakeQuantOptionsT NativeTableType; - typedef FakeQuantOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_MIN = 4, - VT_MAX = 6, - VT_NUM_BITS = 8, - VT_NARROW_RANGE = 10 +struct SequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SequenceRNNOptionsT NativeTableType; + typedef SequenceRNNOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TIME_MAJOR = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 8 }; - float min() const { return GetField(VT_MIN, 0.0f); } - float max() const { return GetField(VT_MAX, 0.0f); } - int32_t num_bits() const { return GetField(VT_NUM_BITS, 0); } - bool narrow_range() const { return GetField(VT_NARROW_RANGE, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_MIN) && - VerifyField(verifier, VT_MAX) && VerifyField(verifier, VT_NUM_BITS) && - VerifyField(verifier, VT_NARROW_RANGE) && verifier.EndTable(); + bool time_major() const { + return GetField(VT_TIME_MAJOR, 0) != 0; } - FakeQuantOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(FakeQuantOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const FakeQuantOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + bool asymmetric_quantize_inputs() const { + return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TIME_MAJOR) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && + verifier.EndTable(); + } + SequenceRNNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SequenceRNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SequenceRNNOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct FakeQuantOptionsBuilder -{ - typedef FakeQuantOptions Table; +struct SequenceRNNOptionsBuilder { + typedef SequenceRNNOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_min(float min) { fbb_.AddElement(FakeQuantOptions::VT_MIN, min, 0.0f); } - void add_max(float max) { fbb_.AddElement(FakeQuantOptions::VT_MAX, max, 0.0f); } - void add_num_bits(int32_t num_bits) - { - fbb_.AddElement(FakeQuantOptions::VT_NUM_BITS, num_bits, 0); + void add_time_major(bool time_major) { + fbb_.AddElement(SequenceRNNOptions::VT_TIME_MAJOR, static_cast(time_major), 0); } - void add_narrow_range(bool narrow_range) - { - fbb_.AddElement(FakeQuantOptions::VT_NARROW_RANGE, static_cast(narrow_range), - 0); + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(SequenceRNNOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); } - explicit FakeQuantOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { + fbb_.AddElement(SequenceRNNOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast(asymmetric_quantize_inputs), 0); + } + explicit SequenceRNNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateFakeQuantOptions(flatbuffers::FlatBufferBuilder &_fbb, float min = 0.0f, float max = 0.0f, - int32_t num_bits = 0, bool narrow_range = false) -{ - FakeQuantOptionsBuilder builder_(_fbb); - builder_.add_num_bits(num_bits); - builder_.add_max(max); - builder_.add_min(min); - builder_.add_narrow_range(narrow_range); +inline flatbuffers::Offset CreateSequenceRNNOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool time_major = false, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + bool asymmetric_quantize_inputs = false) { + SequenceRNNOptionsBuilder builder_(_fbb); + builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); + builder_.add_fused_activation_function(fused_activation_function); + builder_.add_time_major(time_major); return builder_.Finish(); } -flatbuffers::Offset -CreateFakeQuantOptions(flatbuffers::FlatBufferBuilder &_fbb, const FakeQuantOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSequenceRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const SequenceRNNOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct PackOptionsT : public flatbuffers::NativeTable -{ - typedef PackOptions TableType; - int32_t values_count = 0; - int32_t axis = 0; +struct BidirectionalSequenceRNNOptionsT : public flatbuffers::NativeTable { + typedef BidirectionalSequenceRNNOptions TableType; + bool time_major = false; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + bool merge_outputs = false; + bool asymmetric_quantize_inputs = false; }; -struct PackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef PackOptionsT NativeTableType; - typedef PackOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_VALUES_COUNT = 4, - VT_AXIS = 6 +struct BidirectionalSequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BidirectionalSequenceRNNOptionsT NativeTableType; + typedef BidirectionalSequenceRNNOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TIME_MAJOR = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6, + VT_MERGE_OUTPUTS = 8, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 10 }; - int32_t values_count() const { return GetField(VT_VALUES_COUNT, 0); } - int32_t axis() const { return GetField(VT_AXIS, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_VALUES_COUNT) && - VerifyField(verifier, VT_AXIS) && verifier.EndTable(); + bool time_major() const { + return GetField(VT_TIME_MAJOR, 0) != 0; } - PackOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(PackOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const PackOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + bool merge_outputs() const { + return GetField(VT_MERGE_OUTPUTS, 0) != 0; + } + bool asymmetric_quantize_inputs() const { + return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TIME_MAJOR) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_MERGE_OUTPUTS) && + VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && + verifier.EndTable(); + } + BidirectionalSequenceRNNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BidirectionalSequenceRNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceRNNOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct PackOptionsBuilder -{ - typedef PackOptions Table; +struct BidirectionalSequenceRNNOptionsBuilder { + typedef BidirectionalSequenceRNNOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_values_count(int32_t values_count) - { - fbb_.AddElement(PackOptions::VT_VALUES_COUNT, values_count, 0); + void add_time_major(bool time_major) { + fbb_.AddElement(BidirectionalSequenceRNNOptions::VT_TIME_MAJOR, static_cast(time_major), 0); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(BidirectionalSequenceRNNOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_merge_outputs(bool merge_outputs) { + fbb_.AddElement(BidirectionalSequenceRNNOptions::VT_MERGE_OUTPUTS, static_cast(merge_outputs), 0); } - void add_axis(int32_t axis) { fbb_.AddElement(PackOptions::VT_AXIS, axis, 0); } - explicit PackOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { + fbb_.AddElement(BidirectionalSequenceRNNOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast(asymmetric_quantize_inputs), 0); + } + explicit BidirectionalSequenceRNNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreatePackOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t values_count = 0, int32_t axis = 0) -{ - PackOptionsBuilder builder_(_fbb); - builder_.add_axis(axis); - builder_.add_values_count(values_count); +inline flatbuffers::Offset CreateBidirectionalSequenceRNNOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool time_major = false, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + bool merge_outputs = false, + bool asymmetric_quantize_inputs = false) { + BidirectionalSequenceRNNOptionsBuilder builder_(_fbb); + builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); + builder_.add_merge_outputs(merge_outputs); + builder_.add_fused_activation_function(fused_activation_function); + builder_.add_time_major(time_major); return builder_.Finish(); } -flatbuffers::Offset -CreatePackOptions(flatbuffers::FlatBufferBuilder &_fbb, const PackOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateBidirectionalSequenceRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceRNNOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct LogicalOrOptionsT : public flatbuffers::NativeTable -{ - typedef LogicalOrOptions TableType; +struct FullyConnectedOptionsT : public flatbuffers::NativeTable { + typedef FullyConnectedOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + circle::FullyConnectedOptionsWeightsFormat weights_format = circle::FullyConnectedOptionsWeightsFormat_DEFAULT; + bool keep_num_dims = false; + bool asymmetric_quantize_inputs = false; + circle::TensorType quantized_bias_type = circle::TensorType_FLOAT32; }; -struct LogicalOrOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LogicalOrOptionsT NativeTableType; - typedef LogicalOrOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct FullyConnectedOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FullyConnectedOptionsT NativeTableType; + typedef FullyConnectedOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_WEIGHTS_FORMAT = 6, + VT_KEEP_NUM_DIMS = 8, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 10, + VT_QUANTIZED_BIAS_TYPE = 12 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - LogicalOrOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LogicalOrOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalOrOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + circle::FullyConnectedOptionsWeightsFormat weights_format() const { + return static_cast(GetField(VT_WEIGHTS_FORMAT, 0)); + } + bool keep_num_dims() const { + return GetField(VT_KEEP_NUM_DIMS, 0) != 0; + } + bool asymmetric_quantize_inputs() const { + return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + } + circle::TensorType quantized_bias_type() const { + return static_cast(GetField(VT_QUANTIZED_BIAS_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_WEIGHTS_FORMAT) && + VerifyField(verifier, VT_KEEP_NUM_DIMS) && + VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && + VerifyField(verifier, VT_QUANTIZED_BIAS_TYPE) && + verifier.EndTable(); + } + FullyConnectedOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(FullyConnectedOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const FullyConnectedOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct LogicalOrOptionsBuilder -{ - typedef LogicalOrOptions Table; +struct FullyConnectedOptionsBuilder { + typedef FullyConnectedOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit LogicalOrOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(FullyConnectedOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_weights_format(circle::FullyConnectedOptionsWeightsFormat weights_format) { + fbb_.AddElement(FullyConnectedOptions::VT_WEIGHTS_FORMAT, static_cast(weights_format), 0); + } + void add_keep_num_dims(bool keep_num_dims) { + fbb_.AddElement(FullyConnectedOptions::VT_KEEP_NUM_DIMS, static_cast(keep_num_dims), 0); + } + void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { + fbb_.AddElement(FullyConnectedOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast(asymmetric_quantize_inputs), 0); + } + void add_quantized_bias_type(circle::TensorType quantized_bias_type) { + fbb_.AddElement(FullyConnectedOptions::VT_QUANTIZED_BIAS_TYPE, static_cast(quantized_bias_type), 0); + } + explicit FullyConnectedOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateLogicalOrOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - LogicalOrOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateFullyConnectedOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + circle::FullyConnectedOptionsWeightsFormat weights_format = circle::FullyConnectedOptionsWeightsFormat_DEFAULT, + bool keep_num_dims = false, + bool asymmetric_quantize_inputs = false, + circle::TensorType quantized_bias_type = circle::TensorType_FLOAT32) { + FullyConnectedOptionsBuilder builder_(_fbb); + builder_.add_quantized_bias_type(quantized_bias_type); + builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); + builder_.add_keep_num_dims(keep_num_dims); + builder_.add_weights_format(weights_format); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateLogicalOrOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalOrOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateFullyConnectedOptions(flatbuffers::FlatBufferBuilder &_fbb, const FullyConnectedOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct OneHotOptionsT : public flatbuffers::NativeTable -{ - typedef OneHotOptions TableType; - int32_t axis = 0; +struct SoftmaxOptionsT : public flatbuffers::NativeTable { + typedef SoftmaxOptions TableType; + float beta = 0.0f; }; -struct OneHotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef OneHotOptionsT NativeTableType; - typedef OneHotOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_AXIS = 4 +struct SoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SoftmaxOptionsT NativeTableType; + typedef SoftmaxOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BETA = 4 }; - int32_t axis() const { return GetField(VT_AXIS, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_AXIS) && + float beta() const { + return GetField(VT_BETA, 0.0f); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_BETA) && verifier.EndTable(); } - OneHotOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(OneHotOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const OneHotOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + SoftmaxOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SoftmaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SoftmaxOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct OneHotOptionsBuilder -{ - typedef OneHotOptions Table; +struct SoftmaxOptionsBuilder { + typedef SoftmaxOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_axis(int32_t axis) { fbb_.AddElement(OneHotOptions::VT_AXIS, axis, 0); } - explicit OneHotOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_beta(float beta) { + fbb_.AddElement(SoftmaxOptions::VT_BETA, beta, 0.0f); + } + explicit SoftmaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateOneHotOptions(flatbuffers::FlatBufferBuilder &_fbb, - int32_t axis = 0) -{ - OneHotOptionsBuilder builder_(_fbb); - builder_.add_axis(axis); +inline flatbuffers::Offset CreateSoftmaxOptions( + flatbuffers::FlatBufferBuilder &_fbb, + float beta = 0.0f) { + SoftmaxOptionsBuilder builder_(_fbb); + builder_.add_beta(beta); return builder_.Finish(); } -flatbuffers::Offset -CreateOneHotOptions(flatbuffers::FlatBufferBuilder &_fbb, const OneHotOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const SoftmaxOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct AbsOptionsT : public flatbuffers::NativeTable -{ - typedef AbsOptions TableType; +struct ConcatenationOptionsT : public flatbuffers::NativeTable { + typedef ConcatenationOptions TableType; + int32_t axis = 0; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; }; -struct AbsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef AbsOptionsT NativeTableType; - typedef AbsOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ConcatenationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ConcatenationOptionsT NativeTableType; + typedef ConcatenationOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_AXIS = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6 + }; + int32_t axis() const { + return GetField(VT_AXIS, 0); } - AbsOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(AbsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const AbsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_AXIS) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + verifier.EndTable(); + } + ConcatenationOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ConcatenationOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ConcatenationOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -struct AbsOptionsBuilder -{ - typedef AbsOptions Table; +struct ConcatenationOptionsBuilder { + typedef ConcatenationOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit AbsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_axis(int32_t axis) { + fbb_.AddElement(ConcatenationOptions::VT_AXIS, axis, 0); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(ConcatenationOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + explicit ConcatenationOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateAbsOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - AbsOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateConcatenationOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t axis = 0, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) { + ConcatenationOptionsBuilder builder_(_fbb); + builder_.add_axis(axis); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateAbsOptions(flatbuffers::FlatBufferBuilder &_fbb, const AbsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateConcatenationOptions(flatbuffers::FlatBufferBuilder &_fbb, const ConcatenationOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct HardSwishOptionsT : public flatbuffers::NativeTable -{ - typedef HardSwishOptions TableType; +struct AddOptionsT : public flatbuffers::NativeTable { + typedef AddOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + bool pot_scale_int16 = true; }; -struct HardSwishOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef HardSwishOptionsT NativeTableType; - typedef HardSwishOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct AddOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AddOptionsT NativeTableType; + typedef AddOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_POT_SCALE_INT16 = 6 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - HardSwishOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(HardSwishOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const HardSwishOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool pot_scale_int16() const { + return GetField(VT_POT_SCALE_INT16, 1) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_POT_SCALE_INT16) && + verifier.EndTable(); + } + AddOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(AddOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const AddOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct HardSwishOptionsBuilder -{ - typedef HardSwishOptions Table; +struct AddOptionsBuilder { + typedef AddOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit HardSwishOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(AddOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_pot_scale_int16(bool pot_scale_int16) { + fbb_.AddElement(AddOptions::VT_POT_SCALE_INT16, static_cast(pot_scale_int16), 1); + } + explicit AddOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateHardSwishOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - HardSwishOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateAddOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + bool pot_scale_int16 = true) { + AddOptionsBuilder builder_(_fbb); + builder_.add_pot_scale_int16(pot_scale_int16); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateHardSwishOptions(flatbuffers::FlatBufferBuilder &_fbb, const HardSwishOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateAddOptions(flatbuffers::FlatBufferBuilder &_fbb, const AddOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct LogicalAndOptionsT : public flatbuffers::NativeTable -{ - typedef LogicalAndOptions TableType; +struct MulOptionsT : public flatbuffers::NativeTable { + typedef MulOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; }; -struct LogicalAndOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LogicalAndOptionsT NativeTableType; - typedef LogicalAndOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct MulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MulOptionsT NativeTableType; + typedef MulOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - LogicalAndOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LogicalAndOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalAndOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + verifier.EndTable(); + } + MulOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(MulOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const MulOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct LogicalAndOptionsBuilder -{ - typedef LogicalAndOptions Table; +struct MulOptionsBuilder { + typedef MulOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit LogicalAndOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(MulOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + explicit MulOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateLogicalAndOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - LogicalAndOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateMulOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) { + MulOptionsBuilder builder_(_fbb); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateLogicalAndOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalAndOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateMulOptions(flatbuffers::FlatBufferBuilder &_fbb, const MulOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct LogicalNotOptionsT : public flatbuffers::NativeTable -{ - typedef LogicalNotOptions TableType; +struct L2NormOptionsT : public flatbuffers::NativeTable { + typedef L2NormOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; }; -struct LogicalNotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LogicalNotOptionsT NativeTableType; - typedef LogicalNotOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct L2NormOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef L2NormOptionsT NativeTableType; + typedef L2NormOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - LogicalNotOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LogicalNotOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalNotOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + verifier.EndTable(); + } + L2NormOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(L2NormOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const L2NormOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct LogicalNotOptionsBuilder -{ - typedef LogicalNotOptions Table; +struct L2NormOptionsBuilder { + typedef L2NormOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit LogicalNotOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(L2NormOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + explicit L2NormOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateLogicalNotOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - LogicalNotOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateL2NormOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) { + L2NormOptionsBuilder builder_(_fbb); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateLogicalNotOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalNotOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateL2NormOptions(flatbuffers::FlatBufferBuilder &_fbb, const L2NormOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct UnpackOptionsT : public flatbuffers::NativeTable -{ - typedef UnpackOptions TableType; - int32_t num = 0; - int32_t axis = 0; +struct LocalResponseNormalizationOptionsT : public flatbuffers::NativeTable { + typedef LocalResponseNormalizationOptions TableType; + int32_t radius = 0; + float bias = 0.0f; + float alpha = 0.0f; + float beta = 0.0f; }; -struct UnpackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef UnpackOptionsT NativeTableType; - typedef UnpackOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_NUM = 4, - VT_AXIS = 6 +struct LocalResponseNormalizationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LocalResponseNormalizationOptionsT NativeTableType; + typedef LocalResponseNormalizationOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_RADIUS = 4, + VT_BIAS = 6, + VT_ALPHA = 8, + VT_BETA = 10 }; - int32_t num() const { return GetField(VT_NUM, 0); } - int32_t axis() const { return GetField(VT_AXIS, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_NUM) && - VerifyField(verifier, VT_AXIS) && verifier.EndTable(); + int32_t radius() const { + return GetField(VT_RADIUS, 0); } - UnpackOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(UnpackOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnpackOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + float bias() const { + return GetField(VT_BIAS, 0.0f); + } + float alpha() const { + return GetField(VT_ALPHA, 0.0f); + } + float beta() const { + return GetField(VT_BETA, 0.0f); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_RADIUS) && + VerifyField(verifier, VT_BIAS) && + VerifyField(verifier, VT_ALPHA) && + VerifyField(verifier, VT_BETA) && + verifier.EndTable(); + } + LocalResponseNormalizationOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LocalResponseNormalizationOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LocalResponseNormalizationOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct UnpackOptionsBuilder -{ - typedef UnpackOptions Table; +struct LocalResponseNormalizationOptionsBuilder { + typedef LocalResponseNormalizationOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_num(int32_t num) { fbb_.AddElement(UnpackOptions::VT_NUM, num, 0); } - void add_axis(int32_t axis) { fbb_.AddElement(UnpackOptions::VT_AXIS, axis, 0); } - explicit UnpackOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_radius(int32_t radius) { + fbb_.AddElement(LocalResponseNormalizationOptions::VT_RADIUS, radius, 0); + } + void add_bias(float bias) { + fbb_.AddElement(LocalResponseNormalizationOptions::VT_BIAS, bias, 0.0f); + } + void add_alpha(float alpha) { + fbb_.AddElement(LocalResponseNormalizationOptions::VT_ALPHA, alpha, 0.0f); + } + void add_beta(float beta) { + fbb_.AddElement(LocalResponseNormalizationOptions::VT_BETA, beta, 0.0f); + } + explicit LocalResponseNormalizationOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateUnpackOptions(flatbuffers::FlatBufferBuilder &_fbb, - int32_t num = 0, int32_t axis = 0) -{ - UnpackOptionsBuilder builder_(_fbb); - builder_.add_axis(axis); - builder_.add_num(num); +inline flatbuffers::Offset CreateLocalResponseNormalizationOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t radius = 0, + float bias = 0.0f, + float alpha = 0.0f, + float beta = 0.0f) { + LocalResponseNormalizationOptionsBuilder builder_(_fbb); + builder_.add_beta(beta); + builder_.add_alpha(alpha); + builder_.add_bias(bias); + builder_.add_radius(radius); return builder_.Finish(); } -flatbuffers::Offset -CreateUnpackOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnpackOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateLocalResponseNormalizationOptions(flatbuffers::FlatBufferBuilder &_fbb, const LocalResponseNormalizationOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct FloorDivOptionsT : public flatbuffers::NativeTable -{ - typedef FloorDivOptions TableType; +struct LSTMOptionsT : public flatbuffers::NativeTable { + typedef LSTMOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + float cell_clip = 0.0f; + float proj_clip = 0.0f; + circle::LSTMKernelType kernel_type = circle::LSTMKernelType_FULL; + bool asymmetric_quantize_inputs = false; }; -struct FloorDivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef FloorDivOptionsT NativeTableType; - typedef FloorDivOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct LSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LSTMOptionsT NativeTableType; + typedef LSTMOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_CELL_CLIP = 6, + VT_PROJ_CLIP = 8, + VT_KERNEL_TYPE = 10, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 12 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - FloorDivOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(FloorDivOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const FloorDivOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + float cell_clip() const { + return GetField(VT_CELL_CLIP, 0.0f); + } + float proj_clip() const { + return GetField(VT_PROJ_CLIP, 0.0f); + } + circle::LSTMKernelType kernel_type() const { + return static_cast(GetField(VT_KERNEL_TYPE, 0)); + } + bool asymmetric_quantize_inputs() const { + return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_CELL_CLIP) && + VerifyField(verifier, VT_PROJ_CLIP) && + VerifyField(verifier, VT_KERNEL_TYPE) && + VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && + verifier.EndTable(); + } + LSTMOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LSTMOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSTMOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct FloorDivOptionsBuilder -{ - typedef FloorDivOptions Table; +struct LSTMOptionsBuilder { + typedef LSTMOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit FloorDivOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(LSTMOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_cell_clip(float cell_clip) { + fbb_.AddElement(LSTMOptions::VT_CELL_CLIP, cell_clip, 0.0f); + } + void add_proj_clip(float proj_clip) { + fbb_.AddElement(LSTMOptions::VT_PROJ_CLIP, proj_clip, 0.0f); + } + void add_kernel_type(circle::LSTMKernelType kernel_type) { + fbb_.AddElement(LSTMOptions::VT_KERNEL_TYPE, static_cast(kernel_type), 0); + } + void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { + fbb_.AddElement(LSTMOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast(asymmetric_quantize_inputs), 0); + } + explicit LSTMOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateFloorDivOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - FloorDivOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateLSTMOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + float cell_clip = 0.0f, + float proj_clip = 0.0f, + circle::LSTMKernelType kernel_type = circle::LSTMKernelType_FULL, + bool asymmetric_quantize_inputs = false) { + LSTMOptionsBuilder builder_(_fbb); + builder_.add_proj_clip(proj_clip); + builder_.add_cell_clip(cell_clip); + builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); + builder_.add_kernel_type(kernel_type); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateFloorDivOptions(flatbuffers::FlatBufferBuilder &_fbb, const FloorDivOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, const LSTMOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct SquareOptionsT : public flatbuffers::NativeTable -{ - typedef SquareOptions TableType; +struct UnidirectionalSequenceLSTMOptionsT : public flatbuffers::NativeTable { + typedef UnidirectionalSequenceLSTMOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + float cell_clip = 0.0f; + float proj_clip = 0.0f; + bool time_major = false; + bool asymmetric_quantize_inputs = false; + bool diagonal_recurrent_tensors = false; }; -struct SquareOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SquareOptionsT NativeTableType; - typedef SquareOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct UnidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnidirectionalSequenceLSTMOptionsT NativeTableType; + typedef UnidirectionalSequenceLSTMOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_CELL_CLIP = 6, + VT_PROJ_CLIP = 8, + VT_TIME_MAJOR = 10, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 12, + VT_DIAGONAL_RECURRENT_TENSORS = 14 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - SquareOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SquareOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SquareOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + float cell_clip() const { + return GetField(VT_CELL_CLIP, 0.0f); + } + float proj_clip() const { + return GetField(VT_PROJ_CLIP, 0.0f); + } + bool time_major() const { + return GetField(VT_TIME_MAJOR, 0) != 0; + } + bool asymmetric_quantize_inputs() const { + return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + } + bool diagonal_recurrent_tensors() const { + return GetField(VT_DIAGONAL_RECURRENT_TENSORS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_CELL_CLIP) && + VerifyField(verifier, VT_PROJ_CLIP) && + VerifyField(verifier, VT_TIME_MAJOR) && + VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && + VerifyField(verifier, VT_DIAGONAL_RECURRENT_TENSORS) && + verifier.EndTable(); + } + UnidirectionalSequenceLSTMOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(UnidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnidirectionalSequenceLSTMOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SquareOptionsBuilder -{ - typedef SquareOptions Table; +struct UnidirectionalSequenceLSTMOptionsBuilder { + typedef UnidirectionalSequenceLSTMOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit SquareOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_cell_clip(float cell_clip) { + fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_CELL_CLIP, cell_clip, 0.0f); + } + void add_proj_clip(float proj_clip) { + fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_PROJ_CLIP, proj_clip, 0.0f); + } + void add_time_major(bool time_major) { + fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_TIME_MAJOR, static_cast(time_major), 0); + } + void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { + fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast(asymmetric_quantize_inputs), 0); + } + void add_diagonal_recurrent_tensors(bool diagonal_recurrent_tensors) { + fbb_.AddElement(UnidirectionalSequenceLSTMOptions::VT_DIAGONAL_RECURRENT_TENSORS, static_cast(diagonal_recurrent_tensors), 0); + } + explicit UnidirectionalSequenceLSTMOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateSquareOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - SquareOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateUnidirectionalSequenceLSTMOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + float cell_clip = 0.0f, + float proj_clip = 0.0f, + bool time_major = false, + bool asymmetric_quantize_inputs = false, + bool diagonal_recurrent_tensors = false) { + UnidirectionalSequenceLSTMOptionsBuilder builder_(_fbb); + builder_.add_proj_clip(proj_clip); + builder_.add_cell_clip(cell_clip); + builder_.add_diagonal_recurrent_tensors(diagonal_recurrent_tensors); + builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); + builder_.add_time_major(time_major); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateSquareOptions(flatbuffers::FlatBufferBuilder &_fbb, const SquareOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateUnidirectionalSequenceLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct ZerosLikeOptionsT : public flatbuffers::NativeTable -{ - typedef ZerosLikeOptions TableType; -}; - -struct ZerosLikeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ZerosLikeOptionsT NativeTableType; - typedef ZerosLikeOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); - } - ZerosLikeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ZerosLikeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +struct BidirectionalSequenceLSTMOptionsT : public flatbuffers::NativeTable { + typedef BidirectionalSequenceLSTMOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + float cell_clip = 0.0f; + float proj_clip = 0.0f; + bool merge_outputs = false; + bool time_major = true; + bool asymmetric_quantize_inputs = false; }; -struct ZerosLikeOptionsBuilder -{ - typedef ZerosLikeOptions Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit ZerosLikeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); +struct BidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BidirectionalSequenceLSTMOptionsT NativeTableType; + typedef BidirectionalSequenceLSTMOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_CELL_CLIP = 6, + VT_PROJ_CLIP = 8, + VT_MERGE_OUTPUTS = 10, + VT_TIME_MAJOR = 12, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 14 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; + float cell_clip() const { + return GetField(VT_CELL_CLIP, 0.0f); } -}; - -inline flatbuffers::Offset -CreateZerosLikeOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - ZerosLikeOptionsBuilder builder_(_fbb); - return builder_.Finish(); -} - -flatbuffers::Offset -CreateZerosLikeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct FillOptionsT : public flatbuffers::NativeTable -{ - typedef FillOptions TableType; -}; - -struct FillOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef FillOptionsT NativeTableType; - typedef FillOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); + float proj_clip() const { + return GetField(VT_PROJ_CLIP, 0.0f); } - FillOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(FillOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const FillOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool merge_outputs() const { + return GetField(VT_MERGE_OUTPUTS, 0) != 0; + } + bool time_major() const { + return GetField(VT_TIME_MAJOR, 1) != 0; + } + bool asymmetric_quantize_inputs() const { + return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_CELL_CLIP) && + VerifyField(verifier, VT_PROJ_CLIP) && + VerifyField(verifier, VT_MERGE_OUTPUTS) && + VerifyField(verifier, VT_TIME_MAJOR) && + VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && + verifier.EndTable(); + } + BidirectionalSequenceLSTMOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceLSTMOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct FillOptionsBuilder -{ - typedef FillOptions Table; +struct BidirectionalSequenceLSTMOptionsBuilder { + typedef BidirectionalSequenceLSTMOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit FillOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_cell_clip(float cell_clip) { + fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_CELL_CLIP, cell_clip, 0.0f); + } + void add_proj_clip(float proj_clip) { + fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_PROJ_CLIP, proj_clip, 0.0f); + } + void add_merge_outputs(bool merge_outputs) { + fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_MERGE_OUTPUTS, static_cast(merge_outputs), 0); + } + void add_time_major(bool time_major) { + fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_TIME_MAJOR, static_cast(time_major), 1); + } + void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { + fbb_.AddElement(BidirectionalSequenceLSTMOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast(asymmetric_quantize_inputs), 0); + } + explicit BidirectionalSequenceLSTMOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateFillOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - FillOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateBidirectionalSequenceLSTMOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + float cell_clip = 0.0f, + float proj_clip = 0.0f, + bool merge_outputs = false, + bool time_major = true, + bool asymmetric_quantize_inputs = false) { + BidirectionalSequenceLSTMOptionsBuilder builder_(_fbb); + builder_.add_proj_clip(proj_clip); + builder_.add_cell_clip(cell_clip); + builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); + builder_.add_time_major(time_major); + builder_.add_merge_outputs(merge_outputs); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateFillOptions(flatbuffers::FlatBufferBuilder &_fbb, const FillOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateBidirectionalSequenceLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct FloorModOptionsT : public flatbuffers::NativeTable -{ - typedef FloorModOptions TableType; +struct ResizeBilinearOptionsT : public flatbuffers::NativeTable { + typedef ResizeBilinearOptions TableType; + bool align_corners = false; + bool half_pixel_centers = false; }; -struct FloorModOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef FloorModOptionsT NativeTableType; - typedef FloorModOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ResizeBilinearOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResizeBilinearOptionsT NativeTableType; + typedef ResizeBilinearOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ALIGN_CORNERS = 8, + VT_HALF_PIXEL_CENTERS = 10 + }; + bool align_corners() const { + return GetField(VT_ALIGN_CORNERS, 0) != 0; } - FloorModOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(FloorModOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const FloorModOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool half_pixel_centers() const { + return GetField(VT_HALF_PIXEL_CENTERS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ALIGN_CORNERS) && + VerifyField(verifier, VT_HALF_PIXEL_CENTERS) && + verifier.EndTable(); + } + ResizeBilinearOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ResizeBilinearOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ResizeBilinearOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct FloorModOptionsBuilder -{ - typedef FloorModOptions Table; +struct ResizeBilinearOptionsBuilder { + typedef ResizeBilinearOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit FloorModOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_align_corners(bool align_corners) { + fbb_.AddElement(ResizeBilinearOptions::VT_ALIGN_CORNERS, static_cast(align_corners), 0); + } + void add_half_pixel_centers(bool half_pixel_centers) { + fbb_.AddElement(ResizeBilinearOptions::VT_HALF_PIXEL_CENTERS, static_cast(half_pixel_centers), 0); + } + explicit ResizeBilinearOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateFloorModOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - FloorModOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateResizeBilinearOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool align_corners = false, + bool half_pixel_centers = false) { + ResizeBilinearOptionsBuilder builder_(_fbb); + builder_.add_half_pixel_centers(half_pixel_centers); + builder_.add_align_corners(align_corners); return builder_.Finish(); } -flatbuffers::Offset -CreateFloorModOptions(flatbuffers::FlatBufferBuilder &_fbb, const FloorModOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateResizeBilinearOptions(flatbuffers::FlatBufferBuilder &_fbb, const ResizeBilinearOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct RangeOptionsT : public flatbuffers::NativeTable -{ - typedef RangeOptions TableType; +struct ResizeNearestNeighborOptionsT : public flatbuffers::NativeTable { + typedef ResizeNearestNeighborOptions TableType; + bool align_corners = false; + bool half_pixel_centers = false; }; -struct RangeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef RangeOptionsT NativeTableType; - typedef RangeOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ResizeNearestNeighborOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResizeNearestNeighborOptionsT NativeTableType; + typedef ResizeNearestNeighborOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ALIGN_CORNERS = 4, + VT_HALF_PIXEL_CENTERS = 6 + }; + bool align_corners() const { + return GetField(VT_ALIGN_CORNERS, 0) != 0; } - RangeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(RangeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const RangeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool half_pixel_centers() const { + return GetField(VT_HALF_PIXEL_CENTERS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ALIGN_CORNERS) && + VerifyField(verifier, VT_HALF_PIXEL_CENTERS) && + verifier.EndTable(); + } + ResizeNearestNeighborOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ResizeNearestNeighborOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ResizeNearestNeighborOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct RangeOptionsBuilder -{ - typedef RangeOptions Table; +struct ResizeNearestNeighborOptionsBuilder { + typedef ResizeNearestNeighborOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit RangeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_align_corners(bool align_corners) { + fbb_.AddElement(ResizeNearestNeighborOptions::VT_ALIGN_CORNERS, static_cast(align_corners), 0); + } + void add_half_pixel_centers(bool half_pixel_centers) { + fbb_.AddElement(ResizeNearestNeighborOptions::VT_HALF_PIXEL_CENTERS, static_cast(half_pixel_centers), 0); + } + explicit ResizeNearestNeighborOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateRangeOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - RangeOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateResizeNearestNeighborOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool align_corners = false, + bool half_pixel_centers = false) { + ResizeNearestNeighborOptionsBuilder builder_(_fbb); + builder_.add_half_pixel_centers(half_pixel_centers); + builder_.add_align_corners(align_corners); return builder_.Finish(); } -flatbuffers::Offset -CreateRangeOptions(flatbuffers::FlatBufferBuilder &_fbb, const RangeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateResizeNearestNeighborOptions(flatbuffers::FlatBufferBuilder &_fbb, const ResizeNearestNeighborOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct LeakyReluOptionsT : public flatbuffers::NativeTable -{ - typedef LeakyReluOptions TableType; - float alpha = 0.0f; +struct CallOptionsT : public flatbuffers::NativeTable { + typedef CallOptions TableType; + uint32_t subgraph = 0; }; -struct LeakyReluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef LeakyReluOptionsT NativeTableType; - typedef LeakyReluOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_ALPHA = 4 +struct CallOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CallOptionsT NativeTableType; + typedef CallOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SUBGRAPH = 4 }; - float alpha() const { return GetField(VT_ALPHA, 0.0f); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_ALPHA) && + uint32_t subgraph() const { + return GetField(VT_SUBGRAPH, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_SUBGRAPH) && verifier.EndTable(); } - LeakyReluOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(LeakyReluOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const LeakyReluOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + CallOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(CallOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const CallOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct LeakyReluOptionsBuilder -{ - typedef LeakyReluOptions Table; +struct CallOptionsBuilder { + typedef CallOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_alpha(float alpha) { fbb_.AddElement(LeakyReluOptions::VT_ALPHA, alpha, 0.0f); } - explicit LeakyReluOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_subgraph(uint32_t subgraph) { + fbb_.AddElement(CallOptions::VT_SUBGRAPH, subgraph, 0); + } + explicit CallOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateLeakyReluOptions(flatbuffers::FlatBufferBuilder &_fbb, float alpha = 0.0f) -{ - LeakyReluOptionsBuilder builder_(_fbb); - builder_.add_alpha(alpha); +inline flatbuffers::Offset CreateCallOptions( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t subgraph = 0) { + CallOptionsBuilder builder_(_fbb); + builder_.add_subgraph(subgraph); return builder_.Finish(); } -flatbuffers::Offset -CreateLeakyReluOptions(flatbuffers::FlatBufferBuilder &_fbb, const LeakyReluOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateCallOptions(flatbuffers::FlatBufferBuilder &_fbb, const CallOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct SquaredDifferenceOptionsT : public flatbuffers::NativeTable -{ - typedef SquaredDifferenceOptions TableType; +struct PadOptionsT : public flatbuffers::NativeTable { + typedef PadOptions TableType; }; -struct SquaredDifferenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SquaredDifferenceOptionsT NativeTableType; - typedef SquaredDifferenceOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct PadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PadOptionsT NativeTableType; + typedef PadOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - SquaredDifferenceOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SquaredDifferenceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SquaredDifferenceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + PadOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(PadOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SquaredDifferenceOptionsBuilder -{ - typedef SquaredDifferenceOptions Table; +struct PadOptionsBuilder { + typedef PadOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit SquaredDifferenceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit PadOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateSquaredDifferenceOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - SquaredDifferenceOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreatePadOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + PadOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateSquaredDifferenceOptions(flatbuffers::FlatBufferBuilder &_fbb, - const SquaredDifferenceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreatePadOptions(flatbuffers::FlatBufferBuilder &_fbb, const PadOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct MirrorPadOptionsT : public flatbuffers::NativeTable -{ - typedef MirrorPadOptions TableType; - circle::MirrorPadMode mode = circle::MirrorPadMode_REFLECT; +struct PadV2OptionsT : public flatbuffers::NativeTable { + typedef PadV2Options TableType; }; -struct MirrorPadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef MirrorPadOptionsT NativeTableType; - typedef MirrorPadOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_MODE = 4 - }; - circle::MirrorPadMode mode() const - { - return static_cast(GetField(VT_MODE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_MODE) && +struct PadV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PadV2OptionsT NativeTableType; + typedef PadV2OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && verifier.EndTable(); } - MirrorPadOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(MirrorPadOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const MirrorPadOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + PadV2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(PadV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadV2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct MirrorPadOptionsBuilder -{ - typedef MirrorPadOptions Table; +struct PadV2OptionsBuilder { + typedef PadV2Options Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_mode(circle::MirrorPadMode mode) - { - fbb_.AddElement(MirrorPadOptions::VT_MODE, static_cast(mode), 0); - } - explicit MirrorPadOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit PadV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateMirrorPadOptions(flatbuffers::FlatBufferBuilder &_fbb, - circle::MirrorPadMode mode = circle::MirrorPadMode_REFLECT) -{ - MirrorPadOptionsBuilder builder_(_fbb); - builder_.add_mode(mode); +inline flatbuffers::Offset CreatePadV2Options( + flatbuffers::FlatBufferBuilder &_fbb) { + PadV2OptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateMirrorPadOptions(flatbuffers::FlatBufferBuilder &_fbb, const MirrorPadOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreatePadV2Options(flatbuffers::FlatBufferBuilder &_fbb, const PadV2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct UniqueOptionsT : public flatbuffers::NativeTable -{ - typedef UniqueOptions TableType; - circle::TensorType idx_out_type = circle::TensorType_INT32; +struct ReshapeOptionsT : public flatbuffers::NativeTable { + typedef ReshapeOptions TableType; + std::vector new_shape{}; }; -struct UniqueOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef UniqueOptionsT NativeTableType; - typedef UniqueOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_IDX_OUT_TYPE = 4 +struct ReshapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReshapeOptionsT NativeTableType; + typedef ReshapeOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NEW_SHAPE = 4 }; - circle::TensorType idx_out_type() const - { - return static_cast(GetField(VT_IDX_OUT_TYPE, 2)); + const flatbuffers::Vector *new_shape() const { + return GetPointer *>(VT_NEW_SHAPE); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_IDX_OUT_TYPE) && + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NEW_SHAPE) && + verifier.VerifyVector(new_shape()) && verifier.EndTable(); } - UniqueOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(UniqueOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const UniqueOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + ReshapeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ReshapeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct UniqueOptionsBuilder -{ - typedef UniqueOptions Table; +struct ReshapeOptionsBuilder { + typedef ReshapeOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_idx_out_type(circle::TensorType idx_out_type) - { - fbb_.AddElement(UniqueOptions::VT_IDX_OUT_TYPE, static_cast(idx_out_type), 2); + void add_new_shape(flatbuffers::Offset> new_shape) { + fbb_.AddOffset(ReshapeOptions::VT_NEW_SHAPE, new_shape); } - explicit UniqueOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit ReshapeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateUniqueOptions(flatbuffers::FlatBufferBuilder &_fbb, - circle::TensorType idx_out_type = circle::TensorType_INT32) -{ - UniqueOptionsBuilder builder_(_fbb); - builder_.add_idx_out_type(idx_out_type); +inline flatbuffers::Offset CreateReshapeOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> new_shape = 0) { + ReshapeOptionsBuilder builder_(_fbb); + builder_.add_new_shape(new_shape); return builder_.Finish(); } -flatbuffers::Offset -CreateUniqueOptions(flatbuffers::FlatBufferBuilder &_fbb, const UniqueOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateReshapeOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *new_shape = nullptr) { + auto new_shape__ = new_shape ? _fbb.CreateVector(*new_shape) : 0; + return circle::CreateReshapeOptions( + _fbb, + new_shape__); +} + +flatbuffers::Offset CreateReshapeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct ReverseV2OptionsT : public flatbuffers::NativeTable -{ - typedef ReverseV2Options TableType; +struct SpaceToBatchNDOptionsT : public flatbuffers::NativeTable { + typedef SpaceToBatchNDOptions TableType; }; -struct ReverseV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ReverseV2OptionsT NativeTableType; - typedef ReverseV2OptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SpaceToBatchNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SpaceToBatchNDOptionsT NativeTableType; + typedef SpaceToBatchNDOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - ReverseV2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ReverseV2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReverseV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + SpaceToBatchNDOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SpaceToBatchNDOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToBatchNDOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct ReverseV2OptionsBuilder -{ - typedef ReverseV2Options Table; +struct SpaceToBatchNDOptionsBuilder { + typedef SpaceToBatchNDOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit ReverseV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit SpaceToBatchNDOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateReverseV2Options(flatbuffers::FlatBufferBuilder &_fbb) -{ - ReverseV2OptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSpaceToBatchNDOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + SpaceToBatchNDOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateReverseV2Options(flatbuffers::FlatBufferBuilder &_fbb, const ReverseV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSpaceToBatchNDOptions(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToBatchNDOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct AddNOptionsT : public flatbuffers::NativeTable -{ - typedef AddNOptions TableType; +struct BatchToSpaceNDOptionsT : public flatbuffers::NativeTable { + typedef BatchToSpaceNDOptions TableType; }; -struct AddNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef AddNOptionsT NativeTableType; - typedef AddNOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct BatchToSpaceNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BatchToSpaceNDOptionsT NativeTableType; + typedef BatchToSpaceNDOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - AddNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(AddNOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const AddNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + BatchToSpaceNDOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BatchToSpaceNDOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchToSpaceNDOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct AddNOptionsBuilder -{ - typedef AddNOptions Table; +struct BatchToSpaceNDOptionsBuilder { + typedef BatchToSpaceNDOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit AddNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit BatchToSpaceNDOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateAddNOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - AddNOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateBatchToSpaceNDOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + BatchToSpaceNDOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateAddNOptions(flatbuffers::FlatBufferBuilder &_fbb, const AddNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateBatchToSpaceNDOptions(flatbuffers::FlatBufferBuilder &_fbb, const BatchToSpaceNDOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct GatherNdOptionsT : public flatbuffers::NativeTable -{ - typedef GatherNdOptions TableType; +struct SkipGramOptionsT : public flatbuffers::NativeTable { + typedef SkipGramOptions TableType; + int32_t ngram_size = 0; + int32_t max_skip_size = 0; + bool include_all_ngrams = false; }; -struct GatherNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef GatherNdOptionsT NativeTableType; - typedef GatherNdOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SkipGramOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SkipGramOptionsT NativeTableType; + typedef SkipGramOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NGRAM_SIZE = 4, + VT_MAX_SKIP_SIZE = 6, + VT_INCLUDE_ALL_NGRAMS = 8 + }; + int32_t ngram_size() const { + return GetField(VT_NGRAM_SIZE, 0); } - GatherNdOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(GatherNdOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherNdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + int32_t max_skip_size() const { + return GetField(VT_MAX_SKIP_SIZE, 0); + } + bool include_all_ngrams() const { + return GetField(VT_INCLUDE_ALL_NGRAMS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_NGRAM_SIZE) && + VerifyField(verifier, VT_MAX_SKIP_SIZE) && + VerifyField(verifier, VT_INCLUDE_ALL_NGRAMS) && + verifier.EndTable(); + } + SkipGramOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SkipGramOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SkipGramOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct GatherNdOptionsBuilder -{ - typedef GatherNdOptions Table; +struct SkipGramOptionsBuilder { + typedef SkipGramOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit GatherNdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_ngram_size(int32_t ngram_size) { + fbb_.AddElement(SkipGramOptions::VT_NGRAM_SIZE, ngram_size, 0); + } + void add_max_skip_size(int32_t max_skip_size) { + fbb_.AddElement(SkipGramOptions::VT_MAX_SKIP_SIZE, max_skip_size, 0); + } + void add_include_all_ngrams(bool include_all_ngrams) { + fbb_.AddElement(SkipGramOptions::VT_INCLUDE_ALL_NGRAMS, static_cast(include_all_ngrams), 0); + } + explicit SkipGramOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateGatherNdOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - GatherNdOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSkipGramOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t ngram_size = 0, + int32_t max_skip_size = 0, + bool include_all_ngrams = false) { + SkipGramOptionsBuilder builder_(_fbb); + builder_.add_max_skip_size(max_skip_size); + builder_.add_ngram_size(ngram_size); + builder_.add_include_all_ngrams(include_all_ngrams); return builder_.Finish(); } -flatbuffers::Offset -CreateGatherNdOptions(flatbuffers::FlatBufferBuilder &_fbb, const GatherNdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSkipGramOptions(flatbuffers::FlatBufferBuilder &_fbb, const SkipGramOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct WhereOptionsT : public flatbuffers::NativeTable -{ - typedef WhereOptions TableType; +struct SpaceToDepthOptionsT : public flatbuffers::NativeTable { + typedef SpaceToDepthOptions TableType; + int32_t block_size = 0; }; -struct WhereOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef WhereOptionsT NativeTableType; - typedef WhereOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SpaceToDepthOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SpaceToDepthOptionsT NativeTableType; + typedef SpaceToDepthOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BLOCK_SIZE = 4 + }; + int32_t block_size() const { + return GetField(VT_BLOCK_SIZE, 0); } - WhereOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(WhereOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhereOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_BLOCK_SIZE) && + verifier.EndTable(); + } + SpaceToDepthOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SpaceToDepthOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToDepthOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct WhereOptionsBuilder -{ - typedef WhereOptions Table; +struct SpaceToDepthOptionsBuilder { + typedef SpaceToDepthOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit WhereOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_block_size(int32_t block_size) { + fbb_.AddElement(SpaceToDepthOptions::VT_BLOCK_SIZE, block_size, 0); + } + explicit SpaceToDepthOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateWhereOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - WhereOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSpaceToDepthOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t block_size = 0) { + SpaceToDepthOptionsBuilder builder_(_fbb); + builder_.add_block_size(block_size); return builder_.Finish(); } -flatbuffers::Offset -CreateWhereOptions(flatbuffers::FlatBufferBuilder &_fbb, const WhereOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSpaceToDepthOptions(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToDepthOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct ReverseSequenceOptionsT : public flatbuffers::NativeTable -{ - typedef ReverseSequenceOptions TableType; - int32_t seq_dim = 0; - int32_t batch_dim = 0; +struct DepthToSpaceOptionsT : public flatbuffers::NativeTable { + typedef DepthToSpaceOptions TableType; + int32_t block_size = 0; }; -struct ReverseSequenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ReverseSequenceOptionsT NativeTableType; - typedef ReverseSequenceOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_SEQ_DIM = 4, - VT_BATCH_DIM = 6 +struct DepthToSpaceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DepthToSpaceOptionsT NativeTableType; + typedef DepthToSpaceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BLOCK_SIZE = 4 }; - int32_t seq_dim() const { return GetField(VT_SEQ_DIM, 0); } - int32_t batch_dim() const { return GetField(VT_BATCH_DIM, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_SEQ_DIM) && - VerifyField(verifier, VT_BATCH_DIM) && verifier.EndTable(); - } - ReverseSequenceOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ReverseSequenceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReverseSequenceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct ReverseSequenceOptionsBuilder -{ - typedef ReverseSequenceOptions Table; + int32_t block_size() const { + return GetField(VT_BLOCK_SIZE, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_BLOCK_SIZE) && + verifier.EndTable(); + } + DepthToSpaceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(DepthToSpaceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const DepthToSpaceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct DepthToSpaceOptionsBuilder { + typedef DepthToSpaceOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_seq_dim(int32_t seq_dim) - { - fbb_.AddElement(ReverseSequenceOptions::VT_SEQ_DIM, seq_dim, 0); - } - void add_batch_dim(int32_t batch_dim) - { - fbb_.AddElement(ReverseSequenceOptions::VT_BATCH_DIM, batch_dim, 0); + void add_block_size(int32_t block_size) { + fbb_.AddElement(DepthToSpaceOptions::VT_BLOCK_SIZE, block_size, 0); } - explicit ReverseSequenceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit DepthToSpaceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateReverseSequenceOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t seq_dim = 0, - int32_t batch_dim = 0) -{ - ReverseSequenceOptionsBuilder builder_(_fbb); - builder_.add_batch_dim(batch_dim); - builder_.add_seq_dim(seq_dim); +inline flatbuffers::Offset CreateDepthToSpaceOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t block_size = 0) { + DepthToSpaceOptionsBuilder builder_(_fbb); + builder_.add_block_size(block_size); return builder_.Finish(); } -flatbuffers::Offset -CreateReverseSequenceOptions(flatbuffers::FlatBufferBuilder &_fbb, - const ReverseSequenceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateDepthToSpaceOptions(flatbuffers::FlatBufferBuilder &_fbb, const DepthToSpaceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct MatrixDiagOptionsT : public flatbuffers::NativeTable -{ - typedef MatrixDiagOptions TableType; +struct SubOptionsT : public flatbuffers::NativeTable { + typedef SubOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + bool pot_scale_int16 = true; }; -struct MatrixDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef MatrixDiagOptionsT NativeTableType; - typedef MatrixDiagOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SubOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SubOptionsT NativeTableType; + typedef SubOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_POT_SCALE_INT16 = 6 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - MatrixDiagOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(MatrixDiagOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatrixDiagOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool pot_scale_int16() const { + return GetField(VT_POT_SCALE_INT16, 1) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_POT_SCALE_INT16) && + verifier.EndTable(); + } + SubOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SubOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct MatrixDiagOptionsBuilder -{ - typedef MatrixDiagOptions Table; +struct SubOptionsBuilder { + typedef SubOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit MatrixDiagOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(SubOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_pot_scale_int16(bool pot_scale_int16) { + fbb_.AddElement(SubOptions::VT_POT_SCALE_INT16, static_cast(pot_scale_int16), 1); + } + explicit SubOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateMatrixDiagOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - MatrixDiagOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSubOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + bool pot_scale_int16 = true) { + SubOptionsBuilder builder_(_fbb); + builder_.add_pot_scale_int16(pot_scale_int16); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateMatrixDiagOptions(flatbuffers::FlatBufferBuilder &_fbb, const MatrixDiagOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSubOptions(flatbuffers::FlatBufferBuilder &_fbb, const SubOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct QuantizeOptionsT : public flatbuffers::NativeTable -{ - typedef QuantizeOptions TableType; +struct DivOptionsT : public flatbuffers::NativeTable { + typedef DivOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; }; -struct QuantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef QuantizeOptionsT NativeTableType; - typedef QuantizeOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct DivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DivOptionsT NativeTableType; + typedef DivOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); } - QuantizeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(QuantizeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + verifier.EndTable(); + } + DivOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(DivOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const DivOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct QuantizeOptionsBuilder -{ - typedef QuantizeOptions Table; +struct DivOptionsBuilder { + typedef DivOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit QuantizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(DivOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + explicit DivOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateQuantizeOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - QuantizeOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateDivOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) { + DivOptionsBuilder builder_(_fbb); + builder_.add_fused_activation_function(fused_activation_function); return builder_.Finish(); } -flatbuffers::Offset -CreateQuantizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateDivOptions(flatbuffers::FlatBufferBuilder &_fbb, const DivOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct MatrixSetDiagOptionsT : public flatbuffers::NativeTable -{ - typedef MatrixSetDiagOptions TableType; +struct TopKV2OptionsT : public flatbuffers::NativeTable { + typedef TopKV2Options TableType; }; -struct MatrixSetDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef MatrixSetDiagOptionsT NativeTableType; - typedef MatrixSetDiagOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct TopKV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TopKV2OptionsT NativeTableType; + typedef TopKV2OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - MatrixSetDiagOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(MatrixSetDiagOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatrixSetDiagOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + TopKV2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(TopKV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct MatrixSetDiagOptionsBuilder -{ - typedef MatrixSetDiagOptions Table; +struct TopKV2OptionsBuilder { + typedef TopKV2Options Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit MatrixSetDiagOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit TopKV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateMatrixSetDiagOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - MatrixSetDiagOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateTopKV2Options( + flatbuffers::FlatBufferBuilder &_fbb) { + TopKV2OptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateMatrixSetDiagOptions(flatbuffers::FlatBufferBuilder &_fbb, const MatrixSetDiagOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateTopKV2Options(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct IfOptionsT : public flatbuffers::NativeTable -{ - typedef IfOptions TableType; - int32_t then_subgraph_index = 0; - int32_t else_subgraph_index = 0; +struct EmbeddingLookupSparseOptionsT : public flatbuffers::NativeTable { + typedef EmbeddingLookupSparseOptions TableType; + circle::CombinerType combiner = circle::CombinerType_SUM; }; -struct IfOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef IfOptionsT NativeTableType; - typedef IfOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_THEN_SUBGRAPH_INDEX = 4, - VT_ELSE_SUBGRAPH_INDEX = 6 +struct EmbeddingLookupSparseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EmbeddingLookupSparseOptionsT NativeTableType; + typedef EmbeddingLookupSparseOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_COMBINER = 4 }; - int32_t then_subgraph_index() const { return GetField(VT_THEN_SUBGRAPH_INDEX, 0); } - int32_t else_subgraph_index() const { return GetField(VT_ELSE_SUBGRAPH_INDEX, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_THEN_SUBGRAPH_INDEX) && - VerifyField(verifier, VT_ELSE_SUBGRAPH_INDEX) && verifier.EndTable(); + circle::CombinerType combiner() const { + return static_cast(GetField(VT_COMBINER, 0)); } - IfOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(IfOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const IfOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_COMBINER) && + verifier.EndTable(); + } + EmbeddingLookupSparseOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(EmbeddingLookupSparseOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const EmbeddingLookupSparseOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct IfOptionsBuilder -{ - typedef IfOptions Table; +struct EmbeddingLookupSparseOptionsBuilder { + typedef EmbeddingLookupSparseOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_then_subgraph_index(int32_t then_subgraph_index) - { - fbb_.AddElement(IfOptions::VT_THEN_SUBGRAPH_INDEX, then_subgraph_index, 0); + void add_combiner(circle::CombinerType combiner) { + fbb_.AddElement(EmbeddingLookupSparseOptions::VT_COMBINER, static_cast(combiner), 0); } - void add_else_subgraph_index(int32_t else_subgraph_index) - { - fbb_.AddElement(IfOptions::VT_ELSE_SUBGRAPH_INDEX, else_subgraph_index, 0); - } - explicit IfOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit EmbeddingLookupSparseOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateIfOptions(flatbuffers::FlatBufferBuilder &_fbb, - int32_t then_subgraph_index = 0, - int32_t else_subgraph_index = 0) -{ - IfOptionsBuilder builder_(_fbb); - builder_.add_else_subgraph_index(else_subgraph_index); - builder_.add_then_subgraph_index(then_subgraph_index); +inline flatbuffers::Offset CreateEmbeddingLookupSparseOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::CombinerType combiner = circle::CombinerType_SUM) { + EmbeddingLookupSparseOptionsBuilder builder_(_fbb); + builder_.add_combiner(combiner); return builder_.Finish(); } -flatbuffers::Offset -CreateIfOptions(flatbuffers::FlatBufferBuilder &_fbb, const IfOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateEmbeddingLookupSparseOptions(flatbuffers::FlatBufferBuilder &_fbb, const EmbeddingLookupSparseOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct CallOnceOptionsT : public flatbuffers::NativeTable -{ - typedef CallOnceOptions TableType; - int32_t init_subgraph_index = 0; +struct GatherOptionsT : public flatbuffers::NativeTable { + typedef GatherOptions TableType; + int32_t axis = 0; + int32_t batch_dims = 0; }; -struct CallOnceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef CallOnceOptionsT NativeTableType; - typedef CallOnceOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_INIT_SUBGRAPH_INDEX = 4 +struct GatherOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GatherOptionsT NativeTableType; + typedef GatherOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_AXIS = 4, + VT_BATCH_DIMS = 6 }; - int32_t init_subgraph_index() const { return GetField(VT_INIT_SUBGRAPH_INDEX, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_INIT_SUBGRAPH_INDEX) && + int32_t axis() const { + return GetField(VT_AXIS, 0); + } + int32_t batch_dims() const { + return GetField(VT_BATCH_DIMS, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_AXIS) && + VerifyField(verifier, VT_BATCH_DIMS) && verifier.EndTable(); } - CallOnceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(CallOnceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const CallOnceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + GatherOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(GatherOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct CallOnceOptionsBuilder -{ - typedef CallOnceOptions Table; +struct GatherOptionsBuilder { + typedef GatherOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_init_subgraph_index(int32_t init_subgraph_index) - { - fbb_.AddElement(CallOnceOptions::VT_INIT_SUBGRAPH_INDEX, init_subgraph_index, 0); + void add_axis(int32_t axis) { + fbb_.AddElement(GatherOptions::VT_AXIS, axis, 0); + } + void add_batch_dims(int32_t batch_dims) { + fbb_.AddElement(GatherOptions::VT_BATCH_DIMS, batch_dims, 0); } - explicit CallOnceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit GatherOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateCallOnceOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t init_subgraph_index = 0) -{ - CallOnceOptionsBuilder builder_(_fbb); - builder_.add_init_subgraph_index(init_subgraph_index); +inline flatbuffers::Offset CreateGatherOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t axis = 0, + int32_t batch_dims = 0) { + GatherOptionsBuilder builder_(_fbb); + builder_.add_batch_dims(batch_dims); + builder_.add_axis(axis); return builder_.Finish(); } -flatbuffers::Offset -CreateCallOnceOptions(flatbuffers::FlatBufferBuilder &_fbb, const CallOnceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const GatherOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct WhileOptionsT : public flatbuffers::NativeTable -{ - typedef WhileOptions TableType; - int32_t cond_subgraph_index = 0; - int32_t body_subgraph_index = 0; +struct TransposeOptionsT : public flatbuffers::NativeTable { + typedef TransposeOptions TableType; }; -struct WhileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef WhileOptionsT NativeTableType; - typedef WhileOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_COND_SUBGRAPH_INDEX = 4, - VT_BODY_SUBGRAPH_INDEX = 6 - }; - int32_t cond_subgraph_index() const { return GetField(VT_COND_SUBGRAPH_INDEX, 0); } - int32_t body_subgraph_index() const { return GetField(VT_BODY_SUBGRAPH_INDEX, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_COND_SUBGRAPH_INDEX) && - VerifyField(verifier, VT_BODY_SUBGRAPH_INDEX) && verifier.EndTable(); +struct TransposeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TransposeOptionsT NativeTableType; + typedef TransposeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - WhileOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(WhileOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhileOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + TransposeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(TransposeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct WhileOptionsBuilder -{ - typedef WhileOptions Table; +struct TransposeOptionsBuilder { + typedef TransposeOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_cond_subgraph_index(int32_t cond_subgraph_index) - { - fbb_.AddElement(WhileOptions::VT_COND_SUBGRAPH_INDEX, cond_subgraph_index, 0); - } - void add_body_subgraph_index(int32_t body_subgraph_index) - { - fbb_.AddElement(WhileOptions::VT_BODY_SUBGRAPH_INDEX, body_subgraph_index, 0); - } - explicit WhileOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit TransposeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateWhileOptions(flatbuffers::FlatBufferBuilder &_fbb, - int32_t cond_subgraph_index = 0, - int32_t body_subgraph_index = 0) -{ - WhileOptionsBuilder builder_(_fbb); - builder_.add_body_subgraph_index(body_subgraph_index); - builder_.add_cond_subgraph_index(cond_subgraph_index); +inline flatbuffers::Offset CreateTransposeOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + TransposeOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateWhileOptions(flatbuffers::FlatBufferBuilder &_fbb, const WhileOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateTransposeOptions(flatbuffers::FlatBufferBuilder &_fbb, const TransposeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct NonMaxSuppressionV4OptionsT : public flatbuffers::NativeTable -{ - typedef NonMaxSuppressionV4Options TableType; +struct ExpOptionsT : public flatbuffers::NativeTable { + typedef ExpOptions TableType; }; -struct NonMaxSuppressionV4Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef NonMaxSuppressionV4OptionsT NativeTableType; - typedef NonMaxSuppressionV4OptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ExpOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ExpOptionsT NativeTableType; + typedef ExpOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - NonMaxSuppressionV4OptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(NonMaxSuppressionV4OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV4OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + ExpOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ExpOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct NonMaxSuppressionV4OptionsBuilder -{ - typedef NonMaxSuppressionV4Options Table; +struct ExpOptionsBuilder { + typedef ExpOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit NonMaxSuppressionV4OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit ExpOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateNonMaxSuppressionV4Options(flatbuffers::FlatBufferBuilder &_fbb) -{ - NonMaxSuppressionV4OptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateExpOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + ExpOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateNonMaxSuppressionV4Options(flatbuffers::FlatBufferBuilder &_fbb, - const NonMaxSuppressionV4OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateExpOptions(flatbuffers::FlatBufferBuilder &_fbb, const ExpOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct NonMaxSuppressionV5OptionsT : public flatbuffers::NativeTable -{ - typedef NonMaxSuppressionV5Options TableType; +struct CosOptionsT : public flatbuffers::NativeTable { + typedef CosOptions TableType; }; -struct NonMaxSuppressionV5Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef NonMaxSuppressionV5OptionsT NativeTableType; - typedef NonMaxSuppressionV5OptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct CosOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CosOptionsT NativeTableType; + typedef CosOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - NonMaxSuppressionV5OptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(NonMaxSuppressionV5OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV5OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + CosOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(CosOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const CosOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct NonMaxSuppressionV5OptionsBuilder -{ - typedef NonMaxSuppressionV5Options Table; +struct CosOptionsBuilder { + typedef CosOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit NonMaxSuppressionV5OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit CosOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateNonMaxSuppressionV5Options(flatbuffers::FlatBufferBuilder &_fbb) -{ - NonMaxSuppressionV5OptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateCosOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + CosOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateNonMaxSuppressionV5Options(flatbuffers::FlatBufferBuilder &_fbb, - const NonMaxSuppressionV5OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateCosOptions(flatbuffers::FlatBufferBuilder &_fbb, const CosOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct ScatterNdOptionsT : public flatbuffers::NativeTable -{ - typedef ScatterNdOptions TableType; +struct ReducerOptionsT : public flatbuffers::NativeTable { + typedef ReducerOptions TableType; + bool keep_dims = false; }; -struct ScatterNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ScatterNdOptionsT NativeTableType; - typedef ScatterNdOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ReducerOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReducerOptionsT NativeTableType; + typedef ReducerOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_KEEP_DIMS = 4 + }; + bool keep_dims() const { + return GetField(VT_KEEP_DIMS, 0) != 0; } - ScatterNdOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ScatterNdOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScatterNdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_KEEP_DIMS) && + verifier.EndTable(); + } + ReducerOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ReducerOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReducerOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct ScatterNdOptionsBuilder -{ - typedef ScatterNdOptions Table; +struct ReducerOptionsBuilder { + typedef ReducerOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit ScatterNdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_keep_dims(bool keep_dims) { + fbb_.AddElement(ReducerOptions::VT_KEEP_DIMS, static_cast(keep_dims), 0); + } + explicit ReducerOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateScatterNdOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - ScatterNdOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateReducerOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool keep_dims = false) { + ReducerOptionsBuilder builder_(_fbb); + builder_.add_keep_dims(keep_dims); return builder_.Finish(); } -flatbuffers::Offset -CreateScatterNdOptions(flatbuffers::FlatBufferBuilder &_fbb, const ScatterNdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateReducerOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReducerOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct SelectV2OptionsT : public flatbuffers::NativeTable -{ - typedef SelectV2Options TableType; +struct SqueezeOptionsT : public flatbuffers::NativeTable { + typedef SqueezeOptions TableType; + std::vector squeeze_dims{}; }; -struct SelectV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SelectV2OptionsT NativeTableType; - typedef SelectV2OptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SqueezeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SqueezeOptionsT NativeTableType; + typedef SqueezeOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SQUEEZE_DIMS = 4 + }; + const flatbuffers::Vector *squeeze_dims() const { + return GetPointer *>(VT_SQUEEZE_DIMS); } - SelectV2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SelectV2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SelectV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_SQUEEZE_DIMS) && + verifier.VerifyVector(squeeze_dims()) && + verifier.EndTable(); + } + SqueezeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SqueezeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SelectV2OptionsBuilder -{ - typedef SelectV2Options Table; +struct SqueezeOptionsBuilder { + typedef SqueezeOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit SelectV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_squeeze_dims(flatbuffers::Offset> squeeze_dims) { + fbb_.AddOffset(SqueezeOptions::VT_SQUEEZE_DIMS, squeeze_dims); + } + explicit SqueezeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateSelectV2Options(flatbuffers::FlatBufferBuilder &_fbb) -{ - SelectV2OptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSqueezeOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> squeeze_dims = 0) { + SqueezeOptionsBuilder builder_(_fbb); + builder_.add_squeeze_dims(squeeze_dims); return builder_.Finish(); } -flatbuffers::Offset -CreateSelectV2Options(flatbuffers::FlatBufferBuilder &_fbb, const SelectV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset CreateSqueezeOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *squeeze_dims = nullptr) { + auto squeeze_dims__ = squeeze_dims ? _fbb.CreateVector(*squeeze_dims) : 0; + return circle::CreateSqueezeOptions( + _fbb, + squeeze_dims__); +} -struct DensifyOptionsT : public flatbuffers::NativeTable -{ - typedef DensifyOptions TableType; +flatbuffers::Offset CreateSqueezeOptions(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct SplitOptionsT : public flatbuffers::NativeTable { + typedef SplitOptions TableType; + int32_t num_splits = 0; }; -struct DensifyOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef DensifyOptionsT NativeTableType; - typedef DensifyOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SplitOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SplitOptionsT NativeTableType; + typedef SplitOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM_SPLITS = 4 + }; + int32_t num_splits() const { + return GetField(VT_NUM_SPLITS, 0); } - DensifyOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(DensifyOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const DensifyOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_NUM_SPLITS) && + verifier.EndTable(); + } + SplitOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SplitOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SplitOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct DensifyOptionsBuilder -{ - typedef DensifyOptions Table; +struct SplitOptionsBuilder { + typedef SplitOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit DensifyOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_num_splits(int32_t num_splits) { + fbb_.AddElement(SplitOptions::VT_NUM_SPLITS, num_splits, 0); + } + explicit SplitOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateDensifyOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - DensifyOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSplitOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t num_splits = 0) { + SplitOptionsBuilder builder_(_fbb); + builder_.add_num_splits(num_splits); return builder_.Finish(); } -flatbuffers::Offset -CreateDensifyOptions(flatbuffers::FlatBufferBuilder &_fbb, const DensifyOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSplitOptions(flatbuffers::FlatBufferBuilder &_fbb, const SplitOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct SegmentSumOptionsT : public flatbuffers::NativeTable -{ - typedef SegmentSumOptions TableType; +struct SplitVOptionsT : public flatbuffers::NativeTable { + typedef SplitVOptions TableType; + int32_t num_splits = 0; }; -struct SegmentSumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SegmentSumOptionsT NativeTableType; - typedef SegmentSumOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SplitVOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SplitVOptionsT NativeTableType; + typedef SplitVOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM_SPLITS = 4 + }; + int32_t num_splits() const { + return GetField(VT_NUM_SPLITS, 0); } - SegmentSumOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SegmentSumOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SegmentSumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_NUM_SPLITS) && + verifier.EndTable(); + } + SplitVOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SplitVOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SplitVOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SegmentSumOptionsBuilder -{ - typedef SegmentSumOptions Table; +struct SplitVOptionsBuilder { + typedef SplitVOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit SegmentSumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_num_splits(int32_t num_splits) { + fbb_.AddElement(SplitVOptions::VT_NUM_SPLITS, num_splits, 0); + } + explicit SplitVOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - SegmentSumOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSplitVOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t num_splits = 0) { + SplitVOptionsBuilder builder_(_fbb); + builder_.add_num_splits(num_splits); return builder_.Finish(); } -flatbuffers::Offset -CreateSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb, const SegmentSumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSplitVOptions(flatbuffers::FlatBufferBuilder &_fbb, const SplitVOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct BatchMatMulOptionsT : public flatbuffers::NativeTable -{ - typedef BatchMatMulOptions TableType; - bool adjoint_lhs = false; - bool adjoint_rhs = false; - bool asymmetric_quantize_inputs = false; +struct StridedSliceOptionsT : public flatbuffers::NativeTable { + typedef StridedSliceOptions TableType; + int32_t begin_mask = 0; + int32_t end_mask = 0; + int32_t ellipsis_mask = 0; + int32_t new_axis_mask = 0; + int32_t shrink_axis_mask = 0; + bool offset = false; }; -struct BatchMatMulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BatchMatMulOptionsT NativeTableType; - typedef BatchMatMulOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_ADJOINT_LHS = 4, - VT_ADJOINT_RHS = 6, - VT_ASYMMETRIC_QUANTIZE_INPUTS = 8 +struct StridedSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StridedSliceOptionsT NativeTableType; + typedef StridedSliceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BEGIN_MASK = 4, + VT_END_MASK = 6, + VT_ELLIPSIS_MASK = 8, + VT_NEW_AXIS_MASK = 10, + VT_SHRINK_AXIS_MASK = 12, + VT_OFFSET = 14 }; - bool adjoint_lhs() const { return GetField(VT_ADJOINT_LHS, 0) != 0; } - bool adjoint_rhs() const { return GetField(VT_ADJOINT_RHS, 0) != 0; } - bool asymmetric_quantize_inputs() const - { - return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + int32_t begin_mask() const { + return GetField(VT_BEGIN_MASK, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_ADJOINT_LHS) && - VerifyField(verifier, VT_ADJOINT_RHS) && - VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && verifier.EndTable(); + int32_t end_mask() const { + return GetField(VT_END_MASK, 0); } - BatchMatMulOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BatchMatMulOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + int32_t ellipsis_mask() const { + return GetField(VT_ELLIPSIS_MASK, 0); + } + int32_t new_axis_mask() const { + return GetField(VT_NEW_AXIS_MASK, 0); + } + int32_t shrink_axis_mask() const { + return GetField(VT_SHRINK_AXIS_MASK, 0); + } + bool offset() const { + return GetField(VT_OFFSET, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_BEGIN_MASK) && + VerifyField(verifier, VT_END_MASK) && + VerifyField(verifier, VT_ELLIPSIS_MASK) && + VerifyField(verifier, VT_NEW_AXIS_MASK) && + VerifyField(verifier, VT_SHRINK_AXIS_MASK) && + VerifyField(verifier, VT_OFFSET) && + verifier.EndTable(); + } + StridedSliceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(StridedSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct BatchMatMulOptionsBuilder -{ - typedef BatchMatMulOptions Table; +struct StridedSliceOptionsBuilder { + typedef StridedSliceOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_adjoint_lhs(bool adjoint_lhs) - { - fbb_.AddElement(BatchMatMulOptions::VT_ADJOINT_LHS, static_cast(adjoint_lhs), - 0); - } - void add_adjoint_rhs(bool adjoint_rhs) - { - fbb_.AddElement(BatchMatMulOptions::VT_ADJOINT_RHS, static_cast(adjoint_rhs), - 0); - } - void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) - { - fbb_.AddElement(BatchMatMulOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, - static_cast(asymmetric_quantize_inputs), 0); - } - explicit BatchMatMulOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_begin_mask(int32_t begin_mask) { + fbb_.AddElement(StridedSliceOptions::VT_BEGIN_MASK, begin_mask, 0); + } + void add_end_mask(int32_t end_mask) { + fbb_.AddElement(StridedSliceOptions::VT_END_MASK, end_mask, 0); + } + void add_ellipsis_mask(int32_t ellipsis_mask) { + fbb_.AddElement(StridedSliceOptions::VT_ELLIPSIS_MASK, ellipsis_mask, 0); + } + void add_new_axis_mask(int32_t new_axis_mask) { + fbb_.AddElement(StridedSliceOptions::VT_NEW_AXIS_MASK, new_axis_mask, 0); + } + void add_shrink_axis_mask(int32_t shrink_axis_mask) { + fbb_.AddElement(StridedSliceOptions::VT_SHRINK_AXIS_MASK, shrink_axis_mask, 0); + } + void add_offset(bool offset) { + fbb_.AddElement(StridedSliceOptions::VT_OFFSET, static_cast(offset), 0); + } + explicit StridedSliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateBatchMatMulOptions(flatbuffers::FlatBufferBuilder &_fbb, bool adjoint_lhs = false, - bool adjoint_rhs = false, bool asymmetric_quantize_inputs = false) -{ - BatchMatMulOptionsBuilder builder_(_fbb); - builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); - builder_.add_adjoint_rhs(adjoint_rhs); - builder_.add_adjoint_lhs(adjoint_lhs); +inline flatbuffers::Offset CreateStridedSliceOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t begin_mask = 0, + int32_t end_mask = 0, + int32_t ellipsis_mask = 0, + int32_t new_axis_mask = 0, + int32_t shrink_axis_mask = 0, + bool offset = false) { + StridedSliceOptionsBuilder builder_(_fbb); + builder_.add_shrink_axis_mask(shrink_axis_mask); + builder_.add_new_axis_mask(new_axis_mask); + builder_.add_ellipsis_mask(ellipsis_mask); + builder_.add_end_mask(end_mask); + builder_.add_begin_mask(begin_mask); + builder_.add_offset(offset); return builder_.Finish(); } -flatbuffers::Offset -CreateBatchMatMulOptions(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateStridedSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct CumsumOptionsT : public flatbuffers::NativeTable -{ - typedef CumsumOptions TableType; - bool exclusive = false; - bool reverse = false; +struct LogSoftmaxOptionsT : public flatbuffers::NativeTable { + typedef LogSoftmaxOptions TableType; }; -struct CumsumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef CumsumOptionsT NativeTableType; - typedef CumsumOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_EXCLUSIVE = 4, - VT_REVERSE = 6 - }; - bool exclusive() const { return GetField(VT_EXCLUSIVE, 0) != 0; } - bool reverse() const { return GetField(VT_REVERSE, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_EXCLUSIVE) && - VerifyField(verifier, VT_REVERSE) && verifier.EndTable(); +struct LogSoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LogSoftmaxOptionsT NativeTableType; + typedef LogSoftmaxOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - CumsumOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(CumsumOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const CumsumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + LogSoftmaxOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LogSoftmaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogSoftmaxOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct CumsumOptionsBuilder -{ - typedef CumsumOptions Table; +struct LogSoftmaxOptionsBuilder { + typedef LogSoftmaxOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_exclusive(bool exclusive) - { - fbb_.AddElement(CumsumOptions::VT_EXCLUSIVE, static_cast(exclusive), 0); - } - void add_reverse(bool reverse) - { - fbb_.AddElement(CumsumOptions::VT_REVERSE, static_cast(reverse), 0); - } - explicit CumsumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit LogSoftmaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateCumsumOptions(flatbuffers::FlatBufferBuilder &_fbb, - bool exclusive = false, - bool reverse = false) -{ - CumsumOptionsBuilder builder_(_fbb); - builder_.add_reverse(reverse); - builder_.add_exclusive(exclusive); +inline flatbuffers::Offset CreateLogSoftmaxOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + LogSoftmaxOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateCumsumOptions(flatbuffers::FlatBufferBuilder &_fbb, const CumsumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateLogSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogSoftmaxOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct BroadcastToOptionsT : public flatbuffers::NativeTable -{ - typedef BroadcastToOptions TableType; +struct CastOptionsT : public flatbuffers::NativeTable { + typedef CastOptions TableType; + circle::TensorType in_data_type = circle::TensorType_FLOAT32; + circle::TensorType out_data_type = circle::TensorType_FLOAT32; }; -struct BroadcastToOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BroadcastToOptionsT NativeTableType; - typedef BroadcastToOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct CastOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CastOptionsT NativeTableType; + typedef CastOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IN_DATA_TYPE = 4, + VT_OUT_DATA_TYPE = 6 + }; + circle::TensorType in_data_type() const { + return static_cast(GetField(VT_IN_DATA_TYPE, 0)); } - BroadcastToOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BroadcastToOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BroadcastToOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + circle::TensorType out_data_type() const { + return static_cast(GetField(VT_OUT_DATA_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_IN_DATA_TYPE) && + VerifyField(verifier, VT_OUT_DATA_TYPE) && + verifier.EndTable(); + } + CastOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(CastOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const CastOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct BroadcastToOptionsBuilder -{ - typedef BroadcastToOptions Table; +struct CastOptionsBuilder { + typedef CastOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit BroadcastToOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_in_data_type(circle::TensorType in_data_type) { + fbb_.AddElement(CastOptions::VT_IN_DATA_TYPE, static_cast(in_data_type), 0); + } + void add_out_data_type(circle::TensorType out_data_type) { + fbb_.AddElement(CastOptions::VT_OUT_DATA_TYPE, static_cast(out_data_type), 0); + } + explicit CastOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateBroadcastToOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - BroadcastToOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateCastOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::TensorType in_data_type = circle::TensorType_FLOAT32, + circle::TensorType out_data_type = circle::TensorType_FLOAT32) { + CastOptionsBuilder builder_(_fbb); + builder_.add_out_data_type(out_data_type); + builder_.add_in_data_type(in_data_type); return builder_.Finish(); } -flatbuffers::Offset -CreateBroadcastToOptions(flatbuffers::FlatBufferBuilder &_fbb, const BroadcastToOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateCastOptions(flatbuffers::FlatBufferBuilder &_fbb, const CastOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct Rfft2dOptionsT : public flatbuffers::NativeTable -{ - typedef Rfft2dOptions TableType; +struct DequantizeOptionsT : public flatbuffers::NativeTable { + typedef DequantizeOptions TableType; }; -struct Rfft2dOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef Rfft2dOptionsT NativeTableType; - typedef Rfft2dOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct DequantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DequantizeOptionsT NativeTableType; + typedef DequantizeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - Rfft2dOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(Rfft2dOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const Rfft2dOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + DequantizeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(DequantizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct Rfft2dOptionsBuilder -{ - typedef Rfft2dOptions Table; +struct DequantizeOptionsBuilder { + typedef DequantizeOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit Rfft2dOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit DequantizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateRfft2dOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - Rfft2dOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateDequantizeOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + DequantizeOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateRfft2dOptions(flatbuffers::FlatBufferBuilder &_fbb, const Rfft2dOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateDequantizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct HashtableOptionsT : public flatbuffers::NativeTable -{ - typedef HashtableOptions TableType; - int32_t table_id = 0; - circle::TensorType key_dtype = circle::TensorType_FLOAT32; - circle::TensorType value_dtype = circle::TensorType_FLOAT32; +struct MaximumMinimumOptionsT : public flatbuffers::NativeTable { + typedef MaximumMinimumOptions TableType; }; -struct HashtableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef HashtableOptionsT NativeTableType; - typedef HashtableOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_TABLE_ID = 4, - VT_KEY_DTYPE = 6, - VT_VALUE_DTYPE = 8 - }; - int32_t table_id() const { return GetField(VT_TABLE_ID, 0); } - circle::TensorType key_dtype() const - { - return static_cast(GetField(VT_KEY_DTYPE, 0)); - } - circle::TensorType value_dtype() const - { - return static_cast(GetField(VT_VALUE_DTYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_TABLE_ID) && - VerifyField(verifier, VT_KEY_DTYPE) && - VerifyField(verifier, VT_VALUE_DTYPE) && verifier.EndTable(); +struct MaximumMinimumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MaximumMinimumOptionsT NativeTableType; + typedef MaximumMinimumOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - HashtableOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(HashtableOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + MaximumMinimumOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(MaximumMinimumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const MaximumMinimumOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct HashtableOptionsBuilder -{ - typedef HashtableOptions Table; +struct MaximumMinimumOptionsBuilder { + typedef MaximumMinimumOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_table_id(int32_t table_id) - { - fbb_.AddElement(HashtableOptions::VT_TABLE_ID, table_id, 0); - } - void add_key_dtype(circle::TensorType key_dtype) - { - fbb_.AddElement(HashtableOptions::VT_KEY_DTYPE, static_cast(key_dtype), 0); - } - void add_value_dtype(circle::TensorType value_dtype) - { - fbb_.AddElement(HashtableOptions::VT_VALUE_DTYPE, static_cast(value_dtype), 0); - } - explicit HashtableOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit MaximumMinimumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateHashtableOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t table_id = 0, - circle::TensorType key_dtype = circle::TensorType_FLOAT32, - circle::TensorType value_dtype = circle::TensorType_FLOAT32) -{ - HashtableOptionsBuilder builder_(_fbb); - builder_.add_table_id(table_id); - builder_.add_value_dtype(value_dtype); - builder_.add_key_dtype(key_dtype); +inline flatbuffers::Offset CreateMaximumMinimumOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + MaximumMinimumOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateHashtableOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateMaximumMinimumOptions(flatbuffers::FlatBufferBuilder &_fbb, const MaximumMinimumOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct HashtableFindOptionsT : public flatbuffers::NativeTable -{ - typedef HashtableFindOptions TableType; +struct TileOptionsT : public flatbuffers::NativeTable { + typedef TileOptions TableType; }; -struct HashtableFindOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef HashtableFindOptionsT NativeTableType; - typedef HashtableFindOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct TileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TileOptionsT NativeTableType; + typedef TileOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - HashtableFindOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(HashtableFindOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableFindOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + TileOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(TileOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const TileOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct HashtableFindOptionsBuilder -{ - typedef HashtableFindOptions Table; +struct TileOptionsBuilder { + typedef TileOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit HashtableFindOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit TileOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateHashtableFindOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - HashtableFindOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateTileOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + TileOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateHashtableFindOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableFindOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateTileOptions(flatbuffers::FlatBufferBuilder &_fbb, const TileOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct HashtableImportOptionsT : public flatbuffers::NativeTable -{ - typedef HashtableImportOptions TableType; +struct ArgMaxOptionsT : public flatbuffers::NativeTable { + typedef ArgMaxOptions TableType; + circle::TensorType output_type = circle::TensorType_FLOAT32; }; -struct HashtableImportOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef HashtableImportOptionsT NativeTableType; - typedef HashtableImportOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ArgMaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ArgMaxOptionsT NativeTableType; + typedef ArgMaxOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OUTPUT_TYPE = 4 + }; + circle::TensorType output_type() const { + return static_cast(GetField(VT_OUTPUT_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_OUTPUT_TYPE) && + verifier.EndTable(); } - HashtableImportOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(HashtableImportOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableImportOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + ArgMaxOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ArgMaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct HashtableImportOptionsBuilder -{ - typedef HashtableImportOptions Table; +struct ArgMaxOptionsBuilder { + typedef ArgMaxOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit HashtableImportOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_output_type(circle::TensorType output_type) { + fbb_.AddElement(ArgMaxOptions::VT_OUTPUT_TYPE, static_cast(output_type), 0); + } + explicit ArgMaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateHashtableImportOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - HashtableImportOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateArgMaxOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::TensorType output_type = circle::TensorType_FLOAT32) { + ArgMaxOptionsBuilder builder_(_fbb); + builder_.add_output_type(output_type); return builder_.Finish(); } -flatbuffers::Offset -CreateHashtableImportOptions(flatbuffers::FlatBufferBuilder &_fbb, - const HashtableImportOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateArgMaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct HashtableSizeOptionsT : public flatbuffers::NativeTable -{ - typedef HashtableSizeOptions TableType; +struct ArgMinOptionsT : public flatbuffers::NativeTable { + typedef ArgMinOptions TableType; + circle::TensorType output_type = circle::TensorType_FLOAT32; }; -struct HashtableSizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef HashtableSizeOptionsT NativeTableType; - typedef HashtableSizeOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ArgMinOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ArgMinOptionsT NativeTableType; + typedef ArgMinOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OUTPUT_TYPE = 4 + }; + circle::TensorType output_type() const { + return static_cast(GetField(VT_OUTPUT_TYPE, 0)); } - HashtableSizeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(HashtableSizeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableSizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_OUTPUT_TYPE) && + verifier.EndTable(); + } + ArgMinOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ArgMinOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMinOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct HashtableSizeOptionsBuilder -{ - typedef HashtableSizeOptions Table; +struct ArgMinOptionsBuilder { + typedef ArgMinOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit HashtableSizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_output_type(circle::TensorType output_type) { + fbb_.AddElement(ArgMinOptions::VT_OUTPUT_TYPE, static_cast(output_type), 0); + } + explicit ArgMinOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateHashtableSizeOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - HashtableSizeOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateArgMinOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::TensorType output_type = circle::TensorType_FLOAT32) { + ArgMinOptionsBuilder builder_(_fbb); + builder_.add_output_type(output_type); return builder_.Finish(); } -flatbuffers::Offset -CreateHashtableSizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableSizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateArgMinOptions(flatbuffers::FlatBufferBuilder &_fbb, const ArgMinOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct VarHandleOptionsT : public flatbuffers::NativeTable -{ - typedef VarHandleOptions TableType; - std::string container{}; - std::string shared_name{}; +struct GreaterOptionsT : public flatbuffers::NativeTable { + typedef GreaterOptions TableType; }; -struct VarHandleOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef VarHandleOptionsT NativeTableType; - typedef VarHandleOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_CONTAINER = 4, - VT_SHARED_NAME = 6 - }; - const flatbuffers::String *container() const - { - return GetPointer(VT_CONTAINER); - } - const flatbuffers::String *shared_name() const - { - return GetPointer(VT_SHARED_NAME); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_CONTAINER) && - verifier.VerifyString(container()) && VerifyOffset(verifier, VT_SHARED_NAME) && - verifier.VerifyString(shared_name()) && verifier.EndTable(); +struct GreaterOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GreaterOptionsT NativeTableType; + typedef GreaterOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - VarHandleOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(VarHandleOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const VarHandleOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + GreaterOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(GreaterOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const GreaterOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct VarHandleOptionsBuilder -{ - typedef VarHandleOptions Table; +struct GreaterOptionsBuilder { + typedef GreaterOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_container(flatbuffers::Offset container) - { - fbb_.AddOffset(VarHandleOptions::VT_CONTAINER, container); - } - void add_shared_name(flatbuffers::Offset shared_name) - { - fbb_.AddOffset(VarHandleOptions::VT_SHARED_NAME, shared_name); - } - explicit VarHandleOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit GreaterOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateVarHandleOptions(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset container = 0, - flatbuffers::Offset shared_name = 0) -{ - VarHandleOptionsBuilder builder_(_fbb); - builder_.add_shared_name(shared_name); - builder_.add_container(container); +inline flatbuffers::Offset CreateGreaterOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + GreaterOptionsBuilder builder_(_fbb); return builder_.Finish(); } -inline flatbuffers::Offset -CreateVarHandleOptionsDirect(flatbuffers::FlatBufferBuilder &_fbb, const char *container = nullptr, - const char *shared_name = nullptr) -{ - auto container__ = container ? _fbb.CreateString(container) : 0; - auto shared_name__ = shared_name ? _fbb.CreateString(shared_name) : 0; - return circle::CreateVarHandleOptions(_fbb, container__, shared_name__); -} - -flatbuffers::Offset -CreateVarHandleOptions(flatbuffers::FlatBufferBuilder &_fbb, const VarHandleOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateGreaterOptions(flatbuffers::FlatBufferBuilder &_fbb, const GreaterOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct ReadVariableOptionsT : public flatbuffers::NativeTable -{ - typedef ReadVariableOptions TableType; +struct GreaterEqualOptionsT : public flatbuffers::NativeTable { + typedef GreaterEqualOptions TableType; }; -struct ReadVariableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ReadVariableOptionsT NativeTableType; - typedef ReadVariableOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct GreaterEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GreaterEqualOptionsT NativeTableType; + typedef GreaterEqualOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - ReadVariableOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ReadVariableOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReadVariableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + GreaterEqualOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(GreaterEqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const GreaterEqualOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct ReadVariableOptionsBuilder -{ - typedef ReadVariableOptions Table; +struct GreaterEqualOptionsBuilder { + typedef GreaterEqualOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit ReadVariableOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit GreaterEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateReadVariableOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - ReadVariableOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateGreaterEqualOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + GreaterEqualOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateReadVariableOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReadVariableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateGreaterEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const GreaterEqualOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct AssignVariableOptionsT : public flatbuffers::NativeTable -{ - typedef AssignVariableOptions TableType; +struct LessOptionsT : public flatbuffers::NativeTable { + typedef LessOptions TableType; }; -struct AssignVariableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef AssignVariableOptionsT NativeTableType; - typedef AssignVariableOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct LessOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LessOptionsT NativeTableType; + typedef LessOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - AssignVariableOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(AssignVariableOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const AssignVariableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + LessOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LessOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LessOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct AssignVariableOptionsBuilder -{ - typedef AssignVariableOptions Table; +struct LessOptionsBuilder { + typedef LessOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit AssignVariableOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit LessOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateAssignVariableOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - AssignVariableOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateLessOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + LessOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateAssignVariableOptions(flatbuffers::FlatBufferBuilder &_fbb, const AssignVariableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateLessOptions(flatbuffers::FlatBufferBuilder &_fbb, const LessOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct RandomOptionsT : public flatbuffers::NativeTable -{ - typedef RandomOptions TableType; - int64_t seed = 0; - int64_t seed2 = 0; +struct LessEqualOptionsT : public flatbuffers::NativeTable { + typedef LessEqualOptions TableType; }; -struct RandomOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef RandomOptionsT NativeTableType; - typedef RandomOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_SEED = 4, - VT_SEED2 = 6 - }; - int64_t seed() const { return GetField(VT_SEED, 0); } - int64_t seed2() const { return GetField(VT_SEED2, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_SEED) && - VerifyField(verifier, VT_SEED2) && verifier.EndTable(); +struct LessEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LessEqualOptionsT NativeTableType; + typedef LessEqualOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - RandomOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(RandomOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const RandomOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + LessEqualOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LessEqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LessEqualOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct RandomOptionsBuilder -{ - typedef RandomOptions Table; +struct LessEqualOptionsBuilder { + typedef LessEqualOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_seed(int64_t seed) { fbb_.AddElement(RandomOptions::VT_SEED, seed, 0); } - void add_seed2(int64_t seed2) { fbb_.AddElement(RandomOptions::VT_SEED2, seed2, 0); } - explicit RandomOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit LessEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateRandomOptions(flatbuffers::FlatBufferBuilder &_fbb, - int64_t seed = 0, int64_t seed2 = 0) -{ - RandomOptionsBuilder builder_(_fbb); - builder_.add_seed2(seed2); - builder_.add_seed(seed); +inline flatbuffers::Offset CreateLessEqualOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + LessEqualOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateRandomOptions(flatbuffers::FlatBufferBuilder &_fbb, const RandomOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateLessEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const LessEqualOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct BucketizeOptionsT : public flatbuffers::NativeTable -{ - typedef BucketizeOptions TableType; - std::vector boundaries{}; +struct NegOptionsT : public flatbuffers::NativeTable { + typedef NegOptions TableType; }; -struct BucketizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BucketizeOptionsT NativeTableType; - typedef BucketizeOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_BOUNDARIES = 4 - }; - const flatbuffers::Vector *boundaries() const - { - return GetPointer *>(VT_BOUNDARIES); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_BOUNDARIES) && - verifier.VerifyVector(boundaries()) && verifier.EndTable(); +struct NegOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NegOptionsT NativeTableType; + typedef NegOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - BucketizeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BucketizeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BucketizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + NegOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(NegOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const NegOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct BucketizeOptionsBuilder -{ - typedef BucketizeOptions Table; +struct NegOptionsBuilder { + typedef NegOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_boundaries(flatbuffers::Offset> boundaries) - { - fbb_.AddOffset(BucketizeOptions::VT_BOUNDARIES, boundaries); - } - explicit BucketizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit NegOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateBucketizeOptions(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> boundaries = 0) -{ - BucketizeOptionsBuilder builder_(_fbb); - builder_.add_boundaries(boundaries); +inline flatbuffers::Offset CreateNegOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + NegOptionsBuilder builder_(_fbb); return builder_.Finish(); } -inline flatbuffers::Offset -CreateBucketizeOptionsDirect(flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *boundaries = nullptr) -{ - auto boundaries__ = boundaries ? _fbb.CreateVector(*boundaries) : 0; - return circle::CreateBucketizeOptions(_fbb, boundaries__); -} - -flatbuffers::Offset -CreateBucketizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const BucketizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateNegOptions(flatbuffers::FlatBufferBuilder &_fbb, const NegOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct GeluOptionsT : public flatbuffers::NativeTable -{ - typedef GeluOptions TableType; - bool approximate = false; +struct SelectOptionsT : public flatbuffers::NativeTable { + typedef SelectOptions TableType; }; -struct GeluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef GeluOptionsT NativeTableType; - typedef GeluOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_APPROXIMATE = 4 - }; - bool approximate() const { return GetField(VT_APPROXIMATE, 0) != 0; } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_APPROXIMATE) && +struct SelectOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SelectOptionsT NativeTableType; + typedef SelectOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && verifier.EndTable(); } - GeluOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(GeluOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const GeluOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + SelectOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SelectOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SelectOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct GeluOptionsBuilder -{ - typedef GeluOptions Table; +struct SelectOptionsBuilder { + typedef SelectOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_approximate(bool approximate) - { - fbb_.AddElement(GeluOptions::VT_APPROXIMATE, static_cast(approximate), 0); - } - explicit GeluOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit SelectOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateGeluOptions(flatbuffers::FlatBufferBuilder &_fbb, - bool approximate = false) -{ - GeluOptionsBuilder builder_(_fbb); - builder_.add_approximate(approximate); +inline flatbuffers::Offset CreateSelectOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + SelectOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateGeluOptions(flatbuffers::FlatBufferBuilder &_fbb, const GeluOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSelectOptions(flatbuffers::FlatBufferBuilder &_fbb, const SelectOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct DynamicUpdateSliceOptionsT : public flatbuffers::NativeTable -{ - typedef DynamicUpdateSliceOptions TableType; +struct SliceOptionsT : public flatbuffers::NativeTable { + typedef SliceOptions TableType; }; -struct DynamicUpdateSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef DynamicUpdateSliceOptionsT NativeTableType; - typedef DynamicUpdateSliceOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SliceOptionsT NativeTableType; + typedef SliceOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - DynamicUpdateSliceOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(DynamicUpdateSliceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const DynamicUpdateSliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + SliceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct DynamicUpdateSliceOptionsBuilder -{ - typedef DynamicUpdateSliceOptions Table; +struct SliceOptionsBuilder { + typedef SliceOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit DynamicUpdateSliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit SliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateDynamicUpdateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - DynamicUpdateSliceOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSliceOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + SliceOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateDynamicUpdateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, - const DynamicUpdateSliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); - -struct UnsortedSegmentProdOptionsT : public flatbuffers::NativeTable -{ - typedef UnsortedSegmentProdOptions TableType; -}; +flatbuffers::Offset CreateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const SliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct UnsortedSegmentProdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef UnsortedSegmentProdOptionsT NativeTableType; - typedef UnsortedSegmentProdOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); - } - UnsortedSegmentProdOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(UnsortedSegmentProdOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentProdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +struct TransposeConvOptionsT : public flatbuffers::NativeTable { + typedef TransposeConvOptions TableType; + circle::Padding padding = circle::Padding_SAME; + int32_t stride_w = 0; + int32_t stride_h = 0; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + circle::TensorType quantized_bias_type = circle::TensorType_FLOAT32; }; -struct UnsortedSegmentProdOptionsBuilder -{ - typedef UnsortedSegmentProdOptions Table; +struct TransposeConvOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TransposeConvOptionsT NativeTableType; + typedef TransposeConvOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PADDING = 4, + VT_STRIDE_W = 6, + VT_STRIDE_H = 8, + VT_FUSED_ACTIVATION_FUNCTION = 10, + VT_QUANTIZED_BIAS_TYPE = 12 + }; + circle::Padding padding() const { + return static_cast(GetField(VT_PADDING, 0)); + } + int32_t stride_w() const { + return GetField(VT_STRIDE_W, 0); + } + int32_t stride_h() const { + return GetField(VT_STRIDE_H, 0); + } + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + circle::TensorType quantized_bias_type() const { + return static_cast(GetField(VT_QUANTIZED_BIAS_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PADDING) && + VerifyField(verifier, VT_STRIDE_W) && + VerifyField(verifier, VT_STRIDE_H) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_QUANTIZED_BIAS_TYPE) && + verifier.EndTable(); + } + TransposeConvOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(TransposeConvOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeConvOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct TransposeConvOptionsBuilder { + typedef TransposeConvOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit UnsortedSegmentProdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_padding(circle::Padding padding) { + fbb_.AddElement(TransposeConvOptions::VT_PADDING, static_cast(padding), 0); + } + void add_stride_w(int32_t stride_w) { + fbb_.AddElement(TransposeConvOptions::VT_STRIDE_W, stride_w, 0); + } + void add_stride_h(int32_t stride_h) { + fbb_.AddElement(TransposeConvOptions::VT_STRIDE_H, stride_h, 0); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(TransposeConvOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_quantized_bias_type(circle::TensorType quantized_bias_type) { + fbb_.AddElement(TransposeConvOptions::VT_QUANTIZED_BIAS_TYPE, static_cast(quantized_bias_type), 0); + } + explicit TransposeConvOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateUnsortedSegmentProdOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - UnsortedSegmentProdOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateTransposeConvOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::Padding padding = circle::Padding_SAME, + int32_t stride_w = 0, + int32_t stride_h = 0, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + circle::TensorType quantized_bias_type = circle::TensorType_FLOAT32) { + TransposeConvOptionsBuilder builder_(_fbb); + builder_.add_stride_h(stride_h); + builder_.add_stride_w(stride_w); + builder_.add_quantized_bias_type(quantized_bias_type); + builder_.add_fused_activation_function(fused_activation_function); + builder_.add_padding(padding); return builder_.Finish(); } -flatbuffers::Offset -CreateUnsortedSegmentProdOptions(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentProdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateTransposeConvOptions(flatbuffers::FlatBufferBuilder &_fbb, const TransposeConvOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct UnsortedSegmentMaxOptionsT : public flatbuffers::NativeTable -{ - typedef UnsortedSegmentMaxOptions TableType; +struct ExpandDimsOptionsT : public flatbuffers::NativeTable { + typedef ExpandDimsOptions TableType; }; -struct UnsortedSegmentMaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef UnsortedSegmentMaxOptionsT NativeTableType; - typedef UnsortedSegmentMaxOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ExpandDimsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ExpandDimsOptionsT NativeTableType; + typedef ExpandDimsOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - UnsortedSegmentMaxOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(UnsortedSegmentMaxOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + ExpandDimsOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ExpandDimsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct UnsortedSegmentMaxOptionsBuilder -{ - typedef UnsortedSegmentMaxOptions Table; +struct ExpandDimsOptionsBuilder { + typedef ExpandDimsOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit UnsortedSegmentMaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit ExpandDimsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateUnsortedSegmentMaxOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - UnsortedSegmentMaxOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateExpandDimsOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + ExpandDimsOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateUnsortedSegmentMaxOptions(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentMaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateExpandDimsOptions(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct UnsortedSegmentSumOptionsT : public flatbuffers::NativeTable -{ - typedef UnsortedSegmentSumOptions TableType; +struct SparseToDenseOptionsT : public flatbuffers::NativeTable { + typedef SparseToDenseOptions TableType; + bool validate_indices = false; }; -struct UnsortedSegmentSumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef UnsortedSegmentSumOptionsT NativeTableType; - typedef UnsortedSegmentSumOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct SparseToDenseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SparseToDenseOptionsT NativeTableType; + typedef SparseToDenseOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALIDATE_INDICES = 4 + }; + bool validate_indices() const { + return GetField(VT_VALIDATE_INDICES, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_VALIDATE_INDICES) && + verifier.EndTable(); } - UnsortedSegmentSumOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(UnsortedSegmentSumOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentSumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + SparseToDenseOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SparseToDenseOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparseToDenseOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct UnsortedSegmentSumOptionsBuilder -{ - typedef UnsortedSegmentSumOptions Table; +struct SparseToDenseOptionsBuilder { + typedef SparseToDenseOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit UnsortedSegmentSumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_validate_indices(bool validate_indices) { + fbb_.AddElement(SparseToDenseOptions::VT_VALIDATE_INDICES, static_cast(validate_indices), 0); + } + explicit SparseToDenseOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateUnsortedSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - UnsortedSegmentSumOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateSparseToDenseOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool validate_indices = false) { + SparseToDenseOptionsBuilder builder_(_fbb); + builder_.add_validate_indices(validate_indices); return builder_.Finish(); } -flatbuffers::Offset -CreateUnsortedSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentSumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateSparseToDenseOptions(flatbuffers::FlatBufferBuilder &_fbb, const SparseToDenseOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct ATan2OptionsT : public flatbuffers::NativeTable -{ - typedef ATan2Options TableType; +struct EqualOptionsT : public flatbuffers::NativeTable { + typedef EqualOptions TableType; }; -struct ATan2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ATan2OptionsT NativeTableType; - typedef ATan2OptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct EqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EqualOptionsT NativeTableType; + typedef EqualOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - ATan2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ATan2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ATan2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + EqualOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(EqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const EqualOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct ATan2OptionsBuilder -{ - typedef ATan2Options Table; +struct EqualOptionsBuilder { + typedef EqualOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit ATan2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit EqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateATan2Options(flatbuffers::FlatBufferBuilder &_fbb) -{ - ATan2OptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateEqualOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + EqualOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateATan2Options(flatbuffers::FlatBufferBuilder &_fbb, const ATan2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const EqualOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct UnsortedSegmentMinOptionsT : public flatbuffers::NativeTable -{ - typedef UnsortedSegmentMinOptions TableType; +struct NotEqualOptionsT : public flatbuffers::NativeTable { + typedef NotEqualOptions TableType; }; -struct UnsortedSegmentMinOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef UnsortedSegmentMinOptionsT NativeTableType; - typedef UnsortedSegmentMinOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct NotEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NotEqualOptionsT NativeTableType; + typedef NotEqualOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - UnsortedSegmentMinOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(UnsortedSegmentMinOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMinOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + NotEqualOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(NotEqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const NotEqualOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct UnsortedSegmentMinOptionsBuilder -{ - typedef UnsortedSegmentMinOptions Table; +struct NotEqualOptionsBuilder { + typedef NotEqualOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit UnsortedSegmentMinOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit NotEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateUnsortedSegmentMinOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - UnsortedSegmentMinOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateNotEqualOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + NotEqualOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateUnsortedSegmentMinOptions(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentMinOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateNotEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const NotEqualOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct SignOptionsT : public flatbuffers::NativeTable -{ - typedef SignOptions TableType; +struct ShapeOptionsT : public flatbuffers::NativeTable { + typedef ShapeOptions TableType; + circle::TensorType out_type = circle::TensorType_FLOAT32; }; -struct SignOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SignOptionsT NativeTableType; - typedef SignOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct ShapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ShapeOptionsT NativeTableType; + typedef ShapeOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OUT_TYPE = 4 + }; + circle::TensorType out_type() const { + return static_cast(GetField(VT_OUT_TYPE, 0)); } - SignOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SignOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SignOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_OUT_TYPE) && + verifier.EndTable(); + } + ShapeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ShapeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ShapeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SignOptionsBuilder -{ - typedef SignOptions Table; +struct ShapeOptionsBuilder { + typedef ShapeOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit SignOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_out_type(circle::TensorType out_type) { + fbb_.AddElement(ShapeOptions::VT_OUT_TYPE, static_cast(out_type), 0); + } + explicit ShapeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateSignOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - SignOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateShapeOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::TensorType out_type = circle::TensorType_FLOAT32) { + ShapeOptionsBuilder builder_(_fbb); + builder_.add_out_type(out_type); return builder_.Finish(); } -flatbuffers::Offset -CreateSignOptions(flatbuffers::FlatBufferBuilder &_fbb, const SignOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateShapeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ShapeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct BitcastOptionsT : public flatbuffers::NativeTable -{ - typedef BitcastOptions TableType; +struct RankOptionsT : public flatbuffers::NativeTable { + typedef RankOptions TableType; }; -struct BitcastOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BitcastOptionsT NativeTableType; - typedef BitcastOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct RankOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RankOptionsT NativeTableType; + typedef RankOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - BitcastOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BitcastOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BitcastOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + RankOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(RankOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const RankOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct BitcastOptionsBuilder -{ - typedef BitcastOptions Table; +struct RankOptionsBuilder { + typedef RankOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit BitcastOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit RankOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateBitcastOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - BitcastOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateRankOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + RankOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateBitcastOptions(flatbuffers::FlatBufferBuilder &_fbb, const BitcastOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateRankOptions(flatbuffers::FlatBufferBuilder &_fbb, const RankOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct BitwiseXorOptionsT : public flatbuffers::NativeTable -{ - typedef BitwiseXorOptions TableType; +struct PowOptionsT : public flatbuffers::NativeTable { + typedef PowOptions TableType; }; -struct BitwiseXorOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BitwiseXorOptionsT NativeTableType; - typedef BitwiseXorOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct PowOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PowOptionsT NativeTableType; + typedef PowOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); } - BitwiseXorOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BitwiseXorOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BitwiseXorOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + PowOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(PowOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const PowOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct BitwiseXorOptionsBuilder -{ - typedef BitwiseXorOptions Table; +struct PowOptionsBuilder { + typedef PowOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit BitwiseXorOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit PowOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateBitwiseXorOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - BitwiseXorOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreatePowOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + PowOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateBitwiseXorOptions(flatbuffers::FlatBufferBuilder &_fbb, const BitwiseXorOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreatePowOptions(flatbuffers::FlatBufferBuilder &_fbb, const PowOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct RightShiftOptionsT : public flatbuffers::NativeTable -{ - typedef RightShiftOptions TableType; +struct FakeQuantOptionsT : public flatbuffers::NativeTable { + typedef FakeQuantOptions TableType; + float min = 0.0f; + float max = 0.0f; + int32_t num_bits = 0; + bool narrow_range = false; }; -struct RightShiftOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef RightShiftOptionsT NativeTableType; - typedef RightShiftOptionsBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && verifier.EndTable(); +struct FakeQuantOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FakeQuantOptionsT NativeTableType; + typedef FakeQuantOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MIN = 4, + VT_MAX = 6, + VT_NUM_BITS = 8, + VT_NARROW_RANGE = 10 + }; + float min() const { + return GetField(VT_MIN, 0.0f); } - RightShiftOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(RightShiftOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const RightShiftOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + float max() const { + return GetField(VT_MAX, 0.0f); + } + int32_t num_bits() const { + return GetField(VT_NUM_BITS, 0); + } + bool narrow_range() const { + return GetField(VT_NARROW_RANGE, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_MIN) && + VerifyField(verifier, VT_MAX) && + VerifyField(verifier, VT_NUM_BITS) && + VerifyField(verifier, VT_NARROW_RANGE) && + verifier.EndTable(); + } + FakeQuantOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(FakeQuantOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const FakeQuantOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct RightShiftOptionsBuilder -{ - typedef RightShiftOptions Table; +struct FakeQuantOptionsBuilder { + typedef FakeQuantOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - explicit RightShiftOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + void add_min(float min) { + fbb_.AddElement(FakeQuantOptions::VT_MIN, min, 0.0f); + } + void add_max(float max) { + fbb_.AddElement(FakeQuantOptions::VT_MAX, max, 0.0f); + } + void add_num_bits(int32_t num_bits) { + fbb_.AddElement(FakeQuantOptions::VT_NUM_BITS, num_bits, 0); + } + void add_narrow_range(bool narrow_range) { + fbb_.AddElement(FakeQuantOptions::VT_NARROW_RANGE, static_cast(narrow_range), 0); + } + explicit FakeQuantOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateRightShiftOptions(flatbuffers::FlatBufferBuilder &_fbb) -{ - RightShiftOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreateFakeQuantOptions( + flatbuffers::FlatBufferBuilder &_fbb, + float min = 0.0f, + float max = 0.0f, + int32_t num_bits = 0, + bool narrow_range = false) { + FakeQuantOptionsBuilder builder_(_fbb); + builder_.add_num_bits(num_bits); + builder_.add_max(max); + builder_.add_min(min); + builder_.add_narrow_range(narrow_range); return builder_.Finish(); } -flatbuffers::Offset -CreateRightShiftOptions(flatbuffers::FlatBufferBuilder &_fbb, const RightShiftOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateFakeQuantOptions(flatbuffers::FlatBufferBuilder &_fbb, const FakeQuantOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct BCQGatherOptionsT : public flatbuffers::NativeTable -{ - typedef BCQGatherOptions TableType; - int32_t input_hidden_size = 0; +struct PackOptionsT : public flatbuffers::NativeTable { + typedef PackOptions TableType; + int32_t values_count = 0; int32_t axis = 0; }; -struct BCQGatherOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BCQGatherOptionsT NativeTableType; - typedef BCQGatherOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_INPUT_HIDDEN_SIZE = 4, +struct PackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PackOptionsT NativeTableType; + typedef PackOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALUES_COUNT = 4, VT_AXIS = 6 }; - int32_t input_hidden_size() const { return GetField(VT_INPUT_HIDDEN_SIZE, 0); } - int32_t axis() const { return GetField(VT_AXIS, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_INPUT_HIDDEN_SIZE) && - VerifyField(verifier, VT_AXIS) && verifier.EndTable(); + int32_t values_count() const { + return GetField(VT_VALUES_COUNT, 0); } - BCQGatherOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BCQGatherOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BCQGatherOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + int32_t axis() const { + return GetField(VT_AXIS, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_VALUES_COUNT) && + VerifyField(verifier, VT_AXIS) && + verifier.EndTable(); + } + PackOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(PackOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const PackOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct BCQGatherOptionsBuilder -{ - typedef BCQGatherOptions Table; +struct PackOptionsBuilder { + typedef PackOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_input_hidden_size(int32_t input_hidden_size) - { - fbb_.AddElement(BCQGatherOptions::VT_INPUT_HIDDEN_SIZE, input_hidden_size, 0); + void add_values_count(int32_t values_count) { + fbb_.AddElement(PackOptions::VT_VALUES_COUNT, values_count, 0); + } + void add_axis(int32_t axis) { + fbb_.AddElement(PackOptions::VT_AXIS, axis, 0); } - void add_axis(int32_t axis) { fbb_.AddElement(BCQGatherOptions::VT_AXIS, axis, 0); } - explicit BCQGatherOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit PackOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateBCQGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, int32_t input_hidden_size = 0, - int32_t axis = 0) -{ - BCQGatherOptionsBuilder builder_(_fbb); +inline flatbuffers::Offset CreatePackOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t values_count = 0, + int32_t axis = 0) { + PackOptionsBuilder builder_(_fbb); builder_.add_axis(axis); - builder_.add_input_hidden_size(input_hidden_size); + builder_.add_values_count(values_count); return builder_.Finish(); } -flatbuffers::Offset -CreateBCQGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const BCQGatherOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreatePackOptions(flatbuffers::FlatBufferBuilder &_fbb, const PackOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct BCQFullyConnectedOptionsT : public flatbuffers::NativeTable -{ - typedef BCQFullyConnectedOptions TableType; - int32_t weights_hidden_size = 0; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; +struct LogicalOrOptionsT : public flatbuffers::NativeTable { + typedef LogicalOrOptions TableType; }; -struct BCQFullyConnectedOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BCQFullyConnectedOptionsT NativeTableType; - typedef BCQFullyConnectedOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_WEIGHTS_HIDDEN_SIZE = 4, - VT_FUSED_ACTIVATION_FUNCTION = 6 - }; - int32_t weights_hidden_size() const { return GetField(VT_WEIGHTS_HIDDEN_SIZE, 0); } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_WEIGHTS_HIDDEN_SIZE) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && verifier.EndTable(); - } - BCQFullyConnectedOptionsT * - UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BCQFullyConnectedOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BCQFullyConnectedOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; - -struct BCQFullyConnectedOptionsBuilder -{ - typedef BCQFullyConnectedOptions Table; +struct LogicalOrOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LogicalOrOptionsT NativeTableType; + typedef LogicalOrOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + LogicalOrOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LogicalOrOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalOrOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct LogicalOrOptionsBuilder { + typedef LogicalOrOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_weights_hidden_size(int32_t weights_hidden_size) - { - fbb_.AddElement(BCQFullyConnectedOptions::VT_WEIGHTS_HIDDEN_SIZE, weights_hidden_size, - 0); - } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(BCQFullyConnectedOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); - } - explicit BCQFullyConnectedOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit LogicalOrOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateBCQFullyConnectedOptions( - flatbuffers::FlatBufferBuilder &_fbb, int32_t weights_hidden_size = 0, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) -{ - BCQFullyConnectedOptionsBuilder builder_(_fbb); - builder_.add_weights_hidden_size(weights_hidden_size); - builder_.add_fused_activation_function(fused_activation_function); +inline flatbuffers::Offset CreateLogicalOrOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + LogicalOrOptionsBuilder builder_(_fbb); return builder_.Finish(); } -flatbuffers::Offset -CreateBCQFullyConnectedOptions(flatbuffers::FlatBufferBuilder &_fbb, - const BCQFullyConnectedOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateLogicalOrOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalOrOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct InstanceNormOptionsT : public flatbuffers::NativeTable -{ - typedef InstanceNormOptions TableType; - float epsilon = 0.0f; - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; +struct OneHotOptionsT : public flatbuffers::NativeTable { + typedef OneHotOptions TableType; + int32_t axis = 0; }; -struct InstanceNormOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef InstanceNormOptionsT NativeTableType; - typedef InstanceNormOptionsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_EPSILON = 4, - VT_FUSED_ACTIVATION_FUNCTION = 6 +struct OneHotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OneHotOptionsT NativeTableType; + typedef OneHotOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_AXIS = 4 }; - float epsilon() const { return GetField(VT_EPSILON, 0.0f); } - circle::ActivationFunctionType fused_activation_function() const - { - return static_cast( - GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + int32_t axis() const { + return GetField(VT_AXIS, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_EPSILON) && - VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && verifier.EndTable(); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_AXIS) && + verifier.EndTable(); } - InstanceNormOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(InstanceNormOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const InstanceNormOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + OneHotOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(OneHotOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const OneHotOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct InstanceNormOptionsBuilder -{ - typedef InstanceNormOptions Table; +struct OneHotOptionsBuilder { + typedef OneHotOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_epsilon(float epsilon) - { - fbb_.AddElement(InstanceNormOptions::VT_EPSILON, epsilon, 0.0f); - } - void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) - { - fbb_.AddElement(InstanceNormOptions::VT_FUSED_ACTIVATION_FUNCTION, - static_cast(fused_activation_function), 0); + void add_axis(int32_t axis) { + fbb_.AddElement(OneHotOptions::VT_AXIS, axis, 0); } - explicit InstanceNormOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit OneHotOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateInstanceNormOptions( - flatbuffers::FlatBufferBuilder &_fbb, float epsilon = 0.0f, - circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) -{ - InstanceNormOptionsBuilder builder_(_fbb); - builder_.add_epsilon(epsilon); - builder_.add_fused_activation_function(fused_activation_function); +inline flatbuffers::Offset CreateOneHotOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t axis = 0) { + OneHotOptionsBuilder builder_(_fbb); + builder_.add_axis(axis); return builder_.Finish(); } -flatbuffers::Offset -CreateInstanceNormOptions(flatbuffers::FlatBufferBuilder &_fbb, const InstanceNormOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateOneHotOptions(flatbuffers::FlatBufferBuilder &_fbb, const OneHotOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct OperatorCodeT : public flatbuffers::NativeTable -{ - typedef OperatorCode TableType; - int8_t deprecated_builtin_code = 0; - std::string custom_code{}; - int32_t version = 1; - circle::BuiltinOperator builtin_code = circle::BuiltinOperator_ADD; +struct AbsOptionsT : public flatbuffers::NativeTable { + typedef AbsOptions TableType; }; -struct OperatorCode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef OperatorCodeT NativeTableType; - typedef OperatorCodeBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_DEPRECATED_BUILTIN_CODE = 4, - VT_CUSTOM_CODE = 6, - VT_VERSION = 8, - VT_BUILTIN_CODE = 10 - }; - int8_t deprecated_builtin_code() const { return GetField(VT_DEPRECATED_BUILTIN_CODE, 0); } - const flatbuffers::String *custom_code() const - { - return GetPointer(VT_CUSTOM_CODE); - } - int32_t version() const { return GetField(VT_VERSION, 1); } - circle::BuiltinOperator builtin_code() const - { - return static_cast(GetField(VT_BUILTIN_CODE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const - { +struct AbsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AbsOptionsT NativeTableType; + typedef AbsOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && - VerifyField(verifier, VT_DEPRECATED_BUILTIN_CODE) && - VerifyOffset(verifier, VT_CUSTOM_CODE) && verifier.VerifyString(custom_code()) && - VerifyField(verifier, VT_VERSION) && - VerifyField(verifier, VT_BUILTIN_CODE) && verifier.EndTable(); + verifier.EndTable(); } - OperatorCodeT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(OperatorCodeT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const OperatorCodeT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + AbsOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(AbsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const AbsOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct OperatorCodeBuilder -{ - typedef OperatorCode Table; +struct AbsOptionsBuilder { + typedef AbsOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_deprecated_builtin_code(int8_t deprecated_builtin_code) - { - fbb_.AddElement(OperatorCode::VT_DEPRECATED_BUILTIN_CODE, deprecated_builtin_code, 0); - } - void add_custom_code(flatbuffers::Offset custom_code) - { - fbb_.AddOffset(OperatorCode::VT_CUSTOM_CODE, custom_code); - } - void add_version(int32_t version) - { - fbb_.AddElement(OperatorCode::VT_VERSION, version, 1); - } - void add_builtin_code(circle::BuiltinOperator builtin_code) - { - fbb_.AddElement(OperatorCode::VT_BUILTIN_CODE, static_cast(builtin_code), 0); - } - explicit OperatorCodeBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit AbsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateOperatorCode(flatbuffers::FlatBufferBuilder &_fbb, int8_t deprecated_builtin_code = 0, - flatbuffers::Offset custom_code = 0, int32_t version = 1, - circle::BuiltinOperator builtin_code = circle::BuiltinOperator_ADD) -{ - OperatorCodeBuilder builder_(_fbb); - builder_.add_builtin_code(builtin_code); - builder_.add_version(version); - builder_.add_custom_code(custom_code); - builder_.add_deprecated_builtin_code(deprecated_builtin_code); +inline flatbuffers::Offset CreateAbsOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + AbsOptionsBuilder builder_(_fbb); return builder_.Finish(); } -inline flatbuffers::Offset -CreateOperatorCodeDirect(flatbuffers::FlatBufferBuilder &_fbb, int8_t deprecated_builtin_code = 0, - const char *custom_code = nullptr, int32_t version = 1, - circle::BuiltinOperator builtin_code = circle::BuiltinOperator_ADD) -{ - auto custom_code__ = custom_code ? _fbb.CreateString(custom_code) : 0; - return circle::CreateOperatorCode(_fbb, deprecated_builtin_code, custom_code__, version, - builtin_code); -} - -flatbuffers::Offset -CreateOperatorCode(flatbuffers::FlatBufferBuilder &_fbb, const OperatorCodeT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateAbsOptions(flatbuffers::FlatBufferBuilder &_fbb, const AbsOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct OperatorT : public flatbuffers::NativeTable -{ - typedef Operator TableType; - uint32_t opcode_index = 0; - std::vector inputs{}; - std::vector outputs{}; - circle::BuiltinOptionsUnion builtin_options{}; - std::vector custom_options{}; - circle::CustomOptionsFormat custom_options_format = circle::CustomOptionsFormat_FLEXBUFFERS; - std::vector mutating_variable_inputs{}; - std::vector intermediates{}; +struct HardSwishOptionsT : public flatbuffers::NativeTable { + typedef HardSwishOptions TableType; }; -struct Operator FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef OperatorT NativeTableType; - typedef OperatorBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_OPCODE_INDEX = 4, - VT_INPUTS = 6, - VT_OUTPUTS = 8, - VT_BUILTIN_OPTIONS_TYPE = 10, - VT_BUILTIN_OPTIONS = 12, - VT_CUSTOM_OPTIONS = 14, - VT_CUSTOM_OPTIONS_FORMAT = 16, - VT_MUTATING_VARIABLE_INPUTS = 18, - VT_INTERMEDIATES = 20 - }; - uint32_t opcode_index() const { return GetField(VT_OPCODE_INDEX, 0); } - const flatbuffers::Vector *inputs() const - { - return GetPointer *>(VT_INPUTS); - } - const flatbuffers::Vector *outputs() const - { - return GetPointer *>(VT_OUTPUTS); - } - circle::BuiltinOptions builtin_options_type() const - { - return static_cast(GetField(VT_BUILTIN_OPTIONS_TYPE, 0)); - } - const void *builtin_options() const { return GetPointer(VT_BUILTIN_OPTIONS); } - template const T *builtin_options_as() const; - const circle::Conv2DOptions *builtin_options_as_Conv2DOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_Conv2DOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::DepthwiseConv2DOptions *builtin_options_as_DepthwiseConv2DOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_DepthwiseConv2DOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ConcatEmbeddingsOptions *builtin_options_as_ConcatEmbeddingsOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ConcatEmbeddingsOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LSHProjectionOptions *builtin_options_as_LSHProjectionOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LSHProjectionOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::Pool2DOptions *builtin_options_as_Pool2DOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_Pool2DOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SVDFOptions *builtin_options_as_SVDFOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SVDFOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::RNNOptions *builtin_options_as_RNNOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_RNNOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::FullyConnectedOptions *builtin_options_as_FullyConnectedOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_FullyConnectedOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SoftmaxOptions *builtin_options_as_SoftmaxOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SoftmaxOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ConcatenationOptions *builtin_options_as_ConcatenationOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ConcatenationOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::AddOptions *builtin_options_as_AddOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_AddOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::L2NormOptions *builtin_options_as_L2NormOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_L2NormOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LocalResponseNormalizationOptions * - builtin_options_as_LocalResponseNormalizationOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LocalResponseNormalizationOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LSTMOptions *builtin_options_as_LSTMOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LSTMOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ResizeBilinearOptions *builtin_options_as_ResizeBilinearOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ResizeBilinearOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::CallOptions *builtin_options_as_CallOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_CallOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ReshapeOptions *builtin_options_as_ReshapeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ReshapeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SkipGramOptions *builtin_options_as_SkipGramOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SkipGramOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SpaceToDepthOptions *builtin_options_as_SpaceToDepthOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SpaceToDepthOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::EmbeddingLookupSparseOptions * - builtin_options_as_EmbeddingLookupSparseOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_EmbeddingLookupSparseOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::MulOptions *builtin_options_as_MulOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_MulOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::PadOptions *builtin_options_as_PadOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_PadOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::GatherOptions *builtin_options_as_GatherOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_GatherOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BatchToSpaceNDOptions *builtin_options_as_BatchToSpaceNDOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BatchToSpaceNDOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SpaceToBatchNDOptions *builtin_options_as_SpaceToBatchNDOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SpaceToBatchNDOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::TransposeOptions *builtin_options_as_TransposeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_TransposeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ReducerOptions *builtin_options_as_ReducerOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ReducerOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SubOptions *builtin_options_as_SubOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SubOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::DivOptions *builtin_options_as_DivOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_DivOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SqueezeOptions *builtin_options_as_SqueezeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SqueezeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SequenceRNNOptions *builtin_options_as_SequenceRNNOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SequenceRNNOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::StridedSliceOptions *builtin_options_as_StridedSliceOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_StridedSliceOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ExpOptions *builtin_options_as_ExpOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ExpOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::TopKV2Options *builtin_options_as_TopKV2Options() const - { - return builtin_options_type() == circle::BuiltinOptions_TopKV2Options - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SplitOptions *builtin_options_as_SplitOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SplitOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LogSoftmaxOptions *builtin_options_as_LogSoftmaxOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LogSoftmaxOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::CastOptions *builtin_options_as_CastOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_CastOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::DequantizeOptions *builtin_options_as_DequantizeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_DequantizeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::MaximumMinimumOptions *builtin_options_as_MaximumMinimumOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_MaximumMinimumOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ArgMaxOptions *builtin_options_as_ArgMaxOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ArgMaxOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LessOptions *builtin_options_as_LessOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LessOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::NegOptions *builtin_options_as_NegOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_NegOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::PadV2Options *builtin_options_as_PadV2Options() const - { - return builtin_options_type() == circle::BuiltinOptions_PadV2Options - ? static_cast(builtin_options()) - : nullptr; - } - const circle::GreaterOptions *builtin_options_as_GreaterOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_GreaterOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::GreaterEqualOptions *builtin_options_as_GreaterEqualOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_GreaterEqualOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LessEqualOptions *builtin_options_as_LessEqualOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LessEqualOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SelectOptions *builtin_options_as_SelectOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SelectOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SliceOptions *builtin_options_as_SliceOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SliceOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::TransposeConvOptions *builtin_options_as_TransposeConvOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_TransposeConvOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SparseToDenseOptions *builtin_options_as_SparseToDenseOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SparseToDenseOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::TileOptions *builtin_options_as_TileOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_TileOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ExpandDimsOptions *builtin_options_as_ExpandDimsOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ExpandDimsOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::EqualOptions *builtin_options_as_EqualOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_EqualOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::NotEqualOptions *builtin_options_as_NotEqualOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_NotEqualOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ShapeOptions *builtin_options_as_ShapeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ShapeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::PowOptions *builtin_options_as_PowOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_PowOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ArgMinOptions *builtin_options_as_ArgMinOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ArgMinOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::FakeQuantOptions *builtin_options_as_FakeQuantOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_FakeQuantOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::PackOptions *builtin_options_as_PackOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_PackOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LogicalOrOptions *builtin_options_as_LogicalOrOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LogicalOrOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::OneHotOptions *builtin_options_as_OneHotOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_OneHotOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LogicalAndOptions *builtin_options_as_LogicalAndOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LogicalAndOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LogicalNotOptions *builtin_options_as_LogicalNotOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LogicalNotOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::UnpackOptions *builtin_options_as_UnpackOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_UnpackOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::FloorDivOptions *builtin_options_as_FloorDivOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_FloorDivOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SquareOptions *builtin_options_as_SquareOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SquareOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ZerosLikeOptions *builtin_options_as_ZerosLikeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ZerosLikeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::FillOptions *builtin_options_as_FillOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_FillOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BidirectionalSequenceLSTMOptions * - builtin_options_as_BidirectionalSequenceLSTMOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BidirectionalSequenceLSTMOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BidirectionalSequenceRNNOptions * - builtin_options_as_BidirectionalSequenceRNNOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BidirectionalSequenceRNNOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::UnidirectionalSequenceLSTMOptions * - builtin_options_as_UnidirectionalSequenceLSTMOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_UnidirectionalSequenceLSTMOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::FloorModOptions *builtin_options_as_FloorModOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_FloorModOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::RangeOptions *builtin_options_as_RangeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_RangeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ResizeNearestNeighborOptions * - builtin_options_as_ResizeNearestNeighborOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ResizeNearestNeighborOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::LeakyReluOptions *builtin_options_as_LeakyReluOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_LeakyReluOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SquaredDifferenceOptions *builtin_options_as_SquaredDifferenceOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SquaredDifferenceOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::MirrorPadOptions *builtin_options_as_MirrorPadOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_MirrorPadOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::AbsOptions *builtin_options_as_AbsOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_AbsOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SplitVOptions *builtin_options_as_SplitVOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SplitVOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::UniqueOptions *builtin_options_as_UniqueOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_UniqueOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ReverseV2Options *builtin_options_as_ReverseV2Options() const - { - return builtin_options_type() == circle::BuiltinOptions_ReverseV2Options - ? static_cast(builtin_options()) - : nullptr; - } - const circle::AddNOptions *builtin_options_as_AddNOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_AddNOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::GatherNdOptions *builtin_options_as_GatherNdOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_GatherNdOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::CosOptions *builtin_options_as_CosOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_CosOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::WhereOptions *builtin_options_as_WhereOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_WhereOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::RankOptions *builtin_options_as_RankOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_RankOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ReverseSequenceOptions *builtin_options_as_ReverseSequenceOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ReverseSequenceOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::MatrixDiagOptions *builtin_options_as_MatrixDiagOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_MatrixDiagOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::QuantizeOptions *builtin_options_as_QuantizeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_QuantizeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::MatrixSetDiagOptions *builtin_options_as_MatrixSetDiagOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_MatrixSetDiagOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::HardSwishOptions *builtin_options_as_HardSwishOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_HardSwishOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::IfOptions *builtin_options_as_IfOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_IfOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::WhileOptions *builtin_options_as_WhileOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_WhileOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::DepthToSpaceOptions *builtin_options_as_DepthToSpaceOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_DepthToSpaceOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::NonMaxSuppressionV4Options *builtin_options_as_NonMaxSuppressionV4Options() const - { - return builtin_options_type() == circle::BuiltinOptions_NonMaxSuppressionV4Options - ? static_cast(builtin_options()) - : nullptr; - } - const circle::NonMaxSuppressionV5Options *builtin_options_as_NonMaxSuppressionV5Options() const - { - return builtin_options_type() == circle::BuiltinOptions_NonMaxSuppressionV5Options - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ScatterNdOptions *builtin_options_as_ScatterNdOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ScatterNdOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SelectV2Options *builtin_options_as_SelectV2Options() const - { - return builtin_options_type() == circle::BuiltinOptions_SelectV2Options - ? static_cast(builtin_options()) - : nullptr; - } - const circle::DensifyOptions *builtin_options_as_DensifyOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_DensifyOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SegmentSumOptions *builtin_options_as_SegmentSumOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SegmentSumOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BatchMatMulOptions *builtin_options_as_BatchMatMulOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BatchMatMulOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::CumsumOptions *builtin_options_as_CumsumOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_CumsumOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::CallOnceOptions *builtin_options_as_CallOnceOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_CallOnceOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BroadcastToOptions *builtin_options_as_BroadcastToOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BroadcastToOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::Rfft2dOptions *builtin_options_as_Rfft2dOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_Rfft2dOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::Conv3DOptions *builtin_options_as_Conv3DOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_Conv3DOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::HashtableOptions *builtin_options_as_HashtableOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_HashtableOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::HashtableFindOptions *builtin_options_as_HashtableFindOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_HashtableFindOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::HashtableImportOptions *builtin_options_as_HashtableImportOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_HashtableImportOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::HashtableSizeOptions *builtin_options_as_HashtableSizeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_HashtableSizeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::VarHandleOptions *builtin_options_as_VarHandleOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_VarHandleOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ReadVariableOptions *builtin_options_as_ReadVariableOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_ReadVariableOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::AssignVariableOptions *builtin_options_as_AssignVariableOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_AssignVariableOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::RandomOptions *builtin_options_as_RandomOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_RandomOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BucketizeOptions *builtin_options_as_BucketizeOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BucketizeOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::GeluOptions *builtin_options_as_GeluOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_GeluOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::DynamicUpdateSliceOptions *builtin_options_as_DynamicUpdateSliceOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_DynamicUpdateSliceOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::UnsortedSegmentProdOptions *builtin_options_as_UnsortedSegmentProdOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_UnsortedSegmentProdOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::UnsortedSegmentMaxOptions *builtin_options_as_UnsortedSegmentMaxOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_UnsortedSegmentMaxOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::UnsortedSegmentMinOptions *builtin_options_as_UnsortedSegmentMinOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_UnsortedSegmentMinOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::UnsortedSegmentSumOptions *builtin_options_as_UnsortedSegmentSumOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_UnsortedSegmentSumOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::ATan2Options *builtin_options_as_ATan2Options() const - { - return builtin_options_type() == circle::BuiltinOptions_ATan2Options - ? static_cast(builtin_options()) - : nullptr; - } - const circle::SignOptions *builtin_options_as_SignOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_SignOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BitcastOptions *builtin_options_as_BitcastOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BitcastOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BitwiseXorOptions *builtin_options_as_BitwiseXorOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BitwiseXorOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::RightShiftOptions *builtin_options_as_RightShiftOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_RightShiftOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BCQGatherOptions *builtin_options_as_BCQGatherOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BCQGatherOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::BCQFullyConnectedOptions *builtin_options_as_BCQFullyConnectedOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_BCQFullyConnectedOptions - ? static_cast(builtin_options()) - : nullptr; - } - const circle::InstanceNormOptions *builtin_options_as_InstanceNormOptions() const - { - return builtin_options_type() == circle::BuiltinOptions_InstanceNormOptions - ? static_cast(builtin_options()) - : nullptr; - } - const flatbuffers::Vector *custom_options() const - { - return GetPointer *>(VT_CUSTOM_OPTIONS); - } - circle::CustomOptionsFormat custom_options_format() const - { - return static_cast(GetField(VT_CUSTOM_OPTIONS_FORMAT, 0)); - } - const flatbuffers::Vector *mutating_variable_inputs() const - { - return GetPointer *>(VT_MUTATING_VARIABLE_INPUTS); - } - const flatbuffers::Vector *intermediates() const - { - return GetPointer *>(VT_INTERMEDIATES); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_OPCODE_INDEX) && - VerifyOffset(verifier, VT_INPUTS) && verifier.VerifyVector(inputs()) && - VerifyOffset(verifier, VT_OUTPUTS) && verifier.VerifyVector(outputs()) && - VerifyField(verifier, VT_BUILTIN_OPTIONS_TYPE) && - VerifyOffset(verifier, VT_BUILTIN_OPTIONS) && - VerifyBuiltinOptions(verifier, builtin_options(), builtin_options_type()) && - VerifyOffset(verifier, VT_CUSTOM_OPTIONS) && verifier.VerifyVector(custom_options()) && - VerifyField(verifier, VT_CUSTOM_OPTIONS_FORMAT) && - VerifyOffset(verifier, VT_MUTATING_VARIABLE_INPUTS) && - verifier.VerifyVector(mutating_variable_inputs()) && - VerifyOffset(verifier, VT_INTERMEDIATES) && verifier.VerifyVector(intermediates()) && +struct HardSwishOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HardSwishOptionsT NativeTableType; + typedef HardSwishOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && verifier.EndTable(); } - OperatorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(OperatorT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const OperatorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + HardSwishOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(HardSwishOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const HardSwishOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -template <> -inline const circle::Conv2DOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_Conv2DOptions(); -} - -template <> -inline const circle::DepthwiseConv2DOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_DepthwiseConv2DOptions(); -} +struct HardSwishOptionsBuilder { + typedef HardSwishOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HardSwishOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::ConcatEmbeddingsOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_ConcatEmbeddingsOptions(); +inline flatbuffers::Offset CreateHardSwishOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + HardSwishOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::LSHProjectionOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_LSHProjectionOptions(); -} +flatbuffers::Offset CreateHardSwishOptions(flatbuffers::FlatBufferBuilder &_fbb, const HardSwishOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::Pool2DOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_Pool2DOptions(); -} +struct LogicalAndOptionsT : public flatbuffers::NativeTable { + typedef LogicalAndOptions TableType; +}; -template <> -inline const circle::SVDFOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SVDFOptions(); -} +struct LogicalAndOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LogicalAndOptionsT NativeTableType; + typedef LogicalAndOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + LogicalAndOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LogicalAndOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalAndOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::RNNOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_RNNOptions(); -} +struct LogicalAndOptionsBuilder { + typedef LogicalAndOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit LogicalAndOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::FullyConnectedOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_FullyConnectedOptions(); +inline flatbuffers::Offset CreateLogicalAndOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + LogicalAndOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::SoftmaxOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SoftmaxOptions(); -} +flatbuffers::Offset CreateLogicalAndOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalAndOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::ConcatenationOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_ConcatenationOptions(); -} +struct LogicalNotOptionsT : public flatbuffers::NativeTable { + typedef LogicalNotOptions TableType; +}; -template <> -inline const circle::AddOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_AddOptions(); -} +struct LogicalNotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LogicalNotOptionsT NativeTableType; + typedef LogicalNotOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + LogicalNotOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LogicalNotOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalNotOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::L2NormOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_L2NormOptions(); -} +struct LogicalNotOptionsBuilder { + typedef LogicalNotOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit LogicalNotOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::LocalResponseNormalizationOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_LocalResponseNormalizationOptions(); +inline flatbuffers::Offset CreateLogicalNotOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + LogicalNotOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::LSTMOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_LSTMOptions(); -} +flatbuffers::Offset CreateLogicalNotOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalNotOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::ResizeBilinearOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_ResizeBilinearOptions(); -} +struct UnpackOptionsT : public flatbuffers::NativeTable { + typedef UnpackOptions TableType; + int32_t num = 0; + int32_t axis = 0; +}; -template <> -inline const circle::CallOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_CallOptions(); -} +struct UnpackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnpackOptionsT NativeTableType; + typedef UnpackOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM = 4, + VT_AXIS = 6 + }; + int32_t num() const { + return GetField(VT_NUM, 0); + } + int32_t axis() const { + return GetField(VT_AXIS, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_NUM) && + VerifyField(verifier, VT_AXIS) && + verifier.EndTable(); + } + UnpackOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(UnpackOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnpackOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::ReshapeOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_ReshapeOptions(); -} +struct UnpackOptionsBuilder { + typedef UnpackOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_num(int32_t num) { + fbb_.AddElement(UnpackOptions::VT_NUM, num, 0); + } + void add_axis(int32_t axis) { + fbb_.AddElement(UnpackOptions::VT_AXIS, axis, 0); + } + explicit UnpackOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::SkipGramOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SkipGramOptions(); +inline flatbuffers::Offset CreateUnpackOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t num = 0, + int32_t axis = 0) { + UnpackOptionsBuilder builder_(_fbb); + builder_.add_axis(axis); + builder_.add_num(num); + return builder_.Finish(); } -template <> -inline const circle::SpaceToDepthOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_SpaceToDepthOptions(); -} +flatbuffers::Offset CreateUnpackOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnpackOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::EmbeddingLookupSparseOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_EmbeddingLookupSparseOptions(); -} +struct FloorDivOptionsT : public flatbuffers::NativeTable { + typedef FloorDivOptions TableType; +}; -template <> -inline const circle::MulOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_MulOptions(); -} +struct FloorDivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FloorDivOptionsT NativeTableType; + typedef FloorDivOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + FloorDivOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(FloorDivOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const FloorDivOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::PadOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_PadOptions(); -} - -template <> -inline const circle::GatherOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_GatherOptions(); -} - -template <> -inline const circle::BatchToSpaceNDOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_BatchToSpaceNDOptions(); -} +struct FloorDivOptionsBuilder { + typedef FloorDivOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit FloorDivOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::SpaceToBatchNDOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_SpaceToBatchNDOptions(); +inline flatbuffers::Offset CreateFloorDivOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + FloorDivOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::TransposeOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_TransposeOptions(); -} +flatbuffers::Offset CreateFloorDivOptions(flatbuffers::FlatBufferBuilder &_fbb, const FloorDivOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::ReducerOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_ReducerOptions(); -} +struct SquareOptionsT : public flatbuffers::NativeTable { + typedef SquareOptions TableType; +}; -template <> -inline const circle::SubOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SubOptions(); -} +struct SquareOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SquareOptionsT NativeTableType; + typedef SquareOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + SquareOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SquareOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SquareOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::DivOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_DivOptions(); -} +struct SquareOptionsBuilder { + typedef SquareOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SquareOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::SqueezeOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SqueezeOptions(); +inline flatbuffers::Offset CreateSquareOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + SquareOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::SequenceRNNOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_SequenceRNNOptions(); -} +flatbuffers::Offset CreateSquareOptions(flatbuffers::FlatBufferBuilder &_fbb, const SquareOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::StridedSliceOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_StridedSliceOptions(); -} +struct ZerosLikeOptionsT : public flatbuffers::NativeTable { + typedef ZerosLikeOptions TableType; +}; -template <> -inline const circle::ExpOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_ExpOptions(); -} +struct ZerosLikeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ZerosLikeOptionsT NativeTableType; + typedef ZerosLikeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + ZerosLikeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ZerosLikeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::TopKV2Options *Operator::builtin_options_as() const -{ - return builtin_options_as_TopKV2Options(); -} +struct ZerosLikeOptionsBuilder { + typedef ZerosLikeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ZerosLikeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::SplitOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SplitOptions(); +inline flatbuffers::Offset CreateZerosLikeOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + ZerosLikeOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::LogSoftmaxOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_LogSoftmaxOptions(); -} +flatbuffers::Offset CreateZerosLikeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::CastOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_CastOptions(); -} +struct FillOptionsT : public flatbuffers::NativeTable { + typedef FillOptions TableType; +}; -template <> -inline const circle::DequantizeOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_DequantizeOptions(); -} +struct FillOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FillOptionsT NativeTableType; + typedef FillOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + FillOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(FillOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const FillOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::MaximumMinimumOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_MaximumMinimumOptions(); -} +struct FillOptionsBuilder { + typedef FillOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit FillOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::ArgMaxOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_ArgMaxOptions(); +inline flatbuffers::Offset CreateFillOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + FillOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::LessOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_LessOptions(); -} +flatbuffers::Offset CreateFillOptions(flatbuffers::FlatBufferBuilder &_fbb, const FillOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::NegOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_NegOptions(); -} +struct FloorModOptionsT : public flatbuffers::NativeTable { + typedef FloorModOptions TableType; +}; -template <> -inline const circle::PadV2Options *Operator::builtin_options_as() const -{ - return builtin_options_as_PadV2Options(); -} +struct FloorModOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FloorModOptionsT NativeTableType; + typedef FloorModOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + FloorModOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(FloorModOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const FloorModOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::GreaterOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_GreaterOptions(); -} +struct FloorModOptionsBuilder { + typedef FloorModOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit FloorModOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::GreaterEqualOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_GreaterEqualOptions(); +inline flatbuffers::Offset CreateFloorModOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + FloorModOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::LessEqualOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_LessEqualOptions(); -} +flatbuffers::Offset CreateFloorModOptions(flatbuffers::FlatBufferBuilder &_fbb, const FloorModOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::SelectOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SelectOptions(); -} +struct RangeOptionsT : public flatbuffers::NativeTable { + typedef RangeOptions TableType; +}; -template <> -inline const circle::SliceOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SliceOptions(); -} +struct RangeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RangeOptionsT NativeTableType; + typedef RangeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + RangeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(RangeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const RangeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::TransposeConvOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_TransposeConvOptions(); -} +struct RangeOptionsBuilder { + typedef RangeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit RangeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::SparseToDenseOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_SparseToDenseOptions(); +inline flatbuffers::Offset CreateRangeOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + RangeOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::TileOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_TileOptions(); -} +flatbuffers::Offset CreateRangeOptions(flatbuffers::FlatBufferBuilder &_fbb, const RangeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::ExpandDimsOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_ExpandDimsOptions(); -} +struct LeakyReluOptionsT : public flatbuffers::NativeTable { + typedef LeakyReluOptions TableType; + float alpha = 0.0f; +}; -template <> -inline const circle::EqualOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_EqualOptions(); -} +struct LeakyReluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LeakyReluOptionsT NativeTableType; + typedef LeakyReluOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ALPHA = 4 + }; + float alpha() const { + return GetField(VT_ALPHA, 0.0f); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ALPHA) && + verifier.EndTable(); + } + LeakyReluOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(LeakyReluOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LeakyReluOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::NotEqualOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_NotEqualOptions(); -} +struct LeakyReluOptionsBuilder { + typedef LeakyReluOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_alpha(float alpha) { + fbb_.AddElement(LeakyReluOptions::VT_ALPHA, alpha, 0.0f); + } + explicit LeakyReluOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::ShapeOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_ShapeOptions(); +inline flatbuffers::Offset CreateLeakyReluOptions( + flatbuffers::FlatBufferBuilder &_fbb, + float alpha = 0.0f) { + LeakyReluOptionsBuilder builder_(_fbb); + builder_.add_alpha(alpha); + return builder_.Finish(); } -template <> -inline const circle::PowOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_PowOptions(); -} +flatbuffers::Offset CreateLeakyReluOptions(flatbuffers::FlatBufferBuilder &_fbb, const LeakyReluOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::ArgMinOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_ArgMinOptions(); -} +struct SquaredDifferenceOptionsT : public flatbuffers::NativeTable { + typedef SquaredDifferenceOptions TableType; +}; -template <> -inline const circle::FakeQuantOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_FakeQuantOptions(); -} +struct SquaredDifferenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SquaredDifferenceOptionsT NativeTableType; + typedef SquaredDifferenceOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + SquaredDifferenceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SquaredDifferenceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SquaredDifferenceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::PackOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_PackOptions(); -} +struct SquaredDifferenceOptionsBuilder { + typedef SquaredDifferenceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SquaredDifferenceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::LogicalOrOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_LogicalOrOptions(); +inline flatbuffers::Offset CreateSquaredDifferenceOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + SquaredDifferenceOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::OneHotOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_OneHotOptions(); -} +flatbuffers::Offset CreateSquaredDifferenceOptions(flatbuffers::FlatBufferBuilder &_fbb, const SquaredDifferenceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::LogicalAndOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_LogicalAndOptions(); -} +struct MirrorPadOptionsT : public flatbuffers::NativeTable { + typedef MirrorPadOptions TableType; + circle::MirrorPadMode mode = circle::MirrorPadMode_REFLECT; +}; -template <> -inline const circle::LogicalNotOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_LogicalNotOptions(); -} +struct MirrorPadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MirrorPadOptionsT NativeTableType; + typedef MirrorPadOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MODE = 4 + }; + circle::MirrorPadMode mode() const { + return static_cast(GetField(VT_MODE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_MODE) && + verifier.EndTable(); + } + MirrorPadOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(MirrorPadOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const MirrorPadOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::UnpackOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_UnpackOptions(); -} - -template <> -inline const circle::FloorDivOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_FloorDivOptions(); -} +struct MirrorPadOptionsBuilder { + typedef MirrorPadOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_mode(circle::MirrorPadMode mode) { + fbb_.AddElement(MirrorPadOptions::VT_MODE, static_cast(mode), 0); + } + explicit MirrorPadOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::SquareOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SquareOptions(); +inline flatbuffers::Offset CreateMirrorPadOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::MirrorPadMode mode = circle::MirrorPadMode_REFLECT) { + MirrorPadOptionsBuilder builder_(_fbb); + builder_.add_mode(mode); + return builder_.Finish(); } -template <> -inline const circle::ZerosLikeOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_ZerosLikeOptions(); -} +flatbuffers::Offset CreateMirrorPadOptions(flatbuffers::FlatBufferBuilder &_fbb, const MirrorPadOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::FillOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_FillOptions(); -} +struct UniqueOptionsT : public flatbuffers::NativeTable { + typedef UniqueOptions TableType; + circle::TensorType idx_out_type = circle::TensorType_INT32; +}; -template <> -inline const circle::BidirectionalSequenceLSTMOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_BidirectionalSequenceLSTMOptions(); -} +struct UniqueOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UniqueOptionsT NativeTableType; + typedef UniqueOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IDX_OUT_TYPE = 4 + }; + circle::TensorType idx_out_type() const { + return static_cast(GetField(VT_IDX_OUT_TYPE, 2)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_IDX_OUT_TYPE) && + verifier.EndTable(); + } + UniqueOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(UniqueOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const UniqueOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::BidirectionalSequenceRNNOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_BidirectionalSequenceRNNOptions(); -} +struct UniqueOptionsBuilder { + typedef UniqueOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_idx_out_type(circle::TensorType idx_out_type) { + fbb_.AddElement(UniqueOptions::VT_IDX_OUT_TYPE, static_cast(idx_out_type), 2); + } + explicit UniqueOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::UnidirectionalSequenceLSTMOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_UnidirectionalSequenceLSTMOptions(); +inline flatbuffers::Offset CreateUniqueOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::TensorType idx_out_type = circle::TensorType_INT32) { + UniqueOptionsBuilder builder_(_fbb); + builder_.add_idx_out_type(idx_out_type); + return builder_.Finish(); } -template <> -inline const circle::FloorModOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_FloorModOptions(); -} +flatbuffers::Offset CreateUniqueOptions(flatbuffers::FlatBufferBuilder &_fbb, const UniqueOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::RangeOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_RangeOptions(); -} +struct ReverseV2OptionsT : public flatbuffers::NativeTable { + typedef ReverseV2Options TableType; +}; -template <> -inline const circle::ResizeNearestNeighborOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_ResizeNearestNeighborOptions(); -} +struct ReverseV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReverseV2OptionsT NativeTableType; + typedef ReverseV2OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + ReverseV2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ReverseV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReverseV2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::LeakyReluOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_LeakyReluOptions(); -} +struct ReverseV2OptionsBuilder { + typedef ReverseV2Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ReverseV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::SquaredDifferenceOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_SquaredDifferenceOptions(); +inline flatbuffers::Offset CreateReverseV2Options( + flatbuffers::FlatBufferBuilder &_fbb) { + ReverseV2OptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::MirrorPadOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_MirrorPadOptions(); -} +flatbuffers::Offset CreateReverseV2Options(flatbuffers::FlatBufferBuilder &_fbb, const ReverseV2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::AbsOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_AbsOptions(); -} +struct AddNOptionsT : public flatbuffers::NativeTable { + typedef AddNOptions TableType; +}; -template <> -inline const circle::SplitVOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SplitVOptions(); -} +struct AddNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AddNOptionsT NativeTableType; + typedef AddNOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + AddNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(AddNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const AddNOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::UniqueOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_UniqueOptions(); -} +struct AddNOptionsBuilder { + typedef AddNOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit AddNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::ReverseV2Options * -Operator::builtin_options_as() const -{ - return builtin_options_as_ReverseV2Options(); +inline flatbuffers::Offset CreateAddNOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + AddNOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::AddNOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_AddNOptions(); -} +flatbuffers::Offset CreateAddNOptions(flatbuffers::FlatBufferBuilder &_fbb, const AddNOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::GatherNdOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_GatherNdOptions(); -} +struct GatherNdOptionsT : public flatbuffers::NativeTable { + typedef GatherNdOptions TableType; +}; -template <> -inline const circle::CosOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_CosOptions(); -} +struct GatherNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GatherNdOptionsT NativeTableType; + typedef GatherNdOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + GatherNdOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(GatherNdOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherNdOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::WhereOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_WhereOptions(); -} +struct GatherNdOptionsBuilder { + typedef GatherNdOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit GatherNdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::RankOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_RankOptions(); +inline flatbuffers::Offset CreateGatherNdOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + GatherNdOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::ReverseSequenceOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_ReverseSequenceOptions(); -} +flatbuffers::Offset CreateGatherNdOptions(flatbuffers::FlatBufferBuilder &_fbb, const GatherNdOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::MatrixDiagOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_MatrixDiagOptions(); -} +struct WhereOptionsT : public flatbuffers::NativeTable { + typedef WhereOptions TableType; +}; -template <> -inline const circle::QuantizeOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_QuantizeOptions(); -} +struct WhereOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef WhereOptionsT NativeTableType; + typedef WhereOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + WhereOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(WhereOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhereOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::MatrixSetDiagOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_MatrixSetDiagOptions(); -} +struct WhereOptionsBuilder { + typedef WhereOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit WhereOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::HardSwishOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_HardSwishOptions(); +inline flatbuffers::Offset CreateWhereOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + WhereOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> inline const circle::IfOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_IfOptions(); -} +flatbuffers::Offset CreateWhereOptions(flatbuffers::FlatBufferBuilder &_fbb, const WhereOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::WhileOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_WhileOptions(); -} +struct ReverseSequenceOptionsT : public flatbuffers::NativeTable { + typedef ReverseSequenceOptions TableType; + int32_t seq_dim = 0; + int32_t batch_dim = 0; +}; -template <> -inline const circle::DepthToSpaceOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_DepthToSpaceOptions(); -} +struct ReverseSequenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReverseSequenceOptionsT NativeTableType; + typedef ReverseSequenceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SEQ_DIM = 4, + VT_BATCH_DIM = 6 + }; + int32_t seq_dim() const { + return GetField(VT_SEQ_DIM, 0); + } + int32_t batch_dim() const { + return GetField(VT_BATCH_DIM, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_SEQ_DIM) && + VerifyField(verifier, VT_BATCH_DIM) && + verifier.EndTable(); + } + ReverseSequenceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ReverseSequenceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReverseSequenceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::NonMaxSuppressionV4Options * -Operator::builtin_options_as() const -{ - return builtin_options_as_NonMaxSuppressionV4Options(); -} +struct ReverseSequenceOptionsBuilder { + typedef ReverseSequenceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_seq_dim(int32_t seq_dim) { + fbb_.AddElement(ReverseSequenceOptions::VT_SEQ_DIM, seq_dim, 0); + } + void add_batch_dim(int32_t batch_dim) { + fbb_.AddElement(ReverseSequenceOptions::VT_BATCH_DIM, batch_dim, 0); + } + explicit ReverseSequenceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::NonMaxSuppressionV5Options * -Operator::builtin_options_as() const -{ - return builtin_options_as_NonMaxSuppressionV5Options(); +inline flatbuffers::Offset CreateReverseSequenceOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t seq_dim = 0, + int32_t batch_dim = 0) { + ReverseSequenceOptionsBuilder builder_(_fbb); + builder_.add_batch_dim(batch_dim); + builder_.add_seq_dim(seq_dim); + return builder_.Finish(); } -template <> -inline const circle::ScatterNdOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_ScatterNdOptions(); -} +flatbuffers::Offset CreateReverseSequenceOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReverseSequenceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::SelectV2Options *Operator::builtin_options_as() const -{ - return builtin_options_as_SelectV2Options(); -} +struct MatrixDiagOptionsT : public flatbuffers::NativeTable { + typedef MatrixDiagOptions TableType; +}; -template <> -inline const circle::DensifyOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_DensifyOptions(); -} +struct MatrixDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MatrixDiagOptionsT NativeTableType; + typedef MatrixDiagOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + MatrixDiagOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(MatrixDiagOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatrixDiagOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::SegmentSumOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_SegmentSumOptions(); -} +struct MatrixDiagOptionsBuilder { + typedef MatrixDiagOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit MatrixDiagOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::BatchMatMulOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_BatchMatMulOptions(); +inline flatbuffers::Offset CreateMatrixDiagOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + MatrixDiagOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::CumsumOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_CumsumOptions(); -} +flatbuffers::Offset CreateMatrixDiagOptions(flatbuffers::FlatBufferBuilder &_fbb, const MatrixDiagOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::CallOnceOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_CallOnceOptions(); -} +struct QuantizeOptionsT : public flatbuffers::NativeTable { + typedef QuantizeOptions TableType; +}; -template <> -inline const circle::BroadcastToOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_BroadcastToOptions(); -} - -template <> -inline const circle::Rfft2dOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_Rfft2dOptions(); -} - -template <> -inline const circle::Conv3DOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_Conv3DOptions(); -} - -template <> -inline const circle::HashtableOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_HashtableOptions(); -} - -template <> -inline const circle::HashtableFindOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_HashtableFindOptions(); -} - -template <> -inline const circle::HashtableImportOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_HashtableImportOptions(); -} - -template <> -inline const circle::HashtableSizeOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_HashtableSizeOptions(); -} - -template <> -inline const circle::VarHandleOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_VarHandleOptions(); -} - -template <> -inline const circle::ReadVariableOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_ReadVariableOptions(); -} - -template <> -inline const circle::AssignVariableOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_AssignVariableOptions(); -} - -template <> -inline const circle::RandomOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_RandomOptions(); -} - -template <> -inline const circle::BucketizeOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_BucketizeOptions(); -} - -template <> -inline const circle::GeluOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_GeluOptions(); -} - -template <> -inline const circle::DynamicUpdateSliceOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_DynamicUpdateSliceOptions(); -} - -template <> -inline const circle::UnsortedSegmentProdOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_UnsortedSegmentProdOptions(); -} - -template <> -inline const circle::UnsortedSegmentMaxOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_UnsortedSegmentMaxOptions(); -} - -template <> -inline const circle::UnsortedSegmentMinOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_UnsortedSegmentMinOptions(); -} - -template <> -inline const circle::UnsortedSegmentSumOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_UnsortedSegmentSumOptions(); -} - -template <> -inline const circle::ATan2Options *Operator::builtin_options_as() const -{ - return builtin_options_as_ATan2Options(); -} - -template <> -inline const circle::SignOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_SignOptions(); -} - -template <> -inline const circle::BitcastOptions *Operator::builtin_options_as() const -{ - return builtin_options_as_BitcastOptions(); -} +struct QuantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizeOptionsT NativeTableType; + typedef QuantizeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + QuantizeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(QuantizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -template <> -inline const circle::BitwiseXorOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_BitwiseXorOptions(); -} +struct QuantizeOptionsBuilder { + typedef QuantizeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit QuantizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; -template <> -inline const circle::RightShiftOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_RightShiftOptions(); +inline flatbuffers::Offset CreateQuantizeOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + QuantizeOptionsBuilder builder_(_fbb); + return builder_.Finish(); } -template <> -inline const circle::BCQGatherOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_BCQGatherOptions(); -} +flatbuffers::Offset CreateQuantizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -template <> -inline const circle::BCQFullyConnectedOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_BCQFullyConnectedOptions(); -} +struct MatrixSetDiagOptionsT : public flatbuffers::NativeTable { + typedef MatrixSetDiagOptions TableType; +}; -template <> -inline const circle::InstanceNormOptions * -Operator::builtin_options_as() const -{ - return builtin_options_as_InstanceNormOptions(); -} +struct MatrixSetDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MatrixSetDiagOptionsT NativeTableType; + typedef MatrixSetDiagOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + MatrixSetDiagOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(MatrixSetDiagOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatrixSetDiagOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; -struct OperatorBuilder -{ - typedef Operator Table; +struct MatrixSetDiagOptionsBuilder { + typedef MatrixSetDiagOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_opcode_index(uint32_t opcode_index) - { - fbb_.AddElement(Operator::VT_OPCODE_INDEX, opcode_index, 0); - } - void add_inputs(flatbuffers::Offset> inputs) - { - fbb_.AddOffset(Operator::VT_INPUTS, inputs); - } - void add_outputs(flatbuffers::Offset> outputs) - { - fbb_.AddOffset(Operator::VT_OUTPUTS, outputs); - } - void add_builtin_options_type(circle::BuiltinOptions builtin_options_type) - { - fbb_.AddElement(Operator::VT_BUILTIN_OPTIONS_TYPE, - static_cast(builtin_options_type), 0); - } - void add_builtin_options(flatbuffers::Offset builtin_options) - { - fbb_.AddOffset(Operator::VT_BUILTIN_OPTIONS, builtin_options); - } - void add_custom_options(flatbuffers::Offset> custom_options) - { - fbb_.AddOffset(Operator::VT_CUSTOM_OPTIONS, custom_options); - } - void add_custom_options_format(circle::CustomOptionsFormat custom_options_format) - { - fbb_.AddElement(Operator::VT_CUSTOM_OPTIONS_FORMAT, - static_cast(custom_options_format), 0); - } - void add_mutating_variable_inputs( - flatbuffers::Offset> mutating_variable_inputs) - { - fbb_.AddOffset(Operator::VT_MUTATING_VARIABLE_INPUTS, mutating_variable_inputs); - } - void add_intermediates(flatbuffers::Offset> intermediates) - { - fbb_.AddOffset(Operator::VT_INTERMEDIATES, intermediates); - } - explicit OperatorBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit MatrixSetDiagOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateOperator( - flatbuffers::FlatBufferBuilder &_fbb, uint32_t opcode_index = 0, - flatbuffers::Offset> inputs = 0, - flatbuffers::Offset> outputs = 0, - circle::BuiltinOptions builtin_options_type = circle::BuiltinOptions_NONE, - flatbuffers::Offset builtin_options = 0, - flatbuffers::Offset> custom_options = 0, - circle::CustomOptionsFormat custom_options_format = circle::CustomOptionsFormat_FLEXBUFFERS, - flatbuffers::Offset> mutating_variable_inputs = 0, - flatbuffers::Offset> intermediates = 0) -{ - OperatorBuilder builder_(_fbb); - builder_.add_intermediates(intermediates); - builder_.add_mutating_variable_inputs(mutating_variable_inputs); - builder_.add_custom_options(custom_options); - builder_.add_builtin_options(builtin_options); - builder_.add_outputs(outputs); - builder_.add_inputs(inputs); - builder_.add_opcode_index(opcode_index); - builder_.add_custom_options_format(custom_options_format); - builder_.add_builtin_options_type(builtin_options_type); +inline flatbuffers::Offset CreateMatrixSetDiagOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + MatrixSetDiagOptionsBuilder builder_(_fbb); return builder_.Finish(); } -inline flatbuffers::Offset CreateOperatorDirect( - flatbuffers::FlatBufferBuilder &_fbb, uint32_t opcode_index = 0, - const std::vector *inputs = nullptr, const std::vector *outputs = nullptr, - circle::BuiltinOptions builtin_options_type = circle::BuiltinOptions_NONE, - flatbuffers::Offset builtin_options = 0, - const std::vector *custom_options = nullptr, - circle::CustomOptionsFormat custom_options_format = circle::CustomOptionsFormat_FLEXBUFFERS, - const std::vector *mutating_variable_inputs = nullptr, - const std::vector *intermediates = nullptr) -{ - auto inputs__ = inputs ? _fbb.CreateVector(*inputs) : 0; - auto outputs__ = outputs ? _fbb.CreateVector(*outputs) : 0; - auto custom_options__ = custom_options ? _fbb.CreateVector(*custom_options) : 0; - auto mutating_variable_inputs__ = - mutating_variable_inputs ? _fbb.CreateVector(*mutating_variable_inputs) : 0; - auto intermediates__ = intermediates ? _fbb.CreateVector(*intermediates) : 0; - return circle::CreateOperator(_fbb, opcode_index, inputs__, outputs__, builtin_options_type, - builtin_options, custom_options__, custom_options_format, - mutating_variable_inputs__, intermediates__); -} - -flatbuffers::Offset -CreateOperator(flatbuffers::FlatBufferBuilder &_fbb, const OperatorT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateMatrixSetDiagOptions(flatbuffers::FlatBufferBuilder &_fbb, const MatrixSetDiagOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct SubGraphT : public flatbuffers::NativeTable -{ - typedef SubGraph TableType; - std::vector> tensors{}; - std::vector inputs{}; - std::vector outputs{}; - std::vector> operators{}; - std::string name{}; - circle::DataFormat data_format = circle::DataFormat_CHANNELS_LAST; +struct IfOptionsT : public flatbuffers::NativeTable { + typedef IfOptions TableType; + int32_t then_subgraph_index = 0; + int32_t else_subgraph_index = 0; }; -struct SubGraph FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SubGraphT NativeTableType; - typedef SubGraphBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_TENSORS = 4, - VT_INPUTS = 6, - VT_OUTPUTS = 8, - VT_OPERATORS = 10, - VT_NAME = 12, - VT_DATA_FORMAT = 14 +struct IfOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef IfOptionsT NativeTableType; + typedef IfOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_THEN_SUBGRAPH_INDEX = 4, + VT_ELSE_SUBGRAPH_INDEX = 6 }; - const flatbuffers::Vector> *tensors() const - { - return GetPointer> *>(VT_TENSORS); - } - const flatbuffers::Vector *inputs() const - { - return GetPointer *>(VT_INPUTS); + int32_t then_subgraph_index() const { + return GetField(VT_THEN_SUBGRAPH_INDEX, 0); } - const flatbuffers::Vector *outputs() const - { - return GetPointer *>(VT_OUTPUTS); - } - const flatbuffers::Vector> *operators() const - { - return GetPointer> *>( - VT_OPERATORS); - } - const flatbuffers::String *name() const - { - return GetPointer(VT_NAME); + int32_t else_subgraph_index() const { + return GetField(VT_ELSE_SUBGRAPH_INDEX, 0); } - circle::DataFormat data_format() const - { - return static_cast(GetField(VT_DATA_FORMAT, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_TENSORS) && - verifier.VerifyVector(tensors()) && verifier.VerifyVectorOfTables(tensors()) && - VerifyOffset(verifier, VT_INPUTS) && verifier.VerifyVector(inputs()) && - VerifyOffset(verifier, VT_OUTPUTS) && verifier.VerifyVector(outputs()) && - VerifyOffset(verifier, VT_OPERATORS) && verifier.VerifyVector(operators()) && - verifier.VerifyVectorOfTables(operators()) && VerifyOffset(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyField(verifier, VT_DATA_FORMAT) && + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_THEN_SUBGRAPH_INDEX) && + VerifyField(verifier, VT_ELSE_SUBGRAPH_INDEX) && verifier.EndTable(); } - SubGraphT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SubGraphT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + IfOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(IfOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const IfOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct SubGraphBuilder -{ - typedef SubGraph Table; +struct IfOptionsBuilder { + typedef IfOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void - add_tensors(flatbuffers::Offset>> tensors) - { - fbb_.AddOffset(SubGraph::VT_TENSORS, tensors); - } - void add_inputs(flatbuffers::Offset> inputs) - { - fbb_.AddOffset(SubGraph::VT_INPUTS, inputs); - } - void add_outputs(flatbuffers::Offset> outputs) - { - fbb_.AddOffset(SubGraph::VT_OUTPUTS, outputs); - } - void add_operators( - flatbuffers::Offset>> operators) - { - fbb_.AddOffset(SubGraph::VT_OPERATORS, operators); - } - void add_name(flatbuffers::Offset name) - { - fbb_.AddOffset(SubGraph::VT_NAME, name); + void add_then_subgraph_index(int32_t then_subgraph_index) { + fbb_.AddElement(IfOptions::VT_THEN_SUBGRAPH_INDEX, then_subgraph_index, 0); } - void add_data_format(circle::DataFormat data_format) - { - fbb_.AddElement(SubGraph::VT_DATA_FORMAT, static_cast(data_format), 0); + void add_else_subgraph_index(int32_t else_subgraph_index) { + fbb_.AddElement(IfOptions::VT_ELSE_SUBGRAPH_INDEX, else_subgraph_index, 0); } - explicit SubGraphBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit IfOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateSubGraph( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> tensors = 0, - flatbuffers::Offset> inputs = 0, - flatbuffers::Offset> outputs = 0, - flatbuffers::Offset>> operators = 0, - flatbuffers::Offset name = 0, - circle::DataFormat data_format = circle::DataFormat_CHANNELS_LAST) -{ - SubGraphBuilder builder_(_fbb); - builder_.add_name(name); - builder_.add_operators(operators); - builder_.add_outputs(outputs); - builder_.add_inputs(inputs); - builder_.add_tensors(tensors); - builder_.add_data_format(data_format); +inline flatbuffers::Offset CreateIfOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t then_subgraph_index = 0, + int32_t else_subgraph_index = 0) { + IfOptionsBuilder builder_(_fbb); + builder_.add_else_subgraph_index(else_subgraph_index); + builder_.add_then_subgraph_index(then_subgraph_index); return builder_.Finish(); } -inline flatbuffers::Offset CreateSubGraphDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *tensors = nullptr, - const std::vector *inputs = nullptr, const std::vector *outputs = nullptr, - const std::vector> *operators = nullptr, - const char *name = nullptr, circle::DataFormat data_format = circle::DataFormat_CHANNELS_LAST) -{ - auto tensors__ = tensors ? _fbb.CreateVector>(*tensors) : 0; - auto inputs__ = inputs ? _fbb.CreateVector(*inputs) : 0; - auto outputs__ = outputs ? _fbb.CreateVector(*outputs) : 0; - auto operators__ = - operators ? _fbb.CreateVector>(*operators) : 0; - auto name__ = name ? _fbb.CreateString(name) : 0; - return circle::CreateSubGraph(_fbb, tensors__, inputs__, outputs__, operators__, name__, - data_format); -} - -flatbuffers::Offset -CreateSubGraph(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateIfOptions(flatbuffers::FlatBufferBuilder &_fbb, const IfOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct BufferT : public flatbuffers::NativeTable -{ - typedef Buffer TableType; - std::vector data{}; +struct CallOnceOptionsT : public flatbuffers::NativeTable { + typedef CallOnceOptions TableType; + int32_t init_subgraph_index = 0; }; -struct Buffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef BufferT NativeTableType; - typedef BufferBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_DATA = 4 +struct CallOnceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CallOnceOptionsT NativeTableType; + typedef CallOnceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INIT_SUBGRAPH_INDEX = 4 }; - const flatbuffers::Vector *data() const - { - return GetPointer *>(VT_DATA); + int32_t init_subgraph_index() const { + return GetField(VT_INIT_SUBGRAPH_INDEX, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && verifier.EndTable(); + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_INIT_SUBGRAPH_INDEX) && + verifier.EndTable(); } - BufferT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(BufferT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const BufferT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + CallOnceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(CallOnceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const CallOnceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct BufferBuilder -{ - typedef Buffer Table; +struct CallOnceOptionsBuilder { + typedef CallOnceOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_data(flatbuffers::Offset> data) - { - fbb_.AddOffset(Buffer::VT_DATA, data); + void add_init_subgraph_index(int32_t init_subgraph_index) { + fbb_.AddElement(CallOnceOptions::VT_INIT_SUBGRAPH_INDEX, init_subgraph_index, 0); } - explicit BufferBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit CallOnceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateBuffer(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> data = 0) -{ - BufferBuilder builder_(_fbb); - builder_.add_data(data); +inline flatbuffers::Offset CreateCallOnceOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t init_subgraph_index = 0) { + CallOnceOptionsBuilder builder_(_fbb); + builder_.add_init_subgraph_index(init_subgraph_index); return builder_.Finish(); } -inline flatbuffers::Offset CreateBufferDirect(flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *data = nullptr) -{ - if (data) - { - _fbb.ForceVectorAlignment(data->size(), sizeof(uint8_t), 16); - } - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return circle::CreateBuffer(_fbb, data__); -} - -flatbuffers::Offset -CreateBuffer(flatbuffers::FlatBufferBuilder &_fbb, const BufferT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateCallOnceOptions(flatbuffers::FlatBufferBuilder &_fbb, const CallOnceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct MetadataT : public flatbuffers::NativeTable -{ - typedef Metadata TableType; - std::string name{}; - uint32_t buffer = 0; +struct WhileOptionsT : public flatbuffers::NativeTable { + typedef WhileOptions TableType; + int32_t cond_subgraph_index = 0; + int32_t body_subgraph_index = 0; }; -struct Metadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef MetadataT NativeTableType; - typedef MetadataBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_NAME = 4, - VT_BUFFER = 6 +struct WhileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef WhileOptionsT NativeTableType; + typedef WhileOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_COND_SUBGRAPH_INDEX = 4, + VT_BODY_SUBGRAPH_INDEX = 6 }; - const flatbuffers::String *name() const - { - return GetPointer(VT_NAME); + int32_t cond_subgraph_index() const { + return GetField(VT_COND_SUBGRAPH_INDEX, 0); + } + int32_t body_subgraph_index() const { + return GetField(VT_BODY_SUBGRAPH_INDEX, 0); } - uint32_t buffer() const { return GetField(VT_BUFFER, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyField(verifier, VT_BUFFER) && + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_COND_SUBGRAPH_INDEX) && + VerifyField(verifier, VT_BODY_SUBGRAPH_INDEX) && verifier.EndTable(); } - MetadataT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(MetadataT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const MetadataT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + WhileOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(WhileOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhileOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; -struct MetadataBuilder -{ - typedef Metadata Table; +struct WhileOptionsBuilder { + typedef WhileOptions Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) - { - fbb_.AddOffset(Metadata::VT_NAME, name); + void add_cond_subgraph_index(int32_t cond_subgraph_index) { + fbb_.AddElement(WhileOptions::VT_COND_SUBGRAPH_INDEX, cond_subgraph_index, 0); + } + void add_body_subgraph_index(int32_t body_subgraph_index) { + fbb_.AddElement(WhileOptions::VT_BODY_SUBGRAPH_INDEX, body_subgraph_index, 0); } - void add_buffer(uint32_t buffer) { fbb_.AddElement(Metadata::VT_BUFFER, buffer, 0); } - explicit MetadataBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { + explicit WhileOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() - { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset -CreateMetadata(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset name = 0, uint32_t buffer = 0) -{ - MetadataBuilder builder_(_fbb); - builder_.add_buffer(buffer); - builder_.add_name(name); +inline flatbuffers::Offset CreateWhileOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t cond_subgraph_index = 0, + int32_t body_subgraph_index = 0) { + WhileOptionsBuilder builder_(_fbb); + builder_.add_body_subgraph_index(body_subgraph_index); + builder_.add_cond_subgraph_index(cond_subgraph_index); return builder_.Finish(); } -inline flatbuffers::Offset CreateMetadataDirect(flatbuffers::FlatBufferBuilder &_fbb, - const char *name = nullptr, - uint32_t buffer = 0) -{ - auto name__ = name ? _fbb.CreateString(name) : 0; - return circle::CreateMetadata(_fbb, name__, buffer); +flatbuffers::Offset CreateWhileOptions(flatbuffers::FlatBufferBuilder &_fbb, const WhileOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct NonMaxSuppressionV4OptionsT : public flatbuffers::NativeTable { + typedef NonMaxSuppressionV4Options TableType; +}; + +struct NonMaxSuppressionV4Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NonMaxSuppressionV4OptionsT NativeTableType; + typedef NonMaxSuppressionV4OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + NonMaxSuppressionV4OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(NonMaxSuppressionV4OptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV4OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct NonMaxSuppressionV4OptionsBuilder { + typedef NonMaxSuppressionV4Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit NonMaxSuppressionV4OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateNonMaxSuppressionV4Options( + flatbuffers::FlatBufferBuilder &_fbb) { + NonMaxSuppressionV4OptionsBuilder builder_(_fbb); + return builder_.Finish(); } -flatbuffers::Offset -CreateMetadata(flatbuffers::FlatBufferBuilder &_fbb, const MetadataT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +flatbuffers::Offset CreateNonMaxSuppressionV4Options(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV4OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); -struct TensorMapT : public flatbuffers::NativeTable -{ - typedef TensorMap TableType; - std::string name{}; - uint32_t tensor_index = 0; +struct NonMaxSuppressionV5OptionsT : public flatbuffers::NativeTable { + typedef NonMaxSuppressionV5Options TableType; }; -struct TensorMap FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef TensorMapT NativeTableType; - typedef TensorMapBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_NAME = 4, - VT_TENSOR_INDEX = 6 +struct NonMaxSuppressionV5Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NonMaxSuppressionV5OptionsT NativeTableType; + typedef NonMaxSuppressionV5OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + NonMaxSuppressionV5OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(NonMaxSuppressionV5OptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV5OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct NonMaxSuppressionV5OptionsBuilder { + typedef NonMaxSuppressionV5Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit NonMaxSuppressionV5OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateNonMaxSuppressionV5Options( + flatbuffers::FlatBufferBuilder &_fbb) { + NonMaxSuppressionV5OptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateNonMaxSuppressionV5Options(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV5OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct ScatterNdOptionsT : public flatbuffers::NativeTable { + typedef ScatterNdOptions TableType; +}; + +struct ScatterNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ScatterNdOptionsT NativeTableType; + typedef ScatterNdOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + ScatterNdOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ScatterNdOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScatterNdOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct ScatterNdOptionsBuilder { + typedef ScatterNdOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ScatterNdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateScatterNdOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + ScatterNdOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateScatterNdOptions(flatbuffers::FlatBufferBuilder &_fbb, const ScatterNdOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct SelectV2OptionsT : public flatbuffers::NativeTable { + typedef SelectV2Options TableType; +}; + +struct SelectV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SelectV2OptionsT NativeTableType; + typedef SelectV2OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + SelectV2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SelectV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SelectV2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct SelectV2OptionsBuilder { + typedef SelectV2Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SelectV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateSelectV2Options( + flatbuffers::FlatBufferBuilder &_fbb) { + SelectV2OptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateSelectV2Options(flatbuffers::FlatBufferBuilder &_fbb, const SelectV2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct DensifyOptionsT : public flatbuffers::NativeTable { + typedef DensifyOptions TableType; +}; + +struct DensifyOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DensifyOptionsT NativeTableType; + typedef DensifyOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + DensifyOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(DensifyOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const DensifyOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct DensifyOptionsBuilder { + typedef DensifyOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit DensifyOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateDensifyOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + DensifyOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateDensifyOptions(flatbuffers::FlatBufferBuilder &_fbb, const DensifyOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct SegmentSumOptionsT : public flatbuffers::NativeTable { + typedef SegmentSumOptions TableType; +}; + +struct SegmentSumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SegmentSumOptionsT NativeTableType; + typedef SegmentSumOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + SegmentSumOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SegmentSumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SegmentSumOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct SegmentSumOptionsBuilder { + typedef SegmentSumOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SegmentSumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateSegmentSumOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + SegmentSumOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb, const SegmentSumOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct BatchMatMulOptionsT : public flatbuffers::NativeTable { + typedef BatchMatMulOptions TableType; + bool adjoint_lhs = false; + bool adjoint_rhs = false; + bool asymmetric_quantize_inputs = false; +}; + +struct BatchMatMulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BatchMatMulOptionsT NativeTableType; + typedef BatchMatMulOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ADJOINT_LHS = 4, + VT_ADJOINT_RHS = 6, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 8 }; - const flatbuffers::String *name() const - { - return GetPointer(VT_NAME); + bool adjoint_lhs() const { + return GetField(VT_ADJOINT_LHS, 0) != 0; } - uint32_t tensor_index() const { return GetField(VT_TENSOR_INDEX, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_NAME) && - verifier.VerifyString(name()) && VerifyField(verifier, VT_TENSOR_INDEX) && + bool adjoint_rhs() const { + return GetField(VT_ADJOINT_RHS, 0) != 0; + } + bool asymmetric_quantize_inputs() const { + return GetField(VT_ASYMMETRIC_QUANTIZE_INPUTS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ADJOINT_LHS) && + VerifyField(verifier, VT_ADJOINT_RHS) && + VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && verifier.EndTable(); } - TensorMapT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(TensorMapT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorMapT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); + BatchMatMulOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BatchMatMulOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct BatchMatMulOptionsBuilder { + typedef BatchMatMulOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_adjoint_lhs(bool adjoint_lhs) { + fbb_.AddElement(BatchMatMulOptions::VT_ADJOINT_LHS, static_cast(adjoint_lhs), 0); + } + void add_adjoint_rhs(bool adjoint_rhs) { + fbb_.AddElement(BatchMatMulOptions::VT_ADJOINT_RHS, static_cast(adjoint_rhs), 0); + } + void add_asymmetric_quantize_inputs(bool asymmetric_quantize_inputs) { + fbb_.AddElement(BatchMatMulOptions::VT_ASYMMETRIC_QUANTIZE_INPUTS, static_cast(asymmetric_quantize_inputs), 0); + } + explicit BatchMatMulOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateBatchMatMulOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool adjoint_lhs = false, + bool adjoint_rhs = false, + bool asymmetric_quantize_inputs = false) { + BatchMatMulOptionsBuilder builder_(_fbb); + builder_.add_asymmetric_quantize_inputs(asymmetric_quantize_inputs); + builder_.add_adjoint_rhs(adjoint_rhs); + builder_.add_adjoint_lhs(adjoint_lhs); + return builder_.Finish(); +} + +flatbuffers::Offset CreateBatchMatMulOptions(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct CumsumOptionsT : public flatbuffers::NativeTable { + typedef CumsumOptions TableType; + bool exclusive = false; + bool reverse = false; +}; + +struct CumsumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CumsumOptionsT NativeTableType; + typedef CumsumOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_EXCLUSIVE = 4, + VT_REVERSE = 6 + }; + bool exclusive() const { + return GetField(VT_EXCLUSIVE, 0) != 0; + } + bool reverse() const { + return GetField(VT_REVERSE, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_EXCLUSIVE) && + VerifyField(verifier, VT_REVERSE) && + verifier.EndTable(); + } + CumsumOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(CumsumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const CumsumOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct CumsumOptionsBuilder { + typedef CumsumOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_exclusive(bool exclusive) { + fbb_.AddElement(CumsumOptions::VT_EXCLUSIVE, static_cast(exclusive), 0); + } + void add_reverse(bool reverse) { + fbb_.AddElement(CumsumOptions::VT_REVERSE, static_cast(reverse), 0); + } + explicit CumsumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } }; -struct TensorMapBuilder -{ - typedef TensorMap Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) - { - fbb_.AddOffset(TensorMap::VT_NAME, name); - } - void add_tensor_index(uint32_t tensor_index) - { - fbb_.AddElement(TensorMap::VT_TENSOR_INDEX, tensor_index, 0); - } - explicit TensorMapBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; +inline flatbuffers::Offset CreateCumsumOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool exclusive = false, + bool reverse = false) { + CumsumOptionsBuilder builder_(_fbb); + builder_.add_reverse(reverse); + builder_.add_exclusive(exclusive); + return builder_.Finish(); +} + +flatbuffers::Offset CreateCumsumOptions(flatbuffers::FlatBufferBuilder &_fbb, const CumsumOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct BroadcastToOptionsT : public flatbuffers::NativeTable { + typedef BroadcastToOptions TableType; +}; + +struct BroadcastToOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BroadcastToOptionsT NativeTableType; + typedef BroadcastToOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + BroadcastToOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BroadcastToOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BroadcastToOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct BroadcastToOptionsBuilder { + typedef BroadcastToOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit BroadcastToOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateBroadcastToOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + BroadcastToOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateBroadcastToOptions(flatbuffers::FlatBufferBuilder &_fbb, const BroadcastToOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct Rfft2dOptionsT : public flatbuffers::NativeTable { + typedef Rfft2dOptions TableType; +}; + +struct Rfft2dOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Rfft2dOptionsT NativeTableType; + typedef Rfft2dOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + Rfft2dOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(Rfft2dOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const Rfft2dOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct Rfft2dOptionsBuilder { + typedef Rfft2dOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit Rfft2dOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateRfft2dOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + Rfft2dOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateRfft2dOptions(flatbuffers::FlatBufferBuilder &_fbb, const Rfft2dOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct HashtableOptionsT : public flatbuffers::NativeTable { + typedef HashtableOptions TableType; + int32_t table_id = 0; + circle::TensorType key_dtype = circle::TensorType_FLOAT32; + circle::TensorType value_dtype = circle::TensorType_FLOAT32; +}; + +struct HashtableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HashtableOptionsT NativeTableType; + typedef HashtableOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TABLE_ID = 4, + VT_KEY_DTYPE = 6, + VT_VALUE_DTYPE = 8 + }; + int32_t table_id() const { + return GetField(VT_TABLE_ID, 0); + } + circle::TensorType key_dtype() const { + return static_cast(GetField(VT_KEY_DTYPE, 0)); + } + circle::TensorType value_dtype() const { + return static_cast(GetField(VT_VALUE_DTYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TABLE_ID) && + VerifyField(verifier, VT_KEY_DTYPE) && + VerifyField(verifier, VT_VALUE_DTYPE) && + verifier.EndTable(); + } + HashtableOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(HashtableOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct HashtableOptionsBuilder { + typedef HashtableOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_table_id(int32_t table_id) { + fbb_.AddElement(HashtableOptions::VT_TABLE_ID, table_id, 0); + } + void add_key_dtype(circle::TensorType key_dtype) { + fbb_.AddElement(HashtableOptions::VT_KEY_DTYPE, static_cast(key_dtype), 0); + } + void add_value_dtype(circle::TensorType value_dtype) { + fbb_.AddElement(HashtableOptions::VT_VALUE_DTYPE, static_cast(value_dtype), 0); + } + explicit HashtableOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateHashtableOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t table_id = 0, + circle::TensorType key_dtype = circle::TensorType_FLOAT32, + circle::TensorType value_dtype = circle::TensorType_FLOAT32) { + HashtableOptionsBuilder builder_(_fbb); + builder_.add_table_id(table_id); + builder_.add_value_dtype(value_dtype); + builder_.add_key_dtype(key_dtype); + return builder_.Finish(); +} + +flatbuffers::Offset CreateHashtableOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct HashtableFindOptionsT : public flatbuffers::NativeTable { + typedef HashtableFindOptions TableType; +}; + +struct HashtableFindOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HashtableFindOptionsT NativeTableType; + typedef HashtableFindOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + HashtableFindOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(HashtableFindOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableFindOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct HashtableFindOptionsBuilder { + typedef HashtableFindOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HashtableFindOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateHashtableFindOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + HashtableFindOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateHashtableFindOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableFindOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct HashtableImportOptionsT : public flatbuffers::NativeTable { + typedef HashtableImportOptions TableType; +}; + +struct HashtableImportOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HashtableImportOptionsT NativeTableType; + typedef HashtableImportOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + HashtableImportOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(HashtableImportOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableImportOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct HashtableImportOptionsBuilder { + typedef HashtableImportOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HashtableImportOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateHashtableImportOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + HashtableImportOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateHashtableImportOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableImportOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct HashtableSizeOptionsT : public flatbuffers::NativeTable { + typedef HashtableSizeOptions TableType; +}; + +struct HashtableSizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HashtableSizeOptionsT NativeTableType; + typedef HashtableSizeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + HashtableSizeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(HashtableSizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableSizeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct HashtableSizeOptionsBuilder { + typedef HashtableSizeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HashtableSizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateHashtableSizeOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + HashtableSizeOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateHashtableSizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableSizeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct VarHandleOptionsT : public flatbuffers::NativeTable { + typedef VarHandleOptions TableType; + std::string container{}; + std::string shared_name{}; +}; + +struct VarHandleOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef VarHandleOptionsT NativeTableType; + typedef VarHandleOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CONTAINER = 4, + VT_SHARED_NAME = 6 + }; + const flatbuffers::String *container() const { + return GetPointer(VT_CONTAINER); + } + const flatbuffers::String *shared_name() const { + return GetPointer(VT_SHARED_NAME); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_CONTAINER) && + verifier.VerifyString(container()) && + VerifyOffset(verifier, VT_SHARED_NAME) && + verifier.VerifyString(shared_name()) && + verifier.EndTable(); + } + VarHandleOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(VarHandleOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const VarHandleOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct VarHandleOptionsBuilder { + typedef VarHandleOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_container(flatbuffers::Offset container) { + fbb_.AddOffset(VarHandleOptions::VT_CONTAINER, container); + } + void add_shared_name(flatbuffers::Offset shared_name) { + fbb_.AddOffset(VarHandleOptions::VT_SHARED_NAME, shared_name); + } + explicit VarHandleOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateVarHandleOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset container = 0, + flatbuffers::Offset shared_name = 0) { + VarHandleOptionsBuilder builder_(_fbb); + builder_.add_shared_name(shared_name); + builder_.add_container(container); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateVarHandleOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *container = nullptr, + const char *shared_name = nullptr) { + auto container__ = container ? _fbb.CreateString(container) : 0; + auto shared_name__ = shared_name ? _fbb.CreateString(shared_name) : 0; + return circle::CreateVarHandleOptions( + _fbb, + container__, + shared_name__); +} + +flatbuffers::Offset CreateVarHandleOptions(flatbuffers::FlatBufferBuilder &_fbb, const VarHandleOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct ReadVariableOptionsT : public flatbuffers::NativeTable { + typedef ReadVariableOptions TableType; +}; + +struct ReadVariableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReadVariableOptionsT NativeTableType; + typedef ReadVariableOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + ReadVariableOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ReadVariableOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReadVariableOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct ReadVariableOptionsBuilder { + typedef ReadVariableOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ReadVariableOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateReadVariableOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + ReadVariableOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateReadVariableOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReadVariableOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct AssignVariableOptionsT : public flatbuffers::NativeTable { + typedef AssignVariableOptions TableType; +}; + +struct AssignVariableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AssignVariableOptionsT NativeTableType; + typedef AssignVariableOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + AssignVariableOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(AssignVariableOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const AssignVariableOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct AssignVariableOptionsBuilder { + typedef AssignVariableOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit AssignVariableOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateAssignVariableOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + AssignVariableOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateAssignVariableOptions(flatbuffers::FlatBufferBuilder &_fbb, const AssignVariableOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct RandomOptionsT : public flatbuffers::NativeTable { + typedef RandomOptions TableType; + int64_t seed = 0; + int64_t seed2 = 0; +}; + +struct RandomOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RandomOptionsT NativeTableType; + typedef RandomOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SEED = 4, + VT_SEED2 = 6 + }; + int64_t seed() const { + return GetField(VT_SEED, 0); + } + int64_t seed2() const { + return GetField(VT_SEED2, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_SEED) && + VerifyField(verifier, VT_SEED2) && + verifier.EndTable(); + } + RandomOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(RandomOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const RandomOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct RandomOptionsBuilder { + typedef RandomOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_seed(int64_t seed) { + fbb_.AddElement(RandomOptions::VT_SEED, seed, 0); + } + void add_seed2(int64_t seed2) { + fbb_.AddElement(RandomOptions::VT_SEED2, seed2, 0); + } + explicit RandomOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateRandomOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t seed = 0, + int64_t seed2 = 0) { + RandomOptionsBuilder builder_(_fbb); + builder_.add_seed2(seed2); + builder_.add_seed(seed); + return builder_.Finish(); +} + +flatbuffers::Offset CreateRandomOptions(flatbuffers::FlatBufferBuilder &_fbb, const RandomOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct BucketizeOptionsT : public flatbuffers::NativeTable { + typedef BucketizeOptions TableType; + std::vector boundaries{}; +}; + +struct BucketizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BucketizeOptionsT NativeTableType; + typedef BucketizeOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BOUNDARIES = 4 + }; + const flatbuffers::Vector *boundaries() const { + return GetPointer *>(VT_BOUNDARIES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_BOUNDARIES) && + verifier.VerifyVector(boundaries()) && + verifier.EndTable(); + } + BucketizeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BucketizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BucketizeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct BucketizeOptionsBuilder { + typedef BucketizeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_boundaries(flatbuffers::Offset> boundaries) { + fbb_.AddOffset(BucketizeOptions::VT_BOUNDARIES, boundaries); + } + explicit BucketizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateBucketizeOptions( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> boundaries = 0) { + BucketizeOptionsBuilder builder_(_fbb); + builder_.add_boundaries(boundaries); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateBucketizeOptionsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *boundaries = nullptr) { + auto boundaries__ = boundaries ? _fbb.CreateVector(*boundaries) : 0; + return circle::CreateBucketizeOptions( + _fbb, + boundaries__); +} + +flatbuffers::Offset CreateBucketizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const BucketizeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct GeluOptionsT : public flatbuffers::NativeTable { + typedef GeluOptions TableType; + bool approximate = false; +}; + +struct GeluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GeluOptionsT NativeTableType; + typedef GeluOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_APPROXIMATE = 4 + }; + bool approximate() const { + return GetField(VT_APPROXIMATE, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_APPROXIMATE) && + verifier.EndTable(); + } + GeluOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(GeluOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const GeluOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct GeluOptionsBuilder { + typedef GeluOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_approximate(bool approximate) { + fbb_.AddElement(GeluOptions::VT_APPROXIMATE, static_cast(approximate), 0); + } + explicit GeluOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateGeluOptions( + flatbuffers::FlatBufferBuilder &_fbb, + bool approximate = false) { + GeluOptionsBuilder builder_(_fbb); + builder_.add_approximate(approximate); + return builder_.Finish(); +} + +flatbuffers::Offset CreateGeluOptions(flatbuffers::FlatBufferBuilder &_fbb, const GeluOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct DynamicUpdateSliceOptionsT : public flatbuffers::NativeTable { + typedef DynamicUpdateSliceOptions TableType; +}; + +struct DynamicUpdateSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DynamicUpdateSliceOptionsT NativeTableType; + typedef DynamicUpdateSliceOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + DynamicUpdateSliceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(DynamicUpdateSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const DynamicUpdateSliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct DynamicUpdateSliceOptionsBuilder { + typedef DynamicUpdateSliceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit DynamicUpdateSliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateDynamicUpdateSliceOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + DynamicUpdateSliceOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateDynamicUpdateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const DynamicUpdateSliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct UnsortedSegmentProdOptionsT : public flatbuffers::NativeTable { + typedef UnsortedSegmentProdOptions TableType; +}; + +struct UnsortedSegmentProdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnsortedSegmentProdOptionsT NativeTableType; + typedef UnsortedSegmentProdOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + UnsortedSegmentProdOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(UnsortedSegmentProdOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentProdOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct UnsortedSegmentProdOptionsBuilder { + typedef UnsortedSegmentProdOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit UnsortedSegmentProdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUnsortedSegmentProdOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + UnsortedSegmentProdOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateUnsortedSegmentProdOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentProdOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct UnsortedSegmentMaxOptionsT : public flatbuffers::NativeTable { + typedef UnsortedSegmentMaxOptions TableType; +}; + +struct UnsortedSegmentMaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnsortedSegmentMaxOptionsT NativeTableType; + typedef UnsortedSegmentMaxOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + UnsortedSegmentMaxOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(UnsortedSegmentMaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMaxOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct UnsortedSegmentMaxOptionsBuilder { + typedef UnsortedSegmentMaxOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit UnsortedSegmentMaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUnsortedSegmentMaxOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + UnsortedSegmentMaxOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateUnsortedSegmentMaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMaxOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct UnsortedSegmentSumOptionsT : public flatbuffers::NativeTable { + typedef UnsortedSegmentSumOptions TableType; +}; + +struct UnsortedSegmentSumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnsortedSegmentSumOptionsT NativeTableType; + typedef UnsortedSegmentSumOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + UnsortedSegmentSumOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(UnsortedSegmentSumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentSumOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct UnsortedSegmentSumOptionsBuilder { + typedef UnsortedSegmentSumOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit UnsortedSegmentSumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUnsortedSegmentSumOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + UnsortedSegmentSumOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateUnsortedSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentSumOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct ATan2OptionsT : public flatbuffers::NativeTable { + typedef ATan2Options TableType; +}; + +struct ATan2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ATan2OptionsT NativeTableType; + typedef ATan2OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + ATan2OptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ATan2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ATan2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct ATan2OptionsBuilder { + typedef ATan2Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ATan2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateATan2Options( + flatbuffers::FlatBufferBuilder &_fbb) { + ATan2OptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateATan2Options(flatbuffers::FlatBufferBuilder &_fbb, const ATan2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct UnsortedSegmentMinOptionsT : public flatbuffers::NativeTable { + typedef UnsortedSegmentMinOptions TableType; +}; + +struct UnsortedSegmentMinOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnsortedSegmentMinOptionsT NativeTableType; + typedef UnsortedSegmentMinOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + UnsortedSegmentMinOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(UnsortedSegmentMinOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMinOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct UnsortedSegmentMinOptionsBuilder { + typedef UnsortedSegmentMinOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit UnsortedSegmentMinOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUnsortedSegmentMinOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + UnsortedSegmentMinOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateUnsortedSegmentMinOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMinOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct SignOptionsT : public flatbuffers::NativeTable { + typedef SignOptions TableType; +}; + +struct SignOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SignOptionsT NativeTableType; + typedef SignOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + SignOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SignOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SignOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct SignOptionsBuilder { + typedef SignOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SignOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateSignOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + SignOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateSignOptions(flatbuffers::FlatBufferBuilder &_fbb, const SignOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct BitcastOptionsT : public flatbuffers::NativeTable { + typedef BitcastOptions TableType; +}; + +struct BitcastOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BitcastOptionsT NativeTableType; + typedef BitcastOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + BitcastOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BitcastOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BitcastOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct BitcastOptionsBuilder { + typedef BitcastOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit BitcastOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateBitcastOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + BitcastOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateBitcastOptions(flatbuffers::FlatBufferBuilder &_fbb, const BitcastOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct BitwiseXorOptionsT : public flatbuffers::NativeTable { + typedef BitwiseXorOptions TableType; +}; + +struct BitwiseXorOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BitwiseXorOptionsT NativeTableType; + typedef BitwiseXorOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + BitwiseXorOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BitwiseXorOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BitwiseXorOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct BitwiseXorOptionsBuilder { + typedef BitwiseXorOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit BitwiseXorOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateBitwiseXorOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + BitwiseXorOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateBitwiseXorOptions(flatbuffers::FlatBufferBuilder &_fbb, const BitwiseXorOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct RightShiftOptionsT : public flatbuffers::NativeTable { + typedef RightShiftOptions TableType; +}; + +struct RightShiftOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RightShiftOptionsT NativeTableType; + typedef RightShiftOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + RightShiftOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(RightShiftOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const RightShiftOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct RightShiftOptionsBuilder { + typedef RightShiftOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit RightShiftOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateRightShiftOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + RightShiftOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateRightShiftOptions(flatbuffers::FlatBufferBuilder &_fbb, const RightShiftOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct DilateOptionsT : public flatbuffers::NativeTable { + typedef DilateOptions TableType; +}; + +struct DilateOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DilateOptionsT NativeTableType; + typedef DilateOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + DilateOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(DilateOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const DilateOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct DilateOptionsBuilder { + typedef DilateOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit DilateOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateDilateOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + DilateOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset CreateDilateOptions(flatbuffers::FlatBufferBuilder &_fbb, const DilateOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct ReduceWindowOptionsT : public flatbuffers::NativeTable { + typedef ReduceWindowOptions TableType; + circle::ReduceWindowFunction reduce_function = circle::ReduceWindowFunction_UNSUPPORTED; +}; + +struct ReduceWindowOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReduceWindowOptionsT NativeTableType; + typedef ReduceWindowOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_REDUCE_FUNCTION = 4 + }; + circle::ReduceWindowFunction reduce_function() const { + return static_cast(GetField(VT_REDUCE_FUNCTION, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_REDUCE_FUNCTION) && + verifier.EndTable(); + } + ReduceWindowOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ReduceWindowOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReduceWindowOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct ReduceWindowOptionsBuilder { + typedef ReduceWindowOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_reduce_function(circle::ReduceWindowFunction reduce_function) { + fbb_.AddElement(ReduceWindowOptions::VT_REDUCE_FUNCTION, static_cast(reduce_function), 0); + } + explicit ReduceWindowOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateReduceWindowOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ReduceWindowFunction reduce_function = circle::ReduceWindowFunction_UNSUPPORTED) { + ReduceWindowOptionsBuilder builder_(_fbb); + builder_.add_reduce_function(reduce_function); + return builder_.Finish(); +} + +flatbuffers::Offset CreateReduceWindowOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReduceWindowOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct GRUOptionsT : public flatbuffers::NativeTable { + typedef GRUOptions TableType; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; + bool return_sequences = false; + bool time_major = false; +}; + +struct GRUOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GRUOptionsT NativeTableType; + typedef GRUOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_RETURN_SEQUENCES = 6, + VT_TIME_MAJOR = 8 + }; + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + bool return_sequences() const { + return GetField(VT_RETURN_SEQUENCES, 0) != 0; + } + bool time_major() const { + return GetField(VT_TIME_MAJOR, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + VerifyField(verifier, VT_RETURN_SEQUENCES) && + VerifyField(verifier, VT_TIME_MAJOR) && + verifier.EndTable(); + } + GRUOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(GRUOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const GRUOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct GRUOptionsBuilder { + typedef GRUOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(GRUOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + void add_return_sequences(bool return_sequences) { + fbb_.AddElement(GRUOptions::VT_RETURN_SEQUENCES, static_cast(return_sequences), 0); + } + void add_time_major(bool time_major) { + fbb_.AddElement(GRUOptions::VT_TIME_MAJOR, static_cast(time_major), 0); + } + explicit GRUOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateGRUOptions( + flatbuffers::FlatBufferBuilder &_fbb, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE, + bool return_sequences = false, + bool time_major = false) { + GRUOptionsBuilder builder_(_fbb); + builder_.add_time_major(time_major); + builder_.add_return_sequences(return_sequences); + builder_.add_fused_activation_function(fused_activation_function); + return builder_.Finish(); +} + +flatbuffers::Offset CreateGRUOptions(flatbuffers::FlatBufferBuilder &_fbb, const GRUOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct BCQGatherOptionsT : public flatbuffers::NativeTable { + typedef BCQGatherOptions TableType; + int32_t input_hidden_size = 0; + int32_t axis = 0; +}; + +struct BCQGatherOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BCQGatherOptionsT NativeTableType; + typedef BCQGatherOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INPUT_HIDDEN_SIZE = 4, + VT_AXIS = 6 + }; + int32_t input_hidden_size() const { + return GetField(VT_INPUT_HIDDEN_SIZE, 0); + } + int32_t axis() const { + return GetField(VT_AXIS, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_INPUT_HIDDEN_SIZE) && + VerifyField(verifier, VT_AXIS) && + verifier.EndTable(); + } + BCQGatherOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BCQGatherOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BCQGatherOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct BCQGatherOptionsBuilder { + typedef BCQGatherOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_input_hidden_size(int32_t input_hidden_size) { + fbb_.AddElement(BCQGatherOptions::VT_INPUT_HIDDEN_SIZE, input_hidden_size, 0); + } + void add_axis(int32_t axis) { + fbb_.AddElement(BCQGatherOptions::VT_AXIS, axis, 0); + } + explicit BCQGatherOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateBCQGatherOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t input_hidden_size = 0, + int32_t axis = 0) { + BCQGatherOptionsBuilder builder_(_fbb); + builder_.add_axis(axis); + builder_.add_input_hidden_size(input_hidden_size); + return builder_.Finish(); +} + +flatbuffers::Offset CreateBCQGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const BCQGatherOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct BCQFullyConnectedOptionsT : public flatbuffers::NativeTable { + typedef BCQFullyConnectedOptions TableType; + int32_t weights_hidden_size = 0; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; +}; + +struct BCQFullyConnectedOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BCQFullyConnectedOptionsT NativeTableType; + typedef BCQFullyConnectedOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_WEIGHTS_HIDDEN_SIZE = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6 + }; + int32_t weights_hidden_size() const { + return GetField(VT_WEIGHTS_HIDDEN_SIZE, 0); + } + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_WEIGHTS_HIDDEN_SIZE) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + verifier.EndTable(); + } + BCQFullyConnectedOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BCQFullyConnectedOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BCQFullyConnectedOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct BCQFullyConnectedOptionsBuilder { + typedef BCQFullyConnectedOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_weights_hidden_size(int32_t weights_hidden_size) { + fbb_.AddElement(BCQFullyConnectedOptions::VT_WEIGHTS_HIDDEN_SIZE, weights_hidden_size, 0); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(BCQFullyConnectedOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + explicit BCQFullyConnectedOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateBCQFullyConnectedOptions( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t weights_hidden_size = 0, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) { + BCQFullyConnectedOptionsBuilder builder_(_fbb); + builder_.add_weights_hidden_size(weights_hidden_size); + builder_.add_fused_activation_function(fused_activation_function); + return builder_.Finish(); +} + +flatbuffers::Offset CreateBCQFullyConnectedOptions(flatbuffers::FlatBufferBuilder &_fbb, const BCQFullyConnectedOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct InstanceNormOptionsT : public flatbuffers::NativeTable { + typedef InstanceNormOptions TableType; + float epsilon = 0.0f; + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE; +}; + +struct InstanceNormOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef InstanceNormOptionsT NativeTableType; + typedef InstanceNormOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_EPSILON = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6 + }; + float epsilon() const { + return GetField(VT_EPSILON, 0.0f); + } + circle::ActivationFunctionType fused_activation_function() const { + return static_cast(GetField(VT_FUSED_ACTIVATION_FUNCTION, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_EPSILON) && + VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && + verifier.EndTable(); + } + InstanceNormOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(InstanceNormOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const InstanceNormOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct InstanceNormOptionsBuilder { + typedef InstanceNormOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_epsilon(float epsilon) { + fbb_.AddElement(InstanceNormOptions::VT_EPSILON, epsilon, 0.0f); + } + void add_fused_activation_function(circle::ActivationFunctionType fused_activation_function) { + fbb_.AddElement(InstanceNormOptions::VT_FUSED_ACTIVATION_FUNCTION, static_cast(fused_activation_function), 0); + } + explicit InstanceNormOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateInstanceNormOptions( + flatbuffers::FlatBufferBuilder &_fbb, + float epsilon = 0.0f, + circle::ActivationFunctionType fused_activation_function = circle::ActivationFunctionType_NONE) { + InstanceNormOptionsBuilder builder_(_fbb); + builder_.add_epsilon(epsilon); + builder_.add_fused_activation_function(fused_activation_function); + return builder_.Finish(); +} + +flatbuffers::Offset CreateInstanceNormOptions(flatbuffers::FlatBufferBuilder &_fbb, const InstanceNormOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct OperatorCodeT : public flatbuffers::NativeTable { + typedef OperatorCode TableType; + int8_t deprecated_builtin_code = 0; + std::string custom_code{}; + int32_t version = 1; + circle::BuiltinOperator builtin_code = circle::BuiltinOperator_ADD; +}; + +struct OperatorCode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OperatorCodeT NativeTableType; + typedef OperatorCodeBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEPRECATED_BUILTIN_CODE = 4, + VT_CUSTOM_CODE = 6, + VT_VERSION = 8, + VT_BUILTIN_CODE = 10 + }; + int8_t deprecated_builtin_code() const { + return GetField(VT_DEPRECATED_BUILTIN_CODE, 0); + } + const flatbuffers::String *custom_code() const { + return GetPointer(VT_CUSTOM_CODE); + } + int32_t version() const { + return GetField(VT_VERSION, 1); + } + circle::BuiltinOperator builtin_code() const { + return static_cast(GetField(VT_BUILTIN_CODE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_DEPRECATED_BUILTIN_CODE) && + VerifyOffset(verifier, VT_CUSTOM_CODE) && + verifier.VerifyString(custom_code()) && + VerifyField(verifier, VT_VERSION) && + VerifyField(verifier, VT_BUILTIN_CODE) && + verifier.EndTable(); + } + OperatorCodeT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(OperatorCodeT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const OperatorCodeT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct OperatorCodeBuilder { + typedef OperatorCode Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_deprecated_builtin_code(int8_t deprecated_builtin_code) { + fbb_.AddElement(OperatorCode::VT_DEPRECATED_BUILTIN_CODE, deprecated_builtin_code, 0); + } + void add_custom_code(flatbuffers::Offset custom_code) { + fbb_.AddOffset(OperatorCode::VT_CUSTOM_CODE, custom_code); + } + void add_version(int32_t version) { + fbb_.AddElement(OperatorCode::VT_VERSION, version, 1); + } + void add_builtin_code(circle::BuiltinOperator builtin_code) { + fbb_.AddElement(OperatorCode::VT_BUILTIN_CODE, static_cast(builtin_code), 0); + } + explicit OperatorCodeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateOperatorCode( + flatbuffers::FlatBufferBuilder &_fbb, + int8_t deprecated_builtin_code = 0, + flatbuffers::Offset custom_code = 0, + int32_t version = 1, + circle::BuiltinOperator builtin_code = circle::BuiltinOperator_ADD) { + OperatorCodeBuilder builder_(_fbb); + builder_.add_builtin_code(builtin_code); + builder_.add_version(version); + builder_.add_custom_code(custom_code); + builder_.add_deprecated_builtin_code(deprecated_builtin_code); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateOperatorCodeDirect( + flatbuffers::FlatBufferBuilder &_fbb, + int8_t deprecated_builtin_code = 0, + const char *custom_code = nullptr, + int32_t version = 1, + circle::BuiltinOperator builtin_code = circle::BuiltinOperator_ADD) { + auto custom_code__ = custom_code ? _fbb.CreateString(custom_code) : 0; + return circle::CreateOperatorCode( + _fbb, + deprecated_builtin_code, + custom_code__, + version, + builtin_code); +} + +flatbuffers::Offset CreateOperatorCode(flatbuffers::FlatBufferBuilder &_fbb, const OperatorCodeT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct OperatorT : public flatbuffers::NativeTable { + typedef Operator TableType; + uint32_t opcode_index = 0; + std::vector inputs{}; + std::vector outputs{}; + circle::BuiltinOptionsUnion builtin_options{}; + std::vector custom_options{}; + circle::CustomOptionsFormat custom_options_format = circle::CustomOptionsFormat_FLEXBUFFERS; + std::vector mutating_variable_inputs{}; + std::vector intermediates{}; + uint64_t large_custom_options_offset = 0; + uint64_t large_custom_options_size = 0; + circle::BuiltinOptions2Union builtin_options_2{}; +}; + +struct Operator FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OperatorT NativeTableType; + typedef OperatorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OPCODE_INDEX = 4, + VT_INPUTS = 6, + VT_OUTPUTS = 8, + VT_BUILTIN_OPTIONS_TYPE = 10, + VT_BUILTIN_OPTIONS = 12, + VT_CUSTOM_OPTIONS = 14, + VT_CUSTOM_OPTIONS_FORMAT = 16, + VT_MUTATING_VARIABLE_INPUTS = 18, + VT_INTERMEDIATES = 20, + VT_LARGE_CUSTOM_OPTIONS_OFFSET = 22, + VT_LARGE_CUSTOM_OPTIONS_SIZE = 24, + VT_BUILTIN_OPTIONS_2_TYPE = 26, + VT_BUILTIN_OPTIONS_2 = 28 + }; + uint32_t opcode_index() const { + return GetField(VT_OPCODE_INDEX, 0); + } + const flatbuffers::Vector *inputs() const { + return GetPointer *>(VT_INPUTS); + } + const flatbuffers::Vector *outputs() const { + return GetPointer *>(VT_OUTPUTS); + } + circle::BuiltinOptions builtin_options_type() const { + return static_cast(GetField(VT_BUILTIN_OPTIONS_TYPE, 0)); + } + const void *builtin_options() const { + return GetPointer(VT_BUILTIN_OPTIONS); + } + template const T *builtin_options_as() const; + const circle::Conv2DOptions *builtin_options_as_Conv2DOptions() const { + return builtin_options_type() == circle::BuiltinOptions_Conv2DOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::DepthwiseConv2DOptions *builtin_options_as_DepthwiseConv2DOptions() const { + return builtin_options_type() == circle::BuiltinOptions_DepthwiseConv2DOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ConcatEmbeddingsOptions *builtin_options_as_ConcatEmbeddingsOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ConcatEmbeddingsOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LSHProjectionOptions *builtin_options_as_LSHProjectionOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LSHProjectionOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::Pool2DOptions *builtin_options_as_Pool2DOptions() const { + return builtin_options_type() == circle::BuiltinOptions_Pool2DOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SVDFOptions *builtin_options_as_SVDFOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SVDFOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::RNNOptions *builtin_options_as_RNNOptions() const { + return builtin_options_type() == circle::BuiltinOptions_RNNOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::FullyConnectedOptions *builtin_options_as_FullyConnectedOptions() const { + return builtin_options_type() == circle::BuiltinOptions_FullyConnectedOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SoftmaxOptions *builtin_options_as_SoftmaxOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SoftmaxOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ConcatenationOptions *builtin_options_as_ConcatenationOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ConcatenationOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::AddOptions *builtin_options_as_AddOptions() const { + return builtin_options_type() == circle::BuiltinOptions_AddOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::L2NormOptions *builtin_options_as_L2NormOptions() const { + return builtin_options_type() == circle::BuiltinOptions_L2NormOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LocalResponseNormalizationOptions *builtin_options_as_LocalResponseNormalizationOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LocalResponseNormalizationOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LSTMOptions *builtin_options_as_LSTMOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LSTMOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ResizeBilinearOptions *builtin_options_as_ResizeBilinearOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ResizeBilinearOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::CallOptions *builtin_options_as_CallOptions() const { + return builtin_options_type() == circle::BuiltinOptions_CallOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ReshapeOptions *builtin_options_as_ReshapeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ReshapeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SkipGramOptions *builtin_options_as_SkipGramOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SkipGramOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SpaceToDepthOptions *builtin_options_as_SpaceToDepthOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SpaceToDepthOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::EmbeddingLookupSparseOptions *builtin_options_as_EmbeddingLookupSparseOptions() const { + return builtin_options_type() == circle::BuiltinOptions_EmbeddingLookupSparseOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::MulOptions *builtin_options_as_MulOptions() const { + return builtin_options_type() == circle::BuiltinOptions_MulOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::PadOptions *builtin_options_as_PadOptions() const { + return builtin_options_type() == circle::BuiltinOptions_PadOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::GatherOptions *builtin_options_as_GatherOptions() const { + return builtin_options_type() == circle::BuiltinOptions_GatherOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BatchToSpaceNDOptions *builtin_options_as_BatchToSpaceNDOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BatchToSpaceNDOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SpaceToBatchNDOptions *builtin_options_as_SpaceToBatchNDOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SpaceToBatchNDOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::TransposeOptions *builtin_options_as_TransposeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_TransposeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ReducerOptions *builtin_options_as_ReducerOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ReducerOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SubOptions *builtin_options_as_SubOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SubOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::DivOptions *builtin_options_as_DivOptions() const { + return builtin_options_type() == circle::BuiltinOptions_DivOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SqueezeOptions *builtin_options_as_SqueezeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SqueezeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SequenceRNNOptions *builtin_options_as_SequenceRNNOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SequenceRNNOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::StridedSliceOptions *builtin_options_as_StridedSliceOptions() const { + return builtin_options_type() == circle::BuiltinOptions_StridedSliceOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ExpOptions *builtin_options_as_ExpOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ExpOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::TopKV2Options *builtin_options_as_TopKV2Options() const { + return builtin_options_type() == circle::BuiltinOptions_TopKV2Options ? static_cast(builtin_options()) : nullptr; + } + const circle::SplitOptions *builtin_options_as_SplitOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SplitOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LogSoftmaxOptions *builtin_options_as_LogSoftmaxOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LogSoftmaxOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::CastOptions *builtin_options_as_CastOptions() const { + return builtin_options_type() == circle::BuiltinOptions_CastOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::DequantizeOptions *builtin_options_as_DequantizeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_DequantizeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::MaximumMinimumOptions *builtin_options_as_MaximumMinimumOptions() const { + return builtin_options_type() == circle::BuiltinOptions_MaximumMinimumOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ArgMaxOptions *builtin_options_as_ArgMaxOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ArgMaxOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LessOptions *builtin_options_as_LessOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LessOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::NegOptions *builtin_options_as_NegOptions() const { + return builtin_options_type() == circle::BuiltinOptions_NegOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::PadV2Options *builtin_options_as_PadV2Options() const { + return builtin_options_type() == circle::BuiltinOptions_PadV2Options ? static_cast(builtin_options()) : nullptr; + } + const circle::GreaterOptions *builtin_options_as_GreaterOptions() const { + return builtin_options_type() == circle::BuiltinOptions_GreaterOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::GreaterEqualOptions *builtin_options_as_GreaterEqualOptions() const { + return builtin_options_type() == circle::BuiltinOptions_GreaterEqualOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LessEqualOptions *builtin_options_as_LessEqualOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LessEqualOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SelectOptions *builtin_options_as_SelectOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SelectOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SliceOptions *builtin_options_as_SliceOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SliceOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::TransposeConvOptions *builtin_options_as_TransposeConvOptions() const { + return builtin_options_type() == circle::BuiltinOptions_TransposeConvOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SparseToDenseOptions *builtin_options_as_SparseToDenseOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SparseToDenseOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::TileOptions *builtin_options_as_TileOptions() const { + return builtin_options_type() == circle::BuiltinOptions_TileOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ExpandDimsOptions *builtin_options_as_ExpandDimsOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ExpandDimsOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::EqualOptions *builtin_options_as_EqualOptions() const { + return builtin_options_type() == circle::BuiltinOptions_EqualOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::NotEqualOptions *builtin_options_as_NotEqualOptions() const { + return builtin_options_type() == circle::BuiltinOptions_NotEqualOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ShapeOptions *builtin_options_as_ShapeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ShapeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::PowOptions *builtin_options_as_PowOptions() const { + return builtin_options_type() == circle::BuiltinOptions_PowOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ArgMinOptions *builtin_options_as_ArgMinOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ArgMinOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::FakeQuantOptions *builtin_options_as_FakeQuantOptions() const { + return builtin_options_type() == circle::BuiltinOptions_FakeQuantOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::PackOptions *builtin_options_as_PackOptions() const { + return builtin_options_type() == circle::BuiltinOptions_PackOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LogicalOrOptions *builtin_options_as_LogicalOrOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LogicalOrOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::OneHotOptions *builtin_options_as_OneHotOptions() const { + return builtin_options_type() == circle::BuiltinOptions_OneHotOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LogicalAndOptions *builtin_options_as_LogicalAndOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LogicalAndOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LogicalNotOptions *builtin_options_as_LogicalNotOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LogicalNotOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::UnpackOptions *builtin_options_as_UnpackOptions() const { + return builtin_options_type() == circle::BuiltinOptions_UnpackOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::FloorDivOptions *builtin_options_as_FloorDivOptions() const { + return builtin_options_type() == circle::BuiltinOptions_FloorDivOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SquareOptions *builtin_options_as_SquareOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SquareOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ZerosLikeOptions *builtin_options_as_ZerosLikeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ZerosLikeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::FillOptions *builtin_options_as_FillOptions() const { + return builtin_options_type() == circle::BuiltinOptions_FillOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BidirectionalSequenceLSTMOptions *builtin_options_as_BidirectionalSequenceLSTMOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BidirectionalSequenceLSTMOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BidirectionalSequenceRNNOptions *builtin_options_as_BidirectionalSequenceRNNOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BidirectionalSequenceRNNOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::UnidirectionalSequenceLSTMOptions *builtin_options_as_UnidirectionalSequenceLSTMOptions() const { + return builtin_options_type() == circle::BuiltinOptions_UnidirectionalSequenceLSTMOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::FloorModOptions *builtin_options_as_FloorModOptions() const { + return builtin_options_type() == circle::BuiltinOptions_FloorModOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::RangeOptions *builtin_options_as_RangeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_RangeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ResizeNearestNeighborOptions *builtin_options_as_ResizeNearestNeighborOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ResizeNearestNeighborOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::LeakyReluOptions *builtin_options_as_LeakyReluOptions() const { + return builtin_options_type() == circle::BuiltinOptions_LeakyReluOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SquaredDifferenceOptions *builtin_options_as_SquaredDifferenceOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SquaredDifferenceOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::MirrorPadOptions *builtin_options_as_MirrorPadOptions() const { + return builtin_options_type() == circle::BuiltinOptions_MirrorPadOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::AbsOptions *builtin_options_as_AbsOptions() const { + return builtin_options_type() == circle::BuiltinOptions_AbsOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SplitVOptions *builtin_options_as_SplitVOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SplitVOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::UniqueOptions *builtin_options_as_UniqueOptions() const { + return builtin_options_type() == circle::BuiltinOptions_UniqueOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ReverseV2Options *builtin_options_as_ReverseV2Options() const { + return builtin_options_type() == circle::BuiltinOptions_ReverseV2Options ? static_cast(builtin_options()) : nullptr; + } + const circle::AddNOptions *builtin_options_as_AddNOptions() const { + return builtin_options_type() == circle::BuiltinOptions_AddNOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::GatherNdOptions *builtin_options_as_GatherNdOptions() const { + return builtin_options_type() == circle::BuiltinOptions_GatherNdOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::CosOptions *builtin_options_as_CosOptions() const { + return builtin_options_type() == circle::BuiltinOptions_CosOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::WhereOptions *builtin_options_as_WhereOptions() const { + return builtin_options_type() == circle::BuiltinOptions_WhereOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::RankOptions *builtin_options_as_RankOptions() const { + return builtin_options_type() == circle::BuiltinOptions_RankOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ReverseSequenceOptions *builtin_options_as_ReverseSequenceOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ReverseSequenceOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::MatrixDiagOptions *builtin_options_as_MatrixDiagOptions() const { + return builtin_options_type() == circle::BuiltinOptions_MatrixDiagOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::QuantizeOptions *builtin_options_as_QuantizeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_QuantizeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::MatrixSetDiagOptions *builtin_options_as_MatrixSetDiagOptions() const { + return builtin_options_type() == circle::BuiltinOptions_MatrixSetDiagOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::HardSwishOptions *builtin_options_as_HardSwishOptions() const { + return builtin_options_type() == circle::BuiltinOptions_HardSwishOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::IfOptions *builtin_options_as_IfOptions() const { + return builtin_options_type() == circle::BuiltinOptions_IfOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::WhileOptions *builtin_options_as_WhileOptions() const { + return builtin_options_type() == circle::BuiltinOptions_WhileOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::DepthToSpaceOptions *builtin_options_as_DepthToSpaceOptions() const { + return builtin_options_type() == circle::BuiltinOptions_DepthToSpaceOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::NonMaxSuppressionV4Options *builtin_options_as_NonMaxSuppressionV4Options() const { + return builtin_options_type() == circle::BuiltinOptions_NonMaxSuppressionV4Options ? static_cast(builtin_options()) : nullptr; + } + const circle::NonMaxSuppressionV5Options *builtin_options_as_NonMaxSuppressionV5Options() const { + return builtin_options_type() == circle::BuiltinOptions_NonMaxSuppressionV5Options ? static_cast(builtin_options()) : nullptr; + } + const circle::ScatterNdOptions *builtin_options_as_ScatterNdOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ScatterNdOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SelectV2Options *builtin_options_as_SelectV2Options() const { + return builtin_options_type() == circle::BuiltinOptions_SelectV2Options ? static_cast(builtin_options()) : nullptr; + } + const circle::DensifyOptions *builtin_options_as_DensifyOptions() const { + return builtin_options_type() == circle::BuiltinOptions_DensifyOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::SegmentSumOptions *builtin_options_as_SegmentSumOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SegmentSumOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BatchMatMulOptions *builtin_options_as_BatchMatMulOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BatchMatMulOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::CumsumOptions *builtin_options_as_CumsumOptions() const { + return builtin_options_type() == circle::BuiltinOptions_CumsumOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::CallOnceOptions *builtin_options_as_CallOnceOptions() const { + return builtin_options_type() == circle::BuiltinOptions_CallOnceOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BroadcastToOptions *builtin_options_as_BroadcastToOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BroadcastToOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::Rfft2dOptions *builtin_options_as_Rfft2dOptions() const { + return builtin_options_type() == circle::BuiltinOptions_Rfft2dOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::Conv3DOptions *builtin_options_as_Conv3DOptions() const { + return builtin_options_type() == circle::BuiltinOptions_Conv3DOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::HashtableOptions *builtin_options_as_HashtableOptions() const { + return builtin_options_type() == circle::BuiltinOptions_HashtableOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::HashtableFindOptions *builtin_options_as_HashtableFindOptions() const { + return builtin_options_type() == circle::BuiltinOptions_HashtableFindOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::HashtableImportOptions *builtin_options_as_HashtableImportOptions() const { + return builtin_options_type() == circle::BuiltinOptions_HashtableImportOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::HashtableSizeOptions *builtin_options_as_HashtableSizeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_HashtableSizeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::VarHandleOptions *builtin_options_as_VarHandleOptions() const { + return builtin_options_type() == circle::BuiltinOptions_VarHandleOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ReadVariableOptions *builtin_options_as_ReadVariableOptions() const { + return builtin_options_type() == circle::BuiltinOptions_ReadVariableOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::AssignVariableOptions *builtin_options_as_AssignVariableOptions() const { + return builtin_options_type() == circle::BuiltinOptions_AssignVariableOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::RandomOptions *builtin_options_as_RandomOptions() const { + return builtin_options_type() == circle::BuiltinOptions_RandomOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BucketizeOptions *builtin_options_as_BucketizeOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BucketizeOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::GeluOptions *builtin_options_as_GeluOptions() const { + return builtin_options_type() == circle::BuiltinOptions_GeluOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::DynamicUpdateSliceOptions *builtin_options_as_DynamicUpdateSliceOptions() const { + return builtin_options_type() == circle::BuiltinOptions_DynamicUpdateSliceOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::UnsortedSegmentProdOptions *builtin_options_as_UnsortedSegmentProdOptions() const { + return builtin_options_type() == circle::BuiltinOptions_UnsortedSegmentProdOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::UnsortedSegmentMaxOptions *builtin_options_as_UnsortedSegmentMaxOptions() const { + return builtin_options_type() == circle::BuiltinOptions_UnsortedSegmentMaxOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::UnsortedSegmentMinOptions *builtin_options_as_UnsortedSegmentMinOptions() const { + return builtin_options_type() == circle::BuiltinOptions_UnsortedSegmentMinOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::UnsortedSegmentSumOptions *builtin_options_as_UnsortedSegmentSumOptions() const { + return builtin_options_type() == circle::BuiltinOptions_UnsortedSegmentSumOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::ATan2Options *builtin_options_as_ATan2Options() const { + return builtin_options_type() == circle::BuiltinOptions_ATan2Options ? static_cast(builtin_options()) : nullptr; + } + const circle::SignOptions *builtin_options_as_SignOptions() const { + return builtin_options_type() == circle::BuiltinOptions_SignOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BitcastOptions *builtin_options_as_BitcastOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BitcastOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BitwiseXorOptions *builtin_options_as_BitwiseXorOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BitwiseXorOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::RightShiftOptions *builtin_options_as_RightShiftOptions() const { + return builtin_options_type() == circle::BuiltinOptions_RightShiftOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::GRUOptions *builtin_options_as_GRUOptions() const { + return builtin_options_type() == circle::BuiltinOptions_GRUOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BCQGatherOptions *builtin_options_as_BCQGatherOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BCQGatherOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::BCQFullyConnectedOptions *builtin_options_as_BCQFullyConnectedOptions() const { + return builtin_options_type() == circle::BuiltinOptions_BCQFullyConnectedOptions ? static_cast(builtin_options()) : nullptr; + } + const circle::InstanceNormOptions *builtin_options_as_InstanceNormOptions() const { + return builtin_options_type() == circle::BuiltinOptions_InstanceNormOptions ? static_cast(builtin_options()) : nullptr; + } + const flatbuffers::Vector *custom_options() const { + return GetPointer *>(VT_CUSTOM_OPTIONS); + } + circle::CustomOptionsFormat custom_options_format() const { + return static_cast(GetField(VT_CUSTOM_OPTIONS_FORMAT, 0)); + } + const flatbuffers::Vector *mutating_variable_inputs() const { + return GetPointer *>(VT_MUTATING_VARIABLE_INPUTS); + } + const flatbuffers::Vector *intermediates() const { + return GetPointer *>(VT_INTERMEDIATES); + } + uint64_t large_custom_options_offset() const { + return GetField(VT_LARGE_CUSTOM_OPTIONS_OFFSET, 0); + } + uint64_t large_custom_options_size() const { + return GetField(VT_LARGE_CUSTOM_OPTIONS_SIZE, 0); + } + circle::BuiltinOptions2 builtin_options_2_type() const { + return static_cast(GetField(VT_BUILTIN_OPTIONS_2_TYPE, 0)); + } + const void *builtin_options_2() const { + return GetPointer(VT_BUILTIN_OPTIONS_2); + } + template const T *builtin_options_2_as() const; + const circle::StablehloConcatenateOptions *builtin_options_2_as_StablehloConcatenateOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloConcatenateOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloBroadcastInDimOptions *builtin_options_2_as_StablehloBroadcastInDimOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloBroadcastInDimOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloSliceOptions *builtin_options_2_as_StablehloSliceOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloSliceOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloConvolutionOptions *builtin_options_2_as_StablehloConvolutionOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloConvolutionOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloCustomCallOptions *builtin_options_2_as_StablehloCustomCallOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloCustomCallOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloReduceOptions *builtin_options_2_as_StablehloReduceOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloReduceOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloScatterOptions *builtin_options_2_as_StablehloScatterOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloScatterOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloCompareOptions *builtin_options_2_as_StablehloCompareOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloCompareOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloDynamicSliceOptions *builtin_options_2_as_StablehloDynamicSliceOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloDynamicSliceOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloPadOptions *builtin_options_2_as_StablehloPadOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloPadOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloIotaOptions *builtin_options_2_as_StablehloIotaOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloIotaOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloDotGeneralOptions *builtin_options_2_as_StablehloDotGeneralOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloDotGeneralOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloReduceWindowOptions *builtin_options_2_as_StablehloReduceWindowOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloReduceWindowOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloSortOptions *builtin_options_2_as_StablehloSortOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloSortOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloWhileOptions *builtin_options_2_as_StablehloWhileOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloWhileOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloGatherOptions *builtin_options_2_as_StablehloGatherOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloGatherOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloTransposeOptions *builtin_options_2_as_StablehloTransposeOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloTransposeOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::DilateOptions *builtin_options_2_as_DilateOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_DilateOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::StablehloRngBitGeneratorOptions *builtin_options_2_as_StablehloRngBitGeneratorOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_StablehloRngBitGeneratorOptions ? static_cast(builtin_options_2()) : nullptr; + } + const circle::ReduceWindowOptions *builtin_options_2_as_ReduceWindowOptions() const { + return builtin_options_2_type() == circle::BuiltinOptions2_ReduceWindowOptions ? static_cast(builtin_options_2()) : nullptr; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_OPCODE_INDEX) && + VerifyOffset(verifier, VT_INPUTS) && + verifier.VerifyVector(inputs()) && + VerifyOffset(verifier, VT_OUTPUTS) && + verifier.VerifyVector(outputs()) && + VerifyField(verifier, VT_BUILTIN_OPTIONS_TYPE) && + VerifyOffset(verifier, VT_BUILTIN_OPTIONS) && + VerifyBuiltinOptions(verifier, builtin_options(), builtin_options_type()) && + VerifyOffset(verifier, VT_CUSTOM_OPTIONS) && + verifier.VerifyVector(custom_options()) && + VerifyField(verifier, VT_CUSTOM_OPTIONS_FORMAT) && + VerifyOffset(verifier, VT_MUTATING_VARIABLE_INPUTS) && + verifier.VerifyVector(mutating_variable_inputs()) && + VerifyOffset(verifier, VT_INTERMEDIATES) && + verifier.VerifyVector(intermediates()) && + VerifyField(verifier, VT_LARGE_CUSTOM_OPTIONS_OFFSET) && + VerifyField(verifier, VT_LARGE_CUSTOM_OPTIONS_SIZE) && + VerifyField(verifier, VT_BUILTIN_OPTIONS_2_TYPE) && + VerifyOffset(verifier, VT_BUILTIN_OPTIONS_2) && + VerifyBuiltinOptions2(verifier, builtin_options_2(), builtin_options_2_type()) && + verifier.EndTable(); + } + OperatorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(OperatorT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const OperatorT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +template<> inline const circle::Conv2DOptions *Operator::builtin_options_as() const { + return builtin_options_as_Conv2DOptions(); +} + +template<> inline const circle::DepthwiseConv2DOptions *Operator::builtin_options_as() const { + return builtin_options_as_DepthwiseConv2DOptions(); +} + +template<> inline const circle::ConcatEmbeddingsOptions *Operator::builtin_options_as() const { + return builtin_options_as_ConcatEmbeddingsOptions(); +} + +template<> inline const circle::LSHProjectionOptions *Operator::builtin_options_as() const { + return builtin_options_as_LSHProjectionOptions(); +} + +template<> inline const circle::Pool2DOptions *Operator::builtin_options_as() const { + return builtin_options_as_Pool2DOptions(); +} + +template<> inline const circle::SVDFOptions *Operator::builtin_options_as() const { + return builtin_options_as_SVDFOptions(); +} + +template<> inline const circle::RNNOptions *Operator::builtin_options_as() const { + return builtin_options_as_RNNOptions(); +} + +template<> inline const circle::FullyConnectedOptions *Operator::builtin_options_as() const { + return builtin_options_as_FullyConnectedOptions(); +} + +template<> inline const circle::SoftmaxOptions *Operator::builtin_options_as() const { + return builtin_options_as_SoftmaxOptions(); +} + +template<> inline const circle::ConcatenationOptions *Operator::builtin_options_as() const { + return builtin_options_as_ConcatenationOptions(); +} + +template<> inline const circle::AddOptions *Operator::builtin_options_as() const { + return builtin_options_as_AddOptions(); +} + +template<> inline const circle::L2NormOptions *Operator::builtin_options_as() const { + return builtin_options_as_L2NormOptions(); +} + +template<> inline const circle::LocalResponseNormalizationOptions *Operator::builtin_options_as() const { + return builtin_options_as_LocalResponseNormalizationOptions(); +} + +template<> inline const circle::LSTMOptions *Operator::builtin_options_as() const { + return builtin_options_as_LSTMOptions(); +} + +template<> inline const circle::ResizeBilinearOptions *Operator::builtin_options_as() const { + return builtin_options_as_ResizeBilinearOptions(); +} + +template<> inline const circle::CallOptions *Operator::builtin_options_as() const { + return builtin_options_as_CallOptions(); +} + +template<> inline const circle::ReshapeOptions *Operator::builtin_options_as() const { + return builtin_options_as_ReshapeOptions(); +} + +template<> inline const circle::SkipGramOptions *Operator::builtin_options_as() const { + return builtin_options_as_SkipGramOptions(); +} + +template<> inline const circle::SpaceToDepthOptions *Operator::builtin_options_as() const { + return builtin_options_as_SpaceToDepthOptions(); +} + +template<> inline const circle::EmbeddingLookupSparseOptions *Operator::builtin_options_as() const { + return builtin_options_as_EmbeddingLookupSparseOptions(); +} + +template<> inline const circle::MulOptions *Operator::builtin_options_as() const { + return builtin_options_as_MulOptions(); +} + +template<> inline const circle::PadOptions *Operator::builtin_options_as() const { + return builtin_options_as_PadOptions(); +} + +template<> inline const circle::GatherOptions *Operator::builtin_options_as() const { + return builtin_options_as_GatherOptions(); +} + +template<> inline const circle::BatchToSpaceNDOptions *Operator::builtin_options_as() const { + return builtin_options_as_BatchToSpaceNDOptions(); +} + +template<> inline const circle::SpaceToBatchNDOptions *Operator::builtin_options_as() const { + return builtin_options_as_SpaceToBatchNDOptions(); +} + +template<> inline const circle::TransposeOptions *Operator::builtin_options_as() const { + return builtin_options_as_TransposeOptions(); +} + +template<> inline const circle::ReducerOptions *Operator::builtin_options_as() const { + return builtin_options_as_ReducerOptions(); +} + +template<> inline const circle::SubOptions *Operator::builtin_options_as() const { + return builtin_options_as_SubOptions(); +} + +template<> inline const circle::DivOptions *Operator::builtin_options_as() const { + return builtin_options_as_DivOptions(); +} + +template<> inline const circle::SqueezeOptions *Operator::builtin_options_as() const { + return builtin_options_as_SqueezeOptions(); +} + +template<> inline const circle::SequenceRNNOptions *Operator::builtin_options_as() const { + return builtin_options_as_SequenceRNNOptions(); +} + +template<> inline const circle::StridedSliceOptions *Operator::builtin_options_as() const { + return builtin_options_as_StridedSliceOptions(); +} + +template<> inline const circle::ExpOptions *Operator::builtin_options_as() const { + return builtin_options_as_ExpOptions(); +} + +template<> inline const circle::TopKV2Options *Operator::builtin_options_as() const { + return builtin_options_as_TopKV2Options(); +} + +template<> inline const circle::SplitOptions *Operator::builtin_options_as() const { + return builtin_options_as_SplitOptions(); +} + +template<> inline const circle::LogSoftmaxOptions *Operator::builtin_options_as() const { + return builtin_options_as_LogSoftmaxOptions(); +} + +template<> inline const circle::CastOptions *Operator::builtin_options_as() const { + return builtin_options_as_CastOptions(); +} + +template<> inline const circle::DequantizeOptions *Operator::builtin_options_as() const { + return builtin_options_as_DequantizeOptions(); +} + +template<> inline const circle::MaximumMinimumOptions *Operator::builtin_options_as() const { + return builtin_options_as_MaximumMinimumOptions(); +} + +template<> inline const circle::ArgMaxOptions *Operator::builtin_options_as() const { + return builtin_options_as_ArgMaxOptions(); +} + +template<> inline const circle::LessOptions *Operator::builtin_options_as() const { + return builtin_options_as_LessOptions(); +} + +template<> inline const circle::NegOptions *Operator::builtin_options_as() const { + return builtin_options_as_NegOptions(); +} + +template<> inline const circle::PadV2Options *Operator::builtin_options_as() const { + return builtin_options_as_PadV2Options(); +} + +template<> inline const circle::GreaterOptions *Operator::builtin_options_as() const { + return builtin_options_as_GreaterOptions(); +} + +template<> inline const circle::GreaterEqualOptions *Operator::builtin_options_as() const { + return builtin_options_as_GreaterEqualOptions(); +} + +template<> inline const circle::LessEqualOptions *Operator::builtin_options_as() const { + return builtin_options_as_LessEqualOptions(); +} + +template<> inline const circle::SelectOptions *Operator::builtin_options_as() const { + return builtin_options_as_SelectOptions(); +} + +template<> inline const circle::SliceOptions *Operator::builtin_options_as() const { + return builtin_options_as_SliceOptions(); +} + +template<> inline const circle::TransposeConvOptions *Operator::builtin_options_as() const { + return builtin_options_as_TransposeConvOptions(); +} + +template<> inline const circle::SparseToDenseOptions *Operator::builtin_options_as() const { + return builtin_options_as_SparseToDenseOptions(); +} + +template<> inline const circle::TileOptions *Operator::builtin_options_as() const { + return builtin_options_as_TileOptions(); +} + +template<> inline const circle::ExpandDimsOptions *Operator::builtin_options_as() const { + return builtin_options_as_ExpandDimsOptions(); +} + +template<> inline const circle::EqualOptions *Operator::builtin_options_as() const { + return builtin_options_as_EqualOptions(); +} + +template<> inline const circle::NotEqualOptions *Operator::builtin_options_as() const { + return builtin_options_as_NotEqualOptions(); +} + +template<> inline const circle::ShapeOptions *Operator::builtin_options_as() const { + return builtin_options_as_ShapeOptions(); +} + +template<> inline const circle::PowOptions *Operator::builtin_options_as() const { + return builtin_options_as_PowOptions(); +} + +template<> inline const circle::ArgMinOptions *Operator::builtin_options_as() const { + return builtin_options_as_ArgMinOptions(); +} + +template<> inline const circle::FakeQuantOptions *Operator::builtin_options_as() const { + return builtin_options_as_FakeQuantOptions(); +} + +template<> inline const circle::PackOptions *Operator::builtin_options_as() const { + return builtin_options_as_PackOptions(); +} + +template<> inline const circle::LogicalOrOptions *Operator::builtin_options_as() const { + return builtin_options_as_LogicalOrOptions(); +} + +template<> inline const circle::OneHotOptions *Operator::builtin_options_as() const { + return builtin_options_as_OneHotOptions(); +} + +template<> inline const circle::LogicalAndOptions *Operator::builtin_options_as() const { + return builtin_options_as_LogicalAndOptions(); +} + +template<> inline const circle::LogicalNotOptions *Operator::builtin_options_as() const { + return builtin_options_as_LogicalNotOptions(); +} + +template<> inline const circle::UnpackOptions *Operator::builtin_options_as() const { + return builtin_options_as_UnpackOptions(); +} + +template<> inline const circle::FloorDivOptions *Operator::builtin_options_as() const { + return builtin_options_as_FloorDivOptions(); +} + +template<> inline const circle::SquareOptions *Operator::builtin_options_as() const { + return builtin_options_as_SquareOptions(); +} + +template<> inline const circle::ZerosLikeOptions *Operator::builtin_options_as() const { + return builtin_options_as_ZerosLikeOptions(); +} + +template<> inline const circle::FillOptions *Operator::builtin_options_as() const { + return builtin_options_as_FillOptions(); +} + +template<> inline const circle::BidirectionalSequenceLSTMOptions *Operator::builtin_options_as() const { + return builtin_options_as_BidirectionalSequenceLSTMOptions(); +} + +template<> inline const circle::BidirectionalSequenceRNNOptions *Operator::builtin_options_as() const { + return builtin_options_as_BidirectionalSequenceRNNOptions(); +} + +template<> inline const circle::UnidirectionalSequenceLSTMOptions *Operator::builtin_options_as() const { + return builtin_options_as_UnidirectionalSequenceLSTMOptions(); +} + +template<> inline const circle::FloorModOptions *Operator::builtin_options_as() const { + return builtin_options_as_FloorModOptions(); +} + +template<> inline const circle::RangeOptions *Operator::builtin_options_as() const { + return builtin_options_as_RangeOptions(); +} + +template<> inline const circle::ResizeNearestNeighborOptions *Operator::builtin_options_as() const { + return builtin_options_as_ResizeNearestNeighborOptions(); +} + +template<> inline const circle::LeakyReluOptions *Operator::builtin_options_as() const { + return builtin_options_as_LeakyReluOptions(); +} + +template<> inline const circle::SquaredDifferenceOptions *Operator::builtin_options_as() const { + return builtin_options_as_SquaredDifferenceOptions(); +} + +template<> inline const circle::MirrorPadOptions *Operator::builtin_options_as() const { + return builtin_options_as_MirrorPadOptions(); +} + +template<> inline const circle::AbsOptions *Operator::builtin_options_as() const { + return builtin_options_as_AbsOptions(); +} + +template<> inline const circle::SplitVOptions *Operator::builtin_options_as() const { + return builtin_options_as_SplitVOptions(); +} + +template<> inline const circle::UniqueOptions *Operator::builtin_options_as() const { + return builtin_options_as_UniqueOptions(); +} + +template<> inline const circle::ReverseV2Options *Operator::builtin_options_as() const { + return builtin_options_as_ReverseV2Options(); +} + +template<> inline const circle::AddNOptions *Operator::builtin_options_as() const { + return builtin_options_as_AddNOptions(); +} + +template<> inline const circle::GatherNdOptions *Operator::builtin_options_as() const { + return builtin_options_as_GatherNdOptions(); +} + +template<> inline const circle::CosOptions *Operator::builtin_options_as() const { + return builtin_options_as_CosOptions(); +} + +template<> inline const circle::WhereOptions *Operator::builtin_options_as() const { + return builtin_options_as_WhereOptions(); +} + +template<> inline const circle::RankOptions *Operator::builtin_options_as() const { + return builtin_options_as_RankOptions(); +} + +template<> inline const circle::ReverseSequenceOptions *Operator::builtin_options_as() const { + return builtin_options_as_ReverseSequenceOptions(); +} + +template<> inline const circle::MatrixDiagOptions *Operator::builtin_options_as() const { + return builtin_options_as_MatrixDiagOptions(); +} + +template<> inline const circle::QuantizeOptions *Operator::builtin_options_as() const { + return builtin_options_as_QuantizeOptions(); +} + +template<> inline const circle::MatrixSetDiagOptions *Operator::builtin_options_as() const { + return builtin_options_as_MatrixSetDiagOptions(); +} + +template<> inline const circle::HardSwishOptions *Operator::builtin_options_as() const { + return builtin_options_as_HardSwishOptions(); +} + +template<> inline const circle::IfOptions *Operator::builtin_options_as() const { + return builtin_options_as_IfOptions(); +} + +template<> inline const circle::WhileOptions *Operator::builtin_options_as() const { + return builtin_options_as_WhileOptions(); +} + +template<> inline const circle::DepthToSpaceOptions *Operator::builtin_options_as() const { + return builtin_options_as_DepthToSpaceOptions(); +} + +template<> inline const circle::NonMaxSuppressionV4Options *Operator::builtin_options_as() const { + return builtin_options_as_NonMaxSuppressionV4Options(); +} + +template<> inline const circle::NonMaxSuppressionV5Options *Operator::builtin_options_as() const { + return builtin_options_as_NonMaxSuppressionV5Options(); +} + +template<> inline const circle::ScatterNdOptions *Operator::builtin_options_as() const { + return builtin_options_as_ScatterNdOptions(); +} + +template<> inline const circle::SelectV2Options *Operator::builtin_options_as() const { + return builtin_options_as_SelectV2Options(); +} + +template<> inline const circle::DensifyOptions *Operator::builtin_options_as() const { + return builtin_options_as_DensifyOptions(); +} + +template<> inline const circle::SegmentSumOptions *Operator::builtin_options_as() const { + return builtin_options_as_SegmentSumOptions(); +} + +template<> inline const circle::BatchMatMulOptions *Operator::builtin_options_as() const { + return builtin_options_as_BatchMatMulOptions(); +} + +template<> inline const circle::CumsumOptions *Operator::builtin_options_as() const { + return builtin_options_as_CumsumOptions(); +} + +template<> inline const circle::CallOnceOptions *Operator::builtin_options_as() const { + return builtin_options_as_CallOnceOptions(); +} + +template<> inline const circle::BroadcastToOptions *Operator::builtin_options_as() const { + return builtin_options_as_BroadcastToOptions(); +} + +template<> inline const circle::Rfft2dOptions *Operator::builtin_options_as() const { + return builtin_options_as_Rfft2dOptions(); +} + +template<> inline const circle::Conv3DOptions *Operator::builtin_options_as() const { + return builtin_options_as_Conv3DOptions(); +} + +template<> inline const circle::HashtableOptions *Operator::builtin_options_as() const { + return builtin_options_as_HashtableOptions(); +} + +template<> inline const circle::HashtableFindOptions *Operator::builtin_options_as() const { + return builtin_options_as_HashtableFindOptions(); +} + +template<> inline const circle::HashtableImportOptions *Operator::builtin_options_as() const { + return builtin_options_as_HashtableImportOptions(); +} + +template<> inline const circle::HashtableSizeOptions *Operator::builtin_options_as() const { + return builtin_options_as_HashtableSizeOptions(); +} + +template<> inline const circle::VarHandleOptions *Operator::builtin_options_as() const { + return builtin_options_as_VarHandleOptions(); +} + +template<> inline const circle::ReadVariableOptions *Operator::builtin_options_as() const { + return builtin_options_as_ReadVariableOptions(); +} + +template<> inline const circle::AssignVariableOptions *Operator::builtin_options_as() const { + return builtin_options_as_AssignVariableOptions(); +} + +template<> inline const circle::RandomOptions *Operator::builtin_options_as() const { + return builtin_options_as_RandomOptions(); +} + +template<> inline const circle::BucketizeOptions *Operator::builtin_options_as() const { + return builtin_options_as_BucketizeOptions(); +} + +template<> inline const circle::GeluOptions *Operator::builtin_options_as() const { + return builtin_options_as_GeluOptions(); +} + +template<> inline const circle::DynamicUpdateSliceOptions *Operator::builtin_options_as() const { + return builtin_options_as_DynamicUpdateSliceOptions(); +} + +template<> inline const circle::UnsortedSegmentProdOptions *Operator::builtin_options_as() const { + return builtin_options_as_UnsortedSegmentProdOptions(); +} + +template<> inline const circle::UnsortedSegmentMaxOptions *Operator::builtin_options_as() const { + return builtin_options_as_UnsortedSegmentMaxOptions(); +} + +template<> inline const circle::UnsortedSegmentMinOptions *Operator::builtin_options_as() const { + return builtin_options_as_UnsortedSegmentMinOptions(); +} + +template<> inline const circle::UnsortedSegmentSumOptions *Operator::builtin_options_as() const { + return builtin_options_as_UnsortedSegmentSumOptions(); +} + +template<> inline const circle::ATan2Options *Operator::builtin_options_as() const { + return builtin_options_as_ATan2Options(); +} + +template<> inline const circle::SignOptions *Operator::builtin_options_as() const { + return builtin_options_as_SignOptions(); +} + +template<> inline const circle::BitcastOptions *Operator::builtin_options_as() const { + return builtin_options_as_BitcastOptions(); +} + +template<> inline const circle::BitwiseXorOptions *Operator::builtin_options_as() const { + return builtin_options_as_BitwiseXorOptions(); +} + +template<> inline const circle::RightShiftOptions *Operator::builtin_options_as() const { + return builtin_options_as_RightShiftOptions(); +} + +template<> inline const circle::GRUOptions *Operator::builtin_options_as() const { + return builtin_options_as_GRUOptions(); +} + +template<> inline const circle::BCQGatherOptions *Operator::builtin_options_as() const { + return builtin_options_as_BCQGatherOptions(); +} + +template<> inline const circle::BCQFullyConnectedOptions *Operator::builtin_options_as() const { + return builtin_options_as_BCQFullyConnectedOptions(); +} + +template<> inline const circle::InstanceNormOptions *Operator::builtin_options_as() const { + return builtin_options_as_InstanceNormOptions(); +} + +template<> inline const circle::StablehloConcatenateOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloConcatenateOptions(); +} + +template<> inline const circle::StablehloBroadcastInDimOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloBroadcastInDimOptions(); +} + +template<> inline const circle::StablehloSliceOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloSliceOptions(); +} + +template<> inline const circle::StablehloConvolutionOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloConvolutionOptions(); +} + +template<> inline const circle::StablehloCustomCallOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloCustomCallOptions(); +} + +template<> inline const circle::StablehloReduceOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloReduceOptions(); +} + +template<> inline const circle::StablehloScatterOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloScatterOptions(); +} + +template<> inline const circle::StablehloCompareOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloCompareOptions(); +} + +template<> inline const circle::StablehloDynamicSliceOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloDynamicSliceOptions(); +} + +template<> inline const circle::StablehloPadOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloPadOptions(); +} + +template<> inline const circle::StablehloIotaOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloIotaOptions(); +} + +template<> inline const circle::StablehloDotGeneralOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloDotGeneralOptions(); +} + +template<> inline const circle::StablehloReduceWindowOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloReduceWindowOptions(); +} + +template<> inline const circle::StablehloSortOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloSortOptions(); +} + +template<> inline const circle::StablehloWhileOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloWhileOptions(); +} + +template<> inline const circle::StablehloGatherOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloGatherOptions(); +} + +template<> inline const circle::StablehloTransposeOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloTransposeOptions(); +} + +template<> inline const circle::DilateOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_DilateOptions(); +} + +template<> inline const circle::StablehloRngBitGeneratorOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_StablehloRngBitGeneratorOptions(); +} + +template<> inline const circle::ReduceWindowOptions *Operator::builtin_options_2_as() const { + return builtin_options_2_as_ReduceWindowOptions(); +} + +struct OperatorBuilder { + typedef Operator Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_opcode_index(uint32_t opcode_index) { + fbb_.AddElement(Operator::VT_OPCODE_INDEX, opcode_index, 0); + } + void add_inputs(flatbuffers::Offset> inputs) { + fbb_.AddOffset(Operator::VT_INPUTS, inputs); + } + void add_outputs(flatbuffers::Offset> outputs) { + fbb_.AddOffset(Operator::VT_OUTPUTS, outputs); + } + void add_builtin_options_type(circle::BuiltinOptions builtin_options_type) { + fbb_.AddElement(Operator::VT_BUILTIN_OPTIONS_TYPE, static_cast(builtin_options_type), 0); + } + void add_builtin_options(flatbuffers::Offset builtin_options) { + fbb_.AddOffset(Operator::VT_BUILTIN_OPTIONS, builtin_options); + } + void add_custom_options(flatbuffers::Offset> custom_options) { + fbb_.AddOffset(Operator::VT_CUSTOM_OPTIONS, custom_options); + } + void add_custom_options_format(circle::CustomOptionsFormat custom_options_format) { + fbb_.AddElement(Operator::VT_CUSTOM_OPTIONS_FORMAT, static_cast(custom_options_format), 0); + } + void add_mutating_variable_inputs(flatbuffers::Offset> mutating_variable_inputs) { + fbb_.AddOffset(Operator::VT_MUTATING_VARIABLE_INPUTS, mutating_variable_inputs); + } + void add_intermediates(flatbuffers::Offset> intermediates) { + fbb_.AddOffset(Operator::VT_INTERMEDIATES, intermediates); + } + void add_large_custom_options_offset(uint64_t large_custom_options_offset) { + fbb_.AddElement(Operator::VT_LARGE_CUSTOM_OPTIONS_OFFSET, large_custom_options_offset, 0); + } + void add_large_custom_options_size(uint64_t large_custom_options_size) { + fbb_.AddElement(Operator::VT_LARGE_CUSTOM_OPTIONS_SIZE, large_custom_options_size, 0); + } + void add_builtin_options_2_type(circle::BuiltinOptions2 builtin_options_2_type) { + fbb_.AddElement(Operator::VT_BUILTIN_OPTIONS_2_TYPE, static_cast(builtin_options_2_type), 0); + } + void add_builtin_options_2(flatbuffers::Offset builtin_options_2) { + fbb_.AddOffset(Operator::VT_BUILTIN_OPTIONS_2, builtin_options_2); + } + explicit OperatorBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateOperator( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t opcode_index = 0, + flatbuffers::Offset> inputs = 0, + flatbuffers::Offset> outputs = 0, + circle::BuiltinOptions builtin_options_type = circle::BuiltinOptions_NONE, + flatbuffers::Offset builtin_options = 0, + flatbuffers::Offset> custom_options = 0, + circle::CustomOptionsFormat custom_options_format = circle::CustomOptionsFormat_FLEXBUFFERS, + flatbuffers::Offset> mutating_variable_inputs = 0, + flatbuffers::Offset> intermediates = 0, + uint64_t large_custom_options_offset = 0, + uint64_t large_custom_options_size = 0, + circle::BuiltinOptions2 builtin_options_2_type = circle::BuiltinOptions2_NONE, + flatbuffers::Offset builtin_options_2 = 0) { + OperatorBuilder builder_(_fbb); + builder_.add_large_custom_options_size(large_custom_options_size); + builder_.add_large_custom_options_offset(large_custom_options_offset); + builder_.add_builtin_options_2(builtin_options_2); + builder_.add_intermediates(intermediates); + builder_.add_mutating_variable_inputs(mutating_variable_inputs); + builder_.add_custom_options(custom_options); + builder_.add_builtin_options(builtin_options); + builder_.add_outputs(outputs); + builder_.add_inputs(inputs); + builder_.add_opcode_index(opcode_index); + builder_.add_builtin_options_2_type(builtin_options_2_type); + builder_.add_custom_options_format(custom_options_format); + builder_.add_builtin_options_type(builtin_options_type); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateOperatorDirect( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t opcode_index = 0, + const std::vector *inputs = nullptr, + const std::vector *outputs = nullptr, + circle::BuiltinOptions builtin_options_type = circle::BuiltinOptions_NONE, + flatbuffers::Offset builtin_options = 0, + const std::vector *custom_options = nullptr, + circle::CustomOptionsFormat custom_options_format = circle::CustomOptionsFormat_FLEXBUFFERS, + const std::vector *mutating_variable_inputs = nullptr, + const std::vector *intermediates = nullptr, + uint64_t large_custom_options_offset = 0, + uint64_t large_custom_options_size = 0, + circle::BuiltinOptions2 builtin_options_2_type = circle::BuiltinOptions2_NONE, + flatbuffers::Offset builtin_options_2 = 0) { + auto inputs__ = inputs ? _fbb.CreateVector(*inputs) : 0; + auto outputs__ = outputs ? _fbb.CreateVector(*outputs) : 0; + auto custom_options__ = custom_options ? _fbb.CreateVector(*custom_options) : 0; + auto mutating_variable_inputs__ = mutating_variable_inputs ? _fbb.CreateVector(*mutating_variable_inputs) : 0; + auto intermediates__ = intermediates ? _fbb.CreateVector(*intermediates) : 0; + return circle::CreateOperator( + _fbb, + opcode_index, + inputs__, + outputs__, + builtin_options_type, + builtin_options, + custom_options__, + custom_options_format, + mutating_variable_inputs__, + intermediates__, + large_custom_options_offset, + large_custom_options_size, + builtin_options_2_type, + builtin_options_2); +} + +flatbuffers::Offset CreateOperator(flatbuffers::FlatBufferBuilder &_fbb, const OperatorT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct SubGraphT : public flatbuffers::NativeTable { + typedef SubGraph TableType; + std::vector> tensors{}; + std::vector inputs{}; + std::vector outputs{}; + std::vector> operators{}; + std::string name{}; +}; + +struct SubGraph FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SubGraphT NativeTableType; + typedef SubGraphBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TENSORS = 4, + VT_INPUTS = 6, + VT_OUTPUTS = 8, + VT_OPERATORS = 10, + VT_NAME = 12 + }; + const flatbuffers::Vector> *tensors() const { + return GetPointer> *>(VT_TENSORS); + } + const flatbuffers::Vector *inputs() const { + return GetPointer *>(VT_INPUTS); + } + const flatbuffers::Vector *outputs() const { + return GetPointer *>(VT_OUTPUTS); + } + const flatbuffers::Vector> *operators() const { + return GetPointer> *>(VT_OPERATORS); + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TENSORS) && + verifier.VerifyVector(tensors()) && + verifier.VerifyVectorOfTables(tensors()) && + VerifyOffset(verifier, VT_INPUTS) && + verifier.VerifyVector(inputs()) && + VerifyOffset(verifier, VT_OUTPUTS) && + verifier.VerifyVector(outputs()) && + VerifyOffset(verifier, VT_OPERATORS) && + verifier.VerifyVector(operators()) && + verifier.VerifyVectorOfTables(operators()) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + verifier.EndTable(); + } + SubGraphT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SubGraphT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct SubGraphBuilder { + typedef SubGraph Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tensors(flatbuffers::Offset>> tensors) { + fbb_.AddOffset(SubGraph::VT_TENSORS, tensors); + } + void add_inputs(flatbuffers::Offset> inputs) { + fbb_.AddOffset(SubGraph::VT_INPUTS, inputs); + } + void add_outputs(flatbuffers::Offset> outputs) { + fbb_.AddOffset(SubGraph::VT_OUTPUTS, outputs); + } + void add_operators(flatbuffers::Offset>> operators) { + fbb_.AddOffset(SubGraph::VT_OPERATORS, operators); + } + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(SubGraph::VT_NAME, name); + } + explicit SubGraphBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateSubGraph( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> tensors = 0, + flatbuffers::Offset> inputs = 0, + flatbuffers::Offset> outputs = 0, + flatbuffers::Offset>> operators = 0, + flatbuffers::Offset name = 0) { + SubGraphBuilder builder_(_fbb); + builder_.add_name(name); + builder_.add_operators(operators); + builder_.add_outputs(outputs); + builder_.add_inputs(inputs); + builder_.add_tensors(tensors); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSubGraphDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *tensors = nullptr, + const std::vector *inputs = nullptr, + const std::vector *outputs = nullptr, + const std::vector> *operators = nullptr, + const char *name = nullptr) { + auto tensors__ = tensors ? _fbb.CreateVector>(*tensors) : 0; + auto inputs__ = inputs ? _fbb.CreateVector(*inputs) : 0; + auto outputs__ = outputs ? _fbb.CreateVector(*outputs) : 0; + auto operators__ = operators ? _fbb.CreateVector>(*operators) : 0; + auto name__ = name ? _fbb.CreateString(name) : 0; + return circle::CreateSubGraph( + _fbb, + tensors__, + inputs__, + outputs__, + operators__, + name__); +} + +flatbuffers::Offset CreateSubGraph(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct BufferT : public flatbuffers::NativeTable { + typedef Buffer TableType; + std::vector data{}; + uint64_t offset = 0; + uint64_t size = 0; +}; + +struct Buffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BufferT NativeTableType; + typedef BufferBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DATA = 4, + VT_OFFSET = 6, + VT_SIZE = 8 + }; + const flatbuffers::Vector *data() const { + return GetPointer *>(VT_DATA); + } + uint64_t offset() const { + return GetField(VT_OFFSET, 0); + } + uint64_t size() const { + return GetField(VT_SIZE, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DATA) && + verifier.VerifyVector(data()) && + VerifyField(verifier, VT_OFFSET) && + VerifyField(verifier, VT_SIZE) && + verifier.EndTable(); + } + BufferT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(BufferT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const BufferT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct BufferBuilder { + typedef Buffer Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_data(flatbuffers::Offset> data) { + fbb_.AddOffset(Buffer::VT_DATA, data); + } + void add_offset(uint64_t offset) { + fbb_.AddElement(Buffer::VT_OFFSET, offset, 0); + } + void add_size(uint64_t size) { + fbb_.AddElement(Buffer::VT_SIZE, size, 0); + } + explicit BufferBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateBuffer( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> data = 0, + uint64_t offset = 0, + uint64_t size = 0) { + BufferBuilder builder_(_fbb); + builder_.add_size(size); + builder_.add_offset(offset); + builder_.add_data(data); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateBufferDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *data = nullptr, + uint64_t offset = 0, + uint64_t size = 0) { + if (data) { _fbb.ForceVectorAlignment(data->size(), sizeof(uint8_t), 16); } + auto data__ = data ? _fbb.CreateVector(*data) : 0; + return circle::CreateBuffer( + _fbb, + data__, + offset, + size); +} + +flatbuffers::Offset CreateBuffer(flatbuffers::FlatBufferBuilder &_fbb, const BufferT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct MetadataT : public flatbuffers::NativeTable { + typedef Metadata TableType; + std::string name{}; + uint32_t buffer = 0; +}; + +struct Metadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MetadataT NativeTableType; + typedef MetadataBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NAME = 4, + VT_BUFFER = 6 + }; + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + uint32_t buffer() const { + return GetField(VT_BUFFER, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyField(verifier, VT_BUFFER) && + verifier.EndTable(); + } + MetadataT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(MetadataT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const MetadataT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct MetadataBuilder { + typedef Metadata Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(Metadata::VT_NAME, name); + } + void add_buffer(uint32_t buffer) { + fbb_.AddElement(Metadata::VT_BUFFER, buffer, 0); + } + explicit MetadataBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateMetadata( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + uint32_t buffer = 0) { + MetadataBuilder builder_(_fbb); + builder_.add_buffer(buffer); + builder_.add_name(name); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateMetadataDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + uint32_t buffer = 0) { + auto name__ = name ? _fbb.CreateString(name) : 0; + return circle::CreateMetadata( + _fbb, + name__, + buffer); +} + +flatbuffers::Offset CreateMetadata(flatbuffers::FlatBufferBuilder &_fbb, const MetadataT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct TensorMapT : public flatbuffers::NativeTable { + typedef TensorMap TableType; + std::string name{}; + uint32_t tensor_index = 0; +}; + +struct TensorMap FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TensorMapT NativeTableType; + typedef TensorMapBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NAME = 4, + VT_TENSOR_INDEX = 6 + }; + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + uint32_t tensor_index() const { + return GetField(VT_TENSOR_INDEX, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyField(verifier, VT_TENSOR_INDEX) && + verifier.EndTable(); + } + TensorMapT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(TensorMapT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorMapT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct TensorMapBuilder { + typedef TensorMap Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(TensorMap::VT_NAME, name); + } + void add_tensor_index(uint32_t tensor_index) { + fbb_.AddElement(TensorMap::VT_TENSOR_INDEX, tensor_index, 0); + } + explicit TensorMapBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateTensorMap( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + uint32_t tensor_index = 0) { + TensorMapBuilder builder_(_fbb); + builder_.add_tensor_index(tensor_index); + builder_.add_name(name); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateTensorMapDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + uint32_t tensor_index = 0) { + auto name__ = name ? _fbb.CreateString(name) : 0; + return circle::CreateTensorMap( + _fbb, + name__, + tensor_index); +} + +flatbuffers::Offset CreateTensorMap(flatbuffers::FlatBufferBuilder &_fbb, const TensorMapT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct SignatureDefT : public flatbuffers::NativeTable { + typedef SignatureDef TableType; + std::vector> inputs{}; + std::vector> outputs{}; + std::string signature_key{}; + uint32_t subgraph_index = 0; +}; + +struct SignatureDef FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SignatureDefT NativeTableType; + typedef SignatureDefBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INPUTS = 4, + VT_OUTPUTS = 6, + VT_SIGNATURE_KEY = 8, + VT_SUBGRAPH_INDEX = 12 + }; + const flatbuffers::Vector> *inputs() const { + return GetPointer> *>(VT_INPUTS); + } + const flatbuffers::Vector> *outputs() const { + return GetPointer> *>(VT_OUTPUTS); + } + const flatbuffers::String *signature_key() const { + return GetPointer(VT_SIGNATURE_KEY); + } + uint32_t subgraph_index() const { + return GetField(VT_SUBGRAPH_INDEX, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_INPUTS) && + verifier.VerifyVector(inputs()) && + verifier.VerifyVectorOfTables(inputs()) && + VerifyOffset(verifier, VT_OUTPUTS) && + verifier.VerifyVector(outputs()) && + verifier.VerifyVectorOfTables(outputs()) && + VerifyOffset(verifier, VT_SIGNATURE_KEY) && + verifier.VerifyString(signature_key()) && + VerifyField(verifier, VT_SUBGRAPH_INDEX) && + verifier.EndTable(); + } + SignatureDefT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(SignatureDefT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SignatureDefT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct SignatureDefBuilder { + typedef SignatureDef Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_inputs(flatbuffers::Offset>> inputs) { + fbb_.AddOffset(SignatureDef::VT_INPUTS, inputs); + } + void add_outputs(flatbuffers::Offset>> outputs) { + fbb_.AddOffset(SignatureDef::VT_OUTPUTS, outputs); + } + void add_signature_key(flatbuffers::Offset signature_key) { + fbb_.AddOffset(SignatureDef::VT_SIGNATURE_KEY, signature_key); + } + void add_subgraph_index(uint32_t subgraph_index) { + fbb_.AddElement(SignatureDef::VT_SUBGRAPH_INDEX, subgraph_index, 0); + } + explicit SignatureDefBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateSignatureDef( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> inputs = 0, + flatbuffers::Offset>> outputs = 0, + flatbuffers::Offset signature_key = 0, + uint32_t subgraph_index = 0) { + SignatureDefBuilder builder_(_fbb); + builder_.add_subgraph_index(subgraph_index); + builder_.add_signature_key(signature_key); + builder_.add_outputs(outputs); + builder_.add_inputs(inputs); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSignatureDefDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *inputs = nullptr, + const std::vector> *outputs = nullptr, + const char *signature_key = nullptr, + uint32_t subgraph_index = 0) { + auto inputs__ = inputs ? _fbb.CreateVector>(*inputs) : 0; + auto outputs__ = outputs ? _fbb.CreateVector>(*outputs) : 0; + auto signature_key__ = signature_key ? _fbb.CreateString(signature_key) : 0; + return circle::CreateSignatureDef( + _fbb, + inputs__, + outputs__, + signature_key__, + subgraph_index); +} + +flatbuffers::Offset CreateSignatureDef(flatbuffers::FlatBufferBuilder &_fbb, const SignatureDefT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +struct ModelT : public flatbuffers::NativeTable { + typedef Model TableType; + uint32_t version = 0; + std::vector> operator_codes{}; + std::vector> subgraphs{}; + std::string description{}; + std::vector> buffers{}; + std::vector metadata_buffer{}; + std::vector> metadata{}; + std::vector> signature_defs{}; +}; + +struct Model FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ModelT NativeTableType; + typedef ModelBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VERSION = 4, + VT_OPERATOR_CODES = 6, + VT_SUBGRAPHS = 8, + VT_DESCRIPTION = 10, + VT_BUFFERS = 12, + VT_METADATA_BUFFER = 14, + VT_METADATA = 16, + VT_SIGNATURE_DEFS = 18 + }; + uint32_t version() const { + return GetField(VT_VERSION, 0); + } + const flatbuffers::Vector> *operator_codes() const { + return GetPointer> *>(VT_OPERATOR_CODES); + } + const flatbuffers::Vector> *subgraphs() const { + return GetPointer> *>(VT_SUBGRAPHS); + } + const flatbuffers::String *description() const { + return GetPointer(VT_DESCRIPTION); + } + const flatbuffers::Vector> *buffers() const { + return GetPointer> *>(VT_BUFFERS); + } + const flatbuffers::Vector *metadata_buffer() const { + return GetPointer *>(VT_METADATA_BUFFER); + } + const flatbuffers::Vector> *metadata() const { + return GetPointer> *>(VT_METADATA); + } + const flatbuffers::Vector> *signature_defs() const { + return GetPointer> *>(VT_SIGNATURE_DEFS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_VERSION) && + VerifyOffset(verifier, VT_OPERATOR_CODES) && + verifier.VerifyVector(operator_codes()) && + verifier.VerifyVectorOfTables(operator_codes()) && + VerifyOffset(verifier, VT_SUBGRAPHS) && + verifier.VerifyVector(subgraphs()) && + verifier.VerifyVectorOfTables(subgraphs()) && + VerifyOffset(verifier, VT_DESCRIPTION) && + verifier.VerifyString(description()) && + VerifyOffset(verifier, VT_BUFFERS) && + verifier.VerifyVector(buffers()) && + verifier.VerifyVectorOfTables(buffers()) && + VerifyOffset(verifier, VT_METADATA_BUFFER) && + verifier.VerifyVector(metadata_buffer()) && + VerifyOffset(verifier, VT_METADATA) && + verifier.VerifyVector(metadata()) && + verifier.VerifyVectorOfTables(metadata()) && + VerifyOffset(verifier, VT_SIGNATURE_DEFS) && + verifier.VerifyVector(signature_defs()) && + verifier.VerifyVectorOfTables(signature_defs()) && + verifier.EndTable(); + } + ModelT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ModelT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ModelT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct ModelBuilder { + typedef Model Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_version(uint32_t version) { + fbb_.AddElement(Model::VT_VERSION, version, 0); + } + void add_operator_codes(flatbuffers::Offset>> operator_codes) { + fbb_.AddOffset(Model::VT_OPERATOR_CODES, operator_codes); + } + void add_subgraphs(flatbuffers::Offset>> subgraphs) { + fbb_.AddOffset(Model::VT_SUBGRAPHS, subgraphs); + } + void add_description(flatbuffers::Offset description) { + fbb_.AddOffset(Model::VT_DESCRIPTION, description); + } + void add_buffers(flatbuffers::Offset>> buffers) { + fbb_.AddOffset(Model::VT_BUFFERS, buffers); + } + void add_metadata_buffer(flatbuffers::Offset> metadata_buffer) { + fbb_.AddOffset(Model::VT_METADATA_BUFFER, metadata_buffer); + } + void add_metadata(flatbuffers::Offset>> metadata) { + fbb_.AddOffset(Model::VT_METADATA, metadata); + } + void add_signature_defs(flatbuffers::Offset>> signature_defs) { + fbb_.AddOffset(Model::VT_SIGNATURE_DEFS, signature_defs); + } + explicit ModelBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateModel( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t version = 0, + flatbuffers::Offset>> operator_codes = 0, + flatbuffers::Offset>> subgraphs = 0, + flatbuffers::Offset description = 0, + flatbuffers::Offset>> buffers = 0, + flatbuffers::Offset> metadata_buffer = 0, + flatbuffers::Offset>> metadata = 0, + flatbuffers::Offset>> signature_defs = 0) { + ModelBuilder builder_(_fbb); + builder_.add_signature_defs(signature_defs); + builder_.add_metadata(metadata); + builder_.add_metadata_buffer(metadata_buffer); + builder_.add_buffers(buffers); + builder_.add_description(description); + builder_.add_subgraphs(subgraphs); + builder_.add_operator_codes(operator_codes); + builder_.add_version(version); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateModelDirect( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t version = 0, + const std::vector> *operator_codes = nullptr, + const std::vector> *subgraphs = nullptr, + const char *description = nullptr, + const std::vector> *buffers = nullptr, + const std::vector *metadata_buffer = nullptr, + const std::vector> *metadata = nullptr, + const std::vector> *signature_defs = nullptr) { + auto operator_codes__ = operator_codes ? _fbb.CreateVector>(*operator_codes) : 0; + auto subgraphs__ = subgraphs ? _fbb.CreateVector>(*subgraphs) : 0; + auto description__ = description ? _fbb.CreateString(description) : 0; + auto buffers__ = buffers ? _fbb.CreateVector>(*buffers) : 0; + auto metadata_buffer__ = metadata_buffer ? _fbb.CreateVector(*metadata_buffer) : 0; + auto metadata__ = metadata ? _fbb.CreateVector>(*metadata) : 0; + auto signature_defs__ = signature_defs ? _fbb.CreateVector>(*signature_defs) : 0; + return circle::CreateModel( + _fbb, + version, + operator_codes__, + subgraphs__, + description__, + buffers__, + metadata_buffer__, + metadata__, + signature_defs__); +} + +flatbuffers::Offset CreateModel(flatbuffers::FlatBufferBuilder &_fbb, const ModelT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + +inline CustomQuantizationT *CustomQuantization::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new CustomQuantizationT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void CustomQuantization::UnPackTo(CustomQuantizationT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = custom(); if (_e) { _o->custom.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->custom.begin()); } } +} + +inline flatbuffers::Offset CustomQuantization::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CustomQuantizationT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateCustomQuantization(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateCustomQuantization(flatbuffers::FlatBufferBuilder &_fbb, const CustomQuantizationT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const CustomQuantizationT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + _fbb.ForceVectorAlignment(_o->custom.size(), sizeof(uint8_t), 16); + auto _custom = _o->custom.size() ? _fbb.CreateVector(_o->custom) : 0; + return circle::CreateCustomQuantization( + _fbb, + _custom); +} + +inline QuantizationParametersT *QuantizationParameters::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new QuantizationParametersT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void QuantizationParameters::UnPackTo(QuantizationParametersT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = min(); if (_e) { _o->min.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->min[_i] = _e->Get(_i); } } } + { auto _e = max(); if (_e) { _o->max.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->max[_i] = _e->Get(_i); } } } + { auto _e = scale(); if (_e) { _o->scale.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->scale[_i] = _e->Get(_i); } } } + { auto _e = zero_point(); if (_e) { _o->zero_point.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->zero_point[_i] = _e->Get(_i); } } } + { auto _e = details_type(); _o->details.type = _e; } + { auto _e = details(); if (_e) _o->details.value = circle::QuantizationDetailsUnion::UnPack(_e, details_type(), _resolver); } + { auto _e = quantized_dimension(); _o->quantized_dimension = _e; } +} + +inline flatbuffers::Offset QuantizationParameters::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizationParametersT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateQuantizationParameters(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateQuantizationParameters(flatbuffers::FlatBufferBuilder &_fbb, const QuantizationParametersT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const QuantizationParametersT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _min = _o->min.size() ? _fbb.CreateVector(_o->min) : 0; + auto _max = _o->max.size() ? _fbb.CreateVector(_o->max) : 0; + auto _scale = _o->scale.size() ? _fbb.CreateVector(_o->scale) : 0; + auto _zero_point = _o->zero_point.size() ? _fbb.CreateVector(_o->zero_point) : 0; + auto _details_type = _o->details.type; + auto _details = _o->details.Pack(_fbb); + auto _quantized_dimension = _o->quantized_dimension; + return circle::CreateQuantizationParameters( + _fbb, + _min, + _max, + _scale, + _zero_point, + _details_type, + _details, + _quantized_dimension); +} + +inline Int32VectorT *Int32Vector::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new Int32VectorT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void Int32Vector::UnPackTo(Int32VectorT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = values(); if (_e) { _o->values.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->values[_i] = _e->Get(_i); } } } +} + +inline flatbuffers::Offset Int32Vector::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Int32VectorT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateInt32Vector(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateInt32Vector(flatbuffers::FlatBufferBuilder &_fbb, const Int32VectorT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const Int32VectorT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _values = _o->values.size() ? _fbb.CreateVector(_o->values) : 0; + return circle::CreateInt32Vector( + _fbb, + _values); +} + +inline Uint16VectorT *Uint16Vector::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new Uint16VectorT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void Uint16Vector::UnPackTo(Uint16VectorT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = values(); if (_e) { _o->values.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->values[_i] = _e->Get(_i); } } } +} + +inline flatbuffers::Offset Uint16Vector::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Uint16VectorT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateUint16Vector(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateUint16Vector(flatbuffers::FlatBufferBuilder &_fbb, const Uint16VectorT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const Uint16VectorT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + _fbb.ForceVectorAlignment(_o->values.size(), sizeof(uint16_t), 4); + auto _values = _o->values.size() ? _fbb.CreateVector(_o->values) : 0; + return circle::CreateUint16Vector( + _fbb, + _values); +} + +inline Uint8VectorT *Uint8Vector::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new Uint8VectorT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void Uint8Vector::UnPackTo(Uint8VectorT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = values(); if (_e) { _o->values.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->values.begin()); } } +} + +inline flatbuffers::Offset Uint8Vector::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Uint8VectorT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateUint8Vector(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateUint8Vector(flatbuffers::FlatBufferBuilder &_fbb, const Uint8VectorT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const Uint8VectorT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + _fbb.ForceVectorAlignment(_o->values.size(), sizeof(uint8_t), 4); + auto _values = _o->values.size() ? _fbb.CreateVector(_o->values) : 0; + return circle::CreateUint8Vector( + _fbb, + _values); +} + +inline DimensionMetadataT *DimensionMetadata::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new DimensionMetadataT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void DimensionMetadata::UnPackTo(DimensionMetadataT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = format(); _o->format = _e; } + { auto _e = dense_size(); _o->dense_size = _e; } + { auto _e = array_segments_type(); _o->array_segments.type = _e; } + { auto _e = array_segments(); if (_e) _o->array_segments.value = circle::SparseIndexVectorUnion::UnPack(_e, array_segments_type(), _resolver); } + { auto _e = array_indices_type(); _o->array_indices.type = _e; } + { auto _e = array_indices(); if (_e) _o->array_indices.value = circle::SparseIndexVectorUnion::UnPack(_e, array_indices_type(), _resolver); } +} + +inline flatbuffers::Offset DimensionMetadata::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DimensionMetadataT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateDimensionMetadata(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateDimensionMetadata(flatbuffers::FlatBufferBuilder &_fbb, const DimensionMetadataT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const DimensionMetadataT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _format = _o->format; + auto _dense_size = _o->dense_size; + auto _array_segments_type = _o->array_segments.type; + auto _array_segments = _o->array_segments.Pack(_fbb); + auto _array_indices_type = _o->array_indices.type; + auto _array_indices = _o->array_indices.Pack(_fbb); + return circle::CreateDimensionMetadata( + _fbb, + _format, + _dense_size, + _array_segments_type, + _array_segments, + _array_indices_type, + _array_indices); +} + +inline SparsityParametersT *SparsityParameters::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new SparsityParametersT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void SparsityParameters::UnPackTo(SparsityParametersT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = traversal_order(); if (_e) { _o->traversal_order.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->traversal_order[_i] = _e->Get(_i); } } } + { auto _e = block_map(); if (_e) { _o->block_map.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->block_map[_i] = _e->Get(_i); } } } + { auto _e = dim_metadata(); if (_e) { _o->dim_metadata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim_metadata[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } +} + +inline flatbuffers::Offset SparsityParameters::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparsityParametersT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateSparsityParameters(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateSparsityParameters(flatbuffers::FlatBufferBuilder &_fbb, const SparsityParametersT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SparsityParametersT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _traversal_order = _o->traversal_order.size() ? _fbb.CreateVector(_o->traversal_order) : 0; + auto _block_map = _o->block_map.size() ? _fbb.CreateVector(_o->block_map) : 0; + auto _dim_metadata = _o->dim_metadata.size() ? _fbb.CreateVector> (_o->dim_metadata.size(), [](size_t i, _VectorArgs *__va) { return CreateDimensionMetadata(*__va->__fbb, __va->__o->dim_metadata[i].get(), __va->__rehasher); }, &_va ) : 0; + return circle::CreateSparsityParameters( + _fbb, + _traversal_order, + _block_map, + _dim_metadata); +} + +inline VariantSubTypeT *VariantSubType::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new VariantSubTypeT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void VariantSubType::UnPackTo(VariantSubTypeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = shape(); if (_e) { _o->shape.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->shape[_i] = _e->Get(_i); } } } + { auto _e = type(); _o->type = _e; } + { auto _e = has_rank(); _o->has_rank = _e; } +} + +inline flatbuffers::Offset VariantSubType::Pack(flatbuffers::FlatBufferBuilder &_fbb, const VariantSubTypeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateVariantSubType(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateVariantSubType(flatbuffers::FlatBufferBuilder &_fbb, const VariantSubTypeT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const VariantSubTypeT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _shape = _o->shape.size() ? _fbb.CreateVector(_o->shape) : 0; + auto _type = _o->type; + auto _has_rank = _o->has_rank; + return circle::CreateVariantSubType( + _fbb, + _shape, + _type, + _has_rank); +} + +inline TensorT *Tensor::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new TensorT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void Tensor::UnPackTo(TensorT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = shape(); if (_e) { _o->shape.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->shape[_i] = _e->Get(_i); } } } + { auto _e = type(); _o->type = _e; } + { auto _e = buffer(); _o->buffer = _e; } + { auto _e = name(); if (_e) _o->name = _e->str(); } + { auto _e = quantization(); if (_e) _o->quantization = std::unique_ptr(_e->UnPack(_resolver)); } + { auto _e = is_variable(); _o->is_variable = _e; } + { auto _e = sparsity(); if (_e) _o->sparsity = std::unique_ptr(_e->UnPack(_resolver)); } + { auto _e = shape_signature(); if (_e) { _o->shape_signature.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->shape_signature[_i] = _e->Get(_i); } } } + { auto _e = has_rank(); _o->has_rank = _e; } + { auto _e = variant_tensors(); if (_e) { _o->variant_tensors.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->variant_tensors[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } +} + +inline flatbuffers::Offset Tensor::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateTensor(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateTensor(flatbuffers::FlatBufferBuilder &_fbb, const TensorT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TensorT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _shape = _o->shape.size() ? _fbb.CreateVector(_o->shape) : 0; + auto _type = _o->type; + auto _buffer = _o->buffer; + auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); + auto _quantization = _o->quantization ? CreateQuantizationParameters(_fbb, _o->quantization.get(), _rehasher) : 0; + auto _is_variable = _o->is_variable; + auto _sparsity = _o->sparsity ? CreateSparsityParameters(_fbb, _o->sparsity.get(), _rehasher) : 0; + auto _shape_signature = _o->shape_signature.size() ? _fbb.CreateVector(_o->shape_signature) : 0; + auto _has_rank = _o->has_rank; + auto _variant_tensors = _o->variant_tensors.size() ? _fbb.CreateVector> (_o->variant_tensors.size(), [](size_t i, _VectorArgs *__va) { return CreateVariantSubType(*__va->__fbb, __va->__o->variant_tensors[i].get(), __va->__rehasher); }, &_va ) : 0; + return circle::CreateTensor( + _fbb, + _shape, + _type, + _buffer, + _name, + _quantization, + _is_variable, + _sparsity, + _shape_signature, + _has_rank, + _variant_tensors); +} + +inline StablehloGatherOptionsT *StablehloGatherOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloGatherOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void StablehloGatherOptions::UnPackTo(StablehloGatherOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = offset_dims(); if (_e) { _o->offset_dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->offset_dims[_i] = _e->Get(_i); } } } + { auto _e = collapsed_slice_dims(); if (_e) { _o->collapsed_slice_dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->collapsed_slice_dims[_i] = _e->Get(_i); } } } + { auto _e = start_index_map(); if (_e) { _o->start_index_map.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->start_index_map[_i] = _e->Get(_i); } } } + { auto _e = index_vector_dim(); _o->index_vector_dim = _e; } + { auto _e = slice_sizes(); if (_e) { _o->slice_sizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slice_sizes[_i] = _e->Get(_i); } } } + { auto _e = indices_are_sorted(); _o->indices_are_sorted = _e; } +} + +inline flatbuffers::Offset StablehloGatherOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloGatherOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloGatherOptions(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateStablehloGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloGatherOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloGatherOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _offset_dims = _o->offset_dims.size() ? _fbb.CreateVector(_o->offset_dims) : 0; + auto _collapsed_slice_dims = _o->collapsed_slice_dims.size() ? _fbb.CreateVector(_o->collapsed_slice_dims) : 0; + auto _start_index_map = _o->start_index_map.size() ? _fbb.CreateVector(_o->start_index_map) : 0; + auto _index_vector_dim = _o->index_vector_dim; + auto _slice_sizes = _o->slice_sizes.size() ? _fbb.CreateVector(_o->slice_sizes) : 0; + auto _indices_are_sorted = _o->indices_are_sorted; + return circle::CreateStablehloGatherOptions( + _fbb, + _offset_dims, + _collapsed_slice_dims, + _start_index_map, + _index_vector_dim, + _slice_sizes, + _indices_are_sorted); +} + +inline StablehloTransposeOptionsT *StablehloTransposeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloTransposeOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void StablehloTransposeOptions::UnPackTo(StablehloTransposeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = permutation(); if (_e) { _o->permutation.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->permutation[_i] = _e->Get(_i); } } } +} + +inline flatbuffers::Offset StablehloTransposeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloTransposeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloTransposeOptions(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateStablehloTransposeOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloTransposeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloTransposeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _permutation = _o->permutation.size() ? _fbb.CreateVector(_o->permutation) : 0; + return circle::CreateStablehloTransposeOptions( + _fbb, + _permutation); +} + +inline StablehloDotGeneralOptionsT *StablehloDotGeneralOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloDotGeneralOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void StablehloDotGeneralOptions::UnPackTo(StablehloDotGeneralOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = lhs_batching_dimensions(); if (_e) { _o->lhs_batching_dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->lhs_batching_dimensions[_i] = _e->Get(_i); } } } + { auto _e = rhs_batching_dimensions(); if (_e) { _o->rhs_batching_dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->rhs_batching_dimensions[_i] = _e->Get(_i); } } } + { auto _e = lhs_contracting_dimensions(); if (_e) { _o->lhs_contracting_dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->lhs_contracting_dimensions[_i] = _e->Get(_i); } } } + { auto _e = rhs_contracting_dimensions(); if (_e) { _o->rhs_contracting_dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->rhs_contracting_dimensions[_i] = _e->Get(_i); } } } + { auto _e = precision_config(); if (_e) { _o->precision_config.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->precision_config[_i] = static_cast(_e->Get(_i)); } } } +} -inline flatbuffers::Offset -CreateTensorMap(flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset name = 0, uint32_t tensor_index = 0) -{ - TensorMapBuilder builder_(_fbb); - builder_.add_tensor_index(tensor_index); - builder_.add_name(name); - return builder_.Finish(); +inline flatbuffers::Offset StablehloDotGeneralOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloDotGeneralOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloDotGeneralOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset CreateTensorMapDirect(flatbuffers::FlatBufferBuilder &_fbb, - const char *name = nullptr, - uint32_t tensor_index = 0) -{ - auto name__ = name ? _fbb.CreateString(name) : 0; - return circle::CreateTensorMap(_fbb, name__, tensor_index); +inline flatbuffers::Offset CreateStablehloDotGeneralOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloDotGeneralOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloDotGeneralOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _lhs_batching_dimensions = _o->lhs_batching_dimensions.size() ? _fbb.CreateVector(_o->lhs_batching_dimensions) : 0; + auto _rhs_batching_dimensions = _o->rhs_batching_dimensions.size() ? _fbb.CreateVector(_o->rhs_batching_dimensions) : 0; + auto _lhs_contracting_dimensions = _o->lhs_contracting_dimensions.size() ? _fbb.CreateVector(_o->lhs_contracting_dimensions) : 0; + auto _rhs_contracting_dimensions = _o->rhs_contracting_dimensions.size() ? _fbb.CreateVector(_o->rhs_contracting_dimensions) : 0; + auto _precision_config = _o->precision_config.size() ? _fbb.CreateVectorScalarCast(flatbuffers::data(_o->precision_config), _o->precision_config.size()) : 0; + return circle::CreateStablehloDotGeneralOptions( + _fbb, + _lhs_batching_dimensions, + _rhs_batching_dimensions, + _lhs_contracting_dimensions, + _rhs_contracting_dimensions, + _precision_config); +} + +inline StablehloReduceWindowOptionsT *StablehloReduceWindowOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloReduceWindowOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); } -flatbuffers::Offset -CreateTensorMap(flatbuffers::FlatBufferBuilder &_fbb, const TensorMapT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline void StablehloReduceWindowOptions::UnPackTo(StablehloReduceWindowOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = window_dimensions(); if (_e) { _o->window_dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->window_dimensions[_i] = _e->Get(_i); } } } + { auto _e = window_strides(); if (_e) { _o->window_strides.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->window_strides[_i] = _e->Get(_i); } } } + { auto _e = base_dilations(); if (_e) { _o->base_dilations.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->base_dilations[_i] = _e->Get(_i); } } } + { auto _e = window_dilations(); if (_e) { _o->window_dilations.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->window_dilations[_i] = _e->Get(_i); } } } + { auto _e = padding(); if (_e) { _o->padding.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->padding[_i] = _e->Get(_i); } } } + { auto _e = body_subgraph_index(); _o->body_subgraph_index = _e; } +} -struct SignatureDefT : public flatbuffers::NativeTable -{ - typedef SignatureDef TableType; - std::vector> inputs{}; - std::vector> outputs{}; - std::string signature_key{}; - uint32_t subgraph_index = 0; -}; +inline flatbuffers::Offset StablehloReduceWindowOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloReduceWindowOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloReduceWindowOptions(_fbb, _o, _rehasher); +} -struct SignatureDef FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef SignatureDefT NativeTableType; - typedef SignatureDefBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_INPUTS = 4, - VT_OUTPUTS = 6, - VT_SIGNATURE_KEY = 8, - VT_SUBGRAPH_INDEX = 12 - }; - const flatbuffers::Vector> *inputs() const - { - return GetPointer> *>( - VT_INPUTS); - } - const flatbuffers::Vector> *outputs() const - { - return GetPointer> *>( - VT_OUTPUTS); - } - const flatbuffers::String *signature_key() const - { - return GetPointer(VT_SIGNATURE_KEY); - } - uint32_t subgraph_index() const { return GetField(VT_SUBGRAPH_INDEX, 0); } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_INPUTS) && - verifier.VerifyVector(inputs()) && verifier.VerifyVectorOfTables(inputs()) && - VerifyOffset(verifier, VT_OUTPUTS) && verifier.VerifyVector(outputs()) && - verifier.VerifyVectorOfTables(outputs()) && VerifyOffset(verifier, VT_SIGNATURE_KEY) && - verifier.VerifyString(signature_key()) && - VerifyField(verifier, VT_SUBGRAPH_INDEX) && verifier.EndTable(); - } - SignatureDefT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(SignatureDefT *_o, - const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const SignatureDefT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; +inline flatbuffers::Offset CreateStablehloReduceWindowOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloReduceWindowOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloReduceWindowOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _window_dimensions = _o->window_dimensions.size() ? _fbb.CreateVector(_o->window_dimensions) : 0; + auto _window_strides = _o->window_strides.size() ? _fbb.CreateVector(_o->window_strides) : 0; + auto _base_dilations = _o->base_dilations.size() ? _fbb.CreateVector(_o->base_dilations) : 0; + auto _window_dilations = _o->window_dilations.size() ? _fbb.CreateVector(_o->window_dilations) : 0; + auto _padding = _o->padding.size() ? _fbb.CreateVector(_o->padding) : 0; + auto _body_subgraph_index = _o->body_subgraph_index; + return circle::CreateStablehloReduceWindowOptions( + _fbb, + _window_dimensions, + _window_strides, + _base_dilations, + _window_dilations, + _padding, + _body_subgraph_index); +} + +inline StablehloWhileOptionsT *StablehloWhileOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloWhileOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} -struct SignatureDefBuilder -{ - typedef SignatureDef Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_inputs( - flatbuffers::Offset>> inputs) - { - fbb_.AddOffset(SignatureDef::VT_INPUTS, inputs); - } - void add_outputs( - flatbuffers::Offset>> outputs) - { - fbb_.AddOffset(SignatureDef::VT_OUTPUTS, outputs); - } - void add_signature_key(flatbuffers::Offset signature_key) - { - fbb_.AddOffset(SignatureDef::VT_SIGNATURE_KEY, signature_key); - } - void add_subgraph_index(uint32_t subgraph_index) - { - fbb_.AddElement(SignatureDef::VT_SUBGRAPH_INDEX, subgraph_index, 0); - } - explicit SignatureDefBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; +inline void StablehloWhileOptions::UnPackTo(StablehloWhileOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = cond_subgraph_index(); _o->cond_subgraph_index = _e; } + { auto _e = body_subgraph_index(); _o->body_subgraph_index = _e; } +} -inline flatbuffers::Offset CreateSignatureDef( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> inputs = 0, - flatbuffers::Offset>> outputs = 0, - flatbuffers::Offset signature_key = 0, uint32_t subgraph_index = 0) -{ - SignatureDefBuilder builder_(_fbb); - builder_.add_subgraph_index(subgraph_index); - builder_.add_signature_key(signature_key); - builder_.add_outputs(outputs); - builder_.add_inputs(inputs); - return builder_.Finish(); +inline flatbuffers::Offset StablehloWhileOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloWhileOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloWhileOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset CreateSignatureDefDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *inputs = nullptr, - const std::vector> *outputs = nullptr, - const char *signature_key = nullptr, uint32_t subgraph_index = 0) -{ - auto inputs__ = inputs ? _fbb.CreateVector>(*inputs) : 0; - auto outputs__ = - outputs ? _fbb.CreateVector>(*outputs) : 0; - auto signature_key__ = signature_key ? _fbb.CreateString(signature_key) : 0; - return circle::CreateSignatureDef(_fbb, inputs__, outputs__, signature_key__, subgraph_index); +inline flatbuffers::Offset CreateStablehloWhileOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloWhileOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloWhileOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _cond_subgraph_index = _o->cond_subgraph_index; + auto _body_subgraph_index = _o->body_subgraph_index; + return circle::CreateStablehloWhileOptions( + _fbb, + _cond_subgraph_index, + _body_subgraph_index); } -flatbuffers::Offset -CreateSignatureDef(flatbuffers::FlatBufferBuilder &_fbb, const SignatureDefT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline StablehloSortOptionsT *StablehloSortOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloSortOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} -struct ModelT : public flatbuffers::NativeTable -{ - typedef Model TableType; - uint32_t version = 0; - std::vector> operator_codes{}; - std::vector> subgraphs{}; - std::string description{}; - std::vector> buffers{}; - std::vector metadata_buffer{}; - std::vector> metadata{}; - std::vector> signature_defs{}; -}; +inline void StablehloSortOptions::UnPackTo(StablehloSortOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = dimension(); _o->dimension = _e; } + { auto _e = is_stable(); _o->is_stable = _e; } + { auto _e = comparator_subgraph_index(); _o->comparator_subgraph_index = _e; } +} -struct Model FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table -{ - typedef ModelT NativeTableType; - typedef ModelBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE - { - VT_VERSION = 4, - VT_OPERATOR_CODES = 6, - VT_SUBGRAPHS = 8, - VT_DESCRIPTION = 10, - VT_BUFFERS = 12, - VT_METADATA_BUFFER = 14, - VT_METADATA = 16, - VT_SIGNATURE_DEFS = 18 - }; - uint32_t version() const { return GetField(VT_VERSION, 0); } - const flatbuffers::Vector> *operator_codes() const - { - return GetPointer> *>( - VT_OPERATOR_CODES); - } - const flatbuffers::Vector> *subgraphs() const - { - return GetPointer> *>( - VT_SUBGRAPHS); - } - const flatbuffers::String *description() const - { - return GetPointer(VT_DESCRIPTION); - } - const flatbuffers::Vector> *buffers() const - { - return GetPointer> *>(VT_BUFFERS); - } - const flatbuffers::Vector *metadata_buffer() const - { - return GetPointer *>(VT_METADATA_BUFFER); - } - const flatbuffers::Vector> *metadata() const - { - return GetPointer> *>( - VT_METADATA); - } - const flatbuffers::Vector> *signature_defs() const - { - return GetPointer> *>( - VT_SIGNATURE_DEFS); - } - bool Verify(flatbuffers::Verifier &verifier) const - { - return VerifyTableStart(verifier) && VerifyField(verifier, VT_VERSION) && - VerifyOffset(verifier, VT_OPERATOR_CODES) && verifier.VerifyVector(operator_codes()) && - verifier.VerifyVectorOfTables(operator_codes()) && - VerifyOffset(verifier, VT_SUBGRAPHS) && verifier.VerifyVector(subgraphs()) && - verifier.VerifyVectorOfTables(subgraphs()) && VerifyOffset(verifier, VT_DESCRIPTION) && - verifier.VerifyString(description()) && VerifyOffset(verifier, VT_BUFFERS) && - verifier.VerifyVector(buffers()) && verifier.VerifyVectorOfTables(buffers()) && - VerifyOffset(verifier, VT_METADATA_BUFFER) && verifier.VerifyVector(metadata_buffer()) && - VerifyOffset(verifier, VT_METADATA) && verifier.VerifyVector(metadata()) && - verifier.VerifyVectorOfTables(metadata()) && VerifyOffset(verifier, VT_SIGNATURE_DEFS) && - verifier.VerifyVector(signature_defs()) && - verifier.VerifyVectorOfTables(signature_defs()) && verifier.EndTable(); - } - ModelT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; - void UnPackTo(ModelT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; - static flatbuffers::Offset - Pack(flatbuffers::FlatBufferBuilder &_fbb, const ModelT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); -}; +inline flatbuffers::Offset StablehloSortOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloSortOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloSortOptions(_fbb, _o, _rehasher); +} -struct ModelBuilder -{ - typedef Model Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_version(uint32_t version) { fbb_.AddElement(Model::VT_VERSION, version, 0); } - void add_operator_codes( - flatbuffers::Offset>> - operator_codes) - { - fbb_.AddOffset(Model::VT_OPERATOR_CODES, operator_codes); - } - void add_subgraphs( - flatbuffers::Offset>> subgraphs) - { - fbb_.AddOffset(Model::VT_SUBGRAPHS, subgraphs); - } - void add_description(flatbuffers::Offset description) - { - fbb_.AddOffset(Model::VT_DESCRIPTION, description); - } - void - add_buffers(flatbuffers::Offset>> buffers) - { - fbb_.AddOffset(Model::VT_BUFFERS, buffers); - } - void add_metadata_buffer(flatbuffers::Offset> metadata_buffer) - { - fbb_.AddOffset(Model::VT_METADATA_BUFFER, metadata_buffer); - } - void add_metadata( - flatbuffers::Offset>> metadata) - { - fbb_.AddOffset(Model::VT_METADATA, metadata); - } - void add_signature_defs( - flatbuffers::Offset>> - signature_defs) - { - fbb_.AddOffset(Model::VT_SIGNATURE_DEFS, signature_defs); - } - explicit ModelBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) - { - start_ = fbb_.StartTable(); - } - flatbuffers::Offset Finish() - { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); - return o; - } -}; +inline flatbuffers::Offset CreateStablehloSortOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloSortOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloSortOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _dimension = _o->dimension; + auto _is_stable = _o->is_stable; + auto _comparator_subgraph_index = _o->comparator_subgraph_index; + return circle::CreateStablehloSortOptions( + _fbb, + _dimension, + _is_stable, + _comparator_subgraph_index); +} -inline flatbuffers::Offset CreateModel( - flatbuffers::FlatBufferBuilder &_fbb, uint32_t version = 0, - flatbuffers::Offset>> - operator_codes = 0, - flatbuffers::Offset>> subgraphs = 0, - flatbuffers::Offset description = 0, - flatbuffers::Offset>> buffers = 0, - flatbuffers::Offset> metadata_buffer = 0, - flatbuffers::Offset>> metadata = 0, - flatbuffers::Offset>> - signature_defs = 0) -{ - ModelBuilder builder_(_fbb); - builder_.add_signature_defs(signature_defs); - builder_.add_metadata(metadata); - builder_.add_metadata_buffer(metadata_buffer); - builder_.add_buffers(buffers); - builder_.add_description(description); - builder_.add_subgraphs(subgraphs); - builder_.add_operator_codes(operator_codes); - builder_.add_version(version); - return builder_.Finish(); +inline StablehloConcatenateOptionsT *StablehloConcatenateOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloConcatenateOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); } -inline flatbuffers::Offset CreateModelDirect( - flatbuffers::FlatBufferBuilder &_fbb, uint32_t version = 0, - const std::vector> *operator_codes = nullptr, - const std::vector> *subgraphs = nullptr, - const char *description = nullptr, - const std::vector> *buffers = nullptr, - const std::vector *metadata_buffer = nullptr, - const std::vector> *metadata = nullptr, - const std::vector> *signature_defs = nullptr) -{ - auto operator_codes__ = - operator_codes ? _fbb.CreateVector>(*operator_codes) - : 0; - auto subgraphs__ = - subgraphs ? _fbb.CreateVector>(*subgraphs) : 0; - auto description__ = description ? _fbb.CreateString(description) : 0; - auto buffers__ = buffers ? _fbb.CreateVector>(*buffers) : 0; - auto metadata_buffer__ = metadata_buffer ? _fbb.CreateVector(*metadata_buffer) : 0; - auto metadata__ = - metadata ? _fbb.CreateVector>(*metadata) : 0; - auto signature_defs__ = - signature_defs ? _fbb.CreateVector>(*signature_defs) - : 0; - return circle::CreateModel(_fbb, version, operator_codes__, subgraphs__, description__, buffers__, - metadata_buffer__, metadata__, signature_defs__); +inline void StablehloConcatenateOptions::UnPackTo(StablehloConcatenateOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = dimension(); _o->dimension = _e; } } -flatbuffers::Offset CreateModel(flatbuffers::FlatBufferBuilder &_fbb, const ModelT *_o, - const flatbuffers::rehasher_function_t *_rehasher = nullptr); +inline flatbuffers::Offset StablehloConcatenateOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloConcatenateOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloConcatenateOptions(_fbb, _o, _rehasher); +} -inline CustomQuantizationT * -CustomQuantization::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = std::unique_ptr(new CustomQuantizationT()); +inline flatbuffers::Offset CreateStablehloConcatenateOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloConcatenateOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloConcatenateOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _dimension = _o->dimension; + return circle::CreateStablehloConcatenateOptions( + _fbb, + _dimension); +} + +inline StablehloBroadcastInDimOptionsT *StablehloBroadcastInDimOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloBroadcastInDimOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void CustomQuantization::UnPackTo(CustomQuantizationT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StablehloBroadcastInDimOptions::UnPackTo(StablehloBroadcastInDimOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = custom(); - if (_e) - { - _o->custom.resize(_e->size()); - std::copy(_e->begin(), _e->end(), _o->custom.begin()); - } - } + { auto _e = broadcast_dimensions(); if (_e) { _o->broadcast_dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->broadcast_dimensions[_i] = _e->Get(_i); } } } } -inline flatbuffers::Offset -CustomQuantization::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CustomQuantizationT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ - return CreateCustomQuantization(_fbb, _o, _rehasher); +inline flatbuffers::Offset StablehloBroadcastInDimOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloBroadcastInDimOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloBroadcastInDimOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateCustomQuantization(flatbuffers::FlatBufferBuilder &_fbb, const CustomQuantizationT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateStablehloBroadcastInDimOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloBroadcastInDimOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const CustomQuantizationT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - _fbb.ForceVectorAlignment(_o->custom.size(), sizeof(uint8_t), 16); - auto _custom = _o->custom.size() ? _fbb.CreateVector(_o->custom) : 0; - return circle::CreateCustomQuantization(_fbb, _custom); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloBroadcastInDimOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _broadcast_dimensions = _o->broadcast_dimensions.size() ? _fbb.CreateVector(_o->broadcast_dimensions) : 0; + return circle::CreateStablehloBroadcastInDimOptions( + _fbb, + _broadcast_dimensions); } -inline QuantizationParametersT * -QuantizationParameters::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = std::unique_ptr(new QuantizationParametersT()); +inline StablehloCompareOptionsT *StablehloCompareOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloCompareOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -QuantizationParameters::UnPackTo(QuantizationParametersT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StablehloCompareOptions::UnPackTo(StablehloCompareOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = min(); - if (_e) - { - _o->min.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->min[_i] = _e->Get(_i); - } - } - } - { - auto _e = max(); - if (_e) - { - _o->max.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->max[_i] = _e->Get(_i); - } - } - } - { - auto _e = scale(); - if (_e) - { - _o->scale.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->scale[_i] = _e->Get(_i); - } - } - } - { - auto _e = zero_point(); - if (_e) - { - _o->zero_point.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->zero_point[_i] = _e->Get(_i); - } - } - } - { - auto _e = details_type(); - _o->details.type = _e; - } - { - auto _e = details(); - if (_e) - _o->details.value = circle::QuantizationDetailsUnion::UnPack(_e, details_type(), _resolver); - } - { - auto _e = quantized_dimension(); - _o->quantized_dimension = _e; - } -} - -inline flatbuffers::Offset -QuantizationParameters::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const QuantizationParametersT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ - return CreateQuantizationParameters(_fbb, _o, _rehasher); + { auto _e = comparison_direction(); _o->comparison_direction = _e; } + { auto _e = compare_type(); _o->compare_type = _e; } +} + +inline flatbuffers::Offset StablehloCompareOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloCompareOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloCompareOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateQuantizationParameters(flatbuffers::FlatBufferBuilder &_fbb, - const QuantizationParametersT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateStablehloCompareOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloCompareOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const QuantizationParametersT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - auto _min = _o->min.size() ? _fbb.CreateVector(_o->min) : 0; - auto _max = _o->max.size() ? _fbb.CreateVector(_o->max) : 0; - auto _scale = _o->scale.size() ? _fbb.CreateVector(_o->scale) : 0; - auto _zero_point = _o->zero_point.size() ? _fbb.CreateVector(_o->zero_point) : 0; - auto _details_type = _o->details.type; - auto _details = _o->details.Pack(_fbb); - auto _quantized_dimension = _o->quantized_dimension; - return circle::CreateQuantizationParameters(_fbb, _min, _max, _scale, _zero_point, _details_type, - _details, _quantized_dimension); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloCompareOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _comparison_direction = _o->comparison_direction; + auto _compare_type = _o->compare_type; + return circle::CreateStablehloCompareOptions( + _fbb, + _comparison_direction, + _compare_type); } -inline Int32VectorT *Int32Vector::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = std::unique_ptr(new Int32VectorT()); +inline StablehloDynamicSliceOptionsT *StablehloDynamicSliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloDynamicSliceOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Int32Vector::UnPackTo(Int32VectorT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StablehloDynamicSliceOptions::UnPackTo(StablehloDynamicSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = values(); - if (_e) - { - _o->values.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->values[_i] = _e->Get(_i); - } - } - } + { auto _e = slice_sizes(); if (_e) { _o->slice_sizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slice_sizes[_i] = _e->Get(_i); } } } } -inline flatbuffers::Offset -Int32Vector::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Int32VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ - return CreateInt32Vector(_fbb, _o, _rehasher); +inline flatbuffers::Offset StablehloDynamicSliceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloDynamicSliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloDynamicSliceOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateInt32Vector(flatbuffers::FlatBufferBuilder &_fbb, const Int32VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateStablehloDynamicSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloDynamicSliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const Int32VectorT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - auto _values = _o->values.size() ? _fbb.CreateVector(_o->values) : 0; - return circle::CreateInt32Vector(_fbb, _values); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloDynamicSliceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _slice_sizes = _o->slice_sizes.size() ? _fbb.CreateVector(_o->slice_sizes) : 0; + return circle::CreateStablehloDynamicSliceOptions( + _fbb, + _slice_sizes); } -inline Uint16VectorT *Uint16Vector::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = std::unique_ptr(new Uint16VectorT()); +inline StablehloPadOptionsT *StablehloPadOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloPadOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Uint16Vector::UnPackTo(Uint16VectorT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StablehloPadOptions::UnPackTo(StablehloPadOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = values(); - if (_e) - { - _o->values.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->values[_i] = _e->Get(_i); - } - } - } + { auto _e = edge_padding_low(); if (_e) { _o->edge_padding_low.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->edge_padding_low[_i] = _e->Get(_i); } } } + { auto _e = edge_padding_high(); if (_e) { _o->edge_padding_high.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->edge_padding_high[_i] = _e->Get(_i); } } } + { auto _e = interior_padding(); if (_e) { _o->interior_padding.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->interior_padding[_i] = _e->Get(_i); } } } } -inline flatbuffers::Offset -Uint16Vector::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Uint16VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ - return CreateUint16Vector(_fbb, _o, _rehasher); +inline flatbuffers::Offset StablehloPadOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloPadOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloPadOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateUint16Vector(flatbuffers::FlatBufferBuilder &_fbb, const Uint16VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateStablehloPadOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloPadOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const Uint16VectorT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - _fbb.ForceVectorAlignment(_o->values.size(), sizeof(uint16_t), 4); - auto _values = _o->values.size() ? _fbb.CreateVector(_o->values) : 0; - return circle::CreateUint16Vector(_fbb, _values); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloPadOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _edge_padding_low = _o->edge_padding_low.size() ? _fbb.CreateVector(_o->edge_padding_low) : 0; + auto _edge_padding_high = _o->edge_padding_high.size() ? _fbb.CreateVector(_o->edge_padding_high) : 0; + auto _interior_padding = _o->interior_padding.size() ? _fbb.CreateVector(_o->interior_padding) : 0; + return circle::CreateStablehloPadOptions( + _fbb, + _edge_padding_low, + _edge_padding_high, + _interior_padding); } -inline Uint8VectorT *Uint8Vector::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = std::unique_ptr(new Uint8VectorT()); +inline StablehloIotaOptionsT *StablehloIotaOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloIotaOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Uint8Vector::UnPackTo(Uint8VectorT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StablehloIotaOptions::UnPackTo(StablehloIotaOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = values(); - if (_e) - { - _o->values.resize(_e->size()); - std::copy(_e->begin(), _e->end(), _o->values.begin()); - } - } + { auto _e = iota_dimension(); _o->iota_dimension = _e; } } -inline flatbuffers::Offset -Uint8Vector::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Uint8VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ - return CreateUint8Vector(_fbb, _o, _rehasher); +inline flatbuffers::Offset StablehloIotaOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloIotaOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloIotaOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateUint8Vector(flatbuffers::FlatBufferBuilder &_fbb, const Uint8VectorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateStablehloIotaOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloIotaOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const Uint8VectorT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - _fbb.ForceVectorAlignment(_o->values.size(), sizeof(uint8_t), 4); - auto _values = _o->values.size() ? _fbb.CreateVector(_o->values) : 0; - return circle::CreateUint8Vector(_fbb, _values); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloIotaOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _iota_dimension = _o->iota_dimension; + return circle::CreateStablehloIotaOptions( + _fbb, + _iota_dimension); } -inline DimensionMetadataT * -DimensionMetadata::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = std::unique_ptr(new DimensionMetadataT()); +inline StablehloCustomCallOptionsT *StablehloCustomCallOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloCustomCallOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void DimensionMetadata::UnPackTo(DimensionMetadataT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StablehloCustomCallOptions::UnPackTo(StablehloCustomCallOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = format(); - _o->format = _e; - } - { - auto _e = dense_size(); - _o->dense_size = _e; - } - { - auto _e = array_segments_type(); - _o->array_segments.type = _e; - } - { - auto _e = array_segments(); - if (_e) - _o->array_segments.value = - circle::SparseIndexVectorUnion::UnPack(_e, array_segments_type(), _resolver); - } - { - auto _e = array_indices_type(); - _o->array_indices.type = _e; - } - { - auto _e = array_indices(); - if (_e) - _o->array_indices.value = - circle::SparseIndexVectorUnion::UnPack(_e, array_indices_type(), _resolver); - } + { auto _e = call_target_name(); if (_e) _o->call_target_name = _e->str(); } + { auto _e = has_side_effect(); _o->has_side_effect = _e; } + { auto _e = backend_config(); if (_e) _o->backend_config = _e->str(); } + { auto _e = api_version(); _o->api_version = _e; } + { auto _e = called_computations(); if (_e) { _o->called_computations.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->called_computations[_i] = _e->Get(_i); } } } + { auto _e = custom_attributes(); if (_e) { _o->custom_attributes.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->custom_attributes.begin()); } } } -inline flatbuffers::Offset -DimensionMetadata::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DimensionMetadataT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ - return CreateDimensionMetadata(_fbb, _o, _rehasher); +inline flatbuffers::Offset StablehloCustomCallOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloCustomCallOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloCustomCallOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateDimensionMetadata(flatbuffers::FlatBufferBuilder &_fbb, const DimensionMetadataT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateStablehloCustomCallOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloCustomCallOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const DimensionMetadataT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - auto _format = _o->format; - auto _dense_size = _o->dense_size; - auto _array_segments_type = _o->array_segments.type; - auto _array_segments = _o->array_segments.Pack(_fbb); - auto _array_indices_type = _o->array_indices.type; - auto _array_indices = _o->array_indices.Pack(_fbb); - return circle::CreateDimensionMetadata(_fbb, _format, _dense_size, _array_segments_type, - _array_segments, _array_indices_type, _array_indices); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloCustomCallOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _call_target_name = _o->call_target_name.empty() ? 0 : _fbb.CreateString(_o->call_target_name); + auto _has_side_effect = _o->has_side_effect; + auto _backend_config = _o->backend_config.empty() ? 0 : _fbb.CreateString(_o->backend_config); + auto _api_version = _o->api_version; + auto _called_computations = _o->called_computations.size() ? _fbb.CreateVector(_o->called_computations) : 0; + auto _custom_attributes = _o->custom_attributes.size() ? _fbb.CreateVector(_o->custom_attributes) : 0; + return circle::CreateStablehloCustomCallOptions( + _fbb, + _call_target_name, + _has_side_effect, + _backend_config, + _api_version, + _called_computations, + _custom_attributes); +} + +inline StablehloReduceOptionsT *StablehloReduceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloReduceOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void StablehloReduceOptions::UnPackTo(StablehloReduceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = dimensions(); if (_e) { _o->dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dimensions[_i] = _e->Get(_i); } } } + { auto _e = body_subgraph_index(); _o->body_subgraph_index = _e; } +} + +inline flatbuffers::Offset StablehloReduceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloReduceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloReduceOptions(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateStablehloReduceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloReduceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloReduceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _dimensions = _o->dimensions.size() ? _fbb.CreateVector(_o->dimensions) : 0; + auto _body_subgraph_index = _o->body_subgraph_index; + return circle::CreateStablehloReduceOptions( + _fbb, + _dimensions, + _body_subgraph_index); +} + +inline StablehloSliceOptionsT *StablehloSliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloSliceOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void StablehloSliceOptions::UnPackTo(StablehloSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = start_indices(); if (_e) { _o->start_indices.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->start_indices[_i] = _e->Get(_i); } } } + { auto _e = limit_indices(); if (_e) { _o->limit_indices.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->limit_indices[_i] = _e->Get(_i); } } } + { auto _e = strides(); if (_e) { _o->strides.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->strides[_i] = _e->Get(_i); } } } +} + +inline flatbuffers::Offset StablehloSliceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloSliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloSliceOptions(_fbb, _o, _rehasher); } -inline SparsityParametersT * -SparsityParameters::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = std::unique_ptr(new SparsityParametersT()); +inline flatbuffers::Offset CreateStablehloSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloSliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloSliceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _start_indices = _o->start_indices.size() ? _fbb.CreateVector(_o->start_indices) : 0; + auto _limit_indices = _o->limit_indices.size() ? _fbb.CreateVector(_o->limit_indices) : 0; + auto _strides = _o->strides.size() ? _fbb.CreateVector(_o->strides) : 0; + return circle::CreateStablehloSliceOptions( + _fbb, + _start_indices, + _limit_indices, + _strides); +} + +inline StablehloConvolutionOptionsT *StablehloConvolutionOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloConvolutionOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SparsityParameters::UnPackTo(SparsityParametersT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StablehloConvolutionOptions::UnPackTo(StablehloConvolutionOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = traversal_order(); - if (_e) - { - _o->traversal_order.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->traversal_order[_i] = _e->Get(_i); - } - } - } - { - auto _e = block_map(); - if (_e) - { - _o->block_map.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->block_map[_i] = _e->Get(_i); - } - } - } - { - auto _e = dim_metadata(); - if (_e) - { - _o->dim_metadata.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->dim_metadata[_i] = - std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } -} - -inline flatbuffers::Offset -SparsityParameters::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparsityParametersT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ - return CreateSparsityParameters(_fbb, _o, _rehasher); -} - -inline flatbuffers::Offset -CreateSparsityParameters(flatbuffers::FlatBufferBuilder &_fbb, const SparsityParametersT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ + { auto _e = window_strides(); if (_e) { _o->window_strides.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->window_strides[_i] = _e->Get(_i); } } } + { auto _e = padding(); if (_e) { _o->padding.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->padding[_i] = _e->Get(_i); } } } + { auto _e = lhs_dilation(); if (_e) { _o->lhs_dilation.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->lhs_dilation[_i] = _e->Get(_i); } } } + { auto _e = rhs_dilation(); if (_e) { _o->rhs_dilation.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->rhs_dilation[_i] = _e->Get(_i); } } } + { auto _e = window_reversal(); if (_e) { _o->window_reversal.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->window_reversal[_i] = _e->Get(_i) != 0; } } } + { auto _e = input_batch_dimension(); _o->input_batch_dimension = _e; } + { auto _e = input_feature_dimension(); _o->input_feature_dimension = _e; } + { auto _e = input_spatial_dimensions(); if (_e) { _o->input_spatial_dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->input_spatial_dimensions[_i] = _e->Get(_i); } } } + { auto _e = kernel_input_feature_dimension(); _o->kernel_input_feature_dimension = _e; } + { auto _e = kernel_output_feature_dimension(); _o->kernel_output_feature_dimension = _e; } + { auto _e = kernel_spatial_dimensions(); if (_e) { _o->kernel_spatial_dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->kernel_spatial_dimensions[_i] = _e->Get(_i); } } } + { auto _e = output_batch_dimension(); _o->output_batch_dimension = _e; } + { auto _e = output_feature_dimension(); _o->output_feature_dimension = _e; } + { auto _e = output_spatial_dimensions(); if (_e) { _o->output_spatial_dimensions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->output_spatial_dimensions[_i] = _e->Get(_i); } } } + { auto _e = feature_group_count(); _o->feature_group_count = _e; } + { auto _e = batch_group_count(); _o->batch_group_count = _e; } + { auto _e = precision_config(); if (_e) { _o->precision_config.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->precision_config[_i] = static_cast(_e->Get(_i)); } } } +} + +inline flatbuffers::Offset StablehloConvolutionOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloConvolutionOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloConvolutionOptions(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateStablehloConvolutionOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloConvolutionOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SparsityParametersT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - auto _traversal_order = _o->traversal_order.size() ? _fbb.CreateVector(_o->traversal_order) : 0; - auto _block_map = _o->block_map.size() ? _fbb.CreateVector(_o->block_map) : 0; - auto _dim_metadata = _o->dim_metadata.size() - ? _fbb.CreateVector>( - _o->dim_metadata.size(), - [](size_t i, _VectorArgs *__va) { - return CreateDimensionMetadata( - *__va->__fbb, __va->__o->dim_metadata[i].get(), __va->__rehasher); - }, - &_va) - : 0; - return circle::CreateSparsityParameters(_fbb, _traversal_order, _block_map, _dim_metadata); -} - -inline VariantSubTypeT * -VariantSubType::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = std::unique_ptr(new VariantSubTypeT()); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloConvolutionOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _window_strides = _o->window_strides.size() ? _fbb.CreateVector(_o->window_strides) : 0; + auto _padding = _o->padding.size() ? _fbb.CreateVector(_o->padding) : 0; + auto _lhs_dilation = _o->lhs_dilation.size() ? _fbb.CreateVector(_o->lhs_dilation) : 0; + auto _rhs_dilation = _o->rhs_dilation.size() ? _fbb.CreateVector(_o->rhs_dilation) : 0; + auto _window_reversal = _o->window_reversal.size() ? _fbb.CreateVector(_o->window_reversal) : 0; + auto _input_batch_dimension = _o->input_batch_dimension; + auto _input_feature_dimension = _o->input_feature_dimension; + auto _input_spatial_dimensions = _o->input_spatial_dimensions.size() ? _fbb.CreateVector(_o->input_spatial_dimensions) : 0; + auto _kernel_input_feature_dimension = _o->kernel_input_feature_dimension; + auto _kernel_output_feature_dimension = _o->kernel_output_feature_dimension; + auto _kernel_spatial_dimensions = _o->kernel_spatial_dimensions.size() ? _fbb.CreateVector(_o->kernel_spatial_dimensions) : 0; + auto _output_batch_dimension = _o->output_batch_dimension; + auto _output_feature_dimension = _o->output_feature_dimension; + auto _output_spatial_dimensions = _o->output_spatial_dimensions.size() ? _fbb.CreateVector(_o->output_spatial_dimensions) : 0; + auto _feature_group_count = _o->feature_group_count; + auto _batch_group_count = _o->batch_group_count; + auto _precision_config = _o->precision_config.size() ? _fbb.CreateVectorScalarCast(flatbuffers::data(_o->precision_config), _o->precision_config.size()) : 0; + return circle::CreateStablehloConvolutionOptions( + _fbb, + _window_strides, + _padding, + _lhs_dilation, + _rhs_dilation, + _window_reversal, + _input_batch_dimension, + _input_feature_dimension, + _input_spatial_dimensions, + _kernel_input_feature_dimension, + _kernel_output_feature_dimension, + _kernel_spatial_dimensions, + _output_batch_dimension, + _output_feature_dimension, + _output_spatial_dimensions, + _feature_group_count, + _batch_group_count, + _precision_config); +} + +inline StablehloScatterOptionsT *StablehloScatterOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloScatterOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void VariantSubType::UnPackTo(VariantSubTypeT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StablehloScatterOptions::UnPackTo(StablehloScatterOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = shape(); - if (_e) - { - _o->shape.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->shape[_i] = _e->Get(_i); - } - } - } - { - auto _e = type(); - _o->type = _e; - } - { - auto _e = has_rank(); - _o->has_rank = _e; - } + { auto _e = indices_are_sorted(); _o->indices_are_sorted = _e; } + { auto _e = update_window_dims(); if (_e) { _o->update_window_dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->update_window_dims[_i] = _e->Get(_i); } } } + { auto _e = inserted_window_dims(); if (_e) { _o->inserted_window_dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inserted_window_dims[_i] = _e->Get(_i); } } } + { auto _e = scatter_dims_to_operand_dims(); if (_e) { _o->scatter_dims_to_operand_dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->scatter_dims_to_operand_dims[_i] = _e->Get(_i); } } } + { auto _e = index_vector_dim(); _o->index_vector_dim = _e; } + { auto _e = unique_indices(); _o->unique_indices = _e; } + { auto _e = update_computation_subgraph_index(); _o->update_computation_subgraph_index = _e; } } -inline flatbuffers::Offset -VariantSubType::Pack(flatbuffers::FlatBufferBuilder &_fbb, const VariantSubTypeT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ - return CreateVariantSubType(_fbb, _o, _rehasher); +inline flatbuffers::Offset StablehloScatterOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloScatterOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloScatterOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateVariantSubType(flatbuffers::FlatBufferBuilder &_fbb, const VariantSubTypeT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateStablehloScatterOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloScatterOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const VariantSubTypeT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - auto _shape = _o->shape.size() ? _fbb.CreateVector(_o->shape) : 0; - auto _type = _o->type; - auto _has_rank = _o->has_rank; - return circle::CreateVariantSubType(_fbb, _shape, _type, _has_rank); -} - -inline TensorT *Tensor::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = std::unique_ptr(new TensorT()); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloScatterOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _indices_are_sorted = _o->indices_are_sorted; + auto _update_window_dims = _o->update_window_dims.size() ? _fbb.CreateVector(_o->update_window_dims) : 0; + auto _inserted_window_dims = _o->inserted_window_dims.size() ? _fbb.CreateVector(_o->inserted_window_dims) : 0; + auto _scatter_dims_to_operand_dims = _o->scatter_dims_to_operand_dims.size() ? _fbb.CreateVector(_o->scatter_dims_to_operand_dims) : 0; + auto _index_vector_dim = _o->index_vector_dim; + auto _unique_indices = _o->unique_indices; + auto _update_computation_subgraph_index = _o->update_computation_subgraph_index; + return circle::CreateStablehloScatterOptions( + _fbb, + _indices_are_sorted, + _update_window_dims, + _inserted_window_dims, + _scatter_dims_to_operand_dims, + _index_vector_dim, + _unique_indices, + _update_computation_subgraph_index); +} + +inline StablehloRngBitGeneratorOptionsT *StablehloRngBitGeneratorOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new StablehloRngBitGeneratorOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Tensor::UnPackTo(TensorT *_o, const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StablehloRngBitGeneratorOptions::UnPackTo(StablehloRngBitGeneratorOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = shape(); - if (_e) - { - _o->shape.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->shape[_i] = _e->Get(_i); - } - } - } - { - auto _e = type(); - _o->type = _e; - } - { - auto _e = buffer(); - _o->buffer = _e; - } - { - auto _e = name(); - if (_e) - _o->name = _e->str(); - } - { - auto _e = quantization(); - if (_e) - _o->quantization = std::unique_ptr(_e->UnPack(_resolver)); - } - { - auto _e = is_variable(); - _o->is_variable = _e; - } - { - auto _e = sparsity(); - if (_e) - _o->sparsity = std::unique_ptr(_e->UnPack(_resolver)); - } - { - auto _e = shape_signature(); - if (_e) - { - _o->shape_signature.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->shape_signature[_i] = _e->Get(_i); - } - } - } - { - auto _e = has_rank(); - _o->has_rank = _e; - } - { - auto _e = variant_tensors(); - if (_e) - { - _o->variant_tensors.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->variant_tensors[_i] = - std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } -} - -inline flatbuffers::Offset Tensor::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const TensorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ - return CreateTensor(_fbb, _o, _rehasher); + { auto _e = algorithm(); _o->algorithm = _e; } } -inline flatbuffers::Offset CreateTensor(flatbuffers::FlatBufferBuilder &_fbb, - const TensorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset StablehloRngBitGeneratorOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StablehloRngBitGeneratorOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateStablehloRngBitGeneratorOptions(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateStablehloRngBitGeneratorOptions(flatbuffers::FlatBufferBuilder &_fbb, const StablehloRngBitGeneratorOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const TensorT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - auto _shape = _o->shape.size() ? _fbb.CreateVector(_o->shape) : 0; - auto _type = _o->type; - auto _buffer = _o->buffer; - auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); - auto _quantization = - _o->quantization ? CreateQuantizationParameters(_fbb, _o->quantization.get(), _rehasher) : 0; - auto _is_variable = _o->is_variable; - auto _sparsity = _o->sparsity ? CreateSparsityParameters(_fbb, _o->sparsity.get(), _rehasher) : 0; - auto _shape_signature = _o->shape_signature.size() ? _fbb.CreateVector(_o->shape_signature) : 0; - auto _has_rank = _o->has_rank; - auto _variant_tensors = - _o->variant_tensors.size() - ? _fbb.CreateVector>( - _o->variant_tensors.size(), - [](size_t i, _VectorArgs *__va) { - return CreateVariantSubType(*__va->__fbb, __va->__o->variant_tensors[i].get(), - __va->__rehasher); - }, - &_va) - : 0; - return circle::CreateTensor(_fbb, _shape, _type, _buffer, _name, _quantization, _is_variable, - _sparsity, _shape_signature, _has_rank, _variant_tensors); -} - -inline Conv2DOptionsT * -Conv2DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StablehloRngBitGeneratorOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _algorithm = _o->algorithm; + return circle::CreateStablehloRngBitGeneratorOptions( + _fbb, + _algorithm); +} + +inline Conv2DOptionsT *Conv2DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new Conv2DOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Conv2DOptions::UnPackTo(Conv2DOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void Conv2DOptions::UnPackTo(Conv2DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = padding(); - _o->padding = _e; - } - { - auto _e = stride_w(); - _o->stride_w = _e; - } - { - auto _e = stride_h(); - _o->stride_h = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = dilation_w_factor(); - _o->dilation_w_factor = _e; - } - { - auto _e = dilation_h_factor(); - _o->dilation_h_factor = _e; - } + { auto _e = padding(); _o->padding = _e; } + { auto _e = stride_w(); _o->stride_w = _e; } + { auto _e = stride_h(); _o->stride_h = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = dilation_w_factor(); _o->dilation_w_factor = _e; } + { auto _e = dilation_h_factor(); _o->dilation_h_factor = _e; } + { auto _e = quantized_bias_type(); _o->quantized_bias_type = _e; } } -inline flatbuffers::Offset -Conv2DOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Conv2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset Conv2DOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Conv2DOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateConv2DOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateConv2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Conv2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateConv2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Conv2DOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const Conv2DOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const Conv2DOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _padding = _o->padding; auto _stride_w = _o->stride_w; auto _stride_h = _o->stride_h; auto _fused_activation_function = _o->fused_activation_function; auto _dilation_w_factor = _o->dilation_w_factor; auto _dilation_h_factor = _o->dilation_h_factor; - return circle::CreateConv2DOptions(_fbb, _padding, _stride_w, _stride_h, - _fused_activation_function, _dilation_w_factor, - _dilation_h_factor); -} - -inline Conv3DOptionsT * -Conv3DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ + auto _quantized_bias_type = _o->quantized_bias_type; + return circle::CreateConv2DOptions( + _fbb, + _padding, + _stride_w, + _stride_h, + _fused_activation_function, + _dilation_w_factor, + _dilation_h_factor, + _quantized_bias_type); +} + +inline Conv3DOptionsT *Conv3DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new Conv3DOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Conv3DOptions::UnPackTo(Conv3DOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void Conv3DOptions::UnPackTo(Conv3DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = padding(); - _o->padding = _e; - } - { - auto _e = stride_d(); - _o->stride_d = _e; - } - { - auto _e = stride_w(); - _o->stride_w = _e; - } - { - auto _e = stride_h(); - _o->stride_h = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = dilation_d_factor(); - _o->dilation_d_factor = _e; - } - { - auto _e = dilation_w_factor(); - _o->dilation_w_factor = _e; - } - { - auto _e = dilation_h_factor(); - _o->dilation_h_factor = _e; - } + { auto _e = padding(); _o->padding = _e; } + { auto _e = stride_d(); _o->stride_d = _e; } + { auto _e = stride_w(); _o->stride_w = _e; } + { auto _e = stride_h(); _o->stride_h = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = dilation_d_factor(); _o->dilation_d_factor = _e; } + { auto _e = dilation_w_factor(); _o->dilation_w_factor = _e; } + { auto _e = dilation_h_factor(); _o->dilation_h_factor = _e; } } -inline flatbuffers::Offset -Conv3DOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Conv3DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset Conv3DOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Conv3DOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateConv3DOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateConv3DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Conv3DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateConv3DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Conv3DOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const Conv3DOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const Conv3DOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _padding = _o->padding; auto _stride_d = _o->stride_d; auto _stride_w = _o->stride_w; @@ -17045,146 +17401,85 @@ CreateConv3DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Conv3DOptionsT * auto _dilation_d_factor = _o->dilation_d_factor; auto _dilation_w_factor = _o->dilation_w_factor; auto _dilation_h_factor = _o->dilation_h_factor; - return circle::CreateConv3DOptions(_fbb, _padding, _stride_d, _stride_w, _stride_h, - _fused_activation_function, _dilation_d_factor, - _dilation_w_factor, _dilation_h_factor); -} - -inline Pool2DOptionsT * -Pool2DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ + return circle::CreateConv3DOptions( + _fbb, + _padding, + _stride_d, + _stride_w, + _stride_h, + _fused_activation_function, + _dilation_d_factor, + _dilation_w_factor, + _dilation_h_factor); +} + +inline Pool2DOptionsT *Pool2DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new Pool2DOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Pool2DOptions::UnPackTo(Pool2DOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void Pool2DOptions::UnPackTo(Pool2DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = padding(); - _o->padding = _e; - } - { - auto _e = stride_w(); - _o->stride_w = _e; - } - { - auto _e = stride_h(); - _o->stride_h = _e; - } - { - auto _e = filter_width(); - _o->filter_width = _e; - } - { - auto _e = filter_height(); - _o->filter_height = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } + { auto _e = padding(); _o->padding = _e; } + { auto _e = stride_w(); _o->stride_w = _e; } + { auto _e = stride_h(); _o->stride_h = _e; } + { auto _e = filter_width(); _o->filter_width = _e; } + { auto _e = filter_height(); _o->filter_height = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } } -inline flatbuffers::Offset -Pool2DOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Pool2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset Pool2DOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Pool2DOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreatePool2DOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreatePool2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Pool2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreatePool2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const Pool2DOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const Pool2DOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const Pool2DOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _padding = _o->padding; auto _stride_w = _o->stride_w; auto _stride_h = _o->stride_h; auto _filter_width = _o->filter_width; auto _filter_height = _o->filter_height; auto _fused_activation_function = _o->fused_activation_function; - return circle::CreatePool2DOptions(_fbb, _padding, _stride_w, _stride_h, _filter_width, - _filter_height, _fused_activation_function); + return circle::CreatePool2DOptions( + _fbb, + _padding, + _stride_w, + _stride_h, + _filter_width, + _filter_height, + _fused_activation_function); } -inline DepthwiseConv2DOptionsT * -DepthwiseConv2DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline DepthwiseConv2DOptionsT *DepthwiseConv2DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new DepthwiseConv2DOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -DepthwiseConv2DOptions::UnPackTo(DepthwiseConv2DOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void DepthwiseConv2DOptions::UnPackTo(DepthwiseConv2DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = padding(); - _o->padding = _e; - } - { - auto _e = stride_w(); - _o->stride_w = _e; - } - { - auto _e = stride_h(); - _o->stride_h = _e; - } - { - auto _e = depth_multiplier(); - _o->depth_multiplier = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = dilation_w_factor(); - _o->dilation_w_factor = _e; - } - { - auto _e = dilation_h_factor(); - _o->dilation_h_factor = _e; - } + { auto _e = padding(); _o->padding = _e; } + { auto _e = stride_w(); _o->stride_w = _e; } + { auto _e = stride_h(); _o->stride_h = _e; } + { auto _e = depth_multiplier(); _o->depth_multiplier = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = dilation_w_factor(); _o->dilation_w_factor = _e; } + { auto _e = dilation_h_factor(); _o->dilation_h_factor = _e; } } -inline flatbuffers::Offset -DepthwiseConv2DOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const DepthwiseConv2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset DepthwiseConv2DOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DepthwiseConv2DOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateDepthwiseConv2DOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateDepthwiseConv2DOptions(flatbuffers::FlatBufferBuilder &_fbb, - const DepthwiseConv2DOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateDepthwiseConv2DOptions(flatbuffers::FlatBufferBuilder &_fbb, const DepthwiseConv2DOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const DepthwiseConv2DOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const DepthwiseConv2DOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _padding = _o->padding; auto _stride_w = _o->stride_w; auto _stride_h = _o->stride_h; @@ -17192,814 +17487,475 @@ CreateDepthwiseConv2DOptions(flatbuffers::FlatBufferBuilder &_fbb, auto _fused_activation_function = _o->fused_activation_function; auto _dilation_w_factor = _o->dilation_w_factor; auto _dilation_h_factor = _o->dilation_h_factor; - return circle::CreateDepthwiseConv2DOptions(_fbb, _padding, _stride_w, _stride_h, - _depth_multiplier, _fused_activation_function, - _dilation_w_factor, _dilation_h_factor); -} - -inline ConcatEmbeddingsOptionsT * -ConcatEmbeddingsOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ + return circle::CreateDepthwiseConv2DOptions( + _fbb, + _padding, + _stride_w, + _stride_h, + _depth_multiplier, + _fused_activation_function, + _dilation_w_factor, + _dilation_h_factor); +} + +inline ConcatEmbeddingsOptionsT *ConcatEmbeddingsOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ConcatEmbeddingsOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -ConcatEmbeddingsOptions::UnPackTo(ConcatEmbeddingsOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ConcatEmbeddingsOptions::UnPackTo(ConcatEmbeddingsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = num_channels(); - _o->num_channels = _e; - } - { - auto _e = num_columns_per_channel(); - if (_e) - { - _o->num_columns_per_channel.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->num_columns_per_channel[_i] = _e->Get(_i); - } - } - } - { - auto _e = embedding_dim_per_channel(); - if (_e) - { - _o->embedding_dim_per_channel.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->embedding_dim_per_channel[_i] = _e->Get(_i); - } - } - } -} - -inline flatbuffers::Offset -ConcatEmbeddingsOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const ConcatEmbeddingsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ + { auto _e = num_channels(); _o->num_channels = _e; } + { auto _e = num_columns_per_channel(); if (_e) { _o->num_columns_per_channel.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->num_columns_per_channel[_i] = _e->Get(_i); } } } + { auto _e = embedding_dim_per_channel(); if (_e) { _o->embedding_dim_per_channel.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->embedding_dim_per_channel[_i] = _e->Get(_i); } } } +} + +inline flatbuffers::Offset ConcatEmbeddingsOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ConcatEmbeddingsOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateConcatEmbeddingsOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateConcatEmbeddingsOptions(flatbuffers::FlatBufferBuilder &_fbb, - const ConcatEmbeddingsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateConcatEmbeddingsOptions(flatbuffers::FlatBufferBuilder &_fbb, const ConcatEmbeddingsOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ConcatEmbeddingsOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ConcatEmbeddingsOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _num_channels = _o->num_channels; - auto _num_columns_per_channel = - _o->num_columns_per_channel.size() ? _fbb.CreateVector(_o->num_columns_per_channel) : 0; - auto _embedding_dim_per_channel = - _o->embedding_dim_per_channel.size() ? _fbb.CreateVector(_o->embedding_dim_per_channel) : 0; - return circle::CreateConcatEmbeddingsOptions(_fbb, _num_channels, _num_columns_per_channel, - _embedding_dim_per_channel); + auto _num_columns_per_channel = _o->num_columns_per_channel.size() ? _fbb.CreateVector(_o->num_columns_per_channel) : 0; + auto _embedding_dim_per_channel = _o->embedding_dim_per_channel.size() ? _fbb.CreateVector(_o->embedding_dim_per_channel) : 0; + return circle::CreateConcatEmbeddingsOptions( + _fbb, + _num_channels, + _num_columns_per_channel, + _embedding_dim_per_channel); } -inline LSHProjectionOptionsT * -LSHProjectionOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline LSHProjectionOptionsT *LSHProjectionOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new LSHProjectionOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void LSHProjectionOptions::UnPackTo(LSHProjectionOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LSHProjectionOptions::UnPackTo(LSHProjectionOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = type(); - _o->type = _e; - } + { auto _e = type(); _o->type = _e; } } -inline flatbuffers::Offset -LSHProjectionOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSHProjectionOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LSHProjectionOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSHProjectionOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLSHProjectionOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLSHProjectionOptions(flatbuffers::FlatBufferBuilder &_fbb, const LSHProjectionOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLSHProjectionOptions(flatbuffers::FlatBufferBuilder &_fbb, const LSHProjectionOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LSHProjectionOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LSHProjectionOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _type = _o->type; - return circle::CreateLSHProjectionOptions(_fbb, _type); + return circle::CreateLSHProjectionOptions( + _fbb, + _type); } -inline SVDFOptionsT *SVDFOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SVDFOptionsT *SVDFOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SVDFOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SVDFOptions::UnPackTo(SVDFOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SVDFOptions::UnPackTo(SVDFOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = rank(); - _o->rank = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = asymmetric_quantize_inputs(); - _o->asymmetric_quantize_inputs = _e; - } + { auto _e = rank(); _o->rank = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = asymmetric_quantize_inputs(); _o->asymmetric_quantize_inputs = _e; } } -inline flatbuffers::Offset -SVDFOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SVDFOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SVDFOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SVDFOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSVDFOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSVDFOptions(flatbuffers::FlatBufferBuilder &_fbb, const SVDFOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSVDFOptions(flatbuffers::FlatBufferBuilder &_fbb, const SVDFOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SVDFOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SVDFOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _rank = _o->rank; auto _fused_activation_function = _o->fused_activation_function; auto _asymmetric_quantize_inputs = _o->asymmetric_quantize_inputs; - return circle::CreateSVDFOptions(_fbb, _rank, _fused_activation_function, - _asymmetric_quantize_inputs); + return circle::CreateSVDFOptions( + _fbb, + _rank, + _fused_activation_function, + _asymmetric_quantize_inputs); } -inline RNNOptionsT *RNNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline RNNOptionsT *RNNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new RNNOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void RNNOptions::UnPackTo(RNNOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void RNNOptions::UnPackTo(RNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = asymmetric_quantize_inputs(); - _o->asymmetric_quantize_inputs = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = asymmetric_quantize_inputs(); _o->asymmetric_quantize_inputs = _e; } } -inline flatbuffers::Offset -RNNOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset RNNOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RNNOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateRNNOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const RNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const RNNOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const RNNOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const RNNOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; auto _asymmetric_quantize_inputs = _o->asymmetric_quantize_inputs; - return circle::CreateRNNOptions(_fbb, _fused_activation_function, _asymmetric_quantize_inputs); + return circle::CreateRNNOptions( + _fbb, + _fused_activation_function, + _asymmetric_quantize_inputs); } -inline SequenceRNNOptionsT * -SequenceRNNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SequenceRNNOptionsT *SequenceRNNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SequenceRNNOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SequenceRNNOptions::UnPackTo(SequenceRNNOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SequenceRNNOptions::UnPackTo(SequenceRNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = time_major(); - _o->time_major = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = asymmetric_quantize_inputs(); - _o->asymmetric_quantize_inputs = _e; - } + { auto _e = time_major(); _o->time_major = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = asymmetric_quantize_inputs(); _o->asymmetric_quantize_inputs = _e; } } -inline flatbuffers::Offset -SequenceRNNOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SequenceRNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SequenceRNNOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SequenceRNNOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSequenceRNNOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSequenceRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const SequenceRNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSequenceRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const SequenceRNNOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SequenceRNNOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SequenceRNNOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _time_major = _o->time_major; auto _fused_activation_function = _o->fused_activation_function; auto _asymmetric_quantize_inputs = _o->asymmetric_quantize_inputs; - return circle::CreateSequenceRNNOptions(_fbb, _time_major, _fused_activation_function, - _asymmetric_quantize_inputs); + return circle::CreateSequenceRNNOptions( + _fbb, + _time_major, + _fused_activation_function, + _asymmetric_quantize_inputs); } -inline BidirectionalSequenceRNNOptionsT * -BidirectionalSequenceRNNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = - std::unique_ptr(new BidirectionalSequenceRNNOptionsT()); +inline BidirectionalSequenceRNNOptionsT *BidirectionalSequenceRNNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new BidirectionalSequenceRNNOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -BidirectionalSequenceRNNOptions::UnPackTo(BidirectionalSequenceRNNOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BidirectionalSequenceRNNOptions::UnPackTo(BidirectionalSequenceRNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = time_major(); - _o->time_major = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = merge_outputs(); - _o->merge_outputs = _e; - } - { - auto _e = asymmetric_quantize_inputs(); - _o->asymmetric_quantize_inputs = _e; - } + { auto _e = time_major(); _o->time_major = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = merge_outputs(); _o->merge_outputs = _e; } + { auto _e = asymmetric_quantize_inputs(); _o->asymmetric_quantize_inputs = _e; } } -inline flatbuffers::Offset -BidirectionalSequenceRNNOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const BidirectionalSequenceRNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BidirectionalSequenceRNNOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceRNNOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBidirectionalSequenceRNNOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBidirectionalSequenceRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, - const BidirectionalSequenceRNNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBidirectionalSequenceRNNOptions(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceRNNOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BidirectionalSequenceRNNOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BidirectionalSequenceRNNOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _time_major = _o->time_major; auto _fused_activation_function = _o->fused_activation_function; auto _merge_outputs = _o->merge_outputs; auto _asymmetric_quantize_inputs = _o->asymmetric_quantize_inputs; return circle::CreateBidirectionalSequenceRNNOptions( - _fbb, _time_major, _fused_activation_function, _merge_outputs, _asymmetric_quantize_inputs); + _fbb, + _time_major, + _fused_activation_function, + _merge_outputs, + _asymmetric_quantize_inputs); } -inline FullyConnectedOptionsT * -FullyConnectedOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline FullyConnectedOptionsT *FullyConnectedOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new FullyConnectedOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void FullyConnectedOptions::UnPackTo(FullyConnectedOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void FullyConnectedOptions::UnPackTo(FullyConnectedOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = weights_format(); - _o->weights_format = _e; - } - { - auto _e = keep_num_dims(); - _o->keep_num_dims = _e; - } - { - auto _e = asymmetric_quantize_inputs(); - _o->asymmetric_quantize_inputs = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = weights_format(); _o->weights_format = _e; } + { auto _e = keep_num_dims(); _o->keep_num_dims = _e; } + { auto _e = asymmetric_quantize_inputs(); _o->asymmetric_quantize_inputs = _e; } + { auto _e = quantized_bias_type(); _o->quantized_bias_type = _e; } } -inline flatbuffers::Offset -FullyConnectedOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FullyConnectedOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset FullyConnectedOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FullyConnectedOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateFullyConnectedOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateFullyConnectedOptions(flatbuffers::FlatBufferBuilder &_fbb, const FullyConnectedOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateFullyConnectedOptions(flatbuffers::FlatBufferBuilder &_fbb, const FullyConnectedOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const FullyConnectedOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const FullyConnectedOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; auto _weights_format = _o->weights_format; auto _keep_num_dims = _o->keep_num_dims; auto _asymmetric_quantize_inputs = _o->asymmetric_quantize_inputs; - return circle::CreateFullyConnectedOptions(_fbb, _fused_activation_function, _weights_format, - _keep_num_dims, _asymmetric_quantize_inputs); + auto _quantized_bias_type = _o->quantized_bias_type; + return circle::CreateFullyConnectedOptions( + _fbb, + _fused_activation_function, + _weights_format, + _keep_num_dims, + _asymmetric_quantize_inputs, + _quantized_bias_type); } -inline SoftmaxOptionsT * -SoftmaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SoftmaxOptionsT *SoftmaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SoftmaxOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SoftmaxOptions::UnPackTo(SoftmaxOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SoftmaxOptions::UnPackTo(SoftmaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = beta(); - _o->beta = _e; - } + { auto _e = beta(); _o->beta = _e; } } -inline flatbuffers::Offset -SoftmaxOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SoftmaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SoftmaxOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SoftmaxOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSoftmaxOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const SoftmaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const SoftmaxOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SoftmaxOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SoftmaxOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _beta = _o->beta; - return circle::CreateSoftmaxOptions(_fbb, _beta); + return circle::CreateSoftmaxOptions( + _fbb, + _beta); } -inline ConcatenationOptionsT * -ConcatenationOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ConcatenationOptionsT *ConcatenationOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ConcatenationOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ConcatenationOptions::UnPackTo(ConcatenationOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ConcatenationOptions::UnPackTo(ConcatenationOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = axis(); - _o->axis = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } + { auto _e = axis(); _o->axis = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } } -inline flatbuffers::Offset -ConcatenationOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ConcatenationOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ConcatenationOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ConcatenationOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateConcatenationOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateConcatenationOptions(flatbuffers::FlatBufferBuilder &_fbb, const ConcatenationOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateConcatenationOptions(flatbuffers::FlatBufferBuilder &_fbb, const ConcatenationOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ConcatenationOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ConcatenationOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _axis = _o->axis; auto _fused_activation_function = _o->fused_activation_function; - return circle::CreateConcatenationOptions(_fbb, _axis, _fused_activation_function); + return circle::CreateConcatenationOptions( + _fbb, + _axis, + _fused_activation_function); } -inline AddOptionsT *AddOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline AddOptionsT *AddOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new AddOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void AddOptions::UnPackTo(AddOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void AddOptions::UnPackTo(AddOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = pot_scale_int16(); - _o->pot_scale_int16 = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = pot_scale_int16(); _o->pot_scale_int16 = _e; } } -inline flatbuffers::Offset -AddOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AddOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset AddOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AddOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateAddOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateAddOptions(flatbuffers::FlatBufferBuilder &_fbb, const AddOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateAddOptions(flatbuffers::FlatBufferBuilder &_fbb, const AddOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const AddOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const AddOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; auto _pot_scale_int16 = _o->pot_scale_int16; - return circle::CreateAddOptions(_fbb, _fused_activation_function, _pot_scale_int16); + return circle::CreateAddOptions( + _fbb, + _fused_activation_function, + _pot_scale_int16); } -inline MulOptionsT *MulOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline MulOptionsT *MulOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new MulOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void MulOptions::UnPackTo(MulOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void MulOptions::UnPackTo(MulOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } } -inline flatbuffers::Offset -MulOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MulOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset MulOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MulOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateMulOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateMulOptions(flatbuffers::FlatBufferBuilder &_fbb, const MulOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateMulOptions(flatbuffers::FlatBufferBuilder &_fbb, const MulOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const MulOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MulOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; - return circle::CreateMulOptions(_fbb, _fused_activation_function); + return circle::CreateMulOptions( + _fbb, + _fused_activation_function); } -inline L2NormOptionsT * -L2NormOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline L2NormOptionsT *L2NormOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new L2NormOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void L2NormOptions::UnPackTo(L2NormOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void L2NormOptions::UnPackTo(L2NormOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } } -inline flatbuffers::Offset -L2NormOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const L2NormOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset L2NormOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const L2NormOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateL2NormOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateL2NormOptions(flatbuffers::FlatBufferBuilder &_fbb, const L2NormOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateL2NormOptions(flatbuffers::FlatBufferBuilder &_fbb, const L2NormOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const L2NormOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const L2NormOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; - return circle::CreateL2NormOptions(_fbb, _fused_activation_function); + return circle::CreateL2NormOptions( + _fbb, + _fused_activation_function); } -inline LocalResponseNormalizationOptionsT * -LocalResponseNormalizationOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = - std::unique_ptr(new LocalResponseNormalizationOptionsT()); +inline LocalResponseNormalizationOptionsT *LocalResponseNormalizationOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new LocalResponseNormalizationOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -LocalResponseNormalizationOptions::UnPackTo(LocalResponseNormalizationOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LocalResponseNormalizationOptions::UnPackTo(LocalResponseNormalizationOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = radius(); - _o->radius = _e; - } - { - auto _e = bias(); - _o->bias = _e; - } - { - auto _e = alpha(); - _o->alpha = _e; - } - { - auto _e = beta(); - _o->beta = _e; - } + { auto _e = radius(); _o->radius = _e; } + { auto _e = bias(); _o->bias = _e; } + { auto _e = alpha(); _o->alpha = _e; } + { auto _e = beta(); _o->beta = _e; } } -inline flatbuffers::Offset -LocalResponseNormalizationOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const LocalResponseNormalizationOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LocalResponseNormalizationOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LocalResponseNormalizationOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLocalResponseNormalizationOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLocalResponseNormalizationOptions(flatbuffers::FlatBufferBuilder &_fbb, - const LocalResponseNormalizationOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLocalResponseNormalizationOptions(flatbuffers::FlatBufferBuilder &_fbb, const LocalResponseNormalizationOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LocalResponseNormalizationOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LocalResponseNormalizationOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _radius = _o->radius; auto _bias = _o->bias; auto _alpha = _o->alpha; auto _beta = _o->beta; - return circle::CreateLocalResponseNormalizationOptions(_fbb, _radius, _bias, _alpha, _beta); + return circle::CreateLocalResponseNormalizationOptions( + _fbb, + _radius, + _bias, + _alpha, + _beta); } -inline LSTMOptionsT *LSTMOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline LSTMOptionsT *LSTMOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new LSTMOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void LSTMOptions::UnPackTo(LSTMOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LSTMOptions::UnPackTo(LSTMOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = cell_clip(); - _o->cell_clip = _e; - } - { - auto _e = proj_clip(); - _o->proj_clip = _e; - } - { - auto _e = kernel_type(); - _o->kernel_type = _e; - } - { - auto _e = asymmetric_quantize_inputs(); - _o->asymmetric_quantize_inputs = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = cell_clip(); _o->cell_clip = _e; } + { auto _e = proj_clip(); _o->proj_clip = _e; } + { auto _e = kernel_type(); _o->kernel_type = _e; } + { auto _e = asymmetric_quantize_inputs(); _o->asymmetric_quantize_inputs = _e; } } -inline flatbuffers::Offset -LSTMOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LSTMOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSTMOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLSTMOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, const LSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, const LSTMOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LSTMOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LSTMOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; auto _cell_clip = _o->cell_clip; auto _proj_clip = _o->proj_clip; auto _kernel_type = _o->kernel_type; auto _asymmetric_quantize_inputs = _o->asymmetric_quantize_inputs; - return circle::CreateLSTMOptions(_fbb, _fused_activation_function, _cell_clip, _proj_clip, - _kernel_type, _asymmetric_quantize_inputs); + return circle::CreateLSTMOptions( + _fbb, + _fused_activation_function, + _cell_clip, + _proj_clip, + _kernel_type, + _asymmetric_quantize_inputs); } -inline UnidirectionalSequenceLSTMOptionsT * -UnidirectionalSequenceLSTMOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = - std::unique_ptr(new UnidirectionalSequenceLSTMOptionsT()); +inline UnidirectionalSequenceLSTMOptionsT *UnidirectionalSequenceLSTMOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new UnidirectionalSequenceLSTMOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -UnidirectionalSequenceLSTMOptions::UnPackTo(UnidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void UnidirectionalSequenceLSTMOptions::UnPackTo(UnidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = cell_clip(); - _o->cell_clip = _e; - } - { - auto _e = proj_clip(); - _o->proj_clip = _e; - } - { - auto _e = time_major(); - _o->time_major = _e; - } - { - auto _e = asymmetric_quantize_inputs(); - _o->asymmetric_quantize_inputs = _e; - } - { - auto _e = diagonal_recurrent_tensors(); - _o->diagonal_recurrent_tensors = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = cell_clip(); _o->cell_clip = _e; } + { auto _e = proj_clip(); _o->proj_clip = _e; } + { auto _e = time_major(); _o->time_major = _e; } + { auto _e = asymmetric_quantize_inputs(); _o->asymmetric_quantize_inputs = _e; } + { auto _e = diagonal_recurrent_tensors(); _o->diagonal_recurrent_tensors = _e; } } -inline flatbuffers::Offset -UnidirectionalSequenceLSTMOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const UnidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset UnidirectionalSequenceLSTMOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnidirectionalSequenceLSTMOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateUnidirectionalSequenceLSTMOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateUnidirectionalSequenceLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, - const UnidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateUnidirectionalSequenceLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const UnidirectionalSequenceLSTMOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const UnidirectionalSequenceLSTMOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; auto _cell_clip = _o->cell_clip; auto _proj_clip = _o->proj_clip; @@ -18007,4802 +17963,2942 @@ CreateUnidirectionalSequenceLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, auto _asymmetric_quantize_inputs = _o->asymmetric_quantize_inputs; auto _diagonal_recurrent_tensors = _o->diagonal_recurrent_tensors; return circle::CreateUnidirectionalSequenceLSTMOptions( - _fbb, _fused_activation_function, _cell_clip, _proj_clip, _time_major, - _asymmetric_quantize_inputs, _diagonal_recurrent_tensors); + _fbb, + _fused_activation_function, + _cell_clip, + _proj_clip, + _time_major, + _asymmetric_quantize_inputs, + _diagonal_recurrent_tensors); } -inline BidirectionalSequenceLSTMOptionsT * -BidirectionalSequenceLSTMOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ - auto _o = - std::unique_ptr(new BidirectionalSequenceLSTMOptionsT()); +inline BidirectionalSequenceLSTMOptionsT *BidirectionalSequenceLSTMOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new BidirectionalSequenceLSTMOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -BidirectionalSequenceLSTMOptions::UnPackTo(BidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BidirectionalSequenceLSTMOptions::UnPackTo(BidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = cell_clip(); - _o->cell_clip = _e; - } - { - auto _e = proj_clip(); - _o->proj_clip = _e; - } - { - auto _e = merge_outputs(); - _o->merge_outputs = _e; - } - { - auto _e = time_major(); - _o->time_major = _e; - } - { - auto _e = asymmetric_quantize_inputs(); - _o->asymmetric_quantize_inputs = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = cell_clip(); _o->cell_clip = _e; } + { auto _e = proj_clip(); _o->proj_clip = _e; } + { auto _e = merge_outputs(); _o->merge_outputs = _e; } + { auto _e = time_major(); _o->time_major = _e; } + { auto _e = asymmetric_quantize_inputs(); _o->asymmetric_quantize_inputs = _e; } } -inline flatbuffers::Offset -BidirectionalSequenceLSTMOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const BidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BidirectionalSequenceLSTMOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceLSTMOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBidirectionalSequenceLSTMOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBidirectionalSequenceLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, - const BidirectionalSequenceLSTMOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBidirectionalSequenceLSTMOptions(flatbuffers::FlatBufferBuilder &_fbb, const BidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BidirectionalSequenceLSTMOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BidirectionalSequenceLSTMOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; auto _cell_clip = _o->cell_clip; auto _proj_clip = _o->proj_clip; auto _merge_outputs = _o->merge_outputs; auto _time_major = _o->time_major; auto _asymmetric_quantize_inputs = _o->asymmetric_quantize_inputs; - return circle::CreateBidirectionalSequenceLSTMOptions(_fbb, _fused_activation_function, - _cell_clip, _proj_clip, _merge_outputs, - _time_major, _asymmetric_quantize_inputs); + return circle::CreateBidirectionalSequenceLSTMOptions( + _fbb, + _fused_activation_function, + _cell_clip, + _proj_clip, + _merge_outputs, + _time_major, + _asymmetric_quantize_inputs); } -inline ResizeBilinearOptionsT * -ResizeBilinearOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ResizeBilinearOptionsT *ResizeBilinearOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ResizeBilinearOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ResizeBilinearOptions::UnPackTo(ResizeBilinearOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ResizeBilinearOptions::UnPackTo(ResizeBilinearOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = align_corners(); - _o->align_corners = _e; - } - { - auto _e = half_pixel_centers(); - _o->half_pixel_centers = _e; - } + { auto _e = align_corners(); _o->align_corners = _e; } + { auto _e = half_pixel_centers(); _o->half_pixel_centers = _e; } } -inline flatbuffers::Offset -ResizeBilinearOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ResizeBilinearOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ResizeBilinearOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ResizeBilinearOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateResizeBilinearOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateResizeBilinearOptions(flatbuffers::FlatBufferBuilder &_fbb, const ResizeBilinearOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateResizeBilinearOptions(flatbuffers::FlatBufferBuilder &_fbb, const ResizeBilinearOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ResizeBilinearOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ResizeBilinearOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _align_corners = _o->align_corners; auto _half_pixel_centers = _o->half_pixel_centers; - return circle::CreateResizeBilinearOptions(_fbb, _align_corners, _half_pixel_centers); + return circle::CreateResizeBilinearOptions( + _fbb, + _align_corners, + _half_pixel_centers); } -inline ResizeNearestNeighborOptionsT * -ResizeNearestNeighborOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ResizeNearestNeighborOptionsT *ResizeNearestNeighborOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ResizeNearestNeighborOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -ResizeNearestNeighborOptions::UnPackTo(ResizeNearestNeighborOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ResizeNearestNeighborOptions::UnPackTo(ResizeNearestNeighborOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = align_corners(); - _o->align_corners = _e; - } - { - auto _e = half_pixel_centers(); - _o->half_pixel_centers = _e; - } + { auto _e = align_corners(); _o->align_corners = _e; } + { auto _e = half_pixel_centers(); _o->half_pixel_centers = _e; } } -inline flatbuffers::Offset -ResizeNearestNeighborOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const ResizeNearestNeighborOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ResizeNearestNeighborOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ResizeNearestNeighborOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateResizeNearestNeighborOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateResizeNearestNeighborOptions(flatbuffers::FlatBufferBuilder &_fbb, - const ResizeNearestNeighborOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateResizeNearestNeighborOptions(flatbuffers::FlatBufferBuilder &_fbb, const ResizeNearestNeighborOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ResizeNearestNeighborOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ResizeNearestNeighborOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _align_corners = _o->align_corners; auto _half_pixel_centers = _o->half_pixel_centers; - return circle::CreateResizeNearestNeighborOptions(_fbb, _align_corners, _half_pixel_centers); + return circle::CreateResizeNearestNeighborOptions( + _fbb, + _align_corners, + _half_pixel_centers); } -inline CallOptionsT *CallOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline CallOptionsT *CallOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new CallOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void CallOptions::UnPackTo(CallOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void CallOptions::UnPackTo(CallOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = subgraph(); - _o->subgraph = _e; - } + { auto _e = subgraph(); _o->subgraph = _e; } } -inline flatbuffers::Offset -CallOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CallOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CallOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CallOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateCallOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateCallOptions(flatbuffers::FlatBufferBuilder &_fbb, const CallOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateCallOptions(flatbuffers::FlatBufferBuilder &_fbb, const CallOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const CallOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const CallOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _subgraph = _o->subgraph; - return circle::CreateCallOptions(_fbb, _subgraph); + return circle::CreateCallOptions( + _fbb, + _subgraph); } -inline PadOptionsT *PadOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline PadOptionsT *PadOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new PadOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void PadOptions::UnPackTo(PadOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void PadOptions::UnPackTo(PadOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -PadOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset PadOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreatePadOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreatePadOptions(flatbuffers::FlatBufferBuilder &_fbb, const PadOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreatePadOptions(flatbuffers::FlatBufferBuilder &_fbb, const PadOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const PadOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreatePadOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const PadOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreatePadOptions( + _fbb); } -inline PadV2OptionsT *PadV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline PadV2OptionsT *PadV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new PadV2OptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void PadV2Options::UnPackTo(PadV2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void PadV2Options::UnPackTo(PadV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -PadV2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset PadV2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadV2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreatePadV2Options(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreatePadV2Options(flatbuffers::FlatBufferBuilder &_fbb, const PadV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreatePadV2Options(flatbuffers::FlatBufferBuilder &_fbb, const PadV2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const PadV2OptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreatePadV2Options(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const PadV2OptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreatePadV2Options( + _fbb); } -inline ReshapeOptionsT * -ReshapeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ReshapeOptionsT *ReshapeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ReshapeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ReshapeOptions::UnPackTo(ReshapeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ReshapeOptions::UnPackTo(ReshapeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = new_shape(); - if (_e) - { - _o->new_shape.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->new_shape[_i] = _e->Get(_i); - } - } - } + { auto _e = new_shape(); if (_e) { _o->new_shape.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->new_shape[_i] = _e->Get(_i); } } } } -inline flatbuffers::Offset -ReshapeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ReshapeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateReshapeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateReshapeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateReshapeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ReshapeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ReshapeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _new_shape = _o->new_shape.size() ? _fbb.CreateVector(_o->new_shape) : 0; - return circle::CreateReshapeOptions(_fbb, _new_shape); + return circle::CreateReshapeOptions( + _fbb, + _new_shape); } -inline SpaceToBatchNDOptionsT * -SpaceToBatchNDOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SpaceToBatchNDOptionsT *SpaceToBatchNDOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SpaceToBatchNDOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SpaceToBatchNDOptions::UnPackTo(SpaceToBatchNDOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SpaceToBatchNDOptions::UnPackTo(SpaceToBatchNDOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -SpaceToBatchNDOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToBatchNDOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SpaceToBatchNDOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToBatchNDOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSpaceToBatchNDOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSpaceToBatchNDOptions(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToBatchNDOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSpaceToBatchNDOptions(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToBatchNDOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SpaceToBatchNDOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateSpaceToBatchNDOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SpaceToBatchNDOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateSpaceToBatchNDOptions( + _fbb); } -inline BatchToSpaceNDOptionsT * -BatchToSpaceNDOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline BatchToSpaceNDOptionsT *BatchToSpaceNDOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new BatchToSpaceNDOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void BatchToSpaceNDOptions::UnPackTo(BatchToSpaceNDOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BatchToSpaceNDOptions::UnPackTo(BatchToSpaceNDOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -BatchToSpaceNDOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchToSpaceNDOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BatchToSpaceNDOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchToSpaceNDOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBatchToSpaceNDOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBatchToSpaceNDOptions(flatbuffers::FlatBufferBuilder &_fbb, const BatchToSpaceNDOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBatchToSpaceNDOptions(flatbuffers::FlatBufferBuilder &_fbb, const BatchToSpaceNDOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BatchToSpaceNDOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateBatchToSpaceNDOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BatchToSpaceNDOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateBatchToSpaceNDOptions( + _fbb); } -inline SkipGramOptionsT * -SkipGramOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SkipGramOptionsT *SkipGramOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SkipGramOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SkipGramOptions::UnPackTo(SkipGramOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SkipGramOptions::UnPackTo(SkipGramOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = ngram_size(); - _o->ngram_size = _e; - } - { - auto _e = max_skip_size(); - _o->max_skip_size = _e; - } - { - auto _e = include_all_ngrams(); - _o->include_all_ngrams = _e; - } + { auto _e = ngram_size(); _o->ngram_size = _e; } + { auto _e = max_skip_size(); _o->max_skip_size = _e; } + { auto _e = include_all_ngrams(); _o->include_all_ngrams = _e; } } -inline flatbuffers::Offset -SkipGramOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SkipGramOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SkipGramOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SkipGramOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSkipGramOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSkipGramOptions(flatbuffers::FlatBufferBuilder &_fbb, const SkipGramOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSkipGramOptions(flatbuffers::FlatBufferBuilder &_fbb, const SkipGramOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SkipGramOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SkipGramOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _ngram_size = _o->ngram_size; auto _max_skip_size = _o->max_skip_size; auto _include_all_ngrams = _o->include_all_ngrams; - return circle::CreateSkipGramOptions(_fbb, _ngram_size, _max_skip_size, _include_all_ngrams); + return circle::CreateSkipGramOptions( + _fbb, + _ngram_size, + _max_skip_size, + _include_all_ngrams); } -inline SpaceToDepthOptionsT * -SpaceToDepthOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SpaceToDepthOptionsT *SpaceToDepthOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SpaceToDepthOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SpaceToDepthOptions::UnPackTo(SpaceToDepthOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SpaceToDepthOptions::UnPackTo(SpaceToDepthOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = block_size(); - _o->block_size = _e; - } + { auto _e = block_size(); _o->block_size = _e; } } -inline flatbuffers::Offset -SpaceToDepthOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToDepthOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SpaceToDepthOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToDepthOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSpaceToDepthOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSpaceToDepthOptions(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToDepthOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSpaceToDepthOptions(flatbuffers::FlatBufferBuilder &_fbb, const SpaceToDepthOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SpaceToDepthOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SpaceToDepthOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _block_size = _o->block_size; - return circle::CreateSpaceToDepthOptions(_fbb, _block_size); + return circle::CreateSpaceToDepthOptions( + _fbb, + _block_size); } -inline DepthToSpaceOptionsT * -DepthToSpaceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline DepthToSpaceOptionsT *DepthToSpaceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new DepthToSpaceOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void DepthToSpaceOptions::UnPackTo(DepthToSpaceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void DepthToSpaceOptions::UnPackTo(DepthToSpaceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = block_size(); - _o->block_size = _e; - } + { auto _e = block_size(); _o->block_size = _e; } } -inline flatbuffers::Offset -DepthToSpaceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DepthToSpaceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset DepthToSpaceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DepthToSpaceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateDepthToSpaceOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateDepthToSpaceOptions(flatbuffers::FlatBufferBuilder &_fbb, const DepthToSpaceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateDepthToSpaceOptions(flatbuffers::FlatBufferBuilder &_fbb, const DepthToSpaceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const DepthToSpaceOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const DepthToSpaceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _block_size = _o->block_size; - return circle::CreateDepthToSpaceOptions(_fbb, _block_size); + return circle::CreateDepthToSpaceOptions( + _fbb, + _block_size); } -inline SubOptionsT *SubOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SubOptionsT *SubOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SubOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SubOptions::UnPackTo(SubOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SubOptions::UnPackTo(SubOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } - { - auto _e = pot_scale_int16(); - _o->pot_scale_int16 = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = pot_scale_int16(); _o->pot_scale_int16 = _e; } } -inline flatbuffers::Offset -SubOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SubOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSubOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSubOptions(flatbuffers::FlatBufferBuilder &_fbb, const SubOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSubOptions(flatbuffers::FlatBufferBuilder &_fbb, const SubOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SubOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SubOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; auto _pot_scale_int16 = _o->pot_scale_int16; - return circle::CreateSubOptions(_fbb, _fused_activation_function, _pot_scale_int16); + return circle::CreateSubOptions( + _fbb, + _fused_activation_function, + _pot_scale_int16); } -inline DivOptionsT *DivOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline DivOptionsT *DivOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new DivOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void DivOptions::UnPackTo(DivOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void DivOptions::UnPackTo(DivOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } } -inline flatbuffers::Offset -DivOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DivOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset DivOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DivOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateDivOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateDivOptions(flatbuffers::FlatBufferBuilder &_fbb, const DivOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateDivOptions(flatbuffers::FlatBufferBuilder &_fbb, const DivOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const DivOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const DivOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _fused_activation_function = _o->fused_activation_function; - return circle::CreateDivOptions(_fbb, _fused_activation_function); + return circle::CreateDivOptions( + _fbb, + _fused_activation_function); } -inline TopKV2OptionsT * -TopKV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline TopKV2OptionsT *TopKV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new TopKV2OptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void TopKV2Options::UnPackTo(TopKV2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void TopKV2Options::UnPackTo(TopKV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -TopKV2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset TopKV2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateTopKV2Options(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateTopKV2Options(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateTopKV2Options(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const TopKV2OptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateTopKV2Options(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TopKV2OptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateTopKV2Options( + _fbb); } -inline EmbeddingLookupSparseOptionsT * -EmbeddingLookupSparseOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline EmbeddingLookupSparseOptionsT *EmbeddingLookupSparseOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new EmbeddingLookupSparseOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -EmbeddingLookupSparseOptions::UnPackTo(EmbeddingLookupSparseOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void EmbeddingLookupSparseOptions::UnPackTo(EmbeddingLookupSparseOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = combiner(); - _o->combiner = _e; - } + { auto _e = combiner(); _o->combiner = _e; } } -inline flatbuffers::Offset -EmbeddingLookupSparseOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const EmbeddingLookupSparseOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset EmbeddingLookupSparseOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const EmbeddingLookupSparseOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateEmbeddingLookupSparseOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateEmbeddingLookupSparseOptions(flatbuffers::FlatBufferBuilder &_fbb, - const EmbeddingLookupSparseOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateEmbeddingLookupSparseOptions(flatbuffers::FlatBufferBuilder &_fbb, const EmbeddingLookupSparseOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const EmbeddingLookupSparseOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const EmbeddingLookupSparseOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _combiner = _o->combiner; - return circle::CreateEmbeddingLookupSparseOptions(_fbb, _combiner); + return circle::CreateEmbeddingLookupSparseOptions( + _fbb, + _combiner); } -inline GatherOptionsT * -GatherOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline GatherOptionsT *GatherOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new GatherOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void GatherOptions::UnPackTo(GatherOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void GatherOptions::UnPackTo(GatherOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = axis(); - _o->axis = _e; - } - { - auto _e = batch_dims(); - _o->batch_dims = _e; - } + { auto _e = axis(); _o->axis = _e; } + { auto _e = batch_dims(); _o->batch_dims = _e; } } -inline flatbuffers::Offset -GatherOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset GatherOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateGatherOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const GatherOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const GatherOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const GatherOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GatherOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _axis = _o->axis; auto _batch_dims = _o->batch_dims; - return circle::CreateGatherOptions(_fbb, _axis, _batch_dims); + return circle::CreateGatherOptions( + _fbb, + _axis, + _batch_dims); } -inline TransposeOptionsT * -TransposeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline TransposeOptionsT *TransposeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new TransposeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void TransposeOptions::UnPackTo(TransposeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void TransposeOptions::UnPackTo(TransposeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -TransposeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset TransposeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateTransposeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateTransposeOptions(flatbuffers::FlatBufferBuilder &_fbb, const TransposeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateTransposeOptions(flatbuffers::FlatBufferBuilder &_fbb, const TransposeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const TransposeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateTransposeOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TransposeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateTransposeOptions( + _fbb); } -inline ExpOptionsT *ExpOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ExpOptionsT *ExpOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ExpOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ExpOptions::UnPackTo(ExpOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ExpOptions::UnPackTo(ExpOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -ExpOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ExpOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateExpOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateExpOptions(flatbuffers::FlatBufferBuilder &_fbb, const ExpOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateExpOptions(flatbuffers::FlatBufferBuilder &_fbb, const ExpOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ExpOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateExpOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ExpOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateExpOptions( + _fbb); } -inline CosOptionsT *CosOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline CosOptionsT *CosOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new CosOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void CosOptions::UnPackTo(CosOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void CosOptions::UnPackTo(CosOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -CosOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CosOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CosOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CosOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateCosOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateCosOptions(flatbuffers::FlatBufferBuilder &_fbb, const CosOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateCosOptions(flatbuffers::FlatBufferBuilder &_fbb, const CosOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const CosOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateCosOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const CosOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateCosOptions( + _fbb); } -inline ReducerOptionsT * -ReducerOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ReducerOptionsT *ReducerOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ReducerOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ReducerOptions::UnPackTo(ReducerOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ReducerOptions::UnPackTo(ReducerOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = keep_dims(); - _o->keep_dims = _e; - } + { auto _e = keep_dims(); _o->keep_dims = _e; } } -inline flatbuffers::Offset -ReducerOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReducerOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ReducerOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReducerOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateReducerOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateReducerOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReducerOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateReducerOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReducerOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ReducerOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ReducerOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _keep_dims = _o->keep_dims; - return circle::CreateReducerOptions(_fbb, _keep_dims); + return circle::CreateReducerOptions( + _fbb, + _keep_dims); } -inline SqueezeOptionsT * -SqueezeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SqueezeOptionsT *SqueezeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SqueezeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SqueezeOptions::UnPackTo(SqueezeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SqueezeOptions::UnPackTo(SqueezeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = squeeze_dims(); - if (_e) - { - _o->squeeze_dims.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->squeeze_dims[_i] = _e->Get(_i); - } - } - } + { auto _e = squeeze_dims(); if (_e) { _o->squeeze_dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->squeeze_dims[_i] = _e->Get(_i); } } } } -inline flatbuffers::Offset -SqueezeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SqueezeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSqueezeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSqueezeOptions(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSqueezeOptions(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SqueezeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SqueezeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _squeeze_dims = _o->squeeze_dims.size() ? _fbb.CreateVector(_o->squeeze_dims) : 0; - return circle::CreateSqueezeOptions(_fbb, _squeeze_dims); + return circle::CreateSqueezeOptions( + _fbb, + _squeeze_dims); } -inline SplitOptionsT *SplitOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SplitOptionsT *SplitOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SplitOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SplitOptions::UnPackTo(SplitOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SplitOptions::UnPackTo(SplitOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = num_splits(); - _o->num_splits = _e; - } + { auto _e = num_splits(); _o->num_splits = _e; } } -inline flatbuffers::Offset -SplitOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SplitOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SplitOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SplitOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSplitOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSplitOptions(flatbuffers::FlatBufferBuilder &_fbb, const SplitOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSplitOptions(flatbuffers::FlatBufferBuilder &_fbb, const SplitOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SplitOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SplitOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _num_splits = _o->num_splits; - return circle::CreateSplitOptions(_fbb, _num_splits); + return circle::CreateSplitOptions( + _fbb, + _num_splits); } -inline SplitVOptionsT * -SplitVOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SplitVOptionsT *SplitVOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SplitVOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SplitVOptions::UnPackTo(SplitVOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SplitVOptions::UnPackTo(SplitVOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = num_splits(); - _o->num_splits = _e; - } + { auto _e = num_splits(); _o->num_splits = _e; } } -inline flatbuffers::Offset -SplitVOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SplitVOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SplitVOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SplitVOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSplitVOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSplitVOptions(flatbuffers::FlatBufferBuilder &_fbb, const SplitVOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSplitVOptions(flatbuffers::FlatBufferBuilder &_fbb, const SplitVOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SplitVOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SplitVOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _num_splits = _o->num_splits; - return circle::CreateSplitVOptions(_fbb, _num_splits); + return circle::CreateSplitVOptions( + _fbb, + _num_splits); } -inline StridedSliceOptionsT * -StridedSliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline StridedSliceOptionsT *StridedSliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new StridedSliceOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void StridedSliceOptions::UnPackTo(StridedSliceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void StridedSliceOptions::UnPackTo(StridedSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = begin_mask(); - _o->begin_mask = _e; - } - { - auto _e = end_mask(); - _o->end_mask = _e; - } - { - auto _e = ellipsis_mask(); - _o->ellipsis_mask = _e; - } - { - auto _e = new_axis_mask(); - _o->new_axis_mask = _e; - } - { - auto _e = shrink_axis_mask(); - _o->shrink_axis_mask = _e; - } + { auto _e = begin_mask(); _o->begin_mask = _e; } + { auto _e = end_mask(); _o->end_mask = _e; } + { auto _e = ellipsis_mask(); _o->ellipsis_mask = _e; } + { auto _e = new_axis_mask(); _o->new_axis_mask = _e; } + { auto _e = shrink_axis_mask(); _o->shrink_axis_mask = _e; } + { auto _e = offset(); _o->offset = _e; } } -inline flatbuffers::Offset -StridedSliceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset StridedSliceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateStridedSliceOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateStridedSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateStridedSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const StridedSliceOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StridedSliceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _begin_mask = _o->begin_mask; auto _end_mask = _o->end_mask; auto _ellipsis_mask = _o->ellipsis_mask; auto _new_axis_mask = _o->new_axis_mask; auto _shrink_axis_mask = _o->shrink_axis_mask; - return circle::CreateStridedSliceOptions(_fbb, _begin_mask, _end_mask, _ellipsis_mask, - _new_axis_mask, _shrink_axis_mask); -} - -inline LogSoftmaxOptionsT * -LogSoftmaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ + auto _offset = _o->offset; + return circle::CreateStridedSliceOptions( + _fbb, + _begin_mask, + _end_mask, + _ellipsis_mask, + _new_axis_mask, + _shrink_axis_mask, + _offset); +} + +inline LogSoftmaxOptionsT *LogSoftmaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new LogSoftmaxOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void LogSoftmaxOptions::UnPackTo(LogSoftmaxOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LogSoftmaxOptions::UnPackTo(LogSoftmaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -LogSoftmaxOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogSoftmaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LogSoftmaxOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogSoftmaxOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLogSoftmaxOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLogSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogSoftmaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLogSoftmaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogSoftmaxOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LogSoftmaxOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateLogSoftmaxOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LogSoftmaxOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateLogSoftmaxOptions( + _fbb); } -inline CastOptionsT *CastOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline CastOptionsT *CastOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new CastOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void CastOptions::UnPackTo(CastOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void CastOptions::UnPackTo(CastOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = in_data_type(); - _o->in_data_type = _e; - } - { - auto _e = out_data_type(); - _o->out_data_type = _e; - } + { auto _e = in_data_type(); _o->in_data_type = _e; } + { auto _e = out_data_type(); _o->out_data_type = _e; } } -inline flatbuffers::Offset -CastOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CastOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CastOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CastOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateCastOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateCastOptions(flatbuffers::FlatBufferBuilder &_fbb, const CastOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateCastOptions(flatbuffers::FlatBufferBuilder &_fbb, const CastOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const CastOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const CastOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _in_data_type = _o->in_data_type; auto _out_data_type = _o->out_data_type; - return circle::CreateCastOptions(_fbb, _in_data_type, _out_data_type); + return circle::CreateCastOptions( + _fbb, + _in_data_type, + _out_data_type); } -inline DequantizeOptionsT * -DequantizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline DequantizeOptionsT *DequantizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new DequantizeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void DequantizeOptions::UnPackTo(DequantizeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void DequantizeOptions::UnPackTo(DequantizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -DequantizeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset DequantizeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateDequantizeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateDequantizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateDequantizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const DequantizeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateDequantizeOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const DequantizeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateDequantizeOptions( + _fbb); } -inline MaximumMinimumOptionsT * -MaximumMinimumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline MaximumMinimumOptionsT *MaximumMinimumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new MaximumMinimumOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void MaximumMinimumOptions::UnPackTo(MaximumMinimumOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void MaximumMinimumOptions::UnPackTo(MaximumMinimumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -MaximumMinimumOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MaximumMinimumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset MaximumMinimumOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MaximumMinimumOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateMaximumMinimumOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateMaximumMinimumOptions(flatbuffers::FlatBufferBuilder &_fbb, const MaximumMinimumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateMaximumMinimumOptions(flatbuffers::FlatBufferBuilder &_fbb, const MaximumMinimumOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const MaximumMinimumOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateMaximumMinimumOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MaximumMinimumOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateMaximumMinimumOptions( + _fbb); } -inline TileOptionsT *TileOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline TileOptionsT *TileOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new TileOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void TileOptions::UnPackTo(TileOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void TileOptions::UnPackTo(TileOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -TileOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TileOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset TileOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TileOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateTileOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateTileOptions(flatbuffers::FlatBufferBuilder &_fbb, const TileOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateTileOptions(flatbuffers::FlatBufferBuilder &_fbb, const TileOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const TileOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateTileOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TileOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateTileOptions( + _fbb); } -inline ArgMaxOptionsT * -ArgMaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ArgMaxOptionsT *ArgMaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ArgMaxOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ArgMaxOptions::UnPackTo(ArgMaxOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ArgMaxOptions::UnPackTo(ArgMaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = output_type(); - _o->output_type = _e; - } + { auto _e = output_type(); _o->output_type = _e; } } -inline flatbuffers::Offset -ArgMaxOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ArgMaxOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateArgMaxOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateArgMaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateArgMaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ArgMaxOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ArgMaxOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _output_type = _o->output_type; - return circle::CreateArgMaxOptions(_fbb, _output_type); + return circle::CreateArgMaxOptions( + _fbb, + _output_type); } -inline ArgMinOptionsT * -ArgMinOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ArgMinOptionsT *ArgMinOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ArgMinOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ArgMinOptions::UnPackTo(ArgMinOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ArgMinOptions::UnPackTo(ArgMinOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = output_type(); - _o->output_type = _e; - } + { auto _e = output_type(); _o->output_type = _e; } } -inline flatbuffers::Offset -ArgMinOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMinOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ArgMinOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMinOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateArgMinOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateArgMinOptions(flatbuffers::FlatBufferBuilder &_fbb, const ArgMinOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateArgMinOptions(flatbuffers::FlatBufferBuilder &_fbb, const ArgMinOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ArgMinOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ArgMinOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _output_type = _o->output_type; - return circle::CreateArgMinOptions(_fbb, _output_type); + return circle::CreateArgMinOptions( + _fbb, + _output_type); } -inline GreaterOptionsT * -GreaterOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline GreaterOptionsT *GreaterOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new GreaterOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void GreaterOptions::UnPackTo(GreaterOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void GreaterOptions::UnPackTo(GreaterOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -GreaterOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GreaterOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset GreaterOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GreaterOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateGreaterOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateGreaterOptions(flatbuffers::FlatBufferBuilder &_fbb, const GreaterOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateGreaterOptions(flatbuffers::FlatBufferBuilder &_fbb, const GreaterOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const GreaterOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateGreaterOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GreaterOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateGreaterOptions( + _fbb); } -inline GreaterEqualOptionsT * -GreaterEqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline GreaterEqualOptionsT *GreaterEqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new GreaterEqualOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void GreaterEqualOptions::UnPackTo(GreaterEqualOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void GreaterEqualOptions::UnPackTo(GreaterEqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -GreaterEqualOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GreaterEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset GreaterEqualOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GreaterEqualOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateGreaterEqualOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateGreaterEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const GreaterEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateGreaterEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const GreaterEqualOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const GreaterEqualOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateGreaterEqualOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GreaterEqualOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateGreaterEqualOptions( + _fbb); } -inline LessOptionsT *LessOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline LessOptionsT *LessOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new LessOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void LessOptions::UnPackTo(LessOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LessOptions::UnPackTo(LessOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -LessOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LessOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LessOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LessOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLessOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLessOptions(flatbuffers::FlatBufferBuilder &_fbb, const LessOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLessOptions(flatbuffers::FlatBufferBuilder &_fbb, const LessOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LessOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateLessOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LessOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateLessOptions( + _fbb); } -inline LessEqualOptionsT * -LessEqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline LessEqualOptionsT *LessEqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new LessEqualOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void LessEqualOptions::UnPackTo(LessEqualOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LessEqualOptions::UnPackTo(LessEqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -LessEqualOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LessEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LessEqualOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LessEqualOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLessEqualOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLessEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const LessEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLessEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const LessEqualOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LessEqualOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateLessEqualOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LessEqualOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateLessEqualOptions( + _fbb); } -inline NegOptionsT *NegOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline NegOptionsT *NegOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new NegOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void NegOptions::UnPackTo(NegOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void NegOptions::UnPackTo(NegOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -NegOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NegOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset NegOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NegOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateNegOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateNegOptions(flatbuffers::FlatBufferBuilder &_fbb, const NegOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateNegOptions(flatbuffers::FlatBufferBuilder &_fbb, const NegOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const NegOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateNegOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NegOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateNegOptions( + _fbb); } -inline SelectOptionsT * -SelectOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SelectOptionsT *SelectOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SelectOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SelectOptions::UnPackTo(SelectOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SelectOptions::UnPackTo(SelectOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -SelectOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SelectOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SelectOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SelectOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSelectOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSelectOptions(flatbuffers::FlatBufferBuilder &_fbb, const SelectOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSelectOptions(flatbuffers::FlatBufferBuilder &_fbb, const SelectOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SelectOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateSelectOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SelectOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateSelectOptions( + _fbb); } -inline SliceOptionsT *SliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SliceOptionsT *SliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SliceOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SliceOptions::UnPackTo(SliceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SliceOptions::UnPackTo(SliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -SliceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SliceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSliceOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const SliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const SliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SliceOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateSliceOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SliceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateSliceOptions( + _fbb); } -inline TransposeConvOptionsT * -TransposeConvOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline TransposeConvOptionsT *TransposeConvOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new TransposeConvOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void TransposeConvOptions::UnPackTo(TransposeConvOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void TransposeConvOptions::UnPackTo(TransposeConvOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = padding(); - _o->padding = _e; - } - { - auto _e = stride_w(); - _o->stride_w = _e; - } - { - auto _e = stride_h(); - _o->stride_h = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } + { auto _e = padding(); _o->padding = _e; } + { auto _e = stride_w(); _o->stride_w = _e; } + { auto _e = stride_h(); _o->stride_h = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = quantized_bias_type(); _o->quantized_bias_type = _e; } } -inline flatbuffers::Offset -TransposeConvOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeConvOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset TransposeConvOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeConvOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateTransposeConvOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateTransposeConvOptions(flatbuffers::FlatBufferBuilder &_fbb, const TransposeConvOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateTransposeConvOptions(flatbuffers::FlatBufferBuilder &_fbb, const TransposeConvOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const TransposeConvOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TransposeConvOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _padding = _o->padding; auto _stride_w = _o->stride_w; auto _stride_h = _o->stride_h; auto _fused_activation_function = _o->fused_activation_function; - return circle::CreateTransposeConvOptions(_fbb, _padding, _stride_w, _stride_h, - _fused_activation_function); + auto _quantized_bias_type = _o->quantized_bias_type; + return circle::CreateTransposeConvOptions( + _fbb, + _padding, + _stride_w, + _stride_h, + _fused_activation_function, + _quantized_bias_type); } -inline ExpandDimsOptionsT * -ExpandDimsOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ExpandDimsOptionsT *ExpandDimsOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ExpandDimsOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ExpandDimsOptions::UnPackTo(ExpandDimsOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ExpandDimsOptions::UnPackTo(ExpandDimsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -ExpandDimsOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ExpandDimsOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateExpandDimsOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateExpandDimsOptions(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateExpandDimsOptions(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ExpandDimsOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateExpandDimsOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ExpandDimsOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateExpandDimsOptions( + _fbb); } -inline SparseToDenseOptionsT * -SparseToDenseOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SparseToDenseOptionsT *SparseToDenseOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SparseToDenseOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SparseToDenseOptions::UnPackTo(SparseToDenseOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SparseToDenseOptions::UnPackTo(SparseToDenseOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = validate_indices(); - _o->validate_indices = _e; - } + { auto _e = validate_indices(); _o->validate_indices = _e; } } -inline flatbuffers::Offset -SparseToDenseOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparseToDenseOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SparseToDenseOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparseToDenseOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSparseToDenseOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSparseToDenseOptions(flatbuffers::FlatBufferBuilder &_fbb, const SparseToDenseOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSparseToDenseOptions(flatbuffers::FlatBufferBuilder &_fbb, const SparseToDenseOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SparseToDenseOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SparseToDenseOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _validate_indices = _o->validate_indices; - return circle::CreateSparseToDenseOptions(_fbb, _validate_indices); + return circle::CreateSparseToDenseOptions( + _fbb, + _validate_indices); } -inline EqualOptionsT *EqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline EqualOptionsT *EqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new EqualOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void EqualOptions::UnPackTo(EqualOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void EqualOptions::UnPackTo(EqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -EqualOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const EqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset EqualOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const EqualOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateEqualOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const EqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const EqualOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const EqualOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateEqualOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const EqualOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateEqualOptions( + _fbb); } -inline NotEqualOptionsT * -NotEqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline NotEqualOptionsT *NotEqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new NotEqualOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void NotEqualOptions::UnPackTo(NotEqualOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void NotEqualOptions::UnPackTo(NotEqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -NotEqualOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NotEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset NotEqualOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NotEqualOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateNotEqualOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateNotEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const NotEqualOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateNotEqualOptions(flatbuffers::FlatBufferBuilder &_fbb, const NotEqualOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const NotEqualOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateNotEqualOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NotEqualOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateNotEqualOptions( + _fbb); } -inline ShapeOptionsT *ShapeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ShapeOptionsT *ShapeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ShapeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ShapeOptions::UnPackTo(ShapeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ShapeOptions::UnPackTo(ShapeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = out_type(); - _o->out_type = _e; - } + { auto _e = out_type(); _o->out_type = _e; } } -inline flatbuffers::Offset -ShapeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ShapeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ShapeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ShapeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateShapeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateShapeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ShapeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateShapeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ShapeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ShapeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ShapeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _out_type = _o->out_type; - return circle::CreateShapeOptions(_fbb, _out_type); + return circle::CreateShapeOptions( + _fbb, + _out_type); } -inline RankOptionsT *RankOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline RankOptionsT *RankOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new RankOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void RankOptions::UnPackTo(RankOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void RankOptions::UnPackTo(RankOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -RankOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RankOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset RankOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RankOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateRankOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateRankOptions(flatbuffers::FlatBufferBuilder &_fbb, const RankOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateRankOptions(flatbuffers::FlatBufferBuilder &_fbb, const RankOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const RankOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateRankOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const RankOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateRankOptions( + _fbb); } -inline PowOptionsT *PowOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline PowOptionsT *PowOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new PowOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void PowOptions::UnPackTo(PowOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void PowOptions::UnPackTo(PowOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -PowOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PowOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset PowOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PowOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreatePowOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreatePowOptions(flatbuffers::FlatBufferBuilder &_fbb, const PowOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreatePowOptions(flatbuffers::FlatBufferBuilder &_fbb, const PowOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const PowOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreatePowOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const PowOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreatePowOptions( + _fbb); } -inline FakeQuantOptionsT * -FakeQuantOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline FakeQuantOptionsT *FakeQuantOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new FakeQuantOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void FakeQuantOptions::UnPackTo(FakeQuantOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void FakeQuantOptions::UnPackTo(FakeQuantOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = min(); - _o->min = _e; - } - { - auto _e = max(); - _o->max = _e; - } - { - auto _e = num_bits(); - _o->num_bits = _e; - } - { - auto _e = narrow_range(); - _o->narrow_range = _e; - } + { auto _e = min(); _o->min = _e; } + { auto _e = max(); _o->max = _e; } + { auto _e = num_bits(); _o->num_bits = _e; } + { auto _e = narrow_range(); _o->narrow_range = _e; } } -inline flatbuffers::Offset -FakeQuantOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FakeQuantOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset FakeQuantOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FakeQuantOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateFakeQuantOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateFakeQuantOptions(flatbuffers::FlatBufferBuilder &_fbb, const FakeQuantOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateFakeQuantOptions(flatbuffers::FlatBufferBuilder &_fbb, const FakeQuantOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const FakeQuantOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const FakeQuantOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _min = _o->min; auto _max = _o->max; auto _num_bits = _o->num_bits; auto _narrow_range = _o->narrow_range; - return circle::CreateFakeQuantOptions(_fbb, _min, _max, _num_bits, _narrow_range); + return circle::CreateFakeQuantOptions( + _fbb, + _min, + _max, + _num_bits, + _narrow_range); } -inline PackOptionsT *PackOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline PackOptionsT *PackOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new PackOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void PackOptions::UnPackTo(PackOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void PackOptions::UnPackTo(PackOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = values_count(); - _o->values_count = _e; - } - { - auto _e = axis(); - _o->axis = _e; - } + { auto _e = values_count(); _o->values_count = _e; } + { auto _e = axis(); _o->axis = _e; } } -inline flatbuffers::Offset -PackOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PackOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset PackOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PackOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreatePackOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreatePackOptions(flatbuffers::FlatBufferBuilder &_fbb, const PackOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreatePackOptions(flatbuffers::FlatBufferBuilder &_fbb, const PackOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const PackOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const PackOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _values_count = _o->values_count; auto _axis = _o->axis; - return circle::CreatePackOptions(_fbb, _values_count, _axis); + return circle::CreatePackOptions( + _fbb, + _values_count, + _axis); } -inline LogicalOrOptionsT * -LogicalOrOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline LogicalOrOptionsT *LogicalOrOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new LogicalOrOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void LogicalOrOptions::UnPackTo(LogicalOrOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LogicalOrOptions::UnPackTo(LogicalOrOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -LogicalOrOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalOrOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LogicalOrOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalOrOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLogicalOrOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLogicalOrOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalOrOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLogicalOrOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalOrOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LogicalOrOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateLogicalOrOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LogicalOrOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateLogicalOrOptions( + _fbb); } -inline OneHotOptionsT * -OneHotOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline OneHotOptionsT *OneHotOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new OneHotOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void OneHotOptions::UnPackTo(OneHotOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void OneHotOptions::UnPackTo(OneHotOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = axis(); - _o->axis = _e; - } + { auto _e = axis(); _o->axis = _e; } } -inline flatbuffers::Offset -OneHotOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OneHotOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset OneHotOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OneHotOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateOneHotOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateOneHotOptions(flatbuffers::FlatBufferBuilder &_fbb, const OneHotOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateOneHotOptions(flatbuffers::FlatBufferBuilder &_fbb, const OneHotOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const OneHotOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const OneHotOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _axis = _o->axis; - return circle::CreateOneHotOptions(_fbb, _axis); + return circle::CreateOneHotOptions( + _fbb, + _axis); } -inline AbsOptionsT *AbsOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline AbsOptionsT *AbsOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new AbsOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void AbsOptions::UnPackTo(AbsOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void AbsOptions::UnPackTo(AbsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -AbsOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AbsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset AbsOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AbsOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateAbsOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateAbsOptions(flatbuffers::FlatBufferBuilder &_fbb, const AbsOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateAbsOptions(flatbuffers::FlatBufferBuilder &_fbb, const AbsOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const AbsOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateAbsOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const AbsOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateAbsOptions( + _fbb); } -inline HardSwishOptionsT * -HardSwishOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline HardSwishOptionsT *HardSwishOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new HardSwishOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void HardSwishOptions::UnPackTo(HardSwishOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void HardSwishOptions::UnPackTo(HardSwishOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -HardSwishOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const HardSwishOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset HardSwishOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const HardSwishOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateHardSwishOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateHardSwishOptions(flatbuffers::FlatBufferBuilder &_fbb, const HardSwishOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateHardSwishOptions(flatbuffers::FlatBufferBuilder &_fbb, const HardSwishOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const HardSwishOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateHardSwishOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const HardSwishOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateHardSwishOptions( + _fbb); } -inline LogicalAndOptionsT * -LogicalAndOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline LogicalAndOptionsT *LogicalAndOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new LogicalAndOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void LogicalAndOptions::UnPackTo(LogicalAndOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LogicalAndOptions::UnPackTo(LogicalAndOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -LogicalAndOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalAndOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LogicalAndOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalAndOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLogicalAndOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLogicalAndOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalAndOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLogicalAndOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalAndOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LogicalAndOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateLogicalAndOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LogicalAndOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateLogicalAndOptions( + _fbb); } -inline LogicalNotOptionsT * -LogicalNotOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline LogicalNotOptionsT *LogicalNotOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new LogicalNotOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void LogicalNotOptions::UnPackTo(LogicalNotOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LogicalNotOptions::UnPackTo(LogicalNotOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -LogicalNotOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalNotOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LogicalNotOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LogicalNotOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLogicalNotOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLogicalNotOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalNotOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLogicalNotOptions(flatbuffers::FlatBufferBuilder &_fbb, const LogicalNotOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LogicalNotOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateLogicalNotOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LogicalNotOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateLogicalNotOptions( + _fbb); } -inline UnpackOptionsT * -UnpackOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline UnpackOptionsT *UnpackOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new UnpackOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void UnpackOptions::UnPackTo(UnpackOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void UnpackOptions::UnPackTo(UnpackOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = num(); - _o->num = _e; - } - { - auto _e = axis(); - _o->axis = _e; - } + { auto _e = num(); _o->num = _e; } + { auto _e = axis(); _o->axis = _e; } } -inline flatbuffers::Offset -UnpackOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnpackOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset UnpackOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnpackOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateUnpackOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateUnpackOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnpackOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateUnpackOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnpackOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const UnpackOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const UnpackOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _num = _o->num; auto _axis = _o->axis; - return circle::CreateUnpackOptions(_fbb, _num, _axis); + return circle::CreateUnpackOptions( + _fbb, + _num, + _axis); } -inline FloorDivOptionsT * -FloorDivOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline FloorDivOptionsT *FloorDivOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new FloorDivOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void FloorDivOptions::UnPackTo(FloorDivOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void FloorDivOptions::UnPackTo(FloorDivOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -FloorDivOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FloorDivOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset FloorDivOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FloorDivOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateFloorDivOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateFloorDivOptions(flatbuffers::FlatBufferBuilder &_fbb, const FloorDivOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateFloorDivOptions(flatbuffers::FlatBufferBuilder &_fbb, const FloorDivOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const FloorDivOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateFloorDivOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const FloorDivOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateFloorDivOptions( + _fbb); } -inline SquareOptionsT * -SquareOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SquareOptionsT *SquareOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SquareOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SquareOptions::UnPackTo(SquareOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SquareOptions::UnPackTo(SquareOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -SquareOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SquareOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SquareOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SquareOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSquareOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSquareOptions(flatbuffers::FlatBufferBuilder &_fbb, const SquareOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSquareOptions(flatbuffers::FlatBufferBuilder &_fbb, const SquareOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SquareOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateSquareOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SquareOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateSquareOptions( + _fbb); } -inline ZerosLikeOptionsT * -ZerosLikeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ZerosLikeOptionsT *ZerosLikeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ZerosLikeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ZerosLikeOptions::UnPackTo(ZerosLikeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ZerosLikeOptions::UnPackTo(ZerosLikeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -ZerosLikeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ZerosLikeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateZerosLikeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateZerosLikeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateZerosLikeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ZerosLikeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateZerosLikeOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ZerosLikeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateZerosLikeOptions( + _fbb); } -inline FillOptionsT *FillOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline FillOptionsT *FillOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new FillOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void FillOptions::UnPackTo(FillOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void FillOptions::UnPackTo(FillOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -FillOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FillOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset FillOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FillOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateFillOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateFillOptions(flatbuffers::FlatBufferBuilder &_fbb, const FillOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateFillOptions(flatbuffers::FlatBufferBuilder &_fbb, const FillOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const FillOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateFillOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const FillOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateFillOptions( + _fbb); } -inline FloorModOptionsT * -FloorModOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline FloorModOptionsT *FloorModOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new FloorModOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void FloorModOptions::UnPackTo(FloorModOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void FloorModOptions::UnPackTo(FloorModOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -FloorModOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FloorModOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset FloorModOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FloorModOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateFloorModOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateFloorModOptions(flatbuffers::FlatBufferBuilder &_fbb, const FloorModOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateFloorModOptions(flatbuffers::FlatBufferBuilder &_fbb, const FloorModOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const FloorModOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateFloorModOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const FloorModOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateFloorModOptions( + _fbb); } -inline RangeOptionsT *RangeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline RangeOptionsT *RangeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new RangeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void RangeOptions::UnPackTo(RangeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void RangeOptions::UnPackTo(RangeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -RangeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RangeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset RangeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RangeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateRangeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateRangeOptions(flatbuffers::FlatBufferBuilder &_fbb, const RangeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateRangeOptions(flatbuffers::FlatBufferBuilder &_fbb, const RangeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const RangeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateRangeOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const RangeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateRangeOptions( + _fbb); } -inline LeakyReluOptionsT * -LeakyReluOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline LeakyReluOptionsT *LeakyReluOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new LeakyReluOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void LeakyReluOptions::UnPackTo(LeakyReluOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void LeakyReluOptions::UnPackTo(LeakyReluOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = alpha(); - _o->alpha = _e; - } + { auto _e = alpha(); _o->alpha = _e; } } -inline flatbuffers::Offset -LeakyReluOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LeakyReluOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset LeakyReluOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LeakyReluOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLeakyReluOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateLeakyReluOptions(flatbuffers::FlatBufferBuilder &_fbb, const LeakyReluOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateLeakyReluOptions(flatbuffers::FlatBufferBuilder &_fbb, const LeakyReluOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const LeakyReluOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LeakyReluOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _alpha = _o->alpha; - return circle::CreateLeakyReluOptions(_fbb, _alpha); + return circle::CreateLeakyReluOptions( + _fbb, + _alpha); } -inline SquaredDifferenceOptionsT * -SquaredDifferenceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SquaredDifferenceOptionsT *SquaredDifferenceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SquaredDifferenceOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -SquaredDifferenceOptions::UnPackTo(SquaredDifferenceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SquaredDifferenceOptions::UnPackTo(SquaredDifferenceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -SquaredDifferenceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const SquaredDifferenceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SquaredDifferenceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SquaredDifferenceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSquaredDifferenceOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSquaredDifferenceOptions(flatbuffers::FlatBufferBuilder &_fbb, - const SquaredDifferenceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSquaredDifferenceOptions(flatbuffers::FlatBufferBuilder &_fbb, const SquaredDifferenceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SquaredDifferenceOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateSquaredDifferenceOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SquaredDifferenceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateSquaredDifferenceOptions( + _fbb); } -inline MirrorPadOptionsT * -MirrorPadOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline MirrorPadOptionsT *MirrorPadOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new MirrorPadOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void MirrorPadOptions::UnPackTo(MirrorPadOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void MirrorPadOptions::UnPackTo(MirrorPadOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = mode(); - _o->mode = _e; - } + { auto _e = mode(); _o->mode = _e; } } -inline flatbuffers::Offset -MirrorPadOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MirrorPadOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset MirrorPadOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MirrorPadOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateMirrorPadOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateMirrorPadOptions(flatbuffers::FlatBufferBuilder &_fbb, const MirrorPadOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateMirrorPadOptions(flatbuffers::FlatBufferBuilder &_fbb, const MirrorPadOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const MirrorPadOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MirrorPadOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _mode = _o->mode; - return circle::CreateMirrorPadOptions(_fbb, _mode); + return circle::CreateMirrorPadOptions( + _fbb, + _mode); } -inline UniqueOptionsT * -UniqueOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline UniqueOptionsT *UniqueOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new UniqueOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void UniqueOptions::UnPackTo(UniqueOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void UniqueOptions::UnPackTo(UniqueOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = idx_out_type(); - _o->idx_out_type = _e; - } + { auto _e = idx_out_type(); _o->idx_out_type = _e; } } -inline flatbuffers::Offset -UniqueOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UniqueOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset UniqueOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UniqueOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateUniqueOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateUniqueOptions(flatbuffers::FlatBufferBuilder &_fbb, const UniqueOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateUniqueOptions(flatbuffers::FlatBufferBuilder &_fbb, const UniqueOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const UniqueOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const UniqueOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _idx_out_type = _o->idx_out_type; - return circle::CreateUniqueOptions(_fbb, _idx_out_type); + return circle::CreateUniqueOptions( + _fbb, + _idx_out_type); } -inline ReverseV2OptionsT * -ReverseV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ReverseV2OptionsT *ReverseV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ReverseV2OptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ReverseV2Options::UnPackTo(ReverseV2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ReverseV2Options::UnPackTo(ReverseV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -ReverseV2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReverseV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ReverseV2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReverseV2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateReverseV2Options(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateReverseV2Options(flatbuffers::FlatBufferBuilder &_fbb, const ReverseV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateReverseV2Options(flatbuffers::FlatBufferBuilder &_fbb, const ReverseV2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ReverseV2OptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateReverseV2Options(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ReverseV2OptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateReverseV2Options( + _fbb); } -inline AddNOptionsT *AddNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline AddNOptionsT *AddNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new AddNOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void AddNOptions::UnPackTo(AddNOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void AddNOptions::UnPackTo(AddNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -AddNOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AddNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset AddNOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AddNOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateAddNOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateAddNOptions(flatbuffers::FlatBufferBuilder &_fbb, const AddNOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateAddNOptions(flatbuffers::FlatBufferBuilder &_fbb, const AddNOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const AddNOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateAddNOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const AddNOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateAddNOptions( + _fbb); } -inline GatherNdOptionsT * -GatherNdOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline GatherNdOptionsT *GatherNdOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new GatherNdOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void GatherNdOptions::UnPackTo(GatherNdOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void GatherNdOptions::UnPackTo(GatherNdOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -GatherNdOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherNdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset GatherNdOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherNdOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateGatherNdOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateGatherNdOptions(flatbuffers::FlatBufferBuilder &_fbb, const GatherNdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateGatherNdOptions(flatbuffers::FlatBufferBuilder &_fbb, const GatherNdOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const GatherNdOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateGatherNdOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GatherNdOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateGatherNdOptions( + _fbb); } -inline WhereOptionsT *WhereOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline WhereOptionsT *WhereOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new WhereOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void WhereOptions::UnPackTo(WhereOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void WhereOptions::UnPackTo(WhereOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -WhereOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhereOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset WhereOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhereOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateWhereOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateWhereOptions(flatbuffers::FlatBufferBuilder &_fbb, const WhereOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateWhereOptions(flatbuffers::FlatBufferBuilder &_fbb, const WhereOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const WhereOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateWhereOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WhereOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateWhereOptions( + _fbb); } -inline ReverseSequenceOptionsT * -ReverseSequenceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ReverseSequenceOptionsT *ReverseSequenceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ReverseSequenceOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -ReverseSequenceOptions::UnPackTo(ReverseSequenceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ReverseSequenceOptions::UnPackTo(ReverseSequenceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = seq_dim(); - _o->seq_dim = _e; - } - { - auto _e = batch_dim(); - _o->batch_dim = _e; - } + { auto _e = seq_dim(); _o->seq_dim = _e; } + { auto _e = batch_dim(); _o->batch_dim = _e; } } -inline flatbuffers::Offset -ReverseSequenceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const ReverseSequenceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ReverseSequenceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReverseSequenceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateReverseSequenceOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateReverseSequenceOptions(flatbuffers::FlatBufferBuilder &_fbb, - const ReverseSequenceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateReverseSequenceOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReverseSequenceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ReverseSequenceOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ReverseSequenceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _seq_dim = _o->seq_dim; auto _batch_dim = _o->batch_dim; - return circle::CreateReverseSequenceOptions(_fbb, _seq_dim, _batch_dim); + return circle::CreateReverseSequenceOptions( + _fbb, + _seq_dim, + _batch_dim); } -inline MatrixDiagOptionsT * -MatrixDiagOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline MatrixDiagOptionsT *MatrixDiagOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new MatrixDiagOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void MatrixDiagOptions::UnPackTo(MatrixDiagOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void MatrixDiagOptions::UnPackTo(MatrixDiagOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -MatrixDiagOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatrixDiagOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset MatrixDiagOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatrixDiagOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateMatrixDiagOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateMatrixDiagOptions(flatbuffers::FlatBufferBuilder &_fbb, const MatrixDiagOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateMatrixDiagOptions(flatbuffers::FlatBufferBuilder &_fbb, const MatrixDiagOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const MatrixDiagOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateMatrixDiagOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MatrixDiagOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateMatrixDiagOptions( + _fbb); } -inline QuantizeOptionsT * -QuantizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline QuantizeOptionsT *QuantizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new QuantizeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void QuantizeOptions::UnPackTo(QuantizeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void QuantizeOptions::UnPackTo(QuantizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -QuantizeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset QuantizeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateQuantizeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateQuantizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateQuantizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const QuantizeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateQuantizeOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const QuantizeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateQuantizeOptions( + _fbb); } -inline MatrixSetDiagOptionsT * -MatrixSetDiagOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline MatrixSetDiagOptionsT *MatrixSetDiagOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new MatrixSetDiagOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void MatrixSetDiagOptions::UnPackTo(MatrixSetDiagOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void MatrixSetDiagOptions::UnPackTo(MatrixSetDiagOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -MatrixSetDiagOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatrixSetDiagOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset MatrixSetDiagOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatrixSetDiagOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateMatrixSetDiagOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateMatrixSetDiagOptions(flatbuffers::FlatBufferBuilder &_fbb, const MatrixSetDiagOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateMatrixSetDiagOptions(flatbuffers::FlatBufferBuilder &_fbb, const MatrixSetDiagOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const MatrixSetDiagOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateMatrixSetDiagOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MatrixSetDiagOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateMatrixSetDiagOptions( + _fbb); } -inline IfOptionsT *IfOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline IfOptionsT *IfOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new IfOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void IfOptions::UnPackTo(IfOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void IfOptions::UnPackTo(IfOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = then_subgraph_index(); - _o->then_subgraph_index = _e; - } - { - auto _e = else_subgraph_index(); - _o->else_subgraph_index = _e; - } + { auto _e = then_subgraph_index(); _o->then_subgraph_index = _e; } + { auto _e = else_subgraph_index(); _o->else_subgraph_index = _e; } } -inline flatbuffers::Offset -IfOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const IfOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset IfOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const IfOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateIfOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateIfOptions(flatbuffers::FlatBufferBuilder &_fbb, const IfOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateIfOptions(flatbuffers::FlatBufferBuilder &_fbb, const IfOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const IfOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const IfOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _then_subgraph_index = _o->then_subgraph_index; auto _else_subgraph_index = _o->else_subgraph_index; - return circle::CreateIfOptions(_fbb, _then_subgraph_index, _else_subgraph_index); + return circle::CreateIfOptions( + _fbb, + _then_subgraph_index, + _else_subgraph_index); } -inline CallOnceOptionsT * -CallOnceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline CallOnceOptionsT *CallOnceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new CallOnceOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void CallOnceOptions::UnPackTo(CallOnceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void CallOnceOptions::UnPackTo(CallOnceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = init_subgraph_index(); - _o->init_subgraph_index = _e; - } + { auto _e = init_subgraph_index(); _o->init_subgraph_index = _e; } } -inline flatbuffers::Offset -CallOnceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CallOnceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CallOnceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CallOnceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateCallOnceOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateCallOnceOptions(flatbuffers::FlatBufferBuilder &_fbb, const CallOnceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateCallOnceOptions(flatbuffers::FlatBufferBuilder &_fbb, const CallOnceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const CallOnceOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const CallOnceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _init_subgraph_index = _o->init_subgraph_index; - return circle::CreateCallOnceOptions(_fbb, _init_subgraph_index); + return circle::CreateCallOnceOptions( + _fbb, + _init_subgraph_index); } -inline WhileOptionsT *WhileOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline WhileOptionsT *WhileOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new WhileOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void WhileOptions::UnPackTo(WhileOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void WhileOptions::UnPackTo(WhileOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = cond_subgraph_index(); - _o->cond_subgraph_index = _e; - } - { - auto _e = body_subgraph_index(); - _o->body_subgraph_index = _e; - } + { auto _e = cond_subgraph_index(); _o->cond_subgraph_index = _e; } + { auto _e = body_subgraph_index(); _o->body_subgraph_index = _e; } } -inline flatbuffers::Offset -WhileOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhileOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset WhileOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhileOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateWhileOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateWhileOptions(flatbuffers::FlatBufferBuilder &_fbb, const WhileOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateWhileOptions(flatbuffers::FlatBufferBuilder &_fbb, const WhileOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const WhileOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WhileOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _cond_subgraph_index = _o->cond_subgraph_index; auto _body_subgraph_index = _o->body_subgraph_index; - return circle::CreateWhileOptions(_fbb, _cond_subgraph_index, _body_subgraph_index); + return circle::CreateWhileOptions( + _fbb, + _cond_subgraph_index, + _body_subgraph_index); } -inline NonMaxSuppressionV4OptionsT * -NonMaxSuppressionV4Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline NonMaxSuppressionV4OptionsT *NonMaxSuppressionV4Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new NonMaxSuppressionV4OptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -NonMaxSuppressionV4Options::UnPackTo(NonMaxSuppressionV4OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void NonMaxSuppressionV4Options::UnPackTo(NonMaxSuppressionV4OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -NonMaxSuppressionV4Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const NonMaxSuppressionV4OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset NonMaxSuppressionV4Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV4OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateNonMaxSuppressionV4Options(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateNonMaxSuppressionV4Options(flatbuffers::FlatBufferBuilder &_fbb, - const NonMaxSuppressionV4OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateNonMaxSuppressionV4Options(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV4OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const NonMaxSuppressionV4OptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateNonMaxSuppressionV4Options(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NonMaxSuppressionV4OptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateNonMaxSuppressionV4Options( + _fbb); } -inline NonMaxSuppressionV5OptionsT * -NonMaxSuppressionV5Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline NonMaxSuppressionV5OptionsT *NonMaxSuppressionV5Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new NonMaxSuppressionV5OptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -NonMaxSuppressionV5Options::UnPackTo(NonMaxSuppressionV5OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void NonMaxSuppressionV5Options::UnPackTo(NonMaxSuppressionV5OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -NonMaxSuppressionV5Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const NonMaxSuppressionV5OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset NonMaxSuppressionV5Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV5OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateNonMaxSuppressionV5Options(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateNonMaxSuppressionV5Options(flatbuffers::FlatBufferBuilder &_fbb, - const NonMaxSuppressionV5OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateNonMaxSuppressionV5Options(flatbuffers::FlatBufferBuilder &_fbb, const NonMaxSuppressionV5OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const NonMaxSuppressionV5OptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateNonMaxSuppressionV5Options(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NonMaxSuppressionV5OptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateNonMaxSuppressionV5Options( + _fbb); } -inline ScatterNdOptionsT * -ScatterNdOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ScatterNdOptionsT *ScatterNdOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ScatterNdOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ScatterNdOptions::UnPackTo(ScatterNdOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ScatterNdOptions::UnPackTo(ScatterNdOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -ScatterNdOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScatterNdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ScatterNdOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScatterNdOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateScatterNdOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateScatterNdOptions(flatbuffers::FlatBufferBuilder &_fbb, const ScatterNdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateScatterNdOptions(flatbuffers::FlatBufferBuilder &_fbb, const ScatterNdOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ScatterNdOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateScatterNdOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ScatterNdOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateScatterNdOptions( + _fbb); } -inline SelectV2OptionsT * -SelectV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SelectV2OptionsT *SelectV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SelectV2OptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SelectV2Options::UnPackTo(SelectV2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SelectV2Options::UnPackTo(SelectV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -SelectV2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SelectV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SelectV2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SelectV2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSelectV2Options(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSelectV2Options(flatbuffers::FlatBufferBuilder &_fbb, const SelectV2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSelectV2Options(flatbuffers::FlatBufferBuilder &_fbb, const SelectV2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SelectV2OptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateSelectV2Options(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SelectV2OptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateSelectV2Options( + _fbb); } -inline DensifyOptionsT * -DensifyOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline DensifyOptionsT *DensifyOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new DensifyOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void DensifyOptions::UnPackTo(DensifyOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void DensifyOptions::UnPackTo(DensifyOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -DensifyOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DensifyOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset DensifyOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DensifyOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateDensifyOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateDensifyOptions(flatbuffers::FlatBufferBuilder &_fbb, const DensifyOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateDensifyOptions(flatbuffers::FlatBufferBuilder &_fbb, const DensifyOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const DensifyOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateDensifyOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const DensifyOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateDensifyOptions( + _fbb); } -inline SegmentSumOptionsT * -SegmentSumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SegmentSumOptionsT *SegmentSumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SegmentSumOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SegmentSumOptions::UnPackTo(SegmentSumOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SegmentSumOptions::UnPackTo(SegmentSumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -SegmentSumOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SegmentSumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SegmentSumOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SegmentSumOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSegmentSumOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb, const SegmentSumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb, const SegmentSumOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SegmentSumOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateSegmentSumOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SegmentSumOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateSegmentSumOptions( + _fbb); } -inline BatchMatMulOptionsT * -BatchMatMulOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline BatchMatMulOptionsT *BatchMatMulOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new BatchMatMulOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void BatchMatMulOptions::UnPackTo(BatchMatMulOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BatchMatMulOptions::UnPackTo(BatchMatMulOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = adjoint_lhs(); - _o->adjoint_lhs = _e; - } - { - auto _e = adjoint_rhs(); - _o->adjoint_rhs = _e; - } - { - auto _e = asymmetric_quantize_inputs(); - _o->asymmetric_quantize_inputs = _e; - } + { auto _e = adjoint_lhs(); _o->adjoint_lhs = _e; } + { auto _e = adjoint_rhs(); _o->adjoint_rhs = _e; } + { auto _e = asymmetric_quantize_inputs(); _o->asymmetric_quantize_inputs = _e; } } -inline flatbuffers::Offset -BatchMatMulOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BatchMatMulOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBatchMatMulOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBatchMatMulOptions(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBatchMatMulOptions(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BatchMatMulOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BatchMatMulOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _adjoint_lhs = _o->adjoint_lhs; auto _adjoint_rhs = _o->adjoint_rhs; auto _asymmetric_quantize_inputs = _o->asymmetric_quantize_inputs; - return circle::CreateBatchMatMulOptions(_fbb, _adjoint_lhs, _adjoint_rhs, - _asymmetric_quantize_inputs); + return circle::CreateBatchMatMulOptions( + _fbb, + _adjoint_lhs, + _adjoint_rhs, + _asymmetric_quantize_inputs); } -inline CumsumOptionsT * -CumsumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline CumsumOptionsT *CumsumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new CumsumOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void CumsumOptions::UnPackTo(CumsumOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void CumsumOptions::UnPackTo(CumsumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = exclusive(); - _o->exclusive = _e; - } - { - auto _e = reverse(); - _o->reverse = _e; - } + { auto _e = exclusive(); _o->exclusive = _e; } + { auto _e = reverse(); _o->reverse = _e; } } -inline flatbuffers::Offset -CumsumOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CumsumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CumsumOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CumsumOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateCumsumOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateCumsumOptions(flatbuffers::FlatBufferBuilder &_fbb, const CumsumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateCumsumOptions(flatbuffers::FlatBufferBuilder &_fbb, const CumsumOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const CumsumOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const CumsumOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _exclusive = _o->exclusive; auto _reverse = _o->reverse; - return circle::CreateCumsumOptions(_fbb, _exclusive, _reverse); + return circle::CreateCumsumOptions( + _fbb, + _exclusive, + _reverse); } -inline BroadcastToOptionsT * -BroadcastToOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline BroadcastToOptionsT *BroadcastToOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new BroadcastToOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void BroadcastToOptions::UnPackTo(BroadcastToOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BroadcastToOptions::UnPackTo(BroadcastToOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -BroadcastToOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BroadcastToOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BroadcastToOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BroadcastToOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBroadcastToOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBroadcastToOptions(flatbuffers::FlatBufferBuilder &_fbb, const BroadcastToOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBroadcastToOptions(flatbuffers::FlatBufferBuilder &_fbb, const BroadcastToOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BroadcastToOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateBroadcastToOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BroadcastToOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateBroadcastToOptions( + _fbb); } -inline Rfft2dOptionsT * -Rfft2dOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline Rfft2dOptionsT *Rfft2dOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new Rfft2dOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Rfft2dOptions::UnPackTo(Rfft2dOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void Rfft2dOptions::UnPackTo(Rfft2dOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -Rfft2dOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Rfft2dOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset Rfft2dOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Rfft2dOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateRfft2dOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateRfft2dOptions(flatbuffers::FlatBufferBuilder &_fbb, const Rfft2dOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateRfft2dOptions(flatbuffers::FlatBufferBuilder &_fbb, const Rfft2dOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const Rfft2dOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateRfft2dOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const Rfft2dOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateRfft2dOptions( + _fbb); } -inline HashtableOptionsT * -HashtableOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline HashtableOptionsT *HashtableOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new HashtableOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void HashtableOptions::UnPackTo(HashtableOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void HashtableOptions::UnPackTo(HashtableOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = table_id(); - _o->table_id = _e; - } - { - auto _e = key_dtype(); - _o->key_dtype = _e; - } - { - auto _e = value_dtype(); - _o->value_dtype = _e; - } + { auto _e = table_id(); _o->table_id = _e; } + { auto _e = key_dtype(); _o->key_dtype = _e; } + { auto _e = value_dtype(); _o->value_dtype = _e; } } -inline flatbuffers::Offset -HashtableOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset HashtableOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateHashtableOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateHashtableOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateHashtableOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const HashtableOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const HashtableOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _table_id = _o->table_id; auto _key_dtype = _o->key_dtype; auto _value_dtype = _o->value_dtype; - return circle::CreateHashtableOptions(_fbb, _table_id, _key_dtype, _value_dtype); + return circle::CreateHashtableOptions( + _fbb, + _table_id, + _key_dtype, + _value_dtype); } -inline HashtableFindOptionsT * -HashtableFindOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline HashtableFindOptionsT *HashtableFindOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new HashtableFindOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void HashtableFindOptions::UnPackTo(HashtableFindOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void HashtableFindOptions::UnPackTo(HashtableFindOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -HashtableFindOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableFindOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset HashtableFindOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableFindOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateHashtableFindOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateHashtableFindOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableFindOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateHashtableFindOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableFindOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const HashtableFindOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateHashtableFindOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const HashtableFindOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateHashtableFindOptions( + _fbb); } -inline HashtableImportOptionsT * -HashtableImportOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline HashtableImportOptionsT *HashtableImportOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new HashtableImportOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -HashtableImportOptions::UnPackTo(HashtableImportOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void HashtableImportOptions::UnPackTo(HashtableImportOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -HashtableImportOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const HashtableImportOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset HashtableImportOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableImportOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateHashtableImportOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateHashtableImportOptions(flatbuffers::FlatBufferBuilder &_fbb, - const HashtableImportOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateHashtableImportOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableImportOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const HashtableImportOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateHashtableImportOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const HashtableImportOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateHashtableImportOptions( + _fbb); } -inline HashtableSizeOptionsT * -HashtableSizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline HashtableSizeOptionsT *HashtableSizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new HashtableSizeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void HashtableSizeOptions::UnPackTo(HashtableSizeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void HashtableSizeOptions::UnPackTo(HashtableSizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -HashtableSizeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableSizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset HashtableSizeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const HashtableSizeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateHashtableSizeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateHashtableSizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableSizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateHashtableSizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const HashtableSizeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const HashtableSizeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateHashtableSizeOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const HashtableSizeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateHashtableSizeOptions( + _fbb); } -inline VarHandleOptionsT * -VarHandleOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline VarHandleOptionsT *VarHandleOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new VarHandleOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void VarHandleOptions::UnPackTo(VarHandleOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void VarHandleOptions::UnPackTo(VarHandleOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = container(); - if (_e) - _o->container = _e->str(); - } - { - auto _e = shared_name(); - if (_e) - _o->shared_name = _e->str(); - } + { auto _e = container(); if (_e) _o->container = _e->str(); } + { auto _e = shared_name(); if (_e) _o->shared_name = _e->str(); } } -inline flatbuffers::Offset -VarHandleOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const VarHandleOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset VarHandleOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const VarHandleOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateVarHandleOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateVarHandleOptions(flatbuffers::FlatBufferBuilder &_fbb, const VarHandleOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateVarHandleOptions(flatbuffers::FlatBufferBuilder &_fbb, const VarHandleOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const VarHandleOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const VarHandleOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _container = _o->container.empty() ? 0 : _fbb.CreateString(_o->container); auto _shared_name = _o->shared_name.empty() ? 0 : _fbb.CreateString(_o->shared_name); - return circle::CreateVarHandleOptions(_fbb, _container, _shared_name); + return circle::CreateVarHandleOptions( + _fbb, + _container, + _shared_name); } -inline ReadVariableOptionsT * -ReadVariableOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ReadVariableOptionsT *ReadVariableOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ReadVariableOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ReadVariableOptions::UnPackTo(ReadVariableOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ReadVariableOptions::UnPackTo(ReadVariableOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -ReadVariableOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReadVariableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ReadVariableOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReadVariableOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateReadVariableOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateReadVariableOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReadVariableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateReadVariableOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReadVariableOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ReadVariableOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateReadVariableOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ReadVariableOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateReadVariableOptions( + _fbb); } -inline AssignVariableOptionsT * -AssignVariableOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline AssignVariableOptionsT *AssignVariableOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new AssignVariableOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void AssignVariableOptions::UnPackTo(AssignVariableOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void AssignVariableOptions::UnPackTo(AssignVariableOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -AssignVariableOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AssignVariableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset AssignVariableOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AssignVariableOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateAssignVariableOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateAssignVariableOptions(flatbuffers::FlatBufferBuilder &_fbb, const AssignVariableOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateAssignVariableOptions(flatbuffers::FlatBufferBuilder &_fbb, const AssignVariableOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const AssignVariableOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateAssignVariableOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const AssignVariableOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateAssignVariableOptions( + _fbb); } -inline RandomOptionsT * -RandomOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline RandomOptionsT *RandomOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new RandomOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void RandomOptions::UnPackTo(RandomOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void RandomOptions::UnPackTo(RandomOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = seed(); - _o->seed = _e; - } - { - auto _e = seed2(); - _o->seed2 = _e; - } + { auto _e = seed(); _o->seed = _e; } + { auto _e = seed2(); _o->seed2 = _e; } } -inline flatbuffers::Offset -RandomOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RandomOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset RandomOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RandomOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateRandomOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateRandomOptions(flatbuffers::FlatBufferBuilder &_fbb, const RandomOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateRandomOptions(flatbuffers::FlatBufferBuilder &_fbb, const RandomOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const RandomOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const RandomOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _seed = _o->seed; auto _seed2 = _o->seed2; - return circle::CreateRandomOptions(_fbb, _seed, _seed2); + return circle::CreateRandomOptions( + _fbb, + _seed, + _seed2); } -inline BucketizeOptionsT * -BucketizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline BucketizeOptionsT *BucketizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new BucketizeOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void BucketizeOptions::UnPackTo(BucketizeOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BucketizeOptions::UnPackTo(BucketizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = boundaries(); - if (_e) - { - _o->boundaries.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->boundaries[_i] = _e->Get(_i); - } - } - } + { auto _e = boundaries(); if (_e) { _o->boundaries.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->boundaries[_i] = _e->Get(_i); } } } } -inline flatbuffers::Offset -BucketizeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BucketizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BucketizeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BucketizeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBucketizeOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBucketizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const BucketizeOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBucketizeOptions(flatbuffers::FlatBufferBuilder &_fbb, const BucketizeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BucketizeOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BucketizeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _boundaries = _o->boundaries.size() ? _fbb.CreateVector(_o->boundaries) : 0; - return circle::CreateBucketizeOptions(_fbb, _boundaries); + return circle::CreateBucketizeOptions( + _fbb, + _boundaries); } -inline GeluOptionsT *GeluOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline GeluOptionsT *GeluOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new GeluOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void GeluOptions::UnPackTo(GeluOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void GeluOptions::UnPackTo(GeluOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = approximate(); - _o->approximate = _e; - } + { auto _e = approximate(); _o->approximate = _e; } } -inline flatbuffers::Offset -GeluOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GeluOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset GeluOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GeluOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateGeluOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateGeluOptions(flatbuffers::FlatBufferBuilder &_fbb, const GeluOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateGeluOptions(flatbuffers::FlatBufferBuilder &_fbb, const GeluOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const GeluOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GeluOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _approximate = _o->approximate; - return circle::CreateGeluOptions(_fbb, _approximate); + return circle::CreateGeluOptions( + _fbb, + _approximate); } -inline DynamicUpdateSliceOptionsT * -DynamicUpdateSliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline DynamicUpdateSliceOptionsT *DynamicUpdateSliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new DynamicUpdateSliceOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -DynamicUpdateSliceOptions::UnPackTo(DynamicUpdateSliceOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void DynamicUpdateSliceOptions::UnPackTo(DynamicUpdateSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -DynamicUpdateSliceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const DynamicUpdateSliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset DynamicUpdateSliceOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DynamicUpdateSliceOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateDynamicUpdateSliceOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateDynamicUpdateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, - const DynamicUpdateSliceOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateDynamicUpdateSliceOptions(flatbuffers::FlatBufferBuilder &_fbb, const DynamicUpdateSliceOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const DynamicUpdateSliceOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateDynamicUpdateSliceOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const DynamicUpdateSliceOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateDynamicUpdateSliceOptions( + _fbb); } -inline UnsortedSegmentProdOptionsT * -UnsortedSegmentProdOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline UnsortedSegmentProdOptionsT *UnsortedSegmentProdOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new UnsortedSegmentProdOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -UnsortedSegmentProdOptions::UnPackTo(UnsortedSegmentProdOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void UnsortedSegmentProdOptions::UnPackTo(UnsortedSegmentProdOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -UnsortedSegmentProdOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentProdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset UnsortedSegmentProdOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentProdOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateUnsortedSegmentProdOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateUnsortedSegmentProdOptions(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentProdOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateUnsortedSegmentProdOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentProdOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const UnsortedSegmentProdOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateUnsortedSegmentProdOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const UnsortedSegmentProdOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateUnsortedSegmentProdOptions( + _fbb); } -inline UnsortedSegmentMaxOptionsT * -UnsortedSegmentMaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline UnsortedSegmentMaxOptionsT *UnsortedSegmentMaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new UnsortedSegmentMaxOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -UnsortedSegmentMaxOptions::UnPackTo(UnsortedSegmentMaxOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void UnsortedSegmentMaxOptions::UnPackTo(UnsortedSegmentMaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -UnsortedSegmentMaxOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentMaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset UnsortedSegmentMaxOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMaxOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateUnsortedSegmentMaxOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateUnsortedSegmentMaxOptions(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentMaxOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateUnsortedSegmentMaxOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMaxOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const UnsortedSegmentMaxOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateUnsortedSegmentMaxOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const UnsortedSegmentMaxOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateUnsortedSegmentMaxOptions( + _fbb); } -inline UnsortedSegmentSumOptionsT * -UnsortedSegmentSumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline UnsortedSegmentSumOptionsT *UnsortedSegmentSumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new UnsortedSegmentSumOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -UnsortedSegmentSumOptions::UnPackTo(UnsortedSegmentSumOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void UnsortedSegmentSumOptions::UnPackTo(UnsortedSegmentSumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -UnsortedSegmentSumOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentSumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset UnsortedSegmentSumOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentSumOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateUnsortedSegmentSumOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateUnsortedSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentSumOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateUnsortedSegmentSumOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentSumOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const UnsortedSegmentSumOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateUnsortedSegmentSumOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const UnsortedSegmentSumOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateUnsortedSegmentSumOptions( + _fbb); } -inline ATan2OptionsT *ATan2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ATan2OptionsT *ATan2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ATan2OptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void ATan2Options::UnPackTo(ATan2OptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void ATan2Options::UnPackTo(ATan2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -ATan2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ATan2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset ATan2Options::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ATan2OptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateATan2Options(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateATan2Options(flatbuffers::FlatBufferBuilder &_fbb, const ATan2OptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateATan2Options(flatbuffers::FlatBufferBuilder &_fbb, const ATan2OptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ATan2OptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateATan2Options(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ATan2OptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateATan2Options( + _fbb); } -inline UnsortedSegmentMinOptionsT * -UnsortedSegmentMinOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline UnsortedSegmentMinOptionsT *UnsortedSegmentMinOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new UnsortedSegmentMinOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -UnsortedSegmentMinOptions::UnPackTo(UnsortedSegmentMinOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void UnsortedSegmentMinOptions::UnPackTo(UnsortedSegmentMinOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -UnsortedSegmentMinOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentMinOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset UnsortedSegmentMinOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMinOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateUnsortedSegmentMinOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateUnsortedSegmentMinOptions(flatbuffers::FlatBufferBuilder &_fbb, - const UnsortedSegmentMinOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateUnsortedSegmentMinOptions(flatbuffers::FlatBufferBuilder &_fbb, const UnsortedSegmentMinOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const UnsortedSegmentMinOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateUnsortedSegmentMinOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const UnsortedSegmentMinOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateUnsortedSegmentMinOptions( + _fbb); } -inline SignOptionsT *SignOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SignOptionsT *SignOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SignOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SignOptions::UnPackTo(SignOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SignOptions::UnPackTo(SignOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -SignOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SignOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset SignOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SignOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSignOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSignOptions(flatbuffers::FlatBufferBuilder &_fbb, const SignOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSignOptions(flatbuffers::FlatBufferBuilder &_fbb, const SignOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SignOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateSignOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SignOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateSignOptions( + _fbb); } -inline BitcastOptionsT * -BitcastOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline BitcastOptionsT *BitcastOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new BitcastOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void BitcastOptions::UnPackTo(BitcastOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BitcastOptions::UnPackTo(BitcastOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -BitcastOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BitcastOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BitcastOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BitcastOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBitcastOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBitcastOptions(flatbuffers::FlatBufferBuilder &_fbb, const BitcastOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBitcastOptions(flatbuffers::FlatBufferBuilder &_fbb, const BitcastOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BitcastOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateBitcastOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BitcastOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateBitcastOptions( + _fbb); } -inline BitwiseXorOptionsT * -BitwiseXorOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline BitwiseXorOptionsT *BitwiseXorOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new BitwiseXorOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void BitwiseXorOptions::UnPackTo(BitwiseXorOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BitwiseXorOptions::UnPackTo(BitwiseXorOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -BitwiseXorOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BitwiseXorOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BitwiseXorOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BitwiseXorOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBitwiseXorOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBitwiseXorOptions(flatbuffers::FlatBufferBuilder &_fbb, const BitwiseXorOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBitwiseXorOptions(flatbuffers::FlatBufferBuilder &_fbb, const BitwiseXorOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BitwiseXorOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateBitwiseXorOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BitwiseXorOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateBitwiseXorOptions( + _fbb); } -inline RightShiftOptionsT * -RightShiftOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline RightShiftOptionsT *RightShiftOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new RightShiftOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void RightShiftOptions::UnPackTo(RightShiftOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void RightShiftOptions::UnPackTo(RightShiftOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; } -inline flatbuffers::Offset -RightShiftOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RightShiftOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset RightShiftOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RightShiftOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateRightShiftOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateRightShiftOptions(flatbuffers::FlatBufferBuilder &_fbb, const RightShiftOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateRightShiftOptions(flatbuffers::FlatBufferBuilder &_fbb, const RightShiftOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const RightShiftOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateRightShiftOptions( + _fbb); +} + +inline DilateOptionsT *DilateOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new DilateOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void DilateOptions::UnPackTo(DilateOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +} + +inline flatbuffers::Offset DilateOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DilateOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateDilateOptions(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateDilateOptions(flatbuffers::FlatBufferBuilder &_fbb, const DilateOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const DilateOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return circle::CreateDilateOptions( + _fbb); +} + +inline ReduceWindowOptionsT *ReduceWindowOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new ReduceWindowOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void ReduceWindowOptions::UnPackTo(ReduceWindowOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = reduce_function(); _o->reduce_function = _e; } +} + +inline flatbuffers::Offset ReduceWindowOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReduceWindowOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateReduceWindowOptions(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateReduceWindowOptions(flatbuffers::FlatBufferBuilder &_fbb, const ReduceWindowOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ReduceWindowOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _reduce_function = _o->reduce_function; + return circle::CreateReduceWindowOptions( + _fbb, + _reduce_function); +} + +inline GRUOptionsT *GRUOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new GRUOptionsT()); + UnPackTo(_o.get(), _resolver); + return _o.release(); +} + +inline void GRUOptions::UnPackTo(GRUOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } + { auto _e = return_sequences(); _o->return_sequences = _e; } + { auto _e = time_major(); _o->time_major = _e; } +} + +inline flatbuffers::Offset GRUOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GRUOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateGRUOptions(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset CreateGRUOptions(flatbuffers::FlatBufferBuilder &_fbb, const GRUOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const RightShiftOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - return circle::CreateRightShiftOptions(_fbb); + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GRUOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _fused_activation_function = _o->fused_activation_function; + auto _return_sequences = _o->return_sequences; + auto _time_major = _o->time_major; + return circle::CreateGRUOptions( + _fbb, + _fused_activation_function, + _return_sequences, + _time_major); } -inline BCQGatherOptionsT * -BCQGatherOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline BCQGatherOptionsT *BCQGatherOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new BCQGatherOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void BCQGatherOptions::UnPackTo(BCQGatherOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BCQGatherOptions::UnPackTo(BCQGatherOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = input_hidden_size(); - _o->input_hidden_size = _e; - } - { - auto _e = axis(); - _o->axis = _e; - } + { auto _e = input_hidden_size(); _o->input_hidden_size = _e; } + { auto _e = axis(); _o->axis = _e; } } -inline flatbuffers::Offset -BCQGatherOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BCQGatherOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BCQGatherOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BCQGatherOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBCQGatherOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBCQGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const BCQGatherOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBCQGatherOptions(flatbuffers::FlatBufferBuilder &_fbb, const BCQGatherOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BCQGatherOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BCQGatherOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _input_hidden_size = _o->input_hidden_size; auto _axis = _o->axis; - return circle::CreateBCQGatherOptions(_fbb, _input_hidden_size, _axis); + return circle::CreateBCQGatherOptions( + _fbb, + _input_hidden_size, + _axis); } -inline BCQFullyConnectedOptionsT * -BCQFullyConnectedOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline BCQFullyConnectedOptionsT *BCQFullyConnectedOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new BCQFullyConnectedOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void -BCQFullyConnectedOptions::UnPackTo(BCQFullyConnectedOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void BCQFullyConnectedOptions::UnPackTo(BCQFullyConnectedOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = weights_hidden_size(); - _o->weights_hidden_size = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } + { auto _e = weights_hidden_size(); _o->weights_hidden_size = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } } -inline flatbuffers::Offset -BCQFullyConnectedOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const BCQFullyConnectedOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset BCQFullyConnectedOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BCQFullyConnectedOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBCQFullyConnectedOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateBCQFullyConnectedOptions(flatbuffers::FlatBufferBuilder &_fbb, - const BCQFullyConnectedOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBCQFullyConnectedOptions(flatbuffers::FlatBufferBuilder &_fbb, const BCQFullyConnectedOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BCQFullyConnectedOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BCQFullyConnectedOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _weights_hidden_size = _o->weights_hidden_size; auto _fused_activation_function = _o->fused_activation_function; - return circle::CreateBCQFullyConnectedOptions(_fbb, _weights_hidden_size, - _fused_activation_function); + return circle::CreateBCQFullyConnectedOptions( + _fbb, + _weights_hidden_size, + _fused_activation_function); } -inline InstanceNormOptionsT * -InstanceNormOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline InstanceNormOptionsT *InstanceNormOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new InstanceNormOptionsT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void InstanceNormOptions::UnPackTo(InstanceNormOptionsT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void InstanceNormOptions::UnPackTo(InstanceNormOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = epsilon(); - _o->epsilon = _e; - } - { - auto _e = fused_activation_function(); - _o->fused_activation_function = _e; - } + { auto _e = epsilon(); _o->epsilon = _e; } + { auto _e = fused_activation_function(); _o->fused_activation_function = _e; } } -inline flatbuffers::Offset -InstanceNormOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InstanceNormOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset InstanceNormOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InstanceNormOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateInstanceNormOptions(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateInstanceNormOptions(flatbuffers::FlatBufferBuilder &_fbb, const InstanceNormOptionsT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateInstanceNormOptions(flatbuffers::FlatBufferBuilder &_fbb, const InstanceNormOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const InstanceNormOptionsT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const InstanceNormOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _epsilon = _o->epsilon; auto _fused_activation_function = _o->fused_activation_function; - return circle::CreateInstanceNormOptions(_fbb, _epsilon, _fused_activation_function); + return circle::CreateInstanceNormOptions( + _fbb, + _epsilon, + _fused_activation_function); } -inline OperatorCodeT *OperatorCode::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline OperatorCodeT *OperatorCode::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new OperatorCodeT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void OperatorCode::UnPackTo(OperatorCodeT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void OperatorCode::UnPackTo(OperatorCodeT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = deprecated_builtin_code(); - _o->deprecated_builtin_code = _e; - } - { - auto _e = custom_code(); - if (_e) - _o->custom_code = _e->str(); - } - { - auto _e = version(); - _o->version = _e; - } - { - auto _e = builtin_code(); - _o->builtin_code = _e; - } + { auto _e = deprecated_builtin_code(); _o->deprecated_builtin_code = _e; } + { auto _e = custom_code(); if (_e) _o->custom_code = _e->str(); } + { auto _e = version(); _o->version = _e; } + { auto _e = builtin_code(); _o->builtin_code = _e; } } -inline flatbuffers::Offset -OperatorCode::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OperatorCodeT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset OperatorCode::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OperatorCodeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateOperatorCode(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateOperatorCode(flatbuffers::FlatBufferBuilder &_fbb, const OperatorCodeT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateOperatorCode(flatbuffers::FlatBufferBuilder &_fbb, const OperatorCodeT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const OperatorCodeT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const OperatorCodeT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _deprecated_builtin_code = _o->deprecated_builtin_code; auto _custom_code = _o->custom_code.empty() ? 0 : _fbb.CreateString(_o->custom_code); auto _version = _o->version; auto _builtin_code = _o->builtin_code; - return circle::CreateOperatorCode(_fbb, _deprecated_builtin_code, _custom_code, _version, - _builtin_code); + return circle::CreateOperatorCode( + _fbb, + _deprecated_builtin_code, + _custom_code, + _version, + _builtin_code); } -inline OperatorT *Operator::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline OperatorT *Operator::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new OperatorT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Operator::UnPackTo(OperatorT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void Operator::UnPackTo(OperatorT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = opcode_index(); - _o->opcode_index = _e; - } - { - auto _e = inputs(); - if (_e) - { - _o->inputs.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->inputs[_i] = _e->Get(_i); - } - } - } - { - auto _e = outputs(); - if (_e) - { - _o->outputs.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->outputs[_i] = _e->Get(_i); - } - } - } - { - auto _e = builtin_options_type(); - _o->builtin_options.type = _e; - } - { - auto _e = builtin_options(); - if (_e) - _o->builtin_options.value = - circle::BuiltinOptionsUnion::UnPack(_e, builtin_options_type(), _resolver); - } - { - auto _e = custom_options(); - if (_e) - { - _o->custom_options.resize(_e->size()); - std::copy(_e->begin(), _e->end(), _o->custom_options.begin()); - } - } - { - auto _e = custom_options_format(); - _o->custom_options_format = _e; - } - { - auto _e = mutating_variable_inputs(); - if (_e) - { - _o->mutating_variable_inputs.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->mutating_variable_inputs[_i] = _e->Get(_i) != 0; - } - } - } - { - auto _e = intermediates(); - if (_e) - { - _o->intermediates.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->intermediates[_i] = _e->Get(_i); - } - } - } -} - -inline flatbuffers::Offset -Operator::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OperatorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ + { auto _e = opcode_index(); _o->opcode_index = _e; } + { auto _e = inputs(); if (_e) { _o->inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputs[_i] = _e->Get(_i); } } } + { auto _e = outputs(); if (_e) { _o->outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputs[_i] = _e->Get(_i); } } } + { auto _e = builtin_options_type(); _o->builtin_options.type = _e; } + { auto _e = builtin_options(); if (_e) _o->builtin_options.value = circle::BuiltinOptionsUnion::UnPack(_e, builtin_options_type(), _resolver); } + { auto _e = custom_options(); if (_e) { _o->custom_options.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->custom_options.begin()); } } + { auto _e = custom_options_format(); _o->custom_options_format = _e; } + { auto _e = mutating_variable_inputs(); if (_e) { _o->mutating_variable_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->mutating_variable_inputs[_i] = _e->Get(_i) != 0; } } } + { auto _e = intermediates(); if (_e) { _o->intermediates.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->intermediates[_i] = _e->Get(_i); } } } + { auto _e = large_custom_options_offset(); _o->large_custom_options_offset = _e; } + { auto _e = large_custom_options_size(); _o->large_custom_options_size = _e; } + { auto _e = builtin_options_2_type(); _o->builtin_options_2.type = _e; } + { auto _e = builtin_options_2(); if (_e) _o->builtin_options_2.value = circle::BuiltinOptions2Union::UnPack(_e, builtin_options_2_type(), _resolver); } +} + +inline flatbuffers::Offset Operator::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OperatorT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateOperator(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateOperator(flatbuffers::FlatBufferBuilder &_fbb, const OperatorT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateOperator(flatbuffers::FlatBufferBuilder &_fbb, const OperatorT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const OperatorT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const OperatorT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _opcode_index = _o->opcode_index; auto _inputs = _o->inputs.size() ? _fbb.CreateVector(_o->inputs) : 0; auto _outputs = _o->outputs.size() ? _fbb.CreateVector(_o->outputs) : 0; @@ -22810,599 +20906,289 @@ CreateOperator(flatbuffers::FlatBufferBuilder &_fbb, const OperatorT *_o, auto _builtin_options = _o->builtin_options.Pack(_fbb); auto _custom_options = _o->custom_options.size() ? _fbb.CreateVector(_o->custom_options) : 0; auto _custom_options_format = _o->custom_options_format; - auto _mutating_variable_inputs = - _o->mutating_variable_inputs.size() ? _fbb.CreateVector(_o->mutating_variable_inputs) : 0; + auto _mutating_variable_inputs = _o->mutating_variable_inputs.size() ? _fbb.CreateVector(_o->mutating_variable_inputs) : 0; auto _intermediates = _o->intermediates.size() ? _fbb.CreateVector(_o->intermediates) : 0; - return circle::CreateOperator(_fbb, _opcode_index, _inputs, _outputs, _builtin_options_type, - _builtin_options, _custom_options, _custom_options_format, - _mutating_variable_inputs, _intermediates); -} - -inline SubGraphT *SubGraph::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ + auto _large_custom_options_offset = _o->large_custom_options_offset; + auto _large_custom_options_size = _o->large_custom_options_size; + auto _builtin_options_2_type = _o->builtin_options_2.type; + auto _builtin_options_2 = _o->builtin_options_2.Pack(_fbb); + return circle::CreateOperator( + _fbb, + _opcode_index, + _inputs, + _outputs, + _builtin_options_type, + _builtin_options, + _custom_options, + _custom_options_format, + _mutating_variable_inputs, + _intermediates, + _large_custom_options_offset, + _large_custom_options_size, + _builtin_options_2_type, + _builtin_options_2); +} + +inline SubGraphT *SubGraph::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SubGraphT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SubGraph::UnPackTo(SubGraphT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SubGraph::UnPackTo(SubGraphT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = tensors(); - if (_e) - { - _o->tensors.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->tensors[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } - { - auto _e = inputs(); - if (_e) - { - _o->inputs.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->inputs[_i] = _e->Get(_i); - } - } - } - { - auto _e = outputs(); - if (_e) - { - _o->outputs.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->outputs[_i] = _e->Get(_i); - } - } - } - { - auto _e = operators(); - if (_e) - { - _o->operators.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->operators[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } - { - auto _e = name(); - if (_e) - _o->name = _e->str(); - } - { - auto _e = data_format(); - _o->data_format = _e; - } -} - -inline flatbuffers::Offset -SubGraph::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ + { auto _e = tensors(); if (_e) { _o->tensors.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensors[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + { auto _e = inputs(); if (_e) { _o->inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputs[_i] = _e->Get(_i); } } } + { auto _e = outputs(); if (_e) { _o->outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputs[_i] = _e->Get(_i); } } } + { auto _e = operators(); if (_e) { _o->operators.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->operators[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + { auto _e = name(); if (_e) _o->name = _e->str(); } +} + +inline flatbuffers::Offset SubGraph::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSubGraph(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSubGraph(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSubGraph(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SubGraphT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - auto _tensors = - _o->tensors.size() - ? _fbb.CreateVector>( - _o->tensors.size(), - [](size_t i, _VectorArgs *__va) { - return CreateTensor(*__va->__fbb, __va->__o->tensors[i].get(), __va->__rehasher); - }, - &_va) - : 0; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SubGraphT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _tensors = _o->tensors.size() ? _fbb.CreateVector> (_o->tensors.size(), [](size_t i, _VectorArgs *__va) { return CreateTensor(*__va->__fbb, __va->__o->tensors[i].get(), __va->__rehasher); }, &_va ) : 0; auto _inputs = _o->inputs.size() ? _fbb.CreateVector(_o->inputs) : 0; auto _outputs = _o->outputs.size() ? _fbb.CreateVector(_o->outputs) : 0; - auto _operators = - _o->operators.size() - ? _fbb.CreateVector>( - _o->operators.size(), - [](size_t i, _VectorArgs *__va) { - return CreateOperator(*__va->__fbb, __va->__o->operators[i].get(), __va->__rehasher); - }, - &_va) - : 0; + auto _operators = _o->operators.size() ? _fbb.CreateVector> (_o->operators.size(), [](size_t i, _VectorArgs *__va) { return CreateOperator(*__va->__fbb, __va->__o->operators[i].get(), __va->__rehasher); }, &_va ) : 0; auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); - auto _data_format = _o->data_format; - return circle::CreateSubGraph(_fbb, _tensors, _inputs, _outputs, _operators, _name, _data_format); + return circle::CreateSubGraph( + _fbb, + _tensors, + _inputs, + _outputs, + _operators, + _name); } -inline BufferT *Buffer::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline BufferT *Buffer::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new BufferT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Buffer::UnPackTo(BufferT *_o, const flatbuffers::resolver_function_t *_resolver) const -{ +inline void Buffer::UnPackTo(BufferT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = data(); - if (_e) - { - _o->data.resize(_e->size()); - std::copy(_e->begin(), _e->end(), _o->data.begin()); - } - } + { auto _e = data(); if (_e) { _o->data.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->data.begin()); } } + { auto _e = offset(); _o->offset = _e; } + { auto _e = size(); _o->size = _e; } } -inline flatbuffers::Offset Buffer::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const BufferT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset Buffer::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BufferT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateBuffer(_fbb, _o, _rehasher); } -inline flatbuffers::Offset CreateBuffer(flatbuffers::FlatBufferBuilder &_fbb, - const BufferT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateBuffer(flatbuffers::FlatBufferBuilder &_fbb, const BufferT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const BufferT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const BufferT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; _fbb.ForceVectorAlignment(_o->data.size(), sizeof(uint8_t), 16); auto _data = _o->data.size() ? _fbb.CreateVector(_o->data) : 0; - return circle::CreateBuffer(_fbb, _data); + auto _offset = _o->offset; + auto _size = _o->size; + return circle::CreateBuffer( + _fbb, + _data, + _offset, + _size); } -inline MetadataT *Metadata::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline MetadataT *Metadata::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new MetadataT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Metadata::UnPackTo(MetadataT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void Metadata::UnPackTo(MetadataT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = name(); - if (_e) - _o->name = _e->str(); - } - { - auto _e = buffer(); - _o->buffer = _e; - } + { auto _e = name(); if (_e) _o->name = _e->str(); } + { auto _e = buffer(); _o->buffer = _e; } } -inline flatbuffers::Offset -Metadata::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MetadataT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset Metadata::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MetadataT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateMetadata(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateMetadata(flatbuffers::FlatBufferBuilder &_fbb, const MetadataT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateMetadata(flatbuffers::FlatBufferBuilder &_fbb, const MetadataT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const MetadataT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const MetadataT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); auto _buffer = _o->buffer; - return circle::CreateMetadata(_fbb, _name, _buffer); + return circle::CreateMetadata( + _fbb, + _name, + _buffer); } -inline TensorMapT *TensorMap::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline TensorMapT *TensorMap::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new TensorMapT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void TensorMap::UnPackTo(TensorMapT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void TensorMap::UnPackTo(TensorMapT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = name(); - if (_e) - _o->name = _e->str(); - } - { - auto _e = tensor_index(); - _o->tensor_index = _e; - } + { auto _e = name(); if (_e) _o->name = _e->str(); } + { auto _e = tensor_index(); _o->tensor_index = _e; } } -inline flatbuffers::Offset -TensorMap::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorMapT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset TensorMap::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorMapT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateTensorMap(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateTensorMap(flatbuffers::FlatBufferBuilder &_fbb, const TensorMapT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateTensorMap(flatbuffers::FlatBufferBuilder &_fbb, const TensorMapT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const TensorMapT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TensorMapT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); auto _tensor_index = _o->tensor_index; - return circle::CreateTensorMap(_fbb, _name, _tensor_index); + return circle::CreateTensorMap( + _fbb, + _name, + _tensor_index); } -inline SignatureDefT *SignatureDef::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline SignatureDefT *SignatureDef::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new SignatureDefT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void SignatureDef::UnPackTo(SignatureDefT *_o, - const flatbuffers::resolver_function_t *_resolver) const -{ +inline void SignatureDef::UnPackTo(SignatureDefT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = inputs(); - if (_e) - { - _o->inputs.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } - { - auto _e = outputs(); - if (_e) - { - _o->outputs.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->outputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } - { - auto _e = signature_key(); - if (_e) - _o->signature_key = _e->str(); - } - { - auto _e = subgraph_index(); - _o->subgraph_index = _e; - } -} - -inline flatbuffers::Offset -SignatureDef::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SignatureDefT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ + { auto _e = inputs(); if (_e) { _o->inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + { auto _e = outputs(); if (_e) { _o->outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + { auto _e = signature_key(); if (_e) _o->signature_key = _e->str(); } + { auto _e = subgraph_index(); _o->subgraph_index = _e; } +} + +inline flatbuffers::Offset SignatureDef::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SignatureDefT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSignatureDef(_fbb, _o, _rehasher); } -inline flatbuffers::Offset -CreateSignatureDef(flatbuffers::FlatBufferBuilder &_fbb, const SignatureDefT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateSignatureDef(flatbuffers::FlatBufferBuilder &_fbb, const SignatureDefT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const SignatureDefT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; - auto _inputs = - _o->inputs.size() - ? _fbb.CreateVector>( - _o->inputs.size(), - [](size_t i, _VectorArgs *__va) { - return CreateTensorMap(*__va->__fbb, __va->__o->inputs[i].get(), __va->__rehasher); - }, - &_va) - : 0; - auto _outputs = - _o->outputs.size() - ? _fbb.CreateVector>( - _o->outputs.size(), - [](size_t i, _VectorArgs *__va) { - return CreateTensorMap(*__va->__fbb, __va->__o->outputs[i].get(), __va->__rehasher); - }, - &_va) - : 0; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SignatureDefT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _inputs = _o->inputs.size() ? _fbb.CreateVector> (_o->inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateTensorMap(*__va->__fbb, __va->__o->inputs[i].get(), __va->__rehasher); }, &_va ) : 0; + auto _outputs = _o->outputs.size() ? _fbb.CreateVector> (_o->outputs.size(), [](size_t i, _VectorArgs *__va) { return CreateTensorMap(*__va->__fbb, __va->__o->outputs[i].get(), __va->__rehasher); }, &_va ) : 0; auto _signature_key = _o->signature_key.empty() ? 0 : _fbb.CreateString(_o->signature_key); auto _subgraph_index = _o->subgraph_index; - return circle::CreateSignatureDef(_fbb, _inputs, _outputs, _signature_key, _subgraph_index); + return circle::CreateSignatureDef( + _fbb, + _inputs, + _outputs, + _signature_key, + _subgraph_index); } -inline ModelT *Model::UnPack(const flatbuffers::resolver_function_t *_resolver) const -{ +inline ModelT *Model::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = std::unique_ptr(new ModelT()); UnPackTo(_o.get(), _resolver); return _o.release(); } -inline void Model::UnPackTo(ModelT *_o, const flatbuffers::resolver_function_t *_resolver) const -{ +inline void Model::UnPackTo(ModelT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; - { - auto _e = version(); - _o->version = _e; - } - { - auto _e = operator_codes(); - if (_e) - { - _o->operator_codes.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->operator_codes[_i] = - std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } - { - auto _e = subgraphs(); - if (_e) - { - _o->subgraphs.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->subgraphs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } - { - auto _e = description(); - if (_e) - _o->description = _e->str(); - } - { - auto _e = buffers(); - if (_e) - { - _o->buffers.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->buffers[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } - { - auto _e = metadata_buffer(); - if (_e) - { - _o->metadata_buffer.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->metadata_buffer[_i] = _e->Get(_i); - } - } - } - { - auto _e = metadata(); - if (_e) - { - _o->metadata.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->metadata[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } - { - auto _e = signature_defs(); - if (_e) - { - _o->signature_defs.resize(_e->size()); - for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) - { - _o->signature_defs[_i] = - std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); - } - } - } -} - -inline flatbuffers::Offset Model::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const ModelT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ + { auto _e = version(); _o->version = _e; } + { auto _e = operator_codes(); if (_e) { _o->operator_codes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->operator_codes[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + { auto _e = subgraphs(); if (_e) { _o->subgraphs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->subgraphs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + { auto _e = description(); if (_e) _o->description = _e->str(); } + { auto _e = buffers(); if (_e) { _o->buffers.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->buffers[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + { auto _e = metadata_buffer(); if (_e) { _o->metadata_buffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->metadata_buffer[_i] = _e->Get(_i); } } } + { auto _e = metadata(); if (_e) { _o->metadata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->metadata[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + { auto _e = signature_defs(); if (_e) { _o->signature_defs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->signature_defs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } +} + +inline flatbuffers::Offset Model::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ModelT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateModel(_fbb, _o, _rehasher); } -inline flatbuffers::Offset CreateModel(flatbuffers::FlatBufferBuilder &_fbb, - const ModelT *_o, - const flatbuffers::rehasher_function_t *_rehasher) -{ +inline flatbuffers::Offset CreateModel(flatbuffers::FlatBufferBuilder &_fbb, const ModelT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; - struct _VectorArgs - { - flatbuffers::FlatBufferBuilder *__fbb; - const ModelT *__o; - const flatbuffers::rehasher_function_t *__rehasher; - } _va = {&_fbb, _o, _rehasher}; - (void)_va; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ModelT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _version = _o->version; - auto _operator_codes = - _o->operator_codes.size() - ? _fbb.CreateVector>( - _o->operator_codes.size(), - [](size_t i, _VectorArgs *__va) { - return CreateOperatorCode(*__va->__fbb, __va->__o->operator_codes[i].get(), - __va->__rehasher); - }, - &_va) - : 0; - auto _subgraphs = - _o->subgraphs.size() - ? _fbb.CreateVector>( - _o->subgraphs.size(), - [](size_t i, _VectorArgs *__va) { - return CreateSubGraph(*__va->__fbb, __va->__o->subgraphs[i].get(), __va->__rehasher); - }, - &_va) - : 0; + auto _operator_codes = _o->operator_codes.size() ? _fbb.CreateVector> (_o->operator_codes.size(), [](size_t i, _VectorArgs *__va) { return CreateOperatorCode(*__va->__fbb, __va->__o->operator_codes[i].get(), __va->__rehasher); }, &_va ) : 0; + auto _subgraphs = _o->subgraphs.size() ? _fbb.CreateVector> (_o->subgraphs.size(), [](size_t i, _VectorArgs *__va) { return CreateSubGraph(*__va->__fbb, __va->__o->subgraphs[i].get(), __va->__rehasher); }, &_va ) : 0; auto _description = _o->description.empty() ? 0 : _fbb.CreateString(_o->description); - auto _buffers = - _o->buffers.size() - ? _fbb.CreateVector>( - _o->buffers.size(), - [](size_t i, _VectorArgs *__va) { - return CreateBuffer(*__va->__fbb, __va->__o->buffers[i].get(), __va->__rehasher); - }, - &_va) - : 0; + auto _buffers = _o->buffers.size() ? _fbb.CreateVector> (_o->buffers.size(), [](size_t i, _VectorArgs *__va) { return CreateBuffer(*__va->__fbb, __va->__o->buffers[i].get(), __va->__rehasher); }, &_va ) : 0; auto _metadata_buffer = _o->metadata_buffer.size() ? _fbb.CreateVector(_o->metadata_buffer) : 0; - auto _metadata = - _o->metadata.size() - ? _fbb.CreateVector>( - _o->metadata.size(), - [](size_t i, _VectorArgs *__va) { - return CreateMetadata(*__va->__fbb, __va->__o->metadata[i].get(), __va->__rehasher); - }, - &_va) - : 0; - auto _signature_defs = - _o->signature_defs.size() - ? _fbb.CreateVector>( - _o->signature_defs.size(), - [](size_t i, _VectorArgs *__va) { - return CreateSignatureDef(*__va->__fbb, __va->__o->signature_defs[i].get(), - __va->__rehasher); - }, - &_va) - : 0; - return circle::CreateModel(_fbb, _version, _operator_codes, _subgraphs, _description, _buffers, - _metadata_buffer, _metadata, _signature_defs); -} - -inline bool VerifyQuantizationDetails(flatbuffers::Verifier &verifier, const void *obj, - QuantizationDetails type) -{ - switch (type) - { - case QuantizationDetails_NONE: - { + auto _metadata = _o->metadata.size() ? _fbb.CreateVector> (_o->metadata.size(), [](size_t i, _VectorArgs *__va) { return CreateMetadata(*__va->__fbb, __va->__o->metadata[i].get(), __va->__rehasher); }, &_va ) : 0; + auto _signature_defs = _o->signature_defs.size() ? _fbb.CreateVector> (_o->signature_defs.size(), [](size_t i, _VectorArgs *__va) { return CreateSignatureDef(*__va->__fbb, __va->__o->signature_defs[i].get(), __va->__rehasher); }, &_va ) : 0; + return circle::CreateModel( + _fbb, + _version, + _operator_codes, + _subgraphs, + _description, + _buffers, + _metadata_buffer, + _metadata, + _signature_defs); +} + +inline bool VerifyQuantizationDetails(flatbuffers::Verifier &verifier, const void *obj, QuantizationDetails type) { + switch (type) { + case QuantizationDetails_NONE: { return true; } - case QuantizationDetails_CustomQuantization: - { + case QuantizationDetails_CustomQuantization: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - default: - return true; + default: return true; } } -inline bool -VerifyQuantizationDetailsVector(flatbuffers::Verifier &verifier, - const flatbuffers::Vector> *values, - const flatbuffers::Vector *types) -{ - if (!values || !types) - return !values && !types; - if (values->size() != types->size()) - return false; - for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) - { - if (!VerifyQuantizationDetails(verifier, values->Get(i), - types->GetEnum(i))) - { +inline bool VerifyQuantizationDetailsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { + if (!values || !types) return !values && !types; + if (values->size() != types->size()) return false; + for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { + if (!VerifyQuantizationDetails( + verifier, values->Get(i), types->GetEnum(i))) { return false; } } return true; } -inline void *QuantizationDetailsUnion::UnPack(const void *obj, QuantizationDetails type, - const flatbuffers::resolver_function_t *resolver) -{ - switch (type) - { - case QuantizationDetails_CustomQuantization: - { +inline void *QuantizationDetailsUnion::UnPack(const void *obj, QuantizationDetails type, const flatbuffers::resolver_function_t *resolver) { + switch (type) { + case QuantizationDetails_CustomQuantization: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - default: - return nullptr; + default: return nullptr; } } -inline flatbuffers::Offset -QuantizationDetailsUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const flatbuffers::rehasher_function_t *_rehasher) const -{ - switch (type) - { - case QuantizationDetails_CustomQuantization: - { +inline flatbuffers::Offset QuantizationDetailsUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { + switch (type) { + case QuantizationDetails_CustomQuantization: { auto ptr = reinterpret_cast(value); return CreateCustomQuantization(_fbb, ptr, _rehasher).Union(); } - default: - return 0; + default: return 0; } } -inline QuantizationDetailsUnion::QuantizationDetailsUnion(const QuantizationDetailsUnion &u) - : type(u.type), value(nullptr) -{ - switch (type) - { - case QuantizationDetails_CustomQuantization: - { - value = - new circle::CustomQuantizationT(*reinterpret_cast(u.value)); +inline QuantizationDetailsUnion::QuantizationDetailsUnion(const QuantizationDetailsUnion &u) : type(u.type), value(nullptr) { + switch (type) { + case QuantizationDetails_CustomQuantization: { + value = new circle::CustomQuantizationT(*reinterpret_cast(u.value)); break; } default: @@ -23410,139 +21196,99 @@ inline QuantizationDetailsUnion::QuantizationDetailsUnion(const QuantizationDeta } } -inline void QuantizationDetailsUnion::Reset() -{ - switch (type) - { - case QuantizationDetails_CustomQuantization: - { +inline void QuantizationDetailsUnion::Reset() { + switch (type) { + case QuantizationDetails_CustomQuantization: { auto ptr = reinterpret_cast(value); delete ptr; break; } - default: - break; + default: break; } value = nullptr; type = QuantizationDetails_NONE; } -inline bool VerifySparseIndexVector(flatbuffers::Verifier &verifier, const void *obj, - SparseIndexVector type) -{ - switch (type) - { - case SparseIndexVector_NONE: - { +inline bool VerifySparseIndexVector(flatbuffers::Verifier &verifier, const void *obj, SparseIndexVector type) { + switch (type) { + case SparseIndexVector_NONE: { return true; } - case SparseIndexVector_Int32Vector: - { + case SparseIndexVector_Int32Vector: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case SparseIndexVector_Uint16Vector: - { + case SparseIndexVector_Uint16Vector: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case SparseIndexVector_Uint8Vector: - { + case SparseIndexVector_Uint8Vector: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - default: - return true; + default: return true; } } -inline bool -VerifySparseIndexVectorVector(flatbuffers::Verifier &verifier, - const flatbuffers::Vector> *values, - const flatbuffers::Vector *types) -{ - if (!values || !types) - return !values && !types; - if (values->size() != types->size()) - return false; - for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) - { - if (!VerifySparseIndexVector(verifier, values->Get(i), types->GetEnum(i))) - { +inline bool VerifySparseIndexVectorVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { + if (!values || !types) return !values && !types; + if (values->size() != types->size()) return false; + for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { + if (!VerifySparseIndexVector( + verifier, values->Get(i), types->GetEnum(i))) { return false; } } return true; } -inline void *SparseIndexVectorUnion::UnPack(const void *obj, SparseIndexVector type, - const flatbuffers::resolver_function_t *resolver) -{ - switch (type) - { - case SparseIndexVector_Int32Vector: - { +inline void *SparseIndexVectorUnion::UnPack(const void *obj, SparseIndexVector type, const flatbuffers::resolver_function_t *resolver) { + switch (type) { + case SparseIndexVector_Int32Vector: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case SparseIndexVector_Uint16Vector: - { + case SparseIndexVector_Uint16Vector: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case SparseIndexVector_Uint8Vector: - { + case SparseIndexVector_Uint8Vector: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - default: - return nullptr; + default: return nullptr; } } -inline flatbuffers::Offset -SparseIndexVectorUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const flatbuffers::rehasher_function_t *_rehasher) const -{ - switch (type) - { - case SparseIndexVector_Int32Vector: - { +inline flatbuffers::Offset SparseIndexVectorUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { + switch (type) { + case SparseIndexVector_Int32Vector: { auto ptr = reinterpret_cast(value); return CreateInt32Vector(_fbb, ptr, _rehasher).Union(); } - case SparseIndexVector_Uint16Vector: - { + case SparseIndexVector_Uint16Vector: { auto ptr = reinterpret_cast(value); return CreateUint16Vector(_fbb, ptr, _rehasher).Union(); } - case SparseIndexVector_Uint8Vector: - { + case SparseIndexVector_Uint8Vector: { auto ptr = reinterpret_cast(value); return CreateUint8Vector(_fbb, ptr, _rehasher).Union(); } - default: - return 0; + default: return 0; } } -inline SparseIndexVectorUnion::SparseIndexVectorUnion(const SparseIndexVectorUnion &u) - : type(u.type), value(nullptr) -{ - switch (type) - { - case SparseIndexVector_Int32Vector: - { +inline SparseIndexVectorUnion::SparseIndexVectorUnion(const SparseIndexVectorUnion &u) : type(u.type), value(nullptr) { + switch (type) { + case SparseIndexVector_Int32Vector: { value = new circle::Int32VectorT(*reinterpret_cast(u.value)); break; } - case SparseIndexVector_Uint16Vector: - { + case SparseIndexVector_Uint16Vector: { value = new circle::Uint16VectorT(*reinterpret_cast(u.value)); break; } - case SparseIndexVector_Uint8Vector: - { + case SparseIndexVector_Uint8Vector: { value = new circle::Uint8VectorT(*reinterpret_cast(u.value)); break; } @@ -23551,2735 +21297,2142 @@ inline SparseIndexVectorUnion::SparseIndexVectorUnion(const SparseIndexVectorUni } } -inline void SparseIndexVectorUnion::Reset() -{ - switch (type) - { - case SparseIndexVector_Int32Vector: - { +inline void SparseIndexVectorUnion::Reset() { + switch (type) { + case SparseIndexVector_Int32Vector: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case SparseIndexVector_Uint16Vector: - { + case SparseIndexVector_Uint16Vector: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case SparseIndexVector_Uint8Vector: - { + case SparseIndexVector_Uint8Vector: { auto ptr = reinterpret_cast(value); delete ptr; break; } - default: - break; + default: break; } value = nullptr; type = SparseIndexVector_NONE; } -inline bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *obj, - BuiltinOptions type) -{ - switch (type) - { - case BuiltinOptions_NONE: - { +inline bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *obj, BuiltinOptions type) { + switch (type) { + case BuiltinOptions_NONE: { return true; } - case BuiltinOptions_Conv2DOptions: - { + case BuiltinOptions_Conv2DOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_DepthwiseConv2DOptions: - { + case BuiltinOptions_DepthwiseConv2DOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ConcatEmbeddingsOptions: - { + case BuiltinOptions_ConcatEmbeddingsOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LSHProjectionOptions: - { + case BuiltinOptions_LSHProjectionOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_Pool2DOptions: - { + case BuiltinOptions_Pool2DOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SVDFOptions: - { + case BuiltinOptions_SVDFOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_RNNOptions: - { + case BuiltinOptions_RNNOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_FullyConnectedOptions: - { + case BuiltinOptions_FullyConnectedOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SoftmaxOptions: - { + case BuiltinOptions_SoftmaxOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ConcatenationOptions: - { + case BuiltinOptions_ConcatenationOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_AddOptions: - { + case BuiltinOptions_AddOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_L2NormOptions: - { + case BuiltinOptions_L2NormOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LocalResponseNormalizationOptions: - { + case BuiltinOptions_LocalResponseNormalizationOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LSTMOptions: - { + case BuiltinOptions_LSTMOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ResizeBilinearOptions: - { + case BuiltinOptions_ResizeBilinearOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_CallOptions: - { + case BuiltinOptions_CallOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ReshapeOptions: - { + case BuiltinOptions_ReshapeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SkipGramOptions: - { + case BuiltinOptions_SkipGramOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SpaceToDepthOptions: - { + case BuiltinOptions_SpaceToDepthOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_EmbeddingLookupSparseOptions: - { + case BuiltinOptions_EmbeddingLookupSparseOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_MulOptions: - { + case BuiltinOptions_MulOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_PadOptions: - { + case BuiltinOptions_PadOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_GatherOptions: - { + case BuiltinOptions_GatherOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BatchToSpaceNDOptions: - { + case BuiltinOptions_BatchToSpaceNDOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SpaceToBatchNDOptions: - { + case BuiltinOptions_SpaceToBatchNDOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_TransposeOptions: - { + case BuiltinOptions_TransposeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ReducerOptions: - { + case BuiltinOptions_ReducerOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SubOptions: - { + case BuiltinOptions_SubOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_DivOptions: - { + case BuiltinOptions_DivOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SqueezeOptions: - { + case BuiltinOptions_SqueezeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SequenceRNNOptions: - { + case BuiltinOptions_SequenceRNNOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_StridedSliceOptions: - { + case BuiltinOptions_StridedSliceOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ExpOptions: - { + case BuiltinOptions_ExpOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_TopKV2Options: - { + case BuiltinOptions_TopKV2Options: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SplitOptions: - { + case BuiltinOptions_SplitOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LogSoftmaxOptions: - { + case BuiltinOptions_LogSoftmaxOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_CastOptions: - { + case BuiltinOptions_CastOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_DequantizeOptions: - { + case BuiltinOptions_DequantizeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_MaximumMinimumOptions: - { + case BuiltinOptions_MaximumMinimumOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ArgMaxOptions: - { + case BuiltinOptions_ArgMaxOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LessOptions: - { + case BuiltinOptions_LessOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_NegOptions: - { + case BuiltinOptions_NegOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_PadV2Options: - { + case BuiltinOptions_PadV2Options: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_GreaterOptions: - { + case BuiltinOptions_GreaterOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_GreaterEqualOptions: - { + case BuiltinOptions_GreaterEqualOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LessEqualOptions: - { + case BuiltinOptions_LessEqualOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SelectOptions: - { + case BuiltinOptions_SelectOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SliceOptions: - { + case BuiltinOptions_SliceOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_TransposeConvOptions: - { + case BuiltinOptions_TransposeConvOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SparseToDenseOptions: - { + case BuiltinOptions_SparseToDenseOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_TileOptions: - { + case BuiltinOptions_TileOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ExpandDimsOptions: - { + case BuiltinOptions_ExpandDimsOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_EqualOptions: - { + case BuiltinOptions_EqualOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_NotEqualOptions: - { + case BuiltinOptions_NotEqualOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ShapeOptions: - { + case BuiltinOptions_ShapeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_PowOptions: - { + case BuiltinOptions_PowOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ArgMinOptions: - { + case BuiltinOptions_ArgMinOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_FakeQuantOptions: - { + case BuiltinOptions_FakeQuantOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_PackOptions: - { + case BuiltinOptions_PackOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LogicalOrOptions: - { + case BuiltinOptions_LogicalOrOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_OneHotOptions: - { + case BuiltinOptions_OneHotOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LogicalAndOptions: - { + case BuiltinOptions_LogicalAndOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LogicalNotOptions: - { + case BuiltinOptions_LogicalNotOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_UnpackOptions: - { + case BuiltinOptions_UnpackOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_FloorDivOptions: - { + case BuiltinOptions_FloorDivOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SquareOptions: - { + case BuiltinOptions_SquareOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ZerosLikeOptions: - { + case BuiltinOptions_ZerosLikeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_FillOptions: - { + case BuiltinOptions_FillOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BidirectionalSequenceLSTMOptions: - { + case BuiltinOptions_BidirectionalSequenceLSTMOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BidirectionalSequenceRNNOptions: - { + case BuiltinOptions_BidirectionalSequenceRNNOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_UnidirectionalSequenceLSTMOptions: - { + case BuiltinOptions_UnidirectionalSequenceLSTMOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_FloorModOptions: - { + case BuiltinOptions_FloorModOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_RangeOptions: - { + case BuiltinOptions_RangeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ResizeNearestNeighborOptions: - { + case BuiltinOptions_ResizeNearestNeighborOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_LeakyReluOptions: - { + case BuiltinOptions_LeakyReluOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SquaredDifferenceOptions: - { + case BuiltinOptions_SquaredDifferenceOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_MirrorPadOptions: - { + case BuiltinOptions_MirrorPadOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_AbsOptions: - { + case BuiltinOptions_AbsOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SplitVOptions: - { + case BuiltinOptions_SplitVOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_UniqueOptions: - { + case BuiltinOptions_UniqueOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ReverseV2Options: - { + case BuiltinOptions_ReverseV2Options: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_AddNOptions: - { + case BuiltinOptions_AddNOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_GatherNdOptions: - { + case BuiltinOptions_GatherNdOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_CosOptions: - { + case BuiltinOptions_CosOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_WhereOptions: - { + case BuiltinOptions_WhereOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_RankOptions: - { + case BuiltinOptions_RankOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ReverseSequenceOptions: - { + case BuiltinOptions_ReverseSequenceOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_MatrixDiagOptions: - { + case BuiltinOptions_MatrixDiagOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_QuantizeOptions: - { + case BuiltinOptions_QuantizeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_MatrixSetDiagOptions: - { + case BuiltinOptions_MatrixSetDiagOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_HardSwishOptions: - { + case BuiltinOptions_HardSwishOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_IfOptions: - { + case BuiltinOptions_IfOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_WhileOptions: - { + case BuiltinOptions_WhileOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_DepthToSpaceOptions: - { + case BuiltinOptions_DepthToSpaceOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_NonMaxSuppressionV4Options: - { + case BuiltinOptions_NonMaxSuppressionV4Options: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_NonMaxSuppressionV5Options: - { + case BuiltinOptions_NonMaxSuppressionV5Options: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ScatterNdOptions: - { + case BuiltinOptions_ScatterNdOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SelectV2Options: - { + case BuiltinOptions_SelectV2Options: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_DensifyOptions: - { + case BuiltinOptions_DensifyOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SegmentSumOptions: - { + case BuiltinOptions_SegmentSumOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BatchMatMulOptions: - { + case BuiltinOptions_BatchMatMulOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_CumsumOptions: - { + case BuiltinOptions_CumsumOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_CallOnceOptions: - { + case BuiltinOptions_CallOnceOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BroadcastToOptions: - { + case BuiltinOptions_BroadcastToOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_Rfft2dOptions: - { + case BuiltinOptions_Rfft2dOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_Conv3DOptions: - { + case BuiltinOptions_Conv3DOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_HashtableOptions: - { + case BuiltinOptions_HashtableOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_HashtableFindOptions: - { + case BuiltinOptions_HashtableFindOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_HashtableImportOptions: - { + case BuiltinOptions_HashtableImportOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_HashtableSizeOptions: - { + case BuiltinOptions_HashtableSizeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_VarHandleOptions: - { + case BuiltinOptions_VarHandleOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ReadVariableOptions: - { + case BuiltinOptions_ReadVariableOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_AssignVariableOptions: - { + case BuiltinOptions_AssignVariableOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_RandomOptions: - { + case BuiltinOptions_RandomOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BucketizeOptions: - { + case BuiltinOptions_BucketizeOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_GeluOptions: - { + case BuiltinOptions_GeluOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_DynamicUpdateSliceOptions: - { + case BuiltinOptions_DynamicUpdateSliceOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_UnsortedSegmentProdOptions: - { + case BuiltinOptions_UnsortedSegmentProdOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_UnsortedSegmentMaxOptions: - { + case BuiltinOptions_UnsortedSegmentMaxOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_UnsortedSegmentMinOptions: - { + case BuiltinOptions_UnsortedSegmentMinOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_UnsortedSegmentSumOptions: - { + case BuiltinOptions_UnsortedSegmentSumOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_ATan2Options: - { + case BuiltinOptions_ATan2Options: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_SignOptions: - { + case BuiltinOptions_SignOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BitcastOptions: - { + case BuiltinOptions_BitcastOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BitwiseXorOptions: - { + case BuiltinOptions_BitwiseXorOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_RightShiftOptions: - { + case BuiltinOptions_RightShiftOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BCQGatherOptions: - { + case BuiltinOptions_GRUOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions_BCQGatherOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_BCQFullyConnectedOptions: - { + case BuiltinOptions_BCQFullyConnectedOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case BuiltinOptions_InstanceNormOptions: - { + case BuiltinOptions_InstanceNormOptions: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - default: - return true; + default: return true; } } -inline bool VerifyBuiltinOptionsVector(flatbuffers::Verifier &verifier, - const flatbuffers::Vector> *values, - const flatbuffers::Vector *types) -{ - if (!values || !types) - return !values && !types; - if (values->size() != types->size()) - return false; - for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) - { - if (!VerifyBuiltinOptions(verifier, values->Get(i), types->GetEnum(i))) - { +inline bool VerifyBuiltinOptionsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { + if (!values || !types) return !values && !types; + if (values->size() != types->size()) return false; + for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { + if (!VerifyBuiltinOptions( + verifier, values->Get(i), types->GetEnum(i))) { return false; } } return true; } -inline void *BuiltinOptionsUnion::UnPack(const void *obj, BuiltinOptions type, - const flatbuffers::resolver_function_t *resolver) -{ - switch (type) - { - case BuiltinOptions_Conv2DOptions: - { +inline void *BuiltinOptionsUnion::UnPack(const void *obj, BuiltinOptions type, const flatbuffers::resolver_function_t *resolver) { + switch (type) { + case BuiltinOptions_Conv2DOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_DepthwiseConv2DOptions: - { + case BuiltinOptions_DepthwiseConv2DOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ConcatEmbeddingsOptions: - { + case BuiltinOptions_ConcatEmbeddingsOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LSHProjectionOptions: - { + case BuiltinOptions_LSHProjectionOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_Pool2DOptions: - { + case BuiltinOptions_Pool2DOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SVDFOptions: - { + case BuiltinOptions_SVDFOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_RNNOptions: - { + case BuiltinOptions_RNNOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_FullyConnectedOptions: - { + case BuiltinOptions_FullyConnectedOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SoftmaxOptions: - { + case BuiltinOptions_SoftmaxOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ConcatenationOptions: - { + case BuiltinOptions_ConcatenationOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_AddOptions: - { + case BuiltinOptions_AddOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_L2NormOptions: - { + case BuiltinOptions_L2NormOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LocalResponseNormalizationOptions: - { + case BuiltinOptions_LocalResponseNormalizationOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LSTMOptions: - { + case BuiltinOptions_LSTMOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ResizeBilinearOptions: - { + case BuiltinOptions_ResizeBilinearOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_CallOptions: - { + case BuiltinOptions_CallOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ReshapeOptions: - { + case BuiltinOptions_ReshapeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SkipGramOptions: - { + case BuiltinOptions_SkipGramOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SpaceToDepthOptions: - { + case BuiltinOptions_SpaceToDepthOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_EmbeddingLookupSparseOptions: - { + case BuiltinOptions_EmbeddingLookupSparseOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_MulOptions: - { + case BuiltinOptions_MulOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_PadOptions: - { + case BuiltinOptions_PadOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_GatherOptions: - { + case BuiltinOptions_GatherOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BatchToSpaceNDOptions: - { + case BuiltinOptions_BatchToSpaceNDOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SpaceToBatchNDOptions: - { + case BuiltinOptions_SpaceToBatchNDOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_TransposeOptions: - { + case BuiltinOptions_TransposeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ReducerOptions: - { + case BuiltinOptions_ReducerOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SubOptions: - { + case BuiltinOptions_SubOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_DivOptions: - { + case BuiltinOptions_DivOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SqueezeOptions: - { + case BuiltinOptions_SqueezeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SequenceRNNOptions: - { + case BuiltinOptions_SequenceRNNOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_StridedSliceOptions: - { + case BuiltinOptions_StridedSliceOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ExpOptions: - { + case BuiltinOptions_ExpOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_TopKV2Options: - { + case BuiltinOptions_TopKV2Options: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SplitOptions: - { + case BuiltinOptions_SplitOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LogSoftmaxOptions: - { + case BuiltinOptions_LogSoftmaxOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_CastOptions: - { + case BuiltinOptions_CastOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_DequantizeOptions: - { + case BuiltinOptions_DequantizeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_MaximumMinimumOptions: - { + case BuiltinOptions_MaximumMinimumOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ArgMaxOptions: - { + case BuiltinOptions_ArgMaxOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LessOptions: - { + case BuiltinOptions_LessOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_NegOptions: - { + case BuiltinOptions_NegOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_PadV2Options: - { + case BuiltinOptions_PadV2Options: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_GreaterOptions: - { + case BuiltinOptions_GreaterOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_GreaterEqualOptions: - { + case BuiltinOptions_GreaterEqualOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LessEqualOptions: - { + case BuiltinOptions_LessEqualOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SelectOptions: - { + case BuiltinOptions_SelectOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SliceOptions: - { + case BuiltinOptions_SliceOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_TransposeConvOptions: - { + case BuiltinOptions_TransposeConvOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SparseToDenseOptions: - { + case BuiltinOptions_SparseToDenseOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_TileOptions: - { + case BuiltinOptions_TileOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ExpandDimsOptions: - { + case BuiltinOptions_ExpandDimsOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_EqualOptions: - { + case BuiltinOptions_EqualOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_NotEqualOptions: - { + case BuiltinOptions_NotEqualOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ShapeOptions: - { + case BuiltinOptions_ShapeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_PowOptions: - { + case BuiltinOptions_PowOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ArgMinOptions: - { + case BuiltinOptions_ArgMinOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_FakeQuantOptions: - { + case BuiltinOptions_FakeQuantOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_PackOptions: - { + case BuiltinOptions_PackOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LogicalOrOptions: - { + case BuiltinOptions_LogicalOrOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_OneHotOptions: - { + case BuiltinOptions_OneHotOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LogicalAndOptions: - { + case BuiltinOptions_LogicalAndOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LogicalNotOptions: - { + case BuiltinOptions_LogicalNotOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_UnpackOptions: - { + case BuiltinOptions_UnpackOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_FloorDivOptions: - { + case BuiltinOptions_FloorDivOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SquareOptions: - { + case BuiltinOptions_SquareOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ZerosLikeOptions: - { + case BuiltinOptions_ZerosLikeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_FillOptions: - { + case BuiltinOptions_FillOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BidirectionalSequenceLSTMOptions: - { + case BuiltinOptions_BidirectionalSequenceLSTMOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BidirectionalSequenceRNNOptions: - { + case BuiltinOptions_BidirectionalSequenceRNNOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_UnidirectionalSequenceLSTMOptions: - { + case BuiltinOptions_UnidirectionalSequenceLSTMOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_FloorModOptions: - { + case BuiltinOptions_FloorModOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_RangeOptions: - { + case BuiltinOptions_RangeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ResizeNearestNeighborOptions: - { + case BuiltinOptions_ResizeNearestNeighborOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_LeakyReluOptions: - { + case BuiltinOptions_LeakyReluOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SquaredDifferenceOptions: - { + case BuiltinOptions_SquaredDifferenceOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_MirrorPadOptions: - { + case BuiltinOptions_MirrorPadOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_AbsOptions: - { + case BuiltinOptions_AbsOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SplitVOptions: - { + case BuiltinOptions_SplitVOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_UniqueOptions: - { + case BuiltinOptions_UniqueOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ReverseV2Options: - { + case BuiltinOptions_ReverseV2Options: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_AddNOptions: - { + case BuiltinOptions_AddNOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_GatherNdOptions: - { + case BuiltinOptions_GatherNdOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_CosOptions: - { + case BuiltinOptions_CosOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_WhereOptions: - { + case BuiltinOptions_WhereOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_RankOptions: - { + case BuiltinOptions_RankOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ReverseSequenceOptions: - { + case BuiltinOptions_ReverseSequenceOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_MatrixDiagOptions: - { + case BuiltinOptions_MatrixDiagOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_QuantizeOptions: - { + case BuiltinOptions_QuantizeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_MatrixSetDiagOptions: - { + case BuiltinOptions_MatrixSetDiagOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_HardSwishOptions: - { + case BuiltinOptions_HardSwishOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_IfOptions: - { + case BuiltinOptions_IfOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_WhileOptions: - { + case BuiltinOptions_WhileOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_DepthToSpaceOptions: - { + case BuiltinOptions_DepthToSpaceOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_NonMaxSuppressionV4Options: - { + case BuiltinOptions_NonMaxSuppressionV4Options: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_NonMaxSuppressionV5Options: - { + case BuiltinOptions_NonMaxSuppressionV5Options: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ScatterNdOptions: - { + case BuiltinOptions_ScatterNdOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SelectV2Options: - { + case BuiltinOptions_SelectV2Options: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_DensifyOptions: - { + case BuiltinOptions_DensifyOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SegmentSumOptions: - { + case BuiltinOptions_SegmentSumOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BatchMatMulOptions: - { + case BuiltinOptions_BatchMatMulOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_CumsumOptions: - { + case BuiltinOptions_CumsumOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_CallOnceOptions: - { + case BuiltinOptions_CallOnceOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BroadcastToOptions: - { + case BuiltinOptions_BroadcastToOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_Rfft2dOptions: - { + case BuiltinOptions_Rfft2dOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_Conv3DOptions: - { + case BuiltinOptions_Conv3DOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_HashtableOptions: - { + case BuiltinOptions_HashtableOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_HashtableFindOptions: - { + case BuiltinOptions_HashtableFindOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_HashtableImportOptions: - { + case BuiltinOptions_HashtableImportOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_HashtableSizeOptions: - { + case BuiltinOptions_HashtableSizeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_VarHandleOptions: - { + case BuiltinOptions_VarHandleOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ReadVariableOptions: - { + case BuiltinOptions_ReadVariableOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_AssignVariableOptions: - { + case BuiltinOptions_AssignVariableOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_RandomOptions: - { + case BuiltinOptions_RandomOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BucketizeOptions: - { + case BuiltinOptions_BucketizeOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_GeluOptions: - { + case BuiltinOptions_GeluOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_DynamicUpdateSliceOptions: - { + case BuiltinOptions_DynamicUpdateSliceOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_UnsortedSegmentProdOptions: - { + case BuiltinOptions_UnsortedSegmentProdOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_UnsortedSegmentMaxOptions: - { + case BuiltinOptions_UnsortedSegmentMaxOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_UnsortedSegmentMinOptions: - { + case BuiltinOptions_UnsortedSegmentMinOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_UnsortedSegmentSumOptions: - { + case BuiltinOptions_UnsortedSegmentSumOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_ATan2Options: - { + case BuiltinOptions_ATan2Options: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_SignOptions: - { + case BuiltinOptions_SignOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BitcastOptions: - { + case BuiltinOptions_BitcastOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BitwiseXorOptions: - { + case BuiltinOptions_BitwiseXorOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_RightShiftOptions: - { + case BuiltinOptions_RightShiftOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BCQGatherOptions: - { + case BuiltinOptions_GRUOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions_BCQGatherOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_BCQFullyConnectedOptions: - { + case BuiltinOptions_BCQFullyConnectedOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - case BuiltinOptions_InstanceNormOptions: - { + case BuiltinOptions_InstanceNormOptions: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } - default: - return nullptr; + default: return nullptr; } } -inline flatbuffers::Offset -BuiltinOptionsUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, - const flatbuffers::rehasher_function_t *_rehasher) const -{ - switch (type) - { - case BuiltinOptions_Conv2DOptions: - { +inline flatbuffers::Offset BuiltinOptionsUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { + switch (type) { + case BuiltinOptions_Conv2DOptions: { auto ptr = reinterpret_cast(value); return CreateConv2DOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_DepthwiseConv2DOptions: - { + case BuiltinOptions_DepthwiseConv2DOptions: { auto ptr = reinterpret_cast(value); return CreateDepthwiseConv2DOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ConcatEmbeddingsOptions: - { + case BuiltinOptions_ConcatEmbeddingsOptions: { auto ptr = reinterpret_cast(value); return CreateConcatEmbeddingsOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LSHProjectionOptions: - { + case BuiltinOptions_LSHProjectionOptions: { auto ptr = reinterpret_cast(value); return CreateLSHProjectionOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_Pool2DOptions: - { + case BuiltinOptions_Pool2DOptions: { auto ptr = reinterpret_cast(value); return CreatePool2DOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SVDFOptions: - { + case BuiltinOptions_SVDFOptions: { auto ptr = reinterpret_cast(value); return CreateSVDFOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_RNNOptions: - { + case BuiltinOptions_RNNOptions: { auto ptr = reinterpret_cast(value); return CreateRNNOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_FullyConnectedOptions: - { + case BuiltinOptions_FullyConnectedOptions: { auto ptr = reinterpret_cast(value); return CreateFullyConnectedOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SoftmaxOptions: - { + case BuiltinOptions_SoftmaxOptions: { auto ptr = reinterpret_cast(value); return CreateSoftmaxOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ConcatenationOptions: - { + case BuiltinOptions_ConcatenationOptions: { auto ptr = reinterpret_cast(value); return CreateConcatenationOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_AddOptions: - { + case BuiltinOptions_AddOptions: { auto ptr = reinterpret_cast(value); return CreateAddOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_L2NormOptions: - { + case BuiltinOptions_L2NormOptions: { auto ptr = reinterpret_cast(value); return CreateL2NormOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LocalResponseNormalizationOptions: - { + case BuiltinOptions_LocalResponseNormalizationOptions: { auto ptr = reinterpret_cast(value); return CreateLocalResponseNormalizationOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LSTMOptions: - { + case BuiltinOptions_LSTMOptions: { auto ptr = reinterpret_cast(value); return CreateLSTMOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ResizeBilinearOptions: - { + case BuiltinOptions_ResizeBilinearOptions: { auto ptr = reinterpret_cast(value); return CreateResizeBilinearOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_CallOptions: - { + case BuiltinOptions_CallOptions: { auto ptr = reinterpret_cast(value); return CreateCallOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ReshapeOptions: - { + case BuiltinOptions_ReshapeOptions: { auto ptr = reinterpret_cast(value); return CreateReshapeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SkipGramOptions: - { + case BuiltinOptions_SkipGramOptions: { auto ptr = reinterpret_cast(value); return CreateSkipGramOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SpaceToDepthOptions: - { + case BuiltinOptions_SpaceToDepthOptions: { auto ptr = reinterpret_cast(value); return CreateSpaceToDepthOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_EmbeddingLookupSparseOptions: - { + case BuiltinOptions_EmbeddingLookupSparseOptions: { auto ptr = reinterpret_cast(value); return CreateEmbeddingLookupSparseOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_MulOptions: - { + case BuiltinOptions_MulOptions: { auto ptr = reinterpret_cast(value); return CreateMulOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_PadOptions: - { + case BuiltinOptions_PadOptions: { auto ptr = reinterpret_cast(value); return CreatePadOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_GatherOptions: - { + case BuiltinOptions_GatherOptions: { auto ptr = reinterpret_cast(value); return CreateGatherOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BatchToSpaceNDOptions: - { + case BuiltinOptions_BatchToSpaceNDOptions: { auto ptr = reinterpret_cast(value); return CreateBatchToSpaceNDOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SpaceToBatchNDOptions: - { + case BuiltinOptions_SpaceToBatchNDOptions: { auto ptr = reinterpret_cast(value); return CreateSpaceToBatchNDOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_TransposeOptions: - { + case BuiltinOptions_TransposeOptions: { auto ptr = reinterpret_cast(value); return CreateTransposeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ReducerOptions: - { + case BuiltinOptions_ReducerOptions: { auto ptr = reinterpret_cast(value); return CreateReducerOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SubOptions: - { + case BuiltinOptions_SubOptions: { auto ptr = reinterpret_cast(value); return CreateSubOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_DivOptions: - { + case BuiltinOptions_DivOptions: { auto ptr = reinterpret_cast(value); return CreateDivOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SqueezeOptions: - { + case BuiltinOptions_SqueezeOptions: { auto ptr = reinterpret_cast(value); return CreateSqueezeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SequenceRNNOptions: - { + case BuiltinOptions_SequenceRNNOptions: { auto ptr = reinterpret_cast(value); return CreateSequenceRNNOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_StridedSliceOptions: - { + case BuiltinOptions_StridedSliceOptions: { auto ptr = reinterpret_cast(value); return CreateStridedSliceOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ExpOptions: - { + case BuiltinOptions_ExpOptions: { auto ptr = reinterpret_cast(value); return CreateExpOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_TopKV2Options: - { + case BuiltinOptions_TopKV2Options: { auto ptr = reinterpret_cast(value); return CreateTopKV2Options(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SplitOptions: - { + case BuiltinOptions_SplitOptions: { auto ptr = reinterpret_cast(value); return CreateSplitOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LogSoftmaxOptions: - { + case BuiltinOptions_LogSoftmaxOptions: { auto ptr = reinterpret_cast(value); return CreateLogSoftmaxOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_CastOptions: - { + case BuiltinOptions_CastOptions: { auto ptr = reinterpret_cast(value); return CreateCastOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_DequantizeOptions: - { + case BuiltinOptions_DequantizeOptions: { auto ptr = reinterpret_cast(value); return CreateDequantizeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_MaximumMinimumOptions: - { + case BuiltinOptions_MaximumMinimumOptions: { auto ptr = reinterpret_cast(value); return CreateMaximumMinimumOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ArgMaxOptions: - { + case BuiltinOptions_ArgMaxOptions: { auto ptr = reinterpret_cast(value); return CreateArgMaxOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LessOptions: - { + case BuiltinOptions_LessOptions: { auto ptr = reinterpret_cast(value); return CreateLessOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_NegOptions: - { + case BuiltinOptions_NegOptions: { auto ptr = reinterpret_cast(value); return CreateNegOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_PadV2Options: - { + case BuiltinOptions_PadV2Options: { auto ptr = reinterpret_cast(value); return CreatePadV2Options(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_GreaterOptions: - { + case BuiltinOptions_GreaterOptions: { auto ptr = reinterpret_cast(value); return CreateGreaterOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_GreaterEqualOptions: - { + case BuiltinOptions_GreaterEqualOptions: { auto ptr = reinterpret_cast(value); return CreateGreaterEqualOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LessEqualOptions: - { + case BuiltinOptions_LessEqualOptions: { auto ptr = reinterpret_cast(value); return CreateLessEqualOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SelectOptions: - { + case BuiltinOptions_SelectOptions: { auto ptr = reinterpret_cast(value); return CreateSelectOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SliceOptions: - { + case BuiltinOptions_SliceOptions: { auto ptr = reinterpret_cast(value); return CreateSliceOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_TransposeConvOptions: - { + case BuiltinOptions_TransposeConvOptions: { auto ptr = reinterpret_cast(value); return CreateTransposeConvOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SparseToDenseOptions: - { + case BuiltinOptions_SparseToDenseOptions: { auto ptr = reinterpret_cast(value); return CreateSparseToDenseOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_TileOptions: - { + case BuiltinOptions_TileOptions: { auto ptr = reinterpret_cast(value); return CreateTileOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ExpandDimsOptions: - { + case BuiltinOptions_ExpandDimsOptions: { auto ptr = reinterpret_cast(value); return CreateExpandDimsOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_EqualOptions: - { + case BuiltinOptions_EqualOptions: { auto ptr = reinterpret_cast(value); return CreateEqualOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_NotEqualOptions: - { + case BuiltinOptions_NotEqualOptions: { auto ptr = reinterpret_cast(value); return CreateNotEqualOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ShapeOptions: - { + case BuiltinOptions_ShapeOptions: { auto ptr = reinterpret_cast(value); return CreateShapeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_PowOptions: - { + case BuiltinOptions_PowOptions: { auto ptr = reinterpret_cast(value); return CreatePowOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ArgMinOptions: - { + case BuiltinOptions_ArgMinOptions: { auto ptr = reinterpret_cast(value); return CreateArgMinOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_FakeQuantOptions: - { + case BuiltinOptions_FakeQuantOptions: { auto ptr = reinterpret_cast(value); return CreateFakeQuantOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_PackOptions: - { + case BuiltinOptions_PackOptions: { auto ptr = reinterpret_cast(value); return CreatePackOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LogicalOrOptions: - { + case BuiltinOptions_LogicalOrOptions: { auto ptr = reinterpret_cast(value); return CreateLogicalOrOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_OneHotOptions: - { + case BuiltinOptions_OneHotOptions: { auto ptr = reinterpret_cast(value); return CreateOneHotOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LogicalAndOptions: - { + case BuiltinOptions_LogicalAndOptions: { auto ptr = reinterpret_cast(value); return CreateLogicalAndOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LogicalNotOptions: - { + case BuiltinOptions_LogicalNotOptions: { auto ptr = reinterpret_cast(value); return CreateLogicalNotOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_UnpackOptions: - { + case BuiltinOptions_UnpackOptions: { auto ptr = reinterpret_cast(value); return CreateUnpackOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_FloorDivOptions: - { + case BuiltinOptions_FloorDivOptions: { auto ptr = reinterpret_cast(value); return CreateFloorDivOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SquareOptions: - { + case BuiltinOptions_SquareOptions: { auto ptr = reinterpret_cast(value); return CreateSquareOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ZerosLikeOptions: - { + case BuiltinOptions_ZerosLikeOptions: { auto ptr = reinterpret_cast(value); return CreateZerosLikeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_FillOptions: - { + case BuiltinOptions_FillOptions: { auto ptr = reinterpret_cast(value); return CreateFillOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BidirectionalSequenceLSTMOptions: - { + case BuiltinOptions_BidirectionalSequenceLSTMOptions: { auto ptr = reinterpret_cast(value); return CreateBidirectionalSequenceLSTMOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BidirectionalSequenceRNNOptions: - { + case BuiltinOptions_BidirectionalSequenceRNNOptions: { auto ptr = reinterpret_cast(value); return CreateBidirectionalSequenceRNNOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_UnidirectionalSequenceLSTMOptions: - { + case BuiltinOptions_UnidirectionalSequenceLSTMOptions: { auto ptr = reinterpret_cast(value); return CreateUnidirectionalSequenceLSTMOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_FloorModOptions: - { + case BuiltinOptions_FloorModOptions: { auto ptr = reinterpret_cast(value); return CreateFloorModOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_RangeOptions: - { + case BuiltinOptions_RangeOptions: { auto ptr = reinterpret_cast(value); return CreateRangeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ResizeNearestNeighborOptions: - { + case BuiltinOptions_ResizeNearestNeighborOptions: { auto ptr = reinterpret_cast(value); return CreateResizeNearestNeighborOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_LeakyReluOptions: - { + case BuiltinOptions_LeakyReluOptions: { auto ptr = reinterpret_cast(value); return CreateLeakyReluOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SquaredDifferenceOptions: - { + case BuiltinOptions_SquaredDifferenceOptions: { auto ptr = reinterpret_cast(value); return CreateSquaredDifferenceOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_MirrorPadOptions: - { + case BuiltinOptions_MirrorPadOptions: { auto ptr = reinterpret_cast(value); return CreateMirrorPadOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_AbsOptions: - { + case BuiltinOptions_AbsOptions: { auto ptr = reinterpret_cast(value); return CreateAbsOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SplitVOptions: - { + case BuiltinOptions_SplitVOptions: { auto ptr = reinterpret_cast(value); return CreateSplitVOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_UniqueOptions: - { + case BuiltinOptions_UniqueOptions: { auto ptr = reinterpret_cast(value); return CreateUniqueOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ReverseV2Options: - { + case BuiltinOptions_ReverseV2Options: { auto ptr = reinterpret_cast(value); return CreateReverseV2Options(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_AddNOptions: - { + case BuiltinOptions_AddNOptions: { auto ptr = reinterpret_cast(value); return CreateAddNOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_GatherNdOptions: - { + case BuiltinOptions_GatherNdOptions: { auto ptr = reinterpret_cast(value); return CreateGatherNdOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_CosOptions: - { + case BuiltinOptions_CosOptions: { auto ptr = reinterpret_cast(value); return CreateCosOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_WhereOptions: - { + case BuiltinOptions_WhereOptions: { auto ptr = reinterpret_cast(value); return CreateWhereOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_RankOptions: - { + case BuiltinOptions_RankOptions: { auto ptr = reinterpret_cast(value); return CreateRankOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ReverseSequenceOptions: - { + case BuiltinOptions_ReverseSequenceOptions: { auto ptr = reinterpret_cast(value); return CreateReverseSequenceOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_MatrixDiagOptions: - { + case BuiltinOptions_MatrixDiagOptions: { auto ptr = reinterpret_cast(value); return CreateMatrixDiagOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_QuantizeOptions: - { + case BuiltinOptions_QuantizeOptions: { auto ptr = reinterpret_cast(value); return CreateQuantizeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_MatrixSetDiagOptions: - { + case BuiltinOptions_MatrixSetDiagOptions: { auto ptr = reinterpret_cast(value); return CreateMatrixSetDiagOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_HardSwishOptions: - { + case BuiltinOptions_HardSwishOptions: { auto ptr = reinterpret_cast(value); return CreateHardSwishOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_IfOptions: - { + case BuiltinOptions_IfOptions: { auto ptr = reinterpret_cast(value); return CreateIfOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_WhileOptions: - { + case BuiltinOptions_WhileOptions: { auto ptr = reinterpret_cast(value); return CreateWhileOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_DepthToSpaceOptions: - { + case BuiltinOptions_DepthToSpaceOptions: { auto ptr = reinterpret_cast(value); return CreateDepthToSpaceOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_NonMaxSuppressionV4Options: - { + case BuiltinOptions_NonMaxSuppressionV4Options: { auto ptr = reinterpret_cast(value); return CreateNonMaxSuppressionV4Options(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_NonMaxSuppressionV5Options: - { + case BuiltinOptions_NonMaxSuppressionV5Options: { auto ptr = reinterpret_cast(value); return CreateNonMaxSuppressionV5Options(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ScatterNdOptions: - { + case BuiltinOptions_ScatterNdOptions: { auto ptr = reinterpret_cast(value); return CreateScatterNdOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SelectV2Options: - { + case BuiltinOptions_SelectV2Options: { auto ptr = reinterpret_cast(value); return CreateSelectV2Options(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_DensifyOptions: - { + case BuiltinOptions_DensifyOptions: { auto ptr = reinterpret_cast(value); return CreateDensifyOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SegmentSumOptions: - { + case BuiltinOptions_SegmentSumOptions: { auto ptr = reinterpret_cast(value); return CreateSegmentSumOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BatchMatMulOptions: - { + case BuiltinOptions_BatchMatMulOptions: { auto ptr = reinterpret_cast(value); return CreateBatchMatMulOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_CumsumOptions: - { + case BuiltinOptions_CumsumOptions: { auto ptr = reinterpret_cast(value); return CreateCumsumOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_CallOnceOptions: - { + case BuiltinOptions_CallOnceOptions: { auto ptr = reinterpret_cast(value); return CreateCallOnceOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BroadcastToOptions: - { + case BuiltinOptions_BroadcastToOptions: { auto ptr = reinterpret_cast(value); return CreateBroadcastToOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_Rfft2dOptions: - { + case BuiltinOptions_Rfft2dOptions: { auto ptr = reinterpret_cast(value); return CreateRfft2dOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_Conv3DOptions: - { + case BuiltinOptions_Conv3DOptions: { auto ptr = reinterpret_cast(value); return CreateConv3DOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_HashtableOptions: - { + case BuiltinOptions_HashtableOptions: { auto ptr = reinterpret_cast(value); return CreateHashtableOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_HashtableFindOptions: - { + case BuiltinOptions_HashtableFindOptions: { auto ptr = reinterpret_cast(value); return CreateHashtableFindOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_HashtableImportOptions: - { + case BuiltinOptions_HashtableImportOptions: { auto ptr = reinterpret_cast(value); return CreateHashtableImportOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_HashtableSizeOptions: - { + case BuiltinOptions_HashtableSizeOptions: { auto ptr = reinterpret_cast(value); return CreateHashtableSizeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_VarHandleOptions: - { + case BuiltinOptions_VarHandleOptions: { auto ptr = reinterpret_cast(value); return CreateVarHandleOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ReadVariableOptions: - { + case BuiltinOptions_ReadVariableOptions: { auto ptr = reinterpret_cast(value); return CreateReadVariableOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_AssignVariableOptions: - { + case BuiltinOptions_AssignVariableOptions: { auto ptr = reinterpret_cast(value); return CreateAssignVariableOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_RandomOptions: - { + case BuiltinOptions_RandomOptions: { auto ptr = reinterpret_cast(value); return CreateRandomOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BucketizeOptions: - { + case BuiltinOptions_BucketizeOptions: { auto ptr = reinterpret_cast(value); return CreateBucketizeOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_GeluOptions: - { + case BuiltinOptions_GeluOptions: { auto ptr = reinterpret_cast(value); return CreateGeluOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_DynamicUpdateSliceOptions: - { + case BuiltinOptions_DynamicUpdateSliceOptions: { auto ptr = reinterpret_cast(value); return CreateDynamicUpdateSliceOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_UnsortedSegmentProdOptions: - { + case BuiltinOptions_UnsortedSegmentProdOptions: { auto ptr = reinterpret_cast(value); return CreateUnsortedSegmentProdOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_UnsortedSegmentMaxOptions: - { + case BuiltinOptions_UnsortedSegmentMaxOptions: { auto ptr = reinterpret_cast(value); return CreateUnsortedSegmentMaxOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_UnsortedSegmentMinOptions: - { + case BuiltinOptions_UnsortedSegmentMinOptions: { auto ptr = reinterpret_cast(value); return CreateUnsortedSegmentMinOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_UnsortedSegmentSumOptions: - { + case BuiltinOptions_UnsortedSegmentSumOptions: { auto ptr = reinterpret_cast(value); return CreateUnsortedSegmentSumOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_ATan2Options: - { + case BuiltinOptions_ATan2Options: { auto ptr = reinterpret_cast(value); return CreateATan2Options(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_SignOptions: - { + case BuiltinOptions_SignOptions: { auto ptr = reinterpret_cast(value); return CreateSignOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BitcastOptions: - { + case BuiltinOptions_BitcastOptions: { auto ptr = reinterpret_cast(value); return CreateBitcastOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BitwiseXorOptions: - { + case BuiltinOptions_BitwiseXorOptions: { auto ptr = reinterpret_cast(value); return CreateBitwiseXorOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_RightShiftOptions: - { + case BuiltinOptions_RightShiftOptions: { auto ptr = reinterpret_cast(value); return CreateRightShiftOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BCQGatherOptions: - { + case BuiltinOptions_GRUOptions: { + auto ptr = reinterpret_cast(value); + return CreateGRUOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions_BCQGatherOptions: { auto ptr = reinterpret_cast(value); return CreateBCQGatherOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_BCQFullyConnectedOptions: - { + case BuiltinOptions_BCQFullyConnectedOptions: { auto ptr = reinterpret_cast(value); return CreateBCQFullyConnectedOptions(_fbb, ptr, _rehasher).Union(); } - case BuiltinOptions_InstanceNormOptions: - { + case BuiltinOptions_InstanceNormOptions: { auto ptr = reinterpret_cast(value); return CreateInstanceNormOptions(_fbb, ptr, _rehasher).Union(); } - default: - return 0; + default: return 0; } } -inline BuiltinOptionsUnion::BuiltinOptionsUnion(const BuiltinOptionsUnion &u) - : type(u.type), value(nullptr) -{ - switch (type) - { - case BuiltinOptions_Conv2DOptions: - { +inline BuiltinOptionsUnion::BuiltinOptionsUnion(const BuiltinOptionsUnion &u) : type(u.type), value(nullptr) { + switch (type) { + case BuiltinOptions_Conv2DOptions: { value = new circle::Conv2DOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_DepthwiseConv2DOptions: - { - value = new circle::DepthwiseConv2DOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_DepthwiseConv2DOptions: { + value = new circle::DepthwiseConv2DOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ConcatEmbeddingsOptions: - { - value = new circle::ConcatEmbeddingsOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_ConcatEmbeddingsOptions: { + value = new circle::ConcatEmbeddingsOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LSHProjectionOptions: - { - value = new circle::LSHProjectionOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_LSHProjectionOptions: { + value = new circle::LSHProjectionOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_Pool2DOptions: - { + case BuiltinOptions_Pool2DOptions: { value = new circle::Pool2DOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SVDFOptions: - { + case BuiltinOptions_SVDFOptions: { value = new circle::SVDFOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_RNNOptions: - { + case BuiltinOptions_RNNOptions: { value = new circle::RNNOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_FullyConnectedOptions: - { - value = new circle::FullyConnectedOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_FullyConnectedOptions: { + value = new circle::FullyConnectedOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SoftmaxOptions: - { + case BuiltinOptions_SoftmaxOptions: { value = new circle::SoftmaxOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ConcatenationOptions: - { - value = new circle::ConcatenationOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_ConcatenationOptions: { + value = new circle::ConcatenationOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_AddOptions: - { + case BuiltinOptions_AddOptions: { value = new circle::AddOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_L2NormOptions: - { + case BuiltinOptions_L2NormOptions: { value = new circle::L2NormOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LocalResponseNormalizationOptions: - { - value = new circle::LocalResponseNormalizationOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_LocalResponseNormalizationOptions: { + value = new circle::LocalResponseNormalizationOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LSTMOptions: - { + case BuiltinOptions_LSTMOptions: { value = new circle::LSTMOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ResizeBilinearOptions: - { - value = new circle::ResizeBilinearOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_ResizeBilinearOptions: { + value = new circle::ResizeBilinearOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_CallOptions: - { + case BuiltinOptions_CallOptions: { value = new circle::CallOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ReshapeOptions: - { + case BuiltinOptions_ReshapeOptions: { value = new circle::ReshapeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SkipGramOptions: - { + case BuiltinOptions_SkipGramOptions: { value = new circle::SkipGramOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SpaceToDepthOptions: - { - value = new circle::SpaceToDepthOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_SpaceToDepthOptions: { + value = new circle::SpaceToDepthOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_EmbeddingLookupSparseOptions: - { - value = new circle::EmbeddingLookupSparseOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_EmbeddingLookupSparseOptions: { + value = new circle::EmbeddingLookupSparseOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_MulOptions: - { + case BuiltinOptions_MulOptions: { value = new circle::MulOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_PadOptions: - { + case BuiltinOptions_PadOptions: { value = new circle::PadOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_GatherOptions: - { + case BuiltinOptions_GatherOptions: { value = new circle::GatherOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BatchToSpaceNDOptions: - { - value = new circle::BatchToSpaceNDOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_BatchToSpaceNDOptions: { + value = new circle::BatchToSpaceNDOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SpaceToBatchNDOptions: - { - value = new circle::SpaceToBatchNDOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_SpaceToBatchNDOptions: { + value = new circle::SpaceToBatchNDOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_TransposeOptions: - { - value = - new circle::TransposeOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_TransposeOptions: { + value = new circle::TransposeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ReducerOptions: - { + case BuiltinOptions_ReducerOptions: { value = new circle::ReducerOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SubOptions: - { + case BuiltinOptions_SubOptions: { value = new circle::SubOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_DivOptions: - { + case BuiltinOptions_DivOptions: { value = new circle::DivOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SqueezeOptions: - { + case BuiltinOptions_SqueezeOptions: { value = new circle::SqueezeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SequenceRNNOptions: - { - value = - new circle::SequenceRNNOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_SequenceRNNOptions: { + value = new circle::SequenceRNNOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_StridedSliceOptions: - { - value = new circle::StridedSliceOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_StridedSliceOptions: { + value = new circle::StridedSliceOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ExpOptions: - { + case BuiltinOptions_ExpOptions: { value = new circle::ExpOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_TopKV2Options: - { + case BuiltinOptions_TopKV2Options: { value = new circle::TopKV2OptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SplitOptions: - { + case BuiltinOptions_SplitOptions: { value = new circle::SplitOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LogSoftmaxOptions: - { - value = - new circle::LogSoftmaxOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_LogSoftmaxOptions: { + value = new circle::LogSoftmaxOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_CastOptions: - { + case BuiltinOptions_CastOptions: { value = new circle::CastOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_DequantizeOptions: - { - value = - new circle::DequantizeOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_DequantizeOptions: { + value = new circle::DequantizeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_MaximumMinimumOptions: - { - value = new circle::MaximumMinimumOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_MaximumMinimumOptions: { + value = new circle::MaximumMinimumOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ArgMaxOptions: - { + case BuiltinOptions_ArgMaxOptions: { value = new circle::ArgMaxOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LessOptions: - { + case BuiltinOptions_LessOptions: { value = new circle::LessOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_NegOptions: - { + case BuiltinOptions_NegOptions: { value = new circle::NegOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_PadV2Options: - { + case BuiltinOptions_PadV2Options: { value = new circle::PadV2OptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_GreaterOptions: - { + case BuiltinOptions_GreaterOptions: { value = new circle::GreaterOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_GreaterEqualOptions: - { - value = new circle::GreaterEqualOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_GreaterEqualOptions: { + value = new circle::GreaterEqualOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LessEqualOptions: - { - value = - new circle::LessEqualOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_LessEqualOptions: { + value = new circle::LessEqualOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SelectOptions: - { + case BuiltinOptions_SelectOptions: { value = new circle::SelectOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SliceOptions: - { + case BuiltinOptions_SliceOptions: { value = new circle::SliceOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_TransposeConvOptions: - { - value = new circle::TransposeConvOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_TransposeConvOptions: { + value = new circle::TransposeConvOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SparseToDenseOptions: - { - value = new circle::SparseToDenseOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_SparseToDenseOptions: { + value = new circle::SparseToDenseOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_TileOptions: - { + case BuiltinOptions_TileOptions: { value = new circle::TileOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ExpandDimsOptions: - { - value = - new circle::ExpandDimsOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_ExpandDimsOptions: { + value = new circle::ExpandDimsOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_EqualOptions: - { + case BuiltinOptions_EqualOptions: { value = new circle::EqualOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_NotEqualOptions: - { + case BuiltinOptions_NotEqualOptions: { value = new circle::NotEqualOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ShapeOptions: - { + case BuiltinOptions_ShapeOptions: { value = new circle::ShapeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_PowOptions: - { + case BuiltinOptions_PowOptions: { value = new circle::PowOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ArgMinOptions: - { + case BuiltinOptions_ArgMinOptions: { value = new circle::ArgMinOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_FakeQuantOptions: - { - value = - new circle::FakeQuantOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_FakeQuantOptions: { + value = new circle::FakeQuantOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_PackOptions: - { + case BuiltinOptions_PackOptions: { value = new circle::PackOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LogicalOrOptions: - { - value = - new circle::LogicalOrOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_LogicalOrOptions: { + value = new circle::LogicalOrOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_OneHotOptions: - { + case BuiltinOptions_OneHotOptions: { value = new circle::OneHotOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LogicalAndOptions: - { - value = - new circle::LogicalAndOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_LogicalAndOptions: { + value = new circle::LogicalAndOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LogicalNotOptions: - { - value = - new circle::LogicalNotOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_LogicalNotOptions: { + value = new circle::LogicalNotOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_UnpackOptions: - { + case BuiltinOptions_UnpackOptions: { value = new circle::UnpackOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_FloorDivOptions: - { + case BuiltinOptions_FloorDivOptions: { value = new circle::FloorDivOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SquareOptions: - { + case BuiltinOptions_SquareOptions: { value = new circle::SquareOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ZerosLikeOptions: - { - value = - new circle::ZerosLikeOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_ZerosLikeOptions: { + value = new circle::ZerosLikeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_FillOptions: - { + case BuiltinOptions_FillOptions: { value = new circle::FillOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BidirectionalSequenceLSTMOptions: - { - value = new circle::BidirectionalSequenceLSTMOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_BidirectionalSequenceLSTMOptions: { + value = new circle::BidirectionalSequenceLSTMOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BidirectionalSequenceRNNOptions: - { - value = new circle::BidirectionalSequenceRNNOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_BidirectionalSequenceRNNOptions: { + value = new circle::BidirectionalSequenceRNNOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_UnidirectionalSequenceLSTMOptions: - { - value = new circle::UnidirectionalSequenceLSTMOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_UnidirectionalSequenceLSTMOptions: { + value = new circle::UnidirectionalSequenceLSTMOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_FloorModOptions: - { + case BuiltinOptions_FloorModOptions: { value = new circle::FloorModOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_RangeOptions: - { + case BuiltinOptions_RangeOptions: { value = new circle::RangeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ResizeNearestNeighborOptions: - { - value = new circle::ResizeNearestNeighborOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_ResizeNearestNeighborOptions: { + value = new circle::ResizeNearestNeighborOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_LeakyReluOptions: - { - value = - new circle::LeakyReluOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_LeakyReluOptions: { + value = new circle::LeakyReluOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SquaredDifferenceOptions: - { - value = new circle::SquaredDifferenceOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_SquaredDifferenceOptions: { + value = new circle::SquaredDifferenceOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_MirrorPadOptions: - { - value = - new circle::MirrorPadOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_MirrorPadOptions: { + value = new circle::MirrorPadOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_AbsOptions: - { + case BuiltinOptions_AbsOptions: { value = new circle::AbsOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SplitVOptions: - { + case BuiltinOptions_SplitVOptions: { value = new circle::SplitVOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_UniqueOptions: - { + case BuiltinOptions_UniqueOptions: { value = new circle::UniqueOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ReverseV2Options: - { - value = - new circle::ReverseV2OptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_ReverseV2Options: { + value = new circle::ReverseV2OptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_AddNOptions: - { + case BuiltinOptions_AddNOptions: { value = new circle::AddNOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_GatherNdOptions: - { + case BuiltinOptions_GatherNdOptions: { value = new circle::GatherNdOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_CosOptions: - { + case BuiltinOptions_CosOptions: { value = new circle::CosOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_WhereOptions: - { + case BuiltinOptions_WhereOptions: { value = new circle::WhereOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_RankOptions: - { + case BuiltinOptions_RankOptions: { value = new circle::RankOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ReverseSequenceOptions: - { - value = new circle::ReverseSequenceOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_ReverseSequenceOptions: { + value = new circle::ReverseSequenceOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_MatrixDiagOptions: - { - value = - new circle::MatrixDiagOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_MatrixDiagOptions: { + value = new circle::MatrixDiagOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_QuantizeOptions: - { + case BuiltinOptions_QuantizeOptions: { value = new circle::QuantizeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_MatrixSetDiagOptions: - { - value = new circle::MatrixSetDiagOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_MatrixSetDiagOptions: { + value = new circle::MatrixSetDiagOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_HardSwishOptions: - { - value = - new circle::HardSwishOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_HardSwishOptions: { + value = new circle::HardSwishOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_IfOptions: - { + case BuiltinOptions_IfOptions: { value = new circle::IfOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_WhileOptions: - { + case BuiltinOptions_WhileOptions: { value = new circle::WhileOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_DepthToSpaceOptions: - { - value = new circle::DepthToSpaceOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_DepthToSpaceOptions: { + value = new circle::DepthToSpaceOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_NonMaxSuppressionV4Options: - { - value = new circle::NonMaxSuppressionV4OptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_NonMaxSuppressionV4Options: { + value = new circle::NonMaxSuppressionV4OptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_NonMaxSuppressionV5Options: - { - value = new circle::NonMaxSuppressionV5OptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_NonMaxSuppressionV5Options: { + value = new circle::NonMaxSuppressionV5OptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ScatterNdOptions: - { - value = - new circle::ScatterNdOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_ScatterNdOptions: { + value = new circle::ScatterNdOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SelectV2Options: - { + case BuiltinOptions_SelectV2Options: { value = new circle::SelectV2OptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_DensifyOptions: - { + case BuiltinOptions_DensifyOptions: { value = new circle::DensifyOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SegmentSumOptions: - { - value = - new circle::SegmentSumOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_SegmentSumOptions: { + value = new circle::SegmentSumOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BatchMatMulOptions: - { - value = - new circle::BatchMatMulOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_BatchMatMulOptions: { + value = new circle::BatchMatMulOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_CumsumOptions: - { + case BuiltinOptions_CumsumOptions: { value = new circle::CumsumOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_CallOnceOptions: - { + case BuiltinOptions_CallOnceOptions: { value = new circle::CallOnceOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BroadcastToOptions: - { - value = - new circle::BroadcastToOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_BroadcastToOptions: { + value = new circle::BroadcastToOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_Rfft2dOptions: - { + case BuiltinOptions_Rfft2dOptions: { value = new circle::Rfft2dOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_Conv3DOptions: - { + case BuiltinOptions_Conv3DOptions: { value = new circle::Conv3DOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_HashtableOptions: - { - value = - new circle::HashtableOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_HashtableOptions: { + value = new circle::HashtableOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_HashtableFindOptions: - { - value = new circle::HashtableFindOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_HashtableFindOptions: { + value = new circle::HashtableFindOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_HashtableImportOptions: - { - value = new circle::HashtableImportOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_HashtableImportOptions: { + value = new circle::HashtableImportOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_HashtableSizeOptions: - { - value = new circle::HashtableSizeOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_HashtableSizeOptions: { + value = new circle::HashtableSizeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_VarHandleOptions: - { - value = - new circle::VarHandleOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_VarHandleOptions: { + value = new circle::VarHandleOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ReadVariableOptions: - { - value = new circle::ReadVariableOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_ReadVariableOptions: { + value = new circle::ReadVariableOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_AssignVariableOptions: - { - value = new circle::AssignVariableOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_AssignVariableOptions: { + value = new circle::AssignVariableOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_RandomOptions: - { + case BuiltinOptions_RandomOptions: { value = new circle::RandomOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BucketizeOptions: - { - value = - new circle::BucketizeOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_BucketizeOptions: { + value = new circle::BucketizeOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_GeluOptions: - { + case BuiltinOptions_GeluOptions: { value = new circle::GeluOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_DynamicUpdateSliceOptions: - { - value = new circle::DynamicUpdateSliceOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_DynamicUpdateSliceOptions: { + value = new circle::DynamicUpdateSliceOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_UnsortedSegmentProdOptions: - { - value = new circle::UnsortedSegmentProdOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_UnsortedSegmentProdOptions: { + value = new circle::UnsortedSegmentProdOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_UnsortedSegmentMaxOptions: - { - value = new circle::UnsortedSegmentMaxOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_UnsortedSegmentMaxOptions: { + value = new circle::UnsortedSegmentMaxOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_UnsortedSegmentMinOptions: - { - value = new circle::UnsortedSegmentMinOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_UnsortedSegmentMinOptions: { + value = new circle::UnsortedSegmentMinOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_UnsortedSegmentSumOptions: - { - value = new circle::UnsortedSegmentSumOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_UnsortedSegmentSumOptions: { + value = new circle::UnsortedSegmentSumOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_ATan2Options: - { + case BuiltinOptions_ATan2Options: { value = new circle::ATan2OptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_SignOptions: - { + case BuiltinOptions_SignOptions: { value = new circle::SignOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BitcastOptions: - { + case BuiltinOptions_BitcastOptions: { value = new circle::BitcastOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BitwiseXorOptions: - { - value = - new circle::BitwiseXorOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_BitwiseXorOptions: { + value = new circle::BitwiseXorOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions_RightShiftOptions: { + value = new circle::RightShiftOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_RightShiftOptions: - { - value = - new circle::RightShiftOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_GRUOptions: { + value = new circle::GRUOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BCQGatherOptions: - { - value = - new circle::BCQGatherOptionsT(*reinterpret_cast(u.value)); + case BuiltinOptions_BCQGatherOptions: { + value = new circle::BCQGatherOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_BCQFullyConnectedOptions: - { - value = new circle::BCQFullyConnectedOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_BCQFullyConnectedOptions: { + value = new circle::BCQFullyConnectedOptionsT(*reinterpret_cast(u.value)); break; } - case BuiltinOptions_InstanceNormOptions: - { - value = new circle::InstanceNormOptionsT( - *reinterpret_cast(u.value)); + case BuiltinOptions_InstanceNormOptions: { + value = new circle::InstanceNormOptionsT(*reinterpret_cast(u.value)); break; } default: @@ -26287,844 +23440,1187 @@ inline BuiltinOptionsUnion::BuiltinOptionsUnion(const BuiltinOptionsUnion &u) } } -inline void BuiltinOptionsUnion::Reset() -{ - switch (type) - { - case BuiltinOptions_Conv2DOptions: - { +inline void BuiltinOptionsUnion::Reset() { + switch (type) { + case BuiltinOptions_Conv2DOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_DepthwiseConv2DOptions: - { + case BuiltinOptions_DepthwiseConv2DOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ConcatEmbeddingsOptions: - { + case BuiltinOptions_ConcatEmbeddingsOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LSHProjectionOptions: - { + case BuiltinOptions_LSHProjectionOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_Pool2DOptions: - { + case BuiltinOptions_Pool2DOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SVDFOptions: - { + case BuiltinOptions_SVDFOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_RNNOptions: - { + case BuiltinOptions_RNNOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_FullyConnectedOptions: - { + case BuiltinOptions_FullyConnectedOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SoftmaxOptions: - { + case BuiltinOptions_SoftmaxOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ConcatenationOptions: - { + case BuiltinOptions_ConcatenationOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_AddOptions: - { + case BuiltinOptions_AddOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_L2NormOptions: - { + case BuiltinOptions_L2NormOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LocalResponseNormalizationOptions: - { + case BuiltinOptions_LocalResponseNormalizationOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LSTMOptions: - { + case BuiltinOptions_LSTMOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ResizeBilinearOptions: - { + case BuiltinOptions_ResizeBilinearOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_CallOptions: - { + case BuiltinOptions_CallOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ReshapeOptions: - { + case BuiltinOptions_ReshapeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SkipGramOptions: - { + case BuiltinOptions_SkipGramOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SpaceToDepthOptions: - { + case BuiltinOptions_SpaceToDepthOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_EmbeddingLookupSparseOptions: - { + case BuiltinOptions_EmbeddingLookupSparseOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_MulOptions: - { + case BuiltinOptions_MulOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_PadOptions: - { + case BuiltinOptions_PadOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_GatherOptions: - { + case BuiltinOptions_GatherOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BatchToSpaceNDOptions: - { + case BuiltinOptions_BatchToSpaceNDOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SpaceToBatchNDOptions: - { + case BuiltinOptions_SpaceToBatchNDOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_TransposeOptions: - { + case BuiltinOptions_TransposeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ReducerOptions: - { + case BuiltinOptions_ReducerOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SubOptions: - { + case BuiltinOptions_SubOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_DivOptions: - { + case BuiltinOptions_DivOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SqueezeOptions: - { + case BuiltinOptions_SqueezeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SequenceRNNOptions: - { + case BuiltinOptions_SequenceRNNOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_StridedSliceOptions: - { + case BuiltinOptions_StridedSliceOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ExpOptions: - { + case BuiltinOptions_ExpOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_TopKV2Options: - { + case BuiltinOptions_TopKV2Options: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SplitOptions: - { + case BuiltinOptions_SplitOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LogSoftmaxOptions: - { + case BuiltinOptions_LogSoftmaxOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_CastOptions: - { + case BuiltinOptions_CastOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_DequantizeOptions: - { + case BuiltinOptions_DequantizeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_MaximumMinimumOptions: - { + case BuiltinOptions_MaximumMinimumOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ArgMaxOptions: - { + case BuiltinOptions_ArgMaxOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LessOptions: - { + case BuiltinOptions_LessOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_NegOptions: - { + case BuiltinOptions_NegOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_PadV2Options: - { + case BuiltinOptions_PadV2Options: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_GreaterOptions: - { + case BuiltinOptions_GreaterOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_GreaterEqualOptions: - { + case BuiltinOptions_GreaterEqualOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LessEqualOptions: - { + case BuiltinOptions_LessEqualOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SelectOptions: - { + case BuiltinOptions_SelectOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SliceOptions: - { + case BuiltinOptions_SliceOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_TransposeConvOptions: - { + case BuiltinOptions_TransposeConvOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SparseToDenseOptions: - { + case BuiltinOptions_SparseToDenseOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_TileOptions: - { + case BuiltinOptions_TileOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ExpandDimsOptions: - { + case BuiltinOptions_ExpandDimsOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_EqualOptions: - { + case BuiltinOptions_EqualOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_NotEqualOptions: - { + case BuiltinOptions_NotEqualOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ShapeOptions: - { + case BuiltinOptions_ShapeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_PowOptions: - { + case BuiltinOptions_PowOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ArgMinOptions: - { + case BuiltinOptions_ArgMinOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_FakeQuantOptions: - { + case BuiltinOptions_FakeQuantOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_PackOptions: - { + case BuiltinOptions_PackOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LogicalOrOptions: - { + case BuiltinOptions_LogicalOrOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_OneHotOptions: - { + case BuiltinOptions_OneHotOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LogicalAndOptions: - { + case BuiltinOptions_LogicalAndOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LogicalNotOptions: - { + case BuiltinOptions_LogicalNotOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_UnpackOptions: - { + case BuiltinOptions_UnpackOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_FloorDivOptions: - { + case BuiltinOptions_FloorDivOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SquareOptions: - { + case BuiltinOptions_SquareOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ZerosLikeOptions: - { + case BuiltinOptions_ZerosLikeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_FillOptions: - { + case BuiltinOptions_FillOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BidirectionalSequenceLSTMOptions: - { + case BuiltinOptions_BidirectionalSequenceLSTMOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BidirectionalSequenceRNNOptions: - { + case BuiltinOptions_BidirectionalSequenceRNNOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_UnidirectionalSequenceLSTMOptions: - { + case BuiltinOptions_UnidirectionalSequenceLSTMOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_FloorModOptions: - { + case BuiltinOptions_FloorModOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_RangeOptions: - { + case BuiltinOptions_RangeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ResizeNearestNeighborOptions: - { + case BuiltinOptions_ResizeNearestNeighborOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_LeakyReluOptions: - { + case BuiltinOptions_LeakyReluOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SquaredDifferenceOptions: - { + case BuiltinOptions_SquaredDifferenceOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_MirrorPadOptions: - { + case BuiltinOptions_MirrorPadOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_AbsOptions: - { + case BuiltinOptions_AbsOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SplitVOptions: - { + case BuiltinOptions_SplitVOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_UniqueOptions: - { + case BuiltinOptions_UniqueOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ReverseV2Options: - { + case BuiltinOptions_ReverseV2Options: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_AddNOptions: - { + case BuiltinOptions_AddNOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_GatherNdOptions: - { + case BuiltinOptions_GatherNdOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_CosOptions: - { + case BuiltinOptions_CosOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_WhereOptions: - { + case BuiltinOptions_WhereOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_RankOptions: - { + case BuiltinOptions_RankOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ReverseSequenceOptions: - { + case BuiltinOptions_ReverseSequenceOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_MatrixDiagOptions: - { + case BuiltinOptions_MatrixDiagOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_QuantizeOptions: - { + case BuiltinOptions_QuantizeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_MatrixSetDiagOptions: - { + case BuiltinOptions_MatrixSetDiagOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_HardSwishOptions: - { + case BuiltinOptions_HardSwishOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_IfOptions: - { + case BuiltinOptions_IfOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_WhileOptions: - { + case BuiltinOptions_WhileOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_DepthToSpaceOptions: - { + case BuiltinOptions_DepthToSpaceOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_NonMaxSuppressionV4Options: - { + case BuiltinOptions_NonMaxSuppressionV4Options: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_NonMaxSuppressionV5Options: - { + case BuiltinOptions_NonMaxSuppressionV5Options: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ScatterNdOptions: - { + case BuiltinOptions_ScatterNdOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SelectV2Options: - { + case BuiltinOptions_SelectV2Options: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_DensifyOptions: - { + case BuiltinOptions_DensifyOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SegmentSumOptions: - { + case BuiltinOptions_SegmentSumOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BatchMatMulOptions: - { + case BuiltinOptions_BatchMatMulOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_CumsumOptions: - { + case BuiltinOptions_CumsumOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_CallOnceOptions: - { + case BuiltinOptions_CallOnceOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BroadcastToOptions: - { + case BuiltinOptions_BroadcastToOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_Rfft2dOptions: - { + case BuiltinOptions_Rfft2dOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_Conv3DOptions: - { + case BuiltinOptions_Conv3DOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_HashtableOptions: - { + case BuiltinOptions_HashtableOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_HashtableFindOptions: - { + case BuiltinOptions_HashtableFindOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_HashtableImportOptions: - { + case BuiltinOptions_HashtableImportOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_HashtableSizeOptions: - { + case BuiltinOptions_HashtableSizeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_VarHandleOptions: - { + case BuiltinOptions_VarHandleOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ReadVariableOptions: - { + case BuiltinOptions_ReadVariableOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_AssignVariableOptions: - { + case BuiltinOptions_AssignVariableOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_RandomOptions: - { + case BuiltinOptions_RandomOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BucketizeOptions: - { + case BuiltinOptions_BucketizeOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_GeluOptions: - { + case BuiltinOptions_GeluOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_DynamicUpdateSliceOptions: - { + case BuiltinOptions_DynamicUpdateSliceOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_UnsortedSegmentProdOptions: - { + case BuiltinOptions_UnsortedSegmentProdOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_UnsortedSegmentMaxOptions: - { + case BuiltinOptions_UnsortedSegmentMaxOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_UnsortedSegmentMinOptions: - { + case BuiltinOptions_UnsortedSegmentMinOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_UnsortedSegmentSumOptions: - { + case BuiltinOptions_UnsortedSegmentSumOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_ATan2Options: - { + case BuiltinOptions_ATan2Options: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_SignOptions: - { + case BuiltinOptions_SignOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BitcastOptions: - { + case BuiltinOptions_BitcastOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BitwiseXorOptions: - { + case BuiltinOptions_BitwiseXorOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_RightShiftOptions: - { + case BuiltinOptions_RightShiftOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BCQGatherOptions: - { + case BuiltinOptions_GRUOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions_BCQGatherOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_BCQFullyConnectedOptions: - { + case BuiltinOptions_BCQFullyConnectedOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } - case BuiltinOptions_InstanceNormOptions: - { + case BuiltinOptions_InstanceNormOptions: { auto ptr = reinterpret_cast(value); delete ptr; break; } + default: break; + } + value = nullptr; + type = BuiltinOptions_NONE; +} + +inline bool VerifyBuiltinOptions2(flatbuffers::Verifier &verifier, const void *obj, BuiltinOptions2 type) { + switch (type) { + case BuiltinOptions2_NONE: { + return true; + } + case BuiltinOptions2_StablehloConcatenateOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloBroadcastInDimOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloSliceOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloConvolutionOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloCustomCallOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloReduceOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloScatterOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloCompareOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloDynamicSliceOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloPadOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloIotaOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloDotGeneralOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloReduceWindowOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloSortOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloWhileOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloGatherOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloTransposeOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_DilateOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_StablehloRngBitGeneratorOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case BuiltinOptions2_ReduceWindowOptions: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + default: return true; + } +} + +inline bool VerifyBuiltinOptions2Vector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { + if (!values || !types) return !values && !types; + if (values->size() != types->size()) return false; + for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { + if (!VerifyBuiltinOptions2( + verifier, values->Get(i), types->GetEnum(i))) { + return false; + } + } + return true; +} + +inline void *BuiltinOptions2Union::UnPack(const void *obj, BuiltinOptions2 type, const flatbuffers::resolver_function_t *resolver) { + switch (type) { + case BuiltinOptions2_StablehloConcatenateOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloBroadcastInDimOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloSliceOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloConvolutionOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloCustomCallOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloReduceOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloScatterOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloCompareOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloDynamicSliceOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloPadOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloIotaOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloDotGeneralOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloReduceWindowOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloSortOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloWhileOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloGatherOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloTransposeOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_DilateOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_StablehloRngBitGeneratorOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case BuiltinOptions2_ReduceWindowOptions: { + auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + default: return nullptr; + } +} + +inline flatbuffers::Offset BuiltinOptions2Union::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { + switch (type) { + case BuiltinOptions2_StablehloConcatenateOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloConcatenateOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloBroadcastInDimOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloBroadcastInDimOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloSliceOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloSliceOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloConvolutionOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloConvolutionOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloCustomCallOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloCustomCallOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloReduceOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloReduceOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloScatterOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloScatterOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloCompareOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloCompareOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloDynamicSliceOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloDynamicSliceOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloPadOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloPadOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloIotaOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloIotaOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloDotGeneralOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloDotGeneralOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloReduceWindowOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloReduceWindowOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloSortOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloSortOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloWhileOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloWhileOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloGatherOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloGatherOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloTransposeOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloTransposeOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_DilateOptions: { + auto ptr = reinterpret_cast(value); + return CreateDilateOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_StablehloRngBitGeneratorOptions: { + auto ptr = reinterpret_cast(value); + return CreateStablehloRngBitGeneratorOptions(_fbb, ptr, _rehasher).Union(); + } + case BuiltinOptions2_ReduceWindowOptions: { + auto ptr = reinterpret_cast(value); + return CreateReduceWindowOptions(_fbb, ptr, _rehasher).Union(); + } + default: return 0; + } +} + +inline BuiltinOptions2Union::BuiltinOptions2Union(const BuiltinOptions2Union &u) : type(u.type), value(nullptr) { + switch (type) { + case BuiltinOptions2_StablehloConcatenateOptions: { + value = new circle::StablehloConcatenateOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloBroadcastInDimOptions: { + value = new circle::StablehloBroadcastInDimOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloSliceOptions: { + value = new circle::StablehloSliceOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloConvolutionOptions: { + value = new circle::StablehloConvolutionOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloCustomCallOptions: { + value = new circle::StablehloCustomCallOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloReduceOptions: { + value = new circle::StablehloReduceOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloScatterOptions: { + value = new circle::StablehloScatterOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloCompareOptions: { + value = new circle::StablehloCompareOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloDynamicSliceOptions: { + value = new circle::StablehloDynamicSliceOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloPadOptions: { + value = new circle::StablehloPadOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloIotaOptions: { + value = new circle::StablehloIotaOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloDotGeneralOptions: { + value = new circle::StablehloDotGeneralOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloReduceWindowOptions: { + value = new circle::StablehloReduceWindowOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloSortOptions: { + value = new circle::StablehloSortOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloWhileOptions: { + value = new circle::StablehloWhileOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloGatherOptions: { + value = new circle::StablehloGatherOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloTransposeOptions: { + value = new circle::StablehloTransposeOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_DilateOptions: { + value = new circle::DilateOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_StablehloRngBitGeneratorOptions: { + value = new circle::StablehloRngBitGeneratorOptionsT(*reinterpret_cast(u.value)); + break; + } + case BuiltinOptions2_ReduceWindowOptions: { + value = new circle::ReduceWindowOptionsT(*reinterpret_cast(u.value)); + break; + } default: break; } +} + +inline void BuiltinOptions2Union::Reset() { + switch (type) { + case BuiltinOptions2_StablehloConcatenateOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloBroadcastInDimOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloSliceOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloConvolutionOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloCustomCallOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloReduceOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloScatterOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloCompareOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloDynamicSliceOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloPadOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloIotaOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloDotGeneralOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloReduceWindowOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloSortOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloWhileOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloGatherOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloTransposeOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_DilateOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_StablehloRngBitGeneratorOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case BuiltinOptions2_ReduceWindowOptions: { + auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + default: break; + } value = nullptr; - type = BuiltinOptions_NONE; + type = BuiltinOptions2_NONE; } -inline const circle::Model *GetModel(const void *buf) -{ +inline const circle::Model *GetModel(const void *buf) { return flatbuffers::GetRoot(buf); } -inline const circle::Model *GetSizePrefixedModel(const void *buf) -{ +inline const circle::Model *GetSizePrefixedModel(const void *buf) { return flatbuffers::GetSizePrefixedRoot(buf); } -inline const char *ModelIdentifier() { return "CIR0"; } +inline const char *ModelIdentifier() { + return "CIR0"; +} -inline bool ModelBufferHasIdentifier(const void *buf) -{ - return flatbuffers::BufferHasIdentifier(buf, ModelIdentifier()); +inline bool ModelBufferHasIdentifier(const void *buf) { + return flatbuffers::BufferHasIdentifier( + buf, ModelIdentifier()); } -inline bool VerifyModelBuffer(flatbuffers::Verifier &verifier) -{ +inline bool VerifyModelBuffer( + flatbuffers::Verifier &verifier) { return verifier.VerifyBuffer(ModelIdentifier()); } -inline bool VerifySizePrefixedModelBuffer(flatbuffers::Verifier &verifier) -{ +inline bool VerifySizePrefixedModelBuffer( + flatbuffers::Verifier &verifier) { return verifier.VerifySizePrefixedBuffer(ModelIdentifier()); } -inline const char *ModelExtension() { return "circle"; } +inline const char *ModelExtension() { + return "circle"; +} -inline void FinishModelBuffer(flatbuffers::FlatBufferBuilder &fbb, - flatbuffers::Offset root) -{ +inline void FinishModelBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { fbb.Finish(root, ModelIdentifier()); } -inline void FinishSizePrefixedModelBuffer(flatbuffers::FlatBufferBuilder &fbb, - flatbuffers::Offset root) -{ +inline void FinishSizePrefixedModelBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { fbb.FinishSizePrefixed(root, ModelIdentifier()); } -inline std::unique_ptr -UnPackModel(const void *buf, const flatbuffers::resolver_function_t *res = nullptr) -{ +inline std::unique_ptr UnPackModel( + const void *buf, + const flatbuffers::resolver_function_t *res = nullptr) { return std::unique_ptr(GetModel(buf)->UnPack(res)); } -inline std::unique_ptr -UnPackSizePrefixedModel(const void *buf, const flatbuffers::resolver_function_t *res = nullptr) -{ +inline std::unique_ptr UnPackSizePrefixedModel( + const void *buf, + const flatbuffers::resolver_function_t *res = nullptr) { return std::unique_ptr(GetSizePrefixedModel(buf)->UnPack(res)); } -} // namespace circle +} // namespace circle -#endif // FLATBUFFERS_GENERATED_SCHEMA_CIRCLE_H_ +#endif // FLATBUFFERS_GENERATED_SCHEMA_CIRCLE_H_