From 86591c8c5926c856a1380012ed0272fad47fed0d Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Sat, 10 Jul 2021 14:44:20 +0800 Subject: [PATCH 01/19] upgrade the flatbuffers's version --- ports/flatbuffers/CONTROL | 4 ++-- ports/flatbuffers/fix-issue-6036.patch | 23 ------------------- ports/flatbuffers/fix-uwp-build.patch | 4 ++-- .../ignore_use_of_cmake_toolchain_file.patch | 4 ++-- ports/flatbuffers/no-werror.patch | 6 ++--- ports/flatbuffers/portfile.cmake | 6 ++--- 6 files changed, 11 insertions(+), 36 deletions(-) delete mode 100644 ports/flatbuffers/fix-issue-6036.patch diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL index ced25eb94c3c45..bc5f294e1a2545 100644 --- a/ports/flatbuffers/CONTROL +++ b/ports/flatbuffers/CONTROL @@ -1,6 +1,6 @@ Source: flatbuffers -Version: 1.12.0 -Port-Version: 2 +Version: 2.0.0 +Port-Version: 0 Description: Memory Efficient Serialization Library FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility. Homepage: https://google.github.io/flatbuffers/ diff --git a/ports/flatbuffers/fix-issue-6036.patch b/ports/flatbuffers/fix-issue-6036.patch deleted file mode 100644 index 872b73e6fd9717..00000000000000 --- a/ports/flatbuffers/fix-issue-6036.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h -index c4dc5bc..c090455 100644 ---- a/include/flatbuffers/flatbuffers.h -+++ b/include/flatbuffers/flatbuffers.h -@@ -1861,14 +1861,14 @@ class FlatBufferBuilder { - - /// @cond FLATBUFFERS_INTERNAL - template struct TableKeyComparator { -- TableKeyComparator(vector_downward &buf) : buf_(buf) {} -+ TableKeyComparator(vector_downward &buf) : buf_(&buf) {} - TableKeyComparator(const TableKeyComparator &other) : buf_(other.buf_) {} - 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)); -+ 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_; -+ vector_downward *buf_; - - private: - TableKeyComparator &operator=(const TableKeyComparator &other) { diff --git a/ports/flatbuffers/fix-uwp-build.patch b/ports/flatbuffers/fix-uwp-build.patch index 5716f8a2f01f0d..44513b9e8ba6dc 100644 --- a/ports/flatbuffers/fix-uwp-build.patch +++ b/ports/flatbuffers/fix-uwp-build.patch @@ -1,8 +1,8 @@ diff --git a/src/util.cpp b/src/util.cpp -index c1bb197..658e116 100644 +index 3670a019..fb5d884f 100644 --- a/src/util.cpp +++ b/src/util.cpp -@@ -245,9 +245,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) { +@@ -255,9 +255,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) { #ifdef _MSC_VER __pragma(warning(disable : 4996)); // _CRT_SECURE_NO_WARNINGS #endif diff --git a/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch b/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch index 38e1f12ec091bb..8bd99db36613e6 100644 --- a/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch +++ b/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 119855a..945085a 100644 +index ec782239..f163b64d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -155,7 +155,7 @@ set(FlatBuffers_GRPCTest_SRCS +@@ -216,7 +216,7 @@ set(FlatBuffers_GRPCTest_SRCS # source_group(Compiler FILES ${FlatBuffers_Compiler_SRCS}) # source_group(Tests FILES ${FlatBuffers_Tests_SRCS}) diff --git a/ports/flatbuffers/no-werror.patch b/ports/flatbuffers/no-werror.patch index b354e229d6e93a..dcc5cde41181fb 100644 --- a/ports/flatbuffers/no-werror.patch +++ b/ports/flatbuffers/no-werror.patch @@ -1,13 +1,13 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 119855a..6269362 100644 +index ec782239..57566c5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -172,13 +172,17 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) +@@ -233,13 +233,17 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) "${CMAKE_CXX_FLAGS} -std=c++0x") endif(CYGWIN) set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow") -+ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=shadow") ++ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=shadow") set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast") if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) diff --git a/ports/flatbuffers/portfile.cmake b/ports/flatbuffers/portfile.cmake index 794592d98379d2..5cf7ab6bbae9a1 100644 --- a/ports/flatbuffers/portfile.cmake +++ b/ports/flatbuffers/portfile.cmake @@ -3,15 +3,13 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/flatbuffers - REF v1.12.0 - SHA512 8a0b88d739fa4694a69d3630140fe89fdd70d50bba4dadd1758d9aa2920cda16700bcafb8d89fe2a09ac907d3f378240c3cb4abc7106318136799836aba4b063 + REF v2.0.0 + SHA512 26a06b572c0e4c9685743bd2d2162ac7dcd74b9324624cc3f3ef5b154c0cee7c52a04b77cdc184245d2d6ae38dfdcc4fd66001c318aa8ca001d2bf1d85d66a89 HEAD_REF master PATCHES ignore_use_of_cmake_toolchain_file.patch no-werror.patch fix-uwp-build.patch - fix-issue-6036.patch # this patch is already applied to the latest master branch. - # remove it in next version update ) set(OPTIONS) From d256bf93f0ce3a00da005701a2bfe2e166407f42 Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Sat, 10 Jul 2021 14:45:02 +0800 Subject: [PATCH 02/19] run `vcpkg x-add-version` --- versions/baseline.json | 4 ++-- versions/f-/flatbuffers.json | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 61cd12944d1de3..7c8a6482f25700 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2025,8 +2025,8 @@ "port-version": 2 }, "flatbuffers": { - "baseline": "1.12.0", - "port-version": 2 + "baseline": "2.0.0", + "port-version": 0 }, "flint": { "baseline": "2.5.2-4", diff --git a/versions/f-/flatbuffers.json b/versions/f-/flatbuffers.json index 106b1d8cadd09b..a70382ed416dda 100644 --- a/versions/f-/flatbuffers.json +++ b/versions/f-/flatbuffers.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "629358e6935f0a0fcd63659e66cc70da619ba66f", + "version-string": "2.0.0", + "port-version": 0 + }, { "git-tree": "195ffbf0b3c6abace9106115fd4ed081431a3997", "version-string": "1.12.0", From 96e57b8a0b29e2491abdfa7f6871f0dbf2bed3a0 Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Sat, 10 Jul 2021 17:52:51 +0800 Subject: [PATCH 03/19] upgrade flatbuffers to v2.0.0 for mnn --- ports/mnn/portfile.cmake | 1 + ports/mnn/use-flatbuffers-200.patch | 19048 ++++++++++++++++++++++++++ 2 files changed, 19049 insertions(+) create mode 100644 ports/mnn/use-flatbuffers-200.patch diff --git a/ports/mnn/portfile.cmake b/ports/mnn/portfile.cmake index 1546d49cbd50a4..d8fe83d8ec57b6 100644 --- a/ports/mnn/portfile.cmake +++ b/ports/mnn/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_from_github( HEAD_REF master PATCHES use-package-and-install.patch + use-flatbuffers-200.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS diff --git a/ports/mnn/use-flatbuffers-200.patch b/ports/mnn/use-flatbuffers-200.patch new file mode 100644 index 00000000000000..1eea0e954c289a --- /dev/null +++ b/ports/mnn/use-flatbuffers-200.patch @@ -0,0 +1,19048 @@ +diff --git a/schema/current/BasicOptimizer_generated.h b/schema/current/BasicOptimizer_generated.h +index 6bb12f7e..71dfc330 100644 +--- a/schema/current/BasicOptimizer_generated.h ++++ b/schema/current/BasicOptimizer_generated.h +@@ -4,23 +4,26 @@ + #ifndef FLATBUFFERS_GENERATED_BASICOPTIMIZER_MNN_OPTIMIZER_H_ + #define FLATBUFFERS_GENERATED_BASICOPTIMIZER_MNN_OPTIMIZER_H_ + ++#include "flatbuffers/flatbuffers.h" + +-#include "CaffeOp_generated.h" +-#include "GpuLibrary_generated.h" +-#include "MNN_generated.h" + #include "TFQuantizeOp_generated.h" +-#include "Tensor_generated.h" +-#include "TensorflowOp_generated.h" + #include "Type_generated.h" + #include "UserDefine_generated.h" ++#include "MNN_generated.h" ++#include "CaffeOp_generated.h" ++#include "GpuLibrary_generated.h" ++#include "TensorflowOp_generated.h" ++#include "Tensor_generated.h" + + namespace MNN { + namespace Optimizer { + + struct BackendConfig; ++struct BackendConfigBuilder; + struct BackendConfigT; + + struct Merge; ++struct MergeBuilder; + struct MergeT; + + inline const flatbuffers::TypeTable *BackendConfigTypeTable(); +@@ -29,22 +32,16 @@ inline const flatbuffers::TypeTable *MergeTypeTable(); + + struct BackendConfigT : public flatbuffers::NativeTable { + typedef BackendConfig TableType; +- int32_t memroy; +- MNN::ForwardType type; +- int32_t precision; +- int32_t power; +- int32_t numberThread; +- BackendConfigT() +- : memroy(0), +- type(MNN::ForwardType_CPU), +- precision(0), +- power(0), +- numberThread(1) { +- } ++ int32_t memroy = 0; ++ MNN::ForwardType type = MNN::ForwardType_CPU; ++ int32_t precision = 0; ++ int32_t power = 0; ++ int32_t numberThread = 1; + }; + + struct BackendConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BackendConfigT NativeTableType; ++ typedef BackendConfigBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return BackendConfigTypeTable(); + } +@@ -85,6 +82,7 @@ struct BackendConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BackendConfigBuilder { ++ typedef BackendConfig Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_memroy(int32_t memroy) { +@@ -106,7 +104,6 @@ struct BackendConfigBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BackendConfigBuilder &operator=(const BackendConfigBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -134,18 +131,16 @@ flatbuffers::Offset CreateBackendConfig(flatbuffers::FlatBufferBu + + struct MergeT : public flatbuffers::NativeTable { + typedef Merge TableType; +- std::vector outputIndexes; +- std::vector inputIndexes; +- int32_t tensorNumber; +- std::unique_ptr backend; +- std::vector> oplists; +- MergeT() +- : tensorNumber(0) { +- } ++ std::vector outputIndexes{}; ++ std::vector inputIndexes{}; ++ int32_t tensorNumber = 0; ++ std::unique_ptr backend{}; ++ std::vector> oplists{}; + }; + + struct Merge FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MergeT NativeTableType; ++ typedef MergeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return MergeTypeTable(); + } +@@ -165,8 +160,8 @@ struct Merge FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t tensorNumber() const { + return GetField(VT_TENSORNUMBER, 0); + } +- const BackendConfig *backend() const { +- return GetPointer(VT_BACKEND); ++ const MNN::Optimizer::BackendConfig *backend() const { ++ return GetPointer(VT_BACKEND); + } + const flatbuffers::Vector> *oplists() const { + return GetPointer> *>(VT_OPLISTS); +@@ -191,6 +186,7 @@ struct Merge FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct MergeBuilder { ++ typedef Merge Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_outputIndexes(flatbuffers::Offset> outputIndexes) { +@@ -202,7 +198,7 @@ struct MergeBuilder { + void add_tensorNumber(int32_t tensorNumber) { + fbb_.AddElement(Merge::VT_TENSORNUMBER, tensorNumber, 0); + } +- void add_backend(flatbuffers::Offset backend) { ++ void add_backend(flatbuffers::Offset backend) { + fbb_.AddOffset(Merge::VT_BACKEND, backend); + } + void add_oplists(flatbuffers::Offset>> oplists) { +@@ -212,7 +208,6 @@ struct MergeBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MergeBuilder &operator=(const MergeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -225,7 +220,7 @@ inline flatbuffers::Offset CreateMerge( + flatbuffers::Offset> outputIndexes = 0, + flatbuffers::Offset> inputIndexes = 0, + int32_t tensorNumber = 0, +- flatbuffers::Offset backend = 0, ++ flatbuffers::Offset backend = 0, + flatbuffers::Offset>> oplists = 0) { + MergeBuilder builder_(_fbb); + builder_.add_oplists(oplists); +@@ -241,7 +236,7 @@ inline flatbuffers::Offset CreateMergeDirect( + const std::vector *outputIndexes = nullptr, + const std::vector *inputIndexes = nullptr, + int32_t tensorNumber = 0, +- flatbuffers::Offset backend = 0, ++ flatbuffers::Offset backend = 0, + const std::vector> *oplists = nullptr) { + auto outputIndexes__ = outputIndexes ? _fbb.CreateVector(*outputIndexes) : 0; + auto inputIndexes__ = inputIndexes ? _fbb.CreateVector(*inputIndexes) : 0; +@@ -258,19 +253,19 @@ inline flatbuffers::Offset CreateMergeDirect( + flatbuffers::Offset CreateMerge(flatbuffers::FlatBufferBuilder &_fbb, const MergeT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + inline BackendConfigT *BackendConfig::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BackendConfigT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BackendConfigT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BackendConfig::UnPackTo(BackendConfigT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = memroy(); _o->memroy = _e; }; +- { auto _e = type(); _o->type = _e; }; +- { auto _e = precision(); _o->precision = _e; }; +- { auto _e = power(); _o->power = _e; }; +- { auto _e = numberThread(); _o->numberThread = _e; }; ++ { auto _e = memroy(); _o->memroy = _e; } ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = precision(); _o->precision = _e; } ++ { auto _e = power(); _o->power = _e; } ++ { auto _e = numberThread(); _o->numberThread = _e; } + } + + inline flatbuffers::Offset BackendConfig::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BackendConfigT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -296,19 +291,19 @@ inline flatbuffers::Offset CreateBackendConfig(flatbuffers::FlatB + } + + inline MergeT *Merge::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MergeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MergeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Merge::UnPackTo(MergeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } }; +- { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } }; +- { auto _e = tensorNumber(); _o->tensorNumber = _e; }; +- { auto _e = backend(); if (_e) _o->backend = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = oplists(); if (_e) { _o->oplists.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->oplists[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; ++ { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } } ++ { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } } ++ { auto _e = tensorNumber(); _o->tensorNumber = _e; } ++ { auto _e = backend(); if (_e) _o->backend = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = oplists(); if (_e) { _o->oplists.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->oplists[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset Merge::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MergeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -352,7 +347,7 @@ inline const flatbuffers::TypeTable *BackendConfigTypeTable() { + "numberThread" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -366,7 +361,7 @@ inline const flatbuffers::TypeTable *MergeTypeTable() { + { flatbuffers::ET_SEQUENCE, 1, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- BackendConfigTypeTable, ++ MNN::Optimizer::BackendConfigTypeTable, + MNN::OpTypeTable + }; + static const char * const names[] = { +@@ -377,7 +372,7 @@ inline const flatbuffers::TypeTable *MergeTypeTable() { + "oplists" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +diff --git a/schema/current/CaffeOp_generated.h b/schema/current/CaffeOp_generated.h +index 12bc81f2..2f9b63bf 100644 +--- a/schema/current/CaffeOp_generated.h ++++ b/schema/current/CaffeOp_generated.h +@@ -4,109 +4,143 @@ + #ifndef FLATBUFFERS_GENERATED_CAFFEOP_MNN_H_ + #define FLATBUFFERS_GENERATED_CAFFEOP_MNN_H_ + ++#include "flatbuffers/flatbuffers.h" + +-#include "Tensor_generated.h" + #include "Type_generated.h" ++#include "Tensor_generated.h" + + namespace MNN { + + struct Convolution2DCommon; ++struct Convolution2DCommonBuilder; + struct Convolution2DCommonT; + + struct Convolution3DCommon; ++struct Convolution3DCommonBuilder; + struct Convolution3DCommonT; + + struct IDSTQuan; ++struct IDSTQuanBuilder; + struct IDSTQuanT; + + struct QuantizedFloatParam; ++struct QuantizedFloatParamBuilder; + struct QuantizedFloatParamT; + + struct Convolution2D; ++struct Convolution2DBuilder; + struct Convolution2DT; + + struct Convolution3D; ++struct Convolution3DBuilder; + struct Convolution3DT; + + struct InnerProduct; ++struct InnerProductBuilder; + struct InnerProductT; + + struct Pool; ++struct PoolBuilder; + struct PoolT; + + struct Pool3D; ++struct Pool3DBuilder; + struct Pool3DT; + + struct Relu; ++struct ReluBuilder; + struct ReluT; + + struct Relu6; ++struct Relu6Builder; + struct Relu6T; + + struct PRelu; ++struct PReluBuilder; + struct PReluT; + + struct ELU; ++struct ELUBuilder; + struct ELUT; + + struct LRN; ++struct LRNBuilder; + struct LRNT; + + struct ArgMax; ++struct ArgMaxBuilder; + struct ArgMaxT; + + struct Axis; ++struct AxisBuilder; + struct AxisT; + + struct Input; ++struct InputBuilder; + struct InputT; + + struct LSTM; ++struct LSTMBuilder; + struct LSTMT; + + struct Slice; ++struct SliceBuilder; + struct SliceT; + + struct BatchNorm; ++struct BatchNormBuilder; + struct BatchNormT; + + struct Scale; ++struct ScaleBuilder; + struct ScaleT; + + struct Eltwise; ++struct EltwiseBuilder; + struct EltwiseT; + + struct Flatten; ++struct FlattenBuilder; + struct FlattenT; + + struct Permute; ++struct PermuteBuilder; + struct PermuteT; + + struct Reshape; ++struct ReshapeBuilder; + struct ReshapeT; + + struct DetectionOutput; ++struct DetectionOutputBuilder; + struct DetectionOutputT; + + struct RoiPooling; ++struct RoiPoolingBuilder; + struct RoiPoolingT; + + struct Proposal; ++struct ProposalBuilder; + struct ProposalT; + + struct Interp; ++struct InterpBuilder; + struct InterpT; + + struct Resize; ++struct ResizeBuilder; + struct ResizeT; + + struct PriorBox; ++struct PriorBoxBuilder; + struct PriorBoxT; + + struct Normalize; ++struct NormalizeBuilder; + struct NormalizeT; + + struct EltwiseInt8; ++struct EltwiseInt8Builder; + struct EltwiseInt8T; + + inline const flatbuffers::TypeTable *Convolution2DCommonTypeTable(); +@@ -175,7 +209,7 @@ inline const flatbuffers::TypeTable *NormalizeTypeTable(); + + inline const flatbuffers::TypeTable *EltwiseInt8TypeTable(); + +-enum PadMode { ++enum PadMode : int8_t { + PadMode_CAFFE = 0, + PadMode_VALID = 1, + PadMode_SAME = 2, +@@ -193,7 +227,7 @@ inline const PadMode (&EnumValuesPadMode())[3] { + } + + inline const char * const *EnumNamesPadMode() { +- static const char * const names[] = { ++ static const char * const names[4] = { + "CAFFE", + "VALID", + "SAME", +@@ -203,12 +237,12 @@ inline const char * const *EnumNamesPadMode() { + } + + inline const char *EnumNamePadMode(PadMode e) { +- if (e < PadMode_CAFFE || e > PadMode_SAME) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, PadMode_CAFFE, PadMode_SAME)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesPadMode()[index]; + } + +-enum QuantizeAlgo { ++enum QuantizeAlgo : int8_t { + QuantizeAlgo_DEFAULT = 0, + QuantizeAlgo_OVERFLOW_AWARE = 1, + QuantizeAlgo_MIN = QuantizeAlgo_DEFAULT, +@@ -224,7 +258,7 @@ inline const QuantizeAlgo (&EnumValuesQuantizeAlgo())[2] { + } + + inline const char * const *EnumNamesQuantizeAlgo() { +- static const char * const names[] = { ++ static const char * const names[3] = { + "DEFAULT", + "OVERFLOW_AWARE", + nullptr +@@ -233,12 +267,12 @@ inline const char * const *EnumNamesQuantizeAlgo() { + } + + inline const char *EnumNameQuantizeAlgo(QuantizeAlgo e) { +- if (e < QuantizeAlgo_DEFAULT || e > QuantizeAlgo_OVERFLOW_AWARE) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, QuantizeAlgo_DEFAULT, QuantizeAlgo_OVERFLOW_AWARE)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesQuantizeAlgo()[index]; + } + +-enum PoolType { ++enum PoolType : int8_t { + PoolType_MAXPOOL = 0, + PoolType_AVEPOOL = 1, + PoolType_MIN = PoolType_MAXPOOL, +@@ -254,7 +288,7 @@ inline const PoolType (&EnumValuesPoolType())[2] { + } + + inline const char * const *EnumNamesPoolType() { +- static const char * const names[] = { ++ static const char * const names[3] = { + "MAXPOOL", + "AVEPOOL", + nullptr +@@ -263,12 +297,12 @@ inline const char * const *EnumNamesPoolType() { + } + + inline const char *EnumNamePoolType(PoolType e) { +- if (e < PoolType_MAXPOOL || e > PoolType_AVEPOOL) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, PoolType_MAXPOOL, PoolType_AVEPOOL)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesPoolType()[index]; + } + +-enum PoolPadType { ++enum PoolPadType : int8_t { + PoolPadType_CAFFE = 0, + PoolPadType_VALID = 1, + PoolPadType_SAME = 2, +@@ -286,7 +320,7 @@ inline const PoolPadType (&EnumValuesPoolPadType())[3] { + } + + inline const char * const *EnumNamesPoolPadType() { +- static const char * const names[] = { ++ static const char * const names[4] = { + "CAFFE", + "VALID", + "SAME", +@@ -296,12 +330,12 @@ inline const char * const *EnumNamesPoolPadType() { + } + + inline const char *EnumNamePoolPadType(PoolPadType e) { +- if (e < PoolPadType_CAFFE || e > PoolPadType_SAME) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, PoolPadType_CAFFE, PoolPadType_SAME)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesPoolPadType()[index]; + } + +-enum AvgPoolCountType { ++enum AvgPoolCountType : int8_t { + AvgPoolCountType_DEFAULT = 0, + AvgPoolCountType_INCLUDE_PADDING = 1, + AvgPoolCountType_EXCLUDE_PADDING = 2, +@@ -319,7 +353,7 @@ inline const AvgPoolCountType (&EnumValuesAvgPoolCountType())[3] { + } + + inline const char * const *EnumNamesAvgPoolCountType() { +- static const char * const names[] = { ++ static const char * const names[4] = { + "DEFAULT", + "INCLUDE_PADDING", + "EXCLUDE_PADDING", +@@ -329,12 +363,12 @@ inline const char * const *EnumNamesAvgPoolCountType() { + } + + inline const char *EnumNameAvgPoolCountType(AvgPoolCountType e) { +- if (e < AvgPoolCountType_DEFAULT || e > AvgPoolCountType_EXCLUDE_PADDING) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, AvgPoolCountType_DEFAULT, AvgPoolCountType_EXCLUDE_PADDING)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesAvgPoolCountType()[index]; + } + +-enum EltwiseType { ++enum EltwiseType : int8_t { + EltwiseType_PROD = 0, + EltwiseType_SUM = 1, + EltwiseType_MAXIMUM = 2, +@@ -354,7 +388,7 @@ inline const EltwiseType (&EnumValuesEltwiseType())[4] { + } + + inline const char * const *EnumNamesEltwiseType() { +- static const char * const names[] = { ++ static const char * const names[5] = { + "PROD", + "SUM", + "MAXIMUM", +@@ -365,12 +399,12 @@ inline const char * const *EnumNamesEltwiseType() { + } + + inline const char *EnumNameEltwiseType(EltwiseType e) { +- if (e < EltwiseType_PROD || e > EltwiseType_SUB) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, EltwiseType_PROD, EltwiseType_SUB)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesEltwiseType()[index]; + } + +-enum CoordinateTransformationMode { ++enum CoordinateTransformationMode : int8_t { + CoordinateTransformationMode_NotSet = 0, + CoordinateTransformationMode_AlignCorners = 1, + CoordinateTransformationMode_HalfPixels = 2, +@@ -396,7 +430,7 @@ inline const CoordinateTransformationMode (&EnumValuesCoordinateTransformationMo + } + + inline const char * const *EnumNamesCoordinateTransformationMode() { +- static const char * const names[] = { ++ static const char * const names[8] = { + "NotSet", + "AlignCorners", + "HalfPixels", +@@ -410,49 +444,34 @@ inline const char * const *EnumNamesCoordinateTransformationMode() { + } + + inline const char *EnumNameCoordinateTransformationMode(CoordinateTransformationMode e) { +- if (e < CoordinateTransformationMode_NotSet || e > CoordinateTransformationMode_TensorflowCropAndResize) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, CoordinateTransformationMode_NotSet, CoordinateTransformationMode_TensorflowCropAndResize)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesCoordinateTransformationMode()[index]; + } + + struct Convolution2DCommonT : public flatbuffers::NativeTable { + typedef Convolution2DCommon TableType; +- int32_t padX; +- int32_t padY; +- int32_t kernelX; +- int32_t kernelY; +- int32_t strideX; +- int32_t strideY; +- int32_t dilateX; +- int32_t dilateY; +- PadMode padMode; +- int32_t group; +- int32_t outputCount; +- int32_t inputCount; +- bool relu; +- bool relu6; +- std::vector pads; +- std::vector outPads; +- Convolution2DCommonT() +- : padX(0), +- padY(0), +- kernelX(1), +- kernelY(1), +- strideX(1), +- strideY(1), +- dilateX(1), +- dilateY(1), +- padMode(PadMode_CAFFE), +- group(1), +- outputCount(0), +- inputCount(0), +- relu(false), +- relu6(false) { +- } ++ int32_t padX = 0; ++ int32_t padY = 0; ++ int32_t kernelX = 1; ++ int32_t kernelY = 1; ++ int32_t strideX = 1; ++ int32_t strideY = 1; ++ int32_t dilateX = 1; ++ int32_t dilateY = 1; ++ MNN::PadMode padMode = MNN::PadMode_CAFFE; ++ int32_t group = 1; ++ int32_t outputCount = 0; ++ int32_t inputCount = 0; ++ bool relu = false; ++ bool relu6 = false; ++ std::vector pads{}; ++ std::vector outPads{}; + }; + + struct Convolution2DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Convolution2DCommonT NativeTableType; ++ typedef Convolution2DCommonBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return Convolution2DCommonTypeTable(); + } +@@ -498,8 +517,8 @@ struct Convolution2DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + int32_t dilateY() const { + return GetField(VT_DILATEY, 1); + } +- PadMode padMode() const { +- return static_cast(GetField(VT_PADMODE, 0)); ++ MNN::PadMode padMode() const { ++ return static_cast(GetField(VT_PADMODE, 0)); + } + int32_t group() const { + return GetField(VT_GROUP, 1); +@@ -550,6 +569,7 @@ struct Convolution2DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct Convolution2DCommonBuilder { ++ typedef Convolution2DCommon Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_padX(int32_t padX) { +@@ -576,7 +596,7 @@ struct Convolution2DCommonBuilder { + void add_dilateY(int32_t dilateY) { + fbb_.AddElement(Convolution2DCommon::VT_DILATEY, dilateY, 1); + } +- void add_padMode(PadMode padMode) { ++ void add_padMode(MNN::PadMode padMode) { + fbb_.AddElement(Convolution2DCommon::VT_PADMODE, static_cast(padMode), 0); + } + void add_group(int32_t group) { +@@ -604,7 +624,6 @@ struct Convolution2DCommonBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Convolution2DCommonBuilder &operator=(const Convolution2DCommonBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -622,7 +641,7 @@ inline flatbuffers::Offset CreateConvolution2DCommon( + int32_t strideY = 1, + int32_t dilateX = 1, + int32_t dilateY = 1, +- PadMode padMode = PadMode_CAFFE, ++ MNN::PadMode padMode = MNN::PadMode_CAFFE, + int32_t group = 1, + int32_t outputCount = 0, + int32_t inputCount = 0, +@@ -660,7 +679,7 @@ inline flatbuffers::Offset CreateConvolution2DCommonDirect( + int32_t strideY = 1, + int32_t dilateX = 1, + int32_t dilateY = 1, +- PadMode padMode = PadMode_CAFFE, ++ MNN::PadMode padMode = MNN::PadMode_CAFFE, + int32_t group = 1, + int32_t outputCount = 0, + int32_t inputCount = 0, +@@ -694,26 +713,20 @@ flatbuffers::Offset CreateConvolution2DCommon(flatbuffers:: + + struct Convolution3DCommonT : public flatbuffers::NativeTable { + typedef Convolution3DCommon TableType; +- std::vector dilates; +- std::vector strides; +- std::vector kernels; +- std::vector pads; +- PadMode padMode; +- int32_t inputCount; +- int32_t outputCount; +- bool relu; +- bool relu6; +- Convolution3DCommonT() +- : padMode(PadMode_CAFFE), +- inputCount(0), +- outputCount(0), +- relu(false), +- relu6(false) { +- } ++ std::vector dilates{}; ++ std::vector strides{}; ++ std::vector kernels{}; ++ std::vector pads{}; ++ MNN::PadMode padMode = MNN::PadMode_CAFFE; ++ int32_t inputCount = 0; ++ int32_t outputCount = 0; ++ bool relu = false; ++ bool relu6 = false; + }; + + struct Convolution3DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Convolution3DCommonT NativeTableType; ++ typedef Convolution3DCommonBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return Convolution3DCommonTypeTable(); + } +@@ -740,8 +753,8 @@ struct Convolution3DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + const flatbuffers::Vector *pads() const { + return GetPointer *>(VT_PADS); + } +- PadMode padMode() const { +- return static_cast(GetField(VT_PADMODE, 0)); ++ MNN::PadMode padMode() const { ++ return static_cast(GetField(VT_PADMODE, 0)); + } + int32_t inputCount() const { + return GetField(VT_INPUTCOUNT, 0); +@@ -778,6 +791,7 @@ struct Convolution3DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct Convolution3DCommonBuilder { ++ typedef Convolution3DCommon Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_dilates(flatbuffers::Offset> dilates) { +@@ -792,7 +806,7 @@ struct Convolution3DCommonBuilder { + void add_pads(flatbuffers::Offset> pads) { + fbb_.AddOffset(Convolution3DCommon::VT_PADS, pads); + } +- void add_padMode(PadMode padMode) { ++ void add_padMode(MNN::PadMode padMode) { + fbb_.AddElement(Convolution3DCommon::VT_PADMODE, static_cast(padMode), 0); + } + void add_inputCount(int32_t inputCount) { +@@ -811,7 +825,6 @@ struct Convolution3DCommonBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Convolution3DCommonBuilder &operator=(const Convolution3DCommonBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -825,7 +838,7 @@ inline flatbuffers::Offset CreateConvolution3DCommon( + flatbuffers::Offset> strides = 0, + flatbuffers::Offset> kernels = 0, + flatbuffers::Offset> pads = 0, +- PadMode padMode = PadMode_CAFFE, ++ MNN::PadMode padMode = MNN::PadMode_CAFFE, + int32_t inputCount = 0, + int32_t outputCount = 0, + bool relu = false, +@@ -849,7 +862,7 @@ inline flatbuffers::Offset CreateConvolution3DCommonDirect( + const std::vector *strides = nullptr, + const std::vector *kernels = nullptr, + const std::vector *pads = nullptr, +- PadMode padMode = PadMode_CAFFE, ++ MNN::PadMode padMode = MNN::PadMode_CAFFE, + int32_t inputCount = 0, + int32_t outputCount = 0, + bool relu = false, +@@ -875,32 +888,22 @@ flatbuffers::Offset CreateConvolution3DCommon(flatbuffers:: + + struct IDSTQuanT : public flatbuffers::NativeTable { + typedef IDSTQuan TableType; +- std::vector buffer; +- std::vector alpha; +- int32_t type; +- bool useInt32; +- float quantScale; +- float scaleIn; +- float scaleOut; +- int32_t aMax; +- int32_t aMin; +- int32_t readType; +- bool has_scaleInt; +- IDSTQuanT() +- : type(0), +- useInt32(false), +- quantScale(0.0f), +- scaleIn(0.0f), +- scaleOut(0.0f), +- aMax(0), +- aMin(0), +- readType(0), +- has_scaleInt(false) { +- } ++ std::vector buffer{}; ++ std::vector alpha{}; ++ int32_t type = 0; ++ bool useInt32 = false; ++ float quantScale = 0.0f; ++ float scaleIn = 0.0f; ++ float scaleOut = 0.0f; ++ int32_t aMax = 0; ++ int32_t aMin = 0; ++ int32_t readType = 0; ++ bool has_scaleInt = false; + }; + + struct IDSTQuan FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef IDSTQuanT NativeTableType; ++ typedef IDSTQuanBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return IDSTQuanTypeTable(); + } +@@ -973,6 +976,7 @@ struct IDSTQuan FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct IDSTQuanBuilder { ++ typedef IDSTQuan Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_buffer(flatbuffers::Offset> buffer) { +@@ -1012,7 +1016,6 @@ struct IDSTQuanBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- IDSTQuanBuilder &operator=(const IDSTQuanBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1082,20 +1085,17 @@ flatbuffers::Offset CreateIDSTQuan(flatbuffers::FlatBufferBuilder &_fb + + struct QuantizedFloatParamT : public flatbuffers::NativeTable { + typedef QuantizedFloatParam TableType; +- std::vector weight; +- std::vector bias; +- std::vector scale; +- std::vector tensorScale; +- QuantizeAlgo method; +- int32_t nbits; +- QuantizedFloatParamT() +- : method(QuantizeAlgo_DEFAULT), +- nbits(8) { +- } ++ std::vector weight{}; ++ std::vector bias{}; ++ std::vector scale{}; ++ std::vector tensorScale{}; ++ MNN::QuantizeAlgo method = MNN::QuantizeAlgo_DEFAULT; ++ int32_t nbits = 8; + }; + + struct QuantizedFloatParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedFloatParamT NativeTableType; ++ typedef QuantizedFloatParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedFloatParamTypeTable(); + } +@@ -1119,8 +1119,8 @@ struct QuantizedFloatParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + const flatbuffers::Vector *tensorScale() const { + return GetPointer *>(VT_TENSORSCALE); + } +- QuantizeAlgo method() const { +- return static_cast(GetField(VT_METHOD, 0)); ++ MNN::QuantizeAlgo method() const { ++ return static_cast(GetField(VT_METHOD, 0)); + } + int32_t nbits() const { + return GetField(VT_NBITS, 8); +@@ -1145,6 +1145,7 @@ struct QuantizedFloatParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct QuantizedFloatParamBuilder { ++ typedef QuantizedFloatParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_weight(flatbuffers::Offset> weight) { +@@ -1159,7 +1160,7 @@ struct QuantizedFloatParamBuilder { + void add_tensorScale(flatbuffers::Offset> tensorScale) { + fbb_.AddOffset(QuantizedFloatParam::VT_TENSORSCALE, tensorScale); + } +- void add_method(QuantizeAlgo method) { ++ void add_method(MNN::QuantizeAlgo method) { + fbb_.AddElement(QuantizedFloatParam::VT_METHOD, static_cast(method), 0); + } + void add_nbits(int32_t nbits) { +@@ -1169,7 +1170,6 @@ struct QuantizedFloatParamBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedFloatParamBuilder &operator=(const QuantizedFloatParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1183,7 +1183,7 @@ inline flatbuffers::Offset CreateQuantizedFloatParam( + flatbuffers::Offset> bias = 0, + flatbuffers::Offset> scale = 0, + flatbuffers::Offset> tensorScale = 0, +- QuantizeAlgo method = QuantizeAlgo_DEFAULT, ++ MNN::QuantizeAlgo method = MNN::QuantizeAlgo_DEFAULT, + int32_t nbits = 8) { + QuantizedFloatParamBuilder builder_(_fbb); + builder_.add_nbits(nbits); +@@ -1201,7 +1201,7 @@ inline flatbuffers::Offset CreateQuantizedFloatParamDirect( + const std::vector *bias = nullptr, + const std::vector *scale = nullptr, + const std::vector *tensorScale = nullptr, +- QuantizeAlgo method = QuantizeAlgo_DEFAULT, ++ MNN::QuantizeAlgo method = MNN::QuantizeAlgo_DEFAULT, + int32_t nbits = 8) { + auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; + auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; +@@ -1221,17 +1221,16 @@ flatbuffers::Offset CreateQuantizedFloatParam(flatbuffers:: + + struct Convolution2DT : public flatbuffers::NativeTable { + typedef Convolution2D TableType; +- std::unique_ptr common; +- std::vector weight; +- std::vector bias; +- std::unique_ptr quanParameter; +- std::unique_ptr symmetricQuan; +- Convolution2DT() { +- } ++ std::unique_ptr common{}; ++ std::vector weight{}; ++ std::vector bias{}; ++ std::unique_ptr quanParameter{}; ++ std::unique_ptr symmetricQuan{}; + }; + + struct Convolution2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Convolution2DT NativeTableType; ++ typedef Convolution2DBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return Convolution2DTypeTable(); + } +@@ -1242,8 +1241,8 @@ struct Convolution2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_QUANPARAMETER = 10, + VT_SYMMETRICQUAN = 12 + }; +- const Convolution2DCommon *common() const { +- return GetPointer(VT_COMMON); ++ const MNN::Convolution2DCommon *common() const { ++ return GetPointer(VT_COMMON); + } + const flatbuffers::Vector *weight() const { + return GetPointer *>(VT_WEIGHT); +@@ -1251,11 +1250,11 @@ struct Convolution2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *bias() const { + return GetPointer *>(VT_BIAS); + } +- const IDSTQuan *quanParameter() const { +- return GetPointer(VT_QUANPARAMETER); ++ const MNN::IDSTQuan *quanParameter() const { ++ return GetPointer(VT_QUANPARAMETER); + } +- const QuantizedFloatParam *symmetricQuan() const { +- return GetPointer(VT_SYMMETRICQUAN); ++ const MNN::QuantizedFloatParam *symmetricQuan() const { ++ return GetPointer(VT_SYMMETRICQUAN); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1277,9 +1276,10 @@ struct Convolution2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Convolution2DBuilder { ++ typedef Convolution2D Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_common(flatbuffers::Offset common) { ++ void add_common(flatbuffers::Offset common) { + fbb_.AddOffset(Convolution2D::VT_COMMON, common); + } + void add_weight(flatbuffers::Offset> weight) { +@@ -1288,17 +1288,16 @@ struct Convolution2DBuilder { + void add_bias(flatbuffers::Offset> bias) { + fbb_.AddOffset(Convolution2D::VT_BIAS, bias); + } +- void add_quanParameter(flatbuffers::Offset quanParameter) { ++ void add_quanParameter(flatbuffers::Offset quanParameter) { + fbb_.AddOffset(Convolution2D::VT_QUANPARAMETER, quanParameter); + } +- void add_symmetricQuan(flatbuffers::Offset symmetricQuan) { ++ void add_symmetricQuan(flatbuffers::Offset symmetricQuan) { + fbb_.AddOffset(Convolution2D::VT_SYMMETRICQUAN, symmetricQuan); + } + explicit Convolution2DBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Convolution2DBuilder &operator=(const Convolution2DBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1308,11 +1307,11 @@ struct Convolution2DBuilder { + + inline flatbuffers::Offset CreateConvolution2D( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset common = 0, ++ flatbuffers::Offset common = 0, + flatbuffers::Offset> weight = 0, + flatbuffers::Offset> bias = 0, +- flatbuffers::Offset quanParameter = 0, +- flatbuffers::Offset symmetricQuan = 0) { ++ flatbuffers::Offset quanParameter = 0, ++ flatbuffers::Offset symmetricQuan = 0) { + Convolution2DBuilder builder_(_fbb); + builder_.add_symmetricQuan(symmetricQuan); + builder_.add_quanParameter(quanParameter); +@@ -1324,11 +1323,11 @@ inline flatbuffers::Offset CreateConvolution2D( + + inline flatbuffers::Offset CreateConvolution2DDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset common = 0, ++ flatbuffers::Offset common = 0, + const std::vector *weight = nullptr, + const std::vector *bias = nullptr, +- flatbuffers::Offset quanParameter = 0, +- flatbuffers::Offset symmetricQuan = 0) { ++ flatbuffers::Offset quanParameter = 0, ++ flatbuffers::Offset symmetricQuan = 0) { + auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; + auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; + return MNN::CreateConvolution2D( +@@ -1344,15 +1343,14 @@ flatbuffers::Offset CreateConvolution2D(flatbuffers::FlatBufferBu + + struct Convolution3DT : public flatbuffers::NativeTable { + typedef Convolution3D TableType; +- std::unique_ptr common; +- std::vector weight; +- std::vector bias; +- Convolution3DT() { +- } ++ std::unique_ptr common{}; ++ std::vector weight{}; ++ std::vector bias{}; + }; + + struct Convolution3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Convolution3DT NativeTableType; ++ typedef Convolution3DBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return Convolution3DTypeTable(); + } +@@ -1361,8 +1359,8 @@ struct Convolution3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_WEIGHT = 6, + VT_BIAS = 8 + }; +- const Convolution3DCommon *common() const { +- return GetPointer(VT_COMMON); ++ const MNN::Convolution3DCommon *common() const { ++ return GetPointer(VT_COMMON); + } + const flatbuffers::Vector *weight() const { + return GetPointer *>(VT_WEIGHT); +@@ -1386,9 +1384,10 @@ struct Convolution3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Convolution3DBuilder { ++ typedef Convolution3D Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_common(flatbuffers::Offset common) { ++ void add_common(flatbuffers::Offset common) { + fbb_.AddOffset(Convolution3D::VT_COMMON, common); + } + void add_weight(flatbuffers::Offset> weight) { +@@ -1401,7 +1400,6 @@ struct Convolution3DBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Convolution3DBuilder &operator=(const Convolution3DBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1411,7 +1409,7 @@ struct Convolution3DBuilder { + + inline flatbuffers::Offset CreateConvolution3D( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset common = 0, ++ flatbuffers::Offset common = 0, + flatbuffers::Offset> weight = 0, + flatbuffers::Offset> bias = 0) { + Convolution3DBuilder builder_(_fbb); +@@ -1423,7 +1421,7 @@ inline flatbuffers::Offset CreateConvolution3D( + + inline flatbuffers::Offset CreateConvolution3DDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset common = 0, ++ flatbuffers::Offset common = 0, + const std::vector *weight = nullptr, + const std::vector *bias = nullptr) { + auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; +@@ -1439,25 +1437,19 @@ flatbuffers::Offset CreateConvolution3D(flatbuffers::FlatBufferBu + + struct InnerProductT : public flatbuffers::NativeTable { + typedef InnerProduct TableType; +- int32_t outputCount; +- int32_t biasTerm; +- int32_t weightSize; +- std::vector weight; +- std::vector bias; +- int32_t axis; +- bool transpose; +- std::unique_ptr quanParameter; +- InnerProductT() +- : outputCount(0), +- biasTerm(0), +- weightSize(0), +- axis(0), +- transpose(false) { +- } ++ int32_t outputCount = 0; ++ int32_t biasTerm = 0; ++ int32_t weightSize = 0; ++ std::vector weight{}; ++ std::vector bias{}; ++ int32_t axis = 0; ++ bool transpose = false; ++ std::unique_ptr quanParameter{}; + }; + + struct InnerProduct FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef InnerProductT NativeTableType; ++ typedef InnerProductBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return InnerProductTypeTable(); + } +@@ -1492,8 +1484,8 @@ struct InnerProduct FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + bool transpose() const { + return GetField(VT_TRANSPOSE, 0) != 0; + } +- const IDSTQuan *quanParameter() const { +- return GetPointer(VT_QUANPARAMETER); ++ const MNN::IDSTQuan *quanParameter() const { ++ return GetPointer(VT_QUANPARAMETER); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1516,6 +1508,7 @@ struct InnerProduct FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct InnerProductBuilder { ++ typedef InnerProduct Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_outputCount(int32_t outputCount) { +@@ -1539,14 +1532,13 @@ struct InnerProductBuilder { + void add_transpose(bool transpose) { + fbb_.AddElement(InnerProduct::VT_TRANSPOSE, static_cast(transpose), 0); + } +- void add_quanParameter(flatbuffers::Offset quanParameter) { ++ void add_quanParameter(flatbuffers::Offset quanParameter) { + fbb_.AddOffset(InnerProduct::VT_QUANPARAMETER, quanParameter); + } + explicit InnerProductBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- InnerProductBuilder &operator=(const InnerProductBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1563,7 +1555,7 @@ inline flatbuffers::Offset CreateInnerProduct( + flatbuffers::Offset> bias = 0, + int32_t axis = 0, + bool transpose = false, +- flatbuffers::Offset quanParameter = 0) { ++ flatbuffers::Offset quanParameter = 0) { + InnerProductBuilder builder_(_fbb); + builder_.add_quanParameter(quanParameter); + builder_.add_axis(axis); +@@ -1585,7 +1577,7 @@ inline flatbuffers::Offset CreateInnerProductDirect( + const std::vector *bias = nullptr, + int32_t axis = 0, + bool transpose = false, +- flatbuffers::Offset quanParameter = 0) { ++ flatbuffers::Offset quanParameter = 0) { + auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; + auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; + return MNN::CreateInnerProduct( +@@ -1604,37 +1596,24 @@ flatbuffers::Offset CreateInnerProduct(flatbuffers::FlatBufferBuil + + struct PoolT : public flatbuffers::NativeTable { + typedef Pool TableType; +- int32_t padX; +- int32_t padY; +- bool isGlobal; +- int32_t kernelX; +- int32_t kernelY; +- int32_t strideX; +- int32_t strideY; +- PoolType type; +- PoolPadType padType; +- DataType dataType; +- bool ceilModel; +- std::vector pads; +- AvgPoolCountType countType; +- PoolT() +- : padX(0), +- padY(0), +- isGlobal(false), +- kernelX(0), +- kernelY(0), +- strideX(0), +- strideY(0), +- type(PoolType_MAXPOOL), +- padType(PoolPadType_CAFFE), +- dataType(DataType_DT_FLOAT), +- ceilModel(true), +- countType(AvgPoolCountType_DEFAULT) { +- } ++ int32_t padX = 0; ++ int32_t padY = 0; ++ bool isGlobal = false; ++ int32_t kernelX = 0; ++ int32_t kernelY = 0; ++ int32_t strideX = 0; ++ int32_t strideY = 0; ++ MNN::PoolType type = MNN::PoolType_MAXPOOL; ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE; ++ MNN::DataType dataType = MNN::DataType_DT_FLOAT; ++ bool ceilModel = true; ++ std::vector pads{}; ++ MNN::AvgPoolCountType countType = MNN::AvgPoolCountType_DEFAULT; + }; + + struct Pool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PoolT NativeTableType; ++ typedef PoolBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return PoolTypeTable(); + } +@@ -1674,14 +1653,14 @@ struct Pool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t strideY() const { + return GetField(VT_STRIDEY, 0); + } +- PoolType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::PoolType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } +- PoolPadType padType() const { +- return static_cast(GetField(VT_PADTYPE, 0)); ++ MNN::PoolPadType padType() const { ++ return static_cast(GetField(VT_PADTYPE, 0)); + } +- DataType dataType() const { +- return static_cast(GetField(VT_DATATYPE, 1)); ++ MNN::DataType dataType() const { ++ return static_cast(GetField(VT_DATATYPE, 1)); + } + bool ceilModel() const { + return GetField(VT_CEILMODEL, 1) != 0; +@@ -1689,8 +1668,8 @@ struct Pool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *pads() const { + return GetPointer *>(VT_PADS); + } +- AvgPoolCountType countType() const { +- return static_cast(GetField(VT_COUNTTYPE, 0)); ++ MNN::AvgPoolCountType countType() const { ++ return static_cast(GetField(VT_COUNTTYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1716,6 +1695,7 @@ struct Pool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PoolBuilder { ++ typedef Pool Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_padX(int32_t padX) { +@@ -1739,13 +1719,13 @@ struct PoolBuilder { + void add_strideY(int32_t strideY) { + fbb_.AddElement(Pool::VT_STRIDEY, strideY, 0); + } +- void add_type(PoolType type) { ++ void add_type(MNN::PoolType type) { + fbb_.AddElement(Pool::VT_TYPE, static_cast(type), 0); + } +- void add_padType(PoolPadType padType) { ++ void add_padType(MNN::PoolPadType padType) { + fbb_.AddElement(Pool::VT_PADTYPE, static_cast(padType), 0); + } +- void add_dataType(DataType dataType) { ++ void add_dataType(MNN::DataType dataType) { + fbb_.AddElement(Pool::VT_DATATYPE, static_cast(dataType), 1); + } + void add_ceilModel(bool ceilModel) { +@@ -1754,14 +1734,13 @@ struct PoolBuilder { + void add_pads(flatbuffers::Offset> pads) { + fbb_.AddOffset(Pool::VT_PADS, pads); + } +- void add_countType(AvgPoolCountType countType) { ++ void add_countType(MNN::AvgPoolCountType countType) { + fbb_.AddElement(Pool::VT_COUNTTYPE, static_cast(countType), 0); + } + explicit PoolBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PoolBuilder &operator=(const PoolBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1778,12 +1757,12 @@ inline flatbuffers::Offset CreatePool( + int32_t kernelY = 0, + int32_t strideX = 0, + int32_t strideY = 0, +- PoolType type = PoolType_MAXPOOL, +- PoolPadType padType = PoolPadType_CAFFE, +- DataType dataType = DataType_DT_FLOAT, ++ MNN::PoolType type = MNN::PoolType_MAXPOOL, ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE, ++ MNN::DataType dataType = MNN::DataType_DT_FLOAT, + bool ceilModel = true, + flatbuffers::Offset> pads = 0, +- AvgPoolCountType countType = AvgPoolCountType_DEFAULT) { ++ MNN::AvgPoolCountType countType = MNN::AvgPoolCountType_DEFAULT) { + PoolBuilder builder_(_fbb); + builder_.add_pads(pads); + builder_.add_dataType(dataType); +@@ -1810,12 +1789,12 @@ inline flatbuffers::Offset CreatePoolDirect( + int32_t kernelY = 0, + int32_t strideX = 0, + int32_t strideY = 0, +- PoolType type = PoolType_MAXPOOL, +- PoolPadType padType = PoolPadType_CAFFE, +- DataType dataType = DataType_DT_FLOAT, ++ MNN::PoolType type = MNN::PoolType_MAXPOOL, ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE, ++ MNN::DataType dataType = MNN::DataType_DT_FLOAT, + bool ceilModel = true, + const std::vector *pads = nullptr, +- AvgPoolCountType countType = AvgPoolCountType_DEFAULT) { ++ MNN::AvgPoolCountType countType = MNN::AvgPoolCountType_DEFAULT) { + auto pads__ = pads ? _fbb.CreateVector(*pads) : 0; + return MNN::CreatePool( + _fbb, +@@ -1838,19 +1817,16 @@ flatbuffers::Offset CreatePool(flatbuffers::FlatBufferBuilder &_fbb, const + + struct Pool3DT : public flatbuffers::NativeTable { + typedef Pool3D TableType; +- std::vector strides; +- std::vector kernels; +- std::vector pads; +- PoolType type; +- PoolPadType padType; +- Pool3DT() +- : type(PoolType_MAXPOOL), +- padType(PoolPadType_CAFFE) { +- } ++ std::vector strides{}; ++ std::vector kernels{}; ++ std::vector pads{}; ++ MNN::PoolType type = MNN::PoolType_MAXPOOL; ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE; + }; + + struct Pool3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Pool3DT NativeTableType; ++ typedef Pool3DBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return Pool3DTypeTable(); + } +@@ -1870,11 +1846,11 @@ struct Pool3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *pads() const { + return GetPointer *>(VT_PADS); + } +- PoolType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::PoolType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } +- PoolPadType padType() const { +- return static_cast(GetField(VT_PADTYPE, 0)); ++ MNN::PoolPadType padType() const { ++ return static_cast(GetField(VT_PADTYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1894,6 +1870,7 @@ struct Pool3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Pool3DBuilder { ++ typedef Pool3D Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_strides(flatbuffers::Offset> strides) { +@@ -1905,17 +1882,16 @@ struct Pool3DBuilder { + void add_pads(flatbuffers::Offset> pads) { + fbb_.AddOffset(Pool3D::VT_PADS, pads); + } +- void add_type(PoolType type) { ++ void add_type(MNN::PoolType type) { + fbb_.AddElement(Pool3D::VT_TYPE, static_cast(type), 0); + } +- void add_padType(PoolPadType padType) { ++ void add_padType(MNN::PoolPadType padType) { + fbb_.AddElement(Pool3D::VT_PADTYPE, static_cast(padType), 0); + } + explicit Pool3DBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Pool3DBuilder &operator=(const Pool3DBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1928,8 +1904,8 @@ inline flatbuffers::Offset CreatePool3D( + flatbuffers::Offset> strides = 0, + flatbuffers::Offset> kernels = 0, + flatbuffers::Offset> pads = 0, +- PoolType type = PoolType_MAXPOOL, +- PoolPadType padType = PoolPadType_CAFFE) { ++ MNN::PoolType type = MNN::PoolType_MAXPOOL, ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE) { + Pool3DBuilder builder_(_fbb); + builder_.add_pads(pads); + builder_.add_kernels(kernels); +@@ -1944,8 +1920,8 @@ inline flatbuffers::Offset CreatePool3DDirect( + const std::vector *strides = nullptr, + const std::vector *kernels = nullptr, + const std::vector *pads = nullptr, +- PoolType type = PoolType_MAXPOOL, +- PoolPadType padType = PoolPadType_CAFFE) { ++ MNN::PoolType type = MNN::PoolType_MAXPOOL, ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE) { + auto strides__ = strides ? _fbb.CreateVector(*strides) : 0; + auto kernels__ = kernels ? _fbb.CreateVector(*kernels) : 0; + auto pads__ = pads ? _fbb.CreateVector(*pads) : 0; +@@ -1962,14 +1938,12 @@ flatbuffers::Offset CreatePool3D(flatbuffers::FlatBufferBuilder &_fbb, c + + struct ReluT : public flatbuffers::NativeTable { + typedef Relu TableType; +- float slope; +- ReluT() +- : slope(0.0f) { +- } ++ float slope = 0.0f; + }; + + struct Relu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReluT NativeTableType; ++ typedef ReluBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ReluTypeTable(); + } +@@ -1990,6 +1964,7 @@ struct Relu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ReluBuilder { ++ typedef Relu Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_slope(float slope) { +@@ -1999,7 +1974,6 @@ struct ReluBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReluBuilder &operator=(const ReluBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2019,16 +1993,13 @@ flatbuffers::Offset CreateRelu(flatbuffers::FlatBufferBuilder &_fbb, const + + struct Relu6T : public flatbuffers::NativeTable { + typedef Relu6 TableType; +- float minValue; +- float maxValue; +- Relu6T() +- : minValue(0.0f), +- maxValue(6.0f) { +- } ++ float minValue = 0.0f; ++ float maxValue = 6.0f; + }; + + struct Relu6 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Relu6T NativeTableType; ++ typedef Relu6Builder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return Relu6TypeTable(); + } +@@ -2054,6 +2025,7 @@ struct Relu6 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Relu6Builder { ++ typedef Relu6 Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_minValue(float minValue) { +@@ -2066,7 +2038,6 @@ struct Relu6Builder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Relu6Builder &operator=(const Relu6Builder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2088,15 +2059,13 @@ flatbuffers::Offset CreateRelu6(flatbuffers::FlatBufferBuilder &_fbb, con + + struct PReluT : public flatbuffers::NativeTable { + typedef PRelu TableType; +- int32_t slopeCount; +- std::vector slope; +- PReluT() +- : slopeCount(0) { +- } ++ int32_t slopeCount = 0; ++ std::vector slope{}; + }; + + struct PRelu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PReluT NativeTableType; ++ typedef PReluBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return PReluTypeTable(); + } +@@ -2123,6 +2092,7 @@ struct PRelu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PReluBuilder { ++ typedef PRelu Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_slopeCount(int32_t slopeCount) { +@@ -2135,7 +2105,6 @@ struct PReluBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PReluBuilder &operator=(const PReluBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2168,14 +2137,12 @@ flatbuffers::Offset CreatePRelu(flatbuffers::FlatBufferBuilder &_fbb, con + + struct ELUT : public flatbuffers::NativeTable { + typedef ELU TableType; +- float alpha; +- ELUT() +- : alpha(0.0f) { +- } ++ float alpha = 0.0f; + }; + + struct ELU FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ELUT NativeTableType; ++ typedef ELUBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ELUTypeTable(); + } +@@ -2196,6 +2163,7 @@ struct ELU FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ELUBuilder { ++ typedef ELU Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_alpha(float alpha) { +@@ -2205,7 +2173,6 @@ struct ELUBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ELUBuilder &operator=(const ELUBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2225,20 +2192,15 @@ flatbuffers::Offset CreateELU(flatbuffers::FlatBufferBuilder &_fbb, const E + + struct LRNT : public flatbuffers::NativeTable { + typedef LRN TableType; +- int32_t regionType; +- int32_t localSize; +- float alpha; +- float beta; +- LRNT() +- : regionType(0), +- localSize(0), +- alpha(0.0f), +- beta(0.0f) { +- } ++ int32_t regionType = 0; ++ int32_t localSize = 0; ++ float alpha = 0.0f; ++ float beta = 0.0f; + }; + + struct LRN FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LRNT NativeTableType; ++ typedef LRNBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return LRNTypeTable(); + } +@@ -2274,6 +2236,7 @@ struct LRN FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LRNBuilder { ++ typedef LRN Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_regionType(int32_t regionType) { +@@ -2292,7 +2255,6 @@ struct LRNBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LRNBuilder &operator=(const LRNBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2318,20 +2280,15 @@ flatbuffers::Offset CreateLRN(flatbuffers::FlatBufferBuilder &_fbb, const L + + struct ArgMaxT : public flatbuffers::NativeTable { + typedef ArgMax TableType; +- int32_t outMaxVal; +- int32_t topK; +- int32_t axis; +- int32_t softmaxThreshold; +- ArgMaxT() +- : outMaxVal(0), +- topK(0), +- axis(0), +- softmaxThreshold(0) { +- } ++ int32_t outMaxVal = 0; ++ int32_t topK = 0; ++ int32_t axis = 0; ++ int32_t softmaxThreshold = 0; + }; + + struct ArgMax FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ArgMaxT NativeTableType; ++ typedef ArgMaxBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ArgMaxTypeTable(); + } +@@ -2367,6 +2324,7 @@ struct ArgMax FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ArgMaxBuilder { ++ typedef ArgMax Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_outMaxVal(int32_t outMaxVal) { +@@ -2385,7 +2343,6 @@ struct ArgMaxBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ArgMaxBuilder &operator=(const ArgMaxBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2411,14 +2368,12 @@ flatbuffers::Offset CreateArgMax(flatbuffers::FlatBufferBuilder &_fbb, c + + struct AxisT : public flatbuffers::NativeTable { + typedef Axis TableType; +- int32_t axis; +- AxisT() +- : axis(0) { +- } ++ int32_t axis = 0; + }; + + struct Axis FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AxisT NativeTableType; ++ typedef AxisBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return AxisTypeTable(); + } +@@ -2439,6 +2394,7 @@ struct Axis FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct AxisBuilder { ++ typedef Axis Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_axis(int32_t axis) { +@@ -2448,7 +2404,6 @@ struct AxisBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- AxisBuilder &operator=(const AxisBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2468,17 +2423,14 @@ flatbuffers::Offset CreateAxis(flatbuffers::FlatBufferBuilder &_fbb, const + + struct InputT : public flatbuffers::NativeTable { + typedef Input TableType; +- std::vector dims; +- DataType dtype; +- MNN_DATA_FORMAT dformat; +- InputT() +- : dtype(DataType_DT_FLOAT), +- dformat(MNN_DATA_FORMAT_NC4HW4) { +- } ++ std::vector dims{}; ++ MNN::DataType dtype = MNN::DataType_DT_FLOAT; ++ MNN::MNN_DATA_FORMAT dformat = MNN::MNN_DATA_FORMAT_NC4HW4; + }; + + struct Input FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef InputT NativeTableType; ++ typedef InputBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return InputTypeTable(); + } +@@ -2490,11 +2442,11 @@ struct Input FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *dims() const { + return GetPointer *>(VT_DIMS); + } +- DataType dtype() const { +- return static_cast(GetField(VT_DTYPE, 1)); ++ MNN::DataType dtype() const { ++ return static_cast(GetField(VT_DTYPE, 1)); + } +- MNN_DATA_FORMAT dformat() const { +- return static_cast(GetField(VT_DFORMAT, 2)); ++ MNN::MNN_DATA_FORMAT dformat() const { ++ return static_cast(GetField(VT_DFORMAT, 2)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2510,22 +2462,22 @@ struct Input FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct InputBuilder { ++ typedef Input Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_dims(flatbuffers::Offset> dims) { + fbb_.AddOffset(Input::VT_DIMS, dims); + } +- void add_dtype(DataType dtype) { ++ void add_dtype(MNN::DataType dtype) { + fbb_.AddElement(Input::VT_DTYPE, static_cast(dtype), 1); + } +- void add_dformat(MNN_DATA_FORMAT dformat) { ++ void add_dformat(MNN::MNN_DATA_FORMAT dformat) { + fbb_.AddElement(Input::VT_DFORMAT, static_cast(dformat), 2); + } + explicit InputBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- InputBuilder &operator=(const InputBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2536,8 +2488,8 @@ struct InputBuilder { + inline flatbuffers::Offset CreateInput( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> dims = 0, +- DataType dtype = DataType_DT_FLOAT, +- MNN_DATA_FORMAT dformat = MNN_DATA_FORMAT_NC4HW4) { ++ MNN::DataType dtype = MNN::DataType_DT_FLOAT, ++ MNN::MNN_DATA_FORMAT dformat = MNN::MNN_DATA_FORMAT_NC4HW4) { + InputBuilder builder_(_fbb); + builder_.add_dtype(dtype); + builder_.add_dims(dims); +@@ -2548,8 +2500,8 @@ inline flatbuffers::Offset CreateInput( + inline flatbuffers::Offset CreateInputDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *dims = nullptr, +- DataType dtype = DataType_DT_FLOAT, +- MNN_DATA_FORMAT dformat = MNN_DATA_FORMAT_NC4HW4) { ++ MNN::DataType dtype = MNN::DataType_DT_FLOAT, ++ MNN::MNN_DATA_FORMAT dformat = MNN::MNN_DATA_FORMAT_NC4HW4) { + auto dims__ = dims ? _fbb.CreateVector(*dims) : 0; + return MNN::CreateInput( + _fbb, +@@ -2562,25 +2514,20 @@ flatbuffers::Offset CreateInput(flatbuffers::FlatBufferBuilder &_fbb, con + + struct LSTMT : public flatbuffers::NativeTable { + typedef LSTM TableType; +- int32_t outputCount; +- int32_t weightSize; +- float clippingThreshold; +- std::unique_ptr weightI; +- std::unique_ptr weightH; +- std::unique_ptr bias; +- std::unique_ptr weightIQ; +- std::unique_ptr weightIA; +- float quantScale; +- LSTMT() +- : outputCount(0), +- weightSize(0), +- clippingThreshold(0.0f), +- quantScale(0.0f) { +- } ++ int32_t outputCount = 0; ++ int32_t weightSize = 0; ++ float clippingThreshold = 0.0f; ++ std::unique_ptr weightI{}; ++ std::unique_ptr weightH{}; ++ std::unique_ptr bias{}; ++ std::unique_ptr weightIQ{}; ++ std::unique_ptr weightIA{}; ++ float quantScale = 0.0f; + }; + + struct LSTM FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LSTMT NativeTableType; ++ typedef LSTMBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return LSTMTypeTable(); + } +@@ -2604,20 +2551,20 @@ struct LSTM FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + float clippingThreshold() const { + return GetField(VT_CLIPPINGTHRESHOLD, 0.0f); + } +- const Blob *weightI() const { +- return GetPointer(VT_WEIGHTI); ++ const MNN::Blob *weightI() const { ++ return GetPointer(VT_WEIGHTI); + } +- const Blob *weightH() const { +- return GetPointer(VT_WEIGHTH); ++ const MNN::Blob *weightH() const { ++ return GetPointer(VT_WEIGHTH); + } +- const Blob *bias() const { +- return GetPointer(VT_BIAS); ++ const MNN::Blob *bias() const { ++ return GetPointer(VT_BIAS); + } +- const Blob *weightIQ() const { +- return GetPointer(VT_WEIGHTIQ); ++ const MNN::Blob *weightIQ() const { ++ return GetPointer(VT_WEIGHTIQ); + } +- const Blob *weightIA() const { +- return GetPointer(VT_WEIGHTIA); ++ const MNN::Blob *weightIA() const { ++ return GetPointer(VT_WEIGHTIA); + } + float quantScale() const { + return GetField(VT_QUANTSCALE, 0.0f); +@@ -2646,6 +2593,7 @@ struct LSTM FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LSTMBuilder { ++ typedef LSTM Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_outputCount(int32_t outputCount) { +@@ -2657,19 +2605,19 @@ struct LSTMBuilder { + void add_clippingThreshold(float clippingThreshold) { + fbb_.AddElement(LSTM::VT_CLIPPINGTHRESHOLD, clippingThreshold, 0.0f); + } +- void add_weightI(flatbuffers::Offset weightI) { ++ void add_weightI(flatbuffers::Offset weightI) { + fbb_.AddOffset(LSTM::VT_WEIGHTI, weightI); + } +- void add_weightH(flatbuffers::Offset weightH) { ++ void add_weightH(flatbuffers::Offset weightH) { + fbb_.AddOffset(LSTM::VT_WEIGHTH, weightH); + } +- void add_bias(flatbuffers::Offset bias) { ++ void add_bias(flatbuffers::Offset bias) { + fbb_.AddOffset(LSTM::VT_BIAS, bias); + } +- void add_weightIQ(flatbuffers::Offset weightIQ) { ++ void add_weightIQ(flatbuffers::Offset weightIQ) { + fbb_.AddOffset(LSTM::VT_WEIGHTIQ, weightIQ); + } +- void add_weightIA(flatbuffers::Offset weightIA) { ++ void add_weightIA(flatbuffers::Offset weightIA) { + fbb_.AddOffset(LSTM::VT_WEIGHTIA, weightIA); + } + void add_quantScale(float quantScale) { +@@ -2679,7 +2627,6 @@ struct LSTMBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LSTMBuilder &operator=(const LSTMBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2692,11 +2639,11 @@ inline flatbuffers::Offset CreateLSTM( + int32_t outputCount = 0, + int32_t weightSize = 0, + float clippingThreshold = 0.0f, +- flatbuffers::Offset weightI = 0, +- flatbuffers::Offset weightH = 0, +- flatbuffers::Offset bias = 0, +- flatbuffers::Offset weightIQ = 0, +- flatbuffers::Offset weightIA = 0, ++ flatbuffers::Offset weightI = 0, ++ flatbuffers::Offset weightH = 0, ++ flatbuffers::Offset bias = 0, ++ flatbuffers::Offset weightIQ = 0, ++ flatbuffers::Offset weightIA = 0, + float quantScale = 0.0f) { + LSTMBuilder builder_(_fbb); + builder_.add_quantScale(quantScale); +@@ -2715,17 +2662,14 @@ flatbuffers::Offset CreateLSTM(flatbuffers::FlatBufferBuilder &_fbb, const + + struct SliceT : public flatbuffers::NativeTable { + typedef Slice TableType; +- int32_t axis; +- std::vector slicePoints; +- NetSource sourceType; +- SliceT() +- : axis(0), +- sourceType(NetSource_CAFFE) { +- } ++ int32_t axis = 0; ++ std::vector slicePoints{}; ++ MNN::NetSource sourceType = MNN::NetSource_CAFFE; + }; + + struct Slice FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SliceT NativeTableType; ++ typedef SliceBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return SliceTypeTable(); + } +@@ -2740,8 +2684,8 @@ struct Slice FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *slicePoints() const { + return GetPointer *>(VT_SLICEPOINTS); + } +- NetSource sourceType() const { +- return static_cast(GetField(VT_SOURCETYPE, 0)); ++ MNN::NetSource sourceType() const { ++ return static_cast(GetField(VT_SOURCETYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2757,6 +2701,7 @@ struct Slice FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SliceBuilder { ++ typedef Slice Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_axis(int32_t axis) { +@@ -2765,14 +2710,13 @@ struct SliceBuilder { + void add_slicePoints(flatbuffers::Offset> slicePoints) { + fbb_.AddOffset(Slice::VT_SLICEPOINTS, slicePoints); + } +- void add_sourceType(NetSource sourceType) { ++ void add_sourceType(MNN::NetSource sourceType) { + fbb_.AddElement(Slice::VT_SOURCETYPE, static_cast(sourceType), 0); + } + explicit SliceBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SliceBuilder &operator=(const SliceBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2784,7 +2728,7 @@ inline flatbuffers::Offset CreateSlice( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t axis = 0, + flatbuffers::Offset> slicePoints = 0, +- NetSource sourceType = NetSource_CAFFE) { ++ MNN::NetSource sourceType = MNN::NetSource_CAFFE) { + SliceBuilder builder_(_fbb); + builder_.add_slicePoints(slicePoints); + builder_.add_axis(axis); +@@ -2796,7 +2740,7 @@ inline flatbuffers::Offset CreateSliceDirect( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t axis = 0, + const std::vector *slicePoints = nullptr, +- NetSource sourceType = NetSource_CAFFE) { ++ MNN::NetSource sourceType = MNN::NetSource_CAFFE) { + auto slicePoints__ = slicePoints ? _fbb.CreateVector(*slicePoints) : 0; + return MNN::CreateSlice( + _fbb, +@@ -2809,22 +2753,19 @@ flatbuffers::Offset CreateSlice(flatbuffers::FlatBufferBuilder &_fbb, con + + struct BatchNormT : public flatbuffers::NativeTable { + typedef BatchNorm TableType; +- int32_t channels; +- std::vector slopeData; +- std::vector meanData; +- std::vector varData; +- std::vector biasData; +- std::vector Adata; +- std::vector Bdata; +- float epsilon; +- BatchNormT() +- : channels(0), +- epsilon(0.001f) { +- } ++ int32_t channels = 0; ++ std::vector slopeData{}; ++ std::vector meanData{}; ++ std::vector varData{}; ++ std::vector biasData{}; ++ std::vector Adata{}; ++ std::vector Bdata{}; ++ float epsilon = 0.001f; + }; + + struct BatchNorm FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BatchNormT NativeTableType; ++ typedef BatchNormBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return BatchNormTypeTable(); + } +@@ -2886,6 +2827,7 @@ struct BatchNorm FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BatchNormBuilder { ++ typedef BatchNorm Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_channels(int32_t channels) { +@@ -2916,7 +2858,6 @@ struct BatchNormBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BatchNormBuilder &operator=(const BatchNormBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2978,16 +2919,14 @@ flatbuffers::Offset CreateBatchNorm(flatbuffers::FlatBufferBuilder &_ + + struct ScaleT : public flatbuffers::NativeTable { + typedef Scale TableType; +- int32_t channels; +- std::vector scaleData; +- std::vector biasData; +- ScaleT() +- : channels(0) { +- } ++ int32_t channels = 0; ++ std::vector scaleData{}; ++ std::vector biasData{}; + }; + + struct Scale FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ScaleT NativeTableType; ++ typedef ScaleBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ScaleTypeTable(); + } +@@ -3020,6 +2959,7 @@ struct Scale FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ScaleBuilder { ++ typedef Scale Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_channels(int32_t channels) { +@@ -3035,7 +2975,6 @@ struct ScaleBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ScaleBuilder &operator=(const ScaleBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3073,15 +3012,13 @@ flatbuffers::Offset CreateScale(flatbuffers::FlatBufferBuilder &_fbb, con + + struct EltwiseT : public flatbuffers::NativeTable { + typedef Eltwise TableType; +- EltwiseType type; +- std::vector coeff; +- EltwiseT() +- : type(EltwiseType_PROD) { +- } ++ MNN::EltwiseType type = MNN::EltwiseType_PROD; ++ std::vector coeff{}; + }; + + struct Eltwise FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EltwiseT NativeTableType; ++ typedef EltwiseBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return EltwiseTypeTable(); + } +@@ -3089,8 +3026,8 @@ struct Eltwise FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_TYPE = 4, + VT_COEFF = 6 + }; +- EltwiseType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::EltwiseType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } + const flatbuffers::Vector *coeff() const { + return GetPointer *>(VT_COEFF); +@@ -3108,9 +3045,10 @@ struct Eltwise FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct EltwiseBuilder { ++ typedef Eltwise Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_type(EltwiseType type) { ++ void add_type(MNN::EltwiseType type) { + fbb_.AddElement(Eltwise::VT_TYPE, static_cast(type), 0); + } + void add_coeff(flatbuffers::Offset> coeff) { +@@ -3120,7 +3058,6 @@ struct EltwiseBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- EltwiseBuilder &operator=(const EltwiseBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3130,7 +3067,7 @@ struct EltwiseBuilder { + + inline flatbuffers::Offset CreateEltwise( + flatbuffers::FlatBufferBuilder &_fbb, +- EltwiseType type = EltwiseType_PROD, ++ MNN::EltwiseType type = MNN::EltwiseType_PROD, + flatbuffers::Offset> coeff = 0) { + EltwiseBuilder builder_(_fbb); + builder_.add_coeff(coeff); +@@ -3140,7 +3077,7 @@ inline flatbuffers::Offset CreateEltwise( + + inline flatbuffers::Offset CreateEltwiseDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- EltwiseType type = EltwiseType_PROD, ++ MNN::EltwiseType type = MNN::EltwiseType_PROD, + const std::vector *coeff = nullptr) { + auto coeff__ = coeff ? _fbb.CreateVector(*coeff) : 0; + return MNN::CreateEltwise( +@@ -3153,16 +3090,13 @@ flatbuffers::Offset CreateEltwise(flatbuffers::FlatBufferBuilder &_fbb, + + struct FlattenT : public flatbuffers::NativeTable { + typedef Flatten TableType; +- int32_t axis; +- int32_t endAxis; +- FlattenT() +- : axis(0), +- endAxis(0) { +- } ++ int32_t axis = 0; ++ int32_t endAxis = 0; + }; + + struct Flatten FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FlattenT NativeTableType; ++ typedef FlattenBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return FlattenTypeTable(); + } +@@ -3188,6 +3122,7 @@ struct Flatten FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct FlattenBuilder { ++ typedef Flatten Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_axis(int32_t axis) { +@@ -3200,7 +3135,6 @@ struct FlattenBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- FlattenBuilder &operator=(const FlattenBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3222,13 +3156,12 @@ flatbuffers::Offset CreateFlatten(flatbuffers::FlatBufferBuilder &_fbb, + + struct PermuteT : public flatbuffers::NativeTable { + typedef Permute TableType; +- std::vector dims; +- PermuteT() { +- } ++ std::vector dims{}; + }; + + struct Permute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PermuteT NativeTableType; ++ typedef PermuteBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return PermuteTypeTable(); + } +@@ -3250,6 +3183,7 @@ struct Permute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PermuteBuilder { ++ typedef Permute Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_dims(flatbuffers::Offset> dims) { +@@ -3259,7 +3193,6 @@ struct PermuteBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PermuteBuilder &operator=(const PermuteBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3288,15 +3221,13 @@ flatbuffers::Offset CreatePermute(flatbuffers::FlatBufferBuilder &_fbb, + + struct ReshapeT : public flatbuffers::NativeTable { + typedef Reshape TableType; +- std::vector dims; +- MNN_DATA_FORMAT dimType; +- ReshapeT() +- : dimType(MNN_DATA_FORMAT_NCHW) { +- } ++ std::vector dims{}; ++ MNN::MNN_DATA_FORMAT dimType = MNN::MNN_DATA_FORMAT_NCHW; + }; + + struct Reshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReshapeT NativeTableType; ++ typedef ReshapeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ReshapeTypeTable(); + } +@@ -3307,8 +3238,8 @@ struct Reshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *dims() const { + return GetPointer *>(VT_DIMS); + } +- MNN_DATA_FORMAT dimType() const { +- return static_cast(GetField(VT_DIMTYPE, 0)); ++ MNN::MNN_DATA_FORMAT dimType() const { ++ return static_cast(GetField(VT_DIMTYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -3323,19 +3254,19 @@ struct Reshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ReshapeBuilder { ++ typedef Reshape Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_dims(flatbuffers::Offset> dims) { + fbb_.AddOffset(Reshape::VT_DIMS, dims); + } +- void add_dimType(MNN_DATA_FORMAT dimType) { ++ void add_dimType(MNN::MNN_DATA_FORMAT dimType) { + fbb_.AddElement(Reshape::VT_DIMTYPE, static_cast(dimType), 0); + } + explicit ReshapeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReshapeBuilder &operator=(const ReshapeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3346,7 +3277,7 @@ struct ReshapeBuilder { + inline flatbuffers::Offset CreateReshape( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> dims = 0, +- MNN_DATA_FORMAT dimType = MNN_DATA_FORMAT_NCHW) { ++ MNN::MNN_DATA_FORMAT dimType = MNN::MNN_DATA_FORMAT_NCHW) { + ReshapeBuilder builder_(_fbb); + builder_.add_dims(dims); + builder_.add_dimType(dimType); +@@ -3356,7 +3287,7 @@ inline flatbuffers::Offset CreateReshape( + inline flatbuffers::Offset CreateReshapeDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *dims = nullptr, +- MNN_DATA_FORMAT dimType = MNN_DATA_FORMAT_NCHW) { ++ MNN::MNN_DATA_FORMAT dimType = MNN::MNN_DATA_FORMAT_NCHW) { + auto dims__ = dims ? _fbb.CreateVector(*dims) : 0; + return MNN::CreateReshape( + _fbb, +@@ -3368,32 +3299,21 @@ flatbuffers::Offset CreateReshape(flatbuffers::FlatBufferBuilder &_fbb, + + struct DetectionOutputT : public flatbuffers::NativeTable { + typedef DetectionOutput TableType; +- int32_t classCount; +- float nmsThresholdold; +- int32_t nmsTopK; +- int32_t keepTopK; +- float confidenceThreshold; +- int32_t shareLocation; +- int32_t backgroundLable; +- int32_t varianceEncodedTarget; +- int32_t codeType; +- float objectnessScore; +- DetectionOutputT() +- : classCount(0), +- nmsThresholdold(0.0f), +- nmsTopK(0), +- keepTopK(0), +- confidenceThreshold(0.0f), +- shareLocation(0), +- backgroundLable(0), +- varianceEncodedTarget(0), +- codeType(0), +- objectnessScore(0.01f) { +- } ++ int32_t classCount = 0; ++ float nmsThresholdold = 0.0f; ++ int32_t nmsTopK = 0; ++ int32_t keepTopK = 0; ++ float confidenceThreshold = 0.0f; ++ int32_t shareLocation = 0; ++ int32_t backgroundLable = 0; ++ int32_t varianceEncodedTarget = 0; ++ int32_t codeType = 0; ++ float objectnessScore = 0.01f; + }; + + struct DetectionOutput FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DetectionOutputT NativeTableType; ++ typedef DetectionOutputBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return DetectionOutputTypeTable(); + } +@@ -3459,6 +3379,7 @@ struct DetectionOutput FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct DetectionOutputBuilder { ++ typedef DetectionOutput Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_classCount(int32_t classCount) { +@@ -3495,7 +3416,6 @@ struct DetectionOutputBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DetectionOutputBuilder &operator=(const DetectionOutputBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3533,18 +3453,14 @@ flatbuffers::Offset CreateDetectionOutput(flatbuffers::FlatBuff + + struct RoiPoolingT : public flatbuffers::NativeTable { + typedef RoiPooling TableType; +- int32_t pooledWidth; +- int32_t pooledHeight; +- float spatialScale; +- RoiPoolingT() +- : pooledWidth(0), +- pooledHeight(0), +- spatialScale(0.0f) { +- } ++ int32_t pooledWidth = 0; ++ int32_t pooledHeight = 0; ++ float spatialScale = 0.0f; + }; + + struct RoiPooling FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RoiPoolingT NativeTableType; ++ typedef RoiPoolingBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return RoiPoolingTypeTable(); + } +@@ -3575,6 +3491,7 @@ struct RoiPooling FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RoiPoolingBuilder { ++ typedef RoiPooling Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_pooledWidth(int32_t pooledWidth) { +@@ -3590,7 +3507,6 @@ struct RoiPoolingBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RoiPoolingBuilder &operator=(const RoiPoolingBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3614,27 +3530,20 @@ flatbuffers::Offset CreateRoiPooling(flatbuffers::FlatBufferBuilder + + struct ProposalT : public flatbuffers::NativeTable { + typedef Proposal TableType; +- int32_t featStride; +- int32_t baseSize; +- int32_t preNmsTopN; +- int32_t afterNmsTopN; +- float nmsThreshold; +- int32_t minSize; +- std::unique_ptr ratios; +- std::unique_ptr scales; +- std::unique_ptr anchors; +- ProposalT() +- : featStride(0), +- baseSize(0), +- preNmsTopN(0), +- afterNmsTopN(0), +- nmsThreshold(0.0f), +- minSize(0) { +- } ++ int32_t featStride = 0; ++ int32_t baseSize = 0; ++ int32_t preNmsTopN = 0; ++ int32_t afterNmsTopN = 0; ++ float nmsThreshold = 0.0f; ++ int32_t minSize = 0; ++ std::unique_ptr ratios{}; ++ std::unique_ptr scales{}; ++ std::unique_ptr anchors{}; + }; + + struct Proposal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ProposalT NativeTableType; ++ typedef ProposalBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ProposalTypeTable(); + } +@@ -3667,14 +3576,14 @@ struct Proposal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t minSize() const { + return GetField(VT_MINSIZE, 0); + } +- const Blob *ratios() const { +- return GetPointer(VT_RATIOS); ++ const MNN::Blob *ratios() const { ++ return GetPointer(VT_RATIOS); + } +- const Blob *scales() const { +- return GetPointer(VT_SCALES); ++ const MNN::Blob *scales() const { ++ return GetPointer(VT_SCALES); + } +- const Blob *anchors() const { +- return GetPointer(VT_ANCHORS); ++ const MNN::Blob *anchors() const { ++ return GetPointer(VT_ANCHORS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -3698,6 +3607,7 @@ struct Proposal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ProposalBuilder { ++ typedef Proposal Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_featStride(int32_t featStride) { +@@ -3718,20 +3628,19 @@ struct ProposalBuilder { + void add_minSize(int32_t minSize) { + fbb_.AddElement(Proposal::VT_MINSIZE, minSize, 0); + } +- void add_ratios(flatbuffers::Offset ratios) { ++ void add_ratios(flatbuffers::Offset ratios) { + fbb_.AddOffset(Proposal::VT_RATIOS, ratios); + } +- void add_scales(flatbuffers::Offset scales) { ++ void add_scales(flatbuffers::Offset scales) { + fbb_.AddOffset(Proposal::VT_SCALES, scales); + } +- void add_anchors(flatbuffers::Offset anchors) { ++ void add_anchors(flatbuffers::Offset anchors) { + fbb_.AddOffset(Proposal::VT_ANCHORS, anchors); + } + explicit ProposalBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ProposalBuilder &operator=(const ProposalBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3747,9 +3656,9 @@ inline flatbuffers::Offset CreateProposal( + int32_t afterNmsTopN = 0, + float nmsThreshold = 0.0f, + int32_t minSize = 0, +- flatbuffers::Offset ratios = 0, +- flatbuffers::Offset scales = 0, +- flatbuffers::Offset anchors = 0) { ++ flatbuffers::Offset ratios = 0, ++ flatbuffers::Offset scales = 0, ++ flatbuffers::Offset anchors = 0) { + ProposalBuilder builder_(_fbb); + builder_.add_anchors(anchors); + builder_.add_scales(scales); +@@ -3767,34 +3676,22 @@ flatbuffers::Offset CreateProposal(flatbuffers::FlatBufferBuilder &_fb + + struct InterpT : public flatbuffers::NativeTable { + typedef Interp TableType; +- float widthScale; +- float heightScale; +- int32_t outputWidth; +- int32_t outputHeight; +- int32_t resizeType; +- bool alignCorners; +- bool halfPixelCenters; +- float widthOffset; +- float heightOffset; +- float cubicCoeffA; +- CoordinateTransformationMode ctm; +- InterpT() +- : widthScale(0.0f), +- heightScale(0.0f), +- outputWidth(0), +- outputHeight(0), +- resizeType(0), +- alignCorners(false), +- halfPixelCenters(false), +- widthOffset(0.0f), +- heightOffset(0.0f), +- cubicCoeffA(-0.75f), +- ctm(CoordinateTransformationMode_NotSet) { +- } ++ float widthScale = 0.0f; ++ float heightScale = 0.0f; ++ int32_t outputWidth = 0; ++ int32_t outputHeight = 0; ++ int32_t resizeType = 0; ++ bool alignCorners = false; ++ bool halfPixelCenters = false; ++ float widthOffset = 0.0f; ++ float heightOffset = 0.0f; ++ float cubicCoeffA = -0.75f; ++ MNN::CoordinateTransformationMode ctm = MNN::CoordinateTransformationMode_NotSet; + }; + + struct Interp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef InterpT NativeTableType; ++ typedef InterpBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return InterpTypeTable(); + } +@@ -3841,8 +3738,8 @@ struct Interp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + float cubicCoeffA() const { + return GetField(VT_CUBICCOEFFA, -0.75f); + } +- CoordinateTransformationMode ctm() const { +- return static_cast(GetField(VT_CTM, 0)); ++ MNN::CoordinateTransformationMode ctm() const { ++ return static_cast(GetField(VT_CTM, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -3865,6 +3762,7 @@ struct Interp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct InterpBuilder { ++ typedef Interp Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_widthScale(float widthScale) { +@@ -3897,14 +3795,13 @@ struct InterpBuilder { + void add_cubicCoeffA(float cubicCoeffA) { + fbb_.AddElement(Interp::VT_CUBICCOEFFA, cubicCoeffA, -0.75f); + } +- void add_ctm(CoordinateTransformationMode ctm) { ++ void add_ctm(MNN::CoordinateTransformationMode ctm) { + fbb_.AddElement(Interp::VT_CTM, static_cast(ctm), 0); + } + explicit InterpBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- InterpBuilder &operator=(const InterpBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3924,7 +3821,7 @@ inline flatbuffers::Offset CreateInterp( + float widthOffset = 0.0f, + float heightOffset = 0.0f, + float cubicCoeffA = -0.75f, +- CoordinateTransformationMode ctm = CoordinateTransformationMode_NotSet) { ++ MNN::CoordinateTransformationMode ctm = MNN::CoordinateTransformationMode_NotSet) { + InterpBuilder builder_(_fbb); + builder_.add_cubicCoeffA(cubicCoeffA); + builder_.add_heightOffset(heightOffset); +@@ -3944,16 +3841,13 @@ flatbuffers::Offset CreateInterp(flatbuffers::FlatBufferBuilder &_fbb, c + + struct ResizeT : public flatbuffers::NativeTable { + typedef Resize TableType; +- float xScale; +- float yScale; +- ResizeT() +- : xScale(0.0f), +- yScale(0.0f) { +- } ++ float xScale = 0.0f; ++ float yScale = 0.0f; + }; + + struct Resize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResizeT NativeTableType; ++ typedef ResizeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ResizeTypeTable(); + } +@@ -3979,6 +3873,7 @@ struct Resize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ResizeBuilder { ++ typedef Resize Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_xScale(float xScale) { +@@ -3991,7 +3886,6 @@ struct ResizeBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ResizeBuilder &operator=(const ResizeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4013,30 +3907,22 @@ flatbuffers::Offset CreateResize(flatbuffers::FlatBufferBuilder &_fbb, c + + struct PriorBoxT : public flatbuffers::NativeTable { + typedef PriorBox TableType; +- std::vector minSizes; +- std::vector maxSizes; +- std::vector aspectRatios; +- std::vector variances; +- bool flip; +- bool clip; +- int32_t imageWidth; +- int32_t imageHeight; +- int32_t stepWidth; +- int32_t stepHeight; +- float offset; +- PriorBoxT() +- : flip(false), +- clip(false), +- imageWidth(0), +- imageHeight(0), +- stepWidth(0), +- stepHeight(0), +- offset(0.0f) { +- } ++ std::vector minSizes{}; ++ std::vector maxSizes{}; ++ std::vector aspectRatios{}; ++ std::vector variances{}; ++ bool flip = false; ++ bool clip = false; ++ int32_t imageWidth = 0; ++ int32_t imageHeight = 0; ++ int32_t stepWidth = 0; ++ int32_t stepHeight = 0; ++ float offset = 0.0f; + }; + + struct PriorBox FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PriorBoxT NativeTableType; ++ typedef PriorBoxBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return PriorBoxTypeTable(); + } +@@ -4111,6 +3997,7 @@ struct PriorBox FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PriorBoxBuilder { ++ typedef PriorBox Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_minSizes(flatbuffers::Offset> minSizes) { +@@ -4150,7 +4037,6 @@ struct PriorBoxBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PriorBoxBuilder &operator=(const PriorBoxBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4222,19 +4108,15 @@ flatbuffers::Offset CreatePriorBox(flatbuffers::FlatBufferBuilder &_fb + + struct NormalizeT : public flatbuffers::NativeTable { + typedef Normalize TableType; +- int32_t acrossSpatial; +- int32_t channelShared; +- float eps; +- std::vector scale; +- NormalizeT() +- : acrossSpatial(0), +- channelShared(0), +- eps(0.0f) { +- } ++ int32_t acrossSpatial = 0; ++ int32_t channelShared = 0; ++ float eps = 0.0f; ++ std::vector scale{}; + }; + + struct Normalize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NormalizeT NativeTableType; ++ typedef NormalizeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return NormalizeTypeTable(); + } +@@ -4271,6 +4153,7 @@ struct Normalize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct NormalizeBuilder { ++ typedef Normalize Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_acrossSpatial(int32_t acrossSpatial) { +@@ -4289,7 +4172,6 @@ struct NormalizeBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- NormalizeBuilder &operator=(const NormalizeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4330,17 +4212,15 @@ flatbuffers::Offset CreateNormalize(flatbuffers::FlatBufferBuilder &_ + + struct EltwiseInt8T : public flatbuffers::NativeTable { + typedef EltwiseInt8 TableType; +- EltwiseType type; +- std::unique_ptr inputQuan0; +- std::unique_ptr inputQuan1; +- std::unique_ptr outputQuan; +- EltwiseInt8T() +- : type(EltwiseType_PROD) { +- } ++ MNN::EltwiseType type = MNN::EltwiseType_PROD; ++ std::unique_ptr inputQuan0{}; ++ std::unique_ptr inputQuan1{}; ++ std::unique_ptr outputQuan{}; + }; + + struct EltwiseInt8 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EltwiseInt8T NativeTableType; ++ typedef EltwiseInt8Builder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return EltwiseInt8TypeTable(); + } +@@ -4350,17 +4230,17 @@ struct EltwiseInt8 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_INPUTQUAN1 = 8, + VT_OUTPUTQUAN = 10 + }; +- EltwiseType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::EltwiseType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } +- const QuantizedFloatParam *inputQuan0() const { +- return GetPointer(VT_INPUTQUAN0); ++ const MNN::QuantizedFloatParam *inputQuan0() const { ++ return GetPointer(VT_INPUTQUAN0); + } +- const QuantizedFloatParam *inputQuan1() const { +- return GetPointer(VT_INPUTQUAN1); ++ const MNN::QuantizedFloatParam *inputQuan1() const { ++ return GetPointer(VT_INPUTQUAN1); + } +- const QuantizedFloatParam *outputQuan() const { +- return GetPointer(VT_OUTPUTQUAN); ++ const MNN::QuantizedFloatParam *outputQuan() const { ++ return GetPointer(VT_OUTPUTQUAN); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -4379,25 +4259,25 @@ struct EltwiseInt8 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct EltwiseInt8Builder { ++ typedef EltwiseInt8 Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_type(EltwiseType type) { ++ void add_type(MNN::EltwiseType type) { + fbb_.AddElement(EltwiseInt8::VT_TYPE, static_cast(type), 0); + } +- void add_inputQuan0(flatbuffers::Offset inputQuan0) { ++ void add_inputQuan0(flatbuffers::Offset inputQuan0) { + fbb_.AddOffset(EltwiseInt8::VT_INPUTQUAN0, inputQuan0); + } +- void add_inputQuan1(flatbuffers::Offset inputQuan1) { ++ void add_inputQuan1(flatbuffers::Offset inputQuan1) { + fbb_.AddOffset(EltwiseInt8::VT_INPUTQUAN1, inputQuan1); + } +- void add_outputQuan(flatbuffers::Offset outputQuan) { ++ void add_outputQuan(flatbuffers::Offset outputQuan) { + fbb_.AddOffset(EltwiseInt8::VT_OUTPUTQUAN, outputQuan); + } + explicit EltwiseInt8Builder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- EltwiseInt8Builder &operator=(const EltwiseInt8Builder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4407,10 +4287,10 @@ struct EltwiseInt8Builder { + + inline flatbuffers::Offset CreateEltwiseInt8( + flatbuffers::FlatBufferBuilder &_fbb, +- EltwiseType type = EltwiseType_PROD, +- flatbuffers::Offset inputQuan0 = 0, +- flatbuffers::Offset inputQuan1 = 0, +- flatbuffers::Offset outputQuan = 0) { ++ MNN::EltwiseType type = MNN::EltwiseType_PROD, ++ flatbuffers::Offset inputQuan0 = 0, ++ flatbuffers::Offset inputQuan1 = 0, ++ flatbuffers::Offset outputQuan = 0) { + EltwiseInt8Builder builder_(_fbb); + builder_.add_outputQuan(outputQuan); + builder_.add_inputQuan1(inputQuan1); +@@ -4422,30 +4302,30 @@ inline flatbuffers::Offset CreateEltwiseInt8( + flatbuffers::Offset CreateEltwiseInt8(flatbuffers::FlatBufferBuilder &_fbb, const EltwiseInt8T *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + inline Convolution2DCommonT *Convolution2DCommon::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Convolution2DCommonT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Convolution2DCommonT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Convolution2DCommon::UnPackTo(Convolution2DCommonT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = padX(); _o->padX = _e; }; +- { auto _e = padY(); _o->padY = _e; }; +- { auto _e = kernelX(); _o->kernelX = _e; }; +- { auto _e = kernelY(); _o->kernelY = _e; }; +- { auto _e = strideX(); _o->strideX = _e; }; +- { auto _e = strideY(); _o->strideY = _e; }; +- { auto _e = dilateX(); _o->dilateX = _e; }; +- { auto _e = dilateY(); _o->dilateY = _e; }; +- { auto _e = padMode(); _o->padMode = _e; }; +- { auto _e = group(); _o->group = _e; }; +- { auto _e = outputCount(); _o->outputCount = _e; }; +- { auto _e = inputCount(); _o->inputCount = _e; }; +- { auto _e = relu(); _o->relu = _e; }; +- { auto _e = relu6(); _o->relu6 = _e; }; +- { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } }; +- { auto _e = outPads(); if (_e) { _o->outPads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outPads[_i] = _e->Get(_i); } } }; ++ { auto _e = padX(); _o->padX = _e; } ++ { auto _e = padY(); _o->padY = _e; } ++ { auto _e = kernelX(); _o->kernelX = _e; } ++ { auto _e = kernelY(); _o->kernelY = _e; } ++ { auto _e = strideX(); _o->strideX = _e; } ++ { auto _e = strideY(); _o->strideY = _e; } ++ { auto _e = dilateX(); _o->dilateX = _e; } ++ { auto _e = dilateY(); _o->dilateY = _e; } ++ { auto _e = padMode(); _o->padMode = _e; } ++ { auto _e = group(); _o->group = _e; } ++ { auto _e = outputCount(); _o->outputCount = _e; } ++ { auto _e = inputCount(); _o->inputCount = _e; } ++ { auto _e = relu(); _o->relu = _e; } ++ { auto _e = relu6(); _o->relu6 = _e; } ++ { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } } ++ { auto _e = outPads(); if (_e) { _o->outPads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outPads[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset Convolution2DCommon::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution2DCommonT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4493,23 +4373,23 @@ inline flatbuffers::Offset CreateConvolution2DCommon(flatbu + } + + inline Convolution3DCommonT *Convolution3DCommon::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Convolution3DCommonT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Convolution3DCommonT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Convolution3DCommon::UnPackTo(Convolution3DCommonT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = dilates(); if (_e) { _o->dilates.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dilates[_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); } } }; +- { auto _e = kernels(); if (_e) { _o->kernels.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->kernels[_i] = _e->Get(_i); } } }; +- { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } }; +- { auto _e = padMode(); _o->padMode = _e; }; +- { auto _e = inputCount(); _o->inputCount = _e; }; +- { auto _e = outputCount(); _o->outputCount = _e; }; +- { auto _e = relu(); _o->relu = _e; }; +- { auto _e = relu6(); _o->relu6 = _e; }; ++ { auto _e = dilates(); if (_e) { _o->dilates.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dilates[_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); } } } ++ { auto _e = kernels(); if (_e) { _o->kernels.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->kernels[_i] = _e->Get(_i); } } } ++ { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } } ++ { auto _e = padMode(); _o->padMode = _e; } ++ { auto _e = inputCount(); _o->inputCount = _e; } ++ { auto _e = outputCount(); _o->outputCount = _e; } ++ { auto _e = relu(); _o->relu = _e; } ++ { auto _e = relu6(); _o->relu6 = _e; } + } + + inline flatbuffers::Offset Convolution3DCommon::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution3DCommonT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4543,25 +4423,25 @@ inline flatbuffers::Offset CreateConvolution3DCommon(flatbu + } + + inline IDSTQuanT *IDSTQuan::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new IDSTQuanT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new IDSTQuanT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void IDSTQuan::UnPackTo(IDSTQuanT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = buffer(); if (_e) { _o->buffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->buffer[_i] = _e->Get(_i); } } }; +- { auto _e = alpha(); if (_e) { _o->alpha.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->alpha[_i] = _e->Get(_i); } } }; +- { auto _e = type(); _o->type = _e; }; +- { auto _e = useInt32(); _o->useInt32 = _e; }; +- { auto _e = quantScale(); _o->quantScale = _e; }; +- { auto _e = scaleIn(); _o->scaleIn = _e; }; +- { auto _e = scaleOut(); _o->scaleOut = _e; }; +- { auto _e = aMax(); _o->aMax = _e; }; +- { auto _e = aMin(); _o->aMin = _e; }; +- { auto _e = readType(); _o->readType = _e; }; +- { auto _e = has_scaleInt(); _o->has_scaleInt = _e; }; ++ { auto _e = buffer(); if (_e) { _o->buffer.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->buffer.begin()); } } ++ { auto _e = alpha(); if (_e) { _o->alpha.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->alpha[_i] = _e->Get(_i); } } } ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = useInt32(); _o->useInt32 = _e; } ++ { auto _e = quantScale(); _o->quantScale = _e; } ++ { auto _e = scaleIn(); _o->scaleIn = _e; } ++ { auto _e = scaleOut(); _o->scaleOut = _e; } ++ { auto _e = aMax(); _o->aMax = _e; } ++ { auto _e = aMin(); _o->aMin = _e; } ++ { auto _e = readType(); _o->readType = _e; } ++ { auto _e = has_scaleInt(); _o->has_scaleInt = _e; } + } + + inline flatbuffers::Offset IDSTQuan::Pack(flatbuffers::FlatBufferBuilder &_fbb, const IDSTQuanT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4599,20 +4479,20 @@ inline flatbuffers::Offset CreateIDSTQuan(flatbuffers::FlatBufferBuild + } + + inline QuantizedFloatParamT *QuantizedFloatParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedFloatParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedFloatParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedFloatParam::UnPackTo(QuantizedFloatParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; +- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_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 = tensorScale(); if (_e) { _o->tensorScale.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensorScale[_i] = _e->Get(_i); } } }; +- { auto _e = method(); _o->method = _e; }; +- { auto _e = nbits(); _o->nbits = _e; }; ++ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->weight.begin()); } } ++ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_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 = tensorScale(); if (_e) { _o->tensorScale.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensorScale[_i] = _e->Get(_i); } } } ++ { auto _e = method(); _o->method = _e; } ++ { auto _e = nbits(); _o->nbits = _e; } + } + + inline flatbuffers::Offset QuantizedFloatParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedFloatParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4640,19 +4520,19 @@ inline flatbuffers::Offset CreateQuantizedFloatParam(flatbu + } + + inline Convolution2DT *Convolution2D::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Convolution2DT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Convolution2DT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Convolution2D::UnPackTo(Convolution2DT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; +- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; +- { auto _e = quanParameter(); if (_e) _o->quanParameter = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = symmetricQuan(); if (_e) _o->symmetricQuan = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } } ++ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } ++ { auto _e = quanParameter(); if (_e) _o->quanParameter = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = symmetricQuan(); if (_e) _o->symmetricQuan = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset Convolution2D::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution2DT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4678,17 +4558,17 @@ inline flatbuffers::Offset CreateConvolution2D(flatbuffers::FlatB + } + + inline Convolution3DT *Convolution3D::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Convolution3DT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Convolution3DT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Convolution3D::UnPackTo(Convolution3DT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; +- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; ++ { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } } ++ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset Convolution3D::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution3DT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4710,22 +4590,22 @@ inline flatbuffers::Offset CreateConvolution3D(flatbuffers::FlatB + } + + inline InnerProductT *InnerProduct::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new InnerProductT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new InnerProductT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void InnerProduct::UnPackTo(InnerProductT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = outputCount(); _o->outputCount = _e; }; +- { auto _e = biasTerm(); _o->biasTerm = _e; }; +- { auto _e = weightSize(); _o->weightSize = _e; }; +- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; +- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; +- { auto _e = axis(); _o->axis = _e; }; +- { auto _e = transpose(); _o->transpose = _e; }; +- { auto _e = quanParameter(); if (_e) _o->quanParameter = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = outputCount(); _o->outputCount = _e; } ++ { auto _e = biasTerm(); _o->biasTerm = _e; } ++ { auto _e = weightSize(); _o->weightSize = _e; } ++ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } } ++ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } ++ { auto _e = axis(); _o->axis = _e; } ++ { auto _e = transpose(); _o->transpose = _e; } ++ { auto _e = quanParameter(); if (_e) _o->quanParameter = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset InnerProduct::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InnerProductT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4757,27 +4637,27 @@ inline flatbuffers::Offset CreateInnerProduct(flatbuffers::FlatBuf + } + + inline PoolT *Pool::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PoolT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PoolT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Pool::UnPackTo(PoolT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = padX(); _o->padX = _e; }; +- { auto _e = padY(); _o->padY = _e; }; +- { auto _e = isGlobal(); _o->isGlobal = _e; }; +- { auto _e = kernelX(); _o->kernelX = _e; }; +- { auto _e = kernelY(); _o->kernelY = _e; }; +- { auto _e = strideX(); _o->strideX = _e; }; +- { auto _e = strideY(); _o->strideY = _e; }; +- { auto _e = type(); _o->type = _e; }; +- { auto _e = padType(); _o->padType = _e; }; +- { auto _e = dataType(); _o->dataType = _e; }; +- { auto _e = ceilModel(); _o->ceilModel = _e; }; +- { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } }; +- { auto _e = countType(); _o->countType = _e; }; ++ { auto _e = padX(); _o->padX = _e; } ++ { auto _e = padY(); _o->padY = _e; } ++ { auto _e = isGlobal(); _o->isGlobal = _e; } ++ { auto _e = kernelX(); _o->kernelX = _e; } ++ { auto _e = kernelY(); _o->kernelY = _e; } ++ { auto _e = strideX(); _o->strideX = _e; } ++ { auto _e = strideY(); _o->strideY = _e; } ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = padType(); _o->padType = _e; } ++ { auto _e = dataType(); _o->dataType = _e; } ++ { auto _e = ceilModel(); _o->ceilModel = _e; } ++ { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } } ++ { auto _e = countType(); _o->countType = _e; } + } + + inline flatbuffers::Offset Pool::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PoolT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4819,19 +4699,19 @@ inline flatbuffers::Offset CreatePool(flatbuffers::FlatBufferBuilder &_fbb + } + + inline Pool3DT *Pool3D::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Pool3DT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Pool3DT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Pool3D::UnPackTo(Pool3DT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { 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); } } }; +- { auto _e = kernels(); if (_e) { _o->kernels.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->kernels[_i] = _e->Get(_i); } } }; +- { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } }; +- { auto _e = type(); _o->type = _e; }; +- { auto _e = padType(); _o->padType = _e; }; ++ { 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); } } } ++ { auto _e = kernels(); if (_e) { _o->kernels.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->kernels[_i] = _e->Get(_i); } } } ++ { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } } ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = padType(); _o->padType = _e; } + } + + inline flatbuffers::Offset Pool3D::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Pool3DT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4857,15 +4737,15 @@ inline flatbuffers::Offset CreatePool3D(flatbuffers::FlatBufferBuilder & + } + + inline ReluT *Relu::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReluT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReluT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Relu::UnPackTo(ReluT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = slope(); _o->slope = _e; }; ++ { auto _e = slope(); _o->slope = _e; } + } + + inline flatbuffers::Offset Relu::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReluT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4883,16 +4763,16 @@ inline flatbuffers::Offset CreateRelu(flatbuffers::FlatBufferBuilder &_fbb + } + + inline Relu6T *Relu6::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Relu6T(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Relu6T()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Relu6::UnPackTo(Relu6T *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = minValue(); _o->minValue = _e; }; +- { auto _e = maxValue(); _o->maxValue = _e; }; ++ { auto _e = minValue(); _o->minValue = _e; } ++ { auto _e = maxValue(); _o->maxValue = _e; } + } + + inline flatbuffers::Offset Relu6::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Relu6T* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4912,16 +4792,16 @@ inline flatbuffers::Offset CreateRelu6(flatbuffers::FlatBufferBuilder &_f + } + + inline PReluT *PRelu::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PReluT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PReluT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void PRelu::UnPackTo(PReluT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = slopeCount(); _o->slopeCount = _e; }; +- { auto _e = slope(); if (_e) { _o->slope.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slope[_i] = _e->Get(_i); } } }; ++ { auto _e = slopeCount(); _o->slopeCount = _e; } ++ { auto _e = slope(); if (_e) { _o->slope.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slope[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset PRelu::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PReluT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4941,15 +4821,15 @@ inline flatbuffers::Offset CreatePRelu(flatbuffers::FlatBufferBuilder &_f + } + + inline ELUT *ELU::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ELUT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ELUT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ELU::UnPackTo(ELUT *_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 ELU::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ELUT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4967,18 +4847,18 @@ inline flatbuffers::Offset CreateELU(flatbuffers::FlatBufferBuilder &_fbb, + } + + inline LRNT *LRN::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LRNT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LRNT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LRN::UnPackTo(LRNT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = regionType(); _o->regionType = _e; }; +- { auto _e = localSize(); _o->localSize = _e; }; +- { auto _e = alpha(); _o->alpha = _e; }; +- { auto _e = beta(); _o->beta = _e; }; ++ { auto _e = regionType(); _o->regionType = _e; } ++ { auto _e = localSize(); _o->localSize = _e; } ++ { auto _e = alpha(); _o->alpha = _e; } ++ { auto _e = beta(); _o->beta = _e; } + } + + inline flatbuffers::Offset LRN::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LRNT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5002,18 +4882,18 @@ inline flatbuffers::Offset CreateLRN(flatbuffers::FlatBufferBuilder &_fbb, + } + + inline ArgMaxT *ArgMax::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ArgMaxT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ArgMaxT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ArgMax::UnPackTo(ArgMaxT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = outMaxVal(); _o->outMaxVal = _e; }; +- { auto _e = topK(); _o->topK = _e; }; +- { auto _e = axis(); _o->axis = _e; }; +- { auto _e = softmaxThreshold(); _o->softmaxThreshold = _e; }; ++ { auto _e = outMaxVal(); _o->outMaxVal = _e; } ++ { auto _e = topK(); _o->topK = _e; } ++ { auto _e = axis(); _o->axis = _e; } ++ { auto _e = softmaxThreshold(); _o->softmaxThreshold = _e; } + } + + inline flatbuffers::Offset ArgMax::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5037,15 +4917,15 @@ inline flatbuffers::Offset CreateArgMax(flatbuffers::FlatBufferBuilder & + } + + inline AxisT *Axis::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new AxisT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new AxisT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Axis::UnPackTo(AxisT *_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 Axis::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AxisT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5063,17 +4943,17 @@ inline flatbuffers::Offset CreateAxis(flatbuffers::FlatBufferBuilder &_fbb + } + + inline InputT *Input::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new InputT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new InputT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Input::UnPackTo(InputT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; +- { auto _e = dtype(); _o->dtype = _e; }; +- { auto _e = dformat(); _o->dformat = _e; }; ++ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } ++ { auto _e = dtype(); _o->dtype = _e; } ++ { auto _e = dformat(); _o->dformat = _e; } + } + + inline flatbuffers::Offset Input::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InputT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5095,23 +4975,23 @@ inline flatbuffers::Offset CreateInput(flatbuffers::FlatBufferBuilder &_f + } + + inline LSTMT *LSTM::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LSTMT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LSTMT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LSTM::UnPackTo(LSTMT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = outputCount(); _o->outputCount = _e; }; +- { auto _e = weightSize(); _o->weightSize = _e; }; +- { auto _e = clippingThreshold(); _o->clippingThreshold = _e; }; +- { auto _e = weightI(); if (_e) _o->weightI = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = weightH(); if (_e) _o->weightH = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = bias(); if (_e) _o->bias = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = weightIQ(); if (_e) _o->weightIQ = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = weightIA(); if (_e) _o->weightIA = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = quantScale(); _o->quantScale = _e; }; ++ { auto _e = outputCount(); _o->outputCount = _e; } ++ { auto _e = weightSize(); _o->weightSize = _e; } ++ { auto _e = clippingThreshold(); _o->clippingThreshold = _e; } ++ { auto _e = weightI(); if (_e) _o->weightI = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = weightH(); if (_e) _o->weightH = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = bias(); if (_e) _o->bias = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = weightIQ(); if (_e) _o->weightIQ = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = weightIA(); if (_e) _o->weightIA = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = quantScale(); _o->quantScale = _e; } + } + + inline flatbuffers::Offset LSTM::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSTMT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5145,17 +5025,17 @@ inline flatbuffers::Offset CreateLSTM(flatbuffers::FlatBufferBuilder &_fbb + } + + inline SliceT *Slice::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SliceT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SliceT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Slice::UnPackTo(SliceT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = axis(); _o->axis = _e; }; +- { auto _e = slicePoints(); if (_e) { _o->slicePoints.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slicePoints[_i] = _e->Get(_i); } } }; +- { auto _e = sourceType(); _o->sourceType = _e; }; ++ { auto _e = axis(); _o->axis = _e; } ++ { auto _e = slicePoints(); if (_e) { _o->slicePoints.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slicePoints[_i] = _e->Get(_i); } } } ++ { auto _e = sourceType(); _o->sourceType = _e; } + } + + inline flatbuffers::Offset Slice::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SliceT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5177,22 +5057,22 @@ inline flatbuffers::Offset CreateSlice(flatbuffers::FlatBufferBuilder &_f + } + + inline BatchNormT *BatchNorm::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BatchNormT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BatchNormT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BatchNorm::UnPackTo(BatchNormT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = channels(); _o->channels = _e; }; +- { auto _e = slopeData(); if (_e) { _o->slopeData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slopeData[_i] = _e->Get(_i); } } }; +- { auto _e = meanData(); if (_e) { _o->meanData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->meanData[_i] = _e->Get(_i); } } }; +- { auto _e = varData(); if (_e) { _o->varData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->varData[_i] = _e->Get(_i); } } }; +- { auto _e = biasData(); if (_e) { _o->biasData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->biasData[_i] = _e->Get(_i); } } }; +- { auto _e = Adata(); if (_e) { _o->Adata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->Adata[_i] = _e->Get(_i); } } }; +- { auto _e = Bdata(); if (_e) { _o->Bdata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->Bdata[_i] = _e->Get(_i); } } }; +- { auto _e = epsilon(); _o->epsilon = _e; }; ++ { auto _e = channels(); _o->channels = _e; } ++ { auto _e = slopeData(); if (_e) { _o->slopeData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slopeData[_i] = _e->Get(_i); } } } ++ { auto _e = meanData(); if (_e) { _o->meanData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->meanData[_i] = _e->Get(_i); } } } ++ { auto _e = varData(); if (_e) { _o->varData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->varData[_i] = _e->Get(_i); } } } ++ { auto _e = biasData(); if (_e) { _o->biasData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->biasData[_i] = _e->Get(_i); } } } ++ { auto _e = Adata(); if (_e) { _o->Adata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->Adata[_i] = _e->Get(_i); } } } ++ { auto _e = Bdata(); if (_e) { _o->Bdata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->Bdata[_i] = _e->Get(_i); } } } ++ { auto _e = epsilon(); _o->epsilon = _e; } + } + + inline flatbuffers::Offset BatchNorm::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchNormT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5224,17 +5104,17 @@ inline flatbuffers::Offset CreateBatchNorm(flatbuffers::FlatBufferBui + } + + inline ScaleT *Scale::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ScaleT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ScaleT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Scale::UnPackTo(ScaleT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = channels(); _o->channels = _e; }; +- { auto _e = scaleData(); if (_e) { _o->scaleData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->scaleData[_i] = _e->Get(_i); } } }; +- { auto _e = biasData(); if (_e) { _o->biasData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->biasData[_i] = _e->Get(_i); } } }; ++ { auto _e = channels(); _o->channels = _e; } ++ { auto _e = scaleData(); if (_e) { _o->scaleData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->scaleData[_i] = _e->Get(_i); } } } ++ { auto _e = biasData(); if (_e) { _o->biasData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->biasData[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset Scale::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScaleT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5256,16 +5136,16 @@ inline flatbuffers::Offset CreateScale(flatbuffers::FlatBufferBuilder &_f + } + + inline EltwiseT *Eltwise::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new EltwiseT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new EltwiseT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Eltwise::UnPackTo(EltwiseT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = type(); _o->type = _e; }; +- { auto _e = coeff(); if (_e) { _o->coeff.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->coeff[_i] = _e->Get(_i); } } }; ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = coeff(); if (_e) { _o->coeff.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->coeff[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset Eltwise::Pack(flatbuffers::FlatBufferBuilder &_fbb, const EltwiseT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5285,16 +5165,16 @@ inline flatbuffers::Offset CreateEltwise(flatbuffers::FlatBufferBuilder + } + + inline FlattenT *Flatten::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new FlattenT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new FlattenT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Flatten::UnPackTo(FlattenT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = axis(); _o->axis = _e; }; +- { auto _e = endAxis(); _o->endAxis = _e; }; ++ { auto _e = axis(); _o->axis = _e; } ++ { auto _e = endAxis(); _o->endAxis = _e; } + } + + inline flatbuffers::Offset Flatten::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FlattenT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5314,15 +5194,15 @@ inline flatbuffers::Offset CreateFlatten(flatbuffers::FlatBufferBuilder + } + + inline PermuteT *Permute::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PermuteT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PermuteT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Permute::UnPackTo(PermuteT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; ++ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset Permute::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PermuteT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5340,16 +5220,16 @@ inline flatbuffers::Offset CreatePermute(flatbuffers::FlatBufferBuilder + } + + inline ReshapeT *Reshape::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReshapeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReshapeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Reshape::UnPackTo(ReshapeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; +- { auto _e = dimType(); _o->dimType = _e; }; ++ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } ++ { auto _e = dimType(); _o->dimType = _e; } + } + + inline flatbuffers::Offset Reshape::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5369,24 +5249,24 @@ inline flatbuffers::Offset CreateReshape(flatbuffers::FlatBufferBuilder + } + + inline DetectionOutputT *DetectionOutput::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DetectionOutputT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DetectionOutputT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DetectionOutput::UnPackTo(DetectionOutputT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = classCount(); _o->classCount = _e; }; +- { auto _e = nmsThresholdold(); _o->nmsThresholdold = _e; }; +- { auto _e = nmsTopK(); _o->nmsTopK = _e; }; +- { auto _e = keepTopK(); _o->keepTopK = _e; }; +- { auto _e = confidenceThreshold(); _o->confidenceThreshold = _e; }; +- { auto _e = shareLocation(); _o->shareLocation = _e; }; +- { auto _e = backgroundLable(); _o->backgroundLable = _e; }; +- { auto _e = varianceEncodedTarget(); _o->varianceEncodedTarget = _e; }; +- { auto _e = codeType(); _o->codeType = _e; }; +- { auto _e = objectnessScore(); _o->objectnessScore = _e; }; ++ { auto _e = classCount(); _o->classCount = _e; } ++ { auto _e = nmsThresholdold(); _o->nmsThresholdold = _e; } ++ { auto _e = nmsTopK(); _o->nmsTopK = _e; } ++ { auto _e = keepTopK(); _o->keepTopK = _e; } ++ { auto _e = confidenceThreshold(); _o->confidenceThreshold = _e; } ++ { auto _e = shareLocation(); _o->shareLocation = _e; } ++ { auto _e = backgroundLable(); _o->backgroundLable = _e; } ++ { auto _e = varianceEncodedTarget(); _o->varianceEncodedTarget = _e; } ++ { auto _e = codeType(); _o->codeType = _e; } ++ { auto _e = objectnessScore(); _o->objectnessScore = _e; } + } + + inline flatbuffers::Offset DetectionOutput::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DetectionOutputT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5422,17 +5302,17 @@ inline flatbuffers::Offset CreateDetectionOutput(flatbuffers::F + } + + inline RoiPoolingT *RoiPooling::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RoiPoolingT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RoiPoolingT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void RoiPooling::UnPackTo(RoiPoolingT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = pooledWidth(); _o->pooledWidth = _e; }; +- { auto _e = pooledHeight(); _o->pooledHeight = _e; }; +- { auto _e = spatialScale(); _o->spatialScale = _e; }; ++ { auto _e = pooledWidth(); _o->pooledWidth = _e; } ++ { auto _e = pooledHeight(); _o->pooledHeight = _e; } ++ { auto _e = spatialScale(); _o->spatialScale = _e; } + } + + inline flatbuffers::Offset RoiPooling::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RoiPoolingT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5454,23 +5334,23 @@ inline flatbuffers::Offset CreateRoiPooling(flatbuffers::FlatBufferB + } + + inline ProposalT *Proposal::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ProposalT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ProposalT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Proposal::UnPackTo(ProposalT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = featStride(); _o->featStride = _e; }; +- { auto _e = baseSize(); _o->baseSize = _e; }; +- { auto _e = preNmsTopN(); _o->preNmsTopN = _e; }; +- { auto _e = afterNmsTopN(); _o->afterNmsTopN = _e; }; +- { auto _e = nmsThreshold(); _o->nmsThreshold = _e; }; +- { auto _e = minSize(); _o->minSize = _e; }; +- { auto _e = ratios(); if (_e) _o->ratios = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = scales(); if (_e) _o->scales = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = anchors(); if (_e) _o->anchors = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = featStride(); _o->featStride = _e; } ++ { auto _e = baseSize(); _o->baseSize = _e; } ++ { auto _e = preNmsTopN(); _o->preNmsTopN = _e; } ++ { auto _e = afterNmsTopN(); _o->afterNmsTopN = _e; } ++ { auto _e = nmsThreshold(); _o->nmsThreshold = _e; } ++ { auto _e = minSize(); _o->minSize = _e; } ++ { auto _e = ratios(); if (_e) _o->ratios = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = scales(); if (_e) _o->scales = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = anchors(); if (_e) _o->anchors = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset Proposal::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ProposalT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5504,25 +5384,25 @@ inline flatbuffers::Offset CreateProposal(flatbuffers::FlatBufferBuild + } + + inline InterpT *Interp::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new InterpT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new InterpT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Interp::UnPackTo(InterpT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = widthScale(); _o->widthScale = _e; }; +- { auto _e = heightScale(); _o->heightScale = _e; }; +- { auto _e = outputWidth(); _o->outputWidth = _e; }; +- { auto _e = outputHeight(); _o->outputHeight = _e; }; +- { auto _e = resizeType(); _o->resizeType = _e; }; +- { auto _e = alignCorners(); _o->alignCorners = _e; }; +- { auto _e = halfPixelCenters(); _o->halfPixelCenters = _e; }; +- { auto _e = widthOffset(); _o->widthOffset = _e; }; +- { auto _e = heightOffset(); _o->heightOffset = _e; }; +- { auto _e = cubicCoeffA(); _o->cubicCoeffA = _e; }; +- { auto _e = ctm(); _o->ctm = _e; }; ++ { auto _e = widthScale(); _o->widthScale = _e; } ++ { auto _e = heightScale(); _o->heightScale = _e; } ++ { auto _e = outputWidth(); _o->outputWidth = _e; } ++ { auto _e = outputHeight(); _o->outputHeight = _e; } ++ { auto _e = resizeType(); _o->resizeType = _e; } ++ { auto _e = alignCorners(); _o->alignCorners = _e; } ++ { auto _e = halfPixelCenters(); _o->halfPixelCenters = _e; } ++ { auto _e = widthOffset(); _o->widthOffset = _e; } ++ { auto _e = heightOffset(); _o->heightOffset = _e; } ++ { auto _e = cubicCoeffA(); _o->cubicCoeffA = _e; } ++ { auto _e = ctm(); _o->ctm = _e; } + } + + inline flatbuffers::Offset Interp::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InterpT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5560,16 +5440,16 @@ inline flatbuffers::Offset CreateInterp(flatbuffers::FlatBufferBuilder & + } + + inline ResizeT *Resize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ResizeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ResizeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Resize::UnPackTo(ResizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = xScale(); _o->xScale = _e; }; +- { auto _e = yScale(); _o->yScale = _e; }; ++ { auto _e = xScale(); _o->xScale = _e; } ++ { auto _e = yScale(); _o->yScale = _e; } + } + + inline flatbuffers::Offset Resize::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ResizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5589,25 +5469,25 @@ inline flatbuffers::Offset CreateResize(flatbuffers::FlatBufferBuilder & + } + + inline PriorBoxT *PriorBox::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PriorBoxT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PriorBoxT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void PriorBox::UnPackTo(PriorBoxT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = minSizes(); if (_e) { _o->minSizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->minSizes[_i] = _e->Get(_i); } } }; +- { auto _e = maxSizes(); if (_e) { _o->maxSizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->maxSizes[_i] = _e->Get(_i); } } }; +- { auto _e = aspectRatios(); if (_e) { _o->aspectRatios.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aspectRatios[_i] = _e->Get(_i); } } }; +- { auto _e = variances(); if (_e) { _o->variances.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->variances[_i] = _e->Get(_i); } } }; +- { auto _e = flip(); _o->flip = _e; }; +- { auto _e = clip(); _o->clip = _e; }; +- { auto _e = imageWidth(); _o->imageWidth = _e; }; +- { auto _e = imageHeight(); _o->imageHeight = _e; }; +- { auto _e = stepWidth(); _o->stepWidth = _e; }; +- { auto _e = stepHeight(); _o->stepHeight = _e; }; +- { auto _e = offset(); _o->offset = _e; }; ++ { auto _e = minSizes(); if (_e) { _o->minSizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->minSizes[_i] = _e->Get(_i); } } } ++ { auto _e = maxSizes(); if (_e) { _o->maxSizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->maxSizes[_i] = _e->Get(_i); } } } ++ { auto _e = aspectRatios(); if (_e) { _o->aspectRatios.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aspectRatios[_i] = _e->Get(_i); } } } ++ { auto _e = variances(); if (_e) { _o->variances.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->variances[_i] = _e->Get(_i); } } } ++ { auto _e = flip(); _o->flip = _e; } ++ { auto _e = clip(); _o->clip = _e; } ++ { auto _e = imageWidth(); _o->imageWidth = _e; } ++ { auto _e = imageHeight(); _o->imageHeight = _e; } ++ { auto _e = stepWidth(); _o->stepWidth = _e; } ++ { auto _e = stepHeight(); _o->stepHeight = _e; } ++ { auto _e = offset(); _o->offset = _e; } + } + + inline flatbuffers::Offset PriorBox::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PriorBoxT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5645,18 +5525,18 @@ inline flatbuffers::Offset CreatePriorBox(flatbuffers::FlatBufferBuild + } + + inline NormalizeT *Normalize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new NormalizeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new NormalizeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Normalize::UnPackTo(NormalizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = acrossSpatial(); _o->acrossSpatial = _e; }; +- { auto _e = channelShared(); _o->channelShared = _e; }; +- { auto _e = eps(); _o->eps = _e; }; +- { 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 = acrossSpatial(); _o->acrossSpatial = _e; } ++ { auto _e = channelShared(); _o->channelShared = _e; } ++ { auto _e = eps(); _o->eps = _e; } ++ { 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); } } } + } + + inline flatbuffers::Offset Normalize::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NormalizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5680,18 +5560,18 @@ inline flatbuffers::Offset CreateNormalize(flatbuffers::FlatBufferBui + } + + inline EltwiseInt8T *EltwiseInt8::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new EltwiseInt8T(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new EltwiseInt8T()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void EltwiseInt8::UnPackTo(EltwiseInt8T *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = type(); _o->type = _e; }; +- { auto _e = inputQuan0(); if (_e) _o->inputQuan0 = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = inputQuan1(); if (_e) _o->inputQuan1 = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = outputQuan(); if (_e) _o->outputQuan = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = inputQuan0(); if (_e) _o->inputQuan0 = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = inputQuan1(); if (_e) _o->inputQuan1 = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = outputQuan(); if (_e) _o->outputQuan = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset EltwiseInt8::Pack(flatbuffers::FlatBufferBuilder &_fbb, const EltwiseInt8T* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -5721,7 +5601,7 @@ inline const flatbuffers::TypeTable *PadModeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- PadModeTypeTable ++ MNN::PadModeTypeTable + }; + static const char * const names[] = { + "CAFFE", +@@ -5729,7 +5609,7 @@ inline const flatbuffers::TypeTable *PadModeTypeTable() { + "SAME" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5740,14 +5620,14 @@ inline const flatbuffers::TypeTable *QuantizeAlgoTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- QuantizeAlgoTypeTable ++ MNN::QuantizeAlgoTypeTable + }; + static const char * const names[] = { + "DEFAULT", + "OVERFLOW_AWARE" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5758,14 +5638,14 @@ inline const flatbuffers::TypeTable *PoolTypeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- PoolTypeTypeTable ++ MNN::PoolTypeTypeTable + }; + static const char * const names[] = { + "MAXPOOL", + "AVEPOOL" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5777,7 +5657,7 @@ inline const flatbuffers::TypeTable *PoolPadTypeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- PoolPadTypeTypeTable ++ MNN::PoolPadTypeTypeTable + }; + static const char * const names[] = { + "CAFFE", +@@ -5785,7 +5665,7 @@ inline const flatbuffers::TypeTable *PoolPadTypeTypeTable() { + "SAME" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5797,7 +5677,7 @@ inline const flatbuffers::TypeTable *AvgPoolCountTypeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- AvgPoolCountTypeTypeTable ++ MNN::AvgPoolCountTypeTypeTable + }; + static const char * const names[] = { + "DEFAULT", +@@ -5805,7 +5685,7 @@ inline const flatbuffers::TypeTable *AvgPoolCountTypeTypeTable() { + "EXCLUDE_PADDING" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5818,7 +5698,7 @@ inline const flatbuffers::TypeTable *EltwiseTypeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- EltwiseTypeTypeTable ++ MNN::EltwiseTypeTypeTable + }; + static const char * const names[] = { + "PROD", +@@ -5827,7 +5707,7 @@ inline const flatbuffers::TypeTable *EltwiseTypeTypeTable() { + "SUB" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5843,7 +5723,7 @@ inline const flatbuffers::TypeTable *CoordinateTransformationModeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- CoordinateTransformationModeTypeTable ++ MNN::CoordinateTransformationModeTypeTable + }; + static const char * const names[] = { + "NotSet", +@@ -5855,7 +5735,7 @@ inline const flatbuffers::TypeTable *CoordinateTransformationModeTypeTable() { + "TensorflowCropAndResize" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 7, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 7, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5880,7 +5760,7 @@ inline const flatbuffers::TypeTable *Convolution2DCommonTypeTable() { + { flatbuffers::ET_INT, 1, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- PadModeTypeTable ++ MNN::PadModeTypeTable + }; + static const char * const names[] = { + "padX", +@@ -5901,7 +5781,7 @@ inline const flatbuffers::TypeTable *Convolution2DCommonTypeTable() { + "outPads" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 16, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 16, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5919,7 +5799,7 @@ inline const flatbuffers::TypeTable *Convolution3DCommonTypeTable() { + { flatbuffers::ET_BOOL, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- PadModeTypeTable ++ MNN::PadModeTypeTable + }; + static const char * const names[] = { + "dilates", +@@ -5933,7 +5813,7 @@ inline const flatbuffers::TypeTable *Convolution3DCommonTypeTable() { + "relu6" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5966,7 +5846,7 @@ inline const flatbuffers::TypeTable *IDSTQuanTypeTable() { + "has_scaleInt" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -5981,7 +5861,7 @@ inline const flatbuffers::TypeTable *QuantizedFloatParamTypeTable() { + { flatbuffers::ET_INT, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- QuantizeAlgoTypeTable ++ MNN::QuantizeAlgoTypeTable + }; + static const char * const names[] = { + "weight", +@@ -5992,7 +5872,7 @@ inline const flatbuffers::TypeTable *QuantizedFloatParamTypeTable() { + "nbits" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6006,9 +5886,9 @@ inline const flatbuffers::TypeTable *Convolution2DTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 2 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- Convolution2DCommonTypeTable, +- IDSTQuanTypeTable, +- QuantizedFloatParamTypeTable ++ MNN::Convolution2DCommonTypeTable, ++ MNN::IDSTQuanTypeTable, ++ MNN::QuantizedFloatParamTypeTable + }; + static const char * const names[] = { + "common", +@@ -6018,7 +5898,7 @@ inline const flatbuffers::TypeTable *Convolution2DTypeTable() { + "symmetricQuan" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6030,7 +5910,7 @@ inline const flatbuffers::TypeTable *Convolution3DTypeTable() { + { flatbuffers::ET_FLOAT, 1, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- Convolution3DCommonTypeTable ++ MNN::Convolution3DCommonTypeTable + }; + static const char * const names[] = { + "common", +@@ -6038,7 +5918,7 @@ inline const flatbuffers::TypeTable *Convolution3DTypeTable() { + "bias" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6055,7 +5935,7 @@ inline const flatbuffers::TypeTable *InnerProductTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- IDSTQuanTypeTable ++ MNN::IDSTQuanTypeTable + }; + static const char * const names[] = { + "outputCount", +@@ -6068,7 +5948,7 @@ inline const flatbuffers::TypeTable *InnerProductTypeTable() { + "quanParameter" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 8, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 8, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6090,10 +5970,10 @@ inline const flatbuffers::TypeTable *PoolTypeTable() { + { flatbuffers::ET_CHAR, 0, 3 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- PoolTypeTypeTable, +- PoolPadTypeTypeTable, +- DataTypeTypeTable, +- AvgPoolCountTypeTypeTable ++ MNN::PoolTypeTypeTable, ++ MNN::PoolPadTypeTypeTable, ++ MNN::DataTypeTypeTable, ++ MNN::AvgPoolCountTypeTypeTable + }; + static const char * const names[] = { + "padX", +@@ -6111,7 +5991,7 @@ inline const flatbuffers::TypeTable *PoolTypeTable() { + "countType" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 13, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 13, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6125,8 +6005,8 @@ inline const flatbuffers::TypeTable *Pool3DTypeTable() { + { flatbuffers::ET_CHAR, 0, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- PoolTypeTypeTable, +- PoolPadTypeTypeTable ++ MNN::PoolTypeTypeTable, ++ MNN::PoolPadTypeTypeTable + }; + static const char * const names[] = { + "strides", +@@ -6136,7 +6016,7 @@ inline const flatbuffers::TypeTable *Pool3DTypeTable() { + "padType" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6149,7 +6029,7 @@ inline const flatbuffers::TypeTable *ReluTypeTable() { + "slope" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6164,7 +6044,7 @@ inline const flatbuffers::TypeTable *Relu6TypeTable() { + "maxValue" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6179,7 +6059,7 @@ inline const flatbuffers::TypeTable *PReluTypeTable() { + "slope" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6192,7 +6072,7 @@ inline const flatbuffers::TypeTable *ELUTypeTable() { + "alpha" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6211,7 +6091,7 @@ inline const flatbuffers::TypeTable *LRNTypeTable() { + "beta" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6230,7 +6110,7 @@ inline const flatbuffers::TypeTable *ArgMaxTypeTable() { + "softmaxThreshold" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6243,7 +6123,7 @@ inline const flatbuffers::TypeTable *AxisTypeTable() { + "axis" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6255,8 +6135,8 @@ inline const flatbuffers::TypeTable *InputTypeTable() { + { flatbuffers::ET_CHAR, 0, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable, +- MNN_DATA_FORMATTypeTable ++ MNN::DataTypeTypeTable, ++ MNN::MNN_DATA_FORMATTypeTable + }; + static const char * const names[] = { + "dims", +@@ -6264,7 +6144,7 @@ inline const flatbuffers::TypeTable *InputTypeTable() { + "dformat" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6282,7 +6162,7 @@ inline const flatbuffers::TypeTable *LSTMTypeTable() { + { flatbuffers::ET_FLOAT, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- BlobTypeTable ++ MNN::BlobTypeTable + }; + static const char * const names[] = { + "outputCount", +@@ -6296,7 +6176,7 @@ inline const flatbuffers::TypeTable *LSTMTypeTable() { + "quantScale" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6308,7 +6188,7 @@ inline const flatbuffers::TypeTable *SliceTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- NetSourceTypeTable ++ MNN::NetSourceTypeTable + }; + static const char * const names[] = { + "axis", +@@ -6316,7 +6196,7 @@ inline const flatbuffers::TypeTable *SliceTypeTable() { + "sourceType" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6343,7 +6223,7 @@ inline const flatbuffers::TypeTable *BatchNormTypeTable() { + "epsilon" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 8, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 8, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6360,7 +6240,7 @@ inline const flatbuffers::TypeTable *ScaleTypeTable() { + "biasData" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6371,14 +6251,14 @@ inline const flatbuffers::TypeTable *EltwiseTypeTable() { + { flatbuffers::ET_FLOAT, 1, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- EltwiseTypeTypeTable ++ MNN::EltwiseTypeTypeTable + }; + static const char * const names[] = { + "type", + "coeff" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6393,7 +6273,7 @@ inline const flatbuffers::TypeTable *FlattenTypeTable() { + "endAxis" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6406,7 +6286,7 @@ inline const flatbuffers::TypeTable *PermuteTypeTable() { + "dims" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6417,14 +6297,14 @@ inline const flatbuffers::TypeTable *ReshapeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- MNN_DATA_FORMATTypeTable ++ MNN::MNN_DATA_FORMATTypeTable + }; + static const char * const names[] = { + "dims", + "dimType" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6455,7 +6335,7 @@ inline const flatbuffers::TypeTable *DetectionOutputTypeTable() { + "objectnessScore" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 10, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 10, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6472,7 +6352,7 @@ inline const flatbuffers::TypeTable *RoiPoolingTypeTable() { + "spatialScale" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6490,7 +6370,7 @@ inline const flatbuffers::TypeTable *ProposalTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- BlobTypeTable ++ MNN::BlobTypeTable + }; + static const char * const names[] = { + "featStride", +@@ -6504,7 +6384,7 @@ inline const flatbuffers::TypeTable *ProposalTypeTable() { + "anchors" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6524,7 +6404,7 @@ inline const flatbuffers::TypeTable *InterpTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- CoordinateTransformationModeTypeTable ++ MNN::CoordinateTransformationModeTypeTable + }; + static const char * const names[] = { + "widthScale", +@@ -6540,7 +6420,7 @@ inline const flatbuffers::TypeTable *InterpTypeTable() { + "ctm" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -6555,7 +6435,7 @@ inline const flatbuffers::TypeTable *ResizeTypeTable() { + "yScale" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6588,7 +6468,7 @@ inline const flatbuffers::TypeTable *PriorBoxTypeTable() { + "offset" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6607,7 +6487,7 @@ inline const flatbuffers::TypeTable *NormalizeTypeTable() { + "scale" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -6620,8 +6500,8 @@ inline const flatbuffers::TypeTable *EltwiseInt8TypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- EltwiseTypeTypeTable, +- QuantizedFloatParamTypeTable ++ MNN::EltwiseTypeTypeTable, ++ MNN::QuantizedFloatParamTypeTable + }; + static const char * const names[] = { + "type", +@@ -6630,7 +6510,7 @@ inline const flatbuffers::TypeTable *EltwiseInt8TypeTable() { + "outputQuan" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +diff --git a/schema/current/GpuLibrary_generated.h b/schema/current/GpuLibrary_generated.h +index 321f816c..84c1e9f0 100644 +--- a/schema/current/GpuLibrary_generated.h ++++ b/schema/current/GpuLibrary_generated.h +@@ -4,25 +4,31 @@ + #ifndef FLATBUFFERS_GENERATED_GPULIBRARY_MNN_H_ + #define FLATBUFFERS_GENERATED_GPULIBRARY_MNN_H_ + ++#include "flatbuffers/flatbuffers.h" + +-#include "Tensor_generated.h" + #include "Type_generated.h" ++#include "Tensor_generated.h" + + namespace MNN { + + struct GpuBuffer; ++struct GpuBufferBuilder; + struct GpuBufferT; + + struct GpuPipeline; ++struct GpuPipelineBuilder; + struct GpuPipelineT; + + struct GpuStage; ++struct GpuStageBuilder; + struct GpuStageT; + + struct GpuFunction; ++struct GpuFunctionBuilder; + struct GpuFunctionT; + + struct GpuLibrary; ++struct GpuLibraryBuilder; + struct GpuLibraryT; + + inline const flatbuffers::TypeTable *GpuBufferTypeTable(); +@@ -35,7 +41,7 @@ inline const flatbuffers::TypeTable *GpuFunctionTypeTable(); + + inline const flatbuffers::TypeTable *GpuLibraryTypeTable(); + +-enum STORAGE_TYPE { ++enum STORAGE_TYPE : int8_t { + STORAGE_TYPE_BUFFER = 0, + STORAGE_TYPE_UNIFORM = 1, + STORAGE_TYPE_IMAGE = 2, +@@ -53,7 +59,7 @@ inline const STORAGE_TYPE (&EnumValuesSTORAGE_TYPE())[3] { + } + + inline const char * const *EnumNamesSTORAGE_TYPE() { +- static const char * const names[] = { ++ static const char * const names[4] = { + "BUFFER", + "UNIFORM", + "IMAGE", +@@ -63,12 +69,12 @@ inline const char * const *EnumNamesSTORAGE_TYPE() { + } + + inline const char *EnumNameSTORAGE_TYPE(STORAGE_TYPE e) { +- if (e < STORAGE_TYPE_BUFFER || e > STORAGE_TYPE_IMAGE) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, STORAGE_TYPE_BUFFER, STORAGE_TYPE_IMAGE)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesSTORAGE_TYPE()[index]; + } + +-enum ACCESS_TYPE { ++enum ACCESS_TYPE : int8_t { + ACCESS_TYPE_READ_ONLY = 0, + ACCESS_TYPE_WRITE_ONLY = 1, + ACCESS_TYPE_READ_WRITE = 2, +@@ -86,7 +92,7 @@ inline const ACCESS_TYPE (&EnumValuesACCESS_TYPE())[3] { + } + + inline const char * const *EnumNamesACCESS_TYPE() { +- static const char * const names[] = { ++ static const char * const names[4] = { + "READ_ONLY", + "WRITE_ONLY", + "READ_WRITE", +@@ -96,24 +102,21 @@ inline const char * const *EnumNamesACCESS_TYPE() { + } + + inline const char *EnumNameACCESS_TYPE(ACCESS_TYPE e) { +- if (e < ACCESS_TYPE_READ_ONLY || e > ACCESS_TYPE_READ_WRITE) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, ACCESS_TYPE_READ_ONLY, ACCESS_TYPE_READ_WRITE)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesACCESS_TYPE()[index]; + } + + struct GpuBufferT : public flatbuffers::NativeTable { + typedef GpuBuffer TableType; +- ACCESS_TYPE access; +- STORAGE_TYPE storage; +- std::unique_ptr content; +- GpuBufferT() +- : access(ACCESS_TYPE_READ_ONLY), +- storage(STORAGE_TYPE_BUFFER) { +- } ++ MNN::ACCESS_TYPE access = MNN::ACCESS_TYPE_READ_ONLY; ++ MNN::STORAGE_TYPE storage = MNN::STORAGE_TYPE_BUFFER; ++ std::unique_ptr content{}; + }; + + struct GpuBuffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GpuBufferT NativeTableType; ++ typedef GpuBufferBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return GpuBufferTypeTable(); + } +@@ -122,14 +125,14 @@ struct GpuBuffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_STORAGE = 6, + VT_CONTENT = 8 + }; +- ACCESS_TYPE access() const { +- return static_cast(GetField(VT_ACCESS, 0)); ++ MNN::ACCESS_TYPE access() const { ++ return static_cast(GetField(VT_ACCESS, 0)); + } +- STORAGE_TYPE storage() const { +- return static_cast(GetField(VT_STORAGE, 0)); ++ MNN::STORAGE_TYPE storage() const { ++ return static_cast(GetField(VT_STORAGE, 0)); + } +- const Blob *content() const { +- return GetPointer(VT_CONTENT); ++ const MNN::Blob *content() const { ++ return GetPointer(VT_CONTENT); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -145,22 +148,22 @@ struct GpuBuffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GpuBufferBuilder { ++ typedef GpuBuffer Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_access(ACCESS_TYPE access) { ++ void add_access(MNN::ACCESS_TYPE access) { + fbb_.AddElement(GpuBuffer::VT_ACCESS, static_cast(access), 0); + } +- void add_storage(STORAGE_TYPE storage) { ++ void add_storage(MNN::STORAGE_TYPE storage) { + fbb_.AddElement(GpuBuffer::VT_STORAGE, static_cast(storage), 0); + } +- void add_content(flatbuffers::Offset content) { ++ void add_content(flatbuffers::Offset content) { + fbb_.AddOffset(GpuBuffer::VT_CONTENT, content); + } + explicit GpuBufferBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GpuBufferBuilder &operator=(const GpuBufferBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -170,9 +173,9 @@ struct GpuBufferBuilder { + + inline flatbuffers::Offset CreateGpuBuffer( + flatbuffers::FlatBufferBuilder &_fbb, +- ACCESS_TYPE access = ACCESS_TYPE_READ_ONLY, +- STORAGE_TYPE storage = STORAGE_TYPE_BUFFER, +- flatbuffers::Offset content = 0) { ++ MNN::ACCESS_TYPE access = MNN::ACCESS_TYPE_READ_ONLY, ++ MNN::STORAGE_TYPE storage = MNN::STORAGE_TYPE_BUFFER, ++ flatbuffers::Offset content = 0) { + GpuBufferBuilder builder_(_fbb); + builder_.add_content(content); + builder_.add_storage(storage); +@@ -184,18 +187,17 @@ flatbuffers::Offset CreateGpuBuffer(flatbuffers::FlatBufferBuilder &_ + + struct GpuPipelineT : public flatbuffers::NativeTable { + typedef GpuPipeline TableType; +- std::vector localSize; +- std::string key; +- std::vector metal; +- std::vector vulkan; +- std::string openglComputeShader; +- std::string openclKernel; +- GpuPipelineT() { +- } ++ std::vector localSize{}; ++ std::string key{}; ++ std::vector metal{}; ++ std::vector vulkan{}; ++ std::string openglComputeShader{}; ++ std::string openclKernel{}; + }; + + struct GpuPipeline FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GpuPipelineT NativeTableType; ++ typedef GpuPipelineBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return GpuPipelineTypeTable(); + } +@@ -247,6 +249,7 @@ struct GpuPipeline FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GpuPipelineBuilder { ++ typedef GpuPipeline Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_localSize(flatbuffers::Offset> localSize) { +@@ -271,7 +274,6 @@ struct GpuPipelineBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GpuPipelineBuilder &operator=(const GpuPipelineBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -325,23 +327,20 @@ flatbuffers::Offset CreateGpuPipeline(flatbuffers::FlatBufferBuilde + + struct GpuStageT : public flatbuffers::NativeTable { + typedef GpuStage TableType; +- std::string pipeline; +- std::vector groupSize; +- std::vector inputIndexes; +- std::vector outputIndexes; +- std::vector> middleBuffer; +- std::vector> constBuffer; +- int32_t globalSizeIndex; +- std::vector globalSizeDivide; +- bool requireSize; +- GpuStageT() +- : globalSizeIndex(0), +- requireSize(false) { +- } ++ std::string pipeline{}; ++ std::vector groupSize{}; ++ std::vector inputIndexes{}; ++ std::vector outputIndexes{}; ++ std::vector> middleBuffer{}; ++ std::vector> constBuffer{}; ++ int32_t globalSizeIndex = 0; ++ std::vector globalSizeDivide{}; ++ bool requireSize = false; + }; + + struct GpuStage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GpuStageT NativeTableType; ++ typedef GpuStageBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return GpuStageTypeTable(); + } +@@ -368,11 +367,11 @@ struct GpuStage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *outputIndexes() const { + return GetPointer *>(VT_OUTPUTINDEXES); + } +- const flatbuffers::Vector> *middleBuffer() const { +- return GetPointer> *>(VT_MIDDLEBUFFER); ++ const flatbuffers::Vector> *middleBuffer() const { ++ return GetPointer> *>(VT_MIDDLEBUFFER); + } +- const flatbuffers::Vector> *constBuffer() const { +- return GetPointer> *>(VT_CONSTBUFFER); ++ const flatbuffers::Vector> *constBuffer() const { ++ return GetPointer> *>(VT_CONSTBUFFER); + } + int32_t globalSizeIndex() const { + return GetField(VT_GLOBALSIZEINDEX, 0); +@@ -411,6 +410,7 @@ struct GpuStage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GpuStageBuilder { ++ typedef GpuStage Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_pipeline(flatbuffers::Offset pipeline) { +@@ -425,10 +425,10 @@ struct GpuStageBuilder { + void add_outputIndexes(flatbuffers::Offset> outputIndexes) { + fbb_.AddOffset(GpuStage::VT_OUTPUTINDEXES, outputIndexes); + } +- void add_middleBuffer(flatbuffers::Offset>> middleBuffer) { ++ void add_middleBuffer(flatbuffers::Offset>> middleBuffer) { + fbb_.AddOffset(GpuStage::VT_MIDDLEBUFFER, middleBuffer); + } +- void add_constBuffer(flatbuffers::Offset>> constBuffer) { ++ void add_constBuffer(flatbuffers::Offset>> constBuffer) { + fbb_.AddOffset(GpuStage::VT_CONSTBUFFER, constBuffer); + } + void add_globalSizeIndex(int32_t globalSizeIndex) { +@@ -444,7 +444,6 @@ struct GpuStageBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GpuStageBuilder &operator=(const GpuStageBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -458,8 +457,8 @@ inline flatbuffers::Offset CreateGpuStage( + flatbuffers::Offset> groupSize = 0, + flatbuffers::Offset> inputIndexes = 0, + flatbuffers::Offset> outputIndexes = 0, +- flatbuffers::Offset>> middleBuffer = 0, +- flatbuffers::Offset>> constBuffer = 0, ++ flatbuffers::Offset>> middleBuffer = 0, ++ flatbuffers::Offset>> constBuffer = 0, + int32_t globalSizeIndex = 0, + flatbuffers::Offset> globalSizeDivide = 0, + bool requireSize = false) { +@@ -482,8 +481,8 @@ inline flatbuffers::Offset CreateGpuStageDirect( + const std::vector *groupSize = nullptr, + const std::vector *inputIndexes = nullptr, + const std::vector *outputIndexes = nullptr, +- const std::vector> *middleBuffer = nullptr, +- const std::vector> *constBuffer = nullptr, ++ const std::vector> *middleBuffer = nullptr, ++ const std::vector> *constBuffer = nullptr, + int32_t globalSizeIndex = 0, + const std::vector *globalSizeDivide = nullptr, + bool requireSize = false) { +@@ -491,8 +490,8 @@ inline flatbuffers::Offset CreateGpuStageDirect( + auto groupSize__ = groupSize ? _fbb.CreateVector(*groupSize) : 0; + auto inputIndexes__ = inputIndexes ? _fbb.CreateVector(*inputIndexes) : 0; + auto outputIndexes__ = outputIndexes ? _fbb.CreateVector(*outputIndexes) : 0; +- auto middleBuffer__ = middleBuffer ? _fbb.CreateVector>(*middleBuffer) : 0; +- auto constBuffer__ = constBuffer ? _fbb.CreateVector>(*constBuffer) : 0; ++ auto middleBuffer__ = middleBuffer ? _fbb.CreateVector>(*middleBuffer) : 0; ++ auto constBuffer__ = constBuffer ? _fbb.CreateVector>(*constBuffer) : 0; + auto globalSizeDivide__ = globalSizeDivide ? _fbb.CreateVector(*globalSizeDivide) : 0; + return MNN::CreateGpuStage( + _fbb, +@@ -511,14 +510,13 @@ flatbuffers::Offset CreateGpuStage(flatbuffers::FlatBufferBuilder &_fb + + struct GpuFunctionT : public flatbuffers::NativeTable { + typedef GpuFunction TableType; +- std::vector> stags; +- std::string name; +- GpuFunctionT() { +- } ++ std::vector> stags{}; ++ std::string name{}; + }; + + struct GpuFunction FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GpuFunctionT NativeTableType; ++ typedef GpuFunctionBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return GpuFunctionTypeTable(); + } +@@ -526,8 +524,8 @@ struct GpuFunction FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_STAGS = 4, + VT_NAME = 6 + }; +- const flatbuffers::Vector> *stags() const { +- return GetPointer> *>(VT_STAGS); ++ const flatbuffers::Vector> *stags() const { ++ return GetPointer> *>(VT_STAGS); + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); +@@ -547,9 +545,10 @@ struct GpuFunction FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GpuFunctionBuilder { ++ typedef GpuFunction Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_stags(flatbuffers::Offset>> stags) { ++ void add_stags(flatbuffers::Offset>> stags) { + fbb_.AddOffset(GpuFunction::VT_STAGS, stags); + } + void add_name(flatbuffers::Offset name) { +@@ -559,7 +558,6 @@ struct GpuFunctionBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GpuFunctionBuilder &operator=(const GpuFunctionBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -569,7 +567,7 @@ struct GpuFunctionBuilder { + + inline flatbuffers::Offset CreateGpuFunction( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset>> stags = 0, ++ flatbuffers::Offset>> stags = 0, + flatbuffers::Offset name = 0) { + GpuFunctionBuilder builder_(_fbb); + builder_.add_name(name); +@@ -579,9 +577,9 @@ inline flatbuffers::Offset CreateGpuFunction( + + inline flatbuffers::Offset CreateGpuFunctionDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- const std::vector> *stags = nullptr, ++ const std::vector> *stags = nullptr, + const char *name = nullptr) { +- auto stags__ = stags ? _fbb.CreateVector>(*stags) : 0; ++ auto stags__ = stags ? _fbb.CreateVector>(*stags) : 0; + auto name__ = name ? _fbb.CreateString(name) : 0; + return MNN::CreateGpuFunction( + _fbb, +@@ -593,15 +591,14 @@ flatbuffers::Offset CreateGpuFunction(flatbuffers::FlatBufferBuilde + + struct GpuLibraryT : public flatbuffers::NativeTable { + typedef GpuLibrary TableType; +- std::vector> functions; +- std::vector> pipeline; +- std::string name; +- GpuLibraryT() { +- } ++ std::vector> functions{}; ++ std::vector> pipeline{}; ++ std::string name{}; + }; + + struct GpuLibrary FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GpuLibraryT NativeTableType; ++ typedef GpuLibraryBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return GpuLibraryTypeTable(); + } +@@ -610,11 +607,11 @@ struct GpuLibrary FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_PIPELINE = 6, + VT_NAME = 8 + }; +- const flatbuffers::Vector> *functions() const { +- return GetPointer> *>(VT_FUNCTIONS); ++ const flatbuffers::Vector> *functions() const { ++ return GetPointer> *>(VT_FUNCTIONS); + } +- const flatbuffers::Vector> *pipeline() const { +- return GetPointer> *>(VT_PIPELINE); ++ const flatbuffers::Vector> *pipeline() const { ++ return GetPointer> *>(VT_PIPELINE); + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); +@@ -637,12 +634,13 @@ struct GpuLibrary FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GpuLibraryBuilder { ++ typedef GpuLibrary Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_functions(flatbuffers::Offset>> functions) { ++ void add_functions(flatbuffers::Offset>> functions) { + fbb_.AddOffset(GpuLibrary::VT_FUNCTIONS, functions); + } +- void add_pipeline(flatbuffers::Offset>> pipeline) { ++ void add_pipeline(flatbuffers::Offset>> pipeline) { + fbb_.AddOffset(GpuLibrary::VT_PIPELINE, pipeline); + } + void add_name(flatbuffers::Offset name) { +@@ -652,7 +650,6 @@ struct GpuLibraryBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GpuLibraryBuilder &operator=(const GpuLibraryBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -662,8 +659,8 @@ struct GpuLibraryBuilder { + + inline flatbuffers::Offset CreateGpuLibrary( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset>> functions = 0, +- flatbuffers::Offset>> pipeline = 0, ++ flatbuffers::Offset>> functions = 0, ++ flatbuffers::Offset>> pipeline = 0, + flatbuffers::Offset name = 0) { + GpuLibraryBuilder builder_(_fbb); + builder_.add_name(name); +@@ -674,11 +671,11 @@ inline flatbuffers::Offset CreateGpuLibrary( + + inline flatbuffers::Offset CreateGpuLibraryDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- const std::vector> *functions = nullptr, +- const std::vector> *pipeline = nullptr, ++ const std::vector> *functions = nullptr, ++ const std::vector> *pipeline = nullptr, + const char *name = nullptr) { +- auto functions__ = functions ? _fbb.CreateVector>(*functions) : 0; +- auto pipeline__ = pipeline ? _fbb.CreateVector>(*pipeline) : 0; ++ auto functions__ = functions ? _fbb.CreateVector>(*functions) : 0; ++ auto pipeline__ = pipeline ? _fbb.CreateVector>(*pipeline) : 0; + auto name__ = name ? _fbb.CreateString(name) : 0; + return MNN::CreateGpuLibrary( + _fbb, +@@ -690,17 +687,17 @@ inline flatbuffers::Offset CreateGpuLibraryDirect( + flatbuffers::Offset CreateGpuLibrary(flatbuffers::FlatBufferBuilder &_fbb, const GpuLibraryT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + inline GpuBufferT *GpuBuffer::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GpuBufferT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GpuBufferT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GpuBuffer::UnPackTo(GpuBufferT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = access(); _o->access = _e; }; +- { auto _e = storage(); _o->storage = _e; }; +- { auto _e = content(); if (_e) _o->content = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = access(); _o->access = _e; } ++ { auto _e = storage(); _o->storage = _e; } ++ { auto _e = content(); if (_e) _o->content = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset GpuBuffer::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuBufferT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -722,20 +719,20 @@ inline flatbuffers::Offset CreateGpuBuffer(flatbuffers::FlatBufferBui + } + + inline GpuPipelineT *GpuPipeline::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GpuPipelineT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GpuPipelineT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GpuPipeline::UnPackTo(GpuPipelineT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = localSize(); if (_e) { _o->localSize.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->localSize[_i] = _e->Get(_i); } } }; +- { auto _e = key(); if (_e) _o->key = _e->str(); }; +- { auto _e = metal(); if (_e) { _o->metal.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->metal[_i] = _e->Get(_i); } } }; +- { auto _e = vulkan(); if (_e) { _o->vulkan.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->vulkan[_i] = _e->Get(_i); } } }; +- { auto _e = openglComputeShader(); if (_e) _o->openglComputeShader = _e->str(); }; +- { auto _e = openclKernel(); if (_e) _o->openclKernel = _e->str(); }; ++ { auto _e = localSize(); if (_e) { _o->localSize.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->localSize[_i] = _e->Get(_i); } } } ++ { auto _e = key(); if (_e) _o->key = _e->str(); } ++ { auto _e = metal(); if (_e) { _o->metal.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->metal.begin()); } } ++ { auto _e = vulkan(); if (_e) { _o->vulkan.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->vulkan.begin()); } } ++ { auto _e = openglComputeShader(); if (_e) _o->openglComputeShader = _e->str(); } ++ { auto _e = openclKernel(); if (_e) _o->openclKernel = _e->str(); } + } + + inline flatbuffers::Offset GpuPipeline::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuPipelineT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -763,23 +760,23 @@ inline flatbuffers::Offset CreateGpuPipeline(flatbuffers::FlatBuffe + } + + inline GpuStageT *GpuStage::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GpuStageT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GpuStageT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GpuStage::UnPackTo(GpuStageT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = pipeline(); if (_e) _o->pipeline = _e->str(); }; +- { auto _e = groupSize(); if (_e) { _o->groupSize.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->groupSize[_i] = _e->Get(_i); } } }; +- { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } }; +- { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } }; +- { auto _e = middleBuffer(); if (_e) { _o->middleBuffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->middleBuffer[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; +- { auto _e = constBuffer(); if (_e) { _o->constBuffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->constBuffer[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; +- { auto _e = globalSizeIndex(); _o->globalSizeIndex = _e; }; +- { auto _e = globalSizeDivide(); if (_e) { _o->globalSizeDivide.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->globalSizeDivide[_i] = _e->Get(_i); } } }; +- { auto _e = requireSize(); _o->requireSize = _e; }; ++ { auto _e = pipeline(); if (_e) _o->pipeline = _e->str(); } ++ { auto _e = groupSize(); if (_e) { _o->groupSize.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->groupSize[_i] = _e->Get(_i); } } } ++ { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } } ++ { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } } ++ { auto _e = middleBuffer(); if (_e) { _o->middleBuffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->middleBuffer[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = constBuffer(); if (_e) { _o->constBuffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->constBuffer[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = globalSizeIndex(); _o->globalSizeIndex = _e; } ++ { auto _e = globalSizeDivide(); if (_e) { _o->globalSizeDivide.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->globalSizeDivide[_i] = _e->Get(_i); } } } ++ { auto _e = requireSize(); _o->requireSize = _e; } + } + + inline flatbuffers::Offset GpuStage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuStageT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -794,8 +791,8 @@ inline flatbuffers::Offset CreateGpuStage(flatbuffers::FlatBufferBuild + auto _groupSize = _o->groupSize.size() ? _fbb.CreateVector(_o->groupSize) : 0; + auto _inputIndexes = _o->inputIndexes.size() ? _fbb.CreateVector(_o->inputIndexes) : 0; + auto _outputIndexes = _o->outputIndexes.size() ? _fbb.CreateVector(_o->outputIndexes) : 0; +- auto _middleBuffer = _o->middleBuffer.size() ? _fbb.CreateVector> (_o->middleBuffer.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuBuffer(*__va->__fbb, __va->__o->middleBuffer[i].get(), __va->__rehasher); }, &_va ) : 0; +- auto _constBuffer = _o->constBuffer.size() ? _fbb.CreateVector> (_o->constBuffer.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuBuffer(*__va->__fbb, __va->__o->constBuffer[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _middleBuffer = _o->middleBuffer.size() ? _fbb.CreateVector> (_o->middleBuffer.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuBuffer(*__va->__fbb, __va->__o->middleBuffer[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _constBuffer = _o->constBuffer.size() ? _fbb.CreateVector> (_o->constBuffer.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuBuffer(*__va->__fbb, __va->__o->constBuffer[i].get(), __va->__rehasher); }, &_va ) : 0; + auto _globalSizeIndex = _o->globalSizeIndex; + auto _globalSizeDivide = _o->globalSizeDivide.size() ? _fbb.CreateVector(_o->globalSizeDivide) : 0; + auto _requireSize = _o->requireSize; +@@ -813,16 +810,16 @@ inline flatbuffers::Offset CreateGpuStage(flatbuffers::FlatBufferBuild + } + + inline GpuFunctionT *GpuFunction::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GpuFunctionT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GpuFunctionT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GpuFunction::UnPackTo(GpuFunctionT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = stags(); if (_e) { _o->stags.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->stags[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; +- { auto _e = name(); if (_e) _o->name = _e->str(); }; ++ { auto _e = stags(); if (_e) { _o->stags.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->stags[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = name(); if (_e) _o->name = _e->str(); } + } + + inline flatbuffers::Offset GpuFunction::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuFunctionT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -833,7 +830,7 @@ inline flatbuffers::Offset CreateGpuFunction(flatbuffers::FlatBuffe + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GpuFunctionT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; +- auto _stags = _o->stags.size() ? _fbb.CreateVector> (_o->stags.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuStage(*__va->__fbb, __va->__o->stags[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _stags = _o->stags.size() ? _fbb.CreateVector> (_o->stags.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuStage(*__va->__fbb, __va->__o->stags[i].get(), __va->__rehasher); }, &_va ) : 0; + auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); + return MNN::CreateGpuFunction( + _fbb, +@@ -842,17 +839,17 @@ inline flatbuffers::Offset CreateGpuFunction(flatbuffers::FlatBuffe + } + + inline GpuLibraryT *GpuLibrary::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GpuLibraryT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GpuLibraryT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GpuLibrary::UnPackTo(GpuLibraryT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = functions(); if (_e) { _o->functions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->functions[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; +- { auto _e = pipeline(); if (_e) { _o->pipeline.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pipeline[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; +- { auto _e = name(); if (_e) _o->name = _e->str(); }; ++ { auto _e = functions(); if (_e) { _o->functions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->functions[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = pipeline(); if (_e) { _o->pipeline.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pipeline[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = name(); if (_e) _o->name = _e->str(); } + } + + inline flatbuffers::Offset GpuLibrary::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuLibraryT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -863,8 +860,8 @@ inline flatbuffers::Offset CreateGpuLibrary(flatbuffers::FlatBufferB + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GpuLibraryT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; +- auto _functions = _o->functions.size() ? _fbb.CreateVector> (_o->functions.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuFunction(*__va->__fbb, __va->__o->functions[i].get(), __va->__rehasher); }, &_va ) : 0; +- auto _pipeline = _o->pipeline.size() ? _fbb.CreateVector> (_o->pipeline.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuPipeline(*__va->__fbb, __va->__o->pipeline[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _functions = _o->functions.size() ? _fbb.CreateVector> (_o->functions.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuFunction(*__va->__fbb, __va->__o->functions[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _pipeline = _o->pipeline.size() ? _fbb.CreateVector> (_o->pipeline.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuPipeline(*__va->__fbb, __va->__o->pipeline[i].get(), __va->__rehasher); }, &_va ) : 0; + auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); + return MNN::CreateGpuLibrary( + _fbb, +@@ -880,7 +877,7 @@ inline const flatbuffers::TypeTable *STORAGE_TYPETypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- STORAGE_TYPETypeTable ++ MNN::STORAGE_TYPETypeTable + }; + static const char * const names[] = { + "BUFFER", +@@ -888,7 +885,7 @@ inline const flatbuffers::TypeTable *STORAGE_TYPETypeTable() { + "IMAGE" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -900,7 +897,7 @@ inline const flatbuffers::TypeTable *ACCESS_TYPETypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ACCESS_TYPETypeTable ++ MNN::ACCESS_TYPETypeTable + }; + static const char * const names[] = { + "READ_ONLY", +@@ -908,7 +905,7 @@ inline const flatbuffers::TypeTable *ACCESS_TYPETypeTable() { + "READ_WRITE" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -920,9 +917,9 @@ inline const flatbuffers::TypeTable *GpuBufferTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 2 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ACCESS_TYPETypeTable, +- STORAGE_TYPETypeTable, +- BlobTypeTable ++ MNN::ACCESS_TYPETypeTable, ++ MNN::STORAGE_TYPETypeTable, ++ MNN::BlobTypeTable + }; + static const char * const names[] = { + "access", +@@ -930,7 +927,7 @@ inline const flatbuffers::TypeTable *GpuBufferTypeTable() { + "content" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -953,7 +950,7 @@ inline const flatbuffers::TypeTable *GpuPipelineTypeTable() { + "openclKernel" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 6, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 6, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -971,7 +968,7 @@ inline const flatbuffers::TypeTable *GpuStageTypeTable() { + { flatbuffers::ET_BOOL, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- GpuBufferTypeTable ++ MNN::GpuBufferTypeTable + }; + static const char * const names[] = { + "pipeline", +@@ -985,7 +982,7 @@ inline const flatbuffers::TypeTable *GpuStageTypeTable() { + "requireSize" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -996,14 +993,14 @@ inline const flatbuffers::TypeTable *GpuFunctionTypeTable() { + { flatbuffers::ET_STRING, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- GpuStageTypeTable ++ MNN::GpuStageTypeTable + }; + static const char * const names[] = { + "stags", + "name" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -1015,8 +1012,8 @@ inline const flatbuffers::TypeTable *GpuLibraryTypeTable() { + { flatbuffers::ET_STRING, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- GpuFunctionTypeTable, +- GpuPipelineTypeTable ++ MNN::GpuFunctionTypeTable, ++ MNN::GpuPipelineTypeTable + }; + static const char * const names[] = { + "functions", +@@ -1024,7 +1021,7 @@ inline const flatbuffers::TypeTable *GpuLibraryTypeTable() { + "name" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +diff --git a/schema/current/MNN_generated.h b/schema/current/MNN_generated.h +index 63a1d207..d5552b87 100644 +--- a/schema/current/MNN_generated.h ++++ b/schema/current/MNN_generated.h +@@ -4,48 +4,60 @@ + #ifndef FLATBUFFERS_GENERATED_MNN_MNN_H_ + #define FLATBUFFERS_GENERATED_MNN_MNN_H_ + ++#include "flatbuffers/flatbuffers.h" + +-#include "CaffeOp_generated.h" +-#include "GpuLibrary_generated.h" + #include "TFQuantizeOp_generated.h" +-#include "Tensor_generated.h" +-#include "TensorflowOp_generated.h" + #include "Type_generated.h" + #include "UserDefine_generated.h" ++#include "CaffeOp_generated.h" ++#include "GpuLibrary_generated.h" ++#include "TensorflowOp_generated.h" ++#include "Tensor_generated.h" + + namespace MNN { + + struct Plugin; ++struct PluginBuilder; + struct PluginT; + + struct Extra; ++struct ExtraBuilder; + struct ExtraT; + + struct StringVec; ++struct StringVecBuilder; + struct StringVecT; + + struct WhileParam; ++struct WhileParamBuilder; + struct WhileParamT; + + struct IfParam; ++struct IfParamBuilder; + struct IfParamT; + + struct Op; ++struct OpBuilder; + struct OpT; + + struct View; ++struct ViewBuilder; + struct ViewT; + + struct Region; ++struct RegionBuilder; + struct RegionT; + + struct TensorDescribe; ++struct TensorDescribeBuilder; + struct TensorDescribeT; + + struct SubGraphProto; ++struct SubGraphProtoBuilder; + struct SubGraphProtoT; + + struct Net; ++struct NetBuilder; + struct NetT; + + inline const flatbuffers::TypeTable *PluginTypeTable(); +@@ -70,7 +82,7 @@ inline const flatbuffers::TypeTable *SubGraphProtoTypeTable(); + + inline const flatbuffers::TypeTable *NetTypeTable(); + +-enum OpType { ++enum OpType : int32_t { + OpType_AbsVal = 0, + OpType_QuantizedAdd = 1, + OpType_ArgMax = 2, +@@ -382,7 +394,7 @@ inline const OpType (&EnumValuesOpType())[150] { + } + + inline const char * const *EnumNamesOpType() { +- static const char * const names[] = { ++ static const char * const names[605] = { + "AbsVal", + "QuantizedAdd", + "ArgMax", +@@ -993,12 +1005,12 @@ inline const char * const *EnumNamesOpType() { + } + + inline const char *EnumNameOpType(OpType e) { +- if (e < OpType_AbsVal || e > OpType_LayerNorm) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, OpType_AbsVal, OpType_LayerNorm)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesOpType()[index]; + } + +-enum OpParameter { ++enum OpParameter : uint8_t { + OpParameter_NONE = 0, + OpParameter_QuantizedAdd = 1, + OpParameter_ArgMax = 2, +@@ -1188,7 +1200,7 @@ inline const OpParameter (&EnumValuesOpParameter())[89] { + } + + inline const char * const *EnumNamesOpParameter() { +- static const char * const names[] = { ++ static const char * const names[90] = { + "NONE", + "QuantizedAdd", + "ArgMax", +@@ -1284,8 +1296,8 @@ inline const char * const *EnumNamesOpParameter() { + } + + inline const char *EnumNameOpParameter(OpParameter e) { +- if (e < OpParameter_NONE || e > OpParameter_LayerNorm) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, OpParameter_NONE, OpParameter_LayerNorm)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesOpParameter()[index]; + } + +@@ -1293,355 +1305,355 @@ template struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_NONE; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedAdd; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_ArgMax; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_AsString; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Axis; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_BatchNorm; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_BinaryOp; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Blob; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_CastParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Convolution2D; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Crop; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_CropAndResize; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Dequantize; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_DetectionOutput; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Eltwise; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_ExpandDims; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Fill; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Flatten; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Gather; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_GatherV2; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_InnerProduct; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Input; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Interp; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_LRN; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_LSTM; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_MatMul; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_NonMaxSuppressionV2; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Normalize; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_PackParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Permute; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Plugin; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Pool; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_PRelu; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_PriorBox; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Proposal; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedAvgPool; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedBiasAdd; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedConcat; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedLogistic; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedMatMul; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedMaxPool; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedRelu; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedRelu6; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedReshape; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedSoftmax; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizeMaxMin; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizeV2; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Range; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Rank; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_ReduceJoin; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_ReductionParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Relu; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Relu6; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_RequantizationRange; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Requantize; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Reshape; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Resize; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_RoiPooling; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Scale; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Selu; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Size; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Slice; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_SliceTf; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_SpaceBatch; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_SqueezeParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_StridedSliceParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_TensorConvertInfo; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_TfQuantizedConv2D; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_TopKV2; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Transpose; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_UnaryOp; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_MomentsParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_RNNParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_BatchMatMulParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_QuantizedFloatParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_DepthSpaceParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_EltwiseInt8; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_ReverseSequenceParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Extra; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Pool3D; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_Convolution3D; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_ELU; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_DetectionPostProcessParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_OneHotParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_PadParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_WhileParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_IfParam; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_RandomUniform; + }; + +-template<> struct OpParameterTraits { ++template<> struct OpParameterTraits { + static const OpParameter enum_value = OpParameter_LayerNorm; + }; + +@@ -1653,8 +1665,8 @@ struct OpParameterUnion { + OpParameterUnion(OpParameterUnion&& u) FLATBUFFERS_NOEXCEPT : + type(OpParameter_NONE), value(nullptr) + { std::swap(type, u.type); std::swap(value, u.value); } +- OpParameterUnion(const OpParameterUnion &) FLATBUFFERS_NOEXCEPT; +- OpParameterUnion &operator=(const OpParameterUnion &u) FLATBUFFERS_NOEXCEPT ++ OpParameterUnion(const OpParameterUnion &); ++ OpParameterUnion &operator=(const OpParameterUnion &u) + { OpParameterUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } + OpParameterUnion &operator=(OpParameterUnion &&u) FLATBUFFERS_NOEXCEPT + { std::swap(type, u.type); std::swap(value, u.value); return *this; } +@@ -1665,10 +1677,11 @@ struct OpParameterUnion { + #ifndef FLATBUFFERS_CPP98_STL + template + void Set(T&& val) { ++ using RT = typename std::remove_reference::type; + Reset(); +- type = OpParameterTraits::enum_value; ++ type = OpParameterTraits::enum_value; + if (type != OpParameter_NONE) { +- value = new T(std::forward(val)); ++ value = new RT(std::forward(val)); + } + } + #endif // FLATBUFFERS_CPP98_STL +@@ -1676,716 +1689,716 @@ struct OpParameterUnion { + static void *UnPack(const void *obj, OpParameter type, const flatbuffers::resolver_function_t *resolver); + flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; + +- QuantizedAddT *AsQuantizedAdd() { ++ MNN::QuantizedAddT *AsQuantizedAdd() { + return type == OpParameter_QuantizedAdd ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedAddT *AsQuantizedAdd() const { ++ const MNN::QuantizedAddT *AsQuantizedAdd() const { + return type == OpParameter_QuantizedAdd ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ArgMaxT *AsArgMax() { ++ MNN::ArgMaxT *AsArgMax() { + return type == OpParameter_ArgMax ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ArgMaxT *AsArgMax() const { ++ const MNN::ArgMaxT *AsArgMax() const { + return type == OpParameter_ArgMax ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- AsStringT *AsAsString() { ++ MNN::AsStringT *AsAsString() { + return type == OpParameter_AsString ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const AsStringT *AsAsString() const { ++ const MNN::AsStringT *AsAsString() const { + return type == OpParameter_AsString ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- AxisT *AsAxis() { ++ MNN::AxisT *AsAxis() { + return type == OpParameter_Axis ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const AxisT *AsAxis() const { ++ const MNN::AxisT *AsAxis() const { + return type == OpParameter_Axis ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- BatchNormT *AsBatchNorm() { ++ MNN::BatchNormT *AsBatchNorm() { + return type == OpParameter_BatchNorm ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const BatchNormT *AsBatchNorm() const { ++ const MNN::BatchNormT *AsBatchNorm() const { + return type == OpParameter_BatchNorm ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- BinaryOpT *AsBinaryOp() { ++ MNN::BinaryOpT *AsBinaryOp() { + return type == OpParameter_BinaryOp ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const BinaryOpT *AsBinaryOp() const { ++ const MNN::BinaryOpT *AsBinaryOp() const { + return type == OpParameter_BinaryOp ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- BlobT *AsBlob() { ++ MNN::BlobT *AsBlob() { + return type == OpParameter_Blob ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const BlobT *AsBlob() const { ++ const MNN::BlobT *AsBlob() const { + return type == OpParameter_Blob ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- CastParamT *AsCastParam() { ++ MNN::CastParamT *AsCastParam() { + return type == OpParameter_CastParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const CastParamT *AsCastParam() const { ++ const MNN::CastParamT *AsCastParam() const { + return type == OpParameter_CastParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- Convolution2DT *AsConvolution2D() { ++ MNN::Convolution2DT *AsConvolution2D() { + return type == OpParameter_Convolution2D ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const Convolution2DT *AsConvolution2D() const { ++ const MNN::Convolution2DT *AsConvolution2D() const { + return type == OpParameter_Convolution2D ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- CropT *AsCrop() { ++ MNN::CropT *AsCrop() { + return type == OpParameter_Crop ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const CropT *AsCrop() const { ++ const MNN::CropT *AsCrop() const { + return type == OpParameter_Crop ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- CropAndResizeT *AsCropAndResize() { ++ MNN::CropAndResizeT *AsCropAndResize() { + return type == OpParameter_CropAndResize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const CropAndResizeT *AsCropAndResize() const { ++ const MNN::CropAndResizeT *AsCropAndResize() const { + return type == OpParameter_CropAndResize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- DequantizeT *AsDequantize() { ++ MNN::DequantizeT *AsDequantize() { + return type == OpParameter_Dequantize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const DequantizeT *AsDequantize() const { ++ const MNN::DequantizeT *AsDequantize() const { + return type == OpParameter_Dequantize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- DetectionOutputT *AsDetectionOutput() { ++ MNN::DetectionOutputT *AsDetectionOutput() { + return type == OpParameter_DetectionOutput ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const DetectionOutputT *AsDetectionOutput() const { ++ const MNN::DetectionOutputT *AsDetectionOutput() const { + return type == OpParameter_DetectionOutput ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- EltwiseT *AsEltwise() { ++ MNN::EltwiseT *AsEltwise() { + return type == OpParameter_Eltwise ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const EltwiseT *AsEltwise() const { ++ const MNN::EltwiseT *AsEltwise() const { + return type == OpParameter_Eltwise ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ExpandDimsT *AsExpandDims() { ++ MNN::ExpandDimsT *AsExpandDims() { + return type == OpParameter_ExpandDims ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ExpandDimsT *AsExpandDims() const { ++ const MNN::ExpandDimsT *AsExpandDims() const { + return type == OpParameter_ExpandDims ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- FillT *AsFill() { ++ MNN::FillT *AsFill() { + return type == OpParameter_Fill ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const FillT *AsFill() const { ++ const MNN::FillT *AsFill() const { + return type == OpParameter_Fill ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- FlattenT *AsFlatten() { ++ MNN::FlattenT *AsFlatten() { + return type == OpParameter_Flatten ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const FlattenT *AsFlatten() const { ++ const MNN::FlattenT *AsFlatten() const { + return type == OpParameter_Flatten ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- GatherT *AsGather() { ++ MNN::GatherT *AsGather() { + return type == OpParameter_Gather ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const GatherT *AsGather() const { ++ const MNN::GatherT *AsGather() const { + return type == OpParameter_Gather ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- GatherV2T *AsGatherV2() { ++ MNN::GatherV2T *AsGatherV2() { + return type == OpParameter_GatherV2 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const GatherV2T *AsGatherV2() const { ++ const MNN::GatherV2T *AsGatherV2() const { + return type == OpParameter_GatherV2 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- InnerProductT *AsInnerProduct() { ++ MNN::InnerProductT *AsInnerProduct() { + return type == OpParameter_InnerProduct ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const InnerProductT *AsInnerProduct() const { ++ const MNN::InnerProductT *AsInnerProduct() const { + return type == OpParameter_InnerProduct ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- InputT *AsInput() { ++ MNN::InputT *AsInput() { + return type == OpParameter_Input ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const InputT *AsInput() const { ++ const MNN::InputT *AsInput() const { + return type == OpParameter_Input ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- InterpT *AsInterp() { ++ MNN::InterpT *AsInterp() { + return type == OpParameter_Interp ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const InterpT *AsInterp() const { ++ const MNN::InterpT *AsInterp() const { + return type == OpParameter_Interp ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- LRNT *AsLRN() { ++ MNN::LRNT *AsLRN() { + return type == OpParameter_LRN ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const LRNT *AsLRN() const { ++ const MNN::LRNT *AsLRN() const { + return type == OpParameter_LRN ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- LSTMT *AsLSTM() { ++ MNN::LSTMT *AsLSTM() { + return type == OpParameter_LSTM ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const LSTMT *AsLSTM() const { ++ const MNN::LSTMT *AsLSTM() const { + return type == OpParameter_LSTM ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- MatMulT *AsMatMul() { ++ MNN::MatMulT *AsMatMul() { + return type == OpParameter_MatMul ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const MatMulT *AsMatMul() const { ++ const MNN::MatMulT *AsMatMul() const { + return type == OpParameter_MatMul ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- NonMaxSuppressionV2T *AsNonMaxSuppressionV2() { ++ MNN::NonMaxSuppressionV2T *AsNonMaxSuppressionV2() { + return type == OpParameter_NonMaxSuppressionV2 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const NonMaxSuppressionV2T *AsNonMaxSuppressionV2() const { ++ const MNN::NonMaxSuppressionV2T *AsNonMaxSuppressionV2() const { + return type == OpParameter_NonMaxSuppressionV2 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- NormalizeT *AsNormalize() { ++ MNN::NormalizeT *AsNormalize() { + return type == OpParameter_Normalize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const NormalizeT *AsNormalize() const { ++ const MNN::NormalizeT *AsNormalize() const { + return type == OpParameter_Normalize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- PackParamT *AsPackParam() { ++ MNN::PackParamT *AsPackParam() { + return type == OpParameter_PackParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const PackParamT *AsPackParam() const { ++ const MNN::PackParamT *AsPackParam() const { + return type == OpParameter_PackParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- PermuteT *AsPermute() { ++ MNN::PermuteT *AsPermute() { + return type == OpParameter_Permute ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const PermuteT *AsPermute() const { ++ const MNN::PermuteT *AsPermute() const { + return type == OpParameter_Permute ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- PluginT *AsPlugin() { ++ MNN::PluginT *AsPlugin() { + return type == OpParameter_Plugin ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const PluginT *AsPlugin() const { ++ const MNN::PluginT *AsPlugin() const { + return type == OpParameter_Plugin ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- PoolT *AsPool() { ++ MNN::PoolT *AsPool() { + return type == OpParameter_Pool ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const PoolT *AsPool() const { ++ const MNN::PoolT *AsPool() const { + return type == OpParameter_Pool ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- PReluT *AsPRelu() { ++ MNN::PReluT *AsPRelu() { + return type == OpParameter_PRelu ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const PReluT *AsPRelu() const { ++ const MNN::PReluT *AsPRelu() const { + return type == OpParameter_PRelu ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- PriorBoxT *AsPriorBox() { ++ MNN::PriorBoxT *AsPriorBox() { + return type == OpParameter_PriorBox ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const PriorBoxT *AsPriorBox() const { ++ const MNN::PriorBoxT *AsPriorBox() const { + return type == OpParameter_PriorBox ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ProposalT *AsProposal() { ++ MNN::ProposalT *AsProposal() { + return type == OpParameter_Proposal ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ProposalT *AsProposal() const { ++ const MNN::ProposalT *AsProposal() const { + return type == OpParameter_Proposal ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedAvgPoolT *AsQuantizedAvgPool() { ++ MNN::QuantizedAvgPoolT *AsQuantizedAvgPool() { + return type == OpParameter_QuantizedAvgPool ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedAvgPoolT *AsQuantizedAvgPool() const { ++ const MNN::QuantizedAvgPoolT *AsQuantizedAvgPool() const { + return type == OpParameter_QuantizedAvgPool ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedBiasAddT *AsQuantizedBiasAdd() { ++ MNN::QuantizedBiasAddT *AsQuantizedBiasAdd() { + return type == OpParameter_QuantizedBiasAdd ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedBiasAddT *AsQuantizedBiasAdd() const { ++ const MNN::QuantizedBiasAddT *AsQuantizedBiasAdd() const { + return type == OpParameter_QuantizedBiasAdd ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedConcatT *AsQuantizedConcat() { ++ MNN::QuantizedConcatT *AsQuantizedConcat() { + return type == OpParameter_QuantizedConcat ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedConcatT *AsQuantizedConcat() const { ++ const MNN::QuantizedConcatT *AsQuantizedConcat() const { + return type == OpParameter_QuantizedConcat ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedLogisticT *AsQuantizedLogistic() { ++ MNN::QuantizedLogisticT *AsQuantizedLogistic() { + return type == OpParameter_QuantizedLogistic ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedLogisticT *AsQuantizedLogistic() const { ++ const MNN::QuantizedLogisticT *AsQuantizedLogistic() const { + return type == OpParameter_QuantizedLogistic ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedMatMulT *AsQuantizedMatMul() { ++ MNN::QuantizedMatMulT *AsQuantizedMatMul() { + return type == OpParameter_QuantizedMatMul ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedMatMulT *AsQuantizedMatMul() const { ++ const MNN::QuantizedMatMulT *AsQuantizedMatMul() const { + return type == OpParameter_QuantizedMatMul ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedMaxPoolT *AsQuantizedMaxPool() { ++ MNN::QuantizedMaxPoolT *AsQuantizedMaxPool() { + return type == OpParameter_QuantizedMaxPool ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedMaxPoolT *AsQuantizedMaxPool() const { ++ const MNN::QuantizedMaxPoolT *AsQuantizedMaxPool() const { + return type == OpParameter_QuantizedMaxPool ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedReluT *AsQuantizedRelu() { ++ MNN::QuantizedReluT *AsQuantizedRelu() { + return type == OpParameter_QuantizedRelu ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedReluT *AsQuantizedRelu() const { ++ const MNN::QuantizedReluT *AsQuantizedRelu() const { + return type == OpParameter_QuantizedRelu ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedRelu6T *AsQuantizedRelu6() { ++ MNN::QuantizedRelu6T *AsQuantizedRelu6() { + return type == OpParameter_QuantizedRelu6 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedRelu6T *AsQuantizedRelu6() const { ++ const MNN::QuantizedRelu6T *AsQuantizedRelu6() const { + return type == OpParameter_QuantizedRelu6 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedReshapeT *AsQuantizedReshape() { ++ MNN::QuantizedReshapeT *AsQuantizedReshape() { + return type == OpParameter_QuantizedReshape ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedReshapeT *AsQuantizedReshape() const { ++ const MNN::QuantizedReshapeT *AsQuantizedReshape() const { + return type == OpParameter_QuantizedReshape ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedSoftmaxT *AsQuantizedSoftmax() { ++ MNN::QuantizedSoftmaxT *AsQuantizedSoftmax() { + return type == OpParameter_QuantizedSoftmax ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedSoftmaxT *AsQuantizedSoftmax() const { ++ const MNN::QuantizedSoftmaxT *AsQuantizedSoftmax() const { + return type == OpParameter_QuantizedSoftmax ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizeMaxMinT *AsQuantizeMaxMin() { ++ MNN::QuantizeMaxMinT *AsQuantizeMaxMin() { + return type == OpParameter_QuantizeMaxMin ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizeMaxMinT *AsQuantizeMaxMin() const { ++ const MNN::QuantizeMaxMinT *AsQuantizeMaxMin() const { + return type == OpParameter_QuantizeMaxMin ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizeV2T *AsQuantizeV2() { ++ MNN::QuantizeV2T *AsQuantizeV2() { + return type == OpParameter_QuantizeV2 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizeV2T *AsQuantizeV2() const { ++ const MNN::QuantizeV2T *AsQuantizeV2() const { + return type == OpParameter_QuantizeV2 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- RangeT *AsRange() { ++ MNN::RangeT *AsRange() { + return type == OpParameter_Range ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const RangeT *AsRange() const { ++ const MNN::RangeT *AsRange() const { + return type == OpParameter_Range ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- RankT *AsRank() { ++ MNN::RankT *AsRank() { + return type == OpParameter_Rank ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const RankT *AsRank() const { ++ const MNN::RankT *AsRank() const { + return type == OpParameter_Rank ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ReduceJoinT *AsReduceJoin() { ++ MNN::ReduceJoinT *AsReduceJoin() { + return type == OpParameter_ReduceJoin ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ReduceJoinT *AsReduceJoin() const { ++ const MNN::ReduceJoinT *AsReduceJoin() const { + return type == OpParameter_ReduceJoin ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ReductionParamT *AsReductionParam() { ++ MNN::ReductionParamT *AsReductionParam() { + return type == OpParameter_ReductionParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ReductionParamT *AsReductionParam() const { ++ const MNN::ReductionParamT *AsReductionParam() const { + return type == OpParameter_ReductionParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ReluT *AsRelu() { ++ MNN::ReluT *AsRelu() { + return type == OpParameter_Relu ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ReluT *AsRelu() const { ++ const MNN::ReluT *AsRelu() const { + return type == OpParameter_Relu ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- Relu6T *AsRelu6() { ++ MNN::Relu6T *AsRelu6() { + return type == OpParameter_Relu6 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const Relu6T *AsRelu6() const { ++ const MNN::Relu6T *AsRelu6() const { + return type == OpParameter_Relu6 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- RequantizationRangeT *AsRequantizationRange() { ++ MNN::RequantizationRangeT *AsRequantizationRange() { + return type == OpParameter_RequantizationRange ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const RequantizationRangeT *AsRequantizationRange() const { ++ const MNN::RequantizationRangeT *AsRequantizationRange() const { + return type == OpParameter_RequantizationRange ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- RequantizeT *AsRequantize() { ++ MNN::RequantizeT *AsRequantize() { + return type == OpParameter_Requantize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const RequantizeT *AsRequantize() const { ++ const MNN::RequantizeT *AsRequantize() const { + return type == OpParameter_Requantize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ReshapeT *AsReshape() { ++ MNN::ReshapeT *AsReshape() { + return type == OpParameter_Reshape ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ReshapeT *AsReshape() const { ++ const MNN::ReshapeT *AsReshape() const { + return type == OpParameter_Reshape ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ResizeT *AsResize() { ++ MNN::ResizeT *AsResize() { + return type == OpParameter_Resize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ResizeT *AsResize() const { ++ const MNN::ResizeT *AsResize() const { + return type == OpParameter_Resize ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- RoiPoolingT *AsRoiPooling() { ++ MNN::RoiPoolingT *AsRoiPooling() { + return type == OpParameter_RoiPooling ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const RoiPoolingT *AsRoiPooling() const { ++ const MNN::RoiPoolingT *AsRoiPooling() const { + return type == OpParameter_RoiPooling ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ScaleT *AsScale() { ++ MNN::ScaleT *AsScale() { + return type == OpParameter_Scale ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ScaleT *AsScale() const { ++ const MNN::ScaleT *AsScale() const { + return type == OpParameter_Scale ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- SeluT *AsSelu() { ++ MNN::SeluT *AsSelu() { + return type == OpParameter_Selu ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const SeluT *AsSelu() const { ++ const MNN::SeluT *AsSelu() const { + return type == OpParameter_Selu ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- SizeT *AsSize() { ++ MNN::SizeT *AsSize() { + return type == OpParameter_Size ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const SizeT *AsSize() const { ++ const MNN::SizeT *AsSize() const { + return type == OpParameter_Size ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- SliceT *AsSlice() { ++ MNN::SliceT *AsSlice() { + return type == OpParameter_Slice ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const SliceT *AsSlice() const { ++ const MNN::SliceT *AsSlice() const { + return type == OpParameter_Slice ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- SliceTfT *AsSliceTf() { ++ MNN::SliceTfT *AsSliceTf() { + return type == OpParameter_SliceTf ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const SliceTfT *AsSliceTf() const { ++ const MNN::SliceTfT *AsSliceTf() const { + return type == OpParameter_SliceTf ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- SpaceBatchT *AsSpaceBatch() { ++ MNN::SpaceBatchT *AsSpaceBatch() { + return type == OpParameter_SpaceBatch ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const SpaceBatchT *AsSpaceBatch() const { ++ const MNN::SpaceBatchT *AsSpaceBatch() const { + return type == OpParameter_SpaceBatch ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- SqueezeParamT *AsSqueezeParam() { ++ MNN::SqueezeParamT *AsSqueezeParam() { + return type == OpParameter_SqueezeParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const SqueezeParamT *AsSqueezeParam() const { ++ const MNN::SqueezeParamT *AsSqueezeParam() const { + return type == OpParameter_SqueezeParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- StridedSliceParamT *AsStridedSliceParam() { ++ MNN::StridedSliceParamT *AsStridedSliceParam() { + return type == OpParameter_StridedSliceParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const StridedSliceParamT *AsStridedSliceParam() const { ++ const MNN::StridedSliceParamT *AsStridedSliceParam() const { + return type == OpParameter_StridedSliceParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- TensorConvertInfoT *AsTensorConvertInfo() { ++ MNN::TensorConvertInfoT *AsTensorConvertInfo() { + return type == OpParameter_TensorConvertInfo ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const TensorConvertInfoT *AsTensorConvertInfo() const { ++ const MNN::TensorConvertInfoT *AsTensorConvertInfo() const { + return type == OpParameter_TensorConvertInfo ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- TfQuantizedConv2DT *AsTfQuantizedConv2D() { ++ MNN::TfQuantizedConv2DT *AsTfQuantizedConv2D() { + return type == OpParameter_TfQuantizedConv2D ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const TfQuantizedConv2DT *AsTfQuantizedConv2D() const { ++ const MNN::TfQuantizedConv2DT *AsTfQuantizedConv2D() const { + return type == OpParameter_TfQuantizedConv2D ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- TopKV2T *AsTopKV2() { ++ MNN::TopKV2T *AsTopKV2() { + return type == OpParameter_TopKV2 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const TopKV2T *AsTopKV2() const { ++ const MNN::TopKV2T *AsTopKV2() const { + return type == OpParameter_TopKV2 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- TransposeT *AsTranspose() { ++ MNN::TransposeT *AsTranspose() { + return type == OpParameter_Transpose ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const TransposeT *AsTranspose() const { ++ const MNN::TransposeT *AsTranspose() const { + return type == OpParameter_Transpose ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- UnaryOpT *AsUnaryOp() { ++ MNN::UnaryOpT *AsUnaryOp() { + return type == OpParameter_UnaryOp ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const UnaryOpT *AsUnaryOp() const { ++ const MNN::UnaryOpT *AsUnaryOp() const { + return type == OpParameter_UnaryOp ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- MomentsParamT *AsMomentsParam() { ++ MNN::MomentsParamT *AsMomentsParam() { + return type == OpParameter_MomentsParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const MomentsParamT *AsMomentsParam() const { ++ const MNN::MomentsParamT *AsMomentsParam() const { + return type == OpParameter_MomentsParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- RNNParamT *AsRNNParam() { ++ MNN::RNNParamT *AsRNNParam() { + return type == OpParameter_RNNParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const RNNParamT *AsRNNParam() const { ++ const MNN::RNNParamT *AsRNNParam() const { + return type == OpParameter_RNNParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- BatchMatMulParamT *AsBatchMatMulParam() { ++ MNN::BatchMatMulParamT *AsBatchMatMulParam() { + return type == OpParameter_BatchMatMulParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const BatchMatMulParamT *AsBatchMatMulParam() const { ++ const MNN::BatchMatMulParamT *AsBatchMatMulParam() const { + return type == OpParameter_BatchMatMulParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- QuantizedFloatParamT *AsQuantizedFloatParam() { ++ MNN::QuantizedFloatParamT *AsQuantizedFloatParam() { + return type == OpParameter_QuantizedFloatParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const QuantizedFloatParamT *AsQuantizedFloatParam() const { ++ const MNN::QuantizedFloatParamT *AsQuantizedFloatParam() const { + return type == OpParameter_QuantizedFloatParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- DepthSpaceParamT *AsDepthSpaceParam() { ++ MNN::DepthSpaceParamT *AsDepthSpaceParam() { + return type == OpParameter_DepthSpaceParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const DepthSpaceParamT *AsDepthSpaceParam() const { ++ const MNN::DepthSpaceParamT *AsDepthSpaceParam() const { + return type == OpParameter_DepthSpaceParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- EltwiseInt8T *AsEltwiseInt8() { ++ MNN::EltwiseInt8T *AsEltwiseInt8() { + return type == OpParameter_EltwiseInt8 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const EltwiseInt8T *AsEltwiseInt8() const { ++ const MNN::EltwiseInt8T *AsEltwiseInt8() const { + return type == OpParameter_EltwiseInt8 ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ReverseSequenceParamT *AsReverseSequenceParam() { ++ MNN::ReverseSequenceParamT *AsReverseSequenceParam() { + return type == OpParameter_ReverseSequenceParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ReverseSequenceParamT *AsReverseSequenceParam() const { ++ const MNN::ReverseSequenceParamT *AsReverseSequenceParam() const { + return type == OpParameter_ReverseSequenceParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ExtraT *AsExtra() { ++ MNN::ExtraT *AsExtra() { + return type == OpParameter_Extra ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ExtraT *AsExtra() const { ++ const MNN::ExtraT *AsExtra() const { + return type == OpParameter_Extra ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- Pool3DT *AsPool3D() { ++ MNN::Pool3DT *AsPool3D() { + return type == OpParameter_Pool3D ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const Pool3DT *AsPool3D() const { ++ const MNN::Pool3DT *AsPool3D() const { + return type == OpParameter_Pool3D ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- Convolution3DT *AsConvolution3D() { ++ MNN::Convolution3DT *AsConvolution3D() { + return type == OpParameter_Convolution3D ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const Convolution3DT *AsConvolution3D() const { ++ const MNN::Convolution3DT *AsConvolution3D() const { + return type == OpParameter_Convolution3D ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- ELUT *AsELU() { ++ MNN::ELUT *AsELU() { + return type == OpParameter_ELU ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const ELUT *AsELU() const { ++ const MNN::ELUT *AsELU() const { + return type == OpParameter_ELU ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- DetectionPostProcessParamT *AsDetectionPostProcessParam() { ++ MNN::DetectionPostProcessParamT *AsDetectionPostProcessParam() { + return type == OpParameter_DetectionPostProcessParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const DetectionPostProcessParamT *AsDetectionPostProcessParam() const { ++ const MNN::DetectionPostProcessParamT *AsDetectionPostProcessParam() const { + return type == OpParameter_DetectionPostProcessParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- OneHotParamT *AsOneHotParam() { ++ MNN::OneHotParamT *AsOneHotParam() { + return type == OpParameter_OneHotParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const OneHotParamT *AsOneHotParam() const { ++ const MNN::OneHotParamT *AsOneHotParam() const { + return type == OpParameter_OneHotParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- PadParamT *AsPadParam() { ++ MNN::PadParamT *AsPadParam() { + return type == OpParameter_PadParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const PadParamT *AsPadParam() const { ++ const MNN::PadParamT *AsPadParam() const { + return type == OpParameter_PadParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- WhileParamT *AsWhileParam() { ++ MNN::WhileParamT *AsWhileParam() { + return type == OpParameter_WhileParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const WhileParamT *AsWhileParam() const { ++ const MNN::WhileParamT *AsWhileParam() const { + return type == OpParameter_WhileParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- IfParamT *AsIfParam() { ++ MNN::IfParamT *AsIfParam() { + return type == OpParameter_IfParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const IfParamT *AsIfParam() const { ++ const MNN::IfParamT *AsIfParam() const { + return type == OpParameter_IfParam ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- RandomUniformT *AsRandomUniform() { ++ MNN::RandomUniformT *AsRandomUniform() { + return type == OpParameter_RandomUniform ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const RandomUniformT *AsRandomUniform() const { ++ const MNN::RandomUniformT *AsRandomUniform() const { + return type == OpParameter_RandomUniform ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- LayerNormT *AsLayerNorm() { ++ MNN::LayerNormT *AsLayerNorm() { + return type == OpParameter_LayerNorm ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } +- const LayerNormT *AsLayerNorm() const { ++ const MNN::LayerNormT *AsLayerNorm() const { + return type == OpParameter_LayerNorm ? +- reinterpret_cast(value) : nullptr; ++ reinterpret_cast(value) : nullptr; + } + }; + + bool VerifyOpParameter(flatbuffers::Verifier &verifier, const void *obj, OpParameter type); + bool VerifyOpParameterVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +-enum ForwardType { ++enum ForwardType : int8_t { + ForwardType_CPU = 0, + ForwardType_METAL = 1, + ForwardType_OPENCL = 2, +@@ -2407,7 +2420,7 @@ inline const ForwardType (&EnumValuesForwardType())[5] { + } + + inline const char * const *EnumNamesForwardType() { +- static const char * const names[] = { ++ static const char * const names[6] = { + "CPU", + "METAL", + "OPENCL", +@@ -2419,12 +2432,12 @@ inline const char * const *EnumNamesForwardType() { + } + + inline const char *EnumNameForwardType(ForwardType e) { +- if (e < ForwardType_CPU || e > ForwardType_VULKAN) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, ForwardType_CPU, ForwardType_VULKAN)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesForwardType()[index]; + } + +-enum Usage { ++enum Usage : int8_t { + Usage_INFERENCE = 0, + Usage_TRAIN = 1, + Usage_INFERENCE_STATIC = 2, +@@ -2442,7 +2455,7 @@ inline const Usage (&EnumValuesUsage())[3] { + } + + inline const char * const *EnumNamesUsage() { +- static const char * const names[] = { ++ static const char * const names[4] = { + "INFERENCE", + "TRAIN", + "INFERENCE_STATIC", +@@ -2452,21 +2465,20 @@ inline const char * const *EnumNamesUsage() { + } + + inline const char *EnumNameUsage(Usage e) { +- if (e < Usage_INFERENCE || e > Usage_INFERENCE_STATIC) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, Usage_INFERENCE, Usage_INFERENCE_STATIC)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesUsage()[index]; + } + + struct PluginT : public flatbuffers::NativeTable { + typedef Plugin TableType; +- std::string type; +- std::vector> attr; +- PluginT() { +- } ++ std::string type{}; ++ std::vector> attr{}; + }; + + struct Plugin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PluginT NativeTableType; ++ typedef PluginBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return PluginTypeTable(); + } +@@ -2477,8 +2489,8 @@ struct Plugin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::String *type() const { + return GetPointer(VT_TYPE); + } +- const flatbuffers::Vector> *attr() const { +- return GetPointer> *>(VT_ATTR); ++ const flatbuffers::Vector> *attr() const { ++ return GetPointer> *>(VT_ATTR); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2495,19 +2507,19 @@ struct Plugin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PluginBuilder { ++ typedef Plugin Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_type(flatbuffers::Offset type) { + fbb_.AddOffset(Plugin::VT_TYPE, type); + } +- void add_attr(flatbuffers::Offset>> attr) { ++ void add_attr(flatbuffers::Offset>> attr) { + fbb_.AddOffset(Plugin::VT_ATTR, attr); + } + explicit PluginBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PluginBuilder &operator=(const PluginBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2518,7 +2530,7 @@ struct PluginBuilder { + inline flatbuffers::Offset CreatePlugin( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset type = 0, +- flatbuffers::Offset>> attr = 0) { ++ flatbuffers::Offset>> attr = 0) { + PluginBuilder builder_(_fbb); + builder_.add_attr(attr); + builder_.add_type(type); +@@ -2528,9 +2540,9 @@ inline flatbuffers::Offset CreatePlugin( + inline flatbuffers::Offset CreatePluginDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *type = nullptr, +- const std::vector> *attr = nullptr) { ++ const std::vector> *attr = nullptr) { + auto type__ = type ? _fbb.CreateString(type) : 0; +- auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; ++ auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; + return MNN::CreatePlugin( + _fbb, + type__, +@@ -2541,16 +2553,15 @@ flatbuffers::Offset CreatePlugin(flatbuffers::FlatBufferBuilder &_fbb, c + + struct ExtraT : public flatbuffers::NativeTable { + typedef Extra TableType; +- std::string type; +- std::string engine; +- std::vector info; +- std::vector> attr; +- ExtraT() { +- } ++ std::string type{}; ++ std::string engine{}; ++ std::vector info{}; ++ std::vector> attr{}; + }; + + struct Extra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ExtraT NativeTableType; ++ typedef ExtraBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ExtraTypeTable(); + } +@@ -2569,8 +2580,8 @@ struct Extra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *info() const { + return GetPointer *>(VT_INFO); + } +- const flatbuffers::Vector> *attr() const { +- return GetPointer> *>(VT_ATTR); ++ const flatbuffers::Vector> *attr() const { ++ return GetPointer> *>(VT_ATTR); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2591,6 +2602,7 @@ struct Extra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ExtraBuilder { ++ typedef Extra Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_type(flatbuffers::Offset type) { +@@ -2602,14 +2614,13 @@ struct ExtraBuilder { + void add_info(flatbuffers::Offset> info) { + fbb_.AddOffset(Extra::VT_INFO, info); + } +- void add_attr(flatbuffers::Offset>> attr) { ++ void add_attr(flatbuffers::Offset>> attr) { + fbb_.AddOffset(Extra::VT_ATTR, attr); + } + explicit ExtraBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ExtraBuilder &operator=(const ExtraBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2622,7 +2633,7 @@ inline flatbuffers::Offset CreateExtra( + flatbuffers::Offset type = 0, + flatbuffers::Offset engine = 0, + flatbuffers::Offset> info = 0, +- flatbuffers::Offset>> attr = 0) { ++ flatbuffers::Offset>> attr = 0) { + ExtraBuilder builder_(_fbb); + builder_.add_attr(attr); + builder_.add_info(info); +@@ -2636,11 +2647,11 @@ inline flatbuffers::Offset CreateExtraDirect( + const char *type = nullptr, + const char *engine = nullptr, + const std::vector *info = nullptr, +- const std::vector> *attr = nullptr) { ++ const std::vector> *attr = nullptr) { + auto type__ = type ? _fbb.CreateString(type) : 0; + auto engine__ = engine ? _fbb.CreateString(engine) : 0; + auto info__ = info ? _fbb.CreateVector(*info) : 0; +- auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; ++ auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; + return MNN::CreateExtra( + _fbb, + type__, +@@ -2653,13 +2664,12 @@ flatbuffers::Offset CreateExtra(flatbuffers::FlatBufferBuilder &_fbb, con + + struct StringVecT : public flatbuffers::NativeTable { + typedef StringVec TableType; +- std::vector data; +- StringVecT() { +- } ++ std::vector data{}; + }; + + struct StringVec FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StringVecT NativeTableType; ++ typedef StringVecBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return StringVecTypeTable(); + } +@@ -2682,6 +2692,7 @@ struct StringVec FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct StringVecBuilder { ++ typedef StringVec Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_data(flatbuffers::Offset>> data) { +@@ -2691,7 +2702,6 @@ struct StringVecBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- StringVecBuilder &operator=(const StringVecBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2720,17 +2730,16 @@ flatbuffers::Offset CreateStringVec(flatbuffers::FlatBufferBuilder &_ + + struct WhileParamT : public flatbuffers::NativeTable { + typedef WhileParam TableType; +- std::string cond_graph; +- std::string body_graph; +- std::vector> aliases_inputs; +- std::vector aliases_outputs; +- std::vector> aliases_updates; +- WhileParamT() { +- } ++ std::string cond_graph{}; ++ std::string body_graph{}; ++ std::vector> aliases_inputs{}; ++ std::vector aliases_outputs{}; ++ std::vector> aliases_updates{}; + }; + + struct WhileParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef WhileParamT NativeTableType; ++ typedef WhileParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return WhileParamTypeTable(); + } +@@ -2747,14 +2756,14 @@ struct WhileParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::String *body_graph() const { + return GetPointer(VT_BODY_GRAPH); + } +- const flatbuffers::Vector> *aliases_inputs() const { +- return GetPointer> *>(VT_ALIASES_INPUTS); ++ const flatbuffers::Vector> *aliases_inputs() const { ++ return GetPointer> *>(VT_ALIASES_INPUTS); + } + const flatbuffers::Vector> *aliases_outputs() const { + return GetPointer> *>(VT_ALIASES_OUTPUTS); + } +- const flatbuffers::Vector> *aliases_updates() const { +- return GetPointer> *>(VT_ALIASES_UPDATES); ++ const flatbuffers::Vector> *aliases_updates() const { ++ return GetPointer> *>(VT_ALIASES_UPDATES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2779,6 +2788,7 @@ struct WhileParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct WhileParamBuilder { ++ typedef WhileParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_cond_graph(flatbuffers::Offset cond_graph) { +@@ -2787,20 +2797,19 @@ struct WhileParamBuilder { + void add_body_graph(flatbuffers::Offset body_graph) { + fbb_.AddOffset(WhileParam::VT_BODY_GRAPH, body_graph); + } +- void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { ++ void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { + fbb_.AddOffset(WhileParam::VT_ALIASES_INPUTS, aliases_inputs); + } + void add_aliases_outputs(flatbuffers::Offset>> aliases_outputs) { + fbb_.AddOffset(WhileParam::VT_ALIASES_OUTPUTS, aliases_outputs); + } +- void add_aliases_updates(flatbuffers::Offset>> aliases_updates) { ++ void add_aliases_updates(flatbuffers::Offset>> aliases_updates) { + fbb_.AddOffset(WhileParam::VT_ALIASES_UPDATES, aliases_updates); + } + explicit WhileParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- WhileParamBuilder &operator=(const WhileParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2812,9 +2821,9 @@ inline flatbuffers::Offset CreateWhileParam( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset cond_graph = 0, + flatbuffers::Offset body_graph = 0, +- flatbuffers::Offset>> aliases_inputs = 0, ++ flatbuffers::Offset>> aliases_inputs = 0, + flatbuffers::Offset>> aliases_outputs = 0, +- flatbuffers::Offset>> aliases_updates = 0) { ++ flatbuffers::Offset>> aliases_updates = 0) { + WhileParamBuilder builder_(_fbb); + builder_.add_aliases_updates(aliases_updates); + builder_.add_aliases_outputs(aliases_outputs); +@@ -2828,14 +2837,14 @@ inline flatbuffers::Offset CreateWhileParamDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *cond_graph = nullptr, + const char *body_graph = nullptr, +- const std::vector> *aliases_inputs = nullptr, ++ const std::vector> *aliases_inputs = nullptr, + const std::vector> *aliases_outputs = nullptr, +- const std::vector> *aliases_updates = nullptr) { ++ const std::vector> *aliases_updates = nullptr) { + auto cond_graph__ = cond_graph ? _fbb.CreateString(cond_graph) : 0; + auto body_graph__ = body_graph ? _fbb.CreateString(body_graph) : 0; +- auto aliases_inputs__ = aliases_inputs ? _fbb.CreateVector>(*aliases_inputs) : 0; ++ auto aliases_inputs__ = aliases_inputs ? _fbb.CreateVector>(*aliases_inputs) : 0; + auto aliases_outputs__ = aliases_outputs ? _fbb.CreateVector>(*aliases_outputs) : 0; +- auto aliases_updates__ = aliases_updates ? _fbb.CreateVector>(*aliases_updates) : 0; ++ auto aliases_updates__ = aliases_updates ? _fbb.CreateVector>(*aliases_updates) : 0; + return MNN::CreateWhileParam( + _fbb, + cond_graph__, +@@ -2849,16 +2858,15 @@ flatbuffers::Offset CreateWhileParam(flatbuffers::FlatBufferBuilder + + struct IfParamT : public flatbuffers::NativeTable { + typedef IfParam TableType; +- std::string then_graph; +- std::string else_graph; +- std::vector> aliases_inputs; +- std::vector> aliases_outputs; +- IfParamT() { +- } ++ std::string then_graph{}; ++ std::string else_graph{}; ++ std::vector> aliases_inputs{}; ++ std::vector> aliases_outputs{}; + }; + + struct IfParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef IfParamT NativeTableType; ++ typedef IfParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return IfParamTypeTable(); + } +@@ -2874,11 +2882,11 @@ struct IfParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::String *else_graph() const { + return GetPointer(VT_ELSE_GRAPH); + } +- const flatbuffers::Vector> *aliases_inputs() const { +- return GetPointer> *>(VT_ALIASES_INPUTS); ++ const flatbuffers::Vector> *aliases_inputs() const { ++ return GetPointer> *>(VT_ALIASES_INPUTS); + } +- const flatbuffers::Vector> *aliases_outputs() const { +- return GetPointer> *>(VT_ALIASES_OUTPUTS); ++ const flatbuffers::Vector> *aliases_outputs() const { ++ return GetPointer> *>(VT_ALIASES_OUTPUTS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2900,6 +2908,7 @@ struct IfParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct IfParamBuilder { ++ typedef IfParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_then_graph(flatbuffers::Offset then_graph) { +@@ -2908,17 +2917,16 @@ struct IfParamBuilder { + void add_else_graph(flatbuffers::Offset else_graph) { + fbb_.AddOffset(IfParam::VT_ELSE_GRAPH, else_graph); + } +- void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { ++ void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { + fbb_.AddOffset(IfParam::VT_ALIASES_INPUTS, aliases_inputs); + } +- void add_aliases_outputs(flatbuffers::Offset>> aliases_outputs) { ++ void add_aliases_outputs(flatbuffers::Offset>> aliases_outputs) { + fbb_.AddOffset(IfParam::VT_ALIASES_OUTPUTS, aliases_outputs); + } + explicit IfParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- IfParamBuilder &operator=(const IfParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2930,8 +2938,8 @@ inline flatbuffers::Offset CreateIfParam( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset then_graph = 0, + flatbuffers::Offset else_graph = 0, +- flatbuffers::Offset>> aliases_inputs = 0, +- flatbuffers::Offset>> aliases_outputs = 0) { ++ flatbuffers::Offset>> aliases_inputs = 0, ++ flatbuffers::Offset>> aliases_outputs = 0) { + IfParamBuilder builder_(_fbb); + builder_.add_aliases_outputs(aliases_outputs); + builder_.add_aliases_inputs(aliases_inputs); +@@ -2944,12 +2952,12 @@ inline flatbuffers::Offset CreateIfParamDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *then_graph = nullptr, + const char *else_graph = nullptr, +- const std::vector> *aliases_inputs = nullptr, +- const std::vector> *aliases_outputs = nullptr) { ++ const std::vector> *aliases_inputs = nullptr, ++ const std::vector> *aliases_outputs = nullptr) { + auto then_graph__ = then_graph ? _fbb.CreateString(then_graph) : 0; + auto else_graph__ = else_graph ? _fbb.CreateString(else_graph) : 0; +- auto aliases_inputs__ = aliases_inputs ? _fbb.CreateVector>(*aliases_inputs) : 0; +- auto aliases_outputs__ = aliases_outputs ? _fbb.CreateVector>(*aliases_outputs) : 0; ++ auto aliases_inputs__ = aliases_inputs ? _fbb.CreateVector>(*aliases_inputs) : 0; ++ auto aliases_outputs__ = aliases_outputs ? _fbb.CreateVector>(*aliases_outputs) : 0; + return MNN::CreateIfParam( + _fbb, + then_graph__, +@@ -2962,20 +2970,17 @@ flatbuffers::Offset CreateIfParam(flatbuffers::FlatBufferBuilder &_fbb, + + struct OpT : public flatbuffers::NativeTable { + typedef Op TableType; +- std::vector inputIndexes; +- OpParameterUnion main; +- std::string name; +- std::vector outputIndexes; +- OpType type; +- MNN_DATA_FORMAT defaultDimentionFormat; +- OpT() +- : type(OpType_AbsVal), +- defaultDimentionFormat(MNN_DATA_FORMAT_NHWC) { +- } ++ std::vector inputIndexes{}; ++ MNN::OpParameterUnion main{}; ++ std::string name{}; ++ std::vector outputIndexes{}; ++ MNN::OpType type = MNN::OpType_AbsVal; ++ MNN::MNN_DATA_FORMAT defaultDimentionFormat = MNN::MNN_DATA_FORMAT_NHWC; + }; + + struct Op FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OpT NativeTableType; ++ typedef OpBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return OpTypeTable(); + } +@@ -2991,276 +2996,276 @@ struct Op FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *inputIndexes() const { + return GetPointer *>(VT_INPUTINDEXES); + } +- OpParameter main_type() const { +- return static_cast(GetField(VT_MAIN_TYPE, 0)); ++ MNN::OpParameter main_type() const { ++ return static_cast(GetField(VT_MAIN_TYPE, 0)); + } + const void *main() const { + return GetPointer(VT_MAIN); + } + template const T *main_as() const; +- const QuantizedAdd *main_as_QuantizedAdd() const { +- return main_type() == OpParameter_QuantizedAdd ? static_cast(main()) : nullptr; ++ const MNN::QuantizedAdd *main_as_QuantizedAdd() const { ++ return main_type() == MNN::OpParameter_QuantizedAdd ? static_cast(main()) : nullptr; + } +- const ArgMax *main_as_ArgMax() const { +- return main_type() == OpParameter_ArgMax ? static_cast(main()) : nullptr; ++ const MNN::ArgMax *main_as_ArgMax() const { ++ return main_type() == MNN::OpParameter_ArgMax ? static_cast(main()) : nullptr; + } +- const AsString *main_as_AsString() const { +- return main_type() == OpParameter_AsString ? static_cast(main()) : nullptr; ++ const MNN::AsString *main_as_AsString() const { ++ return main_type() == MNN::OpParameter_AsString ? static_cast(main()) : nullptr; + } +- const Axis *main_as_Axis() const { +- return main_type() == OpParameter_Axis ? static_cast(main()) : nullptr; ++ const MNN::Axis *main_as_Axis() const { ++ return main_type() == MNN::OpParameter_Axis ? static_cast(main()) : nullptr; + } +- const BatchNorm *main_as_BatchNorm() const { +- return main_type() == OpParameter_BatchNorm ? static_cast(main()) : nullptr; ++ const MNN::BatchNorm *main_as_BatchNorm() const { ++ return main_type() == MNN::OpParameter_BatchNorm ? static_cast(main()) : nullptr; + } +- const BinaryOp *main_as_BinaryOp() const { +- return main_type() == OpParameter_BinaryOp ? static_cast(main()) : nullptr; ++ const MNN::BinaryOp *main_as_BinaryOp() const { ++ return main_type() == MNN::OpParameter_BinaryOp ? static_cast(main()) : nullptr; + } +- const Blob *main_as_Blob() const { +- return main_type() == OpParameter_Blob ? static_cast(main()) : nullptr; ++ const MNN::Blob *main_as_Blob() const { ++ return main_type() == MNN::OpParameter_Blob ? static_cast(main()) : nullptr; + } +- const CastParam *main_as_CastParam() const { +- return main_type() == OpParameter_CastParam ? static_cast(main()) : nullptr; ++ const MNN::CastParam *main_as_CastParam() const { ++ return main_type() == MNN::OpParameter_CastParam ? static_cast(main()) : nullptr; + } +- const Convolution2D *main_as_Convolution2D() const { +- return main_type() == OpParameter_Convolution2D ? static_cast(main()) : nullptr; ++ const MNN::Convolution2D *main_as_Convolution2D() const { ++ return main_type() == MNN::OpParameter_Convolution2D ? static_cast(main()) : nullptr; + } +- const Crop *main_as_Crop() const { +- return main_type() == OpParameter_Crop ? static_cast(main()) : nullptr; ++ const MNN::Crop *main_as_Crop() const { ++ return main_type() == MNN::OpParameter_Crop ? static_cast(main()) : nullptr; + } +- const CropAndResize *main_as_CropAndResize() const { +- return main_type() == OpParameter_CropAndResize ? static_cast(main()) : nullptr; ++ const MNN::CropAndResize *main_as_CropAndResize() const { ++ return main_type() == MNN::OpParameter_CropAndResize ? static_cast(main()) : nullptr; + } +- const Dequantize *main_as_Dequantize() const { +- return main_type() == OpParameter_Dequantize ? static_cast(main()) : nullptr; ++ const MNN::Dequantize *main_as_Dequantize() const { ++ return main_type() == MNN::OpParameter_Dequantize ? static_cast(main()) : nullptr; + } +- const DetectionOutput *main_as_DetectionOutput() const { +- return main_type() == OpParameter_DetectionOutput ? static_cast(main()) : nullptr; ++ const MNN::DetectionOutput *main_as_DetectionOutput() const { ++ return main_type() == MNN::OpParameter_DetectionOutput ? static_cast(main()) : nullptr; + } +- const Eltwise *main_as_Eltwise() const { +- return main_type() == OpParameter_Eltwise ? static_cast(main()) : nullptr; ++ const MNN::Eltwise *main_as_Eltwise() const { ++ return main_type() == MNN::OpParameter_Eltwise ? static_cast(main()) : nullptr; + } +- const ExpandDims *main_as_ExpandDims() const { +- return main_type() == OpParameter_ExpandDims ? static_cast(main()) : nullptr; ++ const MNN::ExpandDims *main_as_ExpandDims() const { ++ return main_type() == MNN::OpParameter_ExpandDims ? static_cast(main()) : nullptr; + } +- const Fill *main_as_Fill() const { +- return main_type() == OpParameter_Fill ? static_cast(main()) : nullptr; ++ const MNN::Fill *main_as_Fill() const { ++ return main_type() == MNN::OpParameter_Fill ? static_cast(main()) : nullptr; + } +- const Flatten *main_as_Flatten() const { +- return main_type() == OpParameter_Flatten ? static_cast(main()) : nullptr; ++ const MNN::Flatten *main_as_Flatten() const { ++ return main_type() == MNN::OpParameter_Flatten ? static_cast(main()) : nullptr; + } +- const Gather *main_as_Gather() const { +- return main_type() == OpParameter_Gather ? static_cast(main()) : nullptr; ++ const MNN::Gather *main_as_Gather() const { ++ return main_type() == MNN::OpParameter_Gather ? static_cast(main()) : nullptr; + } +- const GatherV2 *main_as_GatherV2() const { +- return main_type() == OpParameter_GatherV2 ? static_cast(main()) : nullptr; ++ const MNN::GatherV2 *main_as_GatherV2() const { ++ return main_type() == MNN::OpParameter_GatherV2 ? static_cast(main()) : nullptr; + } +- const InnerProduct *main_as_InnerProduct() const { +- return main_type() == OpParameter_InnerProduct ? static_cast(main()) : nullptr; ++ const MNN::InnerProduct *main_as_InnerProduct() const { ++ return main_type() == MNN::OpParameter_InnerProduct ? static_cast(main()) : nullptr; + } +- const Input *main_as_Input() const { +- return main_type() == OpParameter_Input ? static_cast(main()) : nullptr; ++ const MNN::Input *main_as_Input() const { ++ return main_type() == MNN::OpParameter_Input ? static_cast(main()) : nullptr; + } +- const Interp *main_as_Interp() const { +- return main_type() == OpParameter_Interp ? static_cast(main()) : nullptr; ++ const MNN::Interp *main_as_Interp() const { ++ return main_type() == MNN::OpParameter_Interp ? static_cast(main()) : nullptr; + } +- const LRN *main_as_LRN() const { +- return main_type() == OpParameter_LRN ? static_cast(main()) : nullptr; ++ const MNN::LRN *main_as_LRN() const { ++ return main_type() == MNN::OpParameter_LRN ? static_cast(main()) : nullptr; + } +- const LSTM *main_as_LSTM() const { +- return main_type() == OpParameter_LSTM ? static_cast(main()) : nullptr; ++ const MNN::LSTM *main_as_LSTM() const { ++ return main_type() == MNN::OpParameter_LSTM ? static_cast(main()) : nullptr; + } +- const MatMul *main_as_MatMul() const { +- return main_type() == OpParameter_MatMul ? static_cast(main()) : nullptr; ++ const MNN::MatMul *main_as_MatMul() const { ++ return main_type() == MNN::OpParameter_MatMul ? static_cast(main()) : nullptr; + } +- const NonMaxSuppressionV2 *main_as_NonMaxSuppressionV2() const { +- return main_type() == OpParameter_NonMaxSuppressionV2 ? static_cast(main()) : nullptr; ++ const MNN::NonMaxSuppressionV2 *main_as_NonMaxSuppressionV2() const { ++ return main_type() == MNN::OpParameter_NonMaxSuppressionV2 ? static_cast(main()) : nullptr; + } +- const Normalize *main_as_Normalize() const { +- return main_type() == OpParameter_Normalize ? static_cast(main()) : nullptr; ++ const MNN::Normalize *main_as_Normalize() const { ++ return main_type() == MNN::OpParameter_Normalize ? static_cast(main()) : nullptr; + } +- const PackParam *main_as_PackParam() const { +- return main_type() == OpParameter_PackParam ? static_cast(main()) : nullptr; ++ const MNN::PackParam *main_as_PackParam() const { ++ return main_type() == MNN::OpParameter_PackParam ? static_cast(main()) : nullptr; + } +- const Permute *main_as_Permute() const { +- return main_type() == OpParameter_Permute ? static_cast(main()) : nullptr; ++ const MNN::Permute *main_as_Permute() const { ++ return main_type() == MNN::OpParameter_Permute ? static_cast(main()) : nullptr; + } +- const Plugin *main_as_Plugin() const { +- return main_type() == OpParameter_Plugin ? static_cast(main()) : nullptr; ++ const MNN::Plugin *main_as_Plugin() const { ++ return main_type() == MNN::OpParameter_Plugin ? static_cast(main()) : nullptr; + } +- const Pool *main_as_Pool() const { +- return main_type() == OpParameter_Pool ? static_cast(main()) : nullptr; ++ const MNN::Pool *main_as_Pool() const { ++ return main_type() == MNN::OpParameter_Pool ? static_cast(main()) : nullptr; + } +- const PRelu *main_as_PRelu() const { +- return main_type() == OpParameter_PRelu ? static_cast(main()) : nullptr; ++ const MNN::PRelu *main_as_PRelu() const { ++ return main_type() == MNN::OpParameter_PRelu ? static_cast(main()) : nullptr; + } +- const PriorBox *main_as_PriorBox() const { +- return main_type() == OpParameter_PriorBox ? static_cast(main()) : nullptr; ++ const MNN::PriorBox *main_as_PriorBox() const { ++ return main_type() == MNN::OpParameter_PriorBox ? static_cast(main()) : nullptr; + } +- const Proposal *main_as_Proposal() const { +- return main_type() == OpParameter_Proposal ? static_cast(main()) : nullptr; ++ const MNN::Proposal *main_as_Proposal() const { ++ return main_type() == MNN::OpParameter_Proposal ? static_cast(main()) : nullptr; + } +- const QuantizedAvgPool *main_as_QuantizedAvgPool() const { +- return main_type() == OpParameter_QuantizedAvgPool ? static_cast(main()) : nullptr; ++ const MNN::QuantizedAvgPool *main_as_QuantizedAvgPool() const { ++ return main_type() == MNN::OpParameter_QuantizedAvgPool ? static_cast(main()) : nullptr; + } +- const QuantizedBiasAdd *main_as_QuantizedBiasAdd() const { +- return main_type() == OpParameter_QuantizedBiasAdd ? static_cast(main()) : nullptr; ++ const MNN::QuantizedBiasAdd *main_as_QuantizedBiasAdd() const { ++ return main_type() == MNN::OpParameter_QuantizedBiasAdd ? static_cast(main()) : nullptr; + } +- const QuantizedConcat *main_as_QuantizedConcat() const { +- return main_type() == OpParameter_QuantizedConcat ? static_cast(main()) : nullptr; ++ const MNN::QuantizedConcat *main_as_QuantizedConcat() const { ++ return main_type() == MNN::OpParameter_QuantizedConcat ? static_cast(main()) : nullptr; + } +- const QuantizedLogistic *main_as_QuantizedLogistic() const { +- return main_type() == OpParameter_QuantizedLogistic ? static_cast(main()) : nullptr; ++ const MNN::QuantizedLogistic *main_as_QuantizedLogistic() const { ++ return main_type() == MNN::OpParameter_QuantizedLogistic ? static_cast(main()) : nullptr; + } +- const QuantizedMatMul *main_as_QuantizedMatMul() const { +- return main_type() == OpParameter_QuantizedMatMul ? static_cast(main()) : nullptr; ++ const MNN::QuantizedMatMul *main_as_QuantizedMatMul() const { ++ return main_type() == MNN::OpParameter_QuantizedMatMul ? static_cast(main()) : nullptr; + } +- const QuantizedMaxPool *main_as_QuantizedMaxPool() const { +- return main_type() == OpParameter_QuantizedMaxPool ? static_cast(main()) : nullptr; ++ const MNN::QuantizedMaxPool *main_as_QuantizedMaxPool() const { ++ return main_type() == MNN::OpParameter_QuantizedMaxPool ? static_cast(main()) : nullptr; + } +- const QuantizedRelu *main_as_QuantizedRelu() const { +- return main_type() == OpParameter_QuantizedRelu ? static_cast(main()) : nullptr; ++ const MNN::QuantizedRelu *main_as_QuantizedRelu() const { ++ return main_type() == MNN::OpParameter_QuantizedRelu ? static_cast(main()) : nullptr; + } +- const QuantizedRelu6 *main_as_QuantizedRelu6() const { +- return main_type() == OpParameter_QuantizedRelu6 ? static_cast(main()) : nullptr; ++ const MNN::QuantizedRelu6 *main_as_QuantizedRelu6() const { ++ return main_type() == MNN::OpParameter_QuantizedRelu6 ? static_cast(main()) : nullptr; + } +- const QuantizedReshape *main_as_QuantizedReshape() const { +- return main_type() == OpParameter_QuantizedReshape ? static_cast(main()) : nullptr; ++ const MNN::QuantizedReshape *main_as_QuantizedReshape() const { ++ return main_type() == MNN::OpParameter_QuantizedReshape ? static_cast(main()) : nullptr; + } +- const QuantizedSoftmax *main_as_QuantizedSoftmax() const { +- return main_type() == OpParameter_QuantizedSoftmax ? static_cast(main()) : nullptr; ++ const MNN::QuantizedSoftmax *main_as_QuantizedSoftmax() const { ++ return main_type() == MNN::OpParameter_QuantizedSoftmax ? static_cast(main()) : nullptr; + } +- const QuantizeMaxMin *main_as_QuantizeMaxMin() const { +- return main_type() == OpParameter_QuantizeMaxMin ? static_cast(main()) : nullptr; ++ const MNN::QuantizeMaxMin *main_as_QuantizeMaxMin() const { ++ return main_type() == MNN::OpParameter_QuantizeMaxMin ? static_cast(main()) : nullptr; + } +- const QuantizeV2 *main_as_QuantizeV2() const { +- return main_type() == OpParameter_QuantizeV2 ? static_cast(main()) : nullptr; ++ const MNN::QuantizeV2 *main_as_QuantizeV2() const { ++ return main_type() == MNN::OpParameter_QuantizeV2 ? static_cast(main()) : nullptr; + } +- const Range *main_as_Range() const { +- return main_type() == OpParameter_Range ? static_cast(main()) : nullptr; ++ const MNN::Range *main_as_Range() const { ++ return main_type() == MNN::OpParameter_Range ? static_cast(main()) : nullptr; + } +- const Rank *main_as_Rank() const { +- return main_type() == OpParameter_Rank ? static_cast(main()) : nullptr; ++ const MNN::Rank *main_as_Rank() const { ++ return main_type() == MNN::OpParameter_Rank ? static_cast(main()) : nullptr; + } +- const ReduceJoin *main_as_ReduceJoin() const { +- return main_type() == OpParameter_ReduceJoin ? static_cast(main()) : nullptr; ++ const MNN::ReduceJoin *main_as_ReduceJoin() const { ++ return main_type() == MNN::OpParameter_ReduceJoin ? static_cast(main()) : nullptr; + } +- const ReductionParam *main_as_ReductionParam() const { +- return main_type() == OpParameter_ReductionParam ? static_cast(main()) : nullptr; ++ const MNN::ReductionParam *main_as_ReductionParam() const { ++ return main_type() == MNN::OpParameter_ReductionParam ? static_cast(main()) : nullptr; + } +- const Relu *main_as_Relu() const { +- return main_type() == OpParameter_Relu ? static_cast(main()) : nullptr; ++ const MNN::Relu *main_as_Relu() const { ++ return main_type() == MNN::OpParameter_Relu ? static_cast(main()) : nullptr; + } +- const Relu6 *main_as_Relu6() const { +- return main_type() == OpParameter_Relu6 ? static_cast(main()) : nullptr; ++ const MNN::Relu6 *main_as_Relu6() const { ++ return main_type() == MNN::OpParameter_Relu6 ? static_cast(main()) : nullptr; + } +- const RequantizationRange *main_as_RequantizationRange() const { +- return main_type() == OpParameter_RequantizationRange ? static_cast(main()) : nullptr; ++ const MNN::RequantizationRange *main_as_RequantizationRange() const { ++ return main_type() == MNN::OpParameter_RequantizationRange ? static_cast(main()) : nullptr; + } +- const Requantize *main_as_Requantize() const { +- return main_type() == OpParameter_Requantize ? static_cast(main()) : nullptr; ++ const MNN::Requantize *main_as_Requantize() const { ++ return main_type() == MNN::OpParameter_Requantize ? static_cast(main()) : nullptr; + } +- const Reshape *main_as_Reshape() const { +- return main_type() == OpParameter_Reshape ? static_cast(main()) : nullptr; ++ const MNN::Reshape *main_as_Reshape() const { ++ return main_type() == MNN::OpParameter_Reshape ? static_cast(main()) : nullptr; + } +- const Resize *main_as_Resize() const { +- return main_type() == OpParameter_Resize ? static_cast(main()) : nullptr; ++ const MNN::Resize *main_as_Resize() const { ++ return main_type() == MNN::OpParameter_Resize ? static_cast(main()) : nullptr; + } +- const RoiPooling *main_as_RoiPooling() const { +- return main_type() == OpParameter_RoiPooling ? static_cast(main()) : nullptr; ++ const MNN::RoiPooling *main_as_RoiPooling() const { ++ return main_type() == MNN::OpParameter_RoiPooling ? static_cast(main()) : nullptr; + } +- const Scale *main_as_Scale() const { +- return main_type() == OpParameter_Scale ? static_cast(main()) : nullptr; ++ const MNN::Scale *main_as_Scale() const { ++ return main_type() == MNN::OpParameter_Scale ? static_cast(main()) : nullptr; + } +- const Selu *main_as_Selu() const { +- return main_type() == OpParameter_Selu ? static_cast(main()) : nullptr; ++ const MNN::Selu *main_as_Selu() const { ++ return main_type() == MNN::OpParameter_Selu ? static_cast(main()) : nullptr; + } +- const Size *main_as_Size() const { +- return main_type() == OpParameter_Size ? static_cast(main()) : nullptr; ++ const MNN::Size *main_as_Size() const { ++ return main_type() == MNN::OpParameter_Size ? static_cast(main()) : nullptr; + } +- const Slice *main_as_Slice() const { +- return main_type() == OpParameter_Slice ? static_cast(main()) : nullptr; ++ const MNN::Slice *main_as_Slice() const { ++ return main_type() == MNN::OpParameter_Slice ? static_cast(main()) : nullptr; + } +- const SliceTf *main_as_SliceTf() const { +- return main_type() == OpParameter_SliceTf ? static_cast(main()) : nullptr; ++ const MNN::SliceTf *main_as_SliceTf() const { ++ return main_type() == MNN::OpParameter_SliceTf ? static_cast(main()) : nullptr; + } +- const SpaceBatch *main_as_SpaceBatch() const { +- return main_type() == OpParameter_SpaceBatch ? static_cast(main()) : nullptr; ++ const MNN::SpaceBatch *main_as_SpaceBatch() const { ++ return main_type() == MNN::OpParameter_SpaceBatch ? static_cast(main()) : nullptr; + } +- const SqueezeParam *main_as_SqueezeParam() const { +- return main_type() == OpParameter_SqueezeParam ? static_cast(main()) : nullptr; ++ const MNN::SqueezeParam *main_as_SqueezeParam() const { ++ return main_type() == MNN::OpParameter_SqueezeParam ? static_cast(main()) : nullptr; + } +- const StridedSliceParam *main_as_StridedSliceParam() const { +- return main_type() == OpParameter_StridedSliceParam ? static_cast(main()) : nullptr; ++ const MNN::StridedSliceParam *main_as_StridedSliceParam() const { ++ return main_type() == MNN::OpParameter_StridedSliceParam ? static_cast(main()) : nullptr; + } +- const TensorConvertInfo *main_as_TensorConvertInfo() const { +- return main_type() == OpParameter_TensorConvertInfo ? static_cast(main()) : nullptr; ++ const MNN::TensorConvertInfo *main_as_TensorConvertInfo() const { ++ return main_type() == MNN::OpParameter_TensorConvertInfo ? static_cast(main()) : nullptr; + } +- const TfQuantizedConv2D *main_as_TfQuantizedConv2D() const { +- return main_type() == OpParameter_TfQuantizedConv2D ? static_cast(main()) : nullptr; ++ const MNN::TfQuantizedConv2D *main_as_TfQuantizedConv2D() const { ++ return main_type() == MNN::OpParameter_TfQuantizedConv2D ? static_cast(main()) : nullptr; + } +- const TopKV2 *main_as_TopKV2() const { +- return main_type() == OpParameter_TopKV2 ? static_cast(main()) : nullptr; ++ const MNN::TopKV2 *main_as_TopKV2() const { ++ return main_type() == MNN::OpParameter_TopKV2 ? static_cast(main()) : nullptr; + } +- const Transpose *main_as_Transpose() const { +- return main_type() == OpParameter_Transpose ? static_cast(main()) : nullptr; ++ const MNN::Transpose *main_as_Transpose() const { ++ return main_type() == MNN::OpParameter_Transpose ? static_cast(main()) : nullptr; + } +- const UnaryOp *main_as_UnaryOp() const { +- return main_type() == OpParameter_UnaryOp ? static_cast(main()) : nullptr; ++ const MNN::UnaryOp *main_as_UnaryOp() const { ++ return main_type() == MNN::OpParameter_UnaryOp ? static_cast(main()) : nullptr; + } +- const MomentsParam *main_as_MomentsParam() const { +- return main_type() == OpParameter_MomentsParam ? static_cast(main()) : nullptr; ++ const MNN::MomentsParam *main_as_MomentsParam() const { ++ return main_type() == MNN::OpParameter_MomentsParam ? static_cast(main()) : nullptr; + } +- const RNNParam *main_as_RNNParam() const { +- return main_type() == OpParameter_RNNParam ? static_cast(main()) : nullptr; ++ const MNN::RNNParam *main_as_RNNParam() const { ++ return main_type() == MNN::OpParameter_RNNParam ? static_cast(main()) : nullptr; + } +- const BatchMatMulParam *main_as_BatchMatMulParam() const { +- return main_type() == OpParameter_BatchMatMulParam ? static_cast(main()) : nullptr; ++ const MNN::BatchMatMulParam *main_as_BatchMatMulParam() const { ++ return main_type() == MNN::OpParameter_BatchMatMulParam ? static_cast(main()) : nullptr; + } +- const QuantizedFloatParam *main_as_QuantizedFloatParam() const { +- return main_type() == OpParameter_QuantizedFloatParam ? static_cast(main()) : nullptr; ++ const MNN::QuantizedFloatParam *main_as_QuantizedFloatParam() const { ++ return main_type() == MNN::OpParameter_QuantizedFloatParam ? static_cast(main()) : nullptr; + } +- const DepthSpaceParam *main_as_DepthSpaceParam() const { +- return main_type() == OpParameter_DepthSpaceParam ? static_cast(main()) : nullptr; ++ const MNN::DepthSpaceParam *main_as_DepthSpaceParam() const { ++ return main_type() == MNN::OpParameter_DepthSpaceParam ? static_cast(main()) : nullptr; + } +- const EltwiseInt8 *main_as_EltwiseInt8() const { +- return main_type() == OpParameter_EltwiseInt8 ? static_cast(main()) : nullptr; ++ const MNN::EltwiseInt8 *main_as_EltwiseInt8() const { ++ return main_type() == MNN::OpParameter_EltwiseInt8 ? static_cast(main()) : nullptr; + } +- const ReverseSequenceParam *main_as_ReverseSequenceParam() const { +- return main_type() == OpParameter_ReverseSequenceParam ? static_cast(main()) : nullptr; ++ const MNN::ReverseSequenceParam *main_as_ReverseSequenceParam() const { ++ return main_type() == MNN::OpParameter_ReverseSequenceParam ? static_cast(main()) : nullptr; + } +- const Extra *main_as_Extra() const { +- return main_type() == OpParameter_Extra ? static_cast(main()) : nullptr; ++ const MNN::Extra *main_as_Extra() const { ++ return main_type() == MNN::OpParameter_Extra ? static_cast(main()) : nullptr; + } +- const Pool3D *main_as_Pool3D() const { +- return main_type() == OpParameter_Pool3D ? static_cast(main()) : nullptr; ++ const MNN::Pool3D *main_as_Pool3D() const { ++ return main_type() == MNN::OpParameter_Pool3D ? static_cast(main()) : nullptr; + } +- const Convolution3D *main_as_Convolution3D() const { +- return main_type() == OpParameter_Convolution3D ? static_cast(main()) : nullptr; ++ const MNN::Convolution3D *main_as_Convolution3D() const { ++ return main_type() == MNN::OpParameter_Convolution3D ? static_cast(main()) : nullptr; + } +- const ELU *main_as_ELU() const { +- return main_type() == OpParameter_ELU ? static_cast(main()) : nullptr; ++ const MNN::ELU *main_as_ELU() const { ++ return main_type() == MNN::OpParameter_ELU ? static_cast(main()) : nullptr; + } +- const DetectionPostProcessParam *main_as_DetectionPostProcessParam() const { +- return main_type() == OpParameter_DetectionPostProcessParam ? static_cast(main()) : nullptr; ++ const MNN::DetectionPostProcessParam *main_as_DetectionPostProcessParam() const { ++ return main_type() == MNN::OpParameter_DetectionPostProcessParam ? static_cast(main()) : nullptr; + } +- const OneHotParam *main_as_OneHotParam() const { +- return main_type() == OpParameter_OneHotParam ? static_cast(main()) : nullptr; ++ const MNN::OneHotParam *main_as_OneHotParam() const { ++ return main_type() == MNN::OpParameter_OneHotParam ? static_cast(main()) : nullptr; + } +- const PadParam *main_as_PadParam() const { +- return main_type() == OpParameter_PadParam ? static_cast(main()) : nullptr; ++ const MNN::PadParam *main_as_PadParam() const { ++ return main_type() == MNN::OpParameter_PadParam ? static_cast(main()) : nullptr; + } +- const WhileParam *main_as_WhileParam() const { +- return main_type() == OpParameter_WhileParam ? static_cast(main()) : nullptr; ++ const MNN::WhileParam *main_as_WhileParam() const { ++ return main_type() == MNN::OpParameter_WhileParam ? static_cast(main()) : nullptr; + } +- const IfParam *main_as_IfParam() const { +- return main_type() == OpParameter_IfParam ? static_cast(main()) : nullptr; ++ const MNN::IfParam *main_as_IfParam() const { ++ return main_type() == MNN::OpParameter_IfParam ? static_cast(main()) : nullptr; + } +- const RandomUniform *main_as_RandomUniform() const { +- return main_type() == OpParameter_RandomUniform ? static_cast(main()) : nullptr; ++ const MNN::RandomUniform *main_as_RandomUniform() const { ++ return main_type() == MNN::OpParameter_RandomUniform ? static_cast(main()) : nullptr; + } +- const LayerNorm *main_as_LayerNorm() const { +- return main_type() == OpParameter_LayerNorm ? static_cast(main()) : nullptr; ++ const MNN::LayerNorm *main_as_LayerNorm() const { ++ return main_type() == MNN::OpParameter_LayerNorm ? static_cast(main()) : nullptr; + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); +@@ -3268,11 +3273,11 @@ struct Op FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *outputIndexes() const { + return GetPointer *>(VT_OUTPUTINDEXES); + } +- OpType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::OpType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } +- MNN_DATA_FORMAT defaultDimentionFormat() const { +- return static_cast(GetField(VT_DEFAULTDIMENTIONFORMAT, 1)); ++ MNN::MNN_DATA_FORMAT defaultDimentionFormat() const { ++ return static_cast(GetField(VT_DEFAULTDIMENTIONFORMAT, 1)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -3294,365 +3299,366 @@ struct Op FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const OpT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + }; + +-template<> inline const QuantizedAdd *Op::main_as() const { ++template<> inline const MNN::QuantizedAdd *Op::main_as() const { + return main_as_QuantizedAdd(); + } + +-template<> inline const ArgMax *Op::main_as() const { ++template<> inline const MNN::ArgMax *Op::main_as() const { + return main_as_ArgMax(); + } + +-template<> inline const AsString *Op::main_as() const { ++template<> inline const MNN::AsString *Op::main_as() const { + return main_as_AsString(); + } + +-template<> inline const Axis *Op::main_as() const { ++template<> inline const MNN::Axis *Op::main_as() const { + return main_as_Axis(); + } + +-template<> inline const BatchNorm *Op::main_as() const { ++template<> inline const MNN::BatchNorm *Op::main_as() const { + return main_as_BatchNorm(); + } + +-template<> inline const BinaryOp *Op::main_as() const { ++template<> inline const MNN::BinaryOp *Op::main_as() const { + return main_as_BinaryOp(); + } + +-template<> inline const Blob *Op::main_as() const { ++template<> inline const MNN::Blob *Op::main_as() const { + return main_as_Blob(); + } + +-template<> inline const CastParam *Op::main_as() const { ++template<> inline const MNN::CastParam *Op::main_as() const { + return main_as_CastParam(); + } + +-template<> inline const Convolution2D *Op::main_as() const { ++template<> inline const MNN::Convolution2D *Op::main_as() const { + return main_as_Convolution2D(); + } + +-template<> inline const Crop *Op::main_as() const { ++template<> inline const MNN::Crop *Op::main_as() const { + return main_as_Crop(); + } + +-template<> inline const CropAndResize *Op::main_as() const { ++template<> inline const MNN::CropAndResize *Op::main_as() const { + return main_as_CropAndResize(); + } + +-template<> inline const Dequantize *Op::main_as() const { ++template<> inline const MNN::Dequantize *Op::main_as() const { + return main_as_Dequantize(); + } + +-template<> inline const DetectionOutput *Op::main_as() const { ++template<> inline const MNN::DetectionOutput *Op::main_as() const { + return main_as_DetectionOutput(); + } + +-template<> inline const Eltwise *Op::main_as() const { ++template<> inline const MNN::Eltwise *Op::main_as() const { + return main_as_Eltwise(); + } + +-template<> inline const ExpandDims *Op::main_as() const { ++template<> inline const MNN::ExpandDims *Op::main_as() const { + return main_as_ExpandDims(); + } + +-template<> inline const Fill *Op::main_as() const { ++template<> inline const MNN::Fill *Op::main_as() const { + return main_as_Fill(); + } + +-template<> inline const Flatten *Op::main_as() const { ++template<> inline const MNN::Flatten *Op::main_as() const { + return main_as_Flatten(); + } + +-template<> inline const Gather *Op::main_as() const { ++template<> inline const MNN::Gather *Op::main_as() const { + return main_as_Gather(); + } + +-template<> inline const GatherV2 *Op::main_as() const { ++template<> inline const MNN::GatherV2 *Op::main_as() const { + return main_as_GatherV2(); + } + +-template<> inline const InnerProduct *Op::main_as() const { ++template<> inline const MNN::InnerProduct *Op::main_as() const { + return main_as_InnerProduct(); + } + +-template<> inline const Input *Op::main_as() const { ++template<> inline const MNN::Input *Op::main_as() const { + return main_as_Input(); + } + +-template<> inline const Interp *Op::main_as() const { ++template<> inline const MNN::Interp *Op::main_as() const { + return main_as_Interp(); + } + +-template<> inline const LRN *Op::main_as() const { ++template<> inline const MNN::LRN *Op::main_as() const { + return main_as_LRN(); + } + +-template<> inline const LSTM *Op::main_as() const { ++template<> inline const MNN::LSTM *Op::main_as() const { + return main_as_LSTM(); + } + +-template<> inline const MatMul *Op::main_as() const { ++template<> inline const MNN::MatMul *Op::main_as() const { + return main_as_MatMul(); + } + +-template<> inline const NonMaxSuppressionV2 *Op::main_as() const { ++template<> inline const MNN::NonMaxSuppressionV2 *Op::main_as() const { + return main_as_NonMaxSuppressionV2(); + } + +-template<> inline const Normalize *Op::main_as() const { ++template<> inline const MNN::Normalize *Op::main_as() const { + return main_as_Normalize(); + } + +-template<> inline const PackParam *Op::main_as() const { ++template<> inline const MNN::PackParam *Op::main_as() const { + return main_as_PackParam(); + } + +-template<> inline const Permute *Op::main_as() const { ++template<> inline const MNN::Permute *Op::main_as() const { + return main_as_Permute(); + } + +-template<> inline const Plugin *Op::main_as() const { ++template<> inline const MNN::Plugin *Op::main_as() const { + return main_as_Plugin(); + } + +-template<> inline const Pool *Op::main_as() const { ++template<> inline const MNN::Pool *Op::main_as() const { + return main_as_Pool(); + } + +-template<> inline const PRelu *Op::main_as() const { ++template<> inline const MNN::PRelu *Op::main_as() const { + return main_as_PRelu(); + } + +-template<> inline const PriorBox *Op::main_as() const { ++template<> inline const MNN::PriorBox *Op::main_as() const { + return main_as_PriorBox(); + } + +-template<> inline const Proposal *Op::main_as() const { ++template<> inline const MNN::Proposal *Op::main_as() const { + return main_as_Proposal(); + } + +-template<> inline const QuantizedAvgPool *Op::main_as() const { ++template<> inline const MNN::QuantizedAvgPool *Op::main_as() const { + return main_as_QuantizedAvgPool(); + } + +-template<> inline const QuantizedBiasAdd *Op::main_as() const { ++template<> inline const MNN::QuantizedBiasAdd *Op::main_as() const { + return main_as_QuantizedBiasAdd(); + } + +-template<> inline const QuantizedConcat *Op::main_as() const { ++template<> inline const MNN::QuantizedConcat *Op::main_as() const { + return main_as_QuantizedConcat(); + } + +-template<> inline const QuantizedLogistic *Op::main_as() const { ++template<> inline const MNN::QuantizedLogistic *Op::main_as() const { + return main_as_QuantizedLogistic(); + } + +-template<> inline const QuantizedMatMul *Op::main_as() const { ++template<> inline const MNN::QuantizedMatMul *Op::main_as() const { + return main_as_QuantizedMatMul(); + } + +-template<> inline const QuantizedMaxPool *Op::main_as() const { ++template<> inline const MNN::QuantizedMaxPool *Op::main_as() const { + return main_as_QuantizedMaxPool(); + } + +-template<> inline const QuantizedRelu *Op::main_as() const { ++template<> inline const MNN::QuantizedRelu *Op::main_as() const { + return main_as_QuantizedRelu(); + } + +-template<> inline const QuantizedRelu6 *Op::main_as() const { ++template<> inline const MNN::QuantizedRelu6 *Op::main_as() const { + return main_as_QuantizedRelu6(); + } + +-template<> inline const QuantizedReshape *Op::main_as() const { ++template<> inline const MNN::QuantizedReshape *Op::main_as() const { + return main_as_QuantizedReshape(); + } + +-template<> inline const QuantizedSoftmax *Op::main_as() const { ++template<> inline const MNN::QuantizedSoftmax *Op::main_as() const { + return main_as_QuantizedSoftmax(); + } + +-template<> inline const QuantizeMaxMin *Op::main_as() const { ++template<> inline const MNN::QuantizeMaxMin *Op::main_as() const { + return main_as_QuantizeMaxMin(); + } + +-template<> inline const QuantizeV2 *Op::main_as() const { ++template<> inline const MNN::QuantizeV2 *Op::main_as() const { + return main_as_QuantizeV2(); + } + +-template<> inline const Range *Op::main_as() const { ++template<> inline const MNN::Range *Op::main_as() const { + return main_as_Range(); + } + +-template<> inline const Rank *Op::main_as() const { ++template<> inline const MNN::Rank *Op::main_as() const { + return main_as_Rank(); + } + +-template<> inline const ReduceJoin *Op::main_as() const { ++template<> inline const MNN::ReduceJoin *Op::main_as() const { + return main_as_ReduceJoin(); + } + +-template<> inline const ReductionParam *Op::main_as() const { ++template<> inline const MNN::ReductionParam *Op::main_as() const { + return main_as_ReductionParam(); + } + +-template<> inline const Relu *Op::main_as() const { ++template<> inline const MNN::Relu *Op::main_as() const { + return main_as_Relu(); + } + +-template<> inline const Relu6 *Op::main_as() const { ++template<> inline const MNN::Relu6 *Op::main_as() const { + return main_as_Relu6(); + } + +-template<> inline const RequantizationRange *Op::main_as() const { ++template<> inline const MNN::RequantizationRange *Op::main_as() const { + return main_as_RequantizationRange(); + } + +-template<> inline const Requantize *Op::main_as() const { ++template<> inline const MNN::Requantize *Op::main_as() const { + return main_as_Requantize(); + } + +-template<> inline const Reshape *Op::main_as() const { ++template<> inline const MNN::Reshape *Op::main_as() const { + return main_as_Reshape(); + } + +-template<> inline const Resize *Op::main_as() const { ++template<> inline const MNN::Resize *Op::main_as() const { + return main_as_Resize(); + } + +-template<> inline const RoiPooling *Op::main_as() const { ++template<> inline const MNN::RoiPooling *Op::main_as() const { + return main_as_RoiPooling(); + } + +-template<> inline const Scale *Op::main_as() const { ++template<> inline const MNN::Scale *Op::main_as() const { + return main_as_Scale(); + } + +-template<> inline const Selu *Op::main_as() const { ++template<> inline const MNN::Selu *Op::main_as() const { + return main_as_Selu(); + } + +-template<> inline const Size *Op::main_as() const { ++template<> inline const MNN::Size *Op::main_as() const { + return main_as_Size(); + } + +-template<> inline const Slice *Op::main_as() const { ++template<> inline const MNN::Slice *Op::main_as() const { + return main_as_Slice(); + } + +-template<> inline const SliceTf *Op::main_as() const { ++template<> inline const MNN::SliceTf *Op::main_as() const { + return main_as_SliceTf(); + } + +-template<> inline const SpaceBatch *Op::main_as() const { ++template<> inline const MNN::SpaceBatch *Op::main_as() const { + return main_as_SpaceBatch(); + } + +-template<> inline const SqueezeParam *Op::main_as() const { ++template<> inline const MNN::SqueezeParam *Op::main_as() const { + return main_as_SqueezeParam(); + } + +-template<> inline const StridedSliceParam *Op::main_as() const { ++template<> inline const MNN::StridedSliceParam *Op::main_as() const { + return main_as_StridedSliceParam(); + } + +-template<> inline const TensorConvertInfo *Op::main_as() const { ++template<> inline const MNN::TensorConvertInfo *Op::main_as() const { + return main_as_TensorConvertInfo(); + } + +-template<> inline const TfQuantizedConv2D *Op::main_as() const { ++template<> inline const MNN::TfQuantizedConv2D *Op::main_as() const { + return main_as_TfQuantizedConv2D(); + } + +-template<> inline const TopKV2 *Op::main_as() const { ++template<> inline const MNN::TopKV2 *Op::main_as() const { + return main_as_TopKV2(); + } + +-template<> inline const Transpose *Op::main_as() const { ++template<> inline const MNN::Transpose *Op::main_as() const { + return main_as_Transpose(); + } + +-template<> inline const UnaryOp *Op::main_as() const { ++template<> inline const MNN::UnaryOp *Op::main_as() const { + return main_as_UnaryOp(); + } + +-template<> inline const MomentsParam *Op::main_as() const { ++template<> inline const MNN::MomentsParam *Op::main_as() const { + return main_as_MomentsParam(); + } + +-template<> inline const RNNParam *Op::main_as() const { ++template<> inline const MNN::RNNParam *Op::main_as() const { + return main_as_RNNParam(); + } + +-template<> inline const BatchMatMulParam *Op::main_as() const { ++template<> inline const MNN::BatchMatMulParam *Op::main_as() const { + return main_as_BatchMatMulParam(); + } + +-template<> inline const QuantizedFloatParam *Op::main_as() const { ++template<> inline const MNN::QuantizedFloatParam *Op::main_as() const { + return main_as_QuantizedFloatParam(); + } + +-template<> inline const DepthSpaceParam *Op::main_as() const { ++template<> inline const MNN::DepthSpaceParam *Op::main_as() const { + return main_as_DepthSpaceParam(); + } + +-template<> inline const EltwiseInt8 *Op::main_as() const { ++template<> inline const MNN::EltwiseInt8 *Op::main_as() const { + return main_as_EltwiseInt8(); + } + +-template<> inline const ReverseSequenceParam *Op::main_as() const { ++template<> inline const MNN::ReverseSequenceParam *Op::main_as() const { + return main_as_ReverseSequenceParam(); + } + +-template<> inline const Extra *Op::main_as() const { ++template<> inline const MNN::Extra *Op::main_as() const { + return main_as_Extra(); + } + +-template<> inline const Pool3D *Op::main_as() const { ++template<> inline const MNN::Pool3D *Op::main_as() const { + return main_as_Pool3D(); + } + +-template<> inline const Convolution3D *Op::main_as() const { ++template<> inline const MNN::Convolution3D *Op::main_as() const { + return main_as_Convolution3D(); + } + +-template<> inline const ELU *Op::main_as() const { ++template<> inline const MNN::ELU *Op::main_as() const { + return main_as_ELU(); + } + +-template<> inline const DetectionPostProcessParam *Op::main_as() const { ++template<> inline const MNN::DetectionPostProcessParam *Op::main_as() const { + return main_as_DetectionPostProcessParam(); + } + +-template<> inline const OneHotParam *Op::main_as() const { ++template<> inline const MNN::OneHotParam *Op::main_as() const { + return main_as_OneHotParam(); + } + +-template<> inline const PadParam *Op::main_as() const { ++template<> inline const MNN::PadParam *Op::main_as() const { + return main_as_PadParam(); + } + +-template<> inline const WhileParam *Op::main_as() const { ++template<> inline const MNN::WhileParam *Op::main_as() const { + return main_as_WhileParam(); + } + +-template<> inline const IfParam *Op::main_as() const { ++template<> inline const MNN::IfParam *Op::main_as() const { + return main_as_IfParam(); + } + +-template<> inline const RandomUniform *Op::main_as() const { ++template<> inline const MNN::RandomUniform *Op::main_as() const { + return main_as_RandomUniform(); + } + +-template<> inline const LayerNorm *Op::main_as() const { ++template<> inline const MNN::LayerNorm *Op::main_as() const { + return main_as_LayerNorm(); + } + + struct OpBuilder { ++ typedef Op Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_inputIndexes(flatbuffers::Offset> inputIndexes) { + fbb_.AddOffset(Op::VT_INPUTINDEXES, inputIndexes); + } +- void add_main_type(OpParameter main_type) { ++ void add_main_type(MNN::OpParameter main_type) { + fbb_.AddElement(Op::VT_MAIN_TYPE, static_cast(main_type), 0); + } + void add_main(flatbuffers::Offset main) { +@@ -3664,17 +3670,16 @@ struct OpBuilder { + void add_outputIndexes(flatbuffers::Offset> outputIndexes) { + fbb_.AddOffset(Op::VT_OUTPUTINDEXES, outputIndexes); + } +- void add_type(OpType type) { ++ void add_type(MNN::OpType type) { + fbb_.AddElement(Op::VT_TYPE, static_cast(type), 0); + } +- void add_defaultDimentionFormat(MNN_DATA_FORMAT defaultDimentionFormat) { ++ void add_defaultDimentionFormat(MNN::MNN_DATA_FORMAT defaultDimentionFormat) { + fbb_.AddElement(Op::VT_DEFAULTDIMENTIONFORMAT, static_cast(defaultDimentionFormat), 1); + } + explicit OpBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- OpBuilder &operator=(const OpBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3685,12 +3690,12 @@ struct OpBuilder { + inline flatbuffers::Offset CreateOp( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> inputIndexes = 0, +- OpParameter main_type = OpParameter_NONE, ++ MNN::OpParameter main_type = MNN::OpParameter_NONE, + flatbuffers::Offset main = 0, + flatbuffers::Offset name = 0, + flatbuffers::Offset> outputIndexes = 0, +- OpType type = OpType_AbsVal, +- MNN_DATA_FORMAT defaultDimentionFormat = MNN_DATA_FORMAT_NHWC) { ++ MNN::OpType type = MNN::OpType_AbsVal, ++ MNN::MNN_DATA_FORMAT defaultDimentionFormat = MNN::MNN_DATA_FORMAT_NHWC) { + OpBuilder builder_(_fbb); + builder_.add_type(type); + builder_.add_outputIndexes(outputIndexes); +@@ -3705,12 +3710,12 @@ inline flatbuffers::Offset CreateOp( + inline flatbuffers::Offset CreateOpDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *inputIndexes = nullptr, +- OpParameter main_type = OpParameter_NONE, ++ MNN::OpParameter main_type = MNN::OpParameter_NONE, + flatbuffers::Offset main = 0, + const char *name = nullptr, + const std::vector *outputIndexes = nullptr, +- OpType type = OpType_AbsVal, +- MNN_DATA_FORMAT defaultDimentionFormat = MNN_DATA_FORMAT_NHWC) { ++ MNN::OpType type = MNN::OpType_AbsVal, ++ MNN::MNN_DATA_FORMAT defaultDimentionFormat = MNN::MNN_DATA_FORMAT_NHWC) { + auto inputIndexes__ = inputIndexes ? _fbb.CreateVector(*inputIndexes) : 0; + auto name__ = name ? _fbb.CreateString(name) : 0; + auto outputIndexes__ = outputIndexes ? _fbb.CreateVector(*outputIndexes) : 0; +@@ -3729,15 +3734,13 @@ flatbuffers::Offset CreateOp(flatbuffers::FlatBufferBuilder &_fbb, const OpT + + struct ViewT : public flatbuffers::NativeTable { + typedef View TableType; +- int32_t offset; +- std::vector stride; +- ViewT() +- : offset(0) { +- } ++ int32_t offset = 0; ++ std::vector stride{}; + }; + + struct View FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ViewT NativeTableType; ++ typedef ViewBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ViewTypeTable(); + } +@@ -3764,6 +3767,7 @@ struct View FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ViewBuilder { ++ typedef View Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_offset(int32_t offset) { +@@ -3776,7 +3780,6 @@ struct ViewBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ViewBuilder &operator=(const ViewBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3809,17 +3812,15 @@ flatbuffers::Offset CreateView(flatbuffers::FlatBufferBuilder &_fbb, const + + struct RegionT : public flatbuffers::NativeTable { + typedef Region TableType; +- std::unique_ptr src; +- std::unique_ptr dst; +- std::vector size; +- int32_t origin; +- RegionT() +- : origin(0) { +- } ++ std::unique_ptr src{}; ++ std::unique_ptr dst{}; ++ std::vector size{}; ++ int32_t origin = 0; + }; + + struct Region FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RegionT NativeTableType; ++ typedef RegionBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return RegionTypeTable(); + } +@@ -3829,11 +3830,11 @@ struct Region FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_SIZE = 8, + VT_ORIGIN = 10 + }; +- const View *src() const { +- return GetPointer(VT_SRC); ++ const MNN::View *src() const { ++ return GetPointer(VT_SRC); + } +- const View *dst() const { +- return GetPointer(VT_DST); ++ const MNN::View *dst() const { ++ return GetPointer(VT_DST); + } + const flatbuffers::Vector *size() const { + return GetPointer *>(VT_SIZE); +@@ -3858,12 +3859,13 @@ struct Region FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RegionBuilder { ++ typedef Region Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_src(flatbuffers::Offset src) { ++ void add_src(flatbuffers::Offset src) { + fbb_.AddOffset(Region::VT_SRC, src); + } +- void add_dst(flatbuffers::Offset dst) { ++ void add_dst(flatbuffers::Offset dst) { + fbb_.AddOffset(Region::VT_DST, dst); + } + void add_size(flatbuffers::Offset> size) { +@@ -3876,7 +3878,6 @@ struct RegionBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RegionBuilder &operator=(const RegionBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3886,8 +3887,8 @@ struct RegionBuilder { + + inline flatbuffers::Offset CreateRegion( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset src = 0, +- flatbuffers::Offset dst = 0, ++ flatbuffers::Offset src = 0, ++ flatbuffers::Offset dst = 0, + flatbuffers::Offset> size = 0, + int32_t origin = 0) { + RegionBuilder builder_(_fbb); +@@ -3900,8 +3901,8 @@ inline flatbuffers::Offset CreateRegion( + + inline flatbuffers::Offset CreateRegionDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset src = 0, +- flatbuffers::Offset dst = 0, ++ flatbuffers::Offset src = 0, ++ flatbuffers::Offset dst = 0, + const std::vector *size = nullptr, + int32_t origin = 0) { + auto size__ = size ? _fbb.CreateVector(*size) : 0; +@@ -3917,17 +3918,15 @@ flatbuffers::Offset CreateRegion(flatbuffers::FlatBufferBuilder &_fbb, c + + struct TensorDescribeT : public flatbuffers::NativeTable { + typedef TensorDescribe TableType; +- std::unique_ptr blob; +- int32_t index; +- std::string name; +- std::vector> regions; +- TensorDescribeT() +- : index(0) { +- } ++ std::unique_ptr blob{}; ++ int32_t index = 0; ++ std::string name{}; ++ std::vector> regions{}; + }; + + struct TensorDescribe FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TensorDescribeT NativeTableType; ++ typedef TensorDescribeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return TensorDescribeTypeTable(); + } +@@ -3937,8 +3936,8 @@ struct TensorDescribe FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_NAME = 8, + VT_REGIONS = 10 + }; +- const Blob *blob() const { +- return GetPointer(VT_BLOB); ++ const MNN::Blob *blob() const { ++ return GetPointer(VT_BLOB); + } + int32_t index() const { + return GetField(VT_INDEX, 0); +@@ -3946,8 +3945,8 @@ struct TensorDescribe FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } +- const flatbuffers::Vector> *regions() const { +- return GetPointer> *>(VT_REGIONS); ++ const flatbuffers::Vector> *regions() const { ++ return GetPointer> *>(VT_REGIONS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -3967,9 +3966,10 @@ struct TensorDescribe FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TensorDescribeBuilder { ++ typedef TensorDescribe Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_blob(flatbuffers::Offset blob) { ++ void add_blob(flatbuffers::Offset blob) { + fbb_.AddOffset(TensorDescribe::VT_BLOB, blob); + } + void add_index(int32_t index) { +@@ -3978,14 +3978,13 @@ struct TensorDescribeBuilder { + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(TensorDescribe::VT_NAME, name); + } +- void add_regions(flatbuffers::Offset>> regions) { ++ void add_regions(flatbuffers::Offset>> regions) { + fbb_.AddOffset(TensorDescribe::VT_REGIONS, regions); + } + explicit TensorDescribeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TensorDescribeBuilder &operator=(const TensorDescribeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3995,10 +3994,10 @@ struct TensorDescribeBuilder { + + inline flatbuffers::Offset CreateTensorDescribe( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset blob = 0, ++ flatbuffers::Offset blob = 0, + int32_t index = 0, + flatbuffers::Offset name = 0, +- flatbuffers::Offset>> regions = 0) { ++ flatbuffers::Offset>> regions = 0) { + TensorDescribeBuilder builder_(_fbb); + builder_.add_regions(regions); + builder_.add_name(name); +@@ -4009,12 +4008,12 @@ inline flatbuffers::Offset CreateTensorDescribe( + + inline flatbuffers::Offset CreateTensorDescribeDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset blob = 0, ++ flatbuffers::Offset blob = 0, + int32_t index = 0, + const char *name = nullptr, +- const std::vector> *regions = nullptr) { ++ const std::vector> *regions = nullptr) { + auto name__ = name ? _fbb.CreateString(name) : 0; +- auto regions__ = regions ? _fbb.CreateVector>(*regions) : 0; ++ auto regions__ = regions ? _fbb.CreateVector>(*regions) : 0; + return MNN::CreateTensorDescribe( + _fbb, + blob, +@@ -4027,17 +4026,16 @@ flatbuffers::Offset CreateTensorDescribe(flatbuffers::FlatBuffer + + struct SubGraphProtoT : public flatbuffers::NativeTable { + typedef SubGraphProto TableType; +- std::string name; +- std::vector inputs; +- std::vector outputs; +- std::vector tensors; +- std::vector> nodes; +- SubGraphProtoT() { +- } ++ std::string name{}; ++ std::vector inputs{}; ++ std::vector outputs{}; ++ std::vector tensors{}; ++ std::vector> nodes{}; + }; + + struct SubGraphProto FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SubGraphProtoT NativeTableType; ++ typedef SubGraphProtoBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return SubGraphProtoTypeTable(); + } +@@ -4060,8 +4058,8 @@ struct SubGraphProto FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector> *tensors() const { + return GetPointer> *>(VT_TENSORS); + } +- const flatbuffers::Vector> *nodes() const { +- return GetPointer> *>(VT_NODES); ++ const flatbuffers::Vector> *nodes() const { ++ return GetPointer> *>(VT_NODES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -4085,6 +4083,7 @@ struct SubGraphProto FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SubGraphProtoBuilder { ++ typedef SubGraphProto Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { +@@ -4099,14 +4098,13 @@ struct SubGraphProtoBuilder { + void add_tensors(flatbuffers::Offset>> tensors) { + fbb_.AddOffset(SubGraphProto::VT_TENSORS, tensors); + } +- void add_nodes(flatbuffers::Offset>> nodes) { ++ void add_nodes(flatbuffers::Offset>> nodes) { + fbb_.AddOffset(SubGraphProto::VT_NODES, nodes); + } + explicit SubGraphProtoBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SubGraphProtoBuilder &operator=(const SubGraphProtoBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4120,7 +4118,7 @@ inline flatbuffers::Offset CreateSubGraphProto( + flatbuffers::Offset> inputs = 0, + flatbuffers::Offset> outputs = 0, + flatbuffers::Offset>> tensors = 0, +- flatbuffers::Offset>> nodes = 0) { ++ flatbuffers::Offset>> nodes = 0) { + SubGraphProtoBuilder builder_(_fbb); + builder_.add_nodes(nodes); + builder_.add_tensors(tensors); +@@ -4136,12 +4134,12 @@ inline flatbuffers::Offset CreateSubGraphProtoDirect( + const std::vector *inputs = nullptr, + const std::vector *outputs = nullptr, + const std::vector> *tensors = nullptr, +- const std::vector> *nodes = nullptr) { ++ const std::vector> *nodes = nullptr) { + auto name__ = name ? _fbb.CreateString(name) : 0; + auto inputs__ = inputs ? _fbb.CreateVector(*inputs) : 0; + auto outputs__ = outputs ? _fbb.CreateVector(*outputs) : 0; + auto tensors__ = tensors ? _fbb.CreateVector>(*tensors) : 0; +- auto nodes__ = nodes ? _fbb.CreateVector>(*nodes) : 0; ++ auto nodes__ = nodes ? _fbb.CreateVector>(*nodes) : 0; + return MNN::CreateSubGraphProto( + _fbb, + name__, +@@ -4155,27 +4153,22 @@ flatbuffers::Offset CreateSubGraphProto(flatbuffers::FlatBufferBu + + struct NetT : public flatbuffers::NativeTable { + typedef Net TableType; +- std::string bizCode; +- std::vector> extraTensorDescribe; +- std::unique_ptr gpulibrary; +- std::vector> oplists; +- std::vector outputName; +- ForwardType preferForwardType; +- NetSource sourceType; +- std::vector tensorName; +- int32_t tensorNumber; +- Usage usage; +- std::vector> subgraphs; +- NetT() +- : preferForwardType(ForwardType_CPU), +- sourceType(NetSource_CAFFE), +- tensorNumber(0), +- usage(Usage_INFERENCE) { +- } ++ std::string bizCode{}; ++ std::vector> extraTensorDescribe{}; ++ std::unique_ptr gpulibrary{}; ++ std::vector> oplists{}; ++ std::vector outputName{}; ++ MNN::ForwardType preferForwardType = MNN::ForwardType_CPU; ++ MNN::NetSource sourceType = MNN::NetSource_CAFFE; ++ std::vector tensorName{}; ++ int32_t tensorNumber = 0; ++ MNN::Usage usage = MNN::Usage_INFERENCE; ++ std::vector> subgraphs{}; + }; + + struct Net FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NetT NativeTableType; ++ typedef NetBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return NetTypeTable(); + } +@@ -4195,23 +4188,23 @@ struct Net FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::String *bizCode() const { + return GetPointer(VT_BIZCODE); + } +- const flatbuffers::Vector> *extraTensorDescribe() const { +- return GetPointer> *>(VT_EXTRATENSORDESCRIBE); ++ const flatbuffers::Vector> *extraTensorDescribe() const { ++ return GetPointer> *>(VT_EXTRATENSORDESCRIBE); + } +- const GpuLibrary *gpulibrary() const { +- return GetPointer(VT_GPULIBRARY); ++ const MNN::GpuLibrary *gpulibrary() const { ++ return GetPointer(VT_GPULIBRARY); + } +- const flatbuffers::Vector> *oplists() const { +- return GetPointer> *>(VT_OPLISTS); ++ const flatbuffers::Vector> *oplists() const { ++ return GetPointer> *>(VT_OPLISTS); + } + const flatbuffers::Vector> *outputName() const { + return GetPointer> *>(VT_OUTPUTNAME); + } +- ForwardType preferForwardType() const { +- return static_cast(GetField(VT_PREFERFORWARDTYPE, 0)); ++ MNN::ForwardType preferForwardType() const { ++ return static_cast(GetField(VT_PREFERFORWARDTYPE, 0)); + } +- NetSource sourceType() const { +- return static_cast(GetField(VT_SOURCETYPE, 0)); ++ MNN::NetSource sourceType() const { ++ return static_cast(GetField(VT_SOURCETYPE, 0)); + } + const flatbuffers::Vector> *tensorName() const { + return GetPointer> *>(VT_TENSORNAME); +@@ -4219,11 +4212,11 @@ struct Net FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t tensorNumber() const { + return GetField(VT_TENSORNUMBER, 0); + } +- Usage usage() const { +- return static_cast(GetField(VT_USAGE, 0)); ++ MNN::Usage usage() const { ++ return static_cast(GetField(VT_USAGE, 0)); + } +- const flatbuffers::Vector> *subgraphs() const { +- return GetPointer> *>(VT_SUBGRAPHS); ++ const flatbuffers::Vector> *subgraphs() const { ++ return GetPointer> *>(VT_SUBGRAPHS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -4258,27 +4251,28 @@ struct Net FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct NetBuilder { ++ typedef Net Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_bizCode(flatbuffers::Offset bizCode) { + fbb_.AddOffset(Net::VT_BIZCODE, bizCode); + } +- void add_extraTensorDescribe(flatbuffers::Offset>> extraTensorDescribe) { ++ void add_extraTensorDescribe(flatbuffers::Offset>> extraTensorDescribe) { + fbb_.AddOffset(Net::VT_EXTRATENSORDESCRIBE, extraTensorDescribe); + } +- void add_gpulibrary(flatbuffers::Offset gpulibrary) { ++ void add_gpulibrary(flatbuffers::Offset gpulibrary) { + fbb_.AddOffset(Net::VT_GPULIBRARY, gpulibrary); + } +- void add_oplists(flatbuffers::Offset>> oplists) { ++ void add_oplists(flatbuffers::Offset>> oplists) { + fbb_.AddOffset(Net::VT_OPLISTS, oplists); + } + void add_outputName(flatbuffers::Offset>> outputName) { + fbb_.AddOffset(Net::VT_OUTPUTNAME, outputName); + } +- void add_preferForwardType(ForwardType preferForwardType) { ++ void add_preferForwardType(MNN::ForwardType preferForwardType) { + fbb_.AddElement(Net::VT_PREFERFORWARDTYPE, static_cast(preferForwardType), 0); + } +- void add_sourceType(NetSource sourceType) { ++ void add_sourceType(MNN::NetSource sourceType) { + fbb_.AddElement(Net::VT_SOURCETYPE, static_cast(sourceType), 0); + } + void add_tensorName(flatbuffers::Offset>> tensorName) { +@@ -4287,17 +4281,16 @@ struct NetBuilder { + void add_tensorNumber(int32_t tensorNumber) { + fbb_.AddElement(Net::VT_TENSORNUMBER, tensorNumber, 0); + } +- void add_usage(Usage usage) { ++ void add_usage(MNN::Usage usage) { + fbb_.AddElement(Net::VT_USAGE, static_cast(usage), 0); + } +- void add_subgraphs(flatbuffers::Offset>> subgraphs) { ++ void add_subgraphs(flatbuffers::Offset>> subgraphs) { + fbb_.AddOffset(Net::VT_SUBGRAPHS, subgraphs); + } + explicit NetBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- NetBuilder &operator=(const NetBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4308,16 +4301,16 @@ struct NetBuilder { + inline flatbuffers::Offset CreateNet( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset bizCode = 0, +- flatbuffers::Offset>> extraTensorDescribe = 0, +- flatbuffers::Offset gpulibrary = 0, +- flatbuffers::Offset>> oplists = 0, ++ flatbuffers::Offset>> extraTensorDescribe = 0, ++ flatbuffers::Offset gpulibrary = 0, ++ flatbuffers::Offset>> oplists = 0, + flatbuffers::Offset>> outputName = 0, +- ForwardType preferForwardType = ForwardType_CPU, +- NetSource sourceType = NetSource_CAFFE, ++ MNN::ForwardType preferForwardType = MNN::ForwardType_CPU, ++ MNN::NetSource sourceType = MNN::NetSource_CAFFE, + flatbuffers::Offset>> tensorName = 0, + int32_t tensorNumber = 0, +- Usage usage = Usage_INFERENCE, +- flatbuffers::Offset>> subgraphs = 0) { ++ MNN::Usage usage = MNN::Usage_INFERENCE, ++ flatbuffers::Offset>> subgraphs = 0) { + NetBuilder builder_(_fbb); + builder_.add_subgraphs(subgraphs); + builder_.add_tensorNumber(tensorNumber); +@@ -4336,22 +4329,22 @@ inline flatbuffers::Offset CreateNet( + inline flatbuffers::Offset CreateNetDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *bizCode = nullptr, +- const std::vector> *extraTensorDescribe = nullptr, +- flatbuffers::Offset gpulibrary = 0, +- const std::vector> *oplists = nullptr, ++ const std::vector> *extraTensorDescribe = nullptr, ++ flatbuffers::Offset gpulibrary = 0, ++ const std::vector> *oplists = nullptr, + const std::vector> *outputName = nullptr, +- ForwardType preferForwardType = ForwardType_CPU, +- NetSource sourceType = NetSource_CAFFE, ++ MNN::ForwardType preferForwardType = MNN::ForwardType_CPU, ++ MNN::NetSource sourceType = MNN::NetSource_CAFFE, + const std::vector> *tensorName = nullptr, + int32_t tensorNumber = 0, +- Usage usage = Usage_INFERENCE, +- const std::vector> *subgraphs = nullptr) { ++ MNN::Usage usage = MNN::Usage_INFERENCE, ++ const std::vector> *subgraphs = nullptr) { + auto bizCode__ = bizCode ? _fbb.CreateString(bizCode) : 0; +- auto extraTensorDescribe__ = extraTensorDescribe ? _fbb.CreateVector>(*extraTensorDescribe) : 0; +- auto oplists__ = oplists ? _fbb.CreateVector>(*oplists) : 0; ++ auto extraTensorDescribe__ = extraTensorDescribe ? _fbb.CreateVector>(*extraTensorDescribe) : 0; ++ auto oplists__ = oplists ? _fbb.CreateVector>(*oplists) : 0; + auto outputName__ = outputName ? _fbb.CreateVector>(*outputName) : 0; + auto tensorName__ = tensorName ? _fbb.CreateVector>(*tensorName) : 0; +- auto subgraphs__ = subgraphs ? _fbb.CreateVector>(*subgraphs) : 0; ++ auto subgraphs__ = subgraphs ? _fbb.CreateVector>(*subgraphs) : 0; + return MNN::CreateNet( + _fbb, + bizCode__, +@@ -4370,16 +4363,16 @@ inline flatbuffers::Offset CreateNetDirect( + flatbuffers::Offset CreateNet(flatbuffers::FlatBufferBuilder &_fbb, const NetT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + inline PluginT *Plugin::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PluginT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PluginT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Plugin::UnPackTo(PluginT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = type(); if (_e) _o->type = _e->str(); }; +- { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; ++ { auto _e = type(); if (_e) _o->type = _e->str(); } ++ { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset Plugin::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PluginT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4391,7 +4384,7 @@ inline flatbuffers::Offset CreatePlugin(flatbuffers::FlatBufferBuilder & + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const PluginT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _type = _o->type.empty() ? 0 : _fbb.CreateString(_o->type); +- auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; + return MNN::CreatePlugin( + _fbb, + _type, +@@ -4399,18 +4392,18 @@ inline flatbuffers::Offset CreatePlugin(flatbuffers::FlatBufferBuilder & + } + + inline ExtraT *Extra::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ExtraT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ExtraT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Extra::UnPackTo(ExtraT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = type(); if (_e) _o->type = _e->str(); }; +- { auto _e = engine(); if (_e) _o->engine = _e->str(); }; +- { auto _e = info(); if (_e) { _o->info.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->info[_i] = _e->Get(_i); } } }; +- { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; ++ { auto _e = type(); if (_e) _o->type = _e->str(); } ++ { auto _e = engine(); if (_e) _o->engine = _e->str(); } ++ { auto _e = info(); if (_e) { _o->info.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->info.begin()); } } ++ { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset Extra::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExtraT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4424,7 +4417,7 @@ inline flatbuffers::Offset CreateExtra(flatbuffers::FlatBufferBuilder &_f + auto _type = _o->type.empty() ? 0 : _fbb.CreateString(_o->type); + auto _engine = _o->engine.empty() ? 0 : _fbb.CreateString(_o->engine); + auto _info = _o->info.size() ? _fbb.CreateVector(_o->info) : 0; +- auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; + return MNN::CreateExtra( + _fbb, + _type, +@@ -4434,15 +4427,15 @@ inline flatbuffers::Offset CreateExtra(flatbuffers::FlatBufferBuilder &_f + } + + inline StringVecT *StringVec::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new StringVecT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new StringVecT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void StringVec::UnPackTo(StringVecT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = data(); if (_e) { _o->data.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->data[_i] = _e->Get(_i)->str(); } } }; ++ { auto _e = data(); if (_e) { _o->data.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->data[_i] = _e->Get(_i)->str(); } } } + } + + inline flatbuffers::Offset StringVec::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StringVecT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4460,19 +4453,19 @@ inline flatbuffers::Offset CreateStringVec(flatbuffers::FlatBufferBui + } + + inline WhileParamT *WhileParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new WhileParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new WhileParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void WhileParam::UnPackTo(WhileParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = cond_graph(); if (_e) _o->cond_graph = _e->str(); }; +- { auto _e = body_graph(); if (_e) _o->body_graph = _e->str(); }; +- { auto _e = aliases_inputs(); if (_e) { _o->aliases_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; +- { auto _e = aliases_outputs(); if (_e) { _o->aliases_outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_outputs[_i] = _e->Get(_i)->str(); } } }; +- { auto _e = aliases_updates(); if (_e) { _o->aliases_updates.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_updates[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; ++ { auto _e = cond_graph(); if (_e) _o->cond_graph = _e->str(); } ++ { auto _e = body_graph(); if (_e) _o->body_graph = _e->str(); } ++ { auto _e = aliases_inputs(); if (_e) { _o->aliases_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = aliases_outputs(); if (_e) { _o->aliases_outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_outputs[_i] = _e->Get(_i)->str(); } } } ++ { auto _e = aliases_updates(); if (_e) { _o->aliases_updates.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_updates[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset WhileParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhileParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4485,9 +4478,9 @@ inline flatbuffers::Offset CreateWhileParam(flatbuffers::FlatBufferB + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WhileParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _cond_graph = _o->cond_graph.empty() ? 0 : _fbb.CreateString(_o->cond_graph); + auto _body_graph = _o->body_graph.empty() ? 0 : _fbb.CreateString(_o->body_graph); +- auto _aliases_inputs = _o->aliases_inputs.size() ? _fbb.CreateVector> (_o->aliases_inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_inputs[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _aliases_inputs = _o->aliases_inputs.size() ? _fbb.CreateVector> (_o->aliases_inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_inputs[i].get(), __va->__rehasher); }, &_va ) : 0; + auto _aliases_outputs = _o->aliases_outputs.size() ? _fbb.CreateVectorOfStrings(_o->aliases_outputs) : 0; +- auto _aliases_updates = _o->aliases_updates.size() ? _fbb.CreateVector> (_o->aliases_updates.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_updates[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _aliases_updates = _o->aliases_updates.size() ? _fbb.CreateVector> (_o->aliases_updates.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_updates[i].get(), __va->__rehasher); }, &_va ) : 0; + return MNN::CreateWhileParam( + _fbb, + _cond_graph, +@@ -4498,18 +4491,18 @@ inline flatbuffers::Offset CreateWhileParam(flatbuffers::FlatBufferB + } + + inline IfParamT *IfParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new IfParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new IfParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void IfParam::UnPackTo(IfParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = then_graph(); if (_e) _o->then_graph = _e->str(); }; +- { auto _e = else_graph(); if (_e) _o->else_graph = _e->str(); }; +- { auto _e = aliases_inputs(); if (_e) { _o->aliases_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; +- { auto _e = aliases_outputs(); if (_e) { _o->aliases_outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_outputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; ++ { auto _e = then_graph(); if (_e) _o->then_graph = _e->str(); } ++ { auto _e = else_graph(); if (_e) _o->else_graph = _e->str(); } ++ { auto _e = aliases_inputs(); if (_e) { _o->aliases_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = aliases_outputs(); if (_e) { _o->aliases_outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_outputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset IfParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const IfParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4522,8 +4515,8 @@ inline flatbuffers::Offset CreateIfParam(flatbuffers::FlatBufferBuilder + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const IfParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _then_graph = _o->then_graph.empty() ? 0 : _fbb.CreateString(_o->then_graph); + auto _else_graph = _o->else_graph.empty() ? 0 : _fbb.CreateString(_o->else_graph); +- auto _aliases_inputs = _o->aliases_inputs.size() ? _fbb.CreateVector> (_o->aliases_inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_inputs[i].get(), __va->__rehasher); }, &_va ) : 0; +- auto _aliases_outputs = _o->aliases_outputs.size() ? _fbb.CreateVector> (_o->aliases_outputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_outputs[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _aliases_inputs = _o->aliases_inputs.size() ? _fbb.CreateVector> (_o->aliases_inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_inputs[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _aliases_outputs = _o->aliases_outputs.size() ? _fbb.CreateVector> (_o->aliases_outputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_outputs[i].get(), __va->__rehasher); }, &_va ) : 0; + return MNN::CreateIfParam( + _fbb, + _then_graph, +@@ -4533,21 +4526,21 @@ inline flatbuffers::Offset CreateIfParam(flatbuffers::FlatBufferBuilder + } + + inline OpT *Op::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new OpT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new OpT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Op::UnPackTo(OpT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } }; +- { auto _e = main_type(); _o->main.type = _e; }; +- { auto _e = main(); if (_e) _o->main.value = OpParameterUnion::UnPack(_e, main_type(), _resolver); }; +- { auto _e = name(); if (_e) _o->name = _e->str(); }; +- { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } }; +- { auto _e = type(); _o->type = _e; }; +- { auto _e = defaultDimentionFormat(); _o->defaultDimentionFormat = _e; }; ++ { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } } ++ { auto _e = main_type(); _o->main.type = _e; } ++ { auto _e = main(); if (_e) _o->main.value = MNN::OpParameterUnion::UnPack(_e, main_type(), _resolver); } ++ { auto _e = name(); if (_e) _o->name = _e->str(); } ++ { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } } ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = defaultDimentionFormat(); _o->defaultDimentionFormat = _e; } + } + + inline flatbuffers::Offset Op::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OpT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4577,16 +4570,16 @@ inline flatbuffers::Offset CreateOp(flatbuffers::FlatBufferBuilder &_fbb, co + } + + inline ViewT *View::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ViewT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ViewT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void View::UnPackTo(ViewT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = offset(); _o->offset = _e; }; +- { auto _e = stride(); if (_e) { _o->stride.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->stride[_i] = _e->Get(_i); } } }; ++ { auto _e = offset(); _o->offset = _e; } ++ { auto _e = stride(); if (_e) { _o->stride.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->stride[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset View::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ViewT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4606,18 +4599,18 @@ inline flatbuffers::Offset CreateView(flatbuffers::FlatBufferBuilder &_fbb + } + + inline RegionT *Region::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RegionT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RegionT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Region::UnPackTo(RegionT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = src(); if (_e) _o->src = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = dst(); if (_e) _o->dst = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = size(); if (_e) { _o->size.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->size[_i] = _e->Get(_i); } } }; +- { auto _e = origin(); _o->origin = _e; }; ++ { auto _e = src(); if (_e) _o->src = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = dst(); if (_e) _o->dst = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = size(); if (_e) { _o->size.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->size[_i] = _e->Get(_i); } } } ++ { auto _e = origin(); _o->origin = _e; } + } + + inline flatbuffers::Offset Region::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RegionT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4641,18 +4634,18 @@ inline flatbuffers::Offset CreateRegion(flatbuffers::FlatBufferBuilder & + } + + inline TensorDescribeT *TensorDescribe::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TensorDescribeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TensorDescribeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TensorDescribe::UnPackTo(TensorDescribeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = blob(); if (_e) _o->blob = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = index(); _o->index = _e; }; +- { auto _e = name(); if (_e) _o->name = _e->str(); }; +- { auto _e = regions(); if (_e) { _o->regions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->regions[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; ++ { auto _e = blob(); if (_e) _o->blob = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = index(); _o->index = _e; } ++ { auto _e = name(); if (_e) _o->name = _e->str(); } ++ { auto _e = regions(); if (_e) { _o->regions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->regions[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset TensorDescribe::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorDescribeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4666,7 +4659,7 @@ inline flatbuffers::Offset CreateTensorDescribe(flatbuffers::Fla + auto _blob = _o->blob ? CreateBlob(_fbb, _o->blob.get(), _rehasher) : 0; + auto _index = _o->index; + auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); +- auto _regions = _o->regions.size() ? _fbb.CreateVector> (_o->regions.size(), [](size_t i, _VectorArgs *__va) { return CreateRegion(*__va->__fbb, __va->__o->regions[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _regions = _o->regions.size() ? _fbb.CreateVector> (_o->regions.size(), [](size_t i, _VectorArgs *__va) { return CreateRegion(*__va->__fbb, __va->__o->regions[i].get(), __va->__rehasher); }, &_va ) : 0; + return MNN::CreateTensorDescribe( + _fbb, + _blob, +@@ -4676,19 +4669,19 @@ inline flatbuffers::Offset CreateTensorDescribe(flatbuffers::Fla + } + + inline SubGraphProtoT *SubGraphProto::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SubGraphProtoT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SubGraphProtoT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SubGraphProto::UnPackTo(SubGraphProtoT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = name(); if (_e) _o->name = _e->str(); }; +- { 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 = tensors(); if (_e) { _o->tensors.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensors[_i] = _e->Get(_i)->str(); } } }; +- { auto _e = nodes(); if (_e) { _o->nodes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->nodes[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; ++ { auto _e = name(); if (_e) _o->name = _e->str(); } ++ { 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 = tensors(); if (_e) { _o->tensors.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensors[_i] = _e->Get(_i)->str(); } } } ++ { auto _e = nodes(); if (_e) { _o->nodes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->nodes[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset SubGraphProto::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphProtoT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4703,7 +4696,7 @@ inline flatbuffers::Offset CreateSubGraphProto(flatbuffers::FlatB + auto _inputs = _o->inputs.size() ? _fbb.CreateVector(_o->inputs) : 0; + auto _outputs = _o->outputs.size() ? _fbb.CreateVector(_o->outputs) : 0; + auto _tensors = _o->tensors.size() ? _fbb.CreateVectorOfStrings(_o->tensors) : 0; +- auto _nodes = _o->nodes.size() ? _fbb.CreateVector> (_o->nodes.size(), [](size_t i, _VectorArgs *__va) { return CreateOp(*__va->__fbb, __va->__o->nodes[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _nodes = _o->nodes.size() ? _fbb.CreateVector> (_o->nodes.size(), [](size_t i, _VectorArgs *__va) { return CreateOp(*__va->__fbb, __va->__o->nodes[i].get(), __va->__rehasher); }, &_va ) : 0; + return MNN::CreateSubGraphProto( + _fbb, + _name, +@@ -4714,25 +4707,25 @@ inline flatbuffers::Offset CreateSubGraphProto(flatbuffers::FlatB + } + + inline NetT *Net::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new NetT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new NetT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Net::UnPackTo(NetT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = bizCode(); if (_e) _o->bizCode = _e->str(); }; +- { auto _e = extraTensorDescribe(); if (_e) { _o->extraTensorDescribe.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->extraTensorDescribe[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; +- { auto _e = gpulibrary(); if (_e) _o->gpulibrary = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = oplists(); if (_e) { _o->oplists.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->oplists[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; +- { auto _e = outputName(); if (_e) { _o->outputName.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputName[_i] = _e->Get(_i)->str(); } } }; +- { auto _e = preferForwardType(); _o->preferForwardType = _e; }; +- { auto _e = sourceType(); _o->sourceType = _e; }; +- { auto _e = tensorName(); if (_e) { _o->tensorName.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensorName[_i] = _e->Get(_i)->str(); } } }; +- { auto _e = tensorNumber(); _o->tensorNumber = _e; }; +- { auto _e = usage(); _o->usage = _e; }; +- { 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 = bizCode(); if (_e) _o->bizCode = _e->str(); } ++ { auto _e = extraTensorDescribe(); if (_e) { _o->extraTensorDescribe.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->extraTensorDescribe[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = gpulibrary(); if (_e) _o->gpulibrary = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = oplists(); if (_e) { _o->oplists.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->oplists[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = outputName(); if (_e) { _o->outputName.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputName[_i] = _e->Get(_i)->str(); } } } ++ { auto _e = preferForwardType(); _o->preferForwardType = _e; } ++ { auto _e = sourceType(); _o->sourceType = _e; } ++ { auto _e = tensorName(); if (_e) { _o->tensorName.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensorName[_i] = _e->Get(_i)->str(); } } } ++ { auto _e = tensorNumber(); _o->tensorNumber = _e; } ++ { auto _e = usage(); _o->usage = _e; } ++ { 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)); } } } + } + + inline flatbuffers::Offset Net::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NetT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4744,16 +4737,16 @@ inline flatbuffers::Offset CreateNet(flatbuffers::FlatBufferBuilder &_fbb, + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NetT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _bizCode = _o->bizCode.empty() ? 0 : _fbb.CreateString(_o->bizCode); +- auto _extraTensorDescribe = _o->extraTensorDescribe.size() ? _fbb.CreateVector> (_o->extraTensorDescribe.size(), [](size_t i, _VectorArgs *__va) { return CreateTensorDescribe(*__va->__fbb, __va->__o->extraTensorDescribe[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _extraTensorDescribe = _o->extraTensorDescribe.size() ? _fbb.CreateVector> (_o->extraTensorDescribe.size(), [](size_t i, _VectorArgs *__va) { return CreateTensorDescribe(*__va->__fbb, __va->__o->extraTensorDescribe[i].get(), __va->__rehasher); }, &_va ) : 0; + auto _gpulibrary = _o->gpulibrary ? CreateGpuLibrary(_fbb, _o->gpulibrary.get(), _rehasher) : 0; +- auto _oplists = _o->oplists.size() ? _fbb.CreateVector> (_o->oplists.size(), [](size_t i, _VectorArgs *__va) { return CreateOp(*__va->__fbb, __va->__o->oplists[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _oplists = _o->oplists.size() ? _fbb.CreateVector> (_o->oplists.size(), [](size_t i, _VectorArgs *__va) { return CreateOp(*__va->__fbb, __va->__o->oplists[i].get(), __va->__rehasher); }, &_va ) : 0; + auto _outputName = _o->outputName.size() ? _fbb.CreateVectorOfStrings(_o->outputName) : 0; + auto _preferForwardType = _o->preferForwardType; + auto _sourceType = _o->sourceType; + auto _tensorName = _o->tensorName.size() ? _fbb.CreateVectorOfStrings(_o->tensorName) : 0; + auto _tensorNumber = _o->tensorNumber; + auto _usage = _o->usage; +- auto _subgraphs = _o->subgraphs.size() ? _fbb.CreateVector> (_o->subgraphs.size(), [](size_t i, _VectorArgs *__va) { return CreateSubGraphProto(*__va->__fbb, __va->__o->subgraphs[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _subgraphs = _o->subgraphs.size() ? _fbb.CreateVector> (_o->subgraphs.size(), [](size_t i, _VectorArgs *__va) { return CreateSubGraphProto(*__va->__fbb, __va->__o->subgraphs[i].get(), __va->__rehasher); }, &_va ) : 0; + return MNN::CreateNet( + _fbb, + _bizCode, +@@ -4775,358 +4768,358 @@ inline bool VerifyOpParameter(flatbuffers::Verifier &verifier, const void *obj, + return true; + } + case OpParameter_QuantizedAdd: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_ArgMax: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_AsString: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Axis: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_BatchNorm: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_BinaryOp: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Blob: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_CastParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Convolution2D: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Crop: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_CropAndResize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Dequantize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_DetectionOutput: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Eltwise: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_ExpandDims: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Fill: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Flatten: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Gather: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_GatherV2: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_InnerProduct: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Input: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Interp: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_LRN: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_LSTM: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_MatMul: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_NonMaxSuppressionV2: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Normalize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_PackParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Permute: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Plugin: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Pool: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_PRelu: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_PriorBox: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Proposal: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedAvgPool: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedBiasAdd: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedConcat: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedLogistic: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedMatMul: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedMaxPool: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedRelu: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedRelu6: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedReshape: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedSoftmax: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizeMaxMin: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizeV2: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Range: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Rank: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_ReduceJoin: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_ReductionParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Relu: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Relu6: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_RequantizationRange: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Requantize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Reshape: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Resize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_RoiPooling: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Scale: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Selu: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Size: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Slice: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_SliceTf: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_SpaceBatch: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_SqueezeParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_StridedSliceParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_TensorConvertInfo: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_TfQuantizedConv2D: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_TopKV2: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Transpose: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_UnaryOp: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_MomentsParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_RNNParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_BatchMatMulParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_QuantizedFloatParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_DepthSpaceParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_EltwiseInt8: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_ReverseSequenceParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Extra: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Pool3D: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_Convolution3D: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_ELU: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_DetectionPostProcessParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_OneHotParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_PadParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_WhileParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_IfParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_RandomUniform: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case OpParameter_LayerNorm: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } +- default: return false; ++ default: return true; + } + } + +@@ -5145,355 +5138,355 @@ inline bool VerifyOpParameterVector(flatbuffers::Verifier &verifier, const flatb + inline void *OpParameterUnion::UnPack(const void *obj, OpParameter type, const flatbuffers::resolver_function_t *resolver) { + switch (type) { + case OpParameter_QuantizedAdd: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_ArgMax: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_AsString: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Axis: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_BatchNorm: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_BinaryOp: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Blob: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_CastParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Convolution2D: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Crop: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_CropAndResize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Dequantize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_DetectionOutput: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Eltwise: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_ExpandDims: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Fill: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Flatten: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Gather: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_GatherV2: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_InnerProduct: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Input: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Interp: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_LRN: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_LSTM: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_MatMul: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_NonMaxSuppressionV2: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Normalize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_PackParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Permute: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Plugin: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Pool: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_PRelu: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_PriorBox: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Proposal: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedAvgPool: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedBiasAdd: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedConcat: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedLogistic: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedMatMul: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedMaxPool: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedRelu: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedRelu6: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedReshape: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedSoftmax: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizeMaxMin: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizeV2: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Range: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Rank: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_ReduceJoin: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_ReductionParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Relu: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Relu6: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_RequantizationRange: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Requantize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Reshape: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Resize: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_RoiPooling: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Scale: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Selu: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Size: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Slice: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_SliceTf: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_SpaceBatch: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_SqueezeParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_StridedSliceParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_TensorConvertInfo: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_TfQuantizedConv2D: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_TopKV2: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Transpose: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_UnaryOp: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_MomentsParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_RNNParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_BatchMatMulParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_QuantizedFloatParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_DepthSpaceParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_EltwiseInt8: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_ReverseSequenceParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Extra: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Pool3D: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_Convolution3D: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_ELU: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_DetectionPostProcessParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_OneHotParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_PadParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_WhileParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_IfParam: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_RandomUniform: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + case OpParameter_LayerNorm: { +- auto ptr = reinterpret_cast(obj); ++ auto ptr = reinterpret_cast(obj); + return ptr->UnPack(resolver); + } + default: return nullptr; +@@ -5503,713 +5496,713 @@ inline void *OpParameterUnion::UnPack(const void *obj, OpParameter type, const f + inline flatbuffers::Offset OpParameterUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { + switch (type) { + case OpParameter_QuantizedAdd: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedAdd(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_ArgMax: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateArgMax(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_AsString: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateAsString(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Axis: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateAxis(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_BatchNorm: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateBatchNorm(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_BinaryOp: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateBinaryOp(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Blob: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateBlob(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_CastParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateCastParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Convolution2D: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateConvolution2D(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Crop: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateCrop(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_CropAndResize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateCropAndResize(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Dequantize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateDequantize(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_DetectionOutput: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateDetectionOutput(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Eltwise: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateEltwise(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_ExpandDims: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateExpandDims(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Fill: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateFill(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Flatten: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateFlatten(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Gather: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateGather(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_GatherV2: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateGatherV2(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_InnerProduct: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateInnerProduct(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Input: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateInput(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Interp: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateInterp(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_LRN: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateLRN(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_LSTM: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateLSTM(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_MatMul: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateMatMul(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_NonMaxSuppressionV2: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateNonMaxSuppressionV2(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Normalize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateNormalize(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_PackParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreatePackParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Permute: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreatePermute(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Plugin: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreatePlugin(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Pool: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreatePool(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_PRelu: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreatePRelu(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_PriorBox: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreatePriorBox(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Proposal: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateProposal(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedAvgPool: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedAvgPool(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedBiasAdd: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedBiasAdd(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedConcat: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedConcat(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedLogistic: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedLogistic(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedMatMul: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedMatMul(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedMaxPool: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedMaxPool(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedRelu: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedRelu(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedRelu6: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedRelu6(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedReshape: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedReshape(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedSoftmax: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedSoftmax(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizeMaxMin: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizeMaxMin(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizeV2: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizeV2(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Range: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateRange(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Rank: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateRank(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_ReduceJoin: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateReduceJoin(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_ReductionParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateReductionParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Relu: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateRelu(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Relu6: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateRelu6(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_RequantizationRange: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateRequantizationRange(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Requantize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateRequantize(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Reshape: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateReshape(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Resize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateResize(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_RoiPooling: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateRoiPooling(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Scale: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateScale(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Selu: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateSelu(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Size: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateSize(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Slice: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateSlice(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_SliceTf: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateSliceTf(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_SpaceBatch: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateSpaceBatch(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_SqueezeParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateSqueezeParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_StridedSliceParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateStridedSliceParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_TensorConvertInfo: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateTensorConvertInfo(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_TfQuantizedConv2D: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateTfQuantizedConv2D(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_TopKV2: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateTopKV2(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Transpose: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateTranspose(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_UnaryOp: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateUnaryOp(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_MomentsParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateMomentsParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_RNNParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateRNNParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_BatchMatMulParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateBatchMatMulParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_QuantizedFloatParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateQuantizedFloatParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_DepthSpaceParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateDepthSpaceParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_EltwiseInt8: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateEltwiseInt8(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_ReverseSequenceParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateReverseSequenceParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Extra: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateExtra(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Pool3D: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreatePool3D(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_Convolution3D: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateConvolution3D(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_ELU: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateELU(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_DetectionPostProcessParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateDetectionPostProcessParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_OneHotParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateOneHotParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_PadParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreatePadParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_WhileParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateWhileParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_IfParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateIfParam(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_RandomUniform: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateRandomUniform(_fbb, ptr, _rehasher).Union(); + } + case OpParameter_LayerNorm: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + return CreateLayerNorm(_fbb, ptr, _rehasher).Union(); + } + default: return 0; + } + } + +-inline OpParameterUnion::OpParameterUnion(const OpParameterUnion &u) FLATBUFFERS_NOEXCEPT : type(u.type), value(nullptr) { ++inline OpParameterUnion::OpParameterUnion(const OpParameterUnion &u) : type(u.type), value(nullptr) { + switch (type) { + case OpParameter_QuantizedAdd: { +- FLATBUFFERS_ASSERT(false); // QuantizedAddT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::QuantizedAddT not copyable. + break; + } + case OpParameter_ArgMax: { +- value = new ArgMaxT(*reinterpret_cast(u.value)); ++ value = new MNN::ArgMaxT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_AsString: { +- value = new AsStringT(*reinterpret_cast(u.value)); ++ value = new MNN::AsStringT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Axis: { +- value = new AxisT(*reinterpret_cast(u.value)); ++ value = new MNN::AxisT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_BatchNorm: { +- value = new BatchNormT(*reinterpret_cast(u.value)); ++ value = new MNN::BatchNormT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_BinaryOp: { +- value = new BinaryOpT(*reinterpret_cast(u.value)); ++ value = new MNN::BinaryOpT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Blob: { +- value = new BlobT(*reinterpret_cast(u.value)); ++ value = new MNN::BlobT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_CastParam: { +- value = new CastParamT(*reinterpret_cast(u.value)); ++ value = new MNN::CastParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Convolution2D: { +- FLATBUFFERS_ASSERT(false); // Convolution2DT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::Convolution2DT not copyable. + break; + } + case OpParameter_Crop: { +- value = new CropT(*reinterpret_cast(u.value)); ++ value = new MNN::CropT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_CropAndResize: { +- value = new CropAndResizeT(*reinterpret_cast(u.value)); ++ value = new MNN::CropAndResizeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Dequantize: { +- FLATBUFFERS_ASSERT(false); // DequantizeT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::DequantizeT not copyable. + break; + } + case OpParameter_DetectionOutput: { +- value = new DetectionOutputT(*reinterpret_cast(u.value)); ++ value = new MNN::DetectionOutputT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Eltwise: { +- value = new EltwiseT(*reinterpret_cast(u.value)); ++ value = new MNN::EltwiseT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_ExpandDims: { +- value = new ExpandDimsT(*reinterpret_cast(u.value)); ++ value = new MNN::ExpandDimsT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Fill: { +- value = new FillT(*reinterpret_cast(u.value)); ++ value = new MNN::FillT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Flatten: { +- value = new FlattenT(*reinterpret_cast(u.value)); ++ value = new MNN::FlattenT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Gather: { +- value = new GatherT(*reinterpret_cast(u.value)); ++ value = new MNN::GatherT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_GatherV2: { +- value = new GatherV2T(*reinterpret_cast(u.value)); ++ value = new MNN::GatherV2T(*reinterpret_cast(u.value)); + break; + } + case OpParameter_InnerProduct: { +- FLATBUFFERS_ASSERT(false); // InnerProductT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::InnerProductT not copyable. + break; + } + case OpParameter_Input: { +- value = new InputT(*reinterpret_cast(u.value)); ++ value = new MNN::InputT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Interp: { +- value = new InterpT(*reinterpret_cast(u.value)); ++ value = new MNN::InterpT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_LRN: { +- value = new LRNT(*reinterpret_cast(u.value)); ++ value = new MNN::LRNT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_LSTM: { +- FLATBUFFERS_ASSERT(false); // LSTMT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::LSTMT not copyable. + break; + } + case OpParameter_MatMul: { +- value = new MatMulT(*reinterpret_cast(u.value)); ++ value = new MNN::MatMulT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_NonMaxSuppressionV2: { +- value = new NonMaxSuppressionV2T(*reinterpret_cast(u.value)); ++ value = new MNN::NonMaxSuppressionV2T(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Normalize: { +- value = new NormalizeT(*reinterpret_cast(u.value)); ++ value = new MNN::NormalizeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_PackParam: { +- value = new PackParamT(*reinterpret_cast(u.value)); ++ value = new MNN::PackParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Permute: { +- value = new PermuteT(*reinterpret_cast(u.value)); ++ value = new MNN::PermuteT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Plugin: { +- FLATBUFFERS_ASSERT(false); // PluginT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::PluginT not copyable. + break; + } + case OpParameter_Pool: { +- value = new PoolT(*reinterpret_cast(u.value)); ++ value = new MNN::PoolT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_PRelu: { +- value = new PReluT(*reinterpret_cast(u.value)); ++ value = new MNN::PReluT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_PriorBox: { +- value = new PriorBoxT(*reinterpret_cast(u.value)); ++ value = new MNN::PriorBoxT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Proposal: { +- FLATBUFFERS_ASSERT(false); // ProposalT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::ProposalT not copyable. + break; + } + case OpParameter_QuantizedAvgPool: { +- value = new QuantizedAvgPoolT(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizedAvgPoolT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizedBiasAdd: { +- value = new QuantizedBiasAddT(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizedBiasAddT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizedConcat: { +- FLATBUFFERS_ASSERT(false); // QuantizedConcatT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::QuantizedConcatT not copyable. + break; + } + case OpParameter_QuantizedLogistic: { +- FLATBUFFERS_ASSERT(false); // QuantizedLogisticT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::QuantizedLogisticT not copyable. + break; + } + case OpParameter_QuantizedMatMul: { +- value = new QuantizedMatMulT(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizedMatMulT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizedMaxPool: { +- value = new QuantizedMaxPoolT(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizedMaxPoolT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizedRelu: { +- value = new QuantizedReluT(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizedReluT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizedRelu6: { +- value = new QuantizedRelu6T(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizedRelu6T(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizedReshape: { +- value = new QuantizedReshapeT(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizedReshapeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizedSoftmax: { +- value = new QuantizedSoftmaxT(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizedSoftmaxT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizeMaxMin: { +- value = new QuantizeMaxMinT(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizeMaxMinT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizeV2: { +- value = new QuantizeV2T(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizeV2T(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Range: { +- value = new RangeT(*reinterpret_cast(u.value)); ++ value = new MNN::RangeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Rank: { +- value = new RankT(*reinterpret_cast(u.value)); ++ value = new MNN::RankT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_ReduceJoin: { +- value = new ReduceJoinT(*reinterpret_cast(u.value)); ++ value = new MNN::ReduceJoinT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_ReductionParam: { +- value = new ReductionParamT(*reinterpret_cast(u.value)); ++ value = new MNN::ReductionParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Relu: { +- value = new ReluT(*reinterpret_cast(u.value)); ++ value = new MNN::ReluT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Relu6: { +- value = new Relu6T(*reinterpret_cast(u.value)); ++ value = new MNN::Relu6T(*reinterpret_cast(u.value)); + break; + } + case OpParameter_RequantizationRange: { +- value = new RequantizationRangeT(*reinterpret_cast(u.value)); ++ value = new MNN::RequantizationRangeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Requantize: { +- value = new RequantizeT(*reinterpret_cast(u.value)); ++ value = new MNN::RequantizeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Reshape: { +- value = new ReshapeT(*reinterpret_cast(u.value)); ++ value = new MNN::ReshapeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Resize: { +- value = new ResizeT(*reinterpret_cast(u.value)); ++ value = new MNN::ResizeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_RoiPooling: { +- value = new RoiPoolingT(*reinterpret_cast(u.value)); ++ value = new MNN::RoiPoolingT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Scale: { +- value = new ScaleT(*reinterpret_cast(u.value)); ++ value = new MNN::ScaleT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Selu: { +- value = new SeluT(*reinterpret_cast(u.value)); ++ value = new MNN::SeluT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Size: { +- value = new SizeT(*reinterpret_cast(u.value)); ++ value = new MNN::SizeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Slice: { +- value = new SliceT(*reinterpret_cast(u.value)); ++ value = new MNN::SliceT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_SliceTf: { +- value = new SliceTfT(*reinterpret_cast(u.value)); ++ value = new MNN::SliceTfT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_SpaceBatch: { +- FLATBUFFERS_ASSERT(false); // SpaceBatchT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::SpaceBatchT not copyable. + break; + } + case OpParameter_SqueezeParam: { +- value = new SqueezeParamT(*reinterpret_cast(u.value)); ++ value = new MNN::SqueezeParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_StridedSliceParam: { +- value = new StridedSliceParamT(*reinterpret_cast(u.value)); ++ value = new MNN::StridedSliceParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_TensorConvertInfo: { +- value = new TensorConvertInfoT(*reinterpret_cast(u.value)); ++ value = new MNN::TensorConvertInfoT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_TfQuantizedConv2D: { +- FLATBUFFERS_ASSERT(false); // TfQuantizedConv2DT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::TfQuantizedConv2DT not copyable. + break; + } + case OpParameter_TopKV2: { +- value = new TopKV2T(*reinterpret_cast(u.value)); ++ value = new MNN::TopKV2T(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Transpose: { +- value = new TransposeT(*reinterpret_cast(u.value)); ++ value = new MNN::TransposeT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_UnaryOp: { +- value = new UnaryOpT(*reinterpret_cast(u.value)); ++ value = new MNN::UnaryOpT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_MomentsParam: { +- value = new MomentsParamT(*reinterpret_cast(u.value)); ++ value = new MNN::MomentsParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_RNNParam: { +- FLATBUFFERS_ASSERT(false); // RNNParamT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::RNNParamT not copyable. + break; + } + case OpParameter_BatchMatMulParam: { +- value = new BatchMatMulParamT(*reinterpret_cast(u.value)); ++ value = new MNN::BatchMatMulParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_QuantizedFloatParam: { +- value = new QuantizedFloatParamT(*reinterpret_cast(u.value)); ++ value = new MNN::QuantizedFloatParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_DepthSpaceParam: { +- value = new DepthSpaceParamT(*reinterpret_cast(u.value)); ++ value = new MNN::DepthSpaceParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_EltwiseInt8: { +- FLATBUFFERS_ASSERT(false); // EltwiseInt8T not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::EltwiseInt8T not copyable. + break; + } + case OpParameter_ReverseSequenceParam: { +- value = new ReverseSequenceParamT(*reinterpret_cast(u.value)); ++ value = new MNN::ReverseSequenceParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Extra: { +- FLATBUFFERS_ASSERT(false); // ExtraT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::ExtraT not copyable. + break; + } + case OpParameter_Pool3D: { +- value = new Pool3DT(*reinterpret_cast(u.value)); ++ value = new MNN::Pool3DT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_Convolution3D: { +- FLATBUFFERS_ASSERT(false); // Convolution3DT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::Convolution3DT not copyable. + break; + } + case OpParameter_ELU: { +- value = new ELUT(*reinterpret_cast(u.value)); ++ value = new MNN::ELUT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_DetectionPostProcessParam: { +- value = new DetectionPostProcessParamT(*reinterpret_cast(u.value)); ++ value = new MNN::DetectionPostProcessParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_OneHotParam: { +- value = new OneHotParamT(*reinterpret_cast(u.value)); ++ value = new MNN::OneHotParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_PadParam: { +- value = new PadParamT(*reinterpret_cast(u.value)); ++ value = new MNN::PadParamT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_WhileParam: { +- FLATBUFFERS_ASSERT(false); // WhileParamT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::WhileParamT not copyable. + break; + } + case OpParameter_IfParam: { +- FLATBUFFERS_ASSERT(false); // IfParamT not copyable. ++ FLATBUFFERS_ASSERT(false); // MNN::IfParamT not copyable. + break; + } + case OpParameter_RandomUniform: { +- value = new RandomUniformT(*reinterpret_cast(u.value)); ++ value = new MNN::RandomUniformT(*reinterpret_cast(u.value)); + break; + } + case OpParameter_LayerNorm: { +- value = new LayerNormT(*reinterpret_cast(u.value)); ++ value = new MNN::LayerNormT(*reinterpret_cast(u.value)); + break; + } + default: +@@ -6220,442 +6213,442 @@ inline OpParameterUnion::OpParameterUnion(const OpParameterUnion &u) FLATBUFFERS + inline void OpParameterUnion::Reset() { + switch (type) { + case OpParameter_QuantizedAdd: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_ArgMax: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_AsString: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Axis: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_BatchNorm: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_BinaryOp: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Blob: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_CastParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Convolution2D: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Crop: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_CropAndResize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Dequantize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_DetectionOutput: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Eltwise: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_ExpandDims: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Fill: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Flatten: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Gather: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_GatherV2: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_InnerProduct: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Input: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Interp: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_LRN: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_LSTM: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_MatMul: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_NonMaxSuppressionV2: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Normalize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_PackParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Permute: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Plugin: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Pool: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_PRelu: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_PriorBox: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Proposal: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedAvgPool: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedBiasAdd: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedConcat: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedLogistic: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedMatMul: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedMaxPool: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedRelu: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedRelu6: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedReshape: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedSoftmax: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizeMaxMin: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizeV2: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Range: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Rank: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_ReduceJoin: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_ReductionParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Relu: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Relu6: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_RequantizationRange: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Requantize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Reshape: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Resize: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_RoiPooling: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Scale: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Selu: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Size: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Slice: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_SliceTf: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_SpaceBatch: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_SqueezeParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_StridedSliceParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_TensorConvertInfo: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_TfQuantizedConv2D: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_TopKV2: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Transpose: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_UnaryOp: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_MomentsParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_RNNParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_BatchMatMulParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_QuantizedFloatParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_DepthSpaceParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_EltwiseInt8: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_ReverseSequenceParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Extra: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Pool3D: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_Convolution3D: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_ELU: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_DetectionPostProcessParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_OneHotParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_PadParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_WhileParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_IfParam: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_RandomUniform: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } + case OpParameter_LayerNorm: { +- auto ptr = reinterpret_cast(value); ++ auto ptr = reinterpret_cast(value); + delete ptr; + break; + } +@@ -6819,7 +6812,7 @@ inline const flatbuffers::TypeTable *OpTypeTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- OpTypeTypeTable ++ MNN::OpTypeTypeTable + }; + static const int64_t values[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 128, 129, 130, 131, 132, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 512, 513, 514, 515, 516, 517, 518, 600, 601, 603 }; + static const char * const names[] = { +@@ -6975,7 +6968,7 @@ inline const flatbuffers::TypeTable *OpTypeTypeTable() { + "LayerNorm" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 150, type_codes, type_refs, values, names ++ flatbuffers::ST_ENUM, 150, type_codes, type_refs, nullptr, values, names + }; + return &tt; + } +@@ -7073,94 +7066,94 @@ inline const flatbuffers::TypeTable *OpParameterTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 87 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- QuantizedAddTypeTable, +- ArgMaxTypeTable, +- AsStringTypeTable, +- AxisTypeTable, +- BatchNormTypeTable, +- BinaryOpTypeTable, +- BlobTypeTable, +- CastParamTypeTable, +- Convolution2DTypeTable, +- CropTypeTable, +- CropAndResizeTypeTable, +- DequantizeTypeTable, +- DetectionOutputTypeTable, +- EltwiseTypeTable, +- ExpandDimsTypeTable, +- FillTypeTable, +- FlattenTypeTable, +- GatherTypeTable, +- GatherV2TypeTable, +- InnerProductTypeTable, +- InputTypeTable, +- InterpTypeTable, +- LRNTypeTable, +- LSTMTypeTable, +- MatMulTypeTable, +- NonMaxSuppressionV2TypeTable, +- NormalizeTypeTable, +- PackParamTypeTable, +- PermuteTypeTable, +- PluginTypeTable, +- PoolTypeTable, +- PReluTypeTable, +- PriorBoxTypeTable, +- ProposalTypeTable, +- QuantizedAvgPoolTypeTable, +- QuantizedBiasAddTypeTable, +- QuantizedConcatTypeTable, +- QuantizedLogisticTypeTable, +- QuantizedMatMulTypeTable, +- QuantizedMaxPoolTypeTable, +- QuantizedReluTypeTable, +- QuantizedRelu6TypeTable, +- QuantizedReshapeTypeTable, +- QuantizedSoftmaxTypeTable, +- QuantizeMaxMinTypeTable, +- QuantizeV2TypeTable, +- RangeTypeTable, +- RankTypeTable, +- ReduceJoinTypeTable, +- ReductionParamTypeTable, +- ReluTypeTable, +- Relu6TypeTable, +- RequantizationRangeTypeTable, +- RequantizeTypeTable, +- ReshapeTypeTable, +- ResizeTypeTable, +- RoiPoolingTypeTable, +- ScaleTypeTable, +- SeluTypeTable, +- SizeTypeTable, +- SliceTypeTable, +- SliceTfTypeTable, +- SpaceBatchTypeTable, +- SqueezeParamTypeTable, +- StridedSliceParamTypeTable, +- TensorConvertInfoTypeTable, +- TfQuantizedConv2DTypeTable, +- TopKV2TypeTable, +- TransposeTypeTable, +- UnaryOpTypeTable, +- MomentsParamTypeTable, +- RNNParamTypeTable, +- BatchMatMulParamTypeTable, +- QuantizedFloatParamTypeTable, +- DepthSpaceParamTypeTable, +- EltwiseInt8TypeTable, +- ReverseSequenceParamTypeTable, +- ExtraTypeTable, +- Pool3DTypeTable, +- Convolution3DTypeTable, +- ELUTypeTable, +- DetectionPostProcessParamTypeTable, +- OneHotParamTypeTable, +- PadParamTypeTable, +- WhileParamTypeTable, +- IfParamTypeTable, +- RandomUniformTypeTable, +- LayerNormTypeTable ++ MNN::QuantizedAddTypeTable, ++ MNN::ArgMaxTypeTable, ++ MNN::AsStringTypeTable, ++ MNN::AxisTypeTable, ++ MNN::BatchNormTypeTable, ++ MNN::BinaryOpTypeTable, ++ MNN::BlobTypeTable, ++ MNN::CastParamTypeTable, ++ MNN::Convolution2DTypeTable, ++ MNN::CropTypeTable, ++ MNN::CropAndResizeTypeTable, ++ MNN::DequantizeTypeTable, ++ MNN::DetectionOutputTypeTable, ++ MNN::EltwiseTypeTable, ++ MNN::ExpandDimsTypeTable, ++ MNN::FillTypeTable, ++ MNN::FlattenTypeTable, ++ MNN::GatherTypeTable, ++ MNN::GatherV2TypeTable, ++ MNN::InnerProductTypeTable, ++ MNN::InputTypeTable, ++ MNN::InterpTypeTable, ++ MNN::LRNTypeTable, ++ MNN::LSTMTypeTable, ++ MNN::MatMulTypeTable, ++ MNN::NonMaxSuppressionV2TypeTable, ++ MNN::NormalizeTypeTable, ++ MNN::PackParamTypeTable, ++ MNN::PermuteTypeTable, ++ MNN::PluginTypeTable, ++ MNN::PoolTypeTable, ++ MNN::PReluTypeTable, ++ MNN::PriorBoxTypeTable, ++ MNN::ProposalTypeTable, ++ MNN::QuantizedAvgPoolTypeTable, ++ MNN::QuantizedBiasAddTypeTable, ++ MNN::QuantizedConcatTypeTable, ++ MNN::QuantizedLogisticTypeTable, ++ MNN::QuantizedMatMulTypeTable, ++ MNN::QuantizedMaxPoolTypeTable, ++ MNN::QuantizedReluTypeTable, ++ MNN::QuantizedRelu6TypeTable, ++ MNN::QuantizedReshapeTypeTable, ++ MNN::QuantizedSoftmaxTypeTable, ++ MNN::QuantizeMaxMinTypeTable, ++ MNN::QuantizeV2TypeTable, ++ MNN::RangeTypeTable, ++ MNN::RankTypeTable, ++ MNN::ReduceJoinTypeTable, ++ MNN::ReductionParamTypeTable, ++ MNN::ReluTypeTable, ++ MNN::Relu6TypeTable, ++ MNN::RequantizationRangeTypeTable, ++ MNN::RequantizeTypeTable, ++ MNN::ReshapeTypeTable, ++ MNN::ResizeTypeTable, ++ MNN::RoiPoolingTypeTable, ++ MNN::ScaleTypeTable, ++ MNN::SeluTypeTable, ++ MNN::SizeTypeTable, ++ MNN::SliceTypeTable, ++ MNN::SliceTfTypeTable, ++ MNN::SpaceBatchTypeTable, ++ MNN::SqueezeParamTypeTable, ++ MNN::StridedSliceParamTypeTable, ++ MNN::TensorConvertInfoTypeTable, ++ MNN::TfQuantizedConv2DTypeTable, ++ MNN::TopKV2TypeTable, ++ MNN::TransposeTypeTable, ++ MNN::UnaryOpTypeTable, ++ MNN::MomentsParamTypeTable, ++ MNN::RNNParamTypeTable, ++ MNN::BatchMatMulParamTypeTable, ++ MNN::QuantizedFloatParamTypeTable, ++ MNN::DepthSpaceParamTypeTable, ++ MNN::EltwiseInt8TypeTable, ++ MNN::ReverseSequenceParamTypeTable, ++ MNN::ExtraTypeTable, ++ MNN::Pool3DTypeTable, ++ MNN::Convolution3DTypeTable, ++ MNN::ELUTypeTable, ++ MNN::DetectionPostProcessParamTypeTable, ++ MNN::OneHotParamTypeTable, ++ MNN::PadParamTypeTable, ++ MNN::WhileParamTypeTable, ++ MNN::IfParamTypeTable, ++ MNN::RandomUniformTypeTable, ++ MNN::LayerNormTypeTable + }; + static const char * const names[] = { + "NONE", +@@ -7254,7 +7247,7 @@ inline const flatbuffers::TypeTable *OpParameterTypeTable() { + "LayerNorm" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_UNION, 89, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_UNION, 89, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7268,7 +7261,7 @@ inline const flatbuffers::TypeTable *ForwardTypeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ForwardTypeTypeTable ++ MNN::ForwardTypeTypeTable + }; + static const char * const names[] = { + "CPU", +@@ -7278,7 +7271,7 @@ inline const flatbuffers::TypeTable *ForwardTypeTypeTable() { + "VULKAN" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7290,7 +7283,7 @@ inline const flatbuffers::TypeTable *UsageTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- UsageTypeTable ++ MNN::UsageTypeTable + }; + static const char * const names[] = { + "INFERENCE", +@@ -7298,7 +7291,7 @@ inline const flatbuffers::TypeTable *UsageTypeTable() { + "INFERENCE_STATIC" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7309,14 +7302,14 @@ inline const flatbuffers::TypeTable *PluginTypeTable() { + { flatbuffers::ET_SEQUENCE, 1, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- AttributeTypeTable ++ MNN::AttributeTypeTable + }; + static const char * const names[] = { + "type", + "attr" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7329,7 +7322,7 @@ inline const flatbuffers::TypeTable *ExtraTypeTable() { + { flatbuffers::ET_SEQUENCE, 1, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- AttributeTypeTable ++ MNN::AttributeTypeTable + }; + static const char * const names[] = { + "type", +@@ -7338,7 +7331,7 @@ inline const flatbuffers::TypeTable *ExtraTypeTable() { + "attr" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7351,7 +7344,7 @@ inline const flatbuffers::TypeTable *StringVecTypeTable() { + "data" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -7365,7 +7358,7 @@ inline const flatbuffers::TypeTable *WhileParamTypeTable() { + { flatbuffers::ET_SEQUENCE, 1, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- StringVecTypeTable ++ MNN::StringVecTypeTable + }; + static const char * const names[] = { + "cond_graph", +@@ -7375,7 +7368,7 @@ inline const flatbuffers::TypeTable *WhileParamTypeTable() { + "aliases_updates" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7388,7 +7381,7 @@ inline const flatbuffers::TypeTable *IfParamTypeTable() { + { flatbuffers::ET_SEQUENCE, 1, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- StringVecTypeTable ++ MNN::StringVecTypeTable + }; + static const char * const names[] = { + "then_graph", +@@ -7397,7 +7390,7 @@ inline const flatbuffers::TypeTable *IfParamTypeTable() { + "aliases_outputs" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7413,9 +7406,9 @@ inline const flatbuffers::TypeTable *OpTypeTable() { + { flatbuffers::ET_CHAR, 0, 2 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- OpParameterTypeTable, +- OpTypeTypeTable, +- MNN_DATA_FORMATTypeTable ++ MNN::OpParameterTypeTable, ++ MNN::OpTypeTypeTable, ++ MNN::MNN_DATA_FORMATTypeTable + }; + static const char * const names[] = { + "inputIndexes", +@@ -7427,7 +7420,7 @@ inline const flatbuffers::TypeTable *OpTypeTable() { + "defaultDimentionFormat" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7442,7 +7435,7 @@ inline const flatbuffers::TypeTable *ViewTypeTable() { + "stride" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -7455,7 +7448,7 @@ inline const flatbuffers::TypeTable *RegionTypeTable() { + { flatbuffers::ET_INT, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ViewTypeTable ++ MNN::ViewTypeTable + }; + static const char * const names[] = { + "src", +@@ -7464,7 +7457,7 @@ inline const flatbuffers::TypeTable *RegionTypeTable() { + "origin" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7477,8 +7470,8 @@ inline const flatbuffers::TypeTable *TensorDescribeTypeTable() { + { flatbuffers::ET_SEQUENCE, 1, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- BlobTypeTable, +- RegionTypeTable ++ MNN::BlobTypeTable, ++ MNN::RegionTypeTable + }; + static const char * const names[] = { + "blob", +@@ -7487,7 +7480,7 @@ inline const flatbuffers::TypeTable *TensorDescribeTypeTable() { + "regions" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7501,7 +7494,7 @@ inline const flatbuffers::TypeTable *SubGraphProtoTypeTable() { + { flatbuffers::ET_SEQUENCE, 1, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- OpTypeTable ++ MNN::OpTypeTable + }; + static const char * const names[] = { + "name", +@@ -7511,7 +7504,7 @@ inline const flatbuffers::TypeTable *SubGraphProtoTypeTable() { + "nodes" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7531,13 +7524,13 @@ inline const flatbuffers::TypeTable *NetTypeTable() { + { flatbuffers::ET_SEQUENCE, 1, 6 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- TensorDescribeTypeTable, +- GpuLibraryTypeTable, +- OpTypeTable, +- ForwardTypeTypeTable, +- NetSourceTypeTable, +- UsageTypeTable, +- SubGraphProtoTypeTable ++ MNN::TensorDescribeTypeTable, ++ MNN::GpuLibraryTypeTable, ++ MNN::OpTypeTable, ++ MNN::ForwardTypeTypeTable, ++ MNN::NetSourceTypeTable, ++ MNN::UsageTypeTable, ++ MNN::SubGraphProtoTypeTable + }; + static const char * const names[] = { + "bizCode", +@@ -7553,7 +7546,7 @@ inline const flatbuffers::TypeTable *NetTypeTable() { + "subgraphs" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -7588,10 +7581,16 @@ inline void FinishSizePrefixedNetBuffer( + fbb.FinishSizePrefixed(root); + } + +-inline std::unique_ptr UnPackNet( ++inline std::unique_ptr UnPackNet( ++ const void *buf, ++ const flatbuffers::resolver_function_t *res = nullptr) { ++ return std::unique_ptr(GetNet(buf)->UnPack(res)); ++} ++ ++inline std::unique_ptr UnPackSizePrefixedNet( + const void *buf, + const flatbuffers::resolver_function_t *res = nullptr) { +- return std::unique_ptr(GetNet(buf)->UnPack(res)); ++ return std::unique_ptr(GetSizePrefixedNet(buf)->UnPack(res)); + } + + } // namespace MNN +diff --git a/schema/current/TFQuantizeOp_generated.h b/schema/current/TFQuantizeOp_generated.h +index 18360b9c..34520b67 100644 +--- a/schema/current/TFQuantizeOp_generated.h ++++ b/schema/current/TFQuantizeOp_generated.h +@@ -4,62 +4,80 @@ + #ifndef FLATBUFFERS_GENERATED_TFQUANTIZEOP_MNN_H_ + #define FLATBUFFERS_GENERATED_TFQUANTIZEOP_MNN_H_ + ++#include "flatbuffers/flatbuffers.h" + ++#include "Type_generated.h" + #include "CaffeOp_generated.h" + #include "Tensor_generated.h" +-#include "Type_generated.h" + + namespace MNN { + + struct QuantizedParam; ++struct QuantizedParamBuilder; + struct QuantizedParamT; + + struct QuantizedAdd; ++struct QuantizedAddBuilder; + struct QuantizedAddT; + + struct Dequantize; ++struct DequantizeBuilder; + struct DequantizeT; + + struct QuantizedAvgPool; ++struct QuantizedAvgPoolBuilder; + struct QuantizedAvgPoolT; + + struct QuantizedBiasAdd; ++struct QuantizedBiasAddBuilder; + struct QuantizedBiasAddT; + + struct QuantizedConcat; ++struct QuantizedConcatBuilder; + struct QuantizedConcatT; + + struct QuantizedLogistic; ++struct QuantizedLogisticBuilder; + struct QuantizedLogisticT; + + struct QuantizedMatMul; ++struct QuantizedMatMulBuilder; + struct QuantizedMatMulT; + + struct QuantizedMaxPool; ++struct QuantizedMaxPoolBuilder; + struct QuantizedMaxPoolT; + + struct QuantizedRelu; ++struct QuantizedReluBuilder; + struct QuantizedReluT; + + struct QuantizedRelu6; ++struct QuantizedRelu6Builder; + struct QuantizedRelu6T; + + struct QuantizedReshape; ++struct QuantizedReshapeBuilder; + struct QuantizedReshapeT; + + struct QuantizedSoftmax; ++struct QuantizedSoftmaxBuilder; + struct QuantizedSoftmaxT; + + struct QuantizeV2; ++struct QuantizeV2Builder; + struct QuantizeV2T; + + struct RequantizationRange; ++struct RequantizationRangeBuilder; + struct RequantizationRangeT; + + struct Requantize; ++struct RequantizeBuilder; + struct RequantizeT; + + struct TfQuantizedConv2D; ++struct TfQuantizedConv2DBuilder; + struct TfQuantizedConv2DT; + + inline const flatbuffers::TypeTable *QuantizedParamTypeTable(); +@@ -96,7 +114,7 @@ inline const flatbuffers::TypeTable *RequantizeTypeTable(); + + inline const flatbuffers::TypeTable *TfQuantizedConv2DTypeTable(); + +-enum FusedActivation { ++enum FusedActivation : int8_t { + FusedActivation_kTfLiteActNone = 0, + FusedActivation_kTfLiteActRelu = 1, + FusedActivation_kTfLiteActRelu1 = 2, +@@ -122,7 +140,7 @@ inline const FusedActivation (&EnumValuesFusedActivation())[7] { + } + + inline const char * const *EnumNamesFusedActivation() { +- static const char * const names[] = { ++ static const char * const names[8] = { + "kTfLiteActNone", + "kTfLiteActRelu", + "kTfLiteActRelu1", +@@ -136,12 +154,12 @@ inline const char * const *EnumNamesFusedActivation() { + } + + inline const char *EnumNameFusedActivation(FusedActivation e) { +- if (e < FusedActivation_kTfLiteActNone || e > FusedActivation_kTfLiteActSigmoid) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, FusedActivation_kTfLiteActNone, FusedActivation_kTfLiteActSigmoid)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesFusedActivation()[index]; + } + +-enum ModeFormat { ++enum ModeFormat : int8_t { + ModeFormat_TENSORFLOW = 0, + ModeFormat_TFLITE = 1, + ModeFormat_MIN = ModeFormat_TENSORFLOW, +@@ -157,7 +175,7 @@ inline const ModeFormat (&EnumValuesModeFormat())[2] { + } + + inline const char * const *EnumNamesModeFormat() { +- static const char * const names[] = { ++ static const char * const names[3] = { + "TENSORFLOW", + "TFLITE", + nullptr +@@ -166,12 +184,12 @@ inline const char * const *EnumNamesModeFormat() { + } + + inline const char *EnumNameModeFormat(ModeFormat e) { +- if (e < ModeFormat_TENSORFLOW || e > ModeFormat_TFLITE) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, ModeFormat_TENSORFLOW, ModeFormat_TFLITE)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesModeFormat()[index]; + } + +-enum QuantizeMode { ++enum QuantizeMode : int8_t { + QuantizeMode_MIN_COMBINED = 0, + QuantizeMode_MIN_FIRST = 1, + QuantizeMode_SCALED = 2, +@@ -189,7 +207,7 @@ inline const QuantizeMode (&EnumValuesQuantizeMode())[3] { + } + + inline const char * const *EnumNamesQuantizeMode() { +- static const char * const names[] = { ++ static const char * const names[4] = { + "MIN_COMBINED", + "MIN_FIRST", + "SCALED", +@@ -199,12 +217,12 @@ inline const char * const *EnumNamesQuantizeMode() { + } + + inline const char *EnumNameQuantizeMode(QuantizeMode e) { +- if (e < QuantizeMode_MIN_COMBINED || e > QuantizeMode_SCALED) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, QuantizeMode_MIN_COMBINED, QuantizeMode_SCALED)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesQuantizeMode()[index]; + } + +-enum QuantizeRoundMode { ++enum QuantizeRoundMode : int8_t { + QuantizeRoundMode_HALF_AWAY_FROM_ZERO = 0, + QuantizeRoundMode_HALF_TO_EVEN = 1, + QuantizeRoundMode_MIN = QuantizeRoundMode_HALF_AWAY_FROM_ZERO, +@@ -220,7 +238,7 @@ inline const QuantizeRoundMode (&EnumValuesQuantizeRoundMode())[2] { + } + + inline const char * const *EnumNamesQuantizeRoundMode() { +- static const char * const names[] = { ++ static const char * const names[3] = { + "HALF_AWAY_FROM_ZERO", + "HALF_TO_EVEN", + nullptr +@@ -229,23 +247,20 @@ inline const char * const *EnumNamesQuantizeRoundMode() { + } + + inline const char *EnumNameQuantizeRoundMode(QuantizeRoundMode e) { +- if (e < QuantizeRoundMode_HALF_AWAY_FROM_ZERO || e > QuantizeRoundMode_HALF_TO_EVEN) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, QuantizeRoundMode_HALF_AWAY_FROM_ZERO, QuantizeRoundMode_HALF_TO_EVEN)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesQuantizeRoundMode()[index]; + } + + struct QuantizedParamT : public flatbuffers::NativeTable { + typedef QuantizedParam TableType; +- int32_t zeroPoint; +- float scale; +- QuantizedParamT() +- : zeroPoint(0), +- scale(0.0f) { +- } ++ int32_t zeroPoint = 0; ++ float scale = 0.0f; + }; + + struct QuantizedParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedParamT NativeTableType; ++ typedef QuantizedParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedParamTypeTable(); + } +@@ -271,6 +286,7 @@ struct QuantizedParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedParamBuilder { ++ typedef QuantizedParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_zeroPoint(int32_t zeroPoint) { +@@ -283,7 +299,6 @@ struct QuantizedParamBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedParamBuilder &operator=(const QuantizedParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -305,17 +320,15 @@ flatbuffers::Offset CreateQuantizedParam(flatbuffers::FlatBuffer + + struct QuantizedAddT : public flatbuffers::NativeTable { + typedef QuantizedAdd TableType; +- FusedActivation activationType; +- std::unique_ptr input1QuantizedParam; +- std::unique_ptr input2QuantizedParam; +- std::unique_ptr outputQuantizedParam; +- QuantizedAddT() +- : activationType(FusedActivation_kTfLiteActNone) { +- } ++ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone; ++ std::unique_ptr input1QuantizedParam{}; ++ std::unique_ptr input2QuantizedParam{}; ++ std::unique_ptr outputQuantizedParam{}; + }; + + struct QuantizedAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedAddT NativeTableType; ++ typedef QuantizedAddBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedAddTypeTable(); + } +@@ -325,17 +338,17 @@ struct QuantizedAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_INPUT2QUANTIZEDPARAM = 8, + VT_OUTPUTQUANTIZEDPARAM = 10 + }; +- FusedActivation activationType() const { +- return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); ++ MNN::FusedActivation activationType() const { ++ return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); + } +- const QuantizedParam *input1QuantizedParam() const { +- return GetPointer(VT_INPUT1QUANTIZEDPARAM); ++ const MNN::QuantizedParam *input1QuantizedParam() const { ++ return GetPointer(VT_INPUT1QUANTIZEDPARAM); + } +- const QuantizedParam *input2QuantizedParam() const { +- return GetPointer(VT_INPUT2QUANTIZEDPARAM); ++ const MNN::QuantizedParam *input2QuantizedParam() const { ++ return GetPointer(VT_INPUT2QUANTIZEDPARAM); + } +- const QuantizedParam *outputQuantizedParam() const { +- return GetPointer(VT_OUTPUTQUANTIZEDPARAM); ++ const MNN::QuantizedParam *outputQuantizedParam() const { ++ return GetPointer(VT_OUTPUTQUANTIZEDPARAM); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -354,25 +367,25 @@ struct QuantizedAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedAddBuilder { ++ typedef QuantizedAdd Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_activationType(FusedActivation activationType) { ++ void add_activationType(MNN::FusedActivation activationType) { + fbb_.AddElement(QuantizedAdd::VT_ACTIVATIONTYPE, static_cast(activationType), 0); + } +- void add_input1QuantizedParam(flatbuffers::Offset input1QuantizedParam) { ++ void add_input1QuantizedParam(flatbuffers::Offset input1QuantizedParam) { + fbb_.AddOffset(QuantizedAdd::VT_INPUT1QUANTIZEDPARAM, input1QuantizedParam); + } +- void add_input2QuantizedParam(flatbuffers::Offset input2QuantizedParam) { ++ void add_input2QuantizedParam(flatbuffers::Offset input2QuantizedParam) { + fbb_.AddOffset(QuantizedAdd::VT_INPUT2QUANTIZEDPARAM, input2QuantizedParam); + } +- void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { ++ void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { + fbb_.AddOffset(QuantizedAdd::VT_OUTPUTQUANTIZEDPARAM, outputQuantizedParam); + } + explicit QuantizedAddBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedAddBuilder &operator=(const QuantizedAddBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -382,10 +395,10 @@ struct QuantizedAddBuilder { + + inline flatbuffers::Offset CreateQuantizedAdd( + flatbuffers::FlatBufferBuilder &_fbb, +- FusedActivation activationType = FusedActivation_kTfLiteActNone, +- flatbuffers::Offset input1QuantizedParam = 0, +- flatbuffers::Offset input2QuantizedParam = 0, +- flatbuffers::Offset outputQuantizedParam = 0) { ++ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, ++ flatbuffers::Offset input1QuantizedParam = 0, ++ flatbuffers::Offset input2QuantizedParam = 0, ++ flatbuffers::Offset outputQuantizedParam = 0) { + QuantizedAddBuilder builder_(_fbb); + builder_.add_outputQuantizedParam(outputQuantizedParam); + builder_.add_input2QuantizedParam(input2QuantizedParam); +@@ -398,19 +411,15 @@ flatbuffers::Offset CreateQuantizedAdd(flatbuffers::FlatBufferBuil + + struct DequantizeT : public flatbuffers::NativeTable { + typedef Dequantize TableType; +- std::unique_ptr inputQuantizedParam; +- QuantizeMode mode; +- ModeFormat modelFormat; +- DataType type; +- DequantizeT() +- : mode(QuantizeMode_MIN_COMBINED), +- modelFormat(ModeFormat_TENSORFLOW), +- type(DataType_DT_INVALID) { +- } ++ std::unique_ptr inputQuantizedParam{}; ++ MNN::QuantizeMode mode = MNN::QuantizeMode_MIN_COMBINED; ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; ++ MNN::DataType type = MNN::DataType_DT_INVALID; + }; + + struct Dequantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DequantizeT NativeTableType; ++ typedef DequantizeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return DequantizeTypeTable(); + } +@@ -420,17 +429,17 @@ struct Dequantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_MODELFORMAT = 8, + VT_TYPE = 10 + }; +- const QuantizedParam *inputQuantizedParam() const { +- return GetPointer(VT_INPUTQUANTIZEDPARAM); ++ const MNN::QuantizedParam *inputQuantizedParam() const { ++ return GetPointer(VT_INPUTQUANTIZEDPARAM); + } +- QuantizeMode mode() const { +- return static_cast(GetField(VT_MODE, 0)); ++ MNN::QuantizeMode mode() const { ++ return static_cast(GetField(VT_MODE, 0)); + } +- ModeFormat modelFormat() const { +- return static_cast(GetField(VT_MODELFORMAT, 0)); ++ MNN::ModeFormat modelFormat() const { ++ return static_cast(GetField(VT_MODELFORMAT, 0)); + } +- DataType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::DataType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -447,25 +456,25 @@ struct Dequantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct DequantizeBuilder { ++ typedef Dequantize Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { ++ void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { + fbb_.AddOffset(Dequantize::VT_INPUTQUANTIZEDPARAM, inputQuantizedParam); + } +- void add_mode(QuantizeMode mode) { ++ void add_mode(MNN::QuantizeMode mode) { + fbb_.AddElement(Dequantize::VT_MODE, static_cast(mode), 0); + } +- void add_modelFormat(ModeFormat modelFormat) { ++ void add_modelFormat(MNN::ModeFormat modelFormat) { + fbb_.AddElement(Dequantize::VT_MODELFORMAT, static_cast(modelFormat), 0); + } +- void add_type(DataType type) { ++ void add_type(MNN::DataType type) { + fbb_.AddElement(Dequantize::VT_TYPE, static_cast(type), 0); + } + explicit DequantizeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DequantizeBuilder &operator=(const DequantizeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -475,10 +484,10 @@ struct DequantizeBuilder { + + inline flatbuffers::Offset CreateDequantize( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset inputQuantizedParam = 0, +- QuantizeMode mode = QuantizeMode_MIN_COMBINED, +- ModeFormat modelFormat = ModeFormat_TENSORFLOW, +- DataType type = DataType_DT_INVALID) { ++ flatbuffers::Offset inputQuantizedParam = 0, ++ MNN::QuantizeMode mode = MNN::QuantizeMode_MIN_COMBINED, ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, ++ MNN::DataType type = MNN::DataType_DT_INVALID) { + DequantizeBuilder builder_(_fbb); + builder_.add_type(type); + builder_.add_inputQuantizedParam(inputQuantizedParam); +@@ -491,34 +500,22 @@ flatbuffers::Offset CreateDequantize(flatbuffers::FlatBufferBuilder + + struct QuantizedAvgPoolT : public flatbuffers::NativeTable { + typedef QuantizedAvgPool TableType; +- int32_t kernelX; +- int32_t kernelY; +- ModeFormat modelFormat; +- int32_t outputActivationMax; +- int32_t outputActivationMin; +- PoolPadType padType; +- int32_t padX; +- int32_t padY; +- int32_t strideX; +- int32_t strideY; +- DataType type; +- QuantizedAvgPoolT() +- : kernelX(0), +- kernelY(0), +- modelFormat(ModeFormat_TENSORFLOW), +- outputActivationMax(0), +- outputActivationMin(0), +- padType(PoolPadType_CAFFE), +- padX(0), +- padY(0), +- strideX(0), +- strideY(0), +- type(DataType_DT_INVALID) { +- } ++ int32_t kernelX = 0; ++ int32_t kernelY = 0; ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; ++ int32_t outputActivationMax = 0; ++ int32_t outputActivationMin = 0; ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE; ++ int32_t padX = 0; ++ int32_t padY = 0; ++ int32_t strideX = 0; ++ int32_t strideY = 0; ++ MNN::DataType type = MNN::DataType_DT_INVALID; + }; + + struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedAvgPoolT NativeTableType; ++ typedef QuantizedAvgPoolBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedAvgPoolTypeTable(); + } +@@ -541,8 +538,8 @@ struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t kernelY() const { + return GetField(VT_KERNELY, 0); + } +- ModeFormat modelFormat() const { +- return static_cast(GetField(VT_MODELFORMAT, 0)); ++ MNN::ModeFormat modelFormat() const { ++ return static_cast(GetField(VT_MODELFORMAT, 0)); + } + int32_t outputActivationMax() const { + return GetField(VT_OUTPUTACTIVATIONMAX, 0); +@@ -550,8 +547,8 @@ struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t outputActivationMin() const { + return GetField(VT_OUTPUTACTIVATIONMIN, 0); + } +- PoolPadType padType() const { +- return static_cast(GetField(VT_PADTYPE, 0)); ++ MNN::PoolPadType padType() const { ++ return static_cast(GetField(VT_PADTYPE, 0)); + } + int32_t padX() const { + return GetField(VT_PADX, 0); +@@ -565,8 +562,8 @@ struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t strideY() const { + return GetField(VT_STRIDEY, 0); + } +- DataType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::DataType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -589,6 +586,7 @@ struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedAvgPoolBuilder { ++ typedef QuantizedAvgPool Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_kernelX(int32_t kernelX) { +@@ -597,7 +595,7 @@ struct QuantizedAvgPoolBuilder { + void add_kernelY(int32_t kernelY) { + fbb_.AddElement(QuantizedAvgPool::VT_KERNELY, kernelY, 0); + } +- void add_modelFormat(ModeFormat modelFormat) { ++ void add_modelFormat(MNN::ModeFormat modelFormat) { + fbb_.AddElement(QuantizedAvgPool::VT_MODELFORMAT, static_cast(modelFormat), 0); + } + void add_outputActivationMax(int32_t outputActivationMax) { +@@ -606,7 +604,7 @@ struct QuantizedAvgPoolBuilder { + void add_outputActivationMin(int32_t outputActivationMin) { + fbb_.AddElement(QuantizedAvgPool::VT_OUTPUTACTIVATIONMIN, outputActivationMin, 0); + } +- void add_padType(PoolPadType padType) { ++ void add_padType(MNN::PoolPadType padType) { + fbb_.AddElement(QuantizedAvgPool::VT_PADTYPE, static_cast(padType), 0); + } + void add_padX(int32_t padX) { +@@ -621,14 +619,13 @@ struct QuantizedAvgPoolBuilder { + void add_strideY(int32_t strideY) { + fbb_.AddElement(QuantizedAvgPool::VT_STRIDEY, strideY, 0); + } +- void add_type(DataType type) { ++ void add_type(MNN::DataType type) { + fbb_.AddElement(QuantizedAvgPool::VT_TYPE, static_cast(type), 0); + } + explicit QuantizedAvgPoolBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedAvgPoolBuilder &operator=(const QuantizedAvgPoolBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -640,15 +637,15 @@ inline flatbuffers::Offset CreateQuantizedAvgPool( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t kernelX = 0, + int32_t kernelY = 0, +- ModeFormat modelFormat = ModeFormat_TENSORFLOW, ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, + int32_t outputActivationMax = 0, + int32_t outputActivationMin = 0, +- PoolPadType padType = PoolPadType_CAFFE, ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE, + int32_t padX = 0, + int32_t padY = 0, + int32_t strideX = 0, + int32_t strideY = 0, +- DataType type = DataType_DT_INVALID) { ++ MNN::DataType type = MNN::DataType_DT_INVALID) { + QuantizedAvgPoolBuilder builder_(_fbb); + builder_.add_type(type); + builder_.add_strideY(strideY); +@@ -668,21 +665,16 @@ flatbuffers::Offset CreateQuantizedAvgPool(flatbuffers::FlatBu + + struct QuantizedBiasAddT : public flatbuffers::NativeTable { + typedef QuantizedBiasAdd TableType; +- std::vector bias; +- DataType inputType; +- int32_t max; +- int32_t min; +- DataType outputType; +- QuantizedBiasAddT() +- : inputType(DataType_DT_INVALID), +- max(0), +- min(0), +- outputType(DataType_DT_INVALID) { +- } ++ std::vector bias{}; ++ MNN::DataType inputType = MNN::DataType_DT_INVALID; ++ int32_t max = 0; ++ int32_t min = 0; ++ MNN::DataType outputType = MNN::DataType_DT_INVALID; + }; + + struct QuantizedBiasAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedBiasAddT NativeTableType; ++ typedef QuantizedBiasAddBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedBiasAddTypeTable(); + } +@@ -696,8 +688,8 @@ struct QuantizedBiasAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *bias() const { + return GetPointer *>(VT_BIAS); + } +- DataType inputType() const { +- return static_cast(GetField(VT_INPUTTYPE, 0)); ++ MNN::DataType inputType() const { ++ return static_cast(GetField(VT_INPUTTYPE, 0)); + } + int32_t max() const { + return GetField(VT_MAX, 0); +@@ -705,8 +697,8 @@ struct QuantizedBiasAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t min() const { + return GetField(VT_MIN, 0); + } +- DataType outputType() const { +- return static_cast(GetField(VT_OUTPUTTYPE, 0)); ++ MNN::DataType outputType() const { ++ return static_cast(GetField(VT_OUTPUTTYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -724,12 +716,13 @@ struct QuantizedBiasAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedBiasAddBuilder { ++ typedef QuantizedBiasAdd Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_bias(flatbuffers::Offset> bias) { + fbb_.AddOffset(QuantizedBiasAdd::VT_BIAS, bias); + } +- void add_inputType(DataType inputType) { ++ void add_inputType(MNN::DataType inputType) { + fbb_.AddElement(QuantizedBiasAdd::VT_INPUTTYPE, static_cast(inputType), 0); + } + void add_max(int32_t max) { +@@ -738,14 +731,13 @@ struct QuantizedBiasAddBuilder { + void add_min(int32_t min) { + fbb_.AddElement(QuantizedBiasAdd::VT_MIN, min, 0); + } +- void add_outputType(DataType outputType) { ++ void add_outputType(MNN::DataType outputType) { + fbb_.AddElement(QuantizedBiasAdd::VT_OUTPUTTYPE, static_cast(outputType), 0); + } + explicit QuantizedBiasAddBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedBiasAddBuilder &operator=(const QuantizedBiasAddBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -756,10 +748,10 @@ struct QuantizedBiasAddBuilder { + inline flatbuffers::Offset CreateQuantizedBiasAdd( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> bias = 0, +- DataType inputType = DataType_DT_INVALID, ++ MNN::DataType inputType = MNN::DataType_DT_INVALID, + int32_t max = 0, + int32_t min = 0, +- DataType outputType = DataType_DT_INVALID) { ++ MNN::DataType outputType = MNN::DataType_DT_INVALID) { + QuantizedBiasAddBuilder builder_(_fbb); + builder_.add_outputType(outputType); + builder_.add_min(min); +@@ -772,10 +764,10 @@ inline flatbuffers::Offset CreateQuantizedBiasAdd( + inline flatbuffers::Offset CreateQuantizedBiasAddDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *bias = nullptr, +- DataType inputType = DataType_DT_INVALID, ++ MNN::DataType inputType = MNN::DataType_DT_INVALID, + int32_t max = 0, + int32_t min = 0, +- DataType outputType = DataType_DT_INVALID) { ++ MNN::DataType outputType = MNN::DataType_DT_INVALID) { + auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; + return MNN::CreateQuantizedBiasAdd( + _fbb, +@@ -790,19 +782,16 @@ flatbuffers::Offset CreateQuantizedBiasAdd(flatbuffers::FlatBu + + struct QuantizedConcatT : public flatbuffers::NativeTable { + typedef QuantizedConcat TableType; +- FusedActivation activationType; +- int32_t axis; +- std::vector inputScale; +- std::vector inputZeroPoint; +- std::unique_ptr outputQuantizedParam; +- QuantizedConcatT() +- : activationType(FusedActivation_kTfLiteActNone), +- axis(0) { +- } ++ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone; ++ int32_t axis = 0; ++ std::vector inputScale{}; ++ std::vector inputZeroPoint{}; ++ std::unique_ptr outputQuantizedParam{}; + }; + + struct QuantizedConcat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedConcatT NativeTableType; ++ typedef QuantizedConcatBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedConcatTypeTable(); + } +@@ -813,8 +802,8 @@ struct QuantizedConcat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_INPUTZEROPOINT = 10, + VT_OUTPUTQUANTIZEDPARAM = 12 + }; +- FusedActivation activationType() const { +- return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); ++ MNN::FusedActivation activationType() const { ++ return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); + } + int32_t axis() const { + return GetField(VT_AXIS, 0); +@@ -825,8 +814,8 @@ struct QuantizedConcat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *inputZeroPoint() const { + return GetPointer *>(VT_INPUTZEROPOINT); + } +- const QuantizedParam *outputQuantizedParam() const { +- return GetPointer(VT_OUTPUTQUANTIZEDPARAM); ++ const MNN::QuantizedParam *outputQuantizedParam() const { ++ return GetPointer(VT_OUTPUTQUANTIZEDPARAM); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -846,9 +835,10 @@ struct QuantizedConcat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedConcatBuilder { ++ typedef QuantizedConcat Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_activationType(FusedActivation activationType) { ++ void add_activationType(MNN::FusedActivation activationType) { + fbb_.AddElement(QuantizedConcat::VT_ACTIVATIONTYPE, static_cast(activationType), 0); + } + void add_axis(int32_t axis) { +@@ -860,14 +850,13 @@ struct QuantizedConcatBuilder { + void add_inputZeroPoint(flatbuffers::Offset> inputZeroPoint) { + fbb_.AddOffset(QuantizedConcat::VT_INPUTZEROPOINT, inputZeroPoint); + } +- void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { ++ void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { + fbb_.AddOffset(QuantizedConcat::VT_OUTPUTQUANTIZEDPARAM, outputQuantizedParam); + } + explicit QuantizedConcatBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedConcatBuilder &operator=(const QuantizedConcatBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -877,11 +866,11 @@ struct QuantizedConcatBuilder { + + inline flatbuffers::Offset CreateQuantizedConcat( + flatbuffers::FlatBufferBuilder &_fbb, +- FusedActivation activationType = FusedActivation_kTfLiteActNone, ++ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, + int32_t axis = 0, + flatbuffers::Offset> inputScale = 0, + flatbuffers::Offset> inputZeroPoint = 0, +- flatbuffers::Offset outputQuantizedParam = 0) { ++ flatbuffers::Offset outputQuantizedParam = 0) { + QuantizedConcatBuilder builder_(_fbb); + builder_.add_outputQuantizedParam(outputQuantizedParam); + builder_.add_inputZeroPoint(inputZeroPoint); +@@ -893,11 +882,11 @@ inline flatbuffers::Offset CreateQuantizedConcat( + + inline flatbuffers::Offset CreateQuantizedConcatDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- FusedActivation activationType = FusedActivation_kTfLiteActNone, ++ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, + int32_t axis = 0, + const std::vector *inputScale = nullptr, + const std::vector *inputZeroPoint = nullptr, +- flatbuffers::Offset outputQuantizedParam = 0) { ++ flatbuffers::Offset outputQuantizedParam = 0) { + auto inputScale__ = inputScale ? _fbb.CreateVector(*inputScale) : 0; + auto inputZeroPoint__ = inputZeroPoint ? _fbb.CreateVector(*inputZeroPoint) : 0; + return MNN::CreateQuantizedConcat( +@@ -913,14 +902,13 @@ flatbuffers::Offset CreateQuantizedConcat(flatbuffers::FlatBuff + + struct QuantizedLogisticT : public flatbuffers::NativeTable { + typedef QuantizedLogistic TableType; +- std::unique_ptr inputQuantizedParam; +- std::unique_ptr outputQuantizedParam; +- QuantizedLogisticT() { +- } ++ std::unique_ptr inputQuantizedParam{}; ++ std::unique_ptr outputQuantizedParam{}; + }; + + struct QuantizedLogistic FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedLogisticT NativeTableType; ++ typedef QuantizedLogisticBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedLogisticTypeTable(); + } +@@ -928,11 +916,11 @@ struct QuantizedLogistic FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_INPUTQUANTIZEDPARAM = 4, + VT_OUTPUTQUANTIZEDPARAM = 6 + }; +- const QuantizedParam *inputQuantizedParam() const { +- return GetPointer(VT_INPUTQUANTIZEDPARAM); ++ const MNN::QuantizedParam *inputQuantizedParam() const { ++ return GetPointer(VT_INPUTQUANTIZEDPARAM); + } +- const QuantizedParam *outputQuantizedParam() const { +- return GetPointer(VT_OUTPUTQUANTIZEDPARAM); ++ const MNN::QuantizedParam *outputQuantizedParam() const { ++ return GetPointer(VT_OUTPUTQUANTIZEDPARAM); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -948,19 +936,19 @@ struct QuantizedLogistic FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedLogisticBuilder { ++ typedef QuantizedLogistic Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { ++ void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { + fbb_.AddOffset(QuantizedLogistic::VT_INPUTQUANTIZEDPARAM, inputQuantizedParam); + } +- void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { ++ void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { + fbb_.AddOffset(QuantizedLogistic::VT_OUTPUTQUANTIZEDPARAM, outputQuantizedParam); + } + explicit QuantizedLogisticBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedLogisticBuilder &operator=(const QuantizedLogisticBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -970,8 +958,8 @@ struct QuantizedLogisticBuilder { + + inline flatbuffers::Offset CreateQuantizedLogistic( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset inputQuantizedParam = 0, +- flatbuffers::Offset outputQuantizedParam = 0) { ++ flatbuffers::Offset inputQuantizedParam = 0, ++ flatbuffers::Offset outputQuantizedParam = 0) { + QuantizedLogisticBuilder builder_(_fbb); + builder_.add_outputQuantizedParam(outputQuantizedParam); + builder_.add_inputQuantizedParam(inputQuantizedParam); +@@ -982,16 +970,13 @@ flatbuffers::Offset CreateQuantizedLogistic(flatbuffers::Flat + + struct QuantizedMatMulT : public flatbuffers::NativeTable { + typedef QuantizedMatMul TableType; +- bool transposeA; +- bool transposeB; +- QuantizedMatMulT() +- : transposeA(false), +- transposeB(false) { +- } ++ bool transposeA = false; ++ bool transposeB = false; + }; + + struct QuantizedMatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedMatMulT NativeTableType; ++ typedef QuantizedMatMulBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedMatMulTypeTable(); + } +@@ -1017,6 +1002,7 @@ struct QuantizedMatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedMatMulBuilder { ++ typedef QuantizedMatMul Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_transposeA(bool transposeA) { +@@ -1029,7 +1015,6 @@ struct QuantizedMatMulBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedMatMulBuilder &operator=(const QuantizedMatMulBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1051,34 +1036,22 @@ flatbuffers::Offset CreateQuantizedMatMul(flatbuffers::FlatBuff + + struct QuantizedMaxPoolT : public flatbuffers::NativeTable { + typedef QuantizedMaxPool TableType; +- int32_t kernelX; +- int32_t kernelY; +- ModeFormat modelFormat; +- int32_t outputActivationMax; +- int32_t outputActivationMin; +- PoolPadType padType; +- int32_t padX; +- int32_t padY; +- int32_t strideX; +- int32_t strideY; +- DataType type; +- QuantizedMaxPoolT() +- : kernelX(0), +- kernelY(0), +- modelFormat(ModeFormat_TENSORFLOW), +- outputActivationMax(0), +- outputActivationMin(0), +- padType(PoolPadType_CAFFE), +- padX(0), +- padY(0), +- strideX(0), +- strideY(0), +- type(DataType_DT_INVALID) { +- } ++ int32_t kernelX = 0; ++ int32_t kernelY = 0; ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; ++ int32_t outputActivationMax = 0; ++ int32_t outputActivationMin = 0; ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE; ++ int32_t padX = 0; ++ int32_t padY = 0; ++ int32_t strideX = 0; ++ int32_t strideY = 0; ++ MNN::DataType type = MNN::DataType_DT_INVALID; + }; + + struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedMaxPoolT NativeTableType; ++ typedef QuantizedMaxPoolBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedMaxPoolTypeTable(); + } +@@ -1101,8 +1074,8 @@ struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t kernelY() const { + return GetField(VT_KERNELY, 0); + } +- ModeFormat modelFormat() const { +- return static_cast(GetField(VT_MODELFORMAT, 0)); ++ MNN::ModeFormat modelFormat() const { ++ return static_cast(GetField(VT_MODELFORMAT, 0)); + } + int32_t outputActivationMax() const { + return GetField(VT_OUTPUTACTIVATIONMAX, 0); +@@ -1110,8 +1083,8 @@ struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t outputActivationMin() const { + return GetField(VT_OUTPUTACTIVATIONMIN, 0); + } +- PoolPadType padType() const { +- return static_cast(GetField(VT_PADTYPE, 0)); ++ MNN::PoolPadType padType() const { ++ return static_cast(GetField(VT_PADTYPE, 0)); + } + int32_t padX() const { + return GetField(VT_PADX, 0); +@@ -1125,8 +1098,8 @@ struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t strideY() const { + return GetField(VT_STRIDEY, 0); + } +- DataType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::DataType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1149,6 +1122,7 @@ struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedMaxPoolBuilder { ++ typedef QuantizedMaxPool Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_kernelX(int32_t kernelX) { +@@ -1157,7 +1131,7 @@ struct QuantizedMaxPoolBuilder { + void add_kernelY(int32_t kernelY) { + fbb_.AddElement(QuantizedMaxPool::VT_KERNELY, kernelY, 0); + } +- void add_modelFormat(ModeFormat modelFormat) { ++ void add_modelFormat(MNN::ModeFormat modelFormat) { + fbb_.AddElement(QuantizedMaxPool::VT_MODELFORMAT, static_cast(modelFormat), 0); + } + void add_outputActivationMax(int32_t outputActivationMax) { +@@ -1166,7 +1140,7 @@ struct QuantizedMaxPoolBuilder { + void add_outputActivationMin(int32_t outputActivationMin) { + fbb_.AddElement(QuantizedMaxPool::VT_OUTPUTACTIVATIONMIN, outputActivationMin, 0); + } +- void add_padType(PoolPadType padType) { ++ void add_padType(MNN::PoolPadType padType) { + fbb_.AddElement(QuantizedMaxPool::VT_PADTYPE, static_cast(padType), 0); + } + void add_padX(int32_t padX) { +@@ -1181,14 +1155,13 @@ struct QuantizedMaxPoolBuilder { + void add_strideY(int32_t strideY) { + fbb_.AddElement(QuantizedMaxPool::VT_STRIDEY, strideY, 0); + } +- void add_type(DataType type) { ++ void add_type(MNN::DataType type) { + fbb_.AddElement(QuantizedMaxPool::VT_TYPE, static_cast(type), 0); + } + explicit QuantizedMaxPoolBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedMaxPoolBuilder &operator=(const QuantizedMaxPoolBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1200,15 +1173,15 @@ inline flatbuffers::Offset CreateQuantizedMaxPool( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t kernelX = 0, + int32_t kernelY = 0, +- ModeFormat modelFormat = ModeFormat_TENSORFLOW, ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, + int32_t outputActivationMax = 0, + int32_t outputActivationMin = 0, +- PoolPadType padType = PoolPadType_CAFFE, ++ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE, + int32_t padX = 0, + int32_t padY = 0, + int32_t strideX = 0, + int32_t strideY = 0, +- DataType type = DataType_DT_INVALID) { ++ MNN::DataType type = MNN::DataType_DT_INVALID) { + QuantizedMaxPoolBuilder builder_(_fbb); + builder_.add_type(type); + builder_.add_strideY(strideY); +@@ -1228,22 +1201,20 @@ flatbuffers::Offset CreateQuantizedMaxPool(flatbuffers::FlatBu + + struct QuantizedReluT : public flatbuffers::NativeTable { + typedef QuantizedRelu TableType; +- DataType type; +- QuantizedReluT() +- : type(DataType_DT_INVALID) { +- } ++ MNN::DataType type = MNN::DataType_DT_INVALID; + }; + + struct QuantizedRelu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedReluT NativeTableType; ++ typedef QuantizedReluBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedReluTypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TYPE = 4 + }; +- DataType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::DataType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1256,16 +1227,16 @@ struct QuantizedRelu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedReluBuilder { ++ typedef QuantizedRelu Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_type(DataType type) { ++ void add_type(MNN::DataType type) { + fbb_.AddElement(QuantizedRelu::VT_TYPE, static_cast(type), 0); + } + explicit QuantizedReluBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedReluBuilder &operator=(const QuantizedReluBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1275,7 +1246,7 @@ struct QuantizedReluBuilder { + + inline flatbuffers::Offset CreateQuantizedRelu( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType type = DataType_DT_INVALID) { ++ MNN::DataType type = MNN::DataType_DT_INVALID) { + QuantizedReluBuilder builder_(_fbb); + builder_.add_type(type); + return builder_.Finish(); +@@ -1285,22 +1256,20 @@ flatbuffers::Offset CreateQuantizedRelu(flatbuffers::FlatBufferBu + + struct QuantizedRelu6T : public flatbuffers::NativeTable { + typedef QuantizedRelu6 TableType; +- DataType type; +- QuantizedRelu6T() +- : type(DataType_DT_INVALID) { +- } ++ MNN::DataType type = MNN::DataType_DT_INVALID; + }; + + struct QuantizedRelu6 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedRelu6T NativeTableType; ++ typedef QuantizedRelu6Builder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedRelu6TypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TYPE = 4 + }; +- DataType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::DataType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1313,16 +1282,16 @@ struct QuantizedRelu6 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedRelu6Builder { ++ typedef QuantizedRelu6 Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_type(DataType type) { ++ void add_type(MNN::DataType type) { + fbb_.AddElement(QuantizedRelu6::VT_TYPE, static_cast(type), 0); + } + explicit QuantizedRelu6Builder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedRelu6Builder &operator=(const QuantizedRelu6Builder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1332,7 +1301,7 @@ struct QuantizedRelu6Builder { + + inline flatbuffers::Offset CreateQuantizedRelu6( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType type = DataType_DT_INVALID) { ++ MNN::DataType type = MNN::DataType_DT_INVALID) { + QuantizedRelu6Builder builder_(_fbb); + builder_.add_type(type); + return builder_.Finish(); +@@ -1342,15 +1311,13 @@ flatbuffers::Offset CreateQuantizedRelu6(flatbuffers::FlatBuffer + + struct QuantizedReshapeT : public flatbuffers::NativeTable { + typedef QuantizedReshape TableType; +- std::vector dims; +- ModeFormat modelFormat; +- QuantizedReshapeT() +- : modelFormat(ModeFormat_TENSORFLOW) { +- } ++ std::vector dims{}; ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; + }; + + struct QuantizedReshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedReshapeT NativeTableType; ++ typedef QuantizedReshapeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedReshapeTypeTable(); + } +@@ -1361,8 +1328,8 @@ struct QuantizedReshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *dims() const { + return GetPointer *>(VT_DIMS); + } +- ModeFormat modelFormat() const { +- return static_cast(GetField(VT_MODELFORMAT, 0)); ++ MNN::ModeFormat modelFormat() const { ++ return static_cast(GetField(VT_MODELFORMAT, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1377,19 +1344,19 @@ struct QuantizedReshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedReshapeBuilder { ++ typedef QuantizedReshape Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_dims(flatbuffers::Offset> dims) { + fbb_.AddOffset(QuantizedReshape::VT_DIMS, dims); + } +- void add_modelFormat(ModeFormat modelFormat) { ++ void add_modelFormat(MNN::ModeFormat modelFormat) { + fbb_.AddElement(QuantizedReshape::VT_MODELFORMAT, static_cast(modelFormat), 0); + } + explicit QuantizedReshapeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedReshapeBuilder &operator=(const QuantizedReshapeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1400,7 +1367,7 @@ struct QuantizedReshapeBuilder { + inline flatbuffers::Offset CreateQuantizedReshape( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> dims = 0, +- ModeFormat modelFormat = ModeFormat_TENSORFLOW) { ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW) { + QuantizedReshapeBuilder builder_(_fbb); + builder_.add_dims(dims); + builder_.add_modelFormat(modelFormat); +@@ -1410,7 +1377,7 @@ inline flatbuffers::Offset CreateQuantizedReshape( + inline flatbuffers::Offset CreateQuantizedReshapeDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *dims = nullptr, +- ModeFormat modelFormat = ModeFormat_TENSORFLOW) { ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW) { + auto dims__ = dims ? _fbb.CreateVector(*dims) : 0; + return MNN::CreateQuantizedReshape( + _fbb, +@@ -1422,16 +1389,13 @@ flatbuffers::Offset CreateQuantizedReshape(flatbuffers::FlatBu + + struct QuantizedSoftmaxT : public flatbuffers::NativeTable { + typedef QuantizedSoftmax TableType; +- float beta; +- float inputScale; +- QuantizedSoftmaxT() +- : beta(0.0f), +- inputScale(0.0f) { +- } ++ float beta = 0.0f; ++ float inputScale = 0.0f; + }; + + struct QuantizedSoftmax FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizedSoftmaxT NativeTableType; ++ typedef QuantizedSoftmaxBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizedSoftmaxTypeTable(); + } +@@ -1457,6 +1421,7 @@ struct QuantizedSoftmax FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizedSoftmaxBuilder { ++ typedef QuantizedSoftmax Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_beta(float beta) { +@@ -1469,7 +1434,6 @@ struct QuantizedSoftmaxBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizedSoftmaxBuilder &operator=(const QuantizedSoftmaxBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1491,18 +1455,14 @@ flatbuffers::Offset CreateQuantizedSoftmax(flatbuffers::FlatBu + + struct QuantizeV2T : public flatbuffers::NativeTable { + typedef QuantizeV2 TableType; +- DataType type; +- QuantizeMode mode; +- QuantizeRoundMode roundMode; +- QuantizeV2T() +- : type(DataType_DT_INVALID), +- mode(QuantizeMode_MIN_COMBINED), +- roundMode(QuantizeRoundMode_HALF_AWAY_FROM_ZERO) { +- } ++ MNN::DataType type = MNN::DataType_DT_INVALID; ++ MNN::QuantizeMode mode = MNN::QuantizeMode_MIN_COMBINED; ++ MNN::QuantizeRoundMode roundMode = MNN::QuantizeRoundMode_HALF_AWAY_FROM_ZERO; + }; + + struct QuantizeV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizeV2T NativeTableType; ++ typedef QuantizeV2Builder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizeV2TypeTable(); + } +@@ -1511,14 +1471,14 @@ struct QuantizeV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_MODE = 6, + VT_ROUNDMODE = 8 + }; +- DataType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::DataType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } +- QuantizeMode mode() const { +- return static_cast(GetField(VT_MODE, 0)); ++ MNN::QuantizeMode mode() const { ++ return static_cast(GetField(VT_MODE, 0)); + } +- QuantizeRoundMode roundMode() const { +- return static_cast(GetField(VT_ROUNDMODE, 0)); ++ MNN::QuantizeRoundMode roundMode() const { ++ return static_cast(GetField(VT_ROUNDMODE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1533,22 +1493,22 @@ struct QuantizeV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizeV2Builder { ++ typedef QuantizeV2 Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_type(DataType type) { ++ void add_type(MNN::DataType type) { + fbb_.AddElement(QuantizeV2::VT_TYPE, static_cast(type), 0); + } +- void add_mode(QuantizeMode mode) { ++ void add_mode(MNN::QuantizeMode mode) { + fbb_.AddElement(QuantizeV2::VT_MODE, static_cast(mode), 0); + } +- void add_roundMode(QuantizeRoundMode roundMode) { ++ void add_roundMode(MNN::QuantizeRoundMode roundMode) { + fbb_.AddElement(QuantizeV2::VT_ROUNDMODE, static_cast(roundMode), 0); + } + explicit QuantizeV2Builder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizeV2Builder &operator=(const QuantizeV2Builder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1558,9 +1518,9 @@ struct QuantizeV2Builder { + + inline flatbuffers::Offset CreateQuantizeV2( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType type = DataType_DT_INVALID, +- QuantizeMode mode = QuantizeMode_MIN_COMBINED, +- QuantizeRoundMode roundMode = QuantizeRoundMode_HALF_AWAY_FROM_ZERO) { ++ MNN::DataType type = MNN::DataType_DT_INVALID, ++ MNN::QuantizeMode mode = MNN::QuantizeMode_MIN_COMBINED, ++ MNN::QuantizeRoundMode roundMode = MNN::QuantizeRoundMode_HALF_AWAY_FROM_ZERO) { + QuantizeV2Builder builder_(_fbb); + builder_.add_type(type); + builder_.add_roundMode(roundMode); +@@ -1572,12 +1532,11 @@ flatbuffers::Offset CreateQuantizeV2(flatbuffers::FlatBufferBuilder + + struct RequantizationRangeT : public flatbuffers::NativeTable { + typedef RequantizationRange TableType; +- RequantizationRangeT() { +- } + }; + + struct RequantizationRange FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RequantizationRangeT NativeTableType; ++ typedef RequantizationRangeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return RequantizationRangeTypeTable(); + } +@@ -1591,13 +1550,13 @@ struct RequantizationRange FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct RequantizationRangeBuilder { ++ typedef RequantizationRange Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit RequantizationRangeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RequantizationRangeBuilder &operator=(const RequantizationRangeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1615,12 +1574,11 @@ flatbuffers::Offset CreateRequantizationRange(flatbuffers:: + + struct RequantizeT : public flatbuffers::NativeTable { + typedef Requantize TableType; +- RequantizeT() { +- } + }; + + struct Requantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RequantizeT NativeTableType; ++ typedef RequantizeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return RequantizeTypeTable(); + } +@@ -1634,13 +1592,13 @@ struct Requantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RequantizeBuilder { ++ typedef Requantize Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit RequantizeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RequantizeBuilder &operator=(const RequantizeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1658,35 +1616,26 @@ flatbuffers::Offset CreateRequantize(flatbuffers::FlatBufferBuilder + + struct TfQuantizedConv2DT : public flatbuffers::NativeTable { + typedef TfQuantizedConv2D TableType; +- std::vector bias; +- bool biasflag; +- std::unique_ptr common; +- std::vector weight; +- FusedActivation activationType; +- int32_t multiplier; +- int32_t outMax; +- int32_t outMin; +- int32_t shift; +- std::unique_ptr biasQuantizedParam; +- int32_t depthMultiplier; +- std::unique_ptr filterQuantizedParam; +- std::unique_ptr inputQuantizedParam; +- ModeFormat modelFormat; +- std::unique_ptr outputQuantizedParam; +- TfQuantizedConv2DT() +- : biasflag(false), +- activationType(FusedActivation_kTfLiteActNone), +- multiplier(0), +- outMax(0), +- outMin(0), +- shift(0), +- depthMultiplier(0), +- modelFormat(ModeFormat_TENSORFLOW) { +- } ++ std::vector bias{}; ++ bool biasflag = false; ++ std::unique_ptr common{}; ++ std::vector weight{}; ++ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone; ++ int32_t multiplier = 0; ++ int32_t outMax = 0; ++ int32_t outMin = 0; ++ int32_t shift = 0; ++ std::unique_ptr biasQuantizedParam{}; ++ int32_t depthMultiplier = 0; ++ std::unique_ptr filterQuantizedParam{}; ++ std::unique_ptr inputQuantizedParam{}; ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; ++ std::unique_ptr outputQuantizedParam{}; + }; + + struct TfQuantizedConv2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TfQuantizedConv2DT NativeTableType; ++ typedef TfQuantizedConv2DBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return TfQuantizedConv2DTypeTable(); + } +@@ -1713,14 +1662,14 @@ struct TfQuantizedConv2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + bool biasflag() const { + return GetField(VT_BIASFLAG, 0) != 0; + } +- const Convolution2DCommon *common() const { +- return GetPointer(VT_COMMON); ++ const MNN::Convolution2DCommon *common() const { ++ return GetPointer(VT_COMMON); + } + const flatbuffers::Vector *weight() const { + return GetPointer *>(VT_WEIGHT); + } +- FusedActivation activationType() const { +- return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); ++ MNN::FusedActivation activationType() const { ++ return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); + } + int32_t multiplier() const { + return GetField(VT_MULTIPLIER, 0); +@@ -1734,23 +1683,23 @@ struct TfQuantizedConv2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t shift() const { + return GetField(VT_SHIFT, 0); + } +- const QuantizedParam *biasQuantizedParam() const { +- return GetPointer(VT_BIASQUANTIZEDPARAM); ++ const MNN::QuantizedParam *biasQuantizedParam() const { ++ return GetPointer(VT_BIASQUANTIZEDPARAM); + } + int32_t depthMultiplier() const { + return GetField(VT_DEPTHMULTIPLIER, 0); + } +- const QuantizedParam *filterQuantizedParam() const { +- return GetPointer(VT_FILTERQUANTIZEDPARAM); ++ const MNN::QuantizedParam *filterQuantizedParam() const { ++ return GetPointer(VT_FILTERQUANTIZEDPARAM); + } +- const QuantizedParam *inputQuantizedParam() const { +- return GetPointer(VT_INPUTQUANTIZEDPARAM); ++ const MNN::QuantizedParam *inputQuantizedParam() const { ++ return GetPointer(VT_INPUTQUANTIZEDPARAM); + } +- ModeFormat modelFormat() const { +- return static_cast(GetField(VT_MODELFORMAT, 0)); ++ MNN::ModeFormat modelFormat() const { ++ return static_cast(GetField(VT_MODELFORMAT, 0)); + } +- const QuantizedParam *outputQuantizedParam() const { +- return GetPointer(VT_OUTPUTQUANTIZEDPARAM); ++ const MNN::QuantizedParam *outputQuantizedParam() const { ++ return GetPointer(VT_OUTPUTQUANTIZEDPARAM); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1784,6 +1733,7 @@ struct TfQuantizedConv2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TfQuantizedConv2DBuilder { ++ typedef TfQuantizedConv2D Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_bias(flatbuffers::Offset> bias) { +@@ -1792,13 +1742,13 @@ struct TfQuantizedConv2DBuilder { + void add_biasflag(bool biasflag) { + fbb_.AddElement(TfQuantizedConv2D::VT_BIASFLAG, static_cast(biasflag), 0); + } +- void add_common(flatbuffers::Offset common) { ++ void add_common(flatbuffers::Offset common) { + fbb_.AddOffset(TfQuantizedConv2D::VT_COMMON, common); + } + void add_weight(flatbuffers::Offset> weight) { + fbb_.AddOffset(TfQuantizedConv2D::VT_WEIGHT, weight); + } +- void add_activationType(FusedActivation activationType) { ++ void add_activationType(MNN::FusedActivation activationType) { + fbb_.AddElement(TfQuantizedConv2D::VT_ACTIVATIONTYPE, static_cast(activationType), 0); + } + void add_multiplier(int32_t multiplier) { +@@ -1813,29 +1763,28 @@ struct TfQuantizedConv2DBuilder { + void add_shift(int32_t shift) { + fbb_.AddElement(TfQuantizedConv2D::VT_SHIFT, shift, 0); + } +- void add_biasQuantizedParam(flatbuffers::Offset biasQuantizedParam) { ++ void add_biasQuantizedParam(flatbuffers::Offset biasQuantizedParam) { + fbb_.AddOffset(TfQuantizedConv2D::VT_BIASQUANTIZEDPARAM, biasQuantizedParam); + } + void add_depthMultiplier(int32_t depthMultiplier) { + fbb_.AddElement(TfQuantizedConv2D::VT_DEPTHMULTIPLIER, depthMultiplier, 0); + } +- void add_filterQuantizedParam(flatbuffers::Offset filterQuantizedParam) { ++ void add_filterQuantizedParam(flatbuffers::Offset filterQuantizedParam) { + fbb_.AddOffset(TfQuantizedConv2D::VT_FILTERQUANTIZEDPARAM, filterQuantizedParam); + } +- void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { ++ void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { + fbb_.AddOffset(TfQuantizedConv2D::VT_INPUTQUANTIZEDPARAM, inputQuantizedParam); + } +- void add_modelFormat(ModeFormat modelFormat) { ++ void add_modelFormat(MNN::ModeFormat modelFormat) { + fbb_.AddElement(TfQuantizedConv2D::VT_MODELFORMAT, static_cast(modelFormat), 0); + } +- void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { ++ void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { + fbb_.AddOffset(TfQuantizedConv2D::VT_OUTPUTQUANTIZEDPARAM, outputQuantizedParam); + } + explicit TfQuantizedConv2DBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TfQuantizedConv2DBuilder &operator=(const TfQuantizedConv2DBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1847,19 +1796,19 @@ inline flatbuffers::Offset CreateTfQuantizedConv2D( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> bias = 0, + bool biasflag = false, +- flatbuffers::Offset common = 0, ++ flatbuffers::Offset common = 0, + flatbuffers::Offset> weight = 0, +- FusedActivation activationType = FusedActivation_kTfLiteActNone, ++ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, + int32_t multiplier = 0, + int32_t outMax = 0, + int32_t outMin = 0, + int32_t shift = 0, +- flatbuffers::Offset biasQuantizedParam = 0, ++ flatbuffers::Offset biasQuantizedParam = 0, + int32_t depthMultiplier = 0, +- flatbuffers::Offset filterQuantizedParam = 0, +- flatbuffers::Offset inputQuantizedParam = 0, +- ModeFormat modelFormat = ModeFormat_TENSORFLOW, +- flatbuffers::Offset outputQuantizedParam = 0) { ++ flatbuffers::Offset filterQuantizedParam = 0, ++ flatbuffers::Offset inputQuantizedParam = 0, ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, ++ flatbuffers::Offset outputQuantizedParam = 0) { + TfQuantizedConv2DBuilder builder_(_fbb); + builder_.add_outputQuantizedParam(outputQuantizedParam); + builder_.add_inputQuantizedParam(inputQuantizedParam); +@@ -1883,19 +1832,19 @@ inline flatbuffers::Offset CreateTfQuantizedConv2DDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *bias = nullptr, + bool biasflag = false, +- flatbuffers::Offset common = 0, ++ flatbuffers::Offset common = 0, + const std::vector *weight = nullptr, +- FusedActivation activationType = FusedActivation_kTfLiteActNone, ++ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, + int32_t multiplier = 0, + int32_t outMax = 0, + int32_t outMin = 0, + int32_t shift = 0, +- flatbuffers::Offset biasQuantizedParam = 0, ++ flatbuffers::Offset biasQuantizedParam = 0, + int32_t depthMultiplier = 0, +- flatbuffers::Offset filterQuantizedParam = 0, +- flatbuffers::Offset inputQuantizedParam = 0, +- ModeFormat modelFormat = ModeFormat_TENSORFLOW, +- flatbuffers::Offset outputQuantizedParam = 0) { ++ flatbuffers::Offset filterQuantizedParam = 0, ++ flatbuffers::Offset inputQuantizedParam = 0, ++ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, ++ flatbuffers::Offset outputQuantizedParam = 0) { + auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; + auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; + return MNN::CreateTfQuantizedConv2D( +@@ -1920,16 +1869,16 @@ inline flatbuffers::Offset CreateTfQuantizedConv2DDirect( + flatbuffers::Offset CreateTfQuantizedConv2D(flatbuffers::FlatBufferBuilder &_fbb, const TfQuantizedConv2DT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + inline QuantizedParamT *QuantizedParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedParam::UnPackTo(QuantizedParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = zeroPoint(); _o->zeroPoint = _e; }; +- { auto _e = scale(); _o->scale = _e; }; ++ { auto _e = zeroPoint(); _o->zeroPoint = _e; } ++ { auto _e = scale(); _o->scale = _e; } + } + + inline flatbuffers::Offset QuantizedParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -1949,18 +1898,18 @@ inline flatbuffers::Offset CreateQuantizedParam(flatbuffers::Fla + } + + inline QuantizedAddT *QuantizedAdd::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedAddT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedAddT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedAdd::UnPackTo(QuantizedAddT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = activationType(); _o->activationType = _e; }; +- { auto _e = input1QuantizedParam(); if (_e) _o->input1QuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = input2QuantizedParam(); if (_e) _o->input2QuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = activationType(); _o->activationType = _e; } ++ { auto _e = input1QuantizedParam(); if (_e) _o->input1QuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = input2QuantizedParam(); if (_e) _o->input2QuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset QuantizedAdd::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedAddT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -1984,18 +1933,18 @@ inline flatbuffers::Offset CreateQuantizedAdd(flatbuffers::FlatBuf + } + + inline DequantizeT *Dequantize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DequantizeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DequantizeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Dequantize::UnPackTo(DequantizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = mode(); _o->mode = _e; }; +- { auto _e = modelFormat(); _o->modelFormat = _e; }; +- { auto _e = type(); _o->type = _e; }; ++ { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = mode(); _o->mode = _e; } ++ { auto _e = modelFormat(); _o->modelFormat = _e; } ++ { auto _e = type(); _o->type = _e; } + } + + inline flatbuffers::Offset Dequantize::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2019,25 +1968,25 @@ inline flatbuffers::Offset CreateDequantize(flatbuffers::FlatBufferB + } + + inline QuantizedAvgPoolT *QuantizedAvgPool::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedAvgPoolT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedAvgPoolT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedAvgPool::UnPackTo(QuantizedAvgPoolT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = kernelX(); _o->kernelX = _e; }; +- { auto _e = kernelY(); _o->kernelY = _e; }; +- { auto _e = modelFormat(); _o->modelFormat = _e; }; +- { auto _e = outputActivationMax(); _o->outputActivationMax = _e; }; +- { auto _e = outputActivationMin(); _o->outputActivationMin = _e; }; +- { auto _e = padType(); _o->padType = _e; }; +- { auto _e = padX(); _o->padX = _e; }; +- { auto _e = padY(); _o->padY = _e; }; +- { auto _e = strideX(); _o->strideX = _e; }; +- { auto _e = strideY(); _o->strideY = _e; }; +- { auto _e = type(); _o->type = _e; }; ++ { auto _e = kernelX(); _o->kernelX = _e; } ++ { auto _e = kernelY(); _o->kernelY = _e; } ++ { auto _e = modelFormat(); _o->modelFormat = _e; } ++ { auto _e = outputActivationMax(); _o->outputActivationMax = _e; } ++ { auto _e = outputActivationMin(); _o->outputActivationMin = _e; } ++ { auto _e = padType(); _o->padType = _e; } ++ { auto _e = padX(); _o->padX = _e; } ++ { auto _e = padY(); _o->padY = _e; } ++ { auto _e = strideX(); _o->strideX = _e; } ++ { auto _e = strideY(); _o->strideY = _e; } ++ { auto _e = type(); _o->type = _e; } + } + + inline flatbuffers::Offset QuantizedAvgPool::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedAvgPoolT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2075,19 +2024,19 @@ inline flatbuffers::Offset CreateQuantizedAvgPool(flatbuffers: + } + + inline QuantizedBiasAddT *QuantizedBiasAdd::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedBiasAddT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedBiasAddT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedBiasAdd::UnPackTo(QuantizedBiasAddT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; +- { auto _e = inputType(); _o->inputType = _e; }; +- { auto _e = max(); _o->max = _e; }; +- { auto _e = min(); _o->min = _e; }; +- { auto _e = outputType(); _o->outputType = _e; }; ++ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } ++ { auto _e = inputType(); _o->inputType = _e; } ++ { auto _e = max(); _o->max = _e; } ++ { auto _e = min(); _o->min = _e; } ++ { auto _e = outputType(); _o->outputType = _e; } + } + + inline flatbuffers::Offset QuantizedBiasAdd::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedBiasAddT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2113,19 +2062,19 @@ inline flatbuffers::Offset CreateQuantizedBiasAdd(flatbuffers: + } + + inline QuantizedConcatT *QuantizedConcat::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedConcatT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedConcatT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedConcat::UnPackTo(QuantizedConcatT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = activationType(); _o->activationType = _e; }; +- { auto _e = axis(); _o->axis = _e; }; +- { auto _e = inputScale(); if (_e) { _o->inputScale.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputScale[_i] = _e->Get(_i); } } }; +- { auto _e = inputZeroPoint(); if (_e) { _o->inputZeroPoint.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputZeroPoint[_i] = _e->Get(_i); } } }; +- { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = activationType(); _o->activationType = _e; } ++ { auto _e = axis(); _o->axis = _e; } ++ { auto _e = inputScale(); if (_e) { _o->inputScale.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputScale[_i] = _e->Get(_i); } } } ++ { auto _e = inputZeroPoint(); if (_e) { _o->inputZeroPoint.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputZeroPoint[_i] = _e->Get(_i); } } } ++ { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset QuantizedConcat::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedConcatT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2151,16 +2100,16 @@ inline flatbuffers::Offset CreateQuantizedConcat(flatbuffers::F + } + + inline QuantizedLogisticT *QuantizedLogistic::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedLogisticT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedLogisticT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedLogistic::UnPackTo(QuantizedLogisticT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset QuantizedLogistic::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedLogisticT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2180,16 +2129,16 @@ inline flatbuffers::Offset CreateQuantizedLogistic(flatbuffer + } + + inline QuantizedMatMulT *QuantizedMatMul::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedMatMulT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedMatMulT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedMatMul::UnPackTo(QuantizedMatMulT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = transposeA(); _o->transposeA = _e; }; +- { auto _e = transposeB(); _o->transposeB = _e; }; ++ { auto _e = transposeA(); _o->transposeA = _e; } ++ { auto _e = transposeB(); _o->transposeB = _e; } + } + + inline flatbuffers::Offset QuantizedMatMul::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedMatMulT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2209,25 +2158,25 @@ inline flatbuffers::Offset CreateQuantizedMatMul(flatbuffers::F + } + + inline QuantizedMaxPoolT *QuantizedMaxPool::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedMaxPoolT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedMaxPoolT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedMaxPool::UnPackTo(QuantizedMaxPoolT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = kernelX(); _o->kernelX = _e; }; +- { auto _e = kernelY(); _o->kernelY = _e; }; +- { auto _e = modelFormat(); _o->modelFormat = _e; }; +- { auto _e = outputActivationMax(); _o->outputActivationMax = _e; }; +- { auto _e = outputActivationMin(); _o->outputActivationMin = _e; }; +- { auto _e = padType(); _o->padType = _e; }; +- { auto _e = padX(); _o->padX = _e; }; +- { auto _e = padY(); _o->padY = _e; }; +- { auto _e = strideX(); _o->strideX = _e; }; +- { auto _e = strideY(); _o->strideY = _e; }; +- { auto _e = type(); _o->type = _e; }; ++ { auto _e = kernelX(); _o->kernelX = _e; } ++ { auto _e = kernelY(); _o->kernelY = _e; } ++ { auto _e = modelFormat(); _o->modelFormat = _e; } ++ { auto _e = outputActivationMax(); _o->outputActivationMax = _e; } ++ { auto _e = outputActivationMin(); _o->outputActivationMin = _e; } ++ { auto _e = padType(); _o->padType = _e; } ++ { auto _e = padX(); _o->padX = _e; } ++ { auto _e = padY(); _o->padY = _e; } ++ { auto _e = strideX(); _o->strideX = _e; } ++ { auto _e = strideY(); _o->strideY = _e; } ++ { auto _e = type(); _o->type = _e; } + } + + inline flatbuffers::Offset QuantizedMaxPool::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedMaxPoolT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2265,15 +2214,15 @@ inline flatbuffers::Offset CreateQuantizedMaxPool(flatbuffers: + } + + inline QuantizedReluT *QuantizedRelu::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedReluT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedReluT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedRelu::UnPackTo(QuantizedReluT *_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 QuantizedRelu::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedReluT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2291,15 +2240,15 @@ inline flatbuffers::Offset CreateQuantizedRelu(flatbuffers::FlatB + } + + inline QuantizedRelu6T *QuantizedRelu6::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedRelu6T(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedRelu6T()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedRelu6::UnPackTo(QuantizedRelu6T *_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 QuantizedRelu6::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedRelu6T* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2317,16 +2266,16 @@ inline flatbuffers::Offset CreateQuantizedRelu6(flatbuffers::Fla + } + + inline QuantizedReshapeT *QuantizedReshape::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedReshapeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedReshapeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedReshape::UnPackTo(QuantizedReshapeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; +- { auto _e = modelFormat(); _o->modelFormat = _e; }; ++ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } ++ { auto _e = modelFormat(); _o->modelFormat = _e; } + } + + inline flatbuffers::Offset QuantizedReshape::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedReshapeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2346,16 +2295,16 @@ inline flatbuffers::Offset CreateQuantizedReshape(flatbuffers: + } + + inline QuantizedSoftmaxT *QuantizedSoftmax::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizedSoftmaxT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizedSoftmaxT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizedSoftmax::UnPackTo(QuantizedSoftmaxT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = beta(); _o->beta = _e; }; +- { auto _e = inputScale(); _o->inputScale = _e; }; ++ { auto _e = beta(); _o->beta = _e; } ++ { auto _e = inputScale(); _o->inputScale = _e; } + } + + inline flatbuffers::Offset QuantizedSoftmax::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedSoftmaxT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2375,17 +2324,17 @@ inline flatbuffers::Offset CreateQuantizedSoftmax(flatbuffers: + } + + inline QuantizeV2T *QuantizeV2::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizeV2T(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizeV2T()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizeV2::UnPackTo(QuantizeV2T *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = type(); _o->type = _e; }; +- { auto _e = mode(); _o->mode = _e; }; +- { auto _e = roundMode(); _o->roundMode = _e; }; ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = mode(); _o->mode = _e; } ++ { auto _e = roundMode(); _o->roundMode = _e; } + } + + inline flatbuffers::Offset QuantizeV2::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeV2T* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2407,9 +2356,9 @@ inline flatbuffers::Offset CreateQuantizeV2(flatbuffers::FlatBufferB + } + + inline RequantizationRangeT *RequantizationRange::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RequantizationRangeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RequantizationRangeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void RequantizationRange::UnPackTo(RequantizationRangeT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -2430,9 +2379,9 @@ inline flatbuffers::Offset CreateRequantizationRange(flatbu + } + + inline RequantizeT *Requantize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RequantizeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RequantizeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Requantize::UnPackTo(RequantizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -2453,29 +2402,29 @@ inline flatbuffers::Offset CreateRequantize(flatbuffers::FlatBufferB + } + + inline TfQuantizedConv2DT *TfQuantizedConv2D::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TfQuantizedConv2DT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TfQuantizedConv2DT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TfQuantizedConv2D::UnPackTo(TfQuantizedConv2DT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; +- { auto _e = biasflag(); _o->biasflag = _e; }; +- { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; +- { auto _e = activationType(); _o->activationType = _e; }; +- { auto _e = multiplier(); _o->multiplier = _e; }; +- { auto _e = outMax(); _o->outMax = _e; }; +- { auto _e = outMin(); _o->outMin = _e; }; +- { auto _e = shift(); _o->shift = _e; }; +- { auto _e = biasQuantizedParam(); if (_e) _o->biasQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = depthMultiplier(); _o->depthMultiplier = _e; }; +- { auto _e = filterQuantizedParam(); if (_e) _o->filterQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = modelFormat(); _o->modelFormat = _e; }; +- { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } ++ { auto _e = biasflag(); _o->biasflag = _e; } ++ { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->weight.begin()); } } ++ { auto _e = activationType(); _o->activationType = _e; } ++ { auto _e = multiplier(); _o->multiplier = _e; } ++ { auto _e = outMax(); _o->outMax = _e; } ++ { auto _e = outMin(); _o->outMin = _e; } ++ { auto _e = shift(); _o->shift = _e; } ++ { auto _e = biasQuantizedParam(); if (_e) _o->biasQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = depthMultiplier(); _o->depthMultiplier = _e; } ++ { auto _e = filterQuantizedParam(); if (_e) _o->filterQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = modelFormat(); _o->modelFormat = _e; } ++ { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset TfQuantizedConv2D::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TfQuantizedConv2DT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -2531,7 +2480,7 @@ inline const flatbuffers::TypeTable *FusedActivationTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- FusedActivationTypeTable ++ MNN::FusedActivationTypeTable + }; + static const char * const names[] = { + "kTfLiteActNone", +@@ -2543,7 +2492,7 @@ inline const flatbuffers::TypeTable *FusedActivationTypeTable() { + "kTfLiteActSigmoid" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 7, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 7, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2554,14 +2503,14 @@ inline const flatbuffers::TypeTable *ModeFormatTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ModeFormatTypeTable ++ MNN::ModeFormatTypeTable + }; + static const char * const names[] = { + "TENSORFLOW", + "TFLITE" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2573,7 +2522,7 @@ inline const flatbuffers::TypeTable *QuantizeModeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- QuantizeModeTypeTable ++ MNN::QuantizeModeTypeTable + }; + static const char * const names[] = { + "MIN_COMBINED", +@@ -2581,7 +2530,7 @@ inline const flatbuffers::TypeTable *QuantizeModeTypeTable() { + "SCALED" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2592,14 +2541,14 @@ inline const flatbuffers::TypeTable *QuantizeRoundModeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- QuantizeRoundModeTypeTable ++ MNN::QuantizeRoundModeTypeTable + }; + static const char * const names[] = { + "HALF_AWAY_FROM_ZERO", + "HALF_TO_EVEN" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2614,7 +2563,7 @@ inline const flatbuffers::TypeTable *QuantizedParamTypeTable() { + "scale" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -2627,8 +2576,8 @@ inline const flatbuffers::TypeTable *QuantizedAddTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- FusedActivationTypeTable, +- QuantizedParamTypeTable ++ MNN::FusedActivationTypeTable, ++ MNN::QuantizedParamTypeTable + }; + static const char * const names[] = { + "activationType", +@@ -2637,7 +2586,7 @@ inline const flatbuffers::TypeTable *QuantizedAddTypeTable() { + "outputQuantizedParam" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2650,10 +2599,10 @@ inline const flatbuffers::TypeTable *DequantizeTypeTable() { + { flatbuffers::ET_INT, 0, 3 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- QuantizedParamTypeTable, +- QuantizeModeTypeTable, +- ModeFormatTypeTable, +- DataTypeTypeTable ++ MNN::QuantizedParamTypeTable, ++ MNN::QuantizeModeTypeTable, ++ MNN::ModeFormatTypeTable, ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "inputQuantizedParam", +@@ -2662,7 +2611,7 @@ inline const flatbuffers::TypeTable *DequantizeTypeTable() { + "type" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2682,9 +2631,9 @@ inline const flatbuffers::TypeTable *QuantizedAvgPoolTypeTable() { + { flatbuffers::ET_INT, 0, 2 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ModeFormatTypeTable, +- PoolPadTypeTypeTable, +- DataTypeTypeTable ++ MNN::ModeFormatTypeTable, ++ MNN::PoolPadTypeTypeTable, ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "kernelX", +@@ -2700,7 +2649,7 @@ inline const flatbuffers::TypeTable *QuantizedAvgPoolTypeTable() { + "type" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2714,7 +2663,7 @@ inline const flatbuffers::TypeTable *QuantizedBiasAddTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "bias", +@@ -2724,7 +2673,7 @@ inline const flatbuffers::TypeTable *QuantizedBiasAddTypeTable() { + "outputType" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2738,8 +2687,8 @@ inline const flatbuffers::TypeTable *QuantizedConcatTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- FusedActivationTypeTable, +- QuantizedParamTypeTable ++ MNN::FusedActivationTypeTable, ++ MNN::QuantizedParamTypeTable + }; + static const char * const names[] = { + "activationType", +@@ -2749,7 +2698,7 @@ inline const flatbuffers::TypeTable *QuantizedConcatTypeTable() { + "outputQuantizedParam" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2760,14 +2709,14 @@ inline const flatbuffers::TypeTable *QuantizedLogisticTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- QuantizedParamTypeTable ++ MNN::QuantizedParamTypeTable + }; + static const char * const names[] = { + "inputQuantizedParam", + "outputQuantizedParam" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2782,7 +2731,7 @@ inline const flatbuffers::TypeTable *QuantizedMatMulTypeTable() { + "transposeB" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -2802,9 +2751,9 @@ inline const flatbuffers::TypeTable *QuantizedMaxPoolTypeTable() { + { flatbuffers::ET_INT, 0, 2 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ModeFormatTypeTable, +- PoolPadTypeTypeTable, +- DataTypeTypeTable ++ MNN::ModeFormatTypeTable, ++ MNN::PoolPadTypeTypeTable, ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "kernelX", +@@ -2820,7 +2769,7 @@ inline const flatbuffers::TypeTable *QuantizedMaxPoolTypeTable() { + "type" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2830,13 +2779,13 @@ inline const flatbuffers::TypeTable *QuantizedReluTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "type" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2846,13 +2795,13 @@ inline const flatbuffers::TypeTable *QuantizedRelu6TypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "type" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2863,14 +2812,14 @@ inline const flatbuffers::TypeTable *QuantizedReshapeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ModeFormatTypeTable ++ MNN::ModeFormatTypeTable + }; + static const char * const names[] = { + "dims", + "modelFormat" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -2885,7 +2834,7 @@ inline const flatbuffers::TypeTable *QuantizedSoftmaxTypeTable() { + "inputScale" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -2897,9 +2846,9 @@ inline const flatbuffers::TypeTable *QuantizeV2TypeTable() { + { flatbuffers::ET_CHAR, 0, 2 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable, +- QuantizeModeTypeTable, +- QuantizeRoundModeTypeTable ++ MNN::DataTypeTypeTable, ++ MNN::QuantizeModeTypeTable, ++ MNN::QuantizeRoundModeTypeTable + }; + static const char * const names[] = { + "type", +@@ -2907,21 +2856,21 @@ inline const flatbuffers::TypeTable *QuantizeV2TypeTable() { + "roundMode" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } + + inline const flatbuffers::TypeTable *RequantizationRangeTypeTable() { + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr ++ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr + }; + return &tt; + } + + inline const flatbuffers::TypeTable *RequantizeTypeTable() { + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr ++ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr + }; + return &tt; + } +@@ -2945,10 +2894,10 @@ inline const flatbuffers::TypeTable *TfQuantizedConv2DTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 2 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- Convolution2DCommonTypeTable, +- FusedActivationTypeTable, +- QuantizedParamTypeTable, +- ModeFormatTypeTable ++ MNN::Convolution2DCommonTypeTable, ++ MNN::FusedActivationTypeTable, ++ MNN::QuantizedParamTypeTable, ++ MNN::ModeFormatTypeTable + }; + static const char * const names[] = { + "bias", +@@ -2968,7 +2917,7 @@ inline const flatbuffers::TypeTable *TfQuantizedConv2DTypeTable() { + "outputQuantizedParam" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 15, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 15, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +diff --git a/schema/current/Tensor_generated.h b/schema/current/Tensor_generated.h +index 6c7c0baa..455e66e9 100644 +--- a/schema/current/Tensor_generated.h ++++ b/schema/current/Tensor_generated.h +@@ -4,21 +4,26 @@ + #ifndef FLATBUFFERS_GENERATED_TENSOR_MNN_H_ + #define FLATBUFFERS_GENERATED_TENSOR_MNN_H_ + ++#include "flatbuffers/flatbuffers.h" + + #include "Type_generated.h" + + namespace MNN { + + struct Blob; ++struct BlobBuilder; + struct BlobT; + + struct ListValue; ++struct ListValueBuilder; + struct ListValueT; + + struct Attribute; ++struct AttributeBuilder; + struct AttributeT; + + struct NamedAttrList; ++struct NamedAttrListBuilder; + struct NamedAttrListT; + + inline const flatbuffers::TypeTable *BlobTypeTable(); +@@ -29,7 +34,7 @@ inline const flatbuffers::TypeTable *AttributeTypeTable(); + + inline const flatbuffers::TypeTable *NamedAttrListTypeTable(); + +-enum MNN_DATA_FORMAT { ++enum MNN_DATA_FORMAT : int8_t { + MNN_DATA_FORMAT_NCHW = 0, + MNN_DATA_FORMAT_NHWC = 1, + MNN_DATA_FORMAT_NC4HW4 = 2, +@@ -51,7 +56,7 @@ inline const MNN_DATA_FORMAT (&EnumValuesMNN_DATA_FORMAT())[5] { + } + + inline const char * const *EnumNamesMNN_DATA_FORMAT() { +- static const char * const names[] = { ++ static const char * const names[6] = { + "NCHW", + "NHWC", + "NC4HW4", +@@ -63,30 +68,27 @@ inline const char * const *EnumNamesMNN_DATA_FORMAT() { + } + + inline const char *EnumNameMNN_DATA_FORMAT(MNN_DATA_FORMAT e) { +- if (e < MNN_DATA_FORMAT_NCHW || e > MNN_DATA_FORMAT_UNKNOWN) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, MNN_DATA_FORMAT_NCHW, MNN_DATA_FORMAT_UNKNOWN)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesMNN_DATA_FORMAT()[index]; + } + + struct BlobT : public flatbuffers::NativeTable { + typedef Blob TableType; +- std::vector dims; +- MNN_DATA_FORMAT dataFormat; +- DataType dataType; +- std::vector uint8s; +- std::vector int8s; +- std::vector int32s; +- std::vector int64s; +- std::vector float32s; +- std::vector strings; +- BlobT() +- : dataFormat(MNN_DATA_FORMAT_NCHW), +- dataType(DataType_DT_FLOAT) { +- } ++ std::vector dims{}; ++ MNN::MNN_DATA_FORMAT dataFormat = MNN::MNN_DATA_FORMAT_NCHW; ++ MNN::DataType dataType = MNN::DataType_DT_FLOAT; ++ std::vector uint8s{}; ++ std::vector int8s{}; ++ std::vector int32s{}; ++ std::vector int64s{}; ++ std::vector float32s{}; ++ std::vector strings{}; + }; + + struct Blob FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BlobT NativeTableType; ++ typedef BlobBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return BlobTypeTable(); + } +@@ -104,11 +106,11 @@ struct Blob FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *dims() const { + return GetPointer *>(VT_DIMS); + } +- MNN_DATA_FORMAT dataFormat() const { +- return static_cast(GetField(VT_DATAFORMAT, 0)); ++ MNN::MNN_DATA_FORMAT dataFormat() const { ++ return static_cast(GetField(VT_DATAFORMAT, 0)); + } +- DataType dataType() const { +- return static_cast(GetField(VT_DATATYPE, 1)); ++ MNN::DataType dataType() const { ++ return static_cast(GetField(VT_DATATYPE, 1)); + } + const flatbuffers::Vector *uint8s() const { + return GetPointer *>(VT_UINT8S); +@@ -155,15 +157,16 @@ struct Blob FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BlobBuilder { ++ typedef Blob Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_dims(flatbuffers::Offset> dims) { + fbb_.AddOffset(Blob::VT_DIMS, dims); + } +- void add_dataFormat(MNN_DATA_FORMAT dataFormat) { ++ void add_dataFormat(MNN::MNN_DATA_FORMAT dataFormat) { + fbb_.AddElement(Blob::VT_DATAFORMAT, static_cast(dataFormat), 0); + } +- void add_dataType(DataType dataType) { ++ void add_dataType(MNN::DataType dataType) { + fbb_.AddElement(Blob::VT_DATATYPE, static_cast(dataType), 1); + } + void add_uint8s(flatbuffers::Offset> uint8s) { +@@ -188,7 +191,6 @@ struct BlobBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BlobBuilder &operator=(const BlobBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -199,8 +201,8 @@ struct BlobBuilder { + inline flatbuffers::Offset CreateBlob( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> dims = 0, +- MNN_DATA_FORMAT dataFormat = MNN_DATA_FORMAT_NCHW, +- DataType dataType = DataType_DT_FLOAT, ++ MNN::MNN_DATA_FORMAT dataFormat = MNN::MNN_DATA_FORMAT_NCHW, ++ MNN::DataType dataType = MNN::DataType_DT_FLOAT, + flatbuffers::Offset> uint8s = 0, + flatbuffers::Offset> int8s = 0, + flatbuffers::Offset> int32s = 0, +@@ -223,8 +225,8 @@ inline flatbuffers::Offset CreateBlob( + inline flatbuffers::Offset CreateBlobDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *dims = nullptr, +- MNN_DATA_FORMAT dataFormat = MNN_DATA_FORMAT_NCHW, +- DataType dataType = DataType_DT_FLOAT, ++ MNN::MNN_DATA_FORMAT dataFormat = MNN::MNN_DATA_FORMAT_NCHW, ++ MNN::DataType dataType = MNN::DataType_DT_FLOAT, + const std::vector *uint8s = nullptr, + const std::vector *int8s = nullptr, + const std::vector *int32s = nullptr, +@@ -255,17 +257,16 @@ flatbuffers::Offset CreateBlob(flatbuffers::FlatBufferBuilder &_fbb, const + + struct ListValueT : public flatbuffers::NativeTable { + typedef ListValue TableType; +- std::vector s; +- std::vector i; +- std::vector f; +- std::vector b; +- std::vector type; +- ListValueT() { +- } ++ std::vector s{}; ++ std::vector i{}; ++ std::vector f{}; ++ std::vector b{}; ++ std::vector type{}; + }; + + struct ListValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ListValueT NativeTableType; ++ typedef ListValueBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ListValueTypeTable(); + } +@@ -312,6 +313,7 @@ struct ListValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ListValueBuilder { ++ typedef ListValue Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_s(flatbuffers::Offset>> s) { +@@ -333,7 +335,6 @@ struct ListValueBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ListValueBuilder &operator=(const ListValueBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -382,25 +383,20 @@ flatbuffers::Offset CreateListValue(flatbuffers::FlatBufferBuilder &_ + + struct AttributeT : public flatbuffers::NativeTable { + typedef Attribute TableType; +- std::string s; +- int32_t i; +- bool b; +- std::string key; +- DataType type; +- float f; +- std::unique_ptr tensor; +- std::unique_ptr list; +- std::unique_ptr func; +- AttributeT() +- : i(0), +- b(false), +- type(DataType_DT_INVALID), +- f(0.0f) { +- } ++ std::string s{}; ++ int32_t i = 0; ++ bool b = false; ++ std::string key{}; ++ MNN::DataType type = MNN::DataType_DT_INVALID; ++ float f = 0.0f; ++ std::unique_ptr tensor{}; ++ std::unique_ptr list{}; ++ std::unique_ptr func{}; + }; + + struct Attribute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AttributeT NativeTableType; ++ typedef AttributeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return AttributeTypeTable(); + } +@@ -427,20 +423,20 @@ struct Attribute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::String *key() const { + return GetPointer(VT_KEY); + } +- DataType type() const { +- return static_cast(GetField(VT_TYPE, 0)); ++ MNN::DataType type() const { ++ return static_cast(GetField(VT_TYPE, 0)); + } + float f() const { + return GetField(VT_F, 0.0f); + } +- const Blob *tensor() const { +- return GetPointer(VT_TENSOR); ++ const MNN::Blob *tensor() const { ++ return GetPointer(VT_TENSOR); + } +- const ListValue *list() const { +- return GetPointer(VT_LIST); ++ const MNN::ListValue *list() const { ++ return GetPointer(VT_LIST); + } +- const NamedAttrList *func() const { +- return GetPointer(VT_FUNC); ++ const MNN::NamedAttrList *func() const { ++ return GetPointer(VT_FUNC); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -466,6 +462,7 @@ struct Attribute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct AttributeBuilder { ++ typedef Attribute Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_s(flatbuffers::Offset s) { +@@ -480,26 +477,25 @@ struct AttributeBuilder { + void add_key(flatbuffers::Offset key) { + fbb_.AddOffset(Attribute::VT_KEY, key); + } +- void add_type(DataType type) { ++ void add_type(MNN::DataType type) { + fbb_.AddElement(Attribute::VT_TYPE, static_cast(type), 0); + } + void add_f(float f) { + fbb_.AddElement(Attribute::VT_F, f, 0.0f); + } +- void add_tensor(flatbuffers::Offset tensor) { ++ void add_tensor(flatbuffers::Offset tensor) { + fbb_.AddOffset(Attribute::VT_TENSOR, tensor); + } +- void add_list(flatbuffers::Offset list) { ++ void add_list(flatbuffers::Offset list) { + fbb_.AddOffset(Attribute::VT_LIST, list); + } +- void add_func(flatbuffers::Offset func) { ++ void add_func(flatbuffers::Offset func) { + fbb_.AddOffset(Attribute::VT_FUNC, func); + } + explicit AttributeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- AttributeBuilder &operator=(const AttributeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -513,11 +509,11 @@ inline flatbuffers::Offset CreateAttribute( + int32_t i = 0, + bool b = false, + flatbuffers::Offset key = 0, +- DataType type = DataType_DT_INVALID, ++ MNN::DataType type = MNN::DataType_DT_INVALID, + float f = 0.0f, +- flatbuffers::Offset tensor = 0, +- flatbuffers::Offset list = 0, +- flatbuffers::Offset func = 0) { ++ flatbuffers::Offset tensor = 0, ++ flatbuffers::Offset list = 0, ++ flatbuffers::Offset func = 0) { + AttributeBuilder builder_(_fbb); + builder_.add_func(func); + builder_.add_list(list); +@@ -537,11 +533,11 @@ inline flatbuffers::Offset CreateAttributeDirect( + int32_t i = 0, + bool b = false, + const char *key = nullptr, +- DataType type = DataType_DT_INVALID, ++ MNN::DataType type = MNN::DataType_DT_INVALID, + float f = 0.0f, +- flatbuffers::Offset tensor = 0, +- flatbuffers::Offset list = 0, +- flatbuffers::Offset func = 0) { ++ flatbuffers::Offset tensor = 0, ++ flatbuffers::Offset list = 0, ++ flatbuffers::Offset func = 0) { + auto s__ = s ? _fbb.CreateString(s) : 0; + auto key__ = key ? _fbb.CreateString(key) : 0; + return MNN::CreateAttribute( +@@ -561,14 +557,13 @@ flatbuffers::Offset CreateAttribute(flatbuffers::FlatBufferBuilder &_ + + struct NamedAttrListT : public flatbuffers::NativeTable { + typedef NamedAttrList TableType; +- std::string name; +- std::vector> attr; +- NamedAttrListT() { +- } ++ std::string name{}; ++ std::vector> attr{}; + }; + + struct NamedAttrList FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NamedAttrListT NativeTableType; ++ typedef NamedAttrListBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return NamedAttrListTypeTable(); + } +@@ -579,8 +574,8 @@ struct NamedAttrList FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } +- const flatbuffers::Vector> *attr() const { +- return GetPointer> *>(VT_ATTR); ++ const flatbuffers::Vector> *attr() const { ++ return GetPointer> *>(VT_ATTR); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -597,19 +592,19 @@ struct NamedAttrList FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct NamedAttrListBuilder { ++ typedef NamedAttrList Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(NamedAttrList::VT_NAME, name); + } +- void add_attr(flatbuffers::Offset>> attr) { ++ void add_attr(flatbuffers::Offset>> attr) { + fbb_.AddOffset(NamedAttrList::VT_ATTR, attr); + } + explicit NamedAttrListBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- NamedAttrListBuilder &operator=(const NamedAttrListBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -620,7 +615,7 @@ struct NamedAttrListBuilder { + inline flatbuffers::Offset CreateNamedAttrList( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, +- flatbuffers::Offset>> attr = 0) { ++ flatbuffers::Offset>> attr = 0) { + NamedAttrListBuilder builder_(_fbb); + builder_.add_attr(attr); + builder_.add_name(name); +@@ -630,9 +625,9 @@ inline flatbuffers::Offset CreateNamedAttrList( + inline flatbuffers::Offset CreateNamedAttrListDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, +- const std::vector> *attr = nullptr) { ++ const std::vector> *attr = nullptr) { + auto name__ = name ? _fbb.CreateString(name) : 0; +- auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; ++ auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; + return MNN::CreateNamedAttrList( + _fbb, + name__, +@@ -642,23 +637,23 @@ inline flatbuffers::Offset CreateNamedAttrListDirect( + flatbuffers::Offset CreateNamedAttrList(flatbuffers::FlatBufferBuilder &_fbb, const NamedAttrListT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + inline BlobT *Blob::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BlobT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BlobT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Blob::UnPackTo(BlobT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; +- { auto _e = dataFormat(); _o->dataFormat = _e; }; +- { auto _e = dataType(); _o->dataType = _e; }; +- { auto _e = uint8s(); if (_e) { _o->uint8s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->uint8s[_i] = _e->Get(_i); } } }; +- { auto _e = int8s(); if (_e) { _o->int8s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int8s[_i] = _e->Get(_i); } } }; +- { auto _e = int32s(); if (_e) { _o->int32s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int32s[_i] = _e->Get(_i); } } }; +- { auto _e = int64s(); if (_e) { _o->int64s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int64s[_i] = _e->Get(_i); } } }; +- { auto _e = float32s(); if (_e) { _o->float32s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->float32s[_i] = _e->Get(_i); } } }; +- { auto _e = strings(); if (_e) { _o->strings.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->strings[_i] = _e->Get(_i)->str(); } } }; ++ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } ++ { auto _e = dataFormat(); _o->dataFormat = _e; } ++ { auto _e = dataType(); _o->dataType = _e; } ++ { auto _e = uint8s(); if (_e) { _o->uint8s.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->uint8s.begin()); } } ++ { auto _e = int8s(); if (_e) { _o->int8s.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->int8s.begin()); } } ++ { auto _e = int32s(); if (_e) { _o->int32s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int32s[_i] = _e->Get(_i); } } } ++ { auto _e = int64s(); if (_e) { _o->int64s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int64s[_i] = _e->Get(_i); } } } ++ { auto _e = float32s(); if (_e) { _o->float32s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->float32s[_i] = _e->Get(_i); } } } ++ { auto _e = strings(); if (_e) { _o->strings.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->strings[_i] = _e->Get(_i)->str(); } } } + } + + inline flatbuffers::Offset Blob::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BlobT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -692,19 +687,19 @@ inline flatbuffers::Offset CreateBlob(flatbuffers::FlatBufferBuilder &_fbb + } + + inline ListValueT *ListValue::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ListValueT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ListValueT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ListValue::UnPackTo(ListValueT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = s(); if (_e) { _o->s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->s[_i] = _e->Get(_i)->str(); } } }; +- { auto _e = i(); if (_e) { _o->i.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->i[_i] = _e->Get(_i); } } }; +- { auto _e = f(); if (_e) { _o->f.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->f[_i] = _e->Get(_i); } } }; +- { auto _e = b(); if (_e) { _o->b.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->b[_i] = _e->Get(_i) != 0; } } }; +- { auto _e = type(); if (_e) { _o->type.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->type[_i] = static_cast(_e->Get(_i)); } } }; ++ { auto _e = s(); if (_e) { _o->s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->s[_i] = _e->Get(_i)->str(); } } } ++ { auto _e = i(); if (_e) { _o->i.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->i[_i] = _e->Get(_i); } } } ++ { auto _e = f(); if (_e) { _o->f.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->f[_i] = _e->Get(_i); } } } ++ { auto _e = b(); if (_e) { _o->b.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->b[_i] = _e->Get(_i) != 0; } } } ++ { auto _e = type(); if (_e) { _o->type.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->type[_i] = static_cast(_e->Get(_i)); } } } + } + + inline flatbuffers::Offset ListValue::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ListValueT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -730,23 +725,23 @@ inline flatbuffers::Offset CreateListValue(flatbuffers::FlatBufferBui + } + + inline AttributeT *Attribute::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new AttributeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new AttributeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Attribute::UnPackTo(AttributeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = s(); if (_e) _o->s = _e->str(); }; +- { auto _e = i(); _o->i = _e; }; +- { auto _e = b(); _o->b = _e; }; +- { auto _e = key(); if (_e) _o->key = _e->str(); }; +- { auto _e = type(); _o->type = _e; }; +- { auto _e = f(); _o->f = _e; }; +- { auto _e = tensor(); if (_e) _o->tensor = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = list(); if (_e) _o->list = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = func(); if (_e) _o->func = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = s(); if (_e) _o->s = _e->str(); } ++ { auto _e = i(); _o->i = _e; } ++ { auto _e = b(); _o->b = _e; } ++ { auto _e = key(); if (_e) _o->key = _e->str(); } ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = f(); _o->f = _e; } ++ { auto _e = tensor(); if (_e) _o->tensor = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = list(); if (_e) _o->list = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = func(); if (_e) _o->func = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset Attribute::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AttributeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -780,16 +775,16 @@ inline flatbuffers::Offset CreateAttribute(flatbuffers::FlatBufferBui + } + + inline NamedAttrListT *NamedAttrList::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new NamedAttrListT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new NamedAttrListT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void NamedAttrList::UnPackTo(NamedAttrListT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = name(); if (_e) _o->name = _e->str(); }; +- { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; ++ { auto _e = name(); if (_e) _o->name = _e->str(); } ++ { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset NamedAttrList::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NamedAttrListT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -801,7 +796,7 @@ inline flatbuffers::Offset CreateNamedAttrList(flatbuffers::FlatB + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NamedAttrListT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); +- auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; ++ auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; + return MNN::CreateNamedAttrList( + _fbb, + _name, +@@ -817,7 +812,7 @@ inline const flatbuffers::TypeTable *MNN_DATA_FORMATTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- MNN_DATA_FORMATTypeTable ++ MNN::MNN_DATA_FORMATTypeTable + }; + static const char * const names[] = { + "NCHW", +@@ -827,7 +822,7 @@ inline const flatbuffers::TypeTable *MNN_DATA_FORMATTypeTable() { + "UNKNOWN" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -845,8 +840,8 @@ inline const flatbuffers::TypeTable *BlobTypeTable() { + { flatbuffers::ET_STRING, 1, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- MNN_DATA_FORMATTypeTable, +- DataTypeTypeTable ++ MNN::MNN_DATA_FORMATTypeTable, ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "dims", +@@ -860,7 +855,7 @@ inline const flatbuffers::TypeTable *BlobTypeTable() { + "strings" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -874,7 +869,7 @@ inline const flatbuffers::TypeTable *ListValueTypeTable() { + { flatbuffers::ET_INT, 1, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "s", +@@ -884,7 +879,7 @@ inline const flatbuffers::TypeTable *ListValueTypeTable() { + "type" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -902,10 +897,10 @@ inline const flatbuffers::TypeTable *AttributeTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 3 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable, +- BlobTypeTable, +- ListValueTypeTable, +- NamedAttrListTypeTable ++ MNN::DataTypeTypeTable, ++ MNN::BlobTypeTable, ++ MNN::ListValueTypeTable, ++ MNN::NamedAttrListTypeTable + }; + static const char * const names[] = { + "s", +@@ -919,7 +914,7 @@ inline const flatbuffers::TypeTable *AttributeTypeTable() { + "func" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -930,14 +925,14 @@ inline const flatbuffers::TypeTable *NamedAttrListTypeTable() { + { flatbuffers::ET_SEQUENCE, 1, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- AttributeTypeTable ++ MNN::AttributeTypeTable + }; + static const char * const names[] = { + "name", + "attr" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +diff --git a/schema/current/TensorflowOp_generated.h b/schema/current/TensorflowOp_generated.h +index 3427a03a..b75296e2 100644 +--- a/schema/current/TensorflowOp_generated.h ++++ b/schema/current/TensorflowOp_generated.h +@@ -4,118 +4,155 @@ + #ifndef FLATBUFFERS_GENERATED_TENSORFLOWOP_MNN_H_ + #define FLATBUFFERS_GENERATED_TENSORFLOWOP_MNN_H_ + ++#include "flatbuffers/flatbuffers.h" + +-#include "Tensor_generated.h" + #include "Type_generated.h" ++#include "Tensor_generated.h" + + namespace MNN { + + struct BinaryOp; ++struct BinaryOpBuilder; + struct BinaryOpT; + + struct PackParam; ++struct PackParamBuilder; + struct PackParamT; + + struct StridedSliceParam; ++struct StridedSliceParamBuilder; + struct StridedSliceParamT; + + struct SqueezeParam; ++struct SqueezeParamBuilder; + struct SqueezeParamT; + + struct CastParam; ++struct CastParamBuilder; + struct CastParamT; + + struct ReductionParam; ++struct ReductionParamBuilder; + struct ReductionParamT; + + struct Gather; ++struct GatherBuilder; + struct GatherT; + + struct ExpandDims; ++struct ExpandDimsBuilder; + struct ExpandDimsT; + + struct Selu; ++struct SeluBuilder; + struct SeluT; + + struct AsString; ++struct AsStringBuilder; + struct AsStringT; + + struct ReduceJoin; ++struct ReduceJoinBuilder; + struct ReduceJoinT; + + struct UnaryOp; ++struct UnaryOpBuilder; + struct UnaryOpT; + + struct TopKV2; ++struct TopKV2Builder; + struct TopKV2T; + + struct CropAndResize; ++struct CropAndResizeBuilder; + struct CropAndResizeT; + + struct Fill; ++struct FillBuilder; + struct FillT; + + struct GatherV2; ++struct GatherV2Builder; + struct GatherV2T; + + struct NonMaxSuppressionV2; ++struct NonMaxSuppressionV2Builder; + struct NonMaxSuppressionV2T; + + struct Range; ++struct RangeBuilder; + struct RangeT; + + struct Rank; ++struct RankBuilder; + struct RankT; + + struct Size; ++struct SizeBuilder; + struct SizeT; + + struct Transpose; ++struct TransposeBuilder; + struct TransposeT; + + struct SliceTf; ++struct SliceTfBuilder; + struct SliceTfT; + + struct QuantizeMaxMin; ++struct QuantizeMaxMinBuilder; + struct QuantizeMaxMinT; + + struct Crop; ++struct CropBuilder; + struct CropT; + + struct SpaceBatch; ++struct SpaceBatchBuilder; + struct SpaceBatchT; + + struct MatMul; ++struct MatMulBuilder; + struct MatMulT; + + struct MomentsParam; ++struct MomentsParamBuilder; + struct MomentsParamT; + + struct RNNParam; ++struct RNNParamBuilder; + struct RNNParamT; + + struct BatchMatMulParam; ++struct BatchMatMulParamBuilder; + struct BatchMatMulParamT; + + struct DepthSpaceParam; ++struct DepthSpaceParamBuilder; + struct DepthSpaceParamT; + + struct ReverseSequenceParam; ++struct ReverseSequenceParamBuilder; + struct ReverseSequenceParamT; + + struct DetectionPostProcessParam; ++struct DetectionPostProcessParamBuilder; + struct DetectionPostProcessParamT; + + struct OneHotParam; ++struct OneHotParamBuilder; + struct OneHotParamT; + + struct PadParam; ++struct PadParamBuilder; + struct PadParamT; + + struct LayerNorm; ++struct LayerNormBuilder; + struct LayerNormT; + + struct RandomUniform; ++struct RandomUniformBuilder; + struct RandomUniformT; + + inline const flatbuffers::TypeTable *BinaryOpTypeTable(); +@@ -190,7 +227,7 @@ inline const flatbuffers::TypeTable *LayerNormTypeTable(); + + inline const flatbuffers::TypeTable *RandomUniformTypeTable(); + +-enum BinaryOpOperation { ++enum BinaryOpOperation : int8_t { + BinaryOpOperation_ADD = 0, + BinaryOpOperation_SUB = 1, + BinaryOpOperation_MUL = 2, +@@ -246,7 +283,7 @@ inline const BinaryOpOperation (&EnumValuesBinaryOpOperation())[22] { + } + + inline const char * const *EnumNamesBinaryOpOperation() { +- static const char * const names[] = { ++ static const char * const names[24] = { + "ADD", + "SUB", + "MUL", +@@ -276,12 +313,12 @@ inline const char * const *EnumNamesBinaryOpOperation() { + } + + inline const char *EnumNameBinaryOpOperation(BinaryOpOperation e) { +- if (e < BinaryOpOperation_ADD || e > BinaryOpOperation_NOTEQUAL) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, BinaryOpOperation_ADD, BinaryOpOperation_NOTEQUAL)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesBinaryOpOperation()[index]; + } + +-enum ReductionType { ++enum ReductionType : int8_t { + ReductionType_SUM = 0, + ReductionType_ASUM = 1, + ReductionType_SUMSQ = 2, +@@ -311,7 +348,7 @@ inline const ReductionType (&EnumValuesReductionType())[9] { + } + + inline const char * const *EnumNamesReductionType() { +- static const char * const names[] = { ++ static const char * const names[10] = { + "SUM", + "ASUM", + "SUMSQ", +@@ -327,12 +364,12 @@ inline const char * const *EnumNamesReductionType() { + } + + inline const char *EnumNameReductionType(ReductionType e) { +- if (e < ReductionType_SUM || e > ReductionType_ALL) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, ReductionType_SUM, ReductionType_ALL)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesReductionType()[index]; + } + +-enum UnaryOpOperation { ++enum UnaryOpOperation : int32_t { + UnaryOpOperation_ABS = 0, + UnaryOpOperation_NEG = 1, + UnaryOpOperation_FLOOR = 2, +@@ -406,7 +443,7 @@ inline const UnaryOpOperation (&EnumValuesUnaryOpOperation())[31] { + } + + inline const char * const *EnumNamesUnaryOpOperation() { +- static const char * const names[] = { ++ static const char * const names[32] = { + "ABS", + "NEG", + "FLOOR", +@@ -444,12 +481,12 @@ inline const char * const *EnumNamesUnaryOpOperation() { + } + + inline const char *EnumNameUnaryOpOperation(UnaryOpOperation e) { +- if (e < UnaryOpOperation_ABS || e > UnaryOpOperation_TANH) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, UnaryOpOperation_ABS, UnaryOpOperation_TANH)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesUnaryOpOperation()[index]; + } + +-enum CropAndResizeMethod { ++enum CropAndResizeMethod : int8_t { + CropAndResizeMethod_BILINEAR = 0, + CropAndResizeMethod_NEAREST = 1, + CropAndResizeMethod_MIN = CropAndResizeMethod_BILINEAR, +@@ -465,7 +502,7 @@ inline const CropAndResizeMethod (&EnumValuesCropAndResizeMethod())[2] { + } + + inline const char * const *EnumNamesCropAndResizeMethod() { +- static const char * const names[] = { ++ static const char * const names[3] = { + "BILINEAR", + "NEAREST", + nullptr +@@ -474,12 +511,12 @@ inline const char * const *EnumNamesCropAndResizeMethod() { + } + + inline const char *EnumNameCropAndResizeMethod(CropAndResizeMethod e) { +- if (e < CropAndResizeMethod_BILINEAR || e > CropAndResizeMethod_NEAREST) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, CropAndResizeMethod_BILINEAR, CropAndResizeMethod_NEAREST)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesCropAndResizeMethod()[index]; + } + +-enum DepthToSpaceMode { ++enum DepthToSpaceMode : int8_t { + DepthToSpaceMode_DCR = 0, + DepthToSpaceMode_CRD = 1, + DepthToSpaceMode_MIN = DepthToSpaceMode_DCR, +@@ -495,7 +532,7 @@ inline const DepthToSpaceMode (&EnumValuesDepthToSpaceMode())[2] { + } + + inline const char * const *EnumNamesDepthToSpaceMode() { +- static const char * const names[] = { ++ static const char * const names[3] = { + "DCR", + "CRD", + nullptr +@@ -504,12 +541,12 @@ inline const char * const *EnumNamesDepthToSpaceMode() { + } + + inline const char *EnumNameDepthToSpaceMode(DepthToSpaceMode e) { +- if (e < DepthToSpaceMode_DCR || e > DepthToSpaceMode_CRD) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, DepthToSpaceMode_DCR, DepthToSpaceMode_CRD)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesDepthToSpaceMode()[index]; + } + +-enum PadValueMode { ++enum PadValueMode : int8_t { + PadValueMode_CONSTANT = 0, + PadValueMode_REFLECT = 1, + PadValueMode_SYMMETRIC = 2, +@@ -527,7 +564,7 @@ inline const PadValueMode (&EnumValuesPadValueMode())[3] { + } + + inline const char * const *EnumNamesPadValueMode() { +- static const char * const names[] = { ++ static const char * const names[4] = { + "CONSTANT", + "REFLECT", + "SYMMETRIC", +@@ -537,23 +574,20 @@ inline const char * const *EnumNamesPadValueMode() { + } + + inline const char *EnumNamePadValueMode(PadValueMode e) { +- if (e < PadValueMode_CONSTANT || e > PadValueMode_SYMMETRIC) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, PadValueMode_CONSTANT, PadValueMode_SYMMETRIC)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesPadValueMode()[index]; + } + + struct BinaryOpT : public flatbuffers::NativeTable { + typedef BinaryOp TableType; +- int32_t opType; +- DataType T; +- BinaryOpT() +- : opType(0), +- T(DataType_DT_FLOAT) { +- } ++ int32_t opType = 0; ++ MNN::DataType T = MNN::DataType_DT_FLOAT; + }; + + struct BinaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BinaryOpT NativeTableType; ++ typedef BinaryOpBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return BinaryOpTypeTable(); + } +@@ -564,8 +598,8 @@ struct BinaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t opType() const { + return GetField(VT_OPTYPE, 0); + } +- DataType T() const { +- return static_cast(GetField(VT_T, 1)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 1)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -579,19 +613,19 @@ struct BinaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BinaryOpBuilder { ++ typedef BinaryOp Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_opType(int32_t opType) { + fbb_.AddElement(BinaryOp::VT_OPTYPE, opType, 0); + } +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(BinaryOp::VT_T, static_cast(T), 1); + } + explicit BinaryOpBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BinaryOpBuilder &operator=(const BinaryOpBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -602,7 +636,7 @@ struct BinaryOpBuilder { + inline flatbuffers::Offset CreateBinaryOp( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t opType = 0, +- DataType T = DataType_DT_FLOAT) { ++ MNN::DataType T = MNN::DataType_DT_FLOAT) { + BinaryOpBuilder builder_(_fbb); + builder_.add_T(T); + builder_.add_opType(opType); +@@ -613,16 +647,13 @@ flatbuffers::Offset CreateBinaryOp(flatbuffers::FlatBufferBuilder &_fb + + struct PackParamT : public flatbuffers::NativeTable { + typedef PackParam TableType; +- DataType dataType; +- int32_t axis; +- PackParamT() +- : dataType(DataType_DT_INVALID), +- axis(0) { +- } ++ MNN::DataType dataType = MNN::DataType_DT_INVALID; ++ int32_t axis = 0; + }; + + struct PackParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PackParamT NativeTableType; ++ typedef PackParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return PackParamTypeTable(); + } +@@ -630,8 +661,8 @@ struct PackParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_DATATYPE = 4, + VT_AXIS = 6 + }; +- DataType dataType() const { +- return static_cast(GetField(VT_DATATYPE, 0)); ++ MNN::DataType dataType() const { ++ return static_cast(GetField(VT_DATATYPE, 0)); + } + int32_t axis() const { + return GetField(VT_AXIS, 0); +@@ -648,9 +679,10 @@ struct PackParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PackParamBuilder { ++ typedef PackParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_dataType(DataType dataType) { ++ void add_dataType(MNN::DataType dataType) { + fbb_.AddElement(PackParam::VT_DATATYPE, static_cast(dataType), 0); + } + void add_axis(int32_t axis) { +@@ -660,7 +692,6 @@ struct PackParamBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PackParamBuilder &operator=(const PackParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -670,7 +701,7 @@ struct PackParamBuilder { + + inline flatbuffers::Offset CreatePackParam( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType dataType = DataType_DT_INVALID, ++ MNN::DataType dataType = MNN::DataType_DT_INVALID, + int32_t axis = 0) { + PackParamBuilder builder_(_fbb); + builder_.add_axis(axis); +@@ -682,26 +713,18 @@ flatbuffers::Offset CreatePackParam(flatbuffers::FlatBufferBuilder &_ + + struct StridedSliceParamT : public flatbuffers::NativeTable { + typedef StridedSliceParam TableType; +- DataType Index; +- DataType T; +- int32_t beginMask; +- int32_t endMask; +- int32_t ellipsisMask; +- int32_t newAxisMask; +- int32_t shrinkAxisMask; +- StridedSliceParamT() +- : Index(DataType_DT_INVALID), +- T(DataType_DT_INVALID), +- beginMask(0), +- endMask(0), +- ellipsisMask(0), +- newAxisMask(0), +- shrinkAxisMask(0) { +- } ++ MNN::DataType Index = MNN::DataType_DT_INVALID; ++ MNN::DataType T = MNN::DataType_DT_INVALID; ++ int32_t beginMask = 0; ++ int32_t endMask = 0; ++ int32_t ellipsisMask = 0; ++ int32_t newAxisMask = 0; ++ int32_t shrinkAxisMask = 0; + }; + + struct StridedSliceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StridedSliceParamT NativeTableType; ++ typedef StridedSliceParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return StridedSliceParamTypeTable(); + } +@@ -714,11 +737,11 @@ struct StridedSliceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_NEWAXISMASK = 14, + VT_SHRINKAXISMASK = 16 + }; +- DataType Index() const { +- return static_cast(GetField(VT_INDEX, 0)); ++ MNN::DataType Index() const { ++ return static_cast(GetField(VT_INDEX, 0)); + } +- DataType T() const { +- return static_cast(GetField(VT_T, 0)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 0)); + } + int32_t beginMask() const { + return GetField(VT_BEGINMASK, 0); +@@ -752,12 +775,13 @@ struct StridedSliceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct StridedSliceParamBuilder { ++ typedef StridedSliceParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_Index(DataType Index) { ++ void add_Index(MNN::DataType Index) { + fbb_.AddElement(StridedSliceParam::VT_INDEX, static_cast(Index), 0); + } +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(StridedSliceParam::VT_T, static_cast(T), 0); + } + void add_beginMask(int32_t beginMask) { +@@ -779,7 +803,6 @@ struct StridedSliceParamBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- StridedSliceParamBuilder &operator=(const StridedSliceParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -789,8 +812,8 @@ struct StridedSliceParamBuilder { + + inline flatbuffers::Offset CreateStridedSliceParam( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType Index = DataType_DT_INVALID, +- DataType T = DataType_DT_INVALID, ++ MNN::DataType Index = MNN::DataType_DT_INVALID, ++ MNN::DataType T = MNN::DataType_DT_INVALID, + int32_t beginMask = 0, + int32_t endMask = 0, + int32_t ellipsisMask = 0, +@@ -811,13 +834,12 @@ flatbuffers::Offset CreateStridedSliceParam(flatbuffers::Flat + + struct SqueezeParamT : public flatbuffers::NativeTable { + typedef SqueezeParam TableType; +- std::vector squeezeDims; +- SqueezeParamT() { +- } ++ std::vector squeezeDims{}; + }; + + struct SqueezeParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SqueezeParamT NativeTableType; ++ typedef SqueezeParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return SqueezeParamTypeTable(); + } +@@ -839,6 +861,7 @@ struct SqueezeParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SqueezeParamBuilder { ++ typedef SqueezeParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_squeezeDims(flatbuffers::Offset> squeezeDims) { +@@ -848,7 +871,6 @@ struct SqueezeParamBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SqueezeParamBuilder &operator=(const SqueezeParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -877,16 +899,13 @@ flatbuffers::Offset CreateSqueezeParam(flatbuffers::FlatBufferBuil + + struct CastParamT : public flatbuffers::NativeTable { + typedef CastParam TableType; +- DataType srcT; +- DataType dstT; +- CastParamT() +- : srcT(DataType_DT_INVALID), +- dstT(DataType_DT_INVALID) { +- } ++ MNN::DataType srcT = MNN::DataType_DT_INVALID; ++ MNN::DataType dstT = MNN::DataType_DT_INVALID; + }; + + struct CastParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CastParamT NativeTableType; ++ typedef CastParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return CastParamTypeTable(); + } +@@ -894,11 +913,11 @@ struct CastParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_SRCT = 4, + VT_DSTT = 6 + }; +- DataType srcT() const { +- return static_cast(GetField(VT_SRCT, 0)); ++ MNN::DataType srcT() const { ++ return static_cast(GetField(VT_SRCT, 0)); + } +- DataType dstT() const { +- return static_cast(GetField(VT_DSTT, 0)); ++ MNN::DataType dstT() const { ++ return static_cast(GetField(VT_DSTT, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -912,19 +931,19 @@ struct CastParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CastParamBuilder { ++ typedef CastParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_srcT(DataType srcT) { ++ void add_srcT(MNN::DataType srcT) { + fbb_.AddElement(CastParam::VT_SRCT, static_cast(srcT), 0); + } +- void add_dstT(DataType dstT) { ++ void add_dstT(MNN::DataType dstT) { + fbb_.AddElement(CastParam::VT_DSTT, static_cast(dstT), 0); + } + explicit CastParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CastParamBuilder &operator=(const CastParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -934,8 +953,8 @@ struct CastParamBuilder { + + inline flatbuffers::Offset CreateCastParam( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType srcT = DataType_DT_INVALID, +- DataType dstT = DataType_DT_INVALID) { ++ MNN::DataType srcT = MNN::DataType_DT_INVALID, ++ MNN::DataType dstT = MNN::DataType_DT_INVALID) { + CastParamBuilder builder_(_fbb); + builder_.add_dstT(dstT); + builder_.add_srcT(srcT); +@@ -946,21 +965,16 @@ flatbuffers::Offset CreateCastParam(flatbuffers::FlatBufferBuilder &_ + + struct ReductionParamT : public flatbuffers::NativeTable { + typedef ReductionParam TableType; +- ReductionType operation; +- std::vector dim; +- float coeff; +- bool keepDims; +- DataType dType; +- ReductionParamT() +- : operation(ReductionType_SUM), +- coeff(0.0f), +- keepDims(false), +- dType(DataType_DT_FLOAT) { +- } ++ MNN::ReductionType operation = MNN::ReductionType_SUM; ++ std::vector dim{}; ++ float coeff = 0.0f; ++ bool keepDims = false; ++ MNN::DataType dType = MNN::DataType_DT_FLOAT; + }; + + struct ReductionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReductionParamT NativeTableType; ++ typedef ReductionParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ReductionParamTypeTable(); + } +@@ -971,8 +985,8 @@ struct ReductionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_KEEPDIMS = 10, + VT_DTYPE = 12 + }; +- ReductionType operation() const { +- return static_cast(GetField(VT_OPERATION, 0)); ++ MNN::ReductionType operation() const { ++ return static_cast(GetField(VT_OPERATION, 0)); + } + const flatbuffers::Vector *dim() const { + return GetPointer *>(VT_DIM); +@@ -983,8 +997,8 @@ struct ReductionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + bool keepDims() const { + return GetField(VT_KEEPDIMS, 0) != 0; + } +- DataType dType() const { +- return static_cast(GetField(VT_DTYPE, 1)); ++ MNN::DataType dType() const { ++ return static_cast(GetField(VT_DTYPE, 1)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1002,9 +1016,10 @@ struct ReductionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ReductionParamBuilder { ++ typedef ReductionParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_operation(ReductionType operation) { ++ void add_operation(MNN::ReductionType operation) { + fbb_.AddElement(ReductionParam::VT_OPERATION, static_cast(operation), 0); + } + void add_dim(flatbuffers::Offset> dim) { +@@ -1016,14 +1031,13 @@ struct ReductionParamBuilder { + void add_keepDims(bool keepDims) { + fbb_.AddElement(ReductionParam::VT_KEEPDIMS, static_cast(keepDims), 0); + } +- void add_dType(DataType dType) { ++ void add_dType(MNN::DataType dType) { + fbb_.AddElement(ReductionParam::VT_DTYPE, static_cast(dType), 1); + } + explicit ReductionParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReductionParamBuilder &operator=(const ReductionParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1033,11 +1047,11 @@ struct ReductionParamBuilder { + + inline flatbuffers::Offset CreateReductionParam( + flatbuffers::FlatBufferBuilder &_fbb, +- ReductionType operation = ReductionType_SUM, ++ MNN::ReductionType operation = MNN::ReductionType_SUM, + flatbuffers::Offset> dim = 0, + float coeff = 0.0f, + bool keepDims = false, +- DataType dType = DataType_DT_FLOAT) { ++ MNN::DataType dType = MNN::DataType_DT_FLOAT) { + ReductionParamBuilder builder_(_fbb); + builder_.add_dType(dType); + builder_.add_coeff(coeff); +@@ -1049,11 +1063,11 @@ inline flatbuffers::Offset CreateReductionParam( + + inline flatbuffers::Offset CreateReductionParamDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- ReductionType operation = ReductionType_SUM, ++ MNN::ReductionType operation = MNN::ReductionType_SUM, + const std::vector *dim = nullptr, + float coeff = 0.0f, + bool keepDims = false, +- DataType dType = DataType_DT_FLOAT) { ++ MNN::DataType dType = MNN::DataType_DT_FLOAT) { + auto dim__ = dim ? _fbb.CreateVector(*dim) : 0; + return MNN::CreateReductionParam( + _fbb, +@@ -1068,20 +1082,15 @@ flatbuffers::Offset CreateReductionParam(flatbuffers::FlatBuffer + + struct GatherT : public flatbuffers::NativeTable { + typedef Gather TableType; +- DataType Tindices; +- DataType Tparams; +- bool validateIndices; +- int32_t axis; +- GatherT() +- : Tindices(DataType_DT_INVALID), +- Tparams(DataType_DT_INVALID), +- validateIndices(false), +- axis(0) { +- } ++ MNN::DataType Tindices = MNN::DataType_DT_INVALID; ++ MNN::DataType Tparams = MNN::DataType_DT_INVALID; ++ bool validateIndices = false; ++ int32_t axis = 0; + }; + + struct Gather FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GatherT NativeTableType; ++ typedef GatherBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return GatherTypeTable(); + } +@@ -1091,11 +1100,11 @@ struct Gather FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_VALIDATEINDICES = 8, + VT_AXIS = 10 + }; +- DataType Tindices() const { +- return static_cast(GetField(VT_TINDICES, 0)); ++ MNN::DataType Tindices() const { ++ return static_cast(GetField(VT_TINDICES, 0)); + } +- DataType Tparams() const { +- return static_cast(GetField(VT_TPARAMS, 0)); ++ MNN::DataType Tparams() const { ++ return static_cast(GetField(VT_TPARAMS, 0)); + } + bool validateIndices() const { + return GetField(VT_VALIDATEINDICES, 0) != 0; +@@ -1117,12 +1126,13 @@ struct Gather FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GatherBuilder { ++ typedef Gather Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_Tindices(DataType Tindices) { ++ void add_Tindices(MNN::DataType Tindices) { + fbb_.AddElement(Gather::VT_TINDICES, static_cast(Tindices), 0); + } +- void add_Tparams(DataType Tparams) { ++ void add_Tparams(MNN::DataType Tparams) { + fbb_.AddElement(Gather::VT_TPARAMS, static_cast(Tparams), 0); + } + void add_validateIndices(bool validateIndices) { +@@ -1135,7 +1145,6 @@ struct GatherBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GatherBuilder &operator=(const GatherBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1145,8 +1154,8 @@ struct GatherBuilder { + + inline flatbuffers::Offset CreateGather( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType Tindices = DataType_DT_INVALID, +- DataType Tparams = DataType_DT_INVALID, ++ MNN::DataType Tindices = MNN::DataType_DT_INVALID, ++ MNN::DataType Tparams = MNN::DataType_DT_INVALID, + bool validateIndices = false, + int32_t axis = 0) { + GatherBuilder builder_(_fbb); +@@ -1161,18 +1170,14 @@ flatbuffers::Offset CreateGather(flatbuffers::FlatBufferBuilder &_fbb, c + + struct ExpandDimsT : public flatbuffers::NativeTable { + typedef ExpandDims TableType; +- DataType T; +- DataType Tdim; +- int32_t axis; +- ExpandDimsT() +- : T(DataType_DT_INVALID), +- Tdim(DataType_DT_INVALID), +- axis(0) { +- } ++ MNN::DataType T = MNN::DataType_DT_INVALID; ++ MNN::DataType Tdim = MNN::DataType_DT_INVALID; ++ int32_t axis = 0; + }; + + struct ExpandDims FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ExpandDimsT NativeTableType; ++ typedef ExpandDimsBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ExpandDimsTypeTable(); + } +@@ -1181,11 +1186,11 @@ struct ExpandDims FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_TDIM = 6, + VT_AXIS = 8 + }; +- DataType T() const { +- return static_cast(GetField(VT_T, 0)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 0)); + } +- DataType Tdim() const { +- return static_cast(GetField(VT_TDIM, 0)); ++ MNN::DataType Tdim() const { ++ return static_cast(GetField(VT_TDIM, 0)); + } + int32_t axis() const { + return GetField(VT_AXIS, 0); +@@ -1203,12 +1208,13 @@ struct ExpandDims FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ExpandDimsBuilder { ++ typedef ExpandDims Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(ExpandDims::VT_T, static_cast(T), 0); + } +- void add_Tdim(DataType Tdim) { ++ void add_Tdim(MNN::DataType Tdim) { + fbb_.AddElement(ExpandDims::VT_TDIM, static_cast(Tdim), 0); + } + void add_axis(int32_t axis) { +@@ -1218,7 +1224,6 @@ struct ExpandDimsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ExpandDimsBuilder &operator=(const ExpandDimsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1228,8 +1233,8 @@ struct ExpandDimsBuilder { + + inline flatbuffers::Offset CreateExpandDims( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType T = DataType_DT_INVALID, +- DataType Tdim = DataType_DT_INVALID, ++ MNN::DataType T = MNN::DataType_DT_INVALID, ++ MNN::DataType Tdim = MNN::DataType_DT_INVALID, + int32_t axis = 0) { + ExpandDimsBuilder builder_(_fbb); + builder_.add_axis(axis); +@@ -1242,16 +1247,13 @@ flatbuffers::Offset CreateExpandDims(flatbuffers::FlatBufferBuilder + + struct SeluT : public flatbuffers::NativeTable { + typedef Selu TableType; +- float scale; +- float alpha; +- SeluT() +- : scale(0.0f), +- alpha(0.0f) { +- } ++ float scale = 0.0f; ++ float alpha = 0.0f; + }; + + struct Selu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SeluT NativeTableType; ++ typedef SeluBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return SeluTypeTable(); + } +@@ -1277,6 +1279,7 @@ struct Selu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SeluBuilder { ++ typedef Selu Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_scale(float scale) { +@@ -1289,7 +1292,6 @@ struct SeluBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SeluBuilder &operator=(const SeluBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1311,23 +1313,17 @@ flatbuffers::Offset CreateSelu(flatbuffers::FlatBufferBuilder &_fbb, const + + struct AsStringT : public flatbuffers::NativeTable { + typedef AsString TableType; +- DataType T; +- int32_t precision; +- bool scientific; +- bool shortest; +- int32_t width; +- std::string fillString; +- AsStringT() +- : T(DataType_DT_INVALID), +- precision(0), +- scientific(false), +- shortest(false), +- width(0) { +- } ++ MNN::DataType T = MNN::DataType_DT_INVALID; ++ int32_t precision = 0; ++ bool scientific = false; ++ bool shortest = false; ++ int32_t width = 0; ++ std::string fillString{}; + }; + + struct AsString FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AsStringT NativeTableType; ++ typedef AsStringBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return AsStringTypeTable(); + } +@@ -1339,8 +1335,8 @@ struct AsString FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_WIDTH = 12, + VT_FILLSTRING = 14 + }; +- DataType T() const { +- return static_cast(GetField(VT_T, 0)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 0)); + } + int32_t precision() const { + return GetField(VT_PRECISION, 0); +@@ -1374,9 +1370,10 @@ struct AsString FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct AsStringBuilder { ++ typedef AsString Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(AsString::VT_T, static_cast(T), 0); + } + void add_precision(int32_t precision) { +@@ -1398,7 +1395,6 @@ struct AsStringBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- AsStringBuilder &operator=(const AsStringBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1408,7 +1404,7 @@ struct AsStringBuilder { + + inline flatbuffers::Offset CreateAsString( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType T = DataType_DT_INVALID, ++ MNN::DataType T = MNN::DataType_DT_INVALID, + int32_t precision = 0, + bool scientific = false, + bool shortest = false, +@@ -1426,7 +1422,7 @@ inline flatbuffers::Offset CreateAsString( + + inline flatbuffers::Offset CreateAsStringDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType T = DataType_DT_INVALID, ++ MNN::DataType T = MNN::DataType_DT_INVALID, + int32_t precision = 0, + bool scientific = false, + bool shortest = false, +@@ -1447,15 +1443,13 @@ flatbuffers::Offset CreateAsString(flatbuffers::FlatBufferBuilder &_fb + + struct ReduceJoinT : public flatbuffers::NativeTable { + typedef ReduceJoin TableType; +- bool keepDims; +- std::string separator; +- ReduceJoinT() +- : keepDims(false) { +- } ++ bool keepDims = false; ++ std::string separator{}; + }; + + struct ReduceJoin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReduceJoinT NativeTableType; ++ typedef ReduceJoinBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ReduceJoinTypeTable(); + } +@@ -1482,6 +1476,7 @@ struct ReduceJoin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ReduceJoinBuilder { ++ typedef ReduceJoin Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_keepDims(bool keepDims) { +@@ -1494,7 +1489,6 @@ struct ReduceJoinBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReduceJoinBuilder &operator=(const ReduceJoinBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1527,16 +1521,13 @@ flatbuffers::Offset CreateReduceJoin(flatbuffers::FlatBufferBuilder + + struct UnaryOpT : public flatbuffers::NativeTable { + typedef UnaryOp TableType; +- UnaryOpOperation opType; +- DataType T; +- UnaryOpT() +- : opType(UnaryOpOperation_ABS), +- T(DataType_DT_INVALID) { +- } ++ MNN::UnaryOpOperation opType = MNN::UnaryOpOperation_ABS; ++ MNN::DataType T = MNN::DataType_DT_INVALID; + }; + + struct UnaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnaryOpT NativeTableType; ++ typedef UnaryOpBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return UnaryOpTypeTable(); + } +@@ -1544,11 +1535,11 @@ struct UnaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_OPTYPE = 4, + VT_T = 6 + }; +- UnaryOpOperation opType() const { +- return static_cast(GetField(VT_OPTYPE, 0)); ++ MNN::UnaryOpOperation opType() const { ++ return static_cast(GetField(VT_OPTYPE, 0)); + } +- DataType T() const { +- return static_cast(GetField(VT_T, 0)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1562,19 +1553,19 @@ struct UnaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct UnaryOpBuilder { ++ typedef UnaryOp Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_opType(UnaryOpOperation opType) { ++ void add_opType(MNN::UnaryOpOperation opType) { + fbb_.AddElement(UnaryOp::VT_OPTYPE, static_cast(opType), 0); + } +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(UnaryOp::VT_T, static_cast(T), 0); + } + explicit UnaryOpBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- UnaryOpBuilder &operator=(const UnaryOpBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1584,8 +1575,8 @@ struct UnaryOpBuilder { + + inline flatbuffers::Offset CreateUnaryOp( + flatbuffers::FlatBufferBuilder &_fbb, +- UnaryOpOperation opType = UnaryOpOperation_ABS, +- DataType T = DataType_DT_INVALID) { ++ MNN::UnaryOpOperation opType = MNN::UnaryOpOperation_ABS, ++ MNN::DataType T = MNN::DataType_DT_INVALID) { + UnaryOpBuilder builder_(_fbb); + builder_.add_T(T); + builder_.add_opType(opType); +@@ -1596,16 +1587,13 @@ flatbuffers::Offset CreateUnaryOp(flatbuffers::FlatBufferBuilder &_fbb, + + struct TopKV2T : public flatbuffers::NativeTable { + typedef TopKV2 TableType; +- DataType T; +- bool sorted; +- TopKV2T() +- : T(DataType_DT_FLOAT), +- sorted(false) { +- } ++ MNN::DataType T = MNN::DataType_DT_FLOAT; ++ bool sorted = false; + }; + + struct TopKV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TopKV2T NativeTableType; ++ typedef TopKV2Builder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return TopKV2TypeTable(); + } +@@ -1613,8 +1601,8 @@ struct TopKV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_T = 4, + VT_SORTED = 6 + }; +- DataType T() const { +- return static_cast(GetField(VT_T, 1)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 1)); + } + bool sorted() const { + return GetField(VT_SORTED, 0) != 0; +@@ -1631,9 +1619,10 @@ struct TopKV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TopKV2Builder { ++ typedef TopKV2 Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(TopKV2::VT_T, static_cast(T), 1); + } + void add_sorted(bool sorted) { +@@ -1643,7 +1632,6 @@ struct TopKV2Builder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TopKV2Builder &operator=(const TopKV2Builder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1653,7 +1641,7 @@ struct TopKV2Builder { + + inline flatbuffers::Offset CreateTopKV2( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType T = DataType_DT_FLOAT, ++ MNN::DataType T = MNN::DataType_DT_FLOAT, + bool sorted = false) { + TopKV2Builder builder_(_fbb); + builder_.add_T(T); +@@ -1665,16 +1653,13 @@ flatbuffers::Offset CreateTopKV2(flatbuffers::FlatBufferBuilder &_fbb, c + + struct CropAndResizeT : public flatbuffers::NativeTable { + typedef CropAndResize TableType; +- float extrapolationValue; +- CropAndResizeMethod method; +- CropAndResizeT() +- : extrapolationValue(0.0f), +- method(CropAndResizeMethod_BILINEAR) { +- } ++ float extrapolationValue = 0.0f; ++ MNN::CropAndResizeMethod method = MNN::CropAndResizeMethod_BILINEAR; + }; + + struct CropAndResize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CropAndResizeT NativeTableType; ++ typedef CropAndResizeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return CropAndResizeTypeTable(); + } +@@ -1685,8 +1670,8 @@ struct CropAndResize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + float extrapolationValue() const { + return GetField(VT_EXTRAPOLATIONVALUE, 0.0f); + } +- CropAndResizeMethod method() const { +- return static_cast(GetField(VT_METHOD, 0)); ++ MNN::CropAndResizeMethod method() const { ++ return static_cast(GetField(VT_METHOD, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1700,19 +1685,19 @@ struct CropAndResize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CropAndResizeBuilder { ++ typedef CropAndResize Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_extrapolationValue(float extrapolationValue) { + fbb_.AddElement(CropAndResize::VT_EXTRAPOLATIONVALUE, extrapolationValue, 0.0f); + } +- void add_method(CropAndResizeMethod method) { ++ void add_method(MNN::CropAndResizeMethod method) { + fbb_.AddElement(CropAndResize::VT_METHOD, static_cast(method), 0); + } + explicit CropAndResizeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CropAndResizeBuilder &operator=(const CropAndResizeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1723,7 +1708,7 @@ struct CropAndResizeBuilder { + inline flatbuffers::Offset CreateCropAndResize( + flatbuffers::FlatBufferBuilder &_fbb, + float extrapolationValue = 0.0f, +- CropAndResizeMethod method = CropAndResizeMethod_BILINEAR) { ++ MNN::CropAndResizeMethod method = MNN::CropAndResizeMethod_BILINEAR) { + CropAndResizeBuilder builder_(_fbb); + builder_.add_extrapolationValue(extrapolationValue); + builder_.add_method(method); +@@ -1734,12 +1719,11 @@ flatbuffers::Offset CreateCropAndResize(flatbuffers::FlatBufferBu + + struct FillT : public flatbuffers::NativeTable { + typedef Fill TableType; +- FillT() { +- } + }; + + struct Fill FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FillT NativeTableType; ++ typedef FillBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return FillTypeTable(); + } +@@ -1753,13 +1737,13 @@ struct Fill FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct FillBuilder { ++ typedef Fill Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit FillBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- FillBuilder &operator=(const FillBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1777,18 +1761,14 @@ flatbuffers::Offset CreateFill(flatbuffers::FlatBufferBuilder &_fbb, const + + struct GatherV2T : public flatbuffers::NativeTable { + typedef GatherV2 TableType; +- DataType Taxis; +- DataType Tindices; +- DataType Tparams; +- GatherV2T() +- : Taxis(DataType_DT_INVALID), +- Tindices(DataType_DT_INVALID), +- Tparams(DataType_DT_INVALID) { +- } ++ MNN::DataType Taxis = MNN::DataType_DT_INVALID; ++ MNN::DataType Tindices = MNN::DataType_DT_INVALID; ++ MNN::DataType Tparams = MNN::DataType_DT_INVALID; + }; + + struct GatherV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GatherV2T NativeTableType; ++ typedef GatherV2Builder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return GatherV2TypeTable(); + } +@@ -1797,14 +1777,14 @@ struct GatherV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_TINDICES = 6, + VT_TPARAMS = 8 + }; +- DataType Taxis() const { +- return static_cast(GetField(VT_TAXIS, 0)); ++ MNN::DataType Taxis() const { ++ return static_cast(GetField(VT_TAXIS, 0)); + } +- DataType Tindices() const { +- return static_cast(GetField(VT_TINDICES, 0)); ++ MNN::DataType Tindices() const { ++ return static_cast(GetField(VT_TINDICES, 0)); + } +- DataType Tparams() const { +- return static_cast(GetField(VT_TPARAMS, 0)); ++ MNN::DataType Tparams() const { ++ return static_cast(GetField(VT_TPARAMS, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1819,22 +1799,22 @@ struct GatherV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GatherV2Builder { ++ typedef GatherV2 Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_Taxis(DataType Taxis) { ++ void add_Taxis(MNN::DataType Taxis) { + fbb_.AddElement(GatherV2::VT_TAXIS, static_cast(Taxis), 0); + } +- void add_Tindices(DataType Tindices) { ++ void add_Tindices(MNN::DataType Tindices) { + fbb_.AddElement(GatherV2::VT_TINDICES, static_cast(Tindices), 0); + } +- void add_Tparams(DataType Tparams) { ++ void add_Tparams(MNN::DataType Tparams) { + fbb_.AddElement(GatherV2::VT_TPARAMS, static_cast(Tparams), 0); + } + explicit GatherV2Builder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GatherV2Builder &operator=(const GatherV2Builder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1844,9 +1824,9 @@ struct GatherV2Builder { + + inline flatbuffers::Offset CreateGatherV2( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType Taxis = DataType_DT_INVALID, +- DataType Tindices = DataType_DT_INVALID, +- DataType Tparams = DataType_DT_INVALID) { ++ MNN::DataType Taxis = MNN::DataType_DT_INVALID, ++ MNN::DataType Tindices = MNN::DataType_DT_INVALID, ++ MNN::DataType Tparams = MNN::DataType_DT_INVALID) { + GatherV2Builder builder_(_fbb); + builder_.add_Tparams(Tparams); + builder_.add_Tindices(Tindices); +@@ -1858,12 +1838,11 @@ flatbuffers::Offset CreateGatherV2(flatbuffers::FlatBufferBuilder &_fb + + struct NonMaxSuppressionV2T : public flatbuffers::NativeTable { + typedef NonMaxSuppressionV2 TableType; +- NonMaxSuppressionV2T() { +- } + }; + + struct NonMaxSuppressionV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NonMaxSuppressionV2T NativeTableType; ++ typedef NonMaxSuppressionV2Builder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return NonMaxSuppressionV2TypeTable(); + } +@@ -1877,13 +1856,13 @@ struct NonMaxSuppressionV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct NonMaxSuppressionV2Builder { ++ typedef NonMaxSuppressionV2 Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit NonMaxSuppressionV2Builder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- NonMaxSuppressionV2Builder &operator=(const NonMaxSuppressionV2Builder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1901,22 +1880,20 @@ flatbuffers::Offset CreateNonMaxSuppressionV2(flatbuffers:: + + struct RangeT : public flatbuffers::NativeTable { + typedef Range TableType; +- DataType Tidx; +- RangeT() +- : Tidx(DataType_DT_INVALID) { +- } ++ MNN::DataType Tidx = MNN::DataType_DT_INVALID; + }; + + struct Range FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RangeT NativeTableType; ++ typedef RangeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return RangeTypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TIDX = 4 + }; +- DataType Tidx() const { +- return static_cast(GetField(VT_TIDX, 0)); ++ MNN::DataType Tidx() const { ++ return static_cast(GetField(VT_TIDX, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -1929,16 +1906,16 @@ struct Range FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RangeBuilder { ++ typedef Range Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_Tidx(DataType Tidx) { ++ void add_Tidx(MNN::DataType Tidx) { + fbb_.AddElement(Range::VT_TIDX, static_cast(Tidx), 0); + } + explicit RangeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RangeBuilder &operator=(const RangeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1948,7 +1925,7 @@ struct RangeBuilder { + + inline flatbuffers::Offset CreateRange( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType Tidx = DataType_DT_INVALID) { ++ MNN::DataType Tidx = MNN::DataType_DT_INVALID) { + RangeBuilder builder_(_fbb); + builder_.add_Tidx(Tidx); + return builder_.Finish(); +@@ -1958,12 +1935,11 @@ flatbuffers::Offset CreateRange(flatbuffers::FlatBufferBuilder &_fbb, con + + struct RankT : public flatbuffers::NativeTable { + typedef Rank TableType; +- RankT() { +- } + }; + + struct Rank FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RankT NativeTableType; ++ typedef RankBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return RankTypeTable(); + } +@@ -1977,13 +1953,13 @@ struct Rank FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RankBuilder { ++ typedef Rank Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit RankBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RankBuilder &operator=(const RankBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2001,22 +1977,20 @@ flatbuffers::Offset CreateRank(flatbuffers::FlatBufferBuilder &_fbb, const + + struct SizeT : public flatbuffers::NativeTable { + typedef Size TableType; +- DataType outputDataType; +- SizeT() +- : outputDataType(DataType_DT_INVALID) { +- } ++ MNN::DataType outputDataType = MNN::DataType_DT_INVALID; + }; + + struct Size FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SizeT NativeTableType; ++ typedef SizeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return SizeTypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OUTPUTDATATYPE = 4 + }; +- DataType outputDataType() const { +- return static_cast(GetField(VT_OUTPUTDATATYPE, 0)); ++ MNN::DataType outputDataType() const { ++ return static_cast(GetField(VT_OUTPUTDATATYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2029,16 +2003,16 @@ struct Size FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SizeBuilder { ++ typedef Size Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_outputDataType(DataType outputDataType) { ++ void add_outputDataType(MNN::DataType outputDataType) { + fbb_.AddElement(Size::VT_OUTPUTDATATYPE, static_cast(outputDataType), 0); + } + explicit SizeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SizeBuilder &operator=(const SizeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2048,7 +2022,7 @@ struct SizeBuilder { + + inline flatbuffers::Offset CreateSize( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType outputDataType = DataType_DT_INVALID) { ++ MNN::DataType outputDataType = MNN::DataType_DT_INVALID) { + SizeBuilder builder_(_fbb); + builder_.add_outputDataType(outputDataType); + return builder_.Finish(); +@@ -2058,22 +2032,20 @@ flatbuffers::Offset CreateSize(flatbuffers::FlatBufferBuilder &_fbb, const + + struct TransposeT : public flatbuffers::NativeTable { + typedef Transpose TableType; +- DataType Tperm; +- TransposeT() +- : Tperm(DataType_DT_INVALID) { +- } ++ MNN::DataType Tperm = MNN::DataType_DT_INVALID; + }; + + struct Transpose FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TransposeT NativeTableType; ++ typedef TransposeBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return TransposeTypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TPERM = 4 + }; +- DataType Tperm() const { +- return static_cast(GetField(VT_TPERM, 0)); ++ MNN::DataType Tperm() const { ++ return static_cast(GetField(VT_TPERM, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2086,16 +2058,16 @@ struct Transpose FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TransposeBuilder { ++ typedef Transpose Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_Tperm(DataType Tperm) { ++ void add_Tperm(MNN::DataType Tperm) { + fbb_.AddElement(Transpose::VT_TPERM, static_cast(Tperm), 0); + } + explicit TransposeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TransposeBuilder &operator=(const TransposeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2105,7 +2077,7 @@ struct TransposeBuilder { + + inline flatbuffers::Offset CreateTranspose( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType Tperm = DataType_DT_INVALID) { ++ MNN::DataType Tperm = MNN::DataType_DT_INVALID) { + TransposeBuilder builder_(_fbb); + builder_.add_Tperm(Tperm); + return builder_.Finish(); +@@ -2115,22 +2087,20 @@ flatbuffers::Offset CreateTranspose(flatbuffers::FlatBufferBuilder &_ + + struct SliceTfT : public flatbuffers::NativeTable { + typedef SliceTf TableType; +- DataType T; +- SliceTfT() +- : T(DataType_DT_INVALID) { +- } ++ MNN::DataType T = MNN::DataType_DT_INVALID; + }; + + struct SliceTf FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SliceTfT NativeTableType; ++ typedef SliceTfBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return SliceTfTypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_T = 4 + }; +- DataType T() const { +- return static_cast(GetField(VT_T, 0)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2143,16 +2113,16 @@ struct SliceTf FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SliceTfBuilder { ++ typedef SliceTf Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(SliceTf::VT_T, static_cast(T), 0); + } + explicit SliceTfBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SliceTfBuilder &operator=(const SliceTfBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2162,7 +2132,7 @@ struct SliceTfBuilder { + + inline flatbuffers::Offset CreateSliceTf( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType T = DataType_DT_INVALID) { ++ MNN::DataType T = MNN::DataType_DT_INVALID) { + SliceTfBuilder builder_(_fbb); + builder_.add_T(T); + return builder_.Finish(); +@@ -2172,22 +2142,20 @@ flatbuffers::Offset CreateSliceTf(flatbuffers::FlatBufferBuilder &_fbb, + + struct QuantizeMaxMinT : public flatbuffers::NativeTable { + typedef QuantizeMaxMin TableType; +- DataType T; +- QuantizeMaxMinT() +- : T(DataType_DT_INVALID) { +- } ++ MNN::DataType T = MNN::DataType_DT_INVALID; + }; + + struct QuantizeMaxMin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizeMaxMinT NativeTableType; ++ typedef QuantizeMaxMinBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return QuantizeMaxMinTypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_T = 4 + }; +- DataType T() const { +- return static_cast(GetField(VT_T, 0)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2200,16 +2168,16 @@ struct QuantizeMaxMin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizeMaxMinBuilder { ++ typedef QuantizeMaxMin Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(QuantizeMaxMin::VT_T, static_cast(T), 0); + } + explicit QuantizeMaxMinBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizeMaxMinBuilder &operator=(const QuantizeMaxMinBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2219,7 +2187,7 @@ struct QuantizeMaxMinBuilder { + + inline flatbuffers::Offset CreateQuantizeMaxMin( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType T = DataType_DT_INVALID) { ++ MNN::DataType T = MNN::DataType_DT_INVALID) { + QuantizeMaxMinBuilder builder_(_fbb); + builder_.add_T(T); + return builder_.Finish(); +@@ -2229,15 +2197,13 @@ flatbuffers::Offset CreateQuantizeMaxMin(flatbuffers::FlatBuffer + + struct CropT : public flatbuffers::NativeTable { + typedef Crop TableType; +- int32_t axis; +- std::vector offset; +- CropT() +- : axis(2) { +- } ++ int32_t axis = 2; ++ std::vector offset{}; + }; + + struct Crop FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CropT NativeTableType; ++ typedef CropBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return CropTypeTable(); + } +@@ -2264,6 +2230,7 @@ struct Crop FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CropBuilder { ++ typedef Crop Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_axis(int32_t axis) { +@@ -2276,7 +2243,6 @@ struct CropBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CropBuilder &operator=(const CropBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2309,14 +2275,13 @@ flatbuffers::Offset CreateCrop(flatbuffers::FlatBufferBuilder &_fbb, const + + struct SpaceBatchT : public flatbuffers::NativeTable { + typedef SpaceBatch TableType; +- std::unique_ptr blockShape; +- std::unique_ptr padding; +- SpaceBatchT() { +- } ++ std::unique_ptr blockShape{}; ++ std::unique_ptr padding{}; + }; + + struct SpaceBatch FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SpaceBatchT NativeTableType; ++ typedef SpaceBatchBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return SpaceBatchTypeTable(); + } +@@ -2324,11 +2289,11 @@ struct SpaceBatch FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_BLOCKSHAPE = 4, + VT_PADDING = 6 + }; +- const Blob *blockShape() const { +- return GetPointer(VT_BLOCKSHAPE); ++ const MNN::Blob *blockShape() const { ++ return GetPointer(VT_BLOCKSHAPE); + } +- const Blob *padding() const { +- return GetPointer(VT_PADDING); ++ const MNN::Blob *padding() const { ++ return GetPointer(VT_PADDING); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2344,19 +2309,19 @@ struct SpaceBatch FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SpaceBatchBuilder { ++ typedef SpaceBatch Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_blockShape(flatbuffers::Offset blockShape) { ++ void add_blockShape(flatbuffers::Offset blockShape) { + fbb_.AddOffset(SpaceBatch::VT_BLOCKSHAPE, blockShape); + } +- void add_padding(flatbuffers::Offset padding) { ++ void add_padding(flatbuffers::Offset padding) { + fbb_.AddOffset(SpaceBatch::VT_PADDING, padding); + } + explicit SpaceBatchBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SpaceBatchBuilder &operator=(const SpaceBatchBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2366,8 +2331,8 @@ struct SpaceBatchBuilder { + + inline flatbuffers::Offset CreateSpaceBatch( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset blockShape = 0, +- flatbuffers::Offset padding = 0) { ++ flatbuffers::Offset blockShape = 0, ++ flatbuffers::Offset padding = 0) { + SpaceBatchBuilder builder_(_fbb); + builder_.add_padding(padding); + builder_.add_blockShape(blockShape); +@@ -2378,20 +2343,16 @@ flatbuffers::Offset CreateSpaceBatch(flatbuffers::FlatBufferBuilder + + struct MatMulT : public flatbuffers::NativeTable { + typedef MatMul TableType; +- DataType T; +- bool transposeA; +- bool transposeB; +- std::vector weight; +- std::vector bias; +- MatMulT() +- : T(DataType_DT_INVALID), +- transposeA(false), +- transposeB(false) { +- } ++ MNN::DataType T = MNN::DataType_DT_INVALID; ++ bool transposeA = false; ++ bool transposeB = false; ++ std::vector weight{}; ++ std::vector bias{}; + }; + + struct MatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MatMulT NativeTableType; ++ typedef MatMulBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return MatMulTypeTable(); + } +@@ -2402,8 +2363,8 @@ struct MatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_WEIGHT = 10, + VT_BIAS = 12 + }; +- DataType T() const { +- return static_cast(GetField(VT_T, 0)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 0)); + } + bool transposeA() const { + return GetField(VT_TRANSPOSEA, 0) != 0; +@@ -2434,9 +2395,10 @@ struct MatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct MatMulBuilder { ++ typedef MatMul Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(MatMul::VT_T, static_cast(T), 0); + } + void add_transposeA(bool transposeA) { +@@ -2455,7 +2417,6 @@ struct MatMulBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MatMulBuilder &operator=(const MatMulBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2465,7 +2426,7 @@ struct MatMulBuilder { + + inline flatbuffers::Offset CreateMatMul( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType T = DataType_DT_INVALID, ++ MNN::DataType T = MNN::DataType_DT_INVALID, + bool transposeA = false, + bool transposeB = false, + flatbuffers::Offset> weight = 0, +@@ -2481,7 +2442,7 @@ inline flatbuffers::Offset CreateMatMul( + + inline flatbuffers::Offset CreateMatMulDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType T = DataType_DT_INVALID, ++ MNN::DataType T = MNN::DataType_DT_INVALID, + bool transposeA = false, + bool transposeB = false, + const std::vector *weight = nullptr, +@@ -2501,17 +2462,14 @@ flatbuffers::Offset CreateMatMul(flatbuffers::FlatBufferBuilder &_fbb, c + + struct MomentsParamT : public flatbuffers::NativeTable { + typedef MomentsParam TableType; +- std::vector dim; +- bool keepDims; +- DataType dType; +- MomentsParamT() +- : keepDims(true), +- dType(DataType_DT_FLOAT) { +- } ++ std::vector dim{}; ++ bool keepDims = true; ++ MNN::DataType dType = MNN::DataType_DT_FLOAT; + }; + + struct MomentsParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MomentsParamT NativeTableType; ++ typedef MomentsParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return MomentsParamTypeTable(); + } +@@ -2526,8 +2484,8 @@ struct MomentsParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + bool keepDims() const { + return GetField(VT_KEEPDIMS, 1) != 0; + } +- DataType dType() const { +- return static_cast(GetField(VT_DTYPE, 1)); ++ MNN::DataType dType() const { ++ return static_cast(GetField(VT_DTYPE, 1)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2543,6 +2501,7 @@ struct MomentsParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct MomentsParamBuilder { ++ typedef MomentsParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_dim(flatbuffers::Offset> dim) { +@@ -2551,14 +2510,13 @@ struct MomentsParamBuilder { + void add_keepDims(bool keepDims) { + fbb_.AddElement(MomentsParam::VT_KEEPDIMS, static_cast(keepDims), 1); + } +- void add_dType(DataType dType) { ++ void add_dType(MNN::DataType dType) { + fbb_.AddElement(MomentsParam::VT_DTYPE, static_cast(dType), 1); + } + explicit MomentsParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MomentsParamBuilder &operator=(const MomentsParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2570,7 +2528,7 @@ inline flatbuffers::Offset CreateMomentsParam( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> dim = 0, + bool keepDims = true, +- DataType dType = DataType_DT_FLOAT) { ++ MNN::DataType dType = MNN::DataType_DT_FLOAT) { + MomentsParamBuilder builder_(_fbb); + builder_.add_dType(dType); + builder_.add_dim(dim); +@@ -2582,7 +2540,7 @@ inline flatbuffers::Offset CreateMomentsParamDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *dim = nullptr, + bool keepDims = true, +- DataType dType = DataType_DT_FLOAT) { ++ MNN::DataType dType = MNN::DataType_DT_FLOAT) { + auto dim__ = dim ? _fbb.CreateVector(*dim) : 0; + return MNN::CreateMomentsParam( + _fbb, +@@ -2595,26 +2553,22 @@ flatbuffers::Offset CreateMomentsParam(flatbuffers::FlatBufferBuil + + struct RNNParamT : public flatbuffers::NativeTable { + typedef RNNParam TableType; +- int32_t numUnits; +- bool isBidirectionalRNN; +- bool keepAllOutputs; +- std::unique_ptr fwGateWeight; +- std::unique_ptr fwGateBias; +- std::unique_ptr fwCandidateWeight; +- std::unique_ptr fwCandidateBias; +- std::unique_ptr bwGateWeight; +- std::unique_ptr bwGateBias; +- std::unique_ptr bwCandidateWeight; +- std::unique_ptr bwCandidateBias; +- RNNParamT() +- : numUnits(0), +- isBidirectionalRNN(false), +- keepAllOutputs(false) { +- } ++ int32_t numUnits = 0; ++ bool isBidirectionalRNN = false; ++ bool keepAllOutputs = false; ++ std::unique_ptr fwGateWeight{}; ++ std::unique_ptr fwGateBias{}; ++ std::unique_ptr fwCandidateWeight{}; ++ std::unique_ptr fwCandidateBias{}; ++ std::unique_ptr bwGateWeight{}; ++ std::unique_ptr bwGateBias{}; ++ std::unique_ptr bwCandidateWeight{}; ++ std::unique_ptr bwCandidateBias{}; + }; + + struct RNNParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RNNParamT NativeTableType; ++ typedef RNNParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return RNNParamTypeTable(); + } +@@ -2640,29 +2594,29 @@ struct RNNParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + bool keepAllOutputs() const { + return GetField(VT_KEEPALLOUTPUTS, 0) != 0; + } +- const Blob *fwGateWeight() const { +- return GetPointer(VT_FWGATEWEIGHT); ++ const MNN::Blob *fwGateWeight() const { ++ return GetPointer(VT_FWGATEWEIGHT); + } +- const Blob *fwGateBias() const { +- return GetPointer(VT_FWGATEBIAS); ++ const MNN::Blob *fwGateBias() const { ++ return GetPointer(VT_FWGATEBIAS); + } +- const Blob *fwCandidateWeight() const { +- return GetPointer(VT_FWCANDIDATEWEIGHT); ++ const MNN::Blob *fwCandidateWeight() const { ++ return GetPointer(VT_FWCANDIDATEWEIGHT); + } +- const Blob *fwCandidateBias() const { +- return GetPointer(VT_FWCANDIDATEBIAS); ++ const MNN::Blob *fwCandidateBias() const { ++ return GetPointer(VT_FWCANDIDATEBIAS); + } +- const Blob *bwGateWeight() const { +- return GetPointer(VT_BWGATEWEIGHT); ++ const MNN::Blob *bwGateWeight() const { ++ return GetPointer(VT_BWGATEWEIGHT); + } +- const Blob *bwGateBias() const { +- return GetPointer(VT_BWGATEBIAS); ++ const MNN::Blob *bwGateBias() const { ++ return GetPointer(VT_BWGATEBIAS); + } +- const Blob *bwCandidateWeight() const { +- return GetPointer(VT_BWCANDIDATEWEIGHT); ++ const MNN::Blob *bwCandidateWeight() const { ++ return GetPointer(VT_BWCANDIDATEWEIGHT); + } +- const Blob *bwCandidateBias() const { +- return GetPointer(VT_BWCANDIDATEBIAS); ++ const MNN::Blob *bwCandidateBias() const { ++ return GetPointer(VT_BWCANDIDATEBIAS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2693,6 +2647,7 @@ struct RNNParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RNNParamBuilder { ++ typedef RNNParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_numUnits(int32_t numUnits) { +@@ -2704,35 +2659,34 @@ struct RNNParamBuilder { + void add_keepAllOutputs(bool keepAllOutputs) { + fbb_.AddElement(RNNParam::VT_KEEPALLOUTPUTS, static_cast(keepAllOutputs), 0); + } +- void add_fwGateWeight(flatbuffers::Offset fwGateWeight) { ++ void add_fwGateWeight(flatbuffers::Offset fwGateWeight) { + fbb_.AddOffset(RNNParam::VT_FWGATEWEIGHT, fwGateWeight); + } +- void add_fwGateBias(flatbuffers::Offset fwGateBias) { ++ void add_fwGateBias(flatbuffers::Offset fwGateBias) { + fbb_.AddOffset(RNNParam::VT_FWGATEBIAS, fwGateBias); + } +- void add_fwCandidateWeight(flatbuffers::Offset fwCandidateWeight) { ++ void add_fwCandidateWeight(flatbuffers::Offset fwCandidateWeight) { + fbb_.AddOffset(RNNParam::VT_FWCANDIDATEWEIGHT, fwCandidateWeight); + } +- void add_fwCandidateBias(flatbuffers::Offset fwCandidateBias) { ++ void add_fwCandidateBias(flatbuffers::Offset fwCandidateBias) { + fbb_.AddOffset(RNNParam::VT_FWCANDIDATEBIAS, fwCandidateBias); + } +- void add_bwGateWeight(flatbuffers::Offset bwGateWeight) { ++ void add_bwGateWeight(flatbuffers::Offset bwGateWeight) { + fbb_.AddOffset(RNNParam::VT_BWGATEWEIGHT, bwGateWeight); + } +- void add_bwGateBias(flatbuffers::Offset bwGateBias) { ++ void add_bwGateBias(flatbuffers::Offset bwGateBias) { + fbb_.AddOffset(RNNParam::VT_BWGATEBIAS, bwGateBias); + } +- void add_bwCandidateWeight(flatbuffers::Offset bwCandidateWeight) { ++ void add_bwCandidateWeight(flatbuffers::Offset bwCandidateWeight) { + fbb_.AddOffset(RNNParam::VT_BWCANDIDATEWEIGHT, bwCandidateWeight); + } +- void add_bwCandidateBias(flatbuffers::Offset bwCandidateBias) { ++ void add_bwCandidateBias(flatbuffers::Offset bwCandidateBias) { + fbb_.AddOffset(RNNParam::VT_BWCANDIDATEBIAS, bwCandidateBias); + } + explicit RNNParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RNNParamBuilder &operator=(const RNNParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2745,14 +2699,14 @@ inline flatbuffers::Offset CreateRNNParam( + int32_t numUnits = 0, + bool isBidirectionalRNN = false, + bool keepAllOutputs = false, +- flatbuffers::Offset fwGateWeight = 0, +- flatbuffers::Offset fwGateBias = 0, +- flatbuffers::Offset fwCandidateWeight = 0, +- flatbuffers::Offset fwCandidateBias = 0, +- flatbuffers::Offset bwGateWeight = 0, +- flatbuffers::Offset bwGateBias = 0, +- flatbuffers::Offset bwCandidateWeight = 0, +- flatbuffers::Offset bwCandidateBias = 0) { ++ flatbuffers::Offset fwGateWeight = 0, ++ flatbuffers::Offset fwGateBias = 0, ++ flatbuffers::Offset fwCandidateWeight = 0, ++ flatbuffers::Offset fwCandidateBias = 0, ++ flatbuffers::Offset bwGateWeight = 0, ++ flatbuffers::Offset bwGateBias = 0, ++ flatbuffers::Offset bwCandidateWeight = 0, ++ flatbuffers::Offset bwCandidateBias = 0) { + RNNParamBuilder builder_(_fbb); + builder_.add_bwCandidateBias(bwCandidateBias); + builder_.add_bwCandidateWeight(bwCandidateWeight); +@@ -2772,16 +2726,13 @@ flatbuffers::Offset CreateRNNParam(flatbuffers::FlatBufferBuilder &_fb + + struct BatchMatMulParamT : public flatbuffers::NativeTable { + typedef BatchMatMulParam TableType; +- bool adjX; +- bool adjY; +- BatchMatMulParamT() +- : adjX(false), +- adjY(false) { +- } ++ bool adjX = false; ++ bool adjY = false; + }; + + struct BatchMatMulParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BatchMatMulParamT NativeTableType; ++ typedef BatchMatMulParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return BatchMatMulParamTypeTable(); + } +@@ -2807,6 +2758,7 @@ struct BatchMatMulParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BatchMatMulParamBuilder { ++ typedef BatchMatMulParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_adjX(bool adjX) { +@@ -2819,7 +2771,6 @@ struct BatchMatMulParamBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BatchMatMulParamBuilder &operator=(const BatchMatMulParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2841,16 +2792,13 @@ flatbuffers::Offset CreateBatchMatMulParam(flatbuffers::FlatBu + + struct DepthSpaceParamT : public flatbuffers::NativeTable { + typedef DepthSpaceParam TableType; +- int32_t blockSize; +- DepthToSpaceMode mode; +- DepthSpaceParamT() +- : blockSize(0), +- mode(DepthToSpaceMode_DCR) { +- } ++ int32_t blockSize = 0; ++ MNN::DepthToSpaceMode mode = MNN::DepthToSpaceMode_DCR; + }; + + struct DepthSpaceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DepthSpaceParamT NativeTableType; ++ typedef DepthSpaceParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return DepthSpaceParamTypeTable(); + } +@@ -2861,8 +2809,8 @@ struct DepthSpaceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t blockSize() const { + return GetField(VT_BLOCKSIZE, 0); + } +- DepthToSpaceMode mode() const { +- return static_cast(GetField(VT_MODE, 0)); ++ MNN::DepthToSpaceMode mode() const { ++ return static_cast(GetField(VT_MODE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -2876,19 +2824,19 @@ struct DepthSpaceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct DepthSpaceParamBuilder { ++ typedef DepthSpaceParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_blockSize(int32_t blockSize) { + fbb_.AddElement(DepthSpaceParam::VT_BLOCKSIZE, blockSize, 0); + } +- void add_mode(DepthToSpaceMode mode) { ++ void add_mode(MNN::DepthToSpaceMode mode) { + fbb_.AddElement(DepthSpaceParam::VT_MODE, static_cast(mode), 0); + } + explicit DepthSpaceParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DepthSpaceParamBuilder &operator=(const DepthSpaceParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2899,7 +2847,7 @@ struct DepthSpaceParamBuilder { + inline flatbuffers::Offset CreateDepthSpaceParam( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t blockSize = 0, +- DepthToSpaceMode mode = DepthToSpaceMode_DCR) { ++ MNN::DepthToSpaceMode mode = MNN::DepthToSpaceMode_DCR) { + DepthSpaceParamBuilder builder_(_fbb); + builder_.add_blockSize(blockSize); + builder_.add_mode(mode); +@@ -2910,16 +2858,13 @@ flatbuffers::Offset CreateDepthSpaceParam(flatbuffers::FlatBuff + + struct ReverseSequenceParamT : public flatbuffers::NativeTable { + typedef ReverseSequenceParam TableType; +- int32_t batchDim; +- int32_t seqDim; +- ReverseSequenceParamT() +- : batchDim(0), +- seqDim(0) { +- } ++ int32_t batchDim = 0; ++ int32_t seqDim = 0; + }; + + struct ReverseSequenceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReverseSequenceParamT NativeTableType; ++ typedef ReverseSequenceParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return ReverseSequenceParamTypeTable(); + } +@@ -2945,6 +2890,7 @@ struct ReverseSequenceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct ReverseSequenceParamBuilder { ++ typedef ReverseSequenceParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_batchDim(int32_t batchDim) { +@@ -2957,7 +2903,6 @@ struct ReverseSequenceParamBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReverseSequenceParamBuilder &operator=(const ReverseSequenceParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2979,27 +2924,19 @@ flatbuffers::Offset CreateReverseSequenceParam(flatbuffers + + struct DetectionPostProcessParamT : public flatbuffers::NativeTable { + typedef DetectionPostProcessParam TableType; +- int32_t maxDetections; +- int32_t maxClassesPerDetection; +- int32_t detectionsPerClass; +- float nmsScoreThreshold; +- float iouThreshold; +- int32_t numClasses; +- bool useRegularNMS; +- std::vector centerSizeEncoding; +- DetectionPostProcessParamT() +- : maxDetections(0), +- maxClassesPerDetection(0), +- detectionsPerClass(0), +- nmsScoreThreshold(0.0f), +- iouThreshold(0.0f), +- numClasses(0), +- useRegularNMS(false) { +- } ++ int32_t maxDetections = 0; ++ int32_t maxClassesPerDetection = 0; ++ int32_t detectionsPerClass = 0; ++ float nmsScoreThreshold = 0.0f; ++ float iouThreshold = 0.0f; ++ int32_t numClasses = 0; ++ bool useRegularNMS = false; ++ std::vector centerSizeEncoding{}; + }; + + struct DetectionPostProcessParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DetectionPostProcessParamT NativeTableType; ++ typedef DetectionPostProcessParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return DetectionPostProcessParamTypeTable(); + } +@@ -3056,6 +2993,7 @@ struct DetectionPostProcessParam FLATBUFFERS_FINAL_CLASS : private flatbuffers:: + }; + + struct DetectionPostProcessParamBuilder { ++ typedef DetectionPostProcessParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_maxDetections(int32_t maxDetections) { +@@ -3086,7 +3024,6 @@ struct DetectionPostProcessParamBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DetectionPostProcessParamBuilder &operator=(const DetectionPostProcessParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3143,16 +3080,13 @@ flatbuffers::Offset CreateDetectionPostProcessParam(f + + struct OneHotParamT : public flatbuffers::NativeTable { + typedef OneHotParam TableType; +- DataType dType; +- int32_t axis; +- OneHotParamT() +- : dType(DataType_DT_FLOAT), +- axis(-1) { +- } ++ MNN::DataType dType = MNN::DataType_DT_FLOAT; ++ int32_t axis = -1; + }; + + struct OneHotParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OneHotParamT NativeTableType; ++ typedef OneHotParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return OneHotParamTypeTable(); + } +@@ -3160,8 +3094,8 @@ struct OneHotParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_DTYPE = 4, + VT_AXIS = 6 + }; +- DataType dType() const { +- return static_cast(GetField(VT_DTYPE, 1)); ++ MNN::DataType dType() const { ++ return static_cast(GetField(VT_DTYPE, 1)); + } + int32_t axis() const { + return GetField(VT_AXIS, -1); +@@ -3178,9 +3112,10 @@ struct OneHotParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct OneHotParamBuilder { ++ typedef OneHotParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_dType(DataType dType) { ++ void add_dType(MNN::DataType dType) { + fbb_.AddElement(OneHotParam::VT_DTYPE, static_cast(dType), 1); + } + void add_axis(int32_t axis) { +@@ -3190,7 +3125,6 @@ struct OneHotParamBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- OneHotParamBuilder &operator=(const OneHotParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3200,7 +3134,7 @@ struct OneHotParamBuilder { + + inline flatbuffers::Offset CreateOneHotParam( + flatbuffers::FlatBufferBuilder &_fbb, +- DataType dType = DataType_DT_FLOAT, ++ MNN::DataType dType = MNN::DataType_DT_FLOAT, + int32_t axis = -1) { + OneHotParamBuilder builder_(_fbb); + builder_.add_axis(axis); +@@ -3212,22 +3146,20 @@ flatbuffers::Offset CreateOneHotParam(flatbuffers::FlatBufferBuilde + + struct PadParamT : public flatbuffers::NativeTable { + typedef PadParam TableType; +- PadValueMode mode; +- PadParamT() +- : mode(PadValueMode_CONSTANT) { +- } ++ MNN::PadValueMode mode = MNN::PadValueMode_CONSTANT; + }; + + struct PadParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PadParamT NativeTableType; ++ typedef PadParamBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return PadParamTypeTable(); + } + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MODE = 4 + }; +- PadValueMode mode() const { +- return static_cast(GetField(VT_MODE, 0)); ++ MNN::PadValueMode mode() const { ++ return static_cast(GetField(VT_MODE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -3240,16 +3172,16 @@ struct PadParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PadParamBuilder { ++ typedef PadParam Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_mode(PadValueMode mode) { ++ void add_mode(MNN::PadValueMode mode) { + fbb_.AddElement(PadParam::VT_MODE, static_cast(mode), 0); + } + explicit PadParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PadParamBuilder &operator=(const PadParamBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3259,7 +3191,7 @@ struct PadParamBuilder { + + inline flatbuffers::Offset CreatePadParam( + flatbuffers::FlatBufferBuilder &_fbb, +- PadValueMode mode = PadValueMode_CONSTANT) { ++ MNN::PadValueMode mode = MNN::PadValueMode_CONSTANT) { + PadParamBuilder builder_(_fbb); + builder_.add_mode(mode); + return builder_.Finish(); +@@ -3269,17 +3201,15 @@ flatbuffers::Offset CreatePadParam(flatbuffers::FlatBufferBuilder &_fb + + struct LayerNormT : public flatbuffers::NativeTable { + typedef LayerNorm TableType; +- std::vector axis; +- float epsilon; +- std::vector gamma; +- std::vector beta; +- LayerNormT() +- : epsilon(0.0f) { +- } ++ std::vector axis{}; ++ float epsilon = 0.0f; ++ std::vector gamma{}; ++ std::vector beta{}; + }; + + struct LayerNorm FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LayerNormT NativeTableType; ++ typedef LayerNormBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return LayerNormTypeTable(); + } +@@ -3318,6 +3248,7 @@ struct LayerNorm FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LayerNormBuilder { ++ typedef LayerNorm Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_axis(flatbuffers::Offset> axis) { +@@ -3336,7 +3267,6 @@ struct LayerNormBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LayerNormBuilder &operator=(const LayerNormBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3379,20 +3309,15 @@ flatbuffers::Offset CreateLayerNorm(flatbuffers::FlatBufferBuilder &_ + + struct RandomUniformT : public flatbuffers::NativeTable { + typedef RandomUniform TableType; +- int32_t seed; +- int32_t seed2; +- DataType type; +- DataType T; +- RandomUniformT() +- : seed(0), +- seed2(0), +- type(DataType_DT_FLOAT), +- T(DataType_DT_INT32) { +- } ++ int32_t seed = 0; ++ int32_t seed2 = 0; ++ MNN::DataType type = MNN::DataType_DT_FLOAT; ++ MNN::DataType T = MNN::DataType_DT_INT32; + }; + + struct RandomUniform FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RandomUniformT NativeTableType; ++ typedef RandomUniformBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return RandomUniformTypeTable(); + } +@@ -3408,11 +3333,11 @@ struct RandomUniform FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + int32_t seed2() const { + return GetField(VT_SEED2, 0); + } +- DataType type() const { +- return static_cast(GetField(VT_TYPE, 1)); ++ MNN::DataType type() const { ++ return static_cast(GetField(VT_TYPE, 1)); + } +- DataType T() const { +- return static_cast(GetField(VT_T, 3)); ++ MNN::DataType T() const { ++ return static_cast(GetField(VT_T, 3)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -3428,6 +3353,7 @@ struct RandomUniform FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RandomUniformBuilder { ++ typedef RandomUniform Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_seed(int32_t seed) { +@@ -3436,17 +3362,16 @@ struct RandomUniformBuilder { + void add_seed2(int32_t seed2) { + fbb_.AddElement(RandomUniform::VT_SEED2, seed2, 0); + } +- void add_type(DataType type) { ++ void add_type(MNN::DataType type) { + fbb_.AddElement(RandomUniform::VT_TYPE, static_cast(type), 1); + } +- void add_T(DataType T) { ++ void add_T(MNN::DataType T) { + fbb_.AddElement(RandomUniform::VT_T, static_cast(T), 3); + } + explicit RandomUniformBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RandomUniformBuilder &operator=(const RandomUniformBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3458,8 +3383,8 @@ inline flatbuffers::Offset CreateRandomUniform( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t seed = 0, + int32_t seed2 = 0, +- DataType type = DataType_DT_FLOAT, +- DataType T = DataType_DT_INT32) { ++ MNN::DataType type = MNN::DataType_DT_FLOAT, ++ MNN::DataType T = MNN::DataType_DT_INT32) { + RandomUniformBuilder builder_(_fbb); + builder_.add_T(T); + builder_.add_type(type); +@@ -3471,16 +3396,16 @@ inline flatbuffers::Offset CreateRandomUniform( + flatbuffers::Offset CreateRandomUniform(flatbuffers::FlatBufferBuilder &_fbb, const RandomUniformT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + inline BinaryOpT *BinaryOp::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BinaryOpT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BinaryOpT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BinaryOp::UnPackTo(BinaryOpT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = opType(); _o->opType = _e; }; +- { auto _e = T(); _o->T = _e; }; ++ { auto _e = opType(); _o->opType = _e; } ++ { auto _e = T(); _o->T = _e; } + } + + inline flatbuffers::Offset BinaryOp::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BinaryOpT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3500,16 +3425,16 @@ inline flatbuffers::Offset CreateBinaryOp(flatbuffers::FlatBufferBuild + } + + inline PackParamT *PackParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PackParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PackParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void PackParam::UnPackTo(PackParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = dataType(); _o->dataType = _e; }; +- { auto _e = axis(); _o->axis = _e; }; ++ { auto _e = dataType(); _o->dataType = _e; } ++ { auto _e = axis(); _o->axis = _e; } + } + + inline flatbuffers::Offset PackParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PackParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3529,21 +3454,21 @@ inline flatbuffers::Offset CreatePackParam(flatbuffers::FlatBufferBui + } + + inline StridedSliceParamT *StridedSliceParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new StridedSliceParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new StridedSliceParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void StridedSliceParam::UnPackTo(StridedSliceParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = Index(); _o->Index = _e; }; +- { auto _e = T(); _o->T = _e; }; +- { auto _e = beginMask(); _o->beginMask = _e; }; +- { auto _e = endMask(); _o->endMask = _e; }; +- { auto _e = ellipsisMask(); _o->ellipsisMask = _e; }; +- { auto _e = newAxisMask(); _o->newAxisMask = _e; }; +- { auto _e = shrinkAxisMask(); _o->shrinkAxisMask = _e; }; ++ { auto _e = Index(); _o->Index = _e; } ++ { auto _e = T(); _o->T = _e; } ++ { auto _e = beginMask(); _o->beginMask = _e; } ++ { auto _e = endMask(); _o->endMask = _e; } ++ { auto _e = ellipsisMask(); _o->ellipsisMask = _e; } ++ { auto _e = newAxisMask(); _o->newAxisMask = _e; } ++ { auto _e = shrinkAxisMask(); _o->shrinkAxisMask = _e; } + } + + inline flatbuffers::Offset StridedSliceParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3573,15 +3498,15 @@ inline flatbuffers::Offset CreateStridedSliceParam(flatbuffer + } + + inline SqueezeParamT *SqueezeParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SqueezeParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SqueezeParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SqueezeParam::UnPackTo(SqueezeParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = squeezeDims(); if (_e) { _o->squeezeDims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->squeezeDims[_i] = _e->Get(_i); } } }; ++ { auto _e = squeezeDims(); if (_e) { _o->squeezeDims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->squeezeDims[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset SqueezeParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3599,16 +3524,16 @@ inline flatbuffers::Offset CreateSqueezeParam(flatbuffers::FlatBuf + } + + inline CastParamT *CastParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CastParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CastParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CastParam::UnPackTo(CastParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = srcT(); _o->srcT = _e; }; +- { auto _e = dstT(); _o->dstT = _e; }; ++ { auto _e = srcT(); _o->srcT = _e; } ++ { auto _e = dstT(); _o->dstT = _e; } + } + + inline flatbuffers::Offset CastParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CastParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3628,19 +3553,19 @@ inline flatbuffers::Offset CreateCastParam(flatbuffers::FlatBufferBui + } + + inline ReductionParamT *ReductionParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReductionParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReductionParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ReductionParam::UnPackTo(ReductionParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = operation(); _o->operation = _e; }; +- { auto _e = dim(); if (_e) { _o->dim.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim[_i] = _e->Get(_i); } } }; +- { auto _e = coeff(); _o->coeff = _e; }; +- { auto _e = keepDims(); _o->keepDims = _e; }; +- { auto _e = dType(); _o->dType = _e; }; ++ { auto _e = operation(); _o->operation = _e; } ++ { auto _e = dim(); if (_e) { _o->dim.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim[_i] = _e->Get(_i); } } } ++ { auto _e = coeff(); _o->coeff = _e; } ++ { auto _e = keepDims(); _o->keepDims = _e; } ++ { auto _e = dType(); _o->dType = _e; } + } + + inline flatbuffers::Offset ReductionParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReductionParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3666,18 +3591,18 @@ inline flatbuffers::Offset CreateReductionParam(flatbuffers::Fla + } + + inline GatherT *Gather::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GatherT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GatherT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Gather::UnPackTo(GatherT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = Tindices(); _o->Tindices = _e; }; +- { auto _e = Tparams(); _o->Tparams = _e; }; +- { auto _e = validateIndices(); _o->validateIndices = _e; }; +- { auto _e = axis(); _o->axis = _e; }; ++ { auto _e = Tindices(); _o->Tindices = _e; } ++ { auto _e = Tparams(); _o->Tparams = _e; } ++ { auto _e = validateIndices(); _o->validateIndices = _e; } ++ { auto _e = axis(); _o->axis = _e; } + } + + inline flatbuffers::Offset Gather::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3701,17 +3626,17 @@ inline flatbuffers::Offset CreateGather(flatbuffers::FlatBufferBuilder & + } + + inline ExpandDimsT *ExpandDims::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ExpandDimsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ExpandDimsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ExpandDims::UnPackTo(ExpandDimsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = T(); _o->T = _e; }; +- { auto _e = Tdim(); _o->Tdim = _e; }; +- { auto _e = axis(); _o->axis = _e; }; ++ { auto _e = T(); _o->T = _e; } ++ { auto _e = Tdim(); _o->Tdim = _e; } ++ { auto _e = axis(); _o->axis = _e; } + } + + inline flatbuffers::Offset ExpandDims::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3733,16 +3658,16 @@ inline flatbuffers::Offset CreateExpandDims(flatbuffers::FlatBufferB + } + + inline SeluT *Selu::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SeluT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SeluT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Selu::UnPackTo(SeluT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = scale(); _o->scale = _e; }; +- { auto _e = alpha(); _o->alpha = _e; }; ++ { auto _e = scale(); _o->scale = _e; } ++ { auto _e = alpha(); _o->alpha = _e; } + } + + inline flatbuffers::Offset Selu::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SeluT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3762,20 +3687,20 @@ inline flatbuffers::Offset CreateSelu(flatbuffers::FlatBufferBuilder &_fbb + } + + inline AsStringT *AsString::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new AsStringT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new AsStringT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void AsString::UnPackTo(AsStringT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = T(); _o->T = _e; }; +- { auto _e = precision(); _o->precision = _e; }; +- { auto _e = scientific(); _o->scientific = _e; }; +- { auto _e = shortest(); _o->shortest = _e; }; +- { auto _e = width(); _o->width = _e; }; +- { auto _e = fillString(); if (_e) _o->fillString = _e->str(); }; ++ { auto _e = T(); _o->T = _e; } ++ { auto _e = precision(); _o->precision = _e; } ++ { auto _e = scientific(); _o->scientific = _e; } ++ { auto _e = shortest(); _o->shortest = _e; } ++ { auto _e = width(); _o->width = _e; } ++ { auto _e = fillString(); if (_e) _o->fillString = _e->str(); } + } + + inline flatbuffers::Offset AsString::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AsStringT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3803,16 +3728,16 @@ inline flatbuffers::Offset CreateAsString(flatbuffers::FlatBufferBuild + } + + inline ReduceJoinT *ReduceJoin::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReduceJoinT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReduceJoinT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ReduceJoin::UnPackTo(ReduceJoinT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = keepDims(); _o->keepDims = _e; }; +- { auto _e = separator(); if (_e) _o->separator = _e->str(); }; ++ { auto _e = keepDims(); _o->keepDims = _e; } ++ { auto _e = separator(); if (_e) _o->separator = _e->str(); } + } + + inline flatbuffers::Offset ReduceJoin::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReduceJoinT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3832,16 +3757,16 @@ inline flatbuffers::Offset CreateReduceJoin(flatbuffers::FlatBufferB + } + + inline UnaryOpT *UnaryOp::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new UnaryOpT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new UnaryOpT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void UnaryOp::UnPackTo(UnaryOpT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = opType(); _o->opType = _e; }; +- { auto _e = T(); _o->T = _e; }; ++ { auto _e = opType(); _o->opType = _e; } ++ { auto _e = T(); _o->T = _e; } + } + + inline flatbuffers::Offset UnaryOp::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnaryOpT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3861,16 +3786,16 @@ inline flatbuffers::Offset CreateUnaryOp(flatbuffers::FlatBufferBuilder + } + + inline TopKV2T *TopKV2::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TopKV2T(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TopKV2T()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TopKV2::UnPackTo(TopKV2T *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = T(); _o->T = _e; }; +- { auto _e = sorted(); _o->sorted = _e; }; ++ { auto _e = T(); _o->T = _e; } ++ { auto _e = sorted(); _o->sorted = _e; } + } + + inline flatbuffers::Offset TopKV2::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2T* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3890,16 +3815,16 @@ inline flatbuffers::Offset CreateTopKV2(flatbuffers::FlatBufferBuilder & + } + + inline CropAndResizeT *CropAndResize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CropAndResizeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CropAndResizeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CropAndResize::UnPackTo(CropAndResizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = extrapolationValue(); _o->extrapolationValue = _e; }; +- { auto _e = method(); _o->method = _e; }; ++ { auto _e = extrapolationValue(); _o->extrapolationValue = _e; } ++ { auto _e = method(); _o->method = _e; } + } + + inline flatbuffers::Offset CropAndResize::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CropAndResizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3919,9 +3844,9 @@ inline flatbuffers::Offset CreateCropAndResize(flatbuffers::FlatB + } + + inline FillT *Fill::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new FillT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new FillT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Fill::UnPackTo(FillT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3942,17 +3867,17 @@ inline flatbuffers::Offset CreateFill(flatbuffers::FlatBufferBuilder &_fbb + } + + inline GatherV2T *GatherV2::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GatherV2T(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GatherV2T()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GatherV2::UnPackTo(GatherV2T *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = Taxis(); _o->Taxis = _e; }; +- { auto _e = Tindices(); _o->Tindices = _e; }; +- { auto _e = Tparams(); _o->Tparams = _e; }; ++ { auto _e = Taxis(); _o->Taxis = _e; } ++ { auto _e = Tindices(); _o->Tindices = _e; } ++ { auto _e = Tparams(); _o->Tparams = _e; } + } + + inline flatbuffers::Offset GatherV2::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherV2T* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3974,9 +3899,9 @@ inline flatbuffers::Offset CreateGatherV2(flatbuffers::FlatBufferBuild + } + + inline NonMaxSuppressionV2T *NonMaxSuppressionV2::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new NonMaxSuppressionV2T(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new NonMaxSuppressionV2T()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void NonMaxSuppressionV2::UnPackTo(NonMaxSuppressionV2T *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3997,15 +3922,15 @@ inline flatbuffers::Offset CreateNonMaxSuppressionV2(flatbu + } + + inline RangeT *Range::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RangeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RangeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Range::UnPackTo(RangeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = Tidx(); _o->Tidx = _e; }; ++ { auto _e = Tidx(); _o->Tidx = _e; } + } + + inline flatbuffers::Offset Range::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RangeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4023,9 +3948,9 @@ inline flatbuffers::Offset CreateRange(flatbuffers::FlatBufferBuilder &_f + } + + inline RankT *Rank::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RankT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RankT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Rank::UnPackTo(RankT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -4046,15 +3971,15 @@ inline flatbuffers::Offset CreateRank(flatbuffers::FlatBufferBuilder &_fbb + } + + inline SizeT *Size::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SizeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SizeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Size::UnPackTo(SizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = outputDataType(); _o->outputDataType = _e; }; ++ { auto _e = outputDataType(); _o->outputDataType = _e; } + } + + inline flatbuffers::Offset Size::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4072,15 +3997,15 @@ inline flatbuffers::Offset CreateSize(flatbuffers::FlatBufferBuilder &_fbb + } + + inline TransposeT *Transpose::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TransposeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TransposeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Transpose::UnPackTo(TransposeT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = Tperm(); _o->Tperm = _e; }; ++ { auto _e = Tperm(); _o->Tperm = _e; } + } + + inline flatbuffers::Offset Transpose::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4098,15 +4023,15 @@ inline flatbuffers::Offset CreateTranspose(flatbuffers::FlatBufferBui + } + + inline SliceTfT *SliceTf::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SliceTfT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SliceTfT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SliceTf::UnPackTo(SliceTfT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = T(); _o->T = _e; }; ++ { auto _e = T(); _o->T = _e; } + } + + inline flatbuffers::Offset SliceTf::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SliceTfT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4124,15 +4049,15 @@ inline flatbuffers::Offset CreateSliceTf(flatbuffers::FlatBufferBuilder + } + + inline QuantizeMaxMinT *QuantizeMaxMin::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizeMaxMinT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizeMaxMinT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizeMaxMin::UnPackTo(QuantizeMaxMinT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = T(); _o->T = _e; }; ++ { auto _e = T(); _o->T = _e; } + } + + inline flatbuffers::Offset QuantizeMaxMin::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeMaxMinT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4150,16 +4075,16 @@ inline flatbuffers::Offset CreateQuantizeMaxMin(flatbuffers::Fla + } + + inline CropT *Crop::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CropT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CropT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Crop::UnPackTo(CropT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = axis(); _o->axis = _e; }; +- { auto _e = offset(); if (_e) { _o->offset.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->offset[_i] = _e->Get(_i); } } }; ++ { auto _e = axis(); _o->axis = _e; } ++ { auto _e = offset(); if (_e) { _o->offset.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->offset[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset Crop::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CropT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4179,16 +4104,16 @@ inline flatbuffers::Offset CreateCrop(flatbuffers::FlatBufferBuilder &_fbb + } + + inline SpaceBatchT *SpaceBatch::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SpaceBatchT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SpaceBatchT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SpaceBatch::UnPackTo(SpaceBatchT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = blockShape(); if (_e) _o->blockShape = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = padding(); if (_e) _o->padding = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = blockShape(); if (_e) _o->blockShape = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = padding(); if (_e) _o->padding = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset SpaceBatch::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceBatchT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4208,19 +4133,19 @@ inline flatbuffers::Offset CreateSpaceBatch(flatbuffers::FlatBufferB + } + + inline MatMulT *MatMul::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MatMulT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MatMulT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void MatMul::UnPackTo(MatMulT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = T(); _o->T = _e; }; +- { auto _e = transposeA(); _o->transposeA = _e; }; +- { auto _e = transposeB(); _o->transposeB = _e; }; +- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; +- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; ++ { auto _e = T(); _o->T = _e; } ++ { auto _e = transposeA(); _o->transposeA = _e; } ++ { auto _e = transposeB(); _o->transposeB = _e; } ++ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } } ++ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset MatMul::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatMulT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4246,17 +4171,17 @@ inline flatbuffers::Offset CreateMatMul(flatbuffers::FlatBufferBuilder & + } + + inline MomentsParamT *MomentsParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MomentsParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MomentsParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void MomentsParam::UnPackTo(MomentsParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = dim(); if (_e) { _o->dim.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim[_i] = _e->Get(_i); } } }; +- { auto _e = keepDims(); _o->keepDims = _e; }; +- { auto _e = dType(); _o->dType = _e; }; ++ { auto _e = dim(); if (_e) { _o->dim.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim[_i] = _e->Get(_i); } } } ++ { auto _e = keepDims(); _o->keepDims = _e; } ++ { auto _e = dType(); _o->dType = _e; } + } + + inline flatbuffers::Offset MomentsParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MomentsParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4278,25 +4203,25 @@ inline flatbuffers::Offset CreateMomentsParam(flatbuffers::FlatBuf + } + + inline RNNParamT *RNNParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RNNParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RNNParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void RNNParam::UnPackTo(RNNParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = numUnits(); _o->numUnits = _e; }; +- { auto _e = isBidirectionalRNN(); _o->isBidirectionalRNN = _e; }; +- { auto _e = keepAllOutputs(); _o->keepAllOutputs = _e; }; +- { auto _e = fwGateWeight(); if (_e) _o->fwGateWeight = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = fwGateBias(); if (_e) _o->fwGateBias = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = fwCandidateWeight(); if (_e) _o->fwCandidateWeight = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = fwCandidateBias(); if (_e) _o->fwCandidateBias = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = bwGateWeight(); if (_e) _o->bwGateWeight = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = bwGateBias(); if (_e) _o->bwGateBias = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = bwCandidateWeight(); if (_e) _o->bwCandidateWeight = std::unique_ptr(_e->UnPack(_resolver)); }; +- { auto _e = bwCandidateBias(); if (_e) _o->bwCandidateBias = std::unique_ptr(_e->UnPack(_resolver)); }; ++ { auto _e = numUnits(); _o->numUnits = _e; } ++ { auto _e = isBidirectionalRNN(); _o->isBidirectionalRNN = _e; } ++ { auto _e = keepAllOutputs(); _o->keepAllOutputs = _e; } ++ { auto _e = fwGateWeight(); if (_e) _o->fwGateWeight = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = fwGateBias(); if (_e) _o->fwGateBias = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = fwCandidateWeight(); if (_e) _o->fwCandidateWeight = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = fwCandidateBias(); if (_e) _o->fwCandidateBias = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = bwGateWeight(); if (_e) _o->bwGateWeight = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = bwGateBias(); if (_e) _o->bwGateBias = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = bwCandidateWeight(); if (_e) _o->bwCandidateWeight = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = bwCandidateBias(); if (_e) _o->bwCandidateBias = std::unique_ptr(_e->UnPack(_resolver)); } + } + + inline flatbuffers::Offset RNNParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RNNParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4334,16 +4259,16 @@ inline flatbuffers::Offset CreateRNNParam(flatbuffers::FlatBufferBuild + } + + inline BatchMatMulParamT *BatchMatMulParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BatchMatMulParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BatchMatMulParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BatchMatMulParam::UnPackTo(BatchMatMulParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = adjX(); _o->adjX = _e; }; +- { auto _e = adjY(); _o->adjY = _e; }; ++ { auto _e = adjX(); _o->adjX = _e; } ++ { auto _e = adjY(); _o->adjY = _e; } + } + + inline flatbuffers::Offset BatchMatMulParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4363,16 +4288,16 @@ inline flatbuffers::Offset CreateBatchMatMulParam(flatbuffers: + } + + inline DepthSpaceParamT *DepthSpaceParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DepthSpaceParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DepthSpaceParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DepthSpaceParam::UnPackTo(DepthSpaceParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = blockSize(); _o->blockSize = _e; }; +- { auto _e = mode(); _o->mode = _e; }; ++ { auto _e = blockSize(); _o->blockSize = _e; } ++ { auto _e = mode(); _o->mode = _e; } + } + + inline flatbuffers::Offset DepthSpaceParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DepthSpaceParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4392,16 +4317,16 @@ inline flatbuffers::Offset CreateDepthSpaceParam(flatbuffers::F + } + + inline ReverseSequenceParamT *ReverseSequenceParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReverseSequenceParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReverseSequenceParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ReverseSequenceParam::UnPackTo(ReverseSequenceParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = batchDim(); _o->batchDim = _e; }; +- { auto _e = seqDim(); _o->seqDim = _e; }; ++ { auto _e = batchDim(); _o->batchDim = _e; } ++ { auto _e = seqDim(); _o->seqDim = _e; } + } + + inline flatbuffers::Offset ReverseSequenceParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReverseSequenceParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4421,22 +4346,22 @@ inline flatbuffers::Offset CreateReverseSequenceParam(flat + } + + inline DetectionPostProcessParamT *DetectionPostProcessParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DetectionPostProcessParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DetectionPostProcessParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DetectionPostProcessParam::UnPackTo(DetectionPostProcessParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = maxDetections(); _o->maxDetections = _e; }; +- { auto _e = maxClassesPerDetection(); _o->maxClassesPerDetection = _e; }; +- { auto _e = detectionsPerClass(); _o->detectionsPerClass = _e; }; +- { auto _e = nmsScoreThreshold(); _o->nmsScoreThreshold = _e; }; +- { auto _e = iouThreshold(); _o->iouThreshold = _e; }; +- { auto _e = numClasses(); _o->numClasses = _e; }; +- { auto _e = useRegularNMS(); _o->useRegularNMS = _e; }; +- { auto _e = centerSizeEncoding(); if (_e) { _o->centerSizeEncoding.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->centerSizeEncoding[_i] = _e->Get(_i); } } }; ++ { auto _e = maxDetections(); _o->maxDetections = _e; } ++ { auto _e = maxClassesPerDetection(); _o->maxClassesPerDetection = _e; } ++ { auto _e = detectionsPerClass(); _o->detectionsPerClass = _e; } ++ { auto _e = nmsScoreThreshold(); _o->nmsScoreThreshold = _e; } ++ { auto _e = iouThreshold(); _o->iouThreshold = _e; } ++ { auto _e = numClasses(); _o->numClasses = _e; } ++ { auto _e = useRegularNMS(); _o->useRegularNMS = _e; } ++ { auto _e = centerSizeEncoding(); if (_e) { _o->centerSizeEncoding.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->centerSizeEncoding[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset DetectionPostProcessParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DetectionPostProcessParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4468,16 +4393,16 @@ inline flatbuffers::Offset CreateDetectionPostProcess + } + + inline OneHotParamT *OneHotParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new OneHotParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new OneHotParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void OneHotParam::UnPackTo(OneHotParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = dType(); _o->dType = _e; }; +- { auto _e = axis(); _o->axis = _e; }; ++ { auto _e = dType(); _o->dType = _e; } ++ { auto _e = axis(); _o->axis = _e; } + } + + inline flatbuffers::Offset OneHotParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OneHotParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4497,15 +4422,15 @@ inline flatbuffers::Offset CreateOneHotParam(flatbuffers::FlatBuffe + } + + inline PadParamT *PadParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PadParamT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PadParamT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void PadParam::UnPackTo(PadParamT *_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 PadParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4523,18 +4448,18 @@ inline flatbuffers::Offset CreatePadParam(flatbuffers::FlatBufferBuild + } + + inline LayerNormT *LayerNorm::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LayerNormT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LayerNormT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LayerNorm::UnPackTo(LayerNormT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = axis(); if (_e) { _o->axis.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->axis[_i] = _e->Get(_i); } } }; +- { auto _e = epsilon(); _o->epsilon = _e; }; +- { auto _e = gamma(); if (_e) { _o->gamma.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->gamma[_i] = _e->Get(_i); } } }; +- { auto _e = beta(); if (_e) { _o->beta.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->beta[_i] = _e->Get(_i); } } }; ++ { auto _e = axis(); if (_e) { _o->axis.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->axis[_i] = _e->Get(_i); } } } ++ { auto _e = epsilon(); _o->epsilon = _e; } ++ { auto _e = gamma(); if (_e) { _o->gamma.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->gamma[_i] = _e->Get(_i); } } } ++ { auto _e = beta(); if (_e) { _o->beta.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->beta[_i] = _e->Get(_i); } } } + } + + inline flatbuffers::Offset LayerNorm::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LayerNormT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4558,18 +4483,18 @@ inline flatbuffers::Offset CreateLayerNorm(flatbuffers::FlatBufferBui + } + + inline RandomUniformT *RandomUniform::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RandomUniformT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RandomUniformT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void RandomUniform::UnPackTo(RandomUniformT *_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 = type(); _o->type = _e; }; +- { auto _e = T(); _o->T = _e; }; ++ { auto _e = seed(); _o->seed = _e; } ++ { auto _e = seed2(); _o->seed2 = _e; } ++ { auto _e = type(); _o->type = _e; } ++ { auto _e = T(); _o->T = _e; } + } + + inline flatbuffers::Offset RandomUniform::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RandomUniformT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4618,7 +4543,7 @@ inline const flatbuffers::TypeTable *BinaryOpOperationTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- BinaryOpOperationTypeTable ++ MNN::BinaryOpOperationTypeTable + }; + static const int64_t values[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22 }; + static const char * const names[] = { +@@ -4646,7 +4571,7 @@ inline const flatbuffers::TypeTable *BinaryOpOperationTypeTable() { + "NOTEQUAL" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 22, type_codes, type_refs, values, names ++ flatbuffers::ST_ENUM, 22, type_codes, type_refs, nullptr, values, names + }; + return &tt; + } +@@ -4664,7 +4589,7 @@ inline const flatbuffers::TypeTable *ReductionTypeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ReductionTypeTypeTable ++ MNN::ReductionTypeTypeTable + }; + static const char * const names[] = { + "SUM", +@@ -4678,7 +4603,7 @@ inline const flatbuffers::TypeTable *ReductionTypeTypeTable() { + "ALL" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 9, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 9, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4718,7 +4643,7 @@ inline const flatbuffers::TypeTable *UnaryOpOperationTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- UnaryOpOperationTypeTable ++ MNN::UnaryOpOperationTypeTable + }; + static const char * const names[] = { + "ABS", +@@ -4754,7 +4679,7 @@ inline const flatbuffers::TypeTable *UnaryOpOperationTypeTable() { + "TANH" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 31, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 31, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4765,14 +4690,14 @@ inline const flatbuffers::TypeTable *CropAndResizeMethodTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- CropAndResizeMethodTypeTable ++ MNN::CropAndResizeMethodTypeTable + }; + static const char * const names[] = { + "BILINEAR", + "NEAREST" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4783,14 +4708,14 @@ inline const flatbuffers::TypeTable *DepthToSpaceModeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DepthToSpaceModeTypeTable ++ MNN::DepthToSpaceModeTypeTable + }; + static const char * const names[] = { + "DCR", + "CRD" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4802,7 +4727,7 @@ inline const flatbuffers::TypeTable *PadValueModeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- PadValueModeTypeTable ++ MNN::PadValueModeTypeTable + }; + static const char * const names[] = { + "CONSTANT", +@@ -4810,7 +4735,7 @@ inline const flatbuffers::TypeTable *PadValueModeTypeTable() { + "SYMMETRIC" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4821,14 +4746,14 @@ inline const flatbuffers::TypeTable *BinaryOpTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "opType", + "T" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4839,14 +4764,14 @@ inline const flatbuffers::TypeTable *PackParamTypeTable() { + { flatbuffers::ET_INT, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "dataType", + "axis" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4862,7 +4787,7 @@ inline const flatbuffers::TypeTable *StridedSliceParamTypeTable() { + { flatbuffers::ET_INT, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "Index", +@@ -4874,7 +4799,7 @@ inline const flatbuffers::TypeTable *StridedSliceParamTypeTable() { + "shrinkAxisMask" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4887,7 +4812,7 @@ inline const flatbuffers::TypeTable *SqueezeParamTypeTable() { + "squeezeDims" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -4898,14 +4823,14 @@ inline const flatbuffers::TypeTable *CastParamTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "srcT", + "dstT" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4919,8 +4844,8 @@ inline const flatbuffers::TypeTable *ReductionParamTypeTable() { + { flatbuffers::ET_INT, 0, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- ReductionTypeTypeTable, +- DataTypeTypeTable ++ MNN::ReductionTypeTypeTable, ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "operation", +@@ -4930,7 +4855,7 @@ inline const flatbuffers::TypeTable *ReductionParamTypeTable() { + "dType" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4943,7 +4868,7 @@ inline const flatbuffers::TypeTable *GatherTypeTable() { + { flatbuffers::ET_INT, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "Tindices", +@@ -4952,7 +4877,7 @@ inline const flatbuffers::TypeTable *GatherTypeTable() { + "axis" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4964,7 +4889,7 @@ inline const flatbuffers::TypeTable *ExpandDimsTypeTable() { + { flatbuffers::ET_INT, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "T", +@@ -4972,7 +4897,7 @@ inline const flatbuffers::TypeTable *ExpandDimsTypeTable() { + "axis" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -4987,7 +4912,7 @@ inline const flatbuffers::TypeTable *SeluTypeTable() { + "alpha" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -5002,7 +4927,7 @@ inline const flatbuffers::TypeTable *AsStringTypeTable() { + { flatbuffers::ET_STRING, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "T", +@@ -5013,7 +4938,7 @@ inline const flatbuffers::TypeTable *AsStringTypeTable() { + "fillString" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5028,7 +4953,7 @@ inline const flatbuffers::TypeTable *ReduceJoinTypeTable() { + "separator" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -5039,15 +4964,15 @@ inline const flatbuffers::TypeTable *UnaryOpTypeTable() { + { flatbuffers::ET_INT, 0, 1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- UnaryOpOperationTypeTable, +- DataTypeTypeTable ++ MNN::UnaryOpOperationTypeTable, ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "opType", + "T" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5058,14 +4983,14 @@ inline const flatbuffers::TypeTable *TopKV2TypeTable() { + { flatbuffers::ET_BOOL, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "T", + "sorted" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5076,21 +5001,21 @@ inline const flatbuffers::TypeTable *CropAndResizeTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- CropAndResizeMethodTypeTable ++ MNN::CropAndResizeMethodTypeTable + }; + static const char * const names[] = { + "extrapolationValue", + "method" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } + + inline const flatbuffers::TypeTable *FillTypeTable() { + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr ++ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr + }; + return &tt; + } +@@ -5102,7 +5027,7 @@ inline const flatbuffers::TypeTable *GatherV2TypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "Taxis", +@@ -5110,14 +5035,14 @@ inline const flatbuffers::TypeTable *GatherV2TypeTable() { + "Tparams" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } + + inline const flatbuffers::TypeTable *NonMaxSuppressionV2TypeTable() { + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr ++ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr + }; + return &tt; + } +@@ -5127,20 +5052,20 @@ inline const flatbuffers::TypeTable *RangeTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "Tidx" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } + + inline const flatbuffers::TypeTable *RankTypeTable() { + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr ++ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr + }; + return &tt; + } +@@ -5150,13 +5075,13 @@ inline const flatbuffers::TypeTable *SizeTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "outputDataType" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5166,13 +5091,13 @@ inline const flatbuffers::TypeTable *TransposeTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "Tperm" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5182,13 +5107,13 @@ inline const flatbuffers::TypeTable *SliceTfTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "T" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5198,13 +5123,13 @@ inline const flatbuffers::TypeTable *QuantizeMaxMinTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "T" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5219,7 +5144,7 @@ inline const flatbuffers::TypeTable *CropTypeTable() { + "offset" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -5230,14 +5155,14 @@ inline const flatbuffers::TypeTable *SpaceBatchTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- BlobTypeTable ++ MNN::BlobTypeTable + }; + static const char * const names[] = { + "blockShape", + "padding" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5251,7 +5176,7 @@ inline const flatbuffers::TypeTable *MatMulTypeTable() { + { flatbuffers::ET_FLOAT, 1, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "T", +@@ -5261,7 +5186,7 @@ inline const flatbuffers::TypeTable *MatMulTypeTable() { + "bias" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5273,7 +5198,7 @@ inline const flatbuffers::TypeTable *MomentsParamTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "dim", +@@ -5281,7 +5206,7 @@ inline const flatbuffers::TypeTable *MomentsParamTypeTable() { + "dType" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5301,7 +5226,7 @@ inline const flatbuffers::TypeTable *RNNParamTypeTable() { + { flatbuffers::ET_SEQUENCE, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- BlobTypeTable ++ MNN::BlobTypeTable + }; + static const char * const names[] = { + "numUnits", +@@ -5317,7 +5242,7 @@ inline const flatbuffers::TypeTable *RNNParamTypeTable() { + "bwCandidateBias" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5332,7 +5257,7 @@ inline const flatbuffers::TypeTable *BatchMatMulParamTypeTable() { + "adjY" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -5343,14 +5268,14 @@ inline const flatbuffers::TypeTable *DepthSpaceParamTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DepthToSpaceModeTypeTable ++ MNN::DepthToSpaceModeTypeTable + }; + static const char * const names[] = { + "blockSize", + "mode" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5365,7 +5290,7 @@ inline const flatbuffers::TypeTable *ReverseSequenceParamTypeTable() { + "seqDim" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -5392,7 +5317,7 @@ inline const flatbuffers::TypeTable *DetectionPostProcessParamTypeTable() { + "centerSizeEncoding" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 8, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 8, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -5403,14 +5328,14 @@ inline const flatbuffers::TypeTable *OneHotParamTypeTable() { + { flatbuffers::ET_INT, 0, -1 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "dType", + "axis" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5420,13 +5345,13 @@ inline const flatbuffers::TypeTable *PadParamTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- PadValueModeTypeTable ++ MNN::PadValueModeTypeTable + }; + static const char * const names[] = { + "mode" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -5445,7 +5370,7 @@ inline const flatbuffers::TypeTable *LayerNormTypeTable() { + "beta" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, nullptr, names + }; + return &tt; + } +@@ -5458,7 +5383,7 @@ inline const flatbuffers::TypeTable *RandomUniformTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "seed", +@@ -5467,7 +5392,7 @@ inline const flatbuffers::TypeTable *RandomUniformTypeTable() { + "T" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +diff --git a/schema/current/Type_generated.h b/schema/current/Type_generated.h +index f444072f..b7bfd4d9 100644 +--- a/schema/current/Type_generated.h ++++ b/schema/current/Type_generated.h +@@ -8,7 +8,7 @@ + + namespace MNN { + +-enum NetSource { ++enum NetSource : int8_t { + NetSource_CAFFE = 0, + NetSource_TENSORFLOW = 1, + NetSource_TFLITE = 2, +@@ -28,7 +28,7 @@ inline const NetSource (&EnumValuesNetSource())[4] { + } + + inline const char * const *EnumNamesNetSource() { +- static const char * const names[] = { ++ static const char * const names[5] = { + "CAFFE", + "TENSORFLOW", + "TFLITE", +@@ -39,12 +39,12 @@ inline const char * const *EnumNamesNetSource() { + } + + inline const char *EnumNameNetSource(NetSource e) { +- if (e < NetSource_CAFFE || e > NetSource_ONNX) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, NetSource_CAFFE, NetSource_ONNX)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesNetSource()[index]; + } + +-enum DataType { ++enum DataType : int32_t { + DataType_DT_INVALID = 0, + DataType_DT_FLOAT = 1, + DataType_DT_DOUBLE = 2, +@@ -100,7 +100,7 @@ inline const DataType (&EnumValuesDataType())[22] { + } + + inline const char * const *EnumNamesDataType() { +- static const char * const names[] = { ++ static const char * const names[23] = { + "DT_INVALID", + "DT_FLOAT", + "DT_DOUBLE", +@@ -129,8 +129,8 @@ inline const char * const *EnumNamesDataType() { + } + + inline const char *EnumNameDataType(DataType e) { +- if (e < DataType_DT_INVALID || e > DataType_DT_VARIANT) return ""; +- const size_t index = static_cast(e); ++ if (flatbuffers::IsOutRange(e, DataType_DT_INVALID, DataType_DT_VARIANT)) return ""; ++ const size_t index = static_cast(e); + return EnumNamesDataType()[index]; + } + +@@ -142,7 +142,7 @@ inline const flatbuffers::TypeTable *NetSourceTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- NetSourceTypeTable ++ MNN::NetSourceTypeTable + }; + static const char * const names[] = { + "CAFFE", +@@ -151,7 +151,7 @@ inline const flatbuffers::TypeTable *NetSourceTypeTable() { + "ONNX" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 4, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 4, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +@@ -182,7 +182,7 @@ inline const flatbuffers::TypeTable *DataTypeTypeTable() { + { flatbuffers::ET_INT, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- DataTypeTypeTable ++ MNN::DataTypeTypeTable + }; + static const char * const names[] = { + "DT_INVALID", +@@ -209,7 +209,7 @@ inline const flatbuffers::TypeTable *DataTypeTypeTable() { + "DT_VARIANT" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_ENUM, 22, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_ENUM, 22, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } +diff --git a/schema/current/UserDefine_generated.h b/schema/current/UserDefine_generated.h +index 7935cf21..f41a4771 100644 +--- a/schema/current/UserDefine_generated.h ++++ b/schema/current/UserDefine_generated.h +@@ -4,29 +4,28 @@ + #ifndef FLATBUFFERS_GENERATED_USERDEFINE_MNN_H_ + #define FLATBUFFERS_GENERATED_USERDEFINE_MNN_H_ + ++#include "flatbuffers/flatbuffers.h" + +-#include "Tensor_generated.h" + #include "Type_generated.h" ++#include "Tensor_generated.h" + + namespace MNN { + + struct TensorConvertInfo; ++struct TensorConvertInfoBuilder; + struct TensorConvertInfoT; + + inline const flatbuffers::TypeTable *TensorConvertInfoTypeTable(); + + struct TensorConvertInfoT : public flatbuffers::NativeTable { + typedef TensorConvertInfo TableType; +- MNN_DATA_FORMAT source; +- MNN_DATA_FORMAT dest; +- TensorConvertInfoT() +- : source(MNN_DATA_FORMAT_NCHW), +- dest(MNN_DATA_FORMAT_NCHW) { +- } ++ MNN::MNN_DATA_FORMAT source = MNN::MNN_DATA_FORMAT_NCHW; ++ MNN::MNN_DATA_FORMAT dest = MNN::MNN_DATA_FORMAT_NCHW; + }; + + struct TensorConvertInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TensorConvertInfoT NativeTableType; ++ typedef TensorConvertInfoBuilder Builder; + static const flatbuffers::TypeTable *MiniReflectTypeTable() { + return TensorConvertInfoTypeTable(); + } +@@ -34,11 +33,11 @@ struct TensorConvertInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_SOURCE = 4, + VT_DEST = 6 + }; +- MNN_DATA_FORMAT source() const { +- return static_cast(GetField(VT_SOURCE, 0)); ++ MNN::MNN_DATA_FORMAT source() const { ++ return static_cast(GetField(VT_SOURCE, 0)); + } +- MNN_DATA_FORMAT dest() const { +- return static_cast(GetField(VT_DEST, 0)); ++ MNN::MNN_DATA_FORMAT dest() const { ++ return static_cast(GetField(VT_DEST, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -52,19 +51,19 @@ struct TensorConvertInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TensorConvertInfoBuilder { ++ typedef TensorConvertInfo Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_source(MNN_DATA_FORMAT source) { ++ void add_source(MNN::MNN_DATA_FORMAT source) { + fbb_.AddElement(TensorConvertInfo::VT_SOURCE, static_cast(source), 0); + } +- void add_dest(MNN_DATA_FORMAT dest) { ++ void add_dest(MNN::MNN_DATA_FORMAT dest) { + fbb_.AddElement(TensorConvertInfo::VT_DEST, static_cast(dest), 0); + } + explicit TensorConvertInfoBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TensorConvertInfoBuilder &operator=(const TensorConvertInfoBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -74,8 +73,8 @@ struct TensorConvertInfoBuilder { + + inline flatbuffers::Offset CreateTensorConvertInfo( + flatbuffers::FlatBufferBuilder &_fbb, +- MNN_DATA_FORMAT source = MNN_DATA_FORMAT_NCHW, +- MNN_DATA_FORMAT dest = MNN_DATA_FORMAT_NCHW) { ++ MNN::MNN_DATA_FORMAT source = MNN::MNN_DATA_FORMAT_NCHW, ++ MNN::MNN_DATA_FORMAT dest = MNN::MNN_DATA_FORMAT_NCHW) { + TensorConvertInfoBuilder builder_(_fbb); + builder_.add_dest(dest); + builder_.add_source(source); +@@ -85,16 +84,16 @@ inline flatbuffers::Offset CreateTensorConvertInfo( + flatbuffers::Offset CreateTensorConvertInfo(flatbuffers::FlatBufferBuilder &_fbb, const TensorConvertInfoT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + inline TensorConvertInfoT *TensorConvertInfo::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TensorConvertInfoT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TensorConvertInfoT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TensorConvertInfo::UnPackTo(TensorConvertInfoT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = source(); _o->source = _e; }; +- { auto _e = dest(); _o->dest = _e; }; ++ { auto _e = source(); _o->source = _e; } ++ { auto _e = dest(); _o->dest = _e; } + } + + inline flatbuffers::Offset TensorConvertInfo::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorConvertInfoT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -119,14 +118,14 @@ inline const flatbuffers::TypeTable *TensorConvertInfoTypeTable() { + { flatbuffers::ET_CHAR, 0, 0 } + }; + static const flatbuffers::TypeFunction type_refs[] = { +- MNN_DATA_FORMATTypeTable ++ MNN::MNN_DATA_FORMATTypeTable + }; + static const char * const names[] = { + "source", + "dest" + }; + static const flatbuffers::TypeTable tt = { +- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names ++ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names + }; + return &tt; + } From 3afbd3a321c24963cf0df3a48f877a411adfdc22 Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Sat, 10 Jul 2021 18:14:16 +0800 Subject: [PATCH 04/19] add new port-version of `mnn` after upgrade the flatbuffers --- ports/mnn/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/m-/mnn.json | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/mnn/vcpkg.json b/ports/mnn/vcpkg.json index cb72880b5d8432..cfde4d98e5224a 100644 --- a/ports/mnn/vcpkg.json +++ b/ports/mnn/vcpkg.json @@ -1,6 +1,7 @@ { "name": "mnn", "version-string": "1.1.0", + "port-version": 1, "description": "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba", "homepage": "https://www.mnn.zone/", "license": "Apache-2.0", diff --git a/versions/baseline.json b/versions/baseline.json index 7c8a6482f25700..cff11adf95d939 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4086,7 +4086,7 @@ }, "mnn": { "baseline": "1.1.0", - "port-version": 0 + "port-version": 1 }, "modp-base64": { "baseline": "2020-09-26", diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index f124bfe287ce9c..6a097175f99ba7 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "a95eefc0c426bde81a46f168df5beca8c2849f74", + "version-string": "1.1.0", + "port-version": 1 + }, { "git-tree": "491764622aa21728db88d7dd574f430cae600af5", "version-string": "1.1.0", From 82870164ef977d79979a37a67d3c25553aca8148 Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Sat, 10 Jul 2021 18:20:40 +0800 Subject: [PATCH 05/19] fix the port-version of `mnn` --- versions/m-/mnn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index 6a097175f99ba7..e0a74518b30d7d 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "a95eefc0c426bde81a46f168df5beca8c2849f74", + "git-tree": "95e607958de4ec96598f9f9016f3b84f582246b0", "version-string": "1.1.0", "port-version": 1 }, From 8d16dbed5a87372cad192a4ca9c889097c04d914 Mon Sep 17 00:00:00 2001 From: Xing Ji <33065325+jixingcn@users.noreply.github.com> Date: Mon, 12 Jul 2021 15:56:38 +0800 Subject: [PATCH 06/19] Update ports/mnn/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/mnn/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mnn/vcpkg.json b/ports/mnn/vcpkg.json index cfde4d98e5224a..037bf3c53cc991 100644 --- a/ports/mnn/vcpkg.json +++ b/ports/mnn/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mnn", - "version-string": "1.1.0", + "version": "1.1.0", "port-version": 1, "description": "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba", "homepage": "https://www.mnn.zone/", From e0db8eb1fe1ac59e16822b49630a282b96e74cb8 Mon Sep 17 00:00:00 2001 From: Xing Ji <33065325+jixingcn@users.noreply.github.com> Date: Mon, 12 Jul 2021 15:57:03 +0800 Subject: [PATCH 07/19] Update ports/flatbuffers/CONTROL Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/flatbuffers/CONTROL | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/flatbuffers/CONTROL b/ports/flatbuffers/CONTROL index bc5f294e1a2545..da211dc0d93e67 100644 --- a/ports/flatbuffers/CONTROL +++ b/ports/flatbuffers/CONTROL @@ -1,6 +1,5 @@ Source: flatbuffers Version: 2.0.0 -Port-Version: 0 Description: Memory Efficient Serialization Library FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility. Homepage: https://google.github.io/flatbuffers/ From a8dc6490ddef72e829f77da1e6096cc093b4031e Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Tue, 13 Jul 2021 09:29:28 +0800 Subject: [PATCH 08/19] run `vcpkg x-add-version flatbuffers --overwrite-version` --- versions/f-/flatbuffers.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/f-/flatbuffers.json b/versions/f-/flatbuffers.json index a70382ed416dda..74e1d183f307a9 100644 --- a/versions/f-/flatbuffers.json +++ b/versions/f-/flatbuffers.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "629358e6935f0a0fcd63659e66cc70da619ba66f", + "git-tree": "15a2fc0a15331e81cd04a3aae0a8b1d70c002ee5", "version-string": "2.0.0", "port-version": 0 }, From 604ce9129e443ef5b75a187231255762a5581270 Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Tue, 13 Jul 2021 09:43:27 +0800 Subject: [PATCH 09/19] run `vcpkg x-add-version mnn --overwrite-version` --- versions/m-/mnn.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index e0a74518b30d7d..a79c8f77fcbabc 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,8 +1,8 @@ { "versions": [ { - "git-tree": "95e607958de4ec96598f9f9016f3b84f582246b0", - "version-string": "1.1.0", + "git-tree": "c57886000ea4ca96f6c61dd5b432ee8cb2b1852b", + "version": "1.1.0", "port-version": 1 }, { From c6964b322c8305546dcf4d1b60c55bc06b57da07 Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Wed, 14 Jul 2021 21:58:22 +0800 Subject: [PATCH 10/19] regenerate code files by flatc before build --- ports/mnn/portfile.cmake | 23 +- ports/mnn/use-flatbuffers-200.patch | 19048 -------------------------- ports/mnn/vcpkg.json | 5 +- 3 files changed, 26 insertions(+), 19050 deletions(-) delete mode 100644 ports/mnn/use-flatbuffers-200.patch diff --git a/ports/mnn/portfile.cmake b/ports/mnn/portfile.cmake index d8fe83d8ec57b6..d816477fe07870 100644 --- a/ports/mnn/portfile.cmake +++ b/ports/mnn/portfile.cmake @@ -11,7 +11,6 @@ vcpkg_from_github( HEAD_REF master PATCHES use-package-and-install.patch - use-flatbuffers-200.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -40,6 +39,27 @@ if("cuda" IN_LIST FEATURES) unset(NINJA_OPTION) endif() +set(FLATC_EXEC ${CURRENT_HOST_INSTALLED_DIR}/tools/flatbuffers/flatc${VCPKG_HOST_EXECUTABLE_SUFFIX}) +if (NOT EXISTS "${FLATC_EXEC}") + message(FATAL_ERROR "Expected ${FLATC_EXEC} to exist.") +endif() + +# regenerate some code files by schemes and flatbuffers +vcpkg_execute_build_process( + COMMAND ${FLATC_EXEC} "-c" "-b" "--gen-object-api" "--reflect-names" + "../default/BasicOptimizer.fbs" + "../default/CaffeOp.fbs" + "../default/GpuLibrary.fbs" + "../default/MNN.fbs" + "../default/Tensor.fbs" + "../default/TensorflowOp.fbs" + "../default/TFQuantizeOp.fbs" + "../default/Type.fbs" + "../default/UserDefine.fbs" + WORKING_DIRECTORY ${SOURCE_PATH}/schema/current/ + LOGNAME flatc-${TARGET_TRIPLET} + ) + if(VCPKG_TARGET_IS_WINDOWS) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_RUNTIME_MT) list(APPEND PLATFORM_OPTIONS -DMNN_WIN_RUNTIME_MT=${USE_RUNTIME_MT}) @@ -66,6 +86,7 @@ vcpkg_download_distfile(COPYRIGHT_PATH FILENAME 98f6b79b778f7b0a1541.txt SHA512 98f6b79b778f7b0a15415bd750c3a8a097d650511cb4ec8115188e115c47053fe700f578895c097051c9bc3dfb6197c2b13a15de203273e1a3218884f86e90e8 ) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(RENAME ${COPYRIGHT_PATH} ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/ports/mnn/use-flatbuffers-200.patch b/ports/mnn/use-flatbuffers-200.patch deleted file mode 100644 index 1eea0e954c289a..00000000000000 --- a/ports/mnn/use-flatbuffers-200.patch +++ /dev/null @@ -1,19048 +0,0 @@ -diff --git a/schema/current/BasicOptimizer_generated.h b/schema/current/BasicOptimizer_generated.h -index 6bb12f7e..71dfc330 100644 ---- a/schema/current/BasicOptimizer_generated.h -+++ b/schema/current/BasicOptimizer_generated.h -@@ -4,23 +4,26 @@ - #ifndef FLATBUFFERS_GENERATED_BASICOPTIMIZER_MNN_OPTIMIZER_H_ - #define FLATBUFFERS_GENERATED_BASICOPTIMIZER_MNN_OPTIMIZER_H_ - -+#include "flatbuffers/flatbuffers.h" - --#include "CaffeOp_generated.h" --#include "GpuLibrary_generated.h" --#include "MNN_generated.h" - #include "TFQuantizeOp_generated.h" --#include "Tensor_generated.h" --#include "TensorflowOp_generated.h" - #include "Type_generated.h" - #include "UserDefine_generated.h" -+#include "MNN_generated.h" -+#include "CaffeOp_generated.h" -+#include "GpuLibrary_generated.h" -+#include "TensorflowOp_generated.h" -+#include "Tensor_generated.h" - - namespace MNN { - namespace Optimizer { - - struct BackendConfig; -+struct BackendConfigBuilder; - struct BackendConfigT; - - struct Merge; -+struct MergeBuilder; - struct MergeT; - - inline const flatbuffers::TypeTable *BackendConfigTypeTable(); -@@ -29,22 +32,16 @@ inline const flatbuffers::TypeTable *MergeTypeTable(); - - struct BackendConfigT : public flatbuffers::NativeTable { - typedef BackendConfig TableType; -- int32_t memroy; -- MNN::ForwardType type; -- int32_t precision; -- int32_t power; -- int32_t numberThread; -- BackendConfigT() -- : memroy(0), -- type(MNN::ForwardType_CPU), -- precision(0), -- power(0), -- numberThread(1) { -- } -+ int32_t memroy = 0; -+ MNN::ForwardType type = MNN::ForwardType_CPU; -+ int32_t precision = 0; -+ int32_t power = 0; -+ int32_t numberThread = 1; - }; - - struct BackendConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef BackendConfigT NativeTableType; -+ typedef BackendConfigBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return BackendConfigTypeTable(); - } -@@ -85,6 +82,7 @@ struct BackendConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct BackendConfigBuilder { -+ typedef BackendConfig Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_memroy(int32_t memroy) { -@@ -106,7 +104,6 @@ struct BackendConfigBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- BackendConfigBuilder &operator=(const BackendConfigBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -134,18 +131,16 @@ flatbuffers::Offset CreateBackendConfig(flatbuffers::FlatBufferBu - - struct MergeT : public flatbuffers::NativeTable { - typedef Merge TableType; -- std::vector outputIndexes; -- std::vector inputIndexes; -- int32_t tensorNumber; -- std::unique_ptr backend; -- std::vector> oplists; -- MergeT() -- : tensorNumber(0) { -- } -+ std::vector outputIndexes{}; -+ std::vector inputIndexes{}; -+ int32_t tensorNumber = 0; -+ std::unique_ptr backend{}; -+ std::vector> oplists{}; - }; - - struct Merge FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef MergeT NativeTableType; -+ typedef MergeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return MergeTypeTable(); - } -@@ -165,8 +160,8 @@ struct Merge FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t tensorNumber() const { - return GetField(VT_TENSORNUMBER, 0); - } -- const BackendConfig *backend() const { -- return GetPointer(VT_BACKEND); -+ const MNN::Optimizer::BackendConfig *backend() const { -+ return GetPointer(VT_BACKEND); - } - const flatbuffers::Vector> *oplists() const { - return GetPointer> *>(VT_OPLISTS); -@@ -191,6 +186,7 @@ struct Merge FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct MergeBuilder { -+ typedef Merge Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_outputIndexes(flatbuffers::Offset> outputIndexes) { -@@ -202,7 +198,7 @@ struct MergeBuilder { - void add_tensorNumber(int32_t tensorNumber) { - fbb_.AddElement(Merge::VT_TENSORNUMBER, tensorNumber, 0); - } -- void add_backend(flatbuffers::Offset backend) { -+ void add_backend(flatbuffers::Offset backend) { - fbb_.AddOffset(Merge::VT_BACKEND, backend); - } - void add_oplists(flatbuffers::Offset>> oplists) { -@@ -212,7 +208,6 @@ struct MergeBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- MergeBuilder &operator=(const MergeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -225,7 +220,7 @@ inline flatbuffers::Offset CreateMerge( - flatbuffers::Offset> outputIndexes = 0, - flatbuffers::Offset> inputIndexes = 0, - int32_t tensorNumber = 0, -- flatbuffers::Offset backend = 0, -+ flatbuffers::Offset backend = 0, - flatbuffers::Offset>> oplists = 0) { - MergeBuilder builder_(_fbb); - builder_.add_oplists(oplists); -@@ -241,7 +236,7 @@ inline flatbuffers::Offset CreateMergeDirect( - const std::vector *outputIndexes = nullptr, - const std::vector *inputIndexes = nullptr, - int32_t tensorNumber = 0, -- flatbuffers::Offset backend = 0, -+ flatbuffers::Offset backend = 0, - const std::vector> *oplists = nullptr) { - auto outputIndexes__ = outputIndexes ? _fbb.CreateVector(*outputIndexes) : 0; - auto inputIndexes__ = inputIndexes ? _fbb.CreateVector(*inputIndexes) : 0; -@@ -258,19 +253,19 @@ inline flatbuffers::Offset CreateMergeDirect( - flatbuffers::Offset CreateMerge(flatbuffers::FlatBufferBuilder &_fbb, const MergeT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); - - inline BackendConfigT *BackendConfig::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new BackendConfigT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new BackendConfigT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void BackendConfig::UnPackTo(BackendConfigT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = memroy(); _o->memroy = _e; }; -- { auto _e = type(); _o->type = _e; }; -- { auto _e = precision(); _o->precision = _e; }; -- { auto _e = power(); _o->power = _e; }; -- { auto _e = numberThread(); _o->numberThread = _e; }; -+ { auto _e = memroy(); _o->memroy = _e; } -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = precision(); _o->precision = _e; } -+ { auto _e = power(); _o->power = _e; } -+ { auto _e = numberThread(); _o->numberThread = _e; } - } - - inline flatbuffers::Offset BackendConfig::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BackendConfigT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -296,19 +291,19 @@ inline flatbuffers::Offset CreateBackendConfig(flatbuffers::FlatB - } - - inline MergeT *Merge::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new MergeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new MergeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Merge::UnPackTo(MergeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } }; -- { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } }; -- { auto _e = tensorNumber(); _o->tensorNumber = _e; }; -- { auto _e = backend(); if (_e) _o->backend = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = oplists(); if (_e) { _o->oplists.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->oplists[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -+ { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } } -+ { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } } -+ { auto _e = tensorNumber(); _o->tensorNumber = _e; } -+ { auto _e = backend(); if (_e) _o->backend = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = oplists(); if (_e) { _o->oplists.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->oplists[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } - } - - inline flatbuffers::Offset Merge::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MergeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -352,7 +347,7 @@ inline const flatbuffers::TypeTable *BackendConfigTypeTable() { - "numberThread" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -366,7 +361,7 @@ inline const flatbuffers::TypeTable *MergeTypeTable() { - { flatbuffers::ET_SEQUENCE, 1, 1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- BackendConfigTypeTable, -+ MNN::Optimizer::BackendConfigTypeTable, - MNN::OpTypeTable - }; - static const char * const names[] = { -@@ -377,7 +372,7 @@ inline const flatbuffers::TypeTable *MergeTypeTable() { - "oplists" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -diff --git a/schema/current/CaffeOp_generated.h b/schema/current/CaffeOp_generated.h -index 12bc81f2..2f9b63bf 100644 ---- a/schema/current/CaffeOp_generated.h -+++ b/schema/current/CaffeOp_generated.h -@@ -4,109 +4,143 @@ - #ifndef FLATBUFFERS_GENERATED_CAFFEOP_MNN_H_ - #define FLATBUFFERS_GENERATED_CAFFEOP_MNN_H_ - -+#include "flatbuffers/flatbuffers.h" - --#include "Tensor_generated.h" - #include "Type_generated.h" -+#include "Tensor_generated.h" - - namespace MNN { - - struct Convolution2DCommon; -+struct Convolution2DCommonBuilder; - struct Convolution2DCommonT; - - struct Convolution3DCommon; -+struct Convolution3DCommonBuilder; - struct Convolution3DCommonT; - - struct IDSTQuan; -+struct IDSTQuanBuilder; - struct IDSTQuanT; - - struct QuantizedFloatParam; -+struct QuantizedFloatParamBuilder; - struct QuantizedFloatParamT; - - struct Convolution2D; -+struct Convolution2DBuilder; - struct Convolution2DT; - - struct Convolution3D; -+struct Convolution3DBuilder; - struct Convolution3DT; - - struct InnerProduct; -+struct InnerProductBuilder; - struct InnerProductT; - - struct Pool; -+struct PoolBuilder; - struct PoolT; - - struct Pool3D; -+struct Pool3DBuilder; - struct Pool3DT; - - struct Relu; -+struct ReluBuilder; - struct ReluT; - - struct Relu6; -+struct Relu6Builder; - struct Relu6T; - - struct PRelu; -+struct PReluBuilder; - struct PReluT; - - struct ELU; -+struct ELUBuilder; - struct ELUT; - - struct LRN; -+struct LRNBuilder; - struct LRNT; - - struct ArgMax; -+struct ArgMaxBuilder; - struct ArgMaxT; - - struct Axis; -+struct AxisBuilder; - struct AxisT; - - struct Input; -+struct InputBuilder; - struct InputT; - - struct LSTM; -+struct LSTMBuilder; - struct LSTMT; - - struct Slice; -+struct SliceBuilder; - struct SliceT; - - struct BatchNorm; -+struct BatchNormBuilder; - struct BatchNormT; - - struct Scale; -+struct ScaleBuilder; - struct ScaleT; - - struct Eltwise; -+struct EltwiseBuilder; - struct EltwiseT; - - struct Flatten; -+struct FlattenBuilder; - struct FlattenT; - - struct Permute; -+struct PermuteBuilder; - struct PermuteT; - - struct Reshape; -+struct ReshapeBuilder; - struct ReshapeT; - - struct DetectionOutput; -+struct DetectionOutputBuilder; - struct DetectionOutputT; - - struct RoiPooling; -+struct RoiPoolingBuilder; - struct RoiPoolingT; - - struct Proposal; -+struct ProposalBuilder; - struct ProposalT; - - struct Interp; -+struct InterpBuilder; - struct InterpT; - - struct Resize; -+struct ResizeBuilder; - struct ResizeT; - - struct PriorBox; -+struct PriorBoxBuilder; - struct PriorBoxT; - - struct Normalize; -+struct NormalizeBuilder; - struct NormalizeT; - - struct EltwiseInt8; -+struct EltwiseInt8Builder; - struct EltwiseInt8T; - - inline const flatbuffers::TypeTable *Convolution2DCommonTypeTable(); -@@ -175,7 +209,7 @@ inline const flatbuffers::TypeTable *NormalizeTypeTable(); - - inline const flatbuffers::TypeTable *EltwiseInt8TypeTable(); - --enum PadMode { -+enum PadMode : int8_t { - PadMode_CAFFE = 0, - PadMode_VALID = 1, - PadMode_SAME = 2, -@@ -193,7 +227,7 @@ inline const PadMode (&EnumValuesPadMode())[3] { - } - - inline const char * const *EnumNamesPadMode() { -- static const char * const names[] = { -+ static const char * const names[4] = { - "CAFFE", - "VALID", - "SAME", -@@ -203,12 +237,12 @@ inline const char * const *EnumNamesPadMode() { - } - - inline const char *EnumNamePadMode(PadMode e) { -- if (e < PadMode_CAFFE || e > PadMode_SAME) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, PadMode_CAFFE, PadMode_SAME)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesPadMode()[index]; - } - --enum QuantizeAlgo { -+enum QuantizeAlgo : int8_t { - QuantizeAlgo_DEFAULT = 0, - QuantizeAlgo_OVERFLOW_AWARE = 1, - QuantizeAlgo_MIN = QuantizeAlgo_DEFAULT, -@@ -224,7 +258,7 @@ inline const QuantizeAlgo (&EnumValuesQuantizeAlgo())[2] { - } - - inline const char * const *EnumNamesQuantizeAlgo() { -- static const char * const names[] = { -+ static const char * const names[3] = { - "DEFAULT", - "OVERFLOW_AWARE", - nullptr -@@ -233,12 +267,12 @@ inline const char * const *EnumNamesQuantizeAlgo() { - } - - inline const char *EnumNameQuantizeAlgo(QuantizeAlgo e) { -- if (e < QuantizeAlgo_DEFAULT || e > QuantizeAlgo_OVERFLOW_AWARE) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, QuantizeAlgo_DEFAULT, QuantizeAlgo_OVERFLOW_AWARE)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesQuantizeAlgo()[index]; - } - --enum PoolType { -+enum PoolType : int8_t { - PoolType_MAXPOOL = 0, - PoolType_AVEPOOL = 1, - PoolType_MIN = PoolType_MAXPOOL, -@@ -254,7 +288,7 @@ inline const PoolType (&EnumValuesPoolType())[2] { - } - - inline const char * const *EnumNamesPoolType() { -- static const char * const names[] = { -+ static const char * const names[3] = { - "MAXPOOL", - "AVEPOOL", - nullptr -@@ -263,12 +297,12 @@ inline const char * const *EnumNamesPoolType() { - } - - inline const char *EnumNamePoolType(PoolType e) { -- if (e < PoolType_MAXPOOL || e > PoolType_AVEPOOL) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, PoolType_MAXPOOL, PoolType_AVEPOOL)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesPoolType()[index]; - } - --enum PoolPadType { -+enum PoolPadType : int8_t { - PoolPadType_CAFFE = 0, - PoolPadType_VALID = 1, - PoolPadType_SAME = 2, -@@ -286,7 +320,7 @@ inline const PoolPadType (&EnumValuesPoolPadType())[3] { - } - - inline const char * const *EnumNamesPoolPadType() { -- static const char * const names[] = { -+ static const char * const names[4] = { - "CAFFE", - "VALID", - "SAME", -@@ -296,12 +330,12 @@ inline const char * const *EnumNamesPoolPadType() { - } - - inline const char *EnumNamePoolPadType(PoolPadType e) { -- if (e < PoolPadType_CAFFE || e > PoolPadType_SAME) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, PoolPadType_CAFFE, PoolPadType_SAME)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesPoolPadType()[index]; - } - --enum AvgPoolCountType { -+enum AvgPoolCountType : int8_t { - AvgPoolCountType_DEFAULT = 0, - AvgPoolCountType_INCLUDE_PADDING = 1, - AvgPoolCountType_EXCLUDE_PADDING = 2, -@@ -319,7 +353,7 @@ inline const AvgPoolCountType (&EnumValuesAvgPoolCountType())[3] { - } - - inline const char * const *EnumNamesAvgPoolCountType() { -- static const char * const names[] = { -+ static const char * const names[4] = { - "DEFAULT", - "INCLUDE_PADDING", - "EXCLUDE_PADDING", -@@ -329,12 +363,12 @@ inline const char * const *EnumNamesAvgPoolCountType() { - } - - inline const char *EnumNameAvgPoolCountType(AvgPoolCountType e) { -- if (e < AvgPoolCountType_DEFAULT || e > AvgPoolCountType_EXCLUDE_PADDING) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, AvgPoolCountType_DEFAULT, AvgPoolCountType_EXCLUDE_PADDING)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesAvgPoolCountType()[index]; - } - --enum EltwiseType { -+enum EltwiseType : int8_t { - EltwiseType_PROD = 0, - EltwiseType_SUM = 1, - EltwiseType_MAXIMUM = 2, -@@ -354,7 +388,7 @@ inline const EltwiseType (&EnumValuesEltwiseType())[4] { - } - - inline const char * const *EnumNamesEltwiseType() { -- static const char * const names[] = { -+ static const char * const names[5] = { - "PROD", - "SUM", - "MAXIMUM", -@@ -365,12 +399,12 @@ inline const char * const *EnumNamesEltwiseType() { - } - - inline const char *EnumNameEltwiseType(EltwiseType e) { -- if (e < EltwiseType_PROD || e > EltwiseType_SUB) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, EltwiseType_PROD, EltwiseType_SUB)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesEltwiseType()[index]; - } - --enum CoordinateTransformationMode { -+enum CoordinateTransformationMode : int8_t { - CoordinateTransformationMode_NotSet = 0, - CoordinateTransformationMode_AlignCorners = 1, - CoordinateTransformationMode_HalfPixels = 2, -@@ -396,7 +430,7 @@ inline const CoordinateTransformationMode (&EnumValuesCoordinateTransformationMo - } - - inline const char * const *EnumNamesCoordinateTransformationMode() { -- static const char * const names[] = { -+ static const char * const names[8] = { - "NotSet", - "AlignCorners", - "HalfPixels", -@@ -410,49 +444,34 @@ inline const char * const *EnumNamesCoordinateTransformationMode() { - } - - inline const char *EnumNameCoordinateTransformationMode(CoordinateTransformationMode e) { -- if (e < CoordinateTransformationMode_NotSet || e > CoordinateTransformationMode_TensorflowCropAndResize) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, CoordinateTransformationMode_NotSet, CoordinateTransformationMode_TensorflowCropAndResize)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesCoordinateTransformationMode()[index]; - } - - struct Convolution2DCommonT : public flatbuffers::NativeTable { - typedef Convolution2DCommon TableType; -- int32_t padX; -- int32_t padY; -- int32_t kernelX; -- int32_t kernelY; -- int32_t strideX; -- int32_t strideY; -- int32_t dilateX; -- int32_t dilateY; -- PadMode padMode; -- int32_t group; -- int32_t outputCount; -- int32_t inputCount; -- bool relu; -- bool relu6; -- std::vector pads; -- std::vector outPads; -- Convolution2DCommonT() -- : padX(0), -- padY(0), -- kernelX(1), -- kernelY(1), -- strideX(1), -- strideY(1), -- dilateX(1), -- dilateY(1), -- padMode(PadMode_CAFFE), -- group(1), -- outputCount(0), -- inputCount(0), -- relu(false), -- relu6(false) { -- } -+ int32_t padX = 0; -+ int32_t padY = 0; -+ int32_t kernelX = 1; -+ int32_t kernelY = 1; -+ int32_t strideX = 1; -+ int32_t strideY = 1; -+ int32_t dilateX = 1; -+ int32_t dilateY = 1; -+ MNN::PadMode padMode = MNN::PadMode_CAFFE; -+ int32_t group = 1; -+ int32_t outputCount = 0; -+ int32_t inputCount = 0; -+ bool relu = false; -+ bool relu6 = false; -+ std::vector pads{}; -+ std::vector outPads{}; - }; - - struct Convolution2DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef Convolution2DCommonT NativeTableType; -+ typedef Convolution2DCommonBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return Convolution2DCommonTypeTable(); - } -@@ -498,8 +517,8 @@ struct Convolution2DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table - int32_t dilateY() const { - return GetField(VT_DILATEY, 1); - } -- PadMode padMode() const { -- return static_cast(GetField(VT_PADMODE, 0)); -+ MNN::PadMode padMode() const { -+ return static_cast(GetField(VT_PADMODE, 0)); - } - int32_t group() const { - return GetField(VT_GROUP, 1); -@@ -550,6 +569,7 @@ struct Convolution2DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table - }; - - struct Convolution2DCommonBuilder { -+ typedef Convolution2DCommon Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_padX(int32_t padX) { -@@ -576,7 +596,7 @@ struct Convolution2DCommonBuilder { - void add_dilateY(int32_t dilateY) { - fbb_.AddElement(Convolution2DCommon::VT_DILATEY, dilateY, 1); - } -- void add_padMode(PadMode padMode) { -+ void add_padMode(MNN::PadMode padMode) { - fbb_.AddElement(Convolution2DCommon::VT_PADMODE, static_cast(padMode), 0); - } - void add_group(int32_t group) { -@@ -604,7 +624,6 @@ struct Convolution2DCommonBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- Convolution2DCommonBuilder &operator=(const Convolution2DCommonBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -622,7 +641,7 @@ inline flatbuffers::Offset CreateConvolution2DCommon( - int32_t strideY = 1, - int32_t dilateX = 1, - int32_t dilateY = 1, -- PadMode padMode = PadMode_CAFFE, -+ MNN::PadMode padMode = MNN::PadMode_CAFFE, - int32_t group = 1, - int32_t outputCount = 0, - int32_t inputCount = 0, -@@ -660,7 +679,7 @@ inline flatbuffers::Offset CreateConvolution2DCommonDirect( - int32_t strideY = 1, - int32_t dilateX = 1, - int32_t dilateY = 1, -- PadMode padMode = PadMode_CAFFE, -+ MNN::PadMode padMode = MNN::PadMode_CAFFE, - int32_t group = 1, - int32_t outputCount = 0, - int32_t inputCount = 0, -@@ -694,26 +713,20 @@ flatbuffers::Offset CreateConvolution2DCommon(flatbuffers:: - - struct Convolution3DCommonT : public flatbuffers::NativeTable { - typedef Convolution3DCommon TableType; -- std::vector dilates; -- std::vector strides; -- std::vector kernels; -- std::vector pads; -- PadMode padMode; -- int32_t inputCount; -- int32_t outputCount; -- bool relu; -- bool relu6; -- Convolution3DCommonT() -- : padMode(PadMode_CAFFE), -- inputCount(0), -- outputCount(0), -- relu(false), -- relu6(false) { -- } -+ std::vector dilates{}; -+ std::vector strides{}; -+ std::vector kernels{}; -+ std::vector pads{}; -+ MNN::PadMode padMode = MNN::PadMode_CAFFE; -+ int32_t inputCount = 0; -+ int32_t outputCount = 0; -+ bool relu = false; -+ bool relu6 = false; - }; - - struct Convolution3DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef Convolution3DCommonT NativeTableType; -+ typedef Convolution3DCommonBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return Convolution3DCommonTypeTable(); - } -@@ -740,8 +753,8 @@ struct Convolution3DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table - const flatbuffers::Vector *pads() const { - return GetPointer *>(VT_PADS); - } -- PadMode padMode() const { -- return static_cast(GetField(VT_PADMODE, 0)); -+ MNN::PadMode padMode() const { -+ return static_cast(GetField(VT_PADMODE, 0)); - } - int32_t inputCount() const { - return GetField(VT_INPUTCOUNT, 0); -@@ -778,6 +791,7 @@ struct Convolution3DCommon FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table - }; - - struct Convolution3DCommonBuilder { -+ typedef Convolution3DCommon Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_dilates(flatbuffers::Offset> dilates) { -@@ -792,7 +806,7 @@ struct Convolution3DCommonBuilder { - void add_pads(flatbuffers::Offset> pads) { - fbb_.AddOffset(Convolution3DCommon::VT_PADS, pads); - } -- void add_padMode(PadMode padMode) { -+ void add_padMode(MNN::PadMode padMode) { - fbb_.AddElement(Convolution3DCommon::VT_PADMODE, static_cast(padMode), 0); - } - void add_inputCount(int32_t inputCount) { -@@ -811,7 +825,6 @@ struct Convolution3DCommonBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- Convolution3DCommonBuilder &operator=(const Convolution3DCommonBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -825,7 +838,7 @@ inline flatbuffers::Offset CreateConvolution3DCommon( - flatbuffers::Offset> strides = 0, - flatbuffers::Offset> kernels = 0, - flatbuffers::Offset> pads = 0, -- PadMode padMode = PadMode_CAFFE, -+ MNN::PadMode padMode = MNN::PadMode_CAFFE, - int32_t inputCount = 0, - int32_t outputCount = 0, - bool relu = false, -@@ -849,7 +862,7 @@ inline flatbuffers::Offset CreateConvolution3DCommonDirect( - const std::vector *strides = nullptr, - const std::vector *kernels = nullptr, - const std::vector *pads = nullptr, -- PadMode padMode = PadMode_CAFFE, -+ MNN::PadMode padMode = MNN::PadMode_CAFFE, - int32_t inputCount = 0, - int32_t outputCount = 0, - bool relu = false, -@@ -875,32 +888,22 @@ flatbuffers::Offset CreateConvolution3DCommon(flatbuffers:: - - struct IDSTQuanT : public flatbuffers::NativeTable { - typedef IDSTQuan TableType; -- std::vector buffer; -- std::vector alpha; -- int32_t type; -- bool useInt32; -- float quantScale; -- float scaleIn; -- float scaleOut; -- int32_t aMax; -- int32_t aMin; -- int32_t readType; -- bool has_scaleInt; -- IDSTQuanT() -- : type(0), -- useInt32(false), -- quantScale(0.0f), -- scaleIn(0.0f), -- scaleOut(0.0f), -- aMax(0), -- aMin(0), -- readType(0), -- has_scaleInt(false) { -- } -+ std::vector buffer{}; -+ std::vector alpha{}; -+ int32_t type = 0; -+ bool useInt32 = false; -+ float quantScale = 0.0f; -+ float scaleIn = 0.0f; -+ float scaleOut = 0.0f; -+ int32_t aMax = 0; -+ int32_t aMin = 0; -+ int32_t readType = 0; -+ bool has_scaleInt = false; - }; - - struct IDSTQuan FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef IDSTQuanT NativeTableType; -+ typedef IDSTQuanBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return IDSTQuanTypeTable(); - } -@@ -973,6 +976,7 @@ struct IDSTQuan FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct IDSTQuanBuilder { -+ typedef IDSTQuan Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_buffer(flatbuffers::Offset> buffer) { -@@ -1012,7 +1016,6 @@ struct IDSTQuanBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- IDSTQuanBuilder &operator=(const IDSTQuanBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1082,20 +1085,17 @@ flatbuffers::Offset CreateIDSTQuan(flatbuffers::FlatBufferBuilder &_fb - - struct QuantizedFloatParamT : public flatbuffers::NativeTable { - typedef QuantizedFloatParam TableType; -- std::vector weight; -- std::vector bias; -- std::vector scale; -- std::vector tensorScale; -- QuantizeAlgo method; -- int32_t nbits; -- QuantizedFloatParamT() -- : method(QuantizeAlgo_DEFAULT), -- nbits(8) { -- } -+ std::vector weight{}; -+ std::vector bias{}; -+ std::vector scale{}; -+ std::vector tensorScale{}; -+ MNN::QuantizeAlgo method = MNN::QuantizeAlgo_DEFAULT; -+ int32_t nbits = 8; - }; - - struct QuantizedFloatParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedFloatParamT NativeTableType; -+ typedef QuantizedFloatParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedFloatParamTypeTable(); - } -@@ -1119,8 +1119,8 @@ struct QuantizedFloatParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table - const flatbuffers::Vector *tensorScale() const { - return GetPointer *>(VT_TENSORSCALE); - } -- QuantizeAlgo method() const { -- return static_cast(GetField(VT_METHOD, 0)); -+ MNN::QuantizeAlgo method() const { -+ return static_cast(GetField(VT_METHOD, 0)); - } - int32_t nbits() const { - return GetField(VT_NBITS, 8); -@@ -1145,6 +1145,7 @@ struct QuantizedFloatParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table - }; - - struct QuantizedFloatParamBuilder { -+ typedef QuantizedFloatParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_weight(flatbuffers::Offset> weight) { -@@ -1159,7 +1160,7 @@ struct QuantizedFloatParamBuilder { - void add_tensorScale(flatbuffers::Offset> tensorScale) { - fbb_.AddOffset(QuantizedFloatParam::VT_TENSORSCALE, tensorScale); - } -- void add_method(QuantizeAlgo method) { -+ void add_method(MNN::QuantizeAlgo method) { - fbb_.AddElement(QuantizedFloatParam::VT_METHOD, static_cast(method), 0); - } - void add_nbits(int32_t nbits) { -@@ -1169,7 +1170,6 @@ struct QuantizedFloatParamBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedFloatParamBuilder &operator=(const QuantizedFloatParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1183,7 +1183,7 @@ inline flatbuffers::Offset CreateQuantizedFloatParam( - flatbuffers::Offset> bias = 0, - flatbuffers::Offset> scale = 0, - flatbuffers::Offset> tensorScale = 0, -- QuantizeAlgo method = QuantizeAlgo_DEFAULT, -+ MNN::QuantizeAlgo method = MNN::QuantizeAlgo_DEFAULT, - int32_t nbits = 8) { - QuantizedFloatParamBuilder builder_(_fbb); - builder_.add_nbits(nbits); -@@ -1201,7 +1201,7 @@ inline flatbuffers::Offset CreateQuantizedFloatParamDirect( - const std::vector *bias = nullptr, - const std::vector *scale = nullptr, - const std::vector *tensorScale = nullptr, -- QuantizeAlgo method = QuantizeAlgo_DEFAULT, -+ MNN::QuantizeAlgo method = MNN::QuantizeAlgo_DEFAULT, - int32_t nbits = 8) { - auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; - auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; -@@ -1221,17 +1221,16 @@ flatbuffers::Offset CreateQuantizedFloatParam(flatbuffers:: - - struct Convolution2DT : public flatbuffers::NativeTable { - typedef Convolution2D TableType; -- std::unique_ptr common; -- std::vector weight; -- std::vector bias; -- std::unique_ptr quanParameter; -- std::unique_ptr symmetricQuan; -- Convolution2DT() { -- } -+ std::unique_ptr common{}; -+ std::vector weight{}; -+ std::vector bias{}; -+ std::unique_ptr quanParameter{}; -+ std::unique_ptr symmetricQuan{}; - }; - - struct Convolution2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef Convolution2DT NativeTableType; -+ typedef Convolution2DBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return Convolution2DTypeTable(); - } -@@ -1242,8 +1241,8 @@ struct Convolution2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_QUANPARAMETER = 10, - VT_SYMMETRICQUAN = 12 - }; -- const Convolution2DCommon *common() const { -- return GetPointer(VT_COMMON); -+ const MNN::Convolution2DCommon *common() const { -+ return GetPointer(VT_COMMON); - } - const flatbuffers::Vector *weight() const { - return GetPointer *>(VT_WEIGHT); -@@ -1251,11 +1250,11 @@ struct Convolution2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *bias() const { - return GetPointer *>(VT_BIAS); - } -- const IDSTQuan *quanParameter() const { -- return GetPointer(VT_QUANPARAMETER); -+ const MNN::IDSTQuan *quanParameter() const { -+ return GetPointer(VT_QUANPARAMETER); - } -- const QuantizedFloatParam *symmetricQuan() const { -- return GetPointer(VT_SYMMETRICQUAN); -+ const MNN::QuantizedFloatParam *symmetricQuan() const { -+ return GetPointer(VT_SYMMETRICQUAN); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1277,9 +1276,10 @@ struct Convolution2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct Convolution2DBuilder { -+ typedef Convolution2D Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_common(flatbuffers::Offset common) { -+ void add_common(flatbuffers::Offset common) { - fbb_.AddOffset(Convolution2D::VT_COMMON, common); - } - void add_weight(flatbuffers::Offset> weight) { -@@ -1288,17 +1288,16 @@ struct Convolution2DBuilder { - void add_bias(flatbuffers::Offset> bias) { - fbb_.AddOffset(Convolution2D::VT_BIAS, bias); - } -- void add_quanParameter(flatbuffers::Offset quanParameter) { -+ void add_quanParameter(flatbuffers::Offset quanParameter) { - fbb_.AddOffset(Convolution2D::VT_QUANPARAMETER, quanParameter); - } -- void add_symmetricQuan(flatbuffers::Offset symmetricQuan) { -+ void add_symmetricQuan(flatbuffers::Offset symmetricQuan) { - fbb_.AddOffset(Convolution2D::VT_SYMMETRICQUAN, symmetricQuan); - } - explicit Convolution2DBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- Convolution2DBuilder &operator=(const Convolution2DBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1308,11 +1307,11 @@ struct Convolution2DBuilder { - - inline flatbuffers::Offset CreateConvolution2D( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset common = 0, -+ flatbuffers::Offset common = 0, - flatbuffers::Offset> weight = 0, - flatbuffers::Offset> bias = 0, -- flatbuffers::Offset quanParameter = 0, -- flatbuffers::Offset symmetricQuan = 0) { -+ flatbuffers::Offset quanParameter = 0, -+ flatbuffers::Offset symmetricQuan = 0) { - Convolution2DBuilder builder_(_fbb); - builder_.add_symmetricQuan(symmetricQuan); - builder_.add_quanParameter(quanParameter); -@@ -1324,11 +1323,11 @@ inline flatbuffers::Offset CreateConvolution2D( - - inline flatbuffers::Offset CreateConvolution2DDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset common = 0, -+ flatbuffers::Offset common = 0, - const std::vector *weight = nullptr, - const std::vector *bias = nullptr, -- flatbuffers::Offset quanParameter = 0, -- flatbuffers::Offset symmetricQuan = 0) { -+ flatbuffers::Offset quanParameter = 0, -+ flatbuffers::Offset symmetricQuan = 0) { - auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; - auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; - return MNN::CreateConvolution2D( -@@ -1344,15 +1343,14 @@ flatbuffers::Offset CreateConvolution2D(flatbuffers::FlatBufferBu - - struct Convolution3DT : public flatbuffers::NativeTable { - typedef Convolution3D TableType; -- std::unique_ptr common; -- std::vector weight; -- std::vector bias; -- Convolution3DT() { -- } -+ std::unique_ptr common{}; -+ std::vector weight{}; -+ std::vector bias{}; - }; - - struct Convolution3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef Convolution3DT NativeTableType; -+ typedef Convolution3DBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return Convolution3DTypeTable(); - } -@@ -1361,8 +1359,8 @@ struct Convolution3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_WEIGHT = 6, - VT_BIAS = 8 - }; -- const Convolution3DCommon *common() const { -- return GetPointer(VT_COMMON); -+ const MNN::Convolution3DCommon *common() const { -+ return GetPointer(VT_COMMON); - } - const flatbuffers::Vector *weight() const { - return GetPointer *>(VT_WEIGHT); -@@ -1386,9 +1384,10 @@ struct Convolution3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct Convolution3DBuilder { -+ typedef Convolution3D Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_common(flatbuffers::Offset common) { -+ void add_common(flatbuffers::Offset common) { - fbb_.AddOffset(Convolution3D::VT_COMMON, common); - } - void add_weight(flatbuffers::Offset> weight) { -@@ -1401,7 +1400,6 @@ struct Convolution3DBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- Convolution3DBuilder &operator=(const Convolution3DBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1411,7 +1409,7 @@ struct Convolution3DBuilder { - - inline flatbuffers::Offset CreateConvolution3D( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset common = 0, -+ flatbuffers::Offset common = 0, - flatbuffers::Offset> weight = 0, - flatbuffers::Offset> bias = 0) { - Convolution3DBuilder builder_(_fbb); -@@ -1423,7 +1421,7 @@ inline flatbuffers::Offset CreateConvolution3D( - - inline flatbuffers::Offset CreateConvolution3DDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset common = 0, -+ flatbuffers::Offset common = 0, - const std::vector *weight = nullptr, - const std::vector *bias = nullptr) { - auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; -@@ -1439,25 +1437,19 @@ flatbuffers::Offset CreateConvolution3D(flatbuffers::FlatBufferBu - - struct InnerProductT : public flatbuffers::NativeTable { - typedef InnerProduct TableType; -- int32_t outputCount; -- int32_t biasTerm; -- int32_t weightSize; -- std::vector weight; -- std::vector bias; -- int32_t axis; -- bool transpose; -- std::unique_ptr quanParameter; -- InnerProductT() -- : outputCount(0), -- biasTerm(0), -- weightSize(0), -- axis(0), -- transpose(false) { -- } -+ int32_t outputCount = 0; -+ int32_t biasTerm = 0; -+ int32_t weightSize = 0; -+ std::vector weight{}; -+ std::vector bias{}; -+ int32_t axis = 0; -+ bool transpose = false; -+ std::unique_ptr quanParameter{}; - }; - - struct InnerProduct FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef InnerProductT NativeTableType; -+ typedef InnerProductBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return InnerProductTypeTable(); - } -@@ -1492,8 +1484,8 @@ struct InnerProduct FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - bool transpose() const { - return GetField(VT_TRANSPOSE, 0) != 0; - } -- const IDSTQuan *quanParameter() const { -- return GetPointer(VT_QUANPARAMETER); -+ const MNN::IDSTQuan *quanParameter() const { -+ return GetPointer(VT_QUANPARAMETER); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1516,6 +1508,7 @@ struct InnerProduct FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct InnerProductBuilder { -+ typedef InnerProduct Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_outputCount(int32_t outputCount) { -@@ -1539,14 +1532,13 @@ struct InnerProductBuilder { - void add_transpose(bool transpose) { - fbb_.AddElement(InnerProduct::VT_TRANSPOSE, static_cast(transpose), 0); - } -- void add_quanParameter(flatbuffers::Offset quanParameter) { -+ void add_quanParameter(flatbuffers::Offset quanParameter) { - fbb_.AddOffset(InnerProduct::VT_QUANPARAMETER, quanParameter); - } - explicit InnerProductBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- InnerProductBuilder &operator=(const InnerProductBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1563,7 +1555,7 @@ inline flatbuffers::Offset CreateInnerProduct( - flatbuffers::Offset> bias = 0, - int32_t axis = 0, - bool transpose = false, -- flatbuffers::Offset quanParameter = 0) { -+ flatbuffers::Offset quanParameter = 0) { - InnerProductBuilder builder_(_fbb); - builder_.add_quanParameter(quanParameter); - builder_.add_axis(axis); -@@ -1585,7 +1577,7 @@ inline flatbuffers::Offset CreateInnerProductDirect( - const std::vector *bias = nullptr, - int32_t axis = 0, - bool transpose = false, -- flatbuffers::Offset quanParameter = 0) { -+ flatbuffers::Offset quanParameter = 0) { - auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; - auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; - return MNN::CreateInnerProduct( -@@ -1604,37 +1596,24 @@ flatbuffers::Offset CreateInnerProduct(flatbuffers::FlatBufferBuil - - struct PoolT : public flatbuffers::NativeTable { - typedef Pool TableType; -- int32_t padX; -- int32_t padY; -- bool isGlobal; -- int32_t kernelX; -- int32_t kernelY; -- int32_t strideX; -- int32_t strideY; -- PoolType type; -- PoolPadType padType; -- DataType dataType; -- bool ceilModel; -- std::vector pads; -- AvgPoolCountType countType; -- PoolT() -- : padX(0), -- padY(0), -- isGlobal(false), -- kernelX(0), -- kernelY(0), -- strideX(0), -- strideY(0), -- type(PoolType_MAXPOOL), -- padType(PoolPadType_CAFFE), -- dataType(DataType_DT_FLOAT), -- ceilModel(true), -- countType(AvgPoolCountType_DEFAULT) { -- } -+ int32_t padX = 0; -+ int32_t padY = 0; -+ bool isGlobal = false; -+ int32_t kernelX = 0; -+ int32_t kernelY = 0; -+ int32_t strideX = 0; -+ int32_t strideY = 0; -+ MNN::PoolType type = MNN::PoolType_MAXPOOL; -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE; -+ MNN::DataType dataType = MNN::DataType_DT_FLOAT; -+ bool ceilModel = true; -+ std::vector pads{}; -+ MNN::AvgPoolCountType countType = MNN::AvgPoolCountType_DEFAULT; - }; - - struct Pool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef PoolT NativeTableType; -+ typedef PoolBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return PoolTypeTable(); - } -@@ -1674,14 +1653,14 @@ struct Pool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t strideY() const { - return GetField(VT_STRIDEY, 0); - } -- PoolType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::PoolType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } -- PoolPadType padType() const { -- return static_cast(GetField(VT_PADTYPE, 0)); -+ MNN::PoolPadType padType() const { -+ return static_cast(GetField(VT_PADTYPE, 0)); - } -- DataType dataType() const { -- return static_cast(GetField(VT_DATATYPE, 1)); -+ MNN::DataType dataType() const { -+ return static_cast(GetField(VT_DATATYPE, 1)); - } - bool ceilModel() const { - return GetField(VT_CEILMODEL, 1) != 0; -@@ -1689,8 +1668,8 @@ struct Pool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *pads() const { - return GetPointer *>(VT_PADS); - } -- AvgPoolCountType countType() const { -- return static_cast(GetField(VT_COUNTTYPE, 0)); -+ MNN::AvgPoolCountType countType() const { -+ return static_cast(GetField(VT_COUNTTYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1716,6 +1695,7 @@ struct Pool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct PoolBuilder { -+ typedef Pool Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_padX(int32_t padX) { -@@ -1739,13 +1719,13 @@ struct PoolBuilder { - void add_strideY(int32_t strideY) { - fbb_.AddElement(Pool::VT_STRIDEY, strideY, 0); - } -- void add_type(PoolType type) { -+ void add_type(MNN::PoolType type) { - fbb_.AddElement(Pool::VT_TYPE, static_cast(type), 0); - } -- void add_padType(PoolPadType padType) { -+ void add_padType(MNN::PoolPadType padType) { - fbb_.AddElement(Pool::VT_PADTYPE, static_cast(padType), 0); - } -- void add_dataType(DataType dataType) { -+ void add_dataType(MNN::DataType dataType) { - fbb_.AddElement(Pool::VT_DATATYPE, static_cast(dataType), 1); - } - void add_ceilModel(bool ceilModel) { -@@ -1754,14 +1734,13 @@ struct PoolBuilder { - void add_pads(flatbuffers::Offset> pads) { - fbb_.AddOffset(Pool::VT_PADS, pads); - } -- void add_countType(AvgPoolCountType countType) { -+ void add_countType(MNN::AvgPoolCountType countType) { - fbb_.AddElement(Pool::VT_COUNTTYPE, static_cast(countType), 0); - } - explicit PoolBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- PoolBuilder &operator=(const PoolBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1778,12 +1757,12 @@ inline flatbuffers::Offset CreatePool( - int32_t kernelY = 0, - int32_t strideX = 0, - int32_t strideY = 0, -- PoolType type = PoolType_MAXPOOL, -- PoolPadType padType = PoolPadType_CAFFE, -- DataType dataType = DataType_DT_FLOAT, -+ MNN::PoolType type = MNN::PoolType_MAXPOOL, -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE, -+ MNN::DataType dataType = MNN::DataType_DT_FLOAT, - bool ceilModel = true, - flatbuffers::Offset> pads = 0, -- AvgPoolCountType countType = AvgPoolCountType_DEFAULT) { -+ MNN::AvgPoolCountType countType = MNN::AvgPoolCountType_DEFAULT) { - PoolBuilder builder_(_fbb); - builder_.add_pads(pads); - builder_.add_dataType(dataType); -@@ -1810,12 +1789,12 @@ inline flatbuffers::Offset CreatePoolDirect( - int32_t kernelY = 0, - int32_t strideX = 0, - int32_t strideY = 0, -- PoolType type = PoolType_MAXPOOL, -- PoolPadType padType = PoolPadType_CAFFE, -- DataType dataType = DataType_DT_FLOAT, -+ MNN::PoolType type = MNN::PoolType_MAXPOOL, -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE, -+ MNN::DataType dataType = MNN::DataType_DT_FLOAT, - bool ceilModel = true, - const std::vector *pads = nullptr, -- AvgPoolCountType countType = AvgPoolCountType_DEFAULT) { -+ MNN::AvgPoolCountType countType = MNN::AvgPoolCountType_DEFAULT) { - auto pads__ = pads ? _fbb.CreateVector(*pads) : 0; - return MNN::CreatePool( - _fbb, -@@ -1838,19 +1817,16 @@ flatbuffers::Offset CreatePool(flatbuffers::FlatBufferBuilder &_fbb, const - - struct Pool3DT : public flatbuffers::NativeTable { - typedef Pool3D TableType; -- std::vector strides; -- std::vector kernels; -- std::vector pads; -- PoolType type; -- PoolPadType padType; -- Pool3DT() -- : type(PoolType_MAXPOOL), -- padType(PoolPadType_CAFFE) { -- } -+ std::vector strides{}; -+ std::vector kernels{}; -+ std::vector pads{}; -+ MNN::PoolType type = MNN::PoolType_MAXPOOL; -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE; - }; - - struct Pool3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef Pool3DT NativeTableType; -+ typedef Pool3DBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return Pool3DTypeTable(); - } -@@ -1870,11 +1846,11 @@ struct Pool3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *pads() const { - return GetPointer *>(VT_PADS); - } -- PoolType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::PoolType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } -- PoolPadType padType() const { -- return static_cast(GetField(VT_PADTYPE, 0)); -+ MNN::PoolPadType padType() const { -+ return static_cast(GetField(VT_PADTYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1894,6 +1870,7 @@ struct Pool3D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct Pool3DBuilder { -+ typedef Pool3D Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_strides(flatbuffers::Offset> strides) { -@@ -1905,17 +1882,16 @@ struct Pool3DBuilder { - void add_pads(flatbuffers::Offset> pads) { - fbb_.AddOffset(Pool3D::VT_PADS, pads); - } -- void add_type(PoolType type) { -+ void add_type(MNN::PoolType type) { - fbb_.AddElement(Pool3D::VT_TYPE, static_cast(type), 0); - } -- void add_padType(PoolPadType padType) { -+ void add_padType(MNN::PoolPadType padType) { - fbb_.AddElement(Pool3D::VT_PADTYPE, static_cast(padType), 0); - } - explicit Pool3DBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- Pool3DBuilder &operator=(const Pool3DBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1928,8 +1904,8 @@ inline flatbuffers::Offset CreatePool3D( - flatbuffers::Offset> strides = 0, - flatbuffers::Offset> kernels = 0, - flatbuffers::Offset> pads = 0, -- PoolType type = PoolType_MAXPOOL, -- PoolPadType padType = PoolPadType_CAFFE) { -+ MNN::PoolType type = MNN::PoolType_MAXPOOL, -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE) { - Pool3DBuilder builder_(_fbb); - builder_.add_pads(pads); - builder_.add_kernels(kernels); -@@ -1944,8 +1920,8 @@ inline flatbuffers::Offset CreatePool3DDirect( - const std::vector *strides = nullptr, - const std::vector *kernels = nullptr, - const std::vector *pads = nullptr, -- PoolType type = PoolType_MAXPOOL, -- PoolPadType padType = PoolPadType_CAFFE) { -+ MNN::PoolType type = MNN::PoolType_MAXPOOL, -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE) { - auto strides__ = strides ? _fbb.CreateVector(*strides) : 0; - auto kernels__ = kernels ? _fbb.CreateVector(*kernels) : 0; - auto pads__ = pads ? _fbb.CreateVector(*pads) : 0; -@@ -1962,14 +1938,12 @@ flatbuffers::Offset CreatePool3D(flatbuffers::FlatBufferBuilder &_fbb, c - - struct ReluT : public flatbuffers::NativeTable { - typedef Relu TableType; -- float slope; -- ReluT() -- : slope(0.0f) { -- } -+ float slope = 0.0f; - }; - - struct Relu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ReluT NativeTableType; -+ typedef ReluBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ReluTypeTable(); - } -@@ -1990,6 +1964,7 @@ struct Relu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ReluBuilder { -+ typedef Relu Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_slope(float slope) { -@@ -1999,7 +1974,6 @@ struct ReluBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ReluBuilder &operator=(const ReluBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2019,16 +1993,13 @@ flatbuffers::Offset CreateRelu(flatbuffers::FlatBufferBuilder &_fbb, const - - struct Relu6T : public flatbuffers::NativeTable { - typedef Relu6 TableType; -- float minValue; -- float maxValue; -- Relu6T() -- : minValue(0.0f), -- maxValue(6.0f) { -- } -+ float minValue = 0.0f; -+ float maxValue = 6.0f; - }; - - struct Relu6 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef Relu6T NativeTableType; -+ typedef Relu6Builder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return Relu6TypeTable(); - } -@@ -2054,6 +2025,7 @@ struct Relu6 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct Relu6Builder { -+ typedef Relu6 Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_minValue(float minValue) { -@@ -2066,7 +2038,6 @@ struct Relu6Builder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- Relu6Builder &operator=(const Relu6Builder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2088,15 +2059,13 @@ flatbuffers::Offset CreateRelu6(flatbuffers::FlatBufferBuilder &_fbb, con - - struct PReluT : public flatbuffers::NativeTable { - typedef PRelu TableType; -- int32_t slopeCount; -- std::vector slope; -- PReluT() -- : slopeCount(0) { -- } -+ int32_t slopeCount = 0; -+ std::vector slope{}; - }; - - struct PRelu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef PReluT NativeTableType; -+ typedef PReluBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return PReluTypeTable(); - } -@@ -2123,6 +2092,7 @@ struct PRelu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct PReluBuilder { -+ typedef PRelu Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_slopeCount(int32_t slopeCount) { -@@ -2135,7 +2105,6 @@ struct PReluBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- PReluBuilder &operator=(const PReluBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2168,14 +2137,12 @@ flatbuffers::Offset CreatePRelu(flatbuffers::FlatBufferBuilder &_fbb, con - - struct ELUT : public flatbuffers::NativeTable { - typedef ELU TableType; -- float alpha; -- ELUT() -- : alpha(0.0f) { -- } -+ float alpha = 0.0f; - }; - - struct ELU FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ELUT NativeTableType; -+ typedef ELUBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ELUTypeTable(); - } -@@ -2196,6 +2163,7 @@ struct ELU FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ELUBuilder { -+ typedef ELU Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_alpha(float alpha) { -@@ -2205,7 +2173,6 @@ struct ELUBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ELUBuilder &operator=(const ELUBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2225,20 +2192,15 @@ flatbuffers::Offset CreateELU(flatbuffers::FlatBufferBuilder &_fbb, const E - - struct LRNT : public flatbuffers::NativeTable { - typedef LRN TableType; -- int32_t regionType; -- int32_t localSize; -- float alpha; -- float beta; -- LRNT() -- : regionType(0), -- localSize(0), -- alpha(0.0f), -- beta(0.0f) { -- } -+ int32_t regionType = 0; -+ int32_t localSize = 0; -+ float alpha = 0.0f; -+ float beta = 0.0f; - }; - - struct LRN FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef LRNT NativeTableType; -+ typedef LRNBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return LRNTypeTable(); - } -@@ -2274,6 +2236,7 @@ struct LRN FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct LRNBuilder { -+ typedef LRN Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_regionType(int32_t regionType) { -@@ -2292,7 +2255,6 @@ struct LRNBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- LRNBuilder &operator=(const LRNBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2318,20 +2280,15 @@ flatbuffers::Offset CreateLRN(flatbuffers::FlatBufferBuilder &_fbb, const L - - struct ArgMaxT : public flatbuffers::NativeTable { - typedef ArgMax TableType; -- int32_t outMaxVal; -- int32_t topK; -- int32_t axis; -- int32_t softmaxThreshold; -- ArgMaxT() -- : outMaxVal(0), -- topK(0), -- axis(0), -- softmaxThreshold(0) { -- } -+ int32_t outMaxVal = 0; -+ int32_t topK = 0; -+ int32_t axis = 0; -+ int32_t softmaxThreshold = 0; - }; - - struct ArgMax FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ArgMaxT NativeTableType; -+ typedef ArgMaxBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ArgMaxTypeTable(); - } -@@ -2367,6 +2324,7 @@ struct ArgMax FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ArgMaxBuilder { -+ typedef ArgMax Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_outMaxVal(int32_t outMaxVal) { -@@ -2385,7 +2343,6 @@ struct ArgMaxBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ArgMaxBuilder &operator=(const ArgMaxBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2411,14 +2368,12 @@ flatbuffers::Offset CreateArgMax(flatbuffers::FlatBufferBuilder &_fbb, c - - struct AxisT : public flatbuffers::NativeTable { - typedef Axis TableType; -- int32_t axis; -- AxisT() -- : axis(0) { -- } -+ int32_t axis = 0; - }; - - struct Axis FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AxisT NativeTableType; -+ typedef AxisBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return AxisTypeTable(); - } -@@ -2439,6 +2394,7 @@ struct Axis FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct AxisBuilder { -+ typedef Axis Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_axis(int32_t axis) { -@@ -2448,7 +2404,6 @@ struct AxisBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- AxisBuilder &operator=(const AxisBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2468,17 +2423,14 @@ flatbuffers::Offset CreateAxis(flatbuffers::FlatBufferBuilder &_fbb, const - - struct InputT : public flatbuffers::NativeTable { - typedef Input TableType; -- std::vector dims; -- DataType dtype; -- MNN_DATA_FORMAT dformat; -- InputT() -- : dtype(DataType_DT_FLOAT), -- dformat(MNN_DATA_FORMAT_NC4HW4) { -- } -+ std::vector dims{}; -+ MNN::DataType dtype = MNN::DataType_DT_FLOAT; -+ MNN::MNN_DATA_FORMAT dformat = MNN::MNN_DATA_FORMAT_NC4HW4; - }; - - struct Input FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef InputT NativeTableType; -+ typedef InputBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return InputTypeTable(); - } -@@ -2490,11 +2442,11 @@ struct Input FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *dims() const { - return GetPointer *>(VT_DIMS); - } -- DataType dtype() const { -- return static_cast(GetField(VT_DTYPE, 1)); -+ MNN::DataType dtype() const { -+ return static_cast(GetField(VT_DTYPE, 1)); - } -- MNN_DATA_FORMAT dformat() const { -- return static_cast(GetField(VT_DFORMAT, 2)); -+ MNN::MNN_DATA_FORMAT dformat() const { -+ return static_cast(GetField(VT_DFORMAT, 2)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2510,22 +2462,22 @@ struct Input FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct InputBuilder { -+ typedef Input Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_dims(flatbuffers::Offset> dims) { - fbb_.AddOffset(Input::VT_DIMS, dims); - } -- void add_dtype(DataType dtype) { -+ void add_dtype(MNN::DataType dtype) { - fbb_.AddElement(Input::VT_DTYPE, static_cast(dtype), 1); - } -- void add_dformat(MNN_DATA_FORMAT dformat) { -+ void add_dformat(MNN::MNN_DATA_FORMAT dformat) { - fbb_.AddElement(Input::VT_DFORMAT, static_cast(dformat), 2); - } - explicit InputBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- InputBuilder &operator=(const InputBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2536,8 +2488,8 @@ struct InputBuilder { - inline flatbuffers::Offset CreateInput( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> dims = 0, -- DataType dtype = DataType_DT_FLOAT, -- MNN_DATA_FORMAT dformat = MNN_DATA_FORMAT_NC4HW4) { -+ MNN::DataType dtype = MNN::DataType_DT_FLOAT, -+ MNN::MNN_DATA_FORMAT dformat = MNN::MNN_DATA_FORMAT_NC4HW4) { - InputBuilder builder_(_fbb); - builder_.add_dtype(dtype); - builder_.add_dims(dims); -@@ -2548,8 +2500,8 @@ inline flatbuffers::Offset CreateInput( - inline flatbuffers::Offset CreateInputDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *dims = nullptr, -- DataType dtype = DataType_DT_FLOAT, -- MNN_DATA_FORMAT dformat = MNN_DATA_FORMAT_NC4HW4) { -+ MNN::DataType dtype = MNN::DataType_DT_FLOAT, -+ MNN::MNN_DATA_FORMAT dformat = MNN::MNN_DATA_FORMAT_NC4HW4) { - auto dims__ = dims ? _fbb.CreateVector(*dims) : 0; - return MNN::CreateInput( - _fbb, -@@ -2562,25 +2514,20 @@ flatbuffers::Offset CreateInput(flatbuffers::FlatBufferBuilder &_fbb, con - - struct LSTMT : public flatbuffers::NativeTable { - typedef LSTM TableType; -- int32_t outputCount; -- int32_t weightSize; -- float clippingThreshold; -- std::unique_ptr weightI; -- std::unique_ptr weightH; -- std::unique_ptr bias; -- std::unique_ptr weightIQ; -- std::unique_ptr weightIA; -- float quantScale; -- LSTMT() -- : outputCount(0), -- weightSize(0), -- clippingThreshold(0.0f), -- quantScale(0.0f) { -- } -+ int32_t outputCount = 0; -+ int32_t weightSize = 0; -+ float clippingThreshold = 0.0f; -+ std::unique_ptr weightI{}; -+ std::unique_ptr weightH{}; -+ std::unique_ptr bias{}; -+ std::unique_ptr weightIQ{}; -+ std::unique_ptr weightIA{}; -+ float quantScale = 0.0f; - }; - - struct LSTM FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef LSTMT NativeTableType; -+ typedef LSTMBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return LSTMTypeTable(); - } -@@ -2604,20 +2551,20 @@ struct LSTM FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - float clippingThreshold() const { - return GetField(VT_CLIPPINGTHRESHOLD, 0.0f); - } -- const Blob *weightI() const { -- return GetPointer(VT_WEIGHTI); -+ const MNN::Blob *weightI() const { -+ return GetPointer(VT_WEIGHTI); - } -- const Blob *weightH() const { -- return GetPointer(VT_WEIGHTH); -+ const MNN::Blob *weightH() const { -+ return GetPointer(VT_WEIGHTH); - } -- const Blob *bias() const { -- return GetPointer(VT_BIAS); -+ const MNN::Blob *bias() const { -+ return GetPointer(VT_BIAS); - } -- const Blob *weightIQ() const { -- return GetPointer(VT_WEIGHTIQ); -+ const MNN::Blob *weightIQ() const { -+ return GetPointer(VT_WEIGHTIQ); - } -- const Blob *weightIA() const { -- return GetPointer(VT_WEIGHTIA); -+ const MNN::Blob *weightIA() const { -+ return GetPointer(VT_WEIGHTIA); - } - float quantScale() const { - return GetField(VT_QUANTSCALE, 0.0f); -@@ -2646,6 +2593,7 @@ struct LSTM FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct LSTMBuilder { -+ typedef LSTM Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_outputCount(int32_t outputCount) { -@@ -2657,19 +2605,19 @@ struct LSTMBuilder { - void add_clippingThreshold(float clippingThreshold) { - fbb_.AddElement(LSTM::VT_CLIPPINGTHRESHOLD, clippingThreshold, 0.0f); - } -- void add_weightI(flatbuffers::Offset weightI) { -+ void add_weightI(flatbuffers::Offset weightI) { - fbb_.AddOffset(LSTM::VT_WEIGHTI, weightI); - } -- void add_weightH(flatbuffers::Offset weightH) { -+ void add_weightH(flatbuffers::Offset weightH) { - fbb_.AddOffset(LSTM::VT_WEIGHTH, weightH); - } -- void add_bias(flatbuffers::Offset bias) { -+ void add_bias(flatbuffers::Offset bias) { - fbb_.AddOffset(LSTM::VT_BIAS, bias); - } -- void add_weightIQ(flatbuffers::Offset weightIQ) { -+ void add_weightIQ(flatbuffers::Offset weightIQ) { - fbb_.AddOffset(LSTM::VT_WEIGHTIQ, weightIQ); - } -- void add_weightIA(flatbuffers::Offset weightIA) { -+ void add_weightIA(flatbuffers::Offset weightIA) { - fbb_.AddOffset(LSTM::VT_WEIGHTIA, weightIA); - } - void add_quantScale(float quantScale) { -@@ -2679,7 +2627,6 @@ struct LSTMBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- LSTMBuilder &operator=(const LSTMBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2692,11 +2639,11 @@ inline flatbuffers::Offset CreateLSTM( - int32_t outputCount = 0, - int32_t weightSize = 0, - float clippingThreshold = 0.0f, -- flatbuffers::Offset weightI = 0, -- flatbuffers::Offset weightH = 0, -- flatbuffers::Offset bias = 0, -- flatbuffers::Offset weightIQ = 0, -- flatbuffers::Offset weightIA = 0, -+ flatbuffers::Offset weightI = 0, -+ flatbuffers::Offset weightH = 0, -+ flatbuffers::Offset bias = 0, -+ flatbuffers::Offset weightIQ = 0, -+ flatbuffers::Offset weightIA = 0, - float quantScale = 0.0f) { - LSTMBuilder builder_(_fbb); - builder_.add_quantScale(quantScale); -@@ -2715,17 +2662,14 @@ flatbuffers::Offset CreateLSTM(flatbuffers::FlatBufferBuilder &_fbb, const - - struct SliceT : public flatbuffers::NativeTable { - typedef Slice TableType; -- int32_t axis; -- std::vector slicePoints; -- NetSource sourceType; -- SliceT() -- : axis(0), -- sourceType(NetSource_CAFFE) { -- } -+ int32_t axis = 0; -+ std::vector slicePoints{}; -+ MNN::NetSource sourceType = MNN::NetSource_CAFFE; - }; - - struct Slice FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SliceT NativeTableType; -+ typedef SliceBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return SliceTypeTable(); - } -@@ -2740,8 +2684,8 @@ struct Slice FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *slicePoints() const { - return GetPointer *>(VT_SLICEPOINTS); - } -- NetSource sourceType() const { -- return static_cast(GetField(VT_SOURCETYPE, 0)); -+ MNN::NetSource sourceType() const { -+ return static_cast(GetField(VT_SOURCETYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2757,6 +2701,7 @@ struct Slice FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct SliceBuilder { -+ typedef Slice Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_axis(int32_t axis) { -@@ -2765,14 +2710,13 @@ struct SliceBuilder { - void add_slicePoints(flatbuffers::Offset> slicePoints) { - fbb_.AddOffset(Slice::VT_SLICEPOINTS, slicePoints); - } -- void add_sourceType(NetSource sourceType) { -+ void add_sourceType(MNN::NetSource sourceType) { - fbb_.AddElement(Slice::VT_SOURCETYPE, static_cast(sourceType), 0); - } - explicit SliceBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- SliceBuilder &operator=(const SliceBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2784,7 +2728,7 @@ inline flatbuffers::Offset CreateSlice( - flatbuffers::FlatBufferBuilder &_fbb, - int32_t axis = 0, - flatbuffers::Offset> slicePoints = 0, -- NetSource sourceType = NetSource_CAFFE) { -+ MNN::NetSource sourceType = MNN::NetSource_CAFFE) { - SliceBuilder builder_(_fbb); - builder_.add_slicePoints(slicePoints); - builder_.add_axis(axis); -@@ -2796,7 +2740,7 @@ inline flatbuffers::Offset CreateSliceDirect( - flatbuffers::FlatBufferBuilder &_fbb, - int32_t axis = 0, - const std::vector *slicePoints = nullptr, -- NetSource sourceType = NetSource_CAFFE) { -+ MNN::NetSource sourceType = MNN::NetSource_CAFFE) { - auto slicePoints__ = slicePoints ? _fbb.CreateVector(*slicePoints) : 0; - return MNN::CreateSlice( - _fbb, -@@ -2809,22 +2753,19 @@ flatbuffers::Offset CreateSlice(flatbuffers::FlatBufferBuilder &_fbb, con - - struct BatchNormT : public flatbuffers::NativeTable { - typedef BatchNorm TableType; -- int32_t channels; -- std::vector slopeData; -- std::vector meanData; -- std::vector varData; -- std::vector biasData; -- std::vector Adata; -- std::vector Bdata; -- float epsilon; -- BatchNormT() -- : channels(0), -- epsilon(0.001f) { -- } -+ int32_t channels = 0; -+ std::vector slopeData{}; -+ std::vector meanData{}; -+ std::vector varData{}; -+ std::vector biasData{}; -+ std::vector Adata{}; -+ std::vector Bdata{}; -+ float epsilon = 0.001f; - }; - - struct BatchNorm FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef BatchNormT NativeTableType; -+ typedef BatchNormBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return BatchNormTypeTable(); - } -@@ -2886,6 +2827,7 @@ struct BatchNorm FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct BatchNormBuilder { -+ typedef BatchNorm Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_channels(int32_t channels) { -@@ -2916,7 +2858,6 @@ struct BatchNormBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- BatchNormBuilder &operator=(const BatchNormBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2978,16 +2919,14 @@ flatbuffers::Offset CreateBatchNorm(flatbuffers::FlatBufferBuilder &_ - - struct ScaleT : public flatbuffers::NativeTable { - typedef Scale TableType; -- int32_t channels; -- std::vector scaleData; -- std::vector biasData; -- ScaleT() -- : channels(0) { -- } -+ int32_t channels = 0; -+ std::vector scaleData{}; -+ std::vector biasData{}; - }; - - struct Scale FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ScaleT NativeTableType; -+ typedef ScaleBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ScaleTypeTable(); - } -@@ -3020,6 +2959,7 @@ struct Scale FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ScaleBuilder { -+ typedef Scale Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_channels(int32_t channels) { -@@ -3035,7 +2975,6 @@ struct ScaleBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ScaleBuilder &operator=(const ScaleBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3073,15 +3012,13 @@ flatbuffers::Offset CreateScale(flatbuffers::FlatBufferBuilder &_fbb, con - - struct EltwiseT : public flatbuffers::NativeTable { - typedef Eltwise TableType; -- EltwiseType type; -- std::vector coeff; -- EltwiseT() -- : type(EltwiseType_PROD) { -- } -+ MNN::EltwiseType type = MNN::EltwiseType_PROD; -+ std::vector coeff{}; - }; - - struct Eltwise FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef EltwiseT NativeTableType; -+ typedef EltwiseBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return EltwiseTypeTable(); - } -@@ -3089,8 +3026,8 @@ struct Eltwise FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_TYPE = 4, - VT_COEFF = 6 - }; -- EltwiseType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::EltwiseType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } - const flatbuffers::Vector *coeff() const { - return GetPointer *>(VT_COEFF); -@@ -3108,9 +3045,10 @@ struct Eltwise FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct EltwiseBuilder { -+ typedef Eltwise Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_type(EltwiseType type) { -+ void add_type(MNN::EltwiseType type) { - fbb_.AddElement(Eltwise::VT_TYPE, static_cast(type), 0); - } - void add_coeff(flatbuffers::Offset> coeff) { -@@ -3120,7 +3058,6 @@ struct EltwiseBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- EltwiseBuilder &operator=(const EltwiseBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3130,7 +3067,7 @@ struct EltwiseBuilder { - - inline flatbuffers::Offset CreateEltwise( - flatbuffers::FlatBufferBuilder &_fbb, -- EltwiseType type = EltwiseType_PROD, -+ MNN::EltwiseType type = MNN::EltwiseType_PROD, - flatbuffers::Offset> coeff = 0) { - EltwiseBuilder builder_(_fbb); - builder_.add_coeff(coeff); -@@ -3140,7 +3077,7 @@ inline flatbuffers::Offset CreateEltwise( - - inline flatbuffers::Offset CreateEltwiseDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- EltwiseType type = EltwiseType_PROD, -+ MNN::EltwiseType type = MNN::EltwiseType_PROD, - const std::vector *coeff = nullptr) { - auto coeff__ = coeff ? _fbb.CreateVector(*coeff) : 0; - return MNN::CreateEltwise( -@@ -3153,16 +3090,13 @@ flatbuffers::Offset CreateEltwise(flatbuffers::FlatBufferBuilder &_fbb, - - struct FlattenT : public flatbuffers::NativeTable { - typedef Flatten TableType; -- int32_t axis; -- int32_t endAxis; -- FlattenT() -- : axis(0), -- endAxis(0) { -- } -+ int32_t axis = 0; -+ int32_t endAxis = 0; - }; - - struct Flatten FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef FlattenT NativeTableType; -+ typedef FlattenBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return FlattenTypeTable(); - } -@@ -3188,6 +3122,7 @@ struct Flatten FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct FlattenBuilder { -+ typedef Flatten Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_axis(int32_t axis) { -@@ -3200,7 +3135,6 @@ struct FlattenBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- FlattenBuilder &operator=(const FlattenBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3222,13 +3156,12 @@ flatbuffers::Offset CreateFlatten(flatbuffers::FlatBufferBuilder &_fbb, - - struct PermuteT : public flatbuffers::NativeTable { - typedef Permute TableType; -- std::vector dims; -- PermuteT() { -- } -+ std::vector dims{}; - }; - - struct Permute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef PermuteT NativeTableType; -+ typedef PermuteBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return PermuteTypeTable(); - } -@@ -3250,6 +3183,7 @@ struct Permute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct PermuteBuilder { -+ typedef Permute Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_dims(flatbuffers::Offset> dims) { -@@ -3259,7 +3193,6 @@ struct PermuteBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- PermuteBuilder &operator=(const PermuteBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3288,15 +3221,13 @@ flatbuffers::Offset CreatePermute(flatbuffers::FlatBufferBuilder &_fbb, - - struct ReshapeT : public flatbuffers::NativeTable { - typedef Reshape TableType; -- std::vector dims; -- MNN_DATA_FORMAT dimType; -- ReshapeT() -- : dimType(MNN_DATA_FORMAT_NCHW) { -- } -+ std::vector dims{}; -+ MNN::MNN_DATA_FORMAT dimType = MNN::MNN_DATA_FORMAT_NCHW; - }; - - struct Reshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ReshapeT NativeTableType; -+ typedef ReshapeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ReshapeTypeTable(); - } -@@ -3307,8 +3238,8 @@ struct Reshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *dims() const { - return GetPointer *>(VT_DIMS); - } -- MNN_DATA_FORMAT dimType() const { -- return static_cast(GetField(VT_DIMTYPE, 0)); -+ MNN::MNN_DATA_FORMAT dimType() const { -+ return static_cast(GetField(VT_DIMTYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -3323,19 +3254,19 @@ struct Reshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ReshapeBuilder { -+ typedef Reshape Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_dims(flatbuffers::Offset> dims) { - fbb_.AddOffset(Reshape::VT_DIMS, dims); - } -- void add_dimType(MNN_DATA_FORMAT dimType) { -+ void add_dimType(MNN::MNN_DATA_FORMAT dimType) { - fbb_.AddElement(Reshape::VT_DIMTYPE, static_cast(dimType), 0); - } - explicit ReshapeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ReshapeBuilder &operator=(const ReshapeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3346,7 +3277,7 @@ struct ReshapeBuilder { - inline flatbuffers::Offset CreateReshape( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> dims = 0, -- MNN_DATA_FORMAT dimType = MNN_DATA_FORMAT_NCHW) { -+ MNN::MNN_DATA_FORMAT dimType = MNN::MNN_DATA_FORMAT_NCHW) { - ReshapeBuilder builder_(_fbb); - builder_.add_dims(dims); - builder_.add_dimType(dimType); -@@ -3356,7 +3287,7 @@ inline flatbuffers::Offset CreateReshape( - inline flatbuffers::Offset CreateReshapeDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *dims = nullptr, -- MNN_DATA_FORMAT dimType = MNN_DATA_FORMAT_NCHW) { -+ MNN::MNN_DATA_FORMAT dimType = MNN::MNN_DATA_FORMAT_NCHW) { - auto dims__ = dims ? _fbb.CreateVector(*dims) : 0; - return MNN::CreateReshape( - _fbb, -@@ -3368,32 +3299,21 @@ flatbuffers::Offset CreateReshape(flatbuffers::FlatBufferBuilder &_fbb, - - struct DetectionOutputT : public flatbuffers::NativeTable { - typedef DetectionOutput TableType; -- int32_t classCount; -- float nmsThresholdold; -- int32_t nmsTopK; -- int32_t keepTopK; -- float confidenceThreshold; -- int32_t shareLocation; -- int32_t backgroundLable; -- int32_t varianceEncodedTarget; -- int32_t codeType; -- float objectnessScore; -- DetectionOutputT() -- : classCount(0), -- nmsThresholdold(0.0f), -- nmsTopK(0), -- keepTopK(0), -- confidenceThreshold(0.0f), -- shareLocation(0), -- backgroundLable(0), -- varianceEncodedTarget(0), -- codeType(0), -- objectnessScore(0.01f) { -- } -+ int32_t classCount = 0; -+ float nmsThresholdold = 0.0f; -+ int32_t nmsTopK = 0; -+ int32_t keepTopK = 0; -+ float confidenceThreshold = 0.0f; -+ int32_t shareLocation = 0; -+ int32_t backgroundLable = 0; -+ int32_t varianceEncodedTarget = 0; -+ int32_t codeType = 0; -+ float objectnessScore = 0.01f; - }; - - struct DetectionOutput FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DetectionOutputT NativeTableType; -+ typedef DetectionOutputBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return DetectionOutputTypeTable(); - } -@@ -3459,6 +3379,7 @@ struct DetectionOutput FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct DetectionOutputBuilder { -+ typedef DetectionOutput Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_classCount(int32_t classCount) { -@@ -3495,7 +3416,6 @@ struct DetectionOutputBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- DetectionOutputBuilder &operator=(const DetectionOutputBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3533,18 +3453,14 @@ flatbuffers::Offset CreateDetectionOutput(flatbuffers::FlatBuff - - struct RoiPoolingT : public flatbuffers::NativeTable { - typedef RoiPooling TableType; -- int32_t pooledWidth; -- int32_t pooledHeight; -- float spatialScale; -- RoiPoolingT() -- : pooledWidth(0), -- pooledHeight(0), -- spatialScale(0.0f) { -- } -+ int32_t pooledWidth = 0; -+ int32_t pooledHeight = 0; -+ float spatialScale = 0.0f; - }; - - struct RoiPooling FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RoiPoolingT NativeTableType; -+ typedef RoiPoolingBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return RoiPoolingTypeTable(); - } -@@ -3575,6 +3491,7 @@ struct RoiPooling FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct RoiPoolingBuilder { -+ typedef RoiPooling Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_pooledWidth(int32_t pooledWidth) { -@@ -3590,7 +3507,6 @@ struct RoiPoolingBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- RoiPoolingBuilder &operator=(const RoiPoolingBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3614,27 +3530,20 @@ flatbuffers::Offset CreateRoiPooling(flatbuffers::FlatBufferBuilder - - struct ProposalT : public flatbuffers::NativeTable { - typedef Proposal TableType; -- int32_t featStride; -- int32_t baseSize; -- int32_t preNmsTopN; -- int32_t afterNmsTopN; -- float nmsThreshold; -- int32_t minSize; -- std::unique_ptr ratios; -- std::unique_ptr scales; -- std::unique_ptr anchors; -- ProposalT() -- : featStride(0), -- baseSize(0), -- preNmsTopN(0), -- afterNmsTopN(0), -- nmsThreshold(0.0f), -- minSize(0) { -- } -+ int32_t featStride = 0; -+ int32_t baseSize = 0; -+ int32_t preNmsTopN = 0; -+ int32_t afterNmsTopN = 0; -+ float nmsThreshold = 0.0f; -+ int32_t minSize = 0; -+ std::unique_ptr ratios{}; -+ std::unique_ptr scales{}; -+ std::unique_ptr anchors{}; - }; - - struct Proposal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ProposalT NativeTableType; -+ typedef ProposalBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ProposalTypeTable(); - } -@@ -3667,14 +3576,14 @@ struct Proposal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t minSize() const { - return GetField(VT_MINSIZE, 0); - } -- const Blob *ratios() const { -- return GetPointer(VT_RATIOS); -+ const MNN::Blob *ratios() const { -+ return GetPointer(VT_RATIOS); - } -- const Blob *scales() const { -- return GetPointer(VT_SCALES); -+ const MNN::Blob *scales() const { -+ return GetPointer(VT_SCALES); - } -- const Blob *anchors() const { -- return GetPointer(VT_ANCHORS); -+ const MNN::Blob *anchors() const { -+ return GetPointer(VT_ANCHORS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -3698,6 +3607,7 @@ struct Proposal FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ProposalBuilder { -+ typedef Proposal Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_featStride(int32_t featStride) { -@@ -3718,20 +3628,19 @@ struct ProposalBuilder { - void add_minSize(int32_t minSize) { - fbb_.AddElement(Proposal::VT_MINSIZE, minSize, 0); - } -- void add_ratios(flatbuffers::Offset ratios) { -+ void add_ratios(flatbuffers::Offset ratios) { - fbb_.AddOffset(Proposal::VT_RATIOS, ratios); - } -- void add_scales(flatbuffers::Offset scales) { -+ void add_scales(flatbuffers::Offset scales) { - fbb_.AddOffset(Proposal::VT_SCALES, scales); - } -- void add_anchors(flatbuffers::Offset anchors) { -+ void add_anchors(flatbuffers::Offset anchors) { - fbb_.AddOffset(Proposal::VT_ANCHORS, anchors); - } - explicit ProposalBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ProposalBuilder &operator=(const ProposalBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3747,9 +3656,9 @@ inline flatbuffers::Offset CreateProposal( - int32_t afterNmsTopN = 0, - float nmsThreshold = 0.0f, - int32_t minSize = 0, -- flatbuffers::Offset ratios = 0, -- flatbuffers::Offset scales = 0, -- flatbuffers::Offset anchors = 0) { -+ flatbuffers::Offset ratios = 0, -+ flatbuffers::Offset scales = 0, -+ flatbuffers::Offset anchors = 0) { - ProposalBuilder builder_(_fbb); - builder_.add_anchors(anchors); - builder_.add_scales(scales); -@@ -3767,34 +3676,22 @@ flatbuffers::Offset CreateProposal(flatbuffers::FlatBufferBuilder &_fb - - struct InterpT : public flatbuffers::NativeTable { - typedef Interp TableType; -- float widthScale; -- float heightScale; -- int32_t outputWidth; -- int32_t outputHeight; -- int32_t resizeType; -- bool alignCorners; -- bool halfPixelCenters; -- float widthOffset; -- float heightOffset; -- float cubicCoeffA; -- CoordinateTransformationMode ctm; -- InterpT() -- : widthScale(0.0f), -- heightScale(0.0f), -- outputWidth(0), -- outputHeight(0), -- resizeType(0), -- alignCorners(false), -- halfPixelCenters(false), -- widthOffset(0.0f), -- heightOffset(0.0f), -- cubicCoeffA(-0.75f), -- ctm(CoordinateTransformationMode_NotSet) { -- } -+ float widthScale = 0.0f; -+ float heightScale = 0.0f; -+ int32_t outputWidth = 0; -+ int32_t outputHeight = 0; -+ int32_t resizeType = 0; -+ bool alignCorners = false; -+ bool halfPixelCenters = false; -+ float widthOffset = 0.0f; -+ float heightOffset = 0.0f; -+ float cubicCoeffA = -0.75f; -+ MNN::CoordinateTransformationMode ctm = MNN::CoordinateTransformationMode_NotSet; - }; - - struct Interp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef InterpT NativeTableType; -+ typedef InterpBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return InterpTypeTable(); - } -@@ -3841,8 +3738,8 @@ struct Interp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - float cubicCoeffA() const { - return GetField(VT_CUBICCOEFFA, -0.75f); - } -- CoordinateTransformationMode ctm() const { -- return static_cast(GetField(VT_CTM, 0)); -+ MNN::CoordinateTransformationMode ctm() const { -+ return static_cast(GetField(VT_CTM, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -3865,6 +3762,7 @@ struct Interp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct InterpBuilder { -+ typedef Interp Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_widthScale(float widthScale) { -@@ -3897,14 +3795,13 @@ struct InterpBuilder { - void add_cubicCoeffA(float cubicCoeffA) { - fbb_.AddElement(Interp::VT_CUBICCOEFFA, cubicCoeffA, -0.75f); - } -- void add_ctm(CoordinateTransformationMode ctm) { -+ void add_ctm(MNN::CoordinateTransformationMode ctm) { - fbb_.AddElement(Interp::VT_CTM, static_cast(ctm), 0); - } - explicit InterpBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- InterpBuilder &operator=(const InterpBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3924,7 +3821,7 @@ inline flatbuffers::Offset CreateInterp( - float widthOffset = 0.0f, - float heightOffset = 0.0f, - float cubicCoeffA = -0.75f, -- CoordinateTransformationMode ctm = CoordinateTransformationMode_NotSet) { -+ MNN::CoordinateTransformationMode ctm = MNN::CoordinateTransformationMode_NotSet) { - InterpBuilder builder_(_fbb); - builder_.add_cubicCoeffA(cubicCoeffA); - builder_.add_heightOffset(heightOffset); -@@ -3944,16 +3841,13 @@ flatbuffers::Offset CreateInterp(flatbuffers::FlatBufferBuilder &_fbb, c - - struct ResizeT : public flatbuffers::NativeTable { - typedef Resize TableType; -- float xScale; -- float yScale; -- ResizeT() -- : xScale(0.0f), -- yScale(0.0f) { -- } -+ float xScale = 0.0f; -+ float yScale = 0.0f; - }; - - struct Resize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ResizeT NativeTableType; -+ typedef ResizeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ResizeTypeTable(); - } -@@ -3979,6 +3873,7 @@ struct Resize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ResizeBuilder { -+ typedef Resize Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_xScale(float xScale) { -@@ -3991,7 +3886,6 @@ struct ResizeBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ResizeBuilder &operator=(const ResizeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -4013,30 +3907,22 @@ flatbuffers::Offset CreateResize(flatbuffers::FlatBufferBuilder &_fbb, c - - struct PriorBoxT : public flatbuffers::NativeTable { - typedef PriorBox TableType; -- std::vector minSizes; -- std::vector maxSizes; -- std::vector aspectRatios; -- std::vector variances; -- bool flip; -- bool clip; -- int32_t imageWidth; -- int32_t imageHeight; -- int32_t stepWidth; -- int32_t stepHeight; -- float offset; -- PriorBoxT() -- : flip(false), -- clip(false), -- imageWidth(0), -- imageHeight(0), -- stepWidth(0), -- stepHeight(0), -- offset(0.0f) { -- } -+ std::vector minSizes{}; -+ std::vector maxSizes{}; -+ std::vector aspectRatios{}; -+ std::vector variances{}; -+ bool flip = false; -+ bool clip = false; -+ int32_t imageWidth = 0; -+ int32_t imageHeight = 0; -+ int32_t stepWidth = 0; -+ int32_t stepHeight = 0; -+ float offset = 0.0f; - }; - - struct PriorBox FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef PriorBoxT NativeTableType; -+ typedef PriorBoxBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return PriorBoxTypeTable(); - } -@@ -4111,6 +3997,7 @@ struct PriorBox FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct PriorBoxBuilder { -+ typedef PriorBox Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_minSizes(flatbuffers::Offset> minSizes) { -@@ -4150,7 +4037,6 @@ struct PriorBoxBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- PriorBoxBuilder &operator=(const PriorBoxBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -4222,19 +4108,15 @@ flatbuffers::Offset CreatePriorBox(flatbuffers::FlatBufferBuilder &_fb - - struct NormalizeT : public flatbuffers::NativeTable { - typedef Normalize TableType; -- int32_t acrossSpatial; -- int32_t channelShared; -- float eps; -- std::vector scale; -- NormalizeT() -- : acrossSpatial(0), -- channelShared(0), -- eps(0.0f) { -- } -+ int32_t acrossSpatial = 0; -+ int32_t channelShared = 0; -+ float eps = 0.0f; -+ std::vector scale{}; - }; - - struct Normalize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef NormalizeT NativeTableType; -+ typedef NormalizeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return NormalizeTypeTable(); - } -@@ -4271,6 +4153,7 @@ struct Normalize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct NormalizeBuilder { -+ typedef Normalize Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_acrossSpatial(int32_t acrossSpatial) { -@@ -4289,7 +4172,6 @@ struct NormalizeBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- NormalizeBuilder &operator=(const NormalizeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -4330,17 +4212,15 @@ flatbuffers::Offset CreateNormalize(flatbuffers::FlatBufferBuilder &_ - - struct EltwiseInt8T : public flatbuffers::NativeTable { - typedef EltwiseInt8 TableType; -- EltwiseType type; -- std::unique_ptr inputQuan0; -- std::unique_ptr inputQuan1; -- std::unique_ptr outputQuan; -- EltwiseInt8T() -- : type(EltwiseType_PROD) { -- } -+ MNN::EltwiseType type = MNN::EltwiseType_PROD; -+ std::unique_ptr inputQuan0{}; -+ std::unique_ptr inputQuan1{}; -+ std::unique_ptr outputQuan{}; - }; - - struct EltwiseInt8 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef EltwiseInt8T NativeTableType; -+ typedef EltwiseInt8Builder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return EltwiseInt8TypeTable(); - } -@@ -4350,17 +4230,17 @@ struct EltwiseInt8 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_INPUTQUAN1 = 8, - VT_OUTPUTQUAN = 10 - }; -- EltwiseType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::EltwiseType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } -- const QuantizedFloatParam *inputQuan0() const { -- return GetPointer(VT_INPUTQUAN0); -+ const MNN::QuantizedFloatParam *inputQuan0() const { -+ return GetPointer(VT_INPUTQUAN0); - } -- const QuantizedFloatParam *inputQuan1() const { -- return GetPointer(VT_INPUTQUAN1); -+ const MNN::QuantizedFloatParam *inputQuan1() const { -+ return GetPointer(VT_INPUTQUAN1); - } -- const QuantizedFloatParam *outputQuan() const { -- return GetPointer(VT_OUTPUTQUAN); -+ const MNN::QuantizedFloatParam *outputQuan() const { -+ return GetPointer(VT_OUTPUTQUAN); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -4379,25 +4259,25 @@ struct EltwiseInt8 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct EltwiseInt8Builder { -+ typedef EltwiseInt8 Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_type(EltwiseType type) { -+ void add_type(MNN::EltwiseType type) { - fbb_.AddElement(EltwiseInt8::VT_TYPE, static_cast(type), 0); - } -- void add_inputQuan0(flatbuffers::Offset inputQuan0) { -+ void add_inputQuan0(flatbuffers::Offset inputQuan0) { - fbb_.AddOffset(EltwiseInt8::VT_INPUTQUAN0, inputQuan0); - } -- void add_inputQuan1(flatbuffers::Offset inputQuan1) { -+ void add_inputQuan1(flatbuffers::Offset inputQuan1) { - fbb_.AddOffset(EltwiseInt8::VT_INPUTQUAN1, inputQuan1); - } -- void add_outputQuan(flatbuffers::Offset outputQuan) { -+ void add_outputQuan(flatbuffers::Offset outputQuan) { - fbb_.AddOffset(EltwiseInt8::VT_OUTPUTQUAN, outputQuan); - } - explicit EltwiseInt8Builder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- EltwiseInt8Builder &operator=(const EltwiseInt8Builder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -4407,10 +4287,10 @@ struct EltwiseInt8Builder { - - inline flatbuffers::Offset CreateEltwiseInt8( - flatbuffers::FlatBufferBuilder &_fbb, -- EltwiseType type = EltwiseType_PROD, -- flatbuffers::Offset inputQuan0 = 0, -- flatbuffers::Offset inputQuan1 = 0, -- flatbuffers::Offset outputQuan = 0) { -+ MNN::EltwiseType type = MNN::EltwiseType_PROD, -+ flatbuffers::Offset inputQuan0 = 0, -+ flatbuffers::Offset inputQuan1 = 0, -+ flatbuffers::Offset outputQuan = 0) { - EltwiseInt8Builder builder_(_fbb); - builder_.add_outputQuan(outputQuan); - builder_.add_inputQuan1(inputQuan1); -@@ -4422,30 +4302,30 @@ inline flatbuffers::Offset CreateEltwiseInt8( - flatbuffers::Offset CreateEltwiseInt8(flatbuffers::FlatBufferBuilder &_fbb, const EltwiseInt8T *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); - - inline Convolution2DCommonT *Convolution2DCommon::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new Convolution2DCommonT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new Convolution2DCommonT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Convolution2DCommon::UnPackTo(Convolution2DCommonT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = padX(); _o->padX = _e; }; -- { auto _e = padY(); _o->padY = _e; }; -- { auto _e = kernelX(); _o->kernelX = _e; }; -- { auto _e = kernelY(); _o->kernelY = _e; }; -- { auto _e = strideX(); _o->strideX = _e; }; -- { auto _e = strideY(); _o->strideY = _e; }; -- { auto _e = dilateX(); _o->dilateX = _e; }; -- { auto _e = dilateY(); _o->dilateY = _e; }; -- { auto _e = padMode(); _o->padMode = _e; }; -- { auto _e = group(); _o->group = _e; }; -- { auto _e = outputCount(); _o->outputCount = _e; }; -- { auto _e = inputCount(); _o->inputCount = _e; }; -- { auto _e = relu(); _o->relu = _e; }; -- { auto _e = relu6(); _o->relu6 = _e; }; -- { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } }; -- { auto _e = outPads(); if (_e) { _o->outPads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outPads[_i] = _e->Get(_i); } } }; -+ { auto _e = padX(); _o->padX = _e; } -+ { auto _e = padY(); _o->padY = _e; } -+ { auto _e = kernelX(); _o->kernelX = _e; } -+ { auto _e = kernelY(); _o->kernelY = _e; } -+ { auto _e = strideX(); _o->strideX = _e; } -+ { auto _e = strideY(); _o->strideY = _e; } -+ { auto _e = dilateX(); _o->dilateX = _e; } -+ { auto _e = dilateY(); _o->dilateY = _e; } -+ { auto _e = padMode(); _o->padMode = _e; } -+ { auto _e = group(); _o->group = _e; } -+ { auto _e = outputCount(); _o->outputCount = _e; } -+ { auto _e = inputCount(); _o->inputCount = _e; } -+ { auto _e = relu(); _o->relu = _e; } -+ { auto _e = relu6(); _o->relu6 = _e; } -+ { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } } -+ { auto _e = outPads(); if (_e) { _o->outPads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outPads[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset Convolution2DCommon::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution2DCommonT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4493,23 +4373,23 @@ inline flatbuffers::Offset CreateConvolution2DCommon(flatbu - } - - inline Convolution3DCommonT *Convolution3DCommon::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new Convolution3DCommonT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new Convolution3DCommonT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Convolution3DCommon::UnPackTo(Convolution3DCommonT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = dilates(); if (_e) { _o->dilates.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dilates[_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); } } }; -- { auto _e = kernels(); if (_e) { _o->kernels.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->kernels[_i] = _e->Get(_i); } } }; -- { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } }; -- { auto _e = padMode(); _o->padMode = _e; }; -- { auto _e = inputCount(); _o->inputCount = _e; }; -- { auto _e = outputCount(); _o->outputCount = _e; }; -- { auto _e = relu(); _o->relu = _e; }; -- { auto _e = relu6(); _o->relu6 = _e; }; -+ { auto _e = dilates(); if (_e) { _o->dilates.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dilates[_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); } } } -+ { auto _e = kernels(); if (_e) { _o->kernels.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->kernels[_i] = _e->Get(_i); } } } -+ { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } } -+ { auto _e = padMode(); _o->padMode = _e; } -+ { auto _e = inputCount(); _o->inputCount = _e; } -+ { auto _e = outputCount(); _o->outputCount = _e; } -+ { auto _e = relu(); _o->relu = _e; } -+ { auto _e = relu6(); _o->relu6 = _e; } - } - - inline flatbuffers::Offset Convolution3DCommon::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution3DCommonT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4543,25 +4423,25 @@ inline flatbuffers::Offset CreateConvolution3DCommon(flatbu - } - - inline IDSTQuanT *IDSTQuan::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new IDSTQuanT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new IDSTQuanT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void IDSTQuan::UnPackTo(IDSTQuanT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = buffer(); if (_e) { _o->buffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->buffer[_i] = _e->Get(_i); } } }; -- { auto _e = alpha(); if (_e) { _o->alpha.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->alpha[_i] = _e->Get(_i); } } }; -- { auto _e = type(); _o->type = _e; }; -- { auto _e = useInt32(); _o->useInt32 = _e; }; -- { auto _e = quantScale(); _o->quantScale = _e; }; -- { auto _e = scaleIn(); _o->scaleIn = _e; }; -- { auto _e = scaleOut(); _o->scaleOut = _e; }; -- { auto _e = aMax(); _o->aMax = _e; }; -- { auto _e = aMin(); _o->aMin = _e; }; -- { auto _e = readType(); _o->readType = _e; }; -- { auto _e = has_scaleInt(); _o->has_scaleInt = _e; }; -+ { auto _e = buffer(); if (_e) { _o->buffer.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->buffer.begin()); } } -+ { auto _e = alpha(); if (_e) { _o->alpha.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->alpha[_i] = _e->Get(_i); } } } -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = useInt32(); _o->useInt32 = _e; } -+ { auto _e = quantScale(); _o->quantScale = _e; } -+ { auto _e = scaleIn(); _o->scaleIn = _e; } -+ { auto _e = scaleOut(); _o->scaleOut = _e; } -+ { auto _e = aMax(); _o->aMax = _e; } -+ { auto _e = aMin(); _o->aMin = _e; } -+ { auto _e = readType(); _o->readType = _e; } -+ { auto _e = has_scaleInt(); _o->has_scaleInt = _e; } - } - - inline flatbuffers::Offset IDSTQuan::Pack(flatbuffers::FlatBufferBuilder &_fbb, const IDSTQuanT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4599,20 +4479,20 @@ inline flatbuffers::Offset CreateIDSTQuan(flatbuffers::FlatBufferBuild - } - - inline QuantizedFloatParamT *QuantizedFloatParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedFloatParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedFloatParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedFloatParam::UnPackTo(QuantizedFloatParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; -- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_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 = tensorScale(); if (_e) { _o->tensorScale.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensorScale[_i] = _e->Get(_i); } } }; -- { auto _e = method(); _o->method = _e; }; -- { auto _e = nbits(); _o->nbits = _e; }; -+ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->weight.begin()); } } -+ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_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 = tensorScale(); if (_e) { _o->tensorScale.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensorScale[_i] = _e->Get(_i); } } } -+ { auto _e = method(); _o->method = _e; } -+ { auto _e = nbits(); _o->nbits = _e; } - } - - inline flatbuffers::Offset QuantizedFloatParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedFloatParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4640,19 +4520,19 @@ inline flatbuffers::Offset CreateQuantizedFloatParam(flatbu - } - - inline Convolution2DT *Convolution2D::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new Convolution2DT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new Convolution2DT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Convolution2D::UnPackTo(Convolution2DT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; -- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; -- { auto _e = quanParameter(); if (_e) _o->quanParameter = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = symmetricQuan(); if (_e) _o->symmetricQuan = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } } -+ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } -+ { auto _e = quanParameter(); if (_e) _o->quanParameter = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = symmetricQuan(); if (_e) _o->symmetricQuan = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset Convolution2D::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution2DT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4678,17 +4558,17 @@ inline flatbuffers::Offset CreateConvolution2D(flatbuffers::FlatB - } - - inline Convolution3DT *Convolution3D::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new Convolution3DT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new Convolution3DT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Convolution3D::UnPackTo(Convolution3DT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; -- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; -+ { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } } -+ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset Convolution3D::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Convolution3DT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4710,22 +4590,22 @@ inline flatbuffers::Offset CreateConvolution3D(flatbuffers::FlatB - } - - inline InnerProductT *InnerProduct::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new InnerProductT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new InnerProductT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void InnerProduct::UnPackTo(InnerProductT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = outputCount(); _o->outputCount = _e; }; -- { auto _e = biasTerm(); _o->biasTerm = _e; }; -- { auto _e = weightSize(); _o->weightSize = _e; }; -- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; -- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; -- { auto _e = axis(); _o->axis = _e; }; -- { auto _e = transpose(); _o->transpose = _e; }; -- { auto _e = quanParameter(); if (_e) _o->quanParameter = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = outputCount(); _o->outputCount = _e; } -+ { auto _e = biasTerm(); _o->biasTerm = _e; } -+ { auto _e = weightSize(); _o->weightSize = _e; } -+ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } } -+ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } -+ { auto _e = axis(); _o->axis = _e; } -+ { auto _e = transpose(); _o->transpose = _e; } -+ { auto _e = quanParameter(); if (_e) _o->quanParameter = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset InnerProduct::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InnerProductT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4757,27 +4637,27 @@ inline flatbuffers::Offset CreateInnerProduct(flatbuffers::FlatBuf - } - - inline PoolT *Pool::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new PoolT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new PoolT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Pool::UnPackTo(PoolT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = padX(); _o->padX = _e; }; -- { auto _e = padY(); _o->padY = _e; }; -- { auto _e = isGlobal(); _o->isGlobal = _e; }; -- { auto _e = kernelX(); _o->kernelX = _e; }; -- { auto _e = kernelY(); _o->kernelY = _e; }; -- { auto _e = strideX(); _o->strideX = _e; }; -- { auto _e = strideY(); _o->strideY = _e; }; -- { auto _e = type(); _o->type = _e; }; -- { auto _e = padType(); _o->padType = _e; }; -- { auto _e = dataType(); _o->dataType = _e; }; -- { auto _e = ceilModel(); _o->ceilModel = _e; }; -- { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } }; -- { auto _e = countType(); _o->countType = _e; }; -+ { auto _e = padX(); _o->padX = _e; } -+ { auto _e = padY(); _o->padY = _e; } -+ { auto _e = isGlobal(); _o->isGlobal = _e; } -+ { auto _e = kernelX(); _o->kernelX = _e; } -+ { auto _e = kernelY(); _o->kernelY = _e; } -+ { auto _e = strideX(); _o->strideX = _e; } -+ { auto _e = strideY(); _o->strideY = _e; } -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = padType(); _o->padType = _e; } -+ { auto _e = dataType(); _o->dataType = _e; } -+ { auto _e = ceilModel(); _o->ceilModel = _e; } -+ { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } } -+ { auto _e = countType(); _o->countType = _e; } - } - - inline flatbuffers::Offset Pool::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PoolT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4819,19 +4699,19 @@ inline flatbuffers::Offset CreatePool(flatbuffers::FlatBufferBuilder &_fbb - } - - inline Pool3DT *Pool3D::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new Pool3DT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new Pool3DT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Pool3D::UnPackTo(Pool3DT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { 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); } } }; -- { auto _e = kernels(); if (_e) { _o->kernels.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->kernels[_i] = _e->Get(_i); } } }; -- { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } }; -- { auto _e = type(); _o->type = _e; }; -- { auto _e = padType(); _o->padType = _e; }; -+ { 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); } } } -+ { auto _e = kernels(); if (_e) { _o->kernels.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->kernels[_i] = _e->Get(_i); } } } -+ { auto _e = pads(); if (_e) { _o->pads.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pads[_i] = _e->Get(_i); } } } -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = padType(); _o->padType = _e; } - } - - inline flatbuffers::Offset Pool3D::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Pool3DT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4857,15 +4737,15 @@ inline flatbuffers::Offset CreatePool3D(flatbuffers::FlatBufferBuilder & - } - - inline ReluT *Relu::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ReluT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ReluT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Relu::UnPackTo(ReluT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = slope(); _o->slope = _e; }; -+ { auto _e = slope(); _o->slope = _e; } - } - - inline flatbuffers::Offset Relu::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReluT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4883,16 +4763,16 @@ inline flatbuffers::Offset CreateRelu(flatbuffers::FlatBufferBuilder &_fbb - } - - inline Relu6T *Relu6::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new Relu6T(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new Relu6T()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Relu6::UnPackTo(Relu6T *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = minValue(); _o->minValue = _e; }; -- { auto _e = maxValue(); _o->maxValue = _e; }; -+ { auto _e = minValue(); _o->minValue = _e; } -+ { auto _e = maxValue(); _o->maxValue = _e; } - } - - inline flatbuffers::Offset Relu6::Pack(flatbuffers::FlatBufferBuilder &_fbb, const Relu6T* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4912,16 +4792,16 @@ inline flatbuffers::Offset CreateRelu6(flatbuffers::FlatBufferBuilder &_f - } - - inline PReluT *PRelu::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new PReluT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new PReluT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void PRelu::UnPackTo(PReluT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = slopeCount(); _o->slopeCount = _e; }; -- { auto _e = slope(); if (_e) { _o->slope.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slope[_i] = _e->Get(_i); } } }; -+ { auto _e = slopeCount(); _o->slopeCount = _e; } -+ { auto _e = slope(); if (_e) { _o->slope.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slope[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset PRelu::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PReluT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4941,15 +4821,15 @@ inline flatbuffers::Offset CreatePRelu(flatbuffers::FlatBufferBuilder &_f - } - - inline ELUT *ELU::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ELUT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ELUT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void ELU::UnPackTo(ELUT *_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 ELU::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ELUT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4967,18 +4847,18 @@ inline flatbuffers::Offset CreateELU(flatbuffers::FlatBufferBuilder &_fbb, - } - - inline LRNT *LRN::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new LRNT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new LRNT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void LRN::UnPackTo(LRNT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = regionType(); _o->regionType = _e; }; -- { auto _e = localSize(); _o->localSize = _e; }; -- { auto _e = alpha(); _o->alpha = _e; }; -- { auto _e = beta(); _o->beta = _e; }; -+ { auto _e = regionType(); _o->regionType = _e; } -+ { auto _e = localSize(); _o->localSize = _e; } -+ { auto _e = alpha(); _o->alpha = _e; } -+ { auto _e = beta(); _o->beta = _e; } - } - - inline flatbuffers::Offset LRN::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LRNT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5002,18 +4882,18 @@ inline flatbuffers::Offset CreateLRN(flatbuffers::FlatBufferBuilder &_fbb, - } - - inline ArgMaxT *ArgMax::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ArgMaxT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ArgMaxT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void ArgMax::UnPackTo(ArgMaxT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = outMaxVal(); _o->outMaxVal = _e; }; -- { auto _e = topK(); _o->topK = _e; }; -- { auto _e = axis(); _o->axis = _e; }; -- { auto _e = softmaxThreshold(); _o->softmaxThreshold = _e; }; -+ { auto _e = outMaxVal(); _o->outMaxVal = _e; } -+ { auto _e = topK(); _o->topK = _e; } -+ { auto _e = axis(); _o->axis = _e; } -+ { auto _e = softmaxThreshold(); _o->softmaxThreshold = _e; } - } - - inline flatbuffers::Offset ArgMax::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ArgMaxT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5037,15 +4917,15 @@ inline flatbuffers::Offset CreateArgMax(flatbuffers::FlatBufferBuilder & - } - - inline AxisT *Axis::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new AxisT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new AxisT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Axis::UnPackTo(AxisT *_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 Axis::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AxisT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5063,17 +4943,17 @@ inline flatbuffers::Offset CreateAxis(flatbuffers::FlatBufferBuilder &_fbb - } - - inline InputT *Input::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new InputT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new InputT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Input::UnPackTo(InputT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; -- { auto _e = dtype(); _o->dtype = _e; }; -- { auto _e = dformat(); _o->dformat = _e; }; -+ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } -+ { auto _e = dtype(); _o->dtype = _e; } -+ { auto _e = dformat(); _o->dformat = _e; } - } - - inline flatbuffers::Offset Input::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InputT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5095,23 +4975,23 @@ inline flatbuffers::Offset CreateInput(flatbuffers::FlatBufferBuilder &_f - } - - inline LSTMT *LSTM::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new LSTMT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new LSTMT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void LSTM::UnPackTo(LSTMT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = outputCount(); _o->outputCount = _e; }; -- { auto _e = weightSize(); _o->weightSize = _e; }; -- { auto _e = clippingThreshold(); _o->clippingThreshold = _e; }; -- { auto _e = weightI(); if (_e) _o->weightI = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = weightH(); if (_e) _o->weightH = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = bias(); if (_e) _o->bias = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = weightIQ(); if (_e) _o->weightIQ = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = weightIA(); if (_e) _o->weightIA = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = quantScale(); _o->quantScale = _e; }; -+ { auto _e = outputCount(); _o->outputCount = _e; } -+ { auto _e = weightSize(); _o->weightSize = _e; } -+ { auto _e = clippingThreshold(); _o->clippingThreshold = _e; } -+ { auto _e = weightI(); if (_e) _o->weightI = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = weightH(); if (_e) _o->weightH = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = bias(); if (_e) _o->bias = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = weightIQ(); if (_e) _o->weightIQ = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = weightIA(); if (_e) _o->weightIA = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = quantScale(); _o->quantScale = _e; } - } - - inline flatbuffers::Offset LSTM::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LSTMT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5145,17 +5025,17 @@ inline flatbuffers::Offset CreateLSTM(flatbuffers::FlatBufferBuilder &_fbb - } - - inline SliceT *Slice::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new SliceT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new SliceT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Slice::UnPackTo(SliceT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = axis(); _o->axis = _e; }; -- { auto _e = slicePoints(); if (_e) { _o->slicePoints.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slicePoints[_i] = _e->Get(_i); } } }; -- { auto _e = sourceType(); _o->sourceType = _e; }; -+ { auto _e = axis(); _o->axis = _e; } -+ { auto _e = slicePoints(); if (_e) { _o->slicePoints.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slicePoints[_i] = _e->Get(_i); } } } -+ { auto _e = sourceType(); _o->sourceType = _e; } - } - - inline flatbuffers::Offset Slice::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SliceT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5177,22 +5057,22 @@ inline flatbuffers::Offset CreateSlice(flatbuffers::FlatBufferBuilder &_f - } - - inline BatchNormT *BatchNorm::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new BatchNormT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new BatchNormT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void BatchNorm::UnPackTo(BatchNormT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = channels(); _o->channels = _e; }; -- { auto _e = slopeData(); if (_e) { _o->slopeData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slopeData[_i] = _e->Get(_i); } } }; -- { auto _e = meanData(); if (_e) { _o->meanData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->meanData[_i] = _e->Get(_i); } } }; -- { auto _e = varData(); if (_e) { _o->varData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->varData[_i] = _e->Get(_i); } } }; -- { auto _e = biasData(); if (_e) { _o->biasData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->biasData[_i] = _e->Get(_i); } } }; -- { auto _e = Adata(); if (_e) { _o->Adata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->Adata[_i] = _e->Get(_i); } } }; -- { auto _e = Bdata(); if (_e) { _o->Bdata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->Bdata[_i] = _e->Get(_i); } } }; -- { auto _e = epsilon(); _o->epsilon = _e; }; -+ { auto _e = channels(); _o->channels = _e; } -+ { auto _e = slopeData(); if (_e) { _o->slopeData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->slopeData[_i] = _e->Get(_i); } } } -+ { auto _e = meanData(); if (_e) { _o->meanData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->meanData[_i] = _e->Get(_i); } } } -+ { auto _e = varData(); if (_e) { _o->varData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->varData[_i] = _e->Get(_i); } } } -+ { auto _e = biasData(); if (_e) { _o->biasData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->biasData[_i] = _e->Get(_i); } } } -+ { auto _e = Adata(); if (_e) { _o->Adata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->Adata[_i] = _e->Get(_i); } } } -+ { auto _e = Bdata(); if (_e) { _o->Bdata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->Bdata[_i] = _e->Get(_i); } } } -+ { auto _e = epsilon(); _o->epsilon = _e; } - } - - inline flatbuffers::Offset BatchNorm::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchNormT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5224,17 +5104,17 @@ inline flatbuffers::Offset CreateBatchNorm(flatbuffers::FlatBufferBui - } - - inline ScaleT *Scale::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ScaleT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ScaleT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Scale::UnPackTo(ScaleT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = channels(); _o->channels = _e; }; -- { auto _e = scaleData(); if (_e) { _o->scaleData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->scaleData[_i] = _e->Get(_i); } } }; -- { auto _e = biasData(); if (_e) { _o->biasData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->biasData[_i] = _e->Get(_i); } } }; -+ { auto _e = channels(); _o->channels = _e; } -+ { auto _e = scaleData(); if (_e) { _o->scaleData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->scaleData[_i] = _e->Get(_i); } } } -+ { auto _e = biasData(); if (_e) { _o->biasData.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->biasData[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset Scale::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ScaleT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5256,16 +5136,16 @@ inline flatbuffers::Offset CreateScale(flatbuffers::FlatBufferBuilder &_f - } - - inline EltwiseT *Eltwise::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new EltwiseT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new EltwiseT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Eltwise::UnPackTo(EltwiseT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = type(); _o->type = _e; }; -- { auto _e = coeff(); if (_e) { _o->coeff.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->coeff[_i] = _e->Get(_i); } } }; -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = coeff(); if (_e) { _o->coeff.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->coeff[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset Eltwise::Pack(flatbuffers::FlatBufferBuilder &_fbb, const EltwiseT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5285,16 +5165,16 @@ inline flatbuffers::Offset CreateEltwise(flatbuffers::FlatBufferBuilder - } - - inline FlattenT *Flatten::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new FlattenT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new FlattenT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Flatten::UnPackTo(FlattenT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = axis(); _o->axis = _e; }; -- { auto _e = endAxis(); _o->endAxis = _e; }; -+ { auto _e = axis(); _o->axis = _e; } -+ { auto _e = endAxis(); _o->endAxis = _e; } - } - - inline flatbuffers::Offset Flatten::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FlattenT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5314,15 +5194,15 @@ inline flatbuffers::Offset CreateFlatten(flatbuffers::FlatBufferBuilder - } - - inline PermuteT *Permute::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new PermuteT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new PermuteT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Permute::UnPackTo(PermuteT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; -+ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset Permute::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PermuteT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5340,16 +5220,16 @@ inline flatbuffers::Offset CreatePermute(flatbuffers::FlatBufferBuilder - } - - inline ReshapeT *Reshape::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ReshapeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ReshapeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Reshape::UnPackTo(ReshapeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; -- { auto _e = dimType(); _o->dimType = _e; }; -+ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } -+ { auto _e = dimType(); _o->dimType = _e; } - } - - inline flatbuffers::Offset Reshape::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReshapeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5369,24 +5249,24 @@ inline flatbuffers::Offset CreateReshape(flatbuffers::FlatBufferBuilder - } - - inline DetectionOutputT *DetectionOutput::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new DetectionOutputT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new DetectionOutputT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void DetectionOutput::UnPackTo(DetectionOutputT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = classCount(); _o->classCount = _e; }; -- { auto _e = nmsThresholdold(); _o->nmsThresholdold = _e; }; -- { auto _e = nmsTopK(); _o->nmsTopK = _e; }; -- { auto _e = keepTopK(); _o->keepTopK = _e; }; -- { auto _e = confidenceThreshold(); _o->confidenceThreshold = _e; }; -- { auto _e = shareLocation(); _o->shareLocation = _e; }; -- { auto _e = backgroundLable(); _o->backgroundLable = _e; }; -- { auto _e = varianceEncodedTarget(); _o->varianceEncodedTarget = _e; }; -- { auto _e = codeType(); _o->codeType = _e; }; -- { auto _e = objectnessScore(); _o->objectnessScore = _e; }; -+ { auto _e = classCount(); _o->classCount = _e; } -+ { auto _e = nmsThresholdold(); _o->nmsThresholdold = _e; } -+ { auto _e = nmsTopK(); _o->nmsTopK = _e; } -+ { auto _e = keepTopK(); _o->keepTopK = _e; } -+ { auto _e = confidenceThreshold(); _o->confidenceThreshold = _e; } -+ { auto _e = shareLocation(); _o->shareLocation = _e; } -+ { auto _e = backgroundLable(); _o->backgroundLable = _e; } -+ { auto _e = varianceEncodedTarget(); _o->varianceEncodedTarget = _e; } -+ { auto _e = codeType(); _o->codeType = _e; } -+ { auto _e = objectnessScore(); _o->objectnessScore = _e; } - } - - inline flatbuffers::Offset DetectionOutput::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DetectionOutputT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5422,17 +5302,17 @@ inline flatbuffers::Offset CreateDetectionOutput(flatbuffers::F - } - - inline RoiPoolingT *RoiPooling::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new RoiPoolingT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new RoiPoolingT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void RoiPooling::UnPackTo(RoiPoolingT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = pooledWidth(); _o->pooledWidth = _e; }; -- { auto _e = pooledHeight(); _o->pooledHeight = _e; }; -- { auto _e = spatialScale(); _o->spatialScale = _e; }; -+ { auto _e = pooledWidth(); _o->pooledWidth = _e; } -+ { auto _e = pooledHeight(); _o->pooledHeight = _e; } -+ { auto _e = spatialScale(); _o->spatialScale = _e; } - } - - inline flatbuffers::Offset RoiPooling::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RoiPoolingT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5454,23 +5334,23 @@ inline flatbuffers::Offset CreateRoiPooling(flatbuffers::FlatBufferB - } - - inline ProposalT *Proposal::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ProposalT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ProposalT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Proposal::UnPackTo(ProposalT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = featStride(); _o->featStride = _e; }; -- { auto _e = baseSize(); _o->baseSize = _e; }; -- { auto _e = preNmsTopN(); _o->preNmsTopN = _e; }; -- { auto _e = afterNmsTopN(); _o->afterNmsTopN = _e; }; -- { auto _e = nmsThreshold(); _o->nmsThreshold = _e; }; -- { auto _e = minSize(); _o->minSize = _e; }; -- { auto _e = ratios(); if (_e) _o->ratios = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = scales(); if (_e) _o->scales = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = anchors(); if (_e) _o->anchors = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = featStride(); _o->featStride = _e; } -+ { auto _e = baseSize(); _o->baseSize = _e; } -+ { auto _e = preNmsTopN(); _o->preNmsTopN = _e; } -+ { auto _e = afterNmsTopN(); _o->afterNmsTopN = _e; } -+ { auto _e = nmsThreshold(); _o->nmsThreshold = _e; } -+ { auto _e = minSize(); _o->minSize = _e; } -+ { auto _e = ratios(); if (_e) _o->ratios = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = scales(); if (_e) _o->scales = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = anchors(); if (_e) _o->anchors = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset Proposal::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ProposalT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5504,25 +5384,25 @@ inline flatbuffers::Offset CreateProposal(flatbuffers::FlatBufferBuild - } - - inline InterpT *Interp::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new InterpT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new InterpT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Interp::UnPackTo(InterpT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = widthScale(); _o->widthScale = _e; }; -- { auto _e = heightScale(); _o->heightScale = _e; }; -- { auto _e = outputWidth(); _o->outputWidth = _e; }; -- { auto _e = outputHeight(); _o->outputHeight = _e; }; -- { auto _e = resizeType(); _o->resizeType = _e; }; -- { auto _e = alignCorners(); _o->alignCorners = _e; }; -- { auto _e = halfPixelCenters(); _o->halfPixelCenters = _e; }; -- { auto _e = widthOffset(); _o->widthOffset = _e; }; -- { auto _e = heightOffset(); _o->heightOffset = _e; }; -- { auto _e = cubicCoeffA(); _o->cubicCoeffA = _e; }; -- { auto _e = ctm(); _o->ctm = _e; }; -+ { auto _e = widthScale(); _o->widthScale = _e; } -+ { auto _e = heightScale(); _o->heightScale = _e; } -+ { auto _e = outputWidth(); _o->outputWidth = _e; } -+ { auto _e = outputHeight(); _o->outputHeight = _e; } -+ { auto _e = resizeType(); _o->resizeType = _e; } -+ { auto _e = alignCorners(); _o->alignCorners = _e; } -+ { auto _e = halfPixelCenters(); _o->halfPixelCenters = _e; } -+ { auto _e = widthOffset(); _o->widthOffset = _e; } -+ { auto _e = heightOffset(); _o->heightOffset = _e; } -+ { auto _e = cubicCoeffA(); _o->cubicCoeffA = _e; } -+ { auto _e = ctm(); _o->ctm = _e; } - } - - inline flatbuffers::Offset Interp::Pack(flatbuffers::FlatBufferBuilder &_fbb, const InterpT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5560,16 +5440,16 @@ inline flatbuffers::Offset CreateInterp(flatbuffers::FlatBufferBuilder & - } - - inline ResizeT *Resize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ResizeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ResizeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Resize::UnPackTo(ResizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = xScale(); _o->xScale = _e; }; -- { auto _e = yScale(); _o->yScale = _e; }; -+ { auto _e = xScale(); _o->xScale = _e; } -+ { auto _e = yScale(); _o->yScale = _e; } - } - - inline flatbuffers::Offset Resize::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ResizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5589,25 +5469,25 @@ inline flatbuffers::Offset CreateResize(flatbuffers::FlatBufferBuilder & - } - - inline PriorBoxT *PriorBox::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new PriorBoxT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new PriorBoxT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void PriorBox::UnPackTo(PriorBoxT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = minSizes(); if (_e) { _o->minSizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->minSizes[_i] = _e->Get(_i); } } }; -- { auto _e = maxSizes(); if (_e) { _o->maxSizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->maxSizes[_i] = _e->Get(_i); } } }; -- { auto _e = aspectRatios(); if (_e) { _o->aspectRatios.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aspectRatios[_i] = _e->Get(_i); } } }; -- { auto _e = variances(); if (_e) { _o->variances.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->variances[_i] = _e->Get(_i); } } }; -- { auto _e = flip(); _o->flip = _e; }; -- { auto _e = clip(); _o->clip = _e; }; -- { auto _e = imageWidth(); _o->imageWidth = _e; }; -- { auto _e = imageHeight(); _o->imageHeight = _e; }; -- { auto _e = stepWidth(); _o->stepWidth = _e; }; -- { auto _e = stepHeight(); _o->stepHeight = _e; }; -- { auto _e = offset(); _o->offset = _e; }; -+ { auto _e = minSizes(); if (_e) { _o->minSizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->minSizes[_i] = _e->Get(_i); } } } -+ { auto _e = maxSizes(); if (_e) { _o->maxSizes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->maxSizes[_i] = _e->Get(_i); } } } -+ { auto _e = aspectRatios(); if (_e) { _o->aspectRatios.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aspectRatios[_i] = _e->Get(_i); } } } -+ { auto _e = variances(); if (_e) { _o->variances.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->variances[_i] = _e->Get(_i); } } } -+ { auto _e = flip(); _o->flip = _e; } -+ { auto _e = clip(); _o->clip = _e; } -+ { auto _e = imageWidth(); _o->imageWidth = _e; } -+ { auto _e = imageHeight(); _o->imageHeight = _e; } -+ { auto _e = stepWidth(); _o->stepWidth = _e; } -+ { auto _e = stepHeight(); _o->stepHeight = _e; } -+ { auto _e = offset(); _o->offset = _e; } - } - - inline flatbuffers::Offset PriorBox::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PriorBoxT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5645,18 +5525,18 @@ inline flatbuffers::Offset CreatePriorBox(flatbuffers::FlatBufferBuild - } - - inline NormalizeT *Normalize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new NormalizeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new NormalizeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Normalize::UnPackTo(NormalizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = acrossSpatial(); _o->acrossSpatial = _e; }; -- { auto _e = channelShared(); _o->channelShared = _e; }; -- { auto _e = eps(); _o->eps = _e; }; -- { 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 = acrossSpatial(); _o->acrossSpatial = _e; } -+ { auto _e = channelShared(); _o->channelShared = _e; } -+ { auto _e = eps(); _o->eps = _e; } -+ { 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); } } } - } - - inline flatbuffers::Offset Normalize::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NormalizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5680,18 +5560,18 @@ inline flatbuffers::Offset CreateNormalize(flatbuffers::FlatBufferBui - } - - inline EltwiseInt8T *EltwiseInt8::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new EltwiseInt8T(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new EltwiseInt8T()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void EltwiseInt8::UnPackTo(EltwiseInt8T *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = type(); _o->type = _e; }; -- { auto _e = inputQuan0(); if (_e) _o->inputQuan0 = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = inputQuan1(); if (_e) _o->inputQuan1 = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = outputQuan(); if (_e) _o->outputQuan = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = inputQuan0(); if (_e) _o->inputQuan0 = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = inputQuan1(); if (_e) _o->inputQuan1 = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = outputQuan(); if (_e) _o->outputQuan = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset EltwiseInt8::Pack(flatbuffers::FlatBufferBuilder &_fbb, const EltwiseInt8T* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -5721,7 +5601,7 @@ inline const flatbuffers::TypeTable *PadModeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- PadModeTypeTable -+ MNN::PadModeTypeTable - }; - static const char * const names[] = { - "CAFFE", -@@ -5729,7 +5609,7 @@ inline const flatbuffers::TypeTable *PadModeTypeTable() { - "SAME" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5740,14 +5620,14 @@ inline const flatbuffers::TypeTable *QuantizeAlgoTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- QuantizeAlgoTypeTable -+ MNN::QuantizeAlgoTypeTable - }; - static const char * const names[] = { - "DEFAULT", - "OVERFLOW_AWARE" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5758,14 +5638,14 @@ inline const flatbuffers::TypeTable *PoolTypeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- PoolTypeTypeTable -+ MNN::PoolTypeTypeTable - }; - static const char * const names[] = { - "MAXPOOL", - "AVEPOOL" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5777,7 +5657,7 @@ inline const flatbuffers::TypeTable *PoolPadTypeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- PoolPadTypeTypeTable -+ MNN::PoolPadTypeTypeTable - }; - static const char * const names[] = { - "CAFFE", -@@ -5785,7 +5665,7 @@ inline const flatbuffers::TypeTable *PoolPadTypeTypeTable() { - "SAME" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5797,7 +5677,7 @@ inline const flatbuffers::TypeTable *AvgPoolCountTypeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- AvgPoolCountTypeTypeTable -+ MNN::AvgPoolCountTypeTypeTable - }; - static const char * const names[] = { - "DEFAULT", -@@ -5805,7 +5685,7 @@ inline const flatbuffers::TypeTable *AvgPoolCountTypeTypeTable() { - "EXCLUDE_PADDING" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5818,7 +5698,7 @@ inline const flatbuffers::TypeTable *EltwiseTypeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- EltwiseTypeTypeTable -+ MNN::EltwiseTypeTypeTable - }; - static const char * const names[] = { - "PROD", -@@ -5827,7 +5707,7 @@ inline const flatbuffers::TypeTable *EltwiseTypeTypeTable() { - "SUB" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5843,7 +5723,7 @@ inline const flatbuffers::TypeTable *CoordinateTransformationModeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- CoordinateTransformationModeTypeTable -+ MNN::CoordinateTransformationModeTypeTable - }; - static const char * const names[] = { - "NotSet", -@@ -5855,7 +5735,7 @@ inline const flatbuffers::TypeTable *CoordinateTransformationModeTypeTable() { - "TensorflowCropAndResize" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 7, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 7, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5880,7 +5760,7 @@ inline const flatbuffers::TypeTable *Convolution2DCommonTypeTable() { - { flatbuffers::ET_INT, 1, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- PadModeTypeTable -+ MNN::PadModeTypeTable - }; - static const char * const names[] = { - "padX", -@@ -5901,7 +5781,7 @@ inline const flatbuffers::TypeTable *Convolution2DCommonTypeTable() { - "outPads" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 16, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 16, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5919,7 +5799,7 @@ inline const flatbuffers::TypeTable *Convolution3DCommonTypeTable() { - { flatbuffers::ET_BOOL, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- PadModeTypeTable -+ MNN::PadModeTypeTable - }; - static const char * const names[] = { - "dilates", -@@ -5933,7 +5813,7 @@ inline const flatbuffers::TypeTable *Convolution3DCommonTypeTable() { - "relu6" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5966,7 +5846,7 @@ inline const flatbuffers::TypeTable *IDSTQuanTypeTable() { - "has_scaleInt" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -5981,7 +5861,7 @@ inline const flatbuffers::TypeTable *QuantizedFloatParamTypeTable() { - { flatbuffers::ET_INT, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- QuantizeAlgoTypeTable -+ MNN::QuantizeAlgoTypeTable - }; - static const char * const names[] = { - "weight", -@@ -5992,7 +5872,7 @@ inline const flatbuffers::TypeTable *QuantizedFloatParamTypeTable() { - "nbits" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6006,9 +5886,9 @@ inline const flatbuffers::TypeTable *Convolution2DTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 2 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- Convolution2DCommonTypeTable, -- IDSTQuanTypeTable, -- QuantizedFloatParamTypeTable -+ MNN::Convolution2DCommonTypeTable, -+ MNN::IDSTQuanTypeTable, -+ MNN::QuantizedFloatParamTypeTable - }; - static const char * const names[] = { - "common", -@@ -6018,7 +5898,7 @@ inline const flatbuffers::TypeTable *Convolution2DTypeTable() { - "symmetricQuan" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6030,7 +5910,7 @@ inline const flatbuffers::TypeTable *Convolution3DTypeTable() { - { flatbuffers::ET_FLOAT, 1, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- Convolution3DCommonTypeTable -+ MNN::Convolution3DCommonTypeTable - }; - static const char * const names[] = { - "common", -@@ -6038,7 +5918,7 @@ inline const flatbuffers::TypeTable *Convolution3DTypeTable() { - "bias" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6055,7 +5935,7 @@ inline const flatbuffers::TypeTable *InnerProductTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- IDSTQuanTypeTable -+ MNN::IDSTQuanTypeTable - }; - static const char * const names[] = { - "outputCount", -@@ -6068,7 +5948,7 @@ inline const flatbuffers::TypeTable *InnerProductTypeTable() { - "quanParameter" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 8, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 8, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6090,10 +5970,10 @@ inline const flatbuffers::TypeTable *PoolTypeTable() { - { flatbuffers::ET_CHAR, 0, 3 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- PoolTypeTypeTable, -- PoolPadTypeTypeTable, -- DataTypeTypeTable, -- AvgPoolCountTypeTypeTable -+ MNN::PoolTypeTypeTable, -+ MNN::PoolPadTypeTypeTable, -+ MNN::DataTypeTypeTable, -+ MNN::AvgPoolCountTypeTypeTable - }; - static const char * const names[] = { - "padX", -@@ -6111,7 +5991,7 @@ inline const flatbuffers::TypeTable *PoolTypeTable() { - "countType" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 13, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 13, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6125,8 +6005,8 @@ inline const flatbuffers::TypeTable *Pool3DTypeTable() { - { flatbuffers::ET_CHAR, 0, 1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- PoolTypeTypeTable, -- PoolPadTypeTypeTable -+ MNN::PoolTypeTypeTable, -+ MNN::PoolPadTypeTypeTable - }; - static const char * const names[] = { - "strides", -@@ -6136,7 +6016,7 @@ inline const flatbuffers::TypeTable *Pool3DTypeTable() { - "padType" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6149,7 +6029,7 @@ inline const flatbuffers::TypeTable *ReluTypeTable() { - "slope" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6164,7 +6044,7 @@ inline const flatbuffers::TypeTable *Relu6TypeTable() { - "maxValue" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6179,7 +6059,7 @@ inline const flatbuffers::TypeTable *PReluTypeTable() { - "slope" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6192,7 +6072,7 @@ inline const flatbuffers::TypeTable *ELUTypeTable() { - "alpha" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6211,7 +6091,7 @@ inline const flatbuffers::TypeTable *LRNTypeTable() { - "beta" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6230,7 +6110,7 @@ inline const flatbuffers::TypeTable *ArgMaxTypeTable() { - "softmaxThreshold" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6243,7 +6123,7 @@ inline const flatbuffers::TypeTable *AxisTypeTable() { - "axis" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6255,8 +6135,8 @@ inline const flatbuffers::TypeTable *InputTypeTable() { - { flatbuffers::ET_CHAR, 0, 1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable, -- MNN_DATA_FORMATTypeTable -+ MNN::DataTypeTypeTable, -+ MNN::MNN_DATA_FORMATTypeTable - }; - static const char * const names[] = { - "dims", -@@ -6264,7 +6144,7 @@ inline const flatbuffers::TypeTable *InputTypeTable() { - "dformat" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6282,7 +6162,7 @@ inline const flatbuffers::TypeTable *LSTMTypeTable() { - { flatbuffers::ET_FLOAT, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- BlobTypeTable -+ MNN::BlobTypeTable - }; - static const char * const names[] = { - "outputCount", -@@ -6296,7 +6176,7 @@ inline const flatbuffers::TypeTable *LSTMTypeTable() { - "quantScale" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6308,7 +6188,7 @@ inline const flatbuffers::TypeTable *SliceTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- NetSourceTypeTable -+ MNN::NetSourceTypeTable - }; - static const char * const names[] = { - "axis", -@@ -6316,7 +6196,7 @@ inline const flatbuffers::TypeTable *SliceTypeTable() { - "sourceType" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6343,7 +6223,7 @@ inline const flatbuffers::TypeTable *BatchNormTypeTable() { - "epsilon" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 8, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 8, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6360,7 +6240,7 @@ inline const flatbuffers::TypeTable *ScaleTypeTable() { - "biasData" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6371,14 +6251,14 @@ inline const flatbuffers::TypeTable *EltwiseTypeTable() { - { flatbuffers::ET_FLOAT, 1, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- EltwiseTypeTypeTable -+ MNN::EltwiseTypeTypeTable - }; - static const char * const names[] = { - "type", - "coeff" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6393,7 +6273,7 @@ inline const flatbuffers::TypeTable *FlattenTypeTable() { - "endAxis" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6406,7 +6286,7 @@ inline const flatbuffers::TypeTable *PermuteTypeTable() { - "dims" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6417,14 +6297,14 @@ inline const flatbuffers::TypeTable *ReshapeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- MNN_DATA_FORMATTypeTable -+ MNN::MNN_DATA_FORMATTypeTable - }; - static const char * const names[] = { - "dims", - "dimType" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6455,7 +6335,7 @@ inline const flatbuffers::TypeTable *DetectionOutputTypeTable() { - "objectnessScore" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 10, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 10, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6472,7 +6352,7 @@ inline const flatbuffers::TypeTable *RoiPoolingTypeTable() { - "spatialScale" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6490,7 +6370,7 @@ inline const flatbuffers::TypeTable *ProposalTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- BlobTypeTable -+ MNN::BlobTypeTable - }; - static const char * const names[] = { - "featStride", -@@ -6504,7 +6384,7 @@ inline const flatbuffers::TypeTable *ProposalTypeTable() { - "anchors" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6524,7 +6404,7 @@ inline const flatbuffers::TypeTable *InterpTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- CoordinateTransformationModeTypeTable -+ MNN::CoordinateTransformationModeTypeTable - }; - static const char * const names[] = { - "widthScale", -@@ -6540,7 +6420,7 @@ inline const flatbuffers::TypeTable *InterpTypeTable() { - "ctm" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -6555,7 +6435,7 @@ inline const flatbuffers::TypeTable *ResizeTypeTable() { - "yScale" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6588,7 +6468,7 @@ inline const flatbuffers::TypeTable *PriorBoxTypeTable() { - "offset" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 11, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6607,7 +6487,7 @@ inline const flatbuffers::TypeTable *NormalizeTypeTable() { - "scale" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -6620,8 +6500,8 @@ inline const flatbuffers::TypeTable *EltwiseInt8TypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- EltwiseTypeTypeTable, -- QuantizedFloatParamTypeTable -+ MNN::EltwiseTypeTypeTable, -+ MNN::QuantizedFloatParamTypeTable - }; - static const char * const names[] = { - "type", -@@ -6630,7 +6510,7 @@ inline const flatbuffers::TypeTable *EltwiseInt8TypeTable() { - "outputQuan" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -diff --git a/schema/current/GpuLibrary_generated.h b/schema/current/GpuLibrary_generated.h -index 321f816c..84c1e9f0 100644 ---- a/schema/current/GpuLibrary_generated.h -+++ b/schema/current/GpuLibrary_generated.h -@@ -4,25 +4,31 @@ - #ifndef FLATBUFFERS_GENERATED_GPULIBRARY_MNN_H_ - #define FLATBUFFERS_GENERATED_GPULIBRARY_MNN_H_ - -+#include "flatbuffers/flatbuffers.h" - --#include "Tensor_generated.h" - #include "Type_generated.h" -+#include "Tensor_generated.h" - - namespace MNN { - - struct GpuBuffer; -+struct GpuBufferBuilder; - struct GpuBufferT; - - struct GpuPipeline; -+struct GpuPipelineBuilder; - struct GpuPipelineT; - - struct GpuStage; -+struct GpuStageBuilder; - struct GpuStageT; - - struct GpuFunction; -+struct GpuFunctionBuilder; - struct GpuFunctionT; - - struct GpuLibrary; -+struct GpuLibraryBuilder; - struct GpuLibraryT; - - inline const flatbuffers::TypeTable *GpuBufferTypeTable(); -@@ -35,7 +41,7 @@ inline const flatbuffers::TypeTable *GpuFunctionTypeTable(); - - inline const flatbuffers::TypeTable *GpuLibraryTypeTable(); - --enum STORAGE_TYPE { -+enum STORAGE_TYPE : int8_t { - STORAGE_TYPE_BUFFER = 0, - STORAGE_TYPE_UNIFORM = 1, - STORAGE_TYPE_IMAGE = 2, -@@ -53,7 +59,7 @@ inline const STORAGE_TYPE (&EnumValuesSTORAGE_TYPE())[3] { - } - - inline const char * const *EnumNamesSTORAGE_TYPE() { -- static const char * const names[] = { -+ static const char * const names[4] = { - "BUFFER", - "UNIFORM", - "IMAGE", -@@ -63,12 +69,12 @@ inline const char * const *EnumNamesSTORAGE_TYPE() { - } - - inline const char *EnumNameSTORAGE_TYPE(STORAGE_TYPE e) { -- if (e < STORAGE_TYPE_BUFFER || e > STORAGE_TYPE_IMAGE) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, STORAGE_TYPE_BUFFER, STORAGE_TYPE_IMAGE)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesSTORAGE_TYPE()[index]; - } - --enum ACCESS_TYPE { -+enum ACCESS_TYPE : int8_t { - ACCESS_TYPE_READ_ONLY = 0, - ACCESS_TYPE_WRITE_ONLY = 1, - ACCESS_TYPE_READ_WRITE = 2, -@@ -86,7 +92,7 @@ inline const ACCESS_TYPE (&EnumValuesACCESS_TYPE())[3] { - } - - inline const char * const *EnumNamesACCESS_TYPE() { -- static const char * const names[] = { -+ static const char * const names[4] = { - "READ_ONLY", - "WRITE_ONLY", - "READ_WRITE", -@@ -96,24 +102,21 @@ inline const char * const *EnumNamesACCESS_TYPE() { - } - - inline const char *EnumNameACCESS_TYPE(ACCESS_TYPE e) { -- if (e < ACCESS_TYPE_READ_ONLY || e > ACCESS_TYPE_READ_WRITE) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, ACCESS_TYPE_READ_ONLY, ACCESS_TYPE_READ_WRITE)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesACCESS_TYPE()[index]; - } - - struct GpuBufferT : public flatbuffers::NativeTable { - typedef GpuBuffer TableType; -- ACCESS_TYPE access; -- STORAGE_TYPE storage; -- std::unique_ptr content; -- GpuBufferT() -- : access(ACCESS_TYPE_READ_ONLY), -- storage(STORAGE_TYPE_BUFFER) { -- } -+ MNN::ACCESS_TYPE access = MNN::ACCESS_TYPE_READ_ONLY; -+ MNN::STORAGE_TYPE storage = MNN::STORAGE_TYPE_BUFFER; -+ std::unique_ptr content{}; - }; - - struct GpuBuffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef GpuBufferT NativeTableType; -+ typedef GpuBufferBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return GpuBufferTypeTable(); - } -@@ -122,14 +125,14 @@ struct GpuBuffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_STORAGE = 6, - VT_CONTENT = 8 - }; -- ACCESS_TYPE access() const { -- return static_cast(GetField(VT_ACCESS, 0)); -+ MNN::ACCESS_TYPE access() const { -+ return static_cast(GetField(VT_ACCESS, 0)); - } -- STORAGE_TYPE storage() const { -- return static_cast(GetField(VT_STORAGE, 0)); -+ MNN::STORAGE_TYPE storage() const { -+ return static_cast(GetField(VT_STORAGE, 0)); - } -- const Blob *content() const { -- return GetPointer(VT_CONTENT); -+ const MNN::Blob *content() const { -+ return GetPointer(VT_CONTENT); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -145,22 +148,22 @@ struct GpuBuffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct GpuBufferBuilder { -+ typedef GpuBuffer Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_access(ACCESS_TYPE access) { -+ void add_access(MNN::ACCESS_TYPE access) { - fbb_.AddElement(GpuBuffer::VT_ACCESS, static_cast(access), 0); - } -- void add_storage(STORAGE_TYPE storage) { -+ void add_storage(MNN::STORAGE_TYPE storage) { - fbb_.AddElement(GpuBuffer::VT_STORAGE, static_cast(storage), 0); - } -- void add_content(flatbuffers::Offset content) { -+ void add_content(flatbuffers::Offset content) { - fbb_.AddOffset(GpuBuffer::VT_CONTENT, content); - } - explicit GpuBufferBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- GpuBufferBuilder &operator=(const GpuBufferBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -170,9 +173,9 @@ struct GpuBufferBuilder { - - inline flatbuffers::Offset CreateGpuBuffer( - flatbuffers::FlatBufferBuilder &_fbb, -- ACCESS_TYPE access = ACCESS_TYPE_READ_ONLY, -- STORAGE_TYPE storage = STORAGE_TYPE_BUFFER, -- flatbuffers::Offset content = 0) { -+ MNN::ACCESS_TYPE access = MNN::ACCESS_TYPE_READ_ONLY, -+ MNN::STORAGE_TYPE storage = MNN::STORAGE_TYPE_BUFFER, -+ flatbuffers::Offset content = 0) { - GpuBufferBuilder builder_(_fbb); - builder_.add_content(content); - builder_.add_storage(storage); -@@ -184,18 +187,17 @@ flatbuffers::Offset CreateGpuBuffer(flatbuffers::FlatBufferBuilder &_ - - struct GpuPipelineT : public flatbuffers::NativeTable { - typedef GpuPipeline TableType; -- std::vector localSize; -- std::string key; -- std::vector metal; -- std::vector vulkan; -- std::string openglComputeShader; -- std::string openclKernel; -- GpuPipelineT() { -- } -+ std::vector localSize{}; -+ std::string key{}; -+ std::vector metal{}; -+ std::vector vulkan{}; -+ std::string openglComputeShader{}; -+ std::string openclKernel{}; - }; - - struct GpuPipeline FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef GpuPipelineT NativeTableType; -+ typedef GpuPipelineBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return GpuPipelineTypeTable(); - } -@@ -247,6 +249,7 @@ struct GpuPipeline FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct GpuPipelineBuilder { -+ typedef GpuPipeline Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_localSize(flatbuffers::Offset> localSize) { -@@ -271,7 +274,6 @@ struct GpuPipelineBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- GpuPipelineBuilder &operator=(const GpuPipelineBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -325,23 +327,20 @@ flatbuffers::Offset CreateGpuPipeline(flatbuffers::FlatBufferBuilde - - struct GpuStageT : public flatbuffers::NativeTable { - typedef GpuStage TableType; -- std::string pipeline; -- std::vector groupSize; -- std::vector inputIndexes; -- std::vector outputIndexes; -- std::vector> middleBuffer; -- std::vector> constBuffer; -- int32_t globalSizeIndex; -- std::vector globalSizeDivide; -- bool requireSize; -- GpuStageT() -- : globalSizeIndex(0), -- requireSize(false) { -- } -+ std::string pipeline{}; -+ std::vector groupSize{}; -+ std::vector inputIndexes{}; -+ std::vector outputIndexes{}; -+ std::vector> middleBuffer{}; -+ std::vector> constBuffer{}; -+ int32_t globalSizeIndex = 0; -+ std::vector globalSizeDivide{}; -+ bool requireSize = false; - }; - - struct GpuStage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef GpuStageT NativeTableType; -+ typedef GpuStageBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return GpuStageTypeTable(); - } -@@ -368,11 +367,11 @@ struct GpuStage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *outputIndexes() const { - return GetPointer *>(VT_OUTPUTINDEXES); - } -- const flatbuffers::Vector> *middleBuffer() const { -- return GetPointer> *>(VT_MIDDLEBUFFER); -+ const flatbuffers::Vector> *middleBuffer() const { -+ return GetPointer> *>(VT_MIDDLEBUFFER); - } -- const flatbuffers::Vector> *constBuffer() const { -- return GetPointer> *>(VT_CONSTBUFFER); -+ const flatbuffers::Vector> *constBuffer() const { -+ return GetPointer> *>(VT_CONSTBUFFER); - } - int32_t globalSizeIndex() const { - return GetField(VT_GLOBALSIZEINDEX, 0); -@@ -411,6 +410,7 @@ struct GpuStage FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct GpuStageBuilder { -+ typedef GpuStage Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_pipeline(flatbuffers::Offset pipeline) { -@@ -425,10 +425,10 @@ struct GpuStageBuilder { - void add_outputIndexes(flatbuffers::Offset> outputIndexes) { - fbb_.AddOffset(GpuStage::VT_OUTPUTINDEXES, outputIndexes); - } -- void add_middleBuffer(flatbuffers::Offset>> middleBuffer) { -+ void add_middleBuffer(flatbuffers::Offset>> middleBuffer) { - fbb_.AddOffset(GpuStage::VT_MIDDLEBUFFER, middleBuffer); - } -- void add_constBuffer(flatbuffers::Offset>> constBuffer) { -+ void add_constBuffer(flatbuffers::Offset>> constBuffer) { - fbb_.AddOffset(GpuStage::VT_CONSTBUFFER, constBuffer); - } - void add_globalSizeIndex(int32_t globalSizeIndex) { -@@ -444,7 +444,6 @@ struct GpuStageBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- GpuStageBuilder &operator=(const GpuStageBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -458,8 +457,8 @@ inline flatbuffers::Offset CreateGpuStage( - flatbuffers::Offset> groupSize = 0, - flatbuffers::Offset> inputIndexes = 0, - flatbuffers::Offset> outputIndexes = 0, -- flatbuffers::Offset>> middleBuffer = 0, -- flatbuffers::Offset>> constBuffer = 0, -+ flatbuffers::Offset>> middleBuffer = 0, -+ flatbuffers::Offset>> constBuffer = 0, - int32_t globalSizeIndex = 0, - flatbuffers::Offset> globalSizeDivide = 0, - bool requireSize = false) { -@@ -482,8 +481,8 @@ inline flatbuffers::Offset CreateGpuStageDirect( - const std::vector *groupSize = nullptr, - const std::vector *inputIndexes = nullptr, - const std::vector *outputIndexes = nullptr, -- const std::vector> *middleBuffer = nullptr, -- const std::vector> *constBuffer = nullptr, -+ const std::vector> *middleBuffer = nullptr, -+ const std::vector> *constBuffer = nullptr, - int32_t globalSizeIndex = 0, - const std::vector *globalSizeDivide = nullptr, - bool requireSize = false) { -@@ -491,8 +490,8 @@ inline flatbuffers::Offset CreateGpuStageDirect( - auto groupSize__ = groupSize ? _fbb.CreateVector(*groupSize) : 0; - auto inputIndexes__ = inputIndexes ? _fbb.CreateVector(*inputIndexes) : 0; - auto outputIndexes__ = outputIndexes ? _fbb.CreateVector(*outputIndexes) : 0; -- auto middleBuffer__ = middleBuffer ? _fbb.CreateVector>(*middleBuffer) : 0; -- auto constBuffer__ = constBuffer ? _fbb.CreateVector>(*constBuffer) : 0; -+ auto middleBuffer__ = middleBuffer ? _fbb.CreateVector>(*middleBuffer) : 0; -+ auto constBuffer__ = constBuffer ? _fbb.CreateVector>(*constBuffer) : 0; - auto globalSizeDivide__ = globalSizeDivide ? _fbb.CreateVector(*globalSizeDivide) : 0; - return MNN::CreateGpuStage( - _fbb, -@@ -511,14 +510,13 @@ flatbuffers::Offset CreateGpuStage(flatbuffers::FlatBufferBuilder &_fb - - struct GpuFunctionT : public flatbuffers::NativeTable { - typedef GpuFunction TableType; -- std::vector> stags; -- std::string name; -- GpuFunctionT() { -- } -+ std::vector> stags{}; -+ std::string name{}; - }; - - struct GpuFunction FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef GpuFunctionT NativeTableType; -+ typedef GpuFunctionBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return GpuFunctionTypeTable(); - } -@@ -526,8 +524,8 @@ struct GpuFunction FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_STAGS = 4, - VT_NAME = 6 - }; -- const flatbuffers::Vector> *stags() const { -- return GetPointer> *>(VT_STAGS); -+ const flatbuffers::Vector> *stags() const { -+ return GetPointer> *>(VT_STAGS); - } - const flatbuffers::String *name() const { - return GetPointer(VT_NAME); -@@ -547,9 +545,10 @@ struct GpuFunction FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct GpuFunctionBuilder { -+ typedef GpuFunction Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_stags(flatbuffers::Offset>> stags) { -+ void add_stags(flatbuffers::Offset>> stags) { - fbb_.AddOffset(GpuFunction::VT_STAGS, stags); - } - void add_name(flatbuffers::Offset name) { -@@ -559,7 +558,6 @@ struct GpuFunctionBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- GpuFunctionBuilder &operator=(const GpuFunctionBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -569,7 +567,7 @@ struct GpuFunctionBuilder { - - inline flatbuffers::Offset CreateGpuFunction( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset>> stags = 0, -+ flatbuffers::Offset>> stags = 0, - flatbuffers::Offset name = 0) { - GpuFunctionBuilder builder_(_fbb); - builder_.add_name(name); -@@ -579,9 +577,9 @@ inline flatbuffers::Offset CreateGpuFunction( - - inline flatbuffers::Offset CreateGpuFunctionDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- const std::vector> *stags = nullptr, -+ const std::vector> *stags = nullptr, - const char *name = nullptr) { -- auto stags__ = stags ? _fbb.CreateVector>(*stags) : 0; -+ auto stags__ = stags ? _fbb.CreateVector>(*stags) : 0; - auto name__ = name ? _fbb.CreateString(name) : 0; - return MNN::CreateGpuFunction( - _fbb, -@@ -593,15 +591,14 @@ flatbuffers::Offset CreateGpuFunction(flatbuffers::FlatBufferBuilde - - struct GpuLibraryT : public flatbuffers::NativeTable { - typedef GpuLibrary TableType; -- std::vector> functions; -- std::vector> pipeline; -- std::string name; -- GpuLibraryT() { -- } -+ std::vector> functions{}; -+ std::vector> pipeline{}; -+ std::string name{}; - }; - - struct GpuLibrary FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef GpuLibraryT NativeTableType; -+ typedef GpuLibraryBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return GpuLibraryTypeTable(); - } -@@ -610,11 +607,11 @@ struct GpuLibrary FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_PIPELINE = 6, - VT_NAME = 8 - }; -- const flatbuffers::Vector> *functions() const { -- return GetPointer> *>(VT_FUNCTIONS); -+ const flatbuffers::Vector> *functions() const { -+ return GetPointer> *>(VT_FUNCTIONS); - } -- const flatbuffers::Vector> *pipeline() const { -- return GetPointer> *>(VT_PIPELINE); -+ const flatbuffers::Vector> *pipeline() const { -+ return GetPointer> *>(VT_PIPELINE); - } - const flatbuffers::String *name() const { - return GetPointer(VT_NAME); -@@ -637,12 +634,13 @@ struct GpuLibrary FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct GpuLibraryBuilder { -+ typedef GpuLibrary Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_functions(flatbuffers::Offset>> functions) { -+ void add_functions(flatbuffers::Offset>> functions) { - fbb_.AddOffset(GpuLibrary::VT_FUNCTIONS, functions); - } -- void add_pipeline(flatbuffers::Offset>> pipeline) { -+ void add_pipeline(flatbuffers::Offset>> pipeline) { - fbb_.AddOffset(GpuLibrary::VT_PIPELINE, pipeline); - } - void add_name(flatbuffers::Offset name) { -@@ -652,7 +650,6 @@ struct GpuLibraryBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- GpuLibraryBuilder &operator=(const GpuLibraryBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -662,8 +659,8 @@ struct GpuLibraryBuilder { - - inline flatbuffers::Offset CreateGpuLibrary( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset>> functions = 0, -- flatbuffers::Offset>> pipeline = 0, -+ flatbuffers::Offset>> functions = 0, -+ flatbuffers::Offset>> pipeline = 0, - flatbuffers::Offset name = 0) { - GpuLibraryBuilder builder_(_fbb); - builder_.add_name(name); -@@ -674,11 +671,11 @@ inline flatbuffers::Offset CreateGpuLibrary( - - inline flatbuffers::Offset CreateGpuLibraryDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- const std::vector> *functions = nullptr, -- const std::vector> *pipeline = nullptr, -+ const std::vector> *functions = nullptr, -+ const std::vector> *pipeline = nullptr, - const char *name = nullptr) { -- auto functions__ = functions ? _fbb.CreateVector>(*functions) : 0; -- auto pipeline__ = pipeline ? _fbb.CreateVector>(*pipeline) : 0; -+ auto functions__ = functions ? _fbb.CreateVector>(*functions) : 0; -+ auto pipeline__ = pipeline ? _fbb.CreateVector>(*pipeline) : 0; - auto name__ = name ? _fbb.CreateString(name) : 0; - return MNN::CreateGpuLibrary( - _fbb, -@@ -690,17 +687,17 @@ inline flatbuffers::Offset CreateGpuLibraryDirect( - flatbuffers::Offset CreateGpuLibrary(flatbuffers::FlatBufferBuilder &_fbb, const GpuLibraryT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); - - inline GpuBufferT *GpuBuffer::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new GpuBufferT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new GpuBufferT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void GpuBuffer::UnPackTo(GpuBufferT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = access(); _o->access = _e; }; -- { auto _e = storage(); _o->storage = _e; }; -- { auto _e = content(); if (_e) _o->content = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = access(); _o->access = _e; } -+ { auto _e = storage(); _o->storage = _e; } -+ { auto _e = content(); if (_e) _o->content = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset GpuBuffer::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuBufferT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -722,20 +719,20 @@ inline flatbuffers::Offset CreateGpuBuffer(flatbuffers::FlatBufferBui - } - - inline GpuPipelineT *GpuPipeline::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new GpuPipelineT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new GpuPipelineT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void GpuPipeline::UnPackTo(GpuPipelineT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = localSize(); if (_e) { _o->localSize.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->localSize[_i] = _e->Get(_i); } } }; -- { auto _e = key(); if (_e) _o->key = _e->str(); }; -- { auto _e = metal(); if (_e) { _o->metal.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->metal[_i] = _e->Get(_i); } } }; -- { auto _e = vulkan(); if (_e) { _o->vulkan.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->vulkan[_i] = _e->Get(_i); } } }; -- { auto _e = openglComputeShader(); if (_e) _o->openglComputeShader = _e->str(); }; -- { auto _e = openclKernel(); if (_e) _o->openclKernel = _e->str(); }; -+ { auto _e = localSize(); if (_e) { _o->localSize.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->localSize[_i] = _e->Get(_i); } } } -+ { auto _e = key(); if (_e) _o->key = _e->str(); } -+ { auto _e = metal(); if (_e) { _o->metal.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->metal.begin()); } } -+ { auto _e = vulkan(); if (_e) { _o->vulkan.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->vulkan.begin()); } } -+ { auto _e = openglComputeShader(); if (_e) _o->openglComputeShader = _e->str(); } -+ { auto _e = openclKernel(); if (_e) _o->openclKernel = _e->str(); } - } - - inline flatbuffers::Offset GpuPipeline::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuPipelineT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -763,23 +760,23 @@ inline flatbuffers::Offset CreateGpuPipeline(flatbuffers::FlatBuffe - } - - inline GpuStageT *GpuStage::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new GpuStageT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new GpuStageT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void GpuStage::UnPackTo(GpuStageT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = pipeline(); if (_e) _o->pipeline = _e->str(); }; -- { auto _e = groupSize(); if (_e) { _o->groupSize.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->groupSize[_i] = _e->Get(_i); } } }; -- { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } }; -- { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } }; -- { auto _e = middleBuffer(); if (_e) { _o->middleBuffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->middleBuffer[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -- { auto _e = constBuffer(); if (_e) { _o->constBuffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->constBuffer[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -- { auto _e = globalSizeIndex(); _o->globalSizeIndex = _e; }; -- { auto _e = globalSizeDivide(); if (_e) { _o->globalSizeDivide.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->globalSizeDivide[_i] = _e->Get(_i); } } }; -- { auto _e = requireSize(); _o->requireSize = _e; }; -+ { auto _e = pipeline(); if (_e) _o->pipeline = _e->str(); } -+ { auto _e = groupSize(); if (_e) { _o->groupSize.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->groupSize[_i] = _e->Get(_i); } } } -+ { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } } -+ { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } } -+ { auto _e = middleBuffer(); if (_e) { _o->middleBuffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->middleBuffer[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } -+ { auto _e = constBuffer(); if (_e) { _o->constBuffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->constBuffer[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } -+ { auto _e = globalSizeIndex(); _o->globalSizeIndex = _e; } -+ { auto _e = globalSizeDivide(); if (_e) { _o->globalSizeDivide.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->globalSizeDivide[_i] = _e->Get(_i); } } } -+ { auto _e = requireSize(); _o->requireSize = _e; } - } - - inline flatbuffers::Offset GpuStage::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuStageT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -794,8 +791,8 @@ inline flatbuffers::Offset CreateGpuStage(flatbuffers::FlatBufferBuild - auto _groupSize = _o->groupSize.size() ? _fbb.CreateVector(_o->groupSize) : 0; - auto _inputIndexes = _o->inputIndexes.size() ? _fbb.CreateVector(_o->inputIndexes) : 0; - auto _outputIndexes = _o->outputIndexes.size() ? _fbb.CreateVector(_o->outputIndexes) : 0; -- auto _middleBuffer = _o->middleBuffer.size() ? _fbb.CreateVector> (_o->middleBuffer.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuBuffer(*__va->__fbb, __va->__o->middleBuffer[i].get(), __va->__rehasher); }, &_va ) : 0; -- auto _constBuffer = _o->constBuffer.size() ? _fbb.CreateVector> (_o->constBuffer.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuBuffer(*__va->__fbb, __va->__o->constBuffer[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _middleBuffer = _o->middleBuffer.size() ? _fbb.CreateVector> (_o->middleBuffer.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuBuffer(*__va->__fbb, __va->__o->middleBuffer[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _constBuffer = _o->constBuffer.size() ? _fbb.CreateVector> (_o->constBuffer.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuBuffer(*__va->__fbb, __va->__o->constBuffer[i].get(), __va->__rehasher); }, &_va ) : 0; - auto _globalSizeIndex = _o->globalSizeIndex; - auto _globalSizeDivide = _o->globalSizeDivide.size() ? _fbb.CreateVector(_o->globalSizeDivide) : 0; - auto _requireSize = _o->requireSize; -@@ -813,16 +810,16 @@ inline flatbuffers::Offset CreateGpuStage(flatbuffers::FlatBufferBuild - } - - inline GpuFunctionT *GpuFunction::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new GpuFunctionT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new GpuFunctionT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void GpuFunction::UnPackTo(GpuFunctionT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = stags(); if (_e) { _o->stags.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->stags[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -- { auto _e = name(); if (_e) _o->name = _e->str(); }; -+ { auto _e = stags(); if (_e) { _o->stags.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->stags[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } -+ { auto _e = name(); if (_e) _o->name = _e->str(); } - } - - inline flatbuffers::Offset GpuFunction::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuFunctionT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -833,7 +830,7 @@ inline flatbuffers::Offset CreateGpuFunction(flatbuffers::FlatBuffe - (void)_rehasher; - (void)_o; - struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GpuFunctionT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; -- auto _stags = _o->stags.size() ? _fbb.CreateVector> (_o->stags.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuStage(*__va->__fbb, __va->__o->stags[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _stags = _o->stags.size() ? _fbb.CreateVector> (_o->stags.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuStage(*__va->__fbb, __va->__o->stags[i].get(), __va->__rehasher); }, &_va ) : 0; - auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); - return MNN::CreateGpuFunction( - _fbb, -@@ -842,17 +839,17 @@ inline flatbuffers::Offset CreateGpuFunction(flatbuffers::FlatBuffe - } - - inline GpuLibraryT *GpuLibrary::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new GpuLibraryT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new GpuLibraryT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void GpuLibrary::UnPackTo(GpuLibraryT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = functions(); if (_e) { _o->functions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->functions[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -- { auto _e = pipeline(); if (_e) { _o->pipeline.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pipeline[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -- { auto _e = name(); if (_e) _o->name = _e->str(); }; -+ { auto _e = functions(); if (_e) { _o->functions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->functions[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } -+ { auto _e = pipeline(); if (_e) { _o->pipeline.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->pipeline[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } -+ { auto _e = name(); if (_e) _o->name = _e->str(); } - } - - inline flatbuffers::Offset GpuLibrary::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GpuLibraryT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -863,8 +860,8 @@ inline flatbuffers::Offset CreateGpuLibrary(flatbuffers::FlatBufferB - (void)_rehasher; - (void)_o; - struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const GpuLibraryT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; -- auto _functions = _o->functions.size() ? _fbb.CreateVector> (_o->functions.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuFunction(*__va->__fbb, __va->__o->functions[i].get(), __va->__rehasher); }, &_va ) : 0; -- auto _pipeline = _o->pipeline.size() ? _fbb.CreateVector> (_o->pipeline.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuPipeline(*__va->__fbb, __va->__o->pipeline[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _functions = _o->functions.size() ? _fbb.CreateVector> (_o->functions.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuFunction(*__va->__fbb, __va->__o->functions[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _pipeline = _o->pipeline.size() ? _fbb.CreateVector> (_o->pipeline.size(), [](size_t i, _VectorArgs *__va) { return CreateGpuPipeline(*__va->__fbb, __va->__o->pipeline[i].get(), __va->__rehasher); }, &_va ) : 0; - auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); - return MNN::CreateGpuLibrary( - _fbb, -@@ -880,7 +877,7 @@ inline const flatbuffers::TypeTable *STORAGE_TYPETypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- STORAGE_TYPETypeTable -+ MNN::STORAGE_TYPETypeTable - }; - static const char * const names[] = { - "BUFFER", -@@ -888,7 +885,7 @@ inline const flatbuffers::TypeTable *STORAGE_TYPETypeTable() { - "IMAGE" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -900,7 +897,7 @@ inline const flatbuffers::TypeTable *ACCESS_TYPETypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ACCESS_TYPETypeTable -+ MNN::ACCESS_TYPETypeTable - }; - static const char * const names[] = { - "READ_ONLY", -@@ -908,7 +905,7 @@ inline const flatbuffers::TypeTable *ACCESS_TYPETypeTable() { - "READ_WRITE" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -920,9 +917,9 @@ inline const flatbuffers::TypeTable *GpuBufferTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 2 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ACCESS_TYPETypeTable, -- STORAGE_TYPETypeTable, -- BlobTypeTable -+ MNN::ACCESS_TYPETypeTable, -+ MNN::STORAGE_TYPETypeTable, -+ MNN::BlobTypeTable - }; - static const char * const names[] = { - "access", -@@ -930,7 +927,7 @@ inline const flatbuffers::TypeTable *GpuBufferTypeTable() { - "content" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -953,7 +950,7 @@ inline const flatbuffers::TypeTable *GpuPipelineTypeTable() { - "openclKernel" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 6, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 6, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -971,7 +968,7 @@ inline const flatbuffers::TypeTable *GpuStageTypeTable() { - { flatbuffers::ET_BOOL, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- GpuBufferTypeTable -+ MNN::GpuBufferTypeTable - }; - static const char * const names[] = { - "pipeline", -@@ -985,7 +982,7 @@ inline const flatbuffers::TypeTable *GpuStageTypeTable() { - "requireSize" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -996,14 +993,14 @@ inline const flatbuffers::TypeTable *GpuFunctionTypeTable() { - { flatbuffers::ET_STRING, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- GpuStageTypeTable -+ MNN::GpuStageTypeTable - }; - static const char * const names[] = { - "stags", - "name" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -1015,8 +1012,8 @@ inline const flatbuffers::TypeTable *GpuLibraryTypeTable() { - { flatbuffers::ET_STRING, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- GpuFunctionTypeTable, -- GpuPipelineTypeTable -+ MNN::GpuFunctionTypeTable, -+ MNN::GpuPipelineTypeTable - }; - static const char * const names[] = { - "functions", -@@ -1024,7 +1021,7 @@ inline const flatbuffers::TypeTable *GpuLibraryTypeTable() { - "name" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -diff --git a/schema/current/MNN_generated.h b/schema/current/MNN_generated.h -index 63a1d207..d5552b87 100644 ---- a/schema/current/MNN_generated.h -+++ b/schema/current/MNN_generated.h -@@ -4,48 +4,60 @@ - #ifndef FLATBUFFERS_GENERATED_MNN_MNN_H_ - #define FLATBUFFERS_GENERATED_MNN_MNN_H_ - -+#include "flatbuffers/flatbuffers.h" - --#include "CaffeOp_generated.h" --#include "GpuLibrary_generated.h" - #include "TFQuantizeOp_generated.h" --#include "Tensor_generated.h" --#include "TensorflowOp_generated.h" - #include "Type_generated.h" - #include "UserDefine_generated.h" -+#include "CaffeOp_generated.h" -+#include "GpuLibrary_generated.h" -+#include "TensorflowOp_generated.h" -+#include "Tensor_generated.h" - - namespace MNN { - - struct Plugin; -+struct PluginBuilder; - struct PluginT; - - struct Extra; -+struct ExtraBuilder; - struct ExtraT; - - struct StringVec; -+struct StringVecBuilder; - struct StringVecT; - - struct WhileParam; -+struct WhileParamBuilder; - struct WhileParamT; - - struct IfParam; -+struct IfParamBuilder; - struct IfParamT; - - struct Op; -+struct OpBuilder; - struct OpT; - - struct View; -+struct ViewBuilder; - struct ViewT; - - struct Region; -+struct RegionBuilder; - struct RegionT; - - struct TensorDescribe; -+struct TensorDescribeBuilder; - struct TensorDescribeT; - - struct SubGraphProto; -+struct SubGraphProtoBuilder; - struct SubGraphProtoT; - - struct Net; -+struct NetBuilder; - struct NetT; - - inline const flatbuffers::TypeTable *PluginTypeTable(); -@@ -70,7 +82,7 @@ inline const flatbuffers::TypeTable *SubGraphProtoTypeTable(); - - inline const flatbuffers::TypeTable *NetTypeTable(); - --enum OpType { -+enum OpType : int32_t { - OpType_AbsVal = 0, - OpType_QuantizedAdd = 1, - OpType_ArgMax = 2, -@@ -382,7 +394,7 @@ inline const OpType (&EnumValuesOpType())[150] { - } - - inline const char * const *EnumNamesOpType() { -- static const char * const names[] = { -+ static const char * const names[605] = { - "AbsVal", - "QuantizedAdd", - "ArgMax", -@@ -993,12 +1005,12 @@ inline const char * const *EnumNamesOpType() { - } - - inline const char *EnumNameOpType(OpType e) { -- if (e < OpType_AbsVal || e > OpType_LayerNorm) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, OpType_AbsVal, OpType_LayerNorm)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesOpType()[index]; - } - --enum OpParameter { -+enum OpParameter : uint8_t { - OpParameter_NONE = 0, - OpParameter_QuantizedAdd = 1, - OpParameter_ArgMax = 2, -@@ -1188,7 +1200,7 @@ inline const OpParameter (&EnumValuesOpParameter())[89] { - } - - inline const char * const *EnumNamesOpParameter() { -- static const char * const names[] = { -+ static const char * const names[90] = { - "NONE", - "QuantizedAdd", - "ArgMax", -@@ -1284,8 +1296,8 @@ inline const char * const *EnumNamesOpParameter() { - } - - inline const char *EnumNameOpParameter(OpParameter e) { -- if (e < OpParameter_NONE || e > OpParameter_LayerNorm) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, OpParameter_NONE, OpParameter_LayerNorm)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesOpParameter()[index]; - } - -@@ -1293,355 +1305,355 @@ template struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_NONE; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedAdd; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_ArgMax; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_AsString; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Axis; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_BatchNorm; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_BinaryOp; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Blob; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_CastParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Convolution2D; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Crop; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_CropAndResize; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Dequantize; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_DetectionOutput; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Eltwise; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_ExpandDims; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Fill; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Flatten; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Gather; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_GatherV2; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_InnerProduct; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Input; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Interp; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_LRN; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_LSTM; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_MatMul; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_NonMaxSuppressionV2; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Normalize; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_PackParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Permute; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Plugin; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Pool; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_PRelu; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_PriorBox; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Proposal; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedAvgPool; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedBiasAdd; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedConcat; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedLogistic; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedMatMul; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedMaxPool; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedRelu; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedRelu6; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedReshape; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedSoftmax; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizeMaxMin; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizeV2; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Range; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Rank; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_ReduceJoin; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_ReductionParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Relu; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Relu6; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_RequantizationRange; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Requantize; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Reshape; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Resize; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_RoiPooling; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Scale; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Selu; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Size; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Slice; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_SliceTf; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_SpaceBatch; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_SqueezeParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_StridedSliceParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_TensorConvertInfo; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_TfQuantizedConv2D; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_TopKV2; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Transpose; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_UnaryOp; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_MomentsParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_RNNParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_BatchMatMulParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_QuantizedFloatParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_DepthSpaceParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_EltwiseInt8; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_ReverseSequenceParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Extra; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Pool3D; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_Convolution3D; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_ELU; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_DetectionPostProcessParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_OneHotParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_PadParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_WhileParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_IfParam; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_RandomUniform; - }; - --template<> struct OpParameterTraits { -+template<> struct OpParameterTraits { - static const OpParameter enum_value = OpParameter_LayerNorm; - }; - -@@ -1653,8 +1665,8 @@ struct OpParameterUnion { - OpParameterUnion(OpParameterUnion&& u) FLATBUFFERS_NOEXCEPT : - type(OpParameter_NONE), value(nullptr) - { std::swap(type, u.type); std::swap(value, u.value); } -- OpParameterUnion(const OpParameterUnion &) FLATBUFFERS_NOEXCEPT; -- OpParameterUnion &operator=(const OpParameterUnion &u) FLATBUFFERS_NOEXCEPT -+ OpParameterUnion(const OpParameterUnion &); -+ OpParameterUnion &operator=(const OpParameterUnion &u) - { OpParameterUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } - OpParameterUnion &operator=(OpParameterUnion &&u) FLATBUFFERS_NOEXCEPT - { std::swap(type, u.type); std::swap(value, u.value); return *this; } -@@ -1665,10 +1677,11 @@ struct OpParameterUnion { - #ifndef FLATBUFFERS_CPP98_STL - template - void Set(T&& val) { -+ using RT = typename std::remove_reference::type; - Reset(); -- type = OpParameterTraits::enum_value; -+ type = OpParameterTraits::enum_value; - if (type != OpParameter_NONE) { -- value = new T(std::forward(val)); -+ value = new RT(std::forward(val)); - } - } - #endif // FLATBUFFERS_CPP98_STL -@@ -1676,716 +1689,716 @@ struct OpParameterUnion { - static void *UnPack(const void *obj, OpParameter type, const flatbuffers::resolver_function_t *resolver); - flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; - -- QuantizedAddT *AsQuantizedAdd() { -+ MNN::QuantizedAddT *AsQuantizedAdd() { - return type == OpParameter_QuantizedAdd ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedAddT *AsQuantizedAdd() const { -+ const MNN::QuantizedAddT *AsQuantizedAdd() const { - return type == OpParameter_QuantizedAdd ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ArgMaxT *AsArgMax() { -+ MNN::ArgMaxT *AsArgMax() { - return type == OpParameter_ArgMax ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ArgMaxT *AsArgMax() const { -+ const MNN::ArgMaxT *AsArgMax() const { - return type == OpParameter_ArgMax ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- AsStringT *AsAsString() { -+ MNN::AsStringT *AsAsString() { - return type == OpParameter_AsString ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const AsStringT *AsAsString() const { -+ const MNN::AsStringT *AsAsString() const { - return type == OpParameter_AsString ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- AxisT *AsAxis() { -+ MNN::AxisT *AsAxis() { - return type == OpParameter_Axis ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const AxisT *AsAxis() const { -+ const MNN::AxisT *AsAxis() const { - return type == OpParameter_Axis ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- BatchNormT *AsBatchNorm() { -+ MNN::BatchNormT *AsBatchNorm() { - return type == OpParameter_BatchNorm ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const BatchNormT *AsBatchNorm() const { -+ const MNN::BatchNormT *AsBatchNorm() const { - return type == OpParameter_BatchNorm ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- BinaryOpT *AsBinaryOp() { -+ MNN::BinaryOpT *AsBinaryOp() { - return type == OpParameter_BinaryOp ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const BinaryOpT *AsBinaryOp() const { -+ const MNN::BinaryOpT *AsBinaryOp() const { - return type == OpParameter_BinaryOp ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- BlobT *AsBlob() { -+ MNN::BlobT *AsBlob() { - return type == OpParameter_Blob ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const BlobT *AsBlob() const { -+ const MNN::BlobT *AsBlob() const { - return type == OpParameter_Blob ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- CastParamT *AsCastParam() { -+ MNN::CastParamT *AsCastParam() { - return type == OpParameter_CastParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const CastParamT *AsCastParam() const { -+ const MNN::CastParamT *AsCastParam() const { - return type == OpParameter_CastParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- Convolution2DT *AsConvolution2D() { -+ MNN::Convolution2DT *AsConvolution2D() { - return type == OpParameter_Convolution2D ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const Convolution2DT *AsConvolution2D() const { -+ const MNN::Convolution2DT *AsConvolution2D() const { - return type == OpParameter_Convolution2D ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- CropT *AsCrop() { -+ MNN::CropT *AsCrop() { - return type == OpParameter_Crop ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const CropT *AsCrop() const { -+ const MNN::CropT *AsCrop() const { - return type == OpParameter_Crop ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- CropAndResizeT *AsCropAndResize() { -+ MNN::CropAndResizeT *AsCropAndResize() { - return type == OpParameter_CropAndResize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const CropAndResizeT *AsCropAndResize() const { -+ const MNN::CropAndResizeT *AsCropAndResize() const { - return type == OpParameter_CropAndResize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- DequantizeT *AsDequantize() { -+ MNN::DequantizeT *AsDequantize() { - return type == OpParameter_Dequantize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const DequantizeT *AsDequantize() const { -+ const MNN::DequantizeT *AsDequantize() const { - return type == OpParameter_Dequantize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- DetectionOutputT *AsDetectionOutput() { -+ MNN::DetectionOutputT *AsDetectionOutput() { - return type == OpParameter_DetectionOutput ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const DetectionOutputT *AsDetectionOutput() const { -+ const MNN::DetectionOutputT *AsDetectionOutput() const { - return type == OpParameter_DetectionOutput ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- EltwiseT *AsEltwise() { -+ MNN::EltwiseT *AsEltwise() { - return type == OpParameter_Eltwise ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const EltwiseT *AsEltwise() const { -+ const MNN::EltwiseT *AsEltwise() const { - return type == OpParameter_Eltwise ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ExpandDimsT *AsExpandDims() { -+ MNN::ExpandDimsT *AsExpandDims() { - return type == OpParameter_ExpandDims ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ExpandDimsT *AsExpandDims() const { -+ const MNN::ExpandDimsT *AsExpandDims() const { - return type == OpParameter_ExpandDims ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- FillT *AsFill() { -+ MNN::FillT *AsFill() { - return type == OpParameter_Fill ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const FillT *AsFill() const { -+ const MNN::FillT *AsFill() const { - return type == OpParameter_Fill ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- FlattenT *AsFlatten() { -+ MNN::FlattenT *AsFlatten() { - return type == OpParameter_Flatten ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const FlattenT *AsFlatten() const { -+ const MNN::FlattenT *AsFlatten() const { - return type == OpParameter_Flatten ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- GatherT *AsGather() { -+ MNN::GatherT *AsGather() { - return type == OpParameter_Gather ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const GatherT *AsGather() const { -+ const MNN::GatherT *AsGather() const { - return type == OpParameter_Gather ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- GatherV2T *AsGatherV2() { -+ MNN::GatherV2T *AsGatherV2() { - return type == OpParameter_GatherV2 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const GatherV2T *AsGatherV2() const { -+ const MNN::GatherV2T *AsGatherV2() const { - return type == OpParameter_GatherV2 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- InnerProductT *AsInnerProduct() { -+ MNN::InnerProductT *AsInnerProduct() { - return type == OpParameter_InnerProduct ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const InnerProductT *AsInnerProduct() const { -+ const MNN::InnerProductT *AsInnerProduct() const { - return type == OpParameter_InnerProduct ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- InputT *AsInput() { -+ MNN::InputT *AsInput() { - return type == OpParameter_Input ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const InputT *AsInput() const { -+ const MNN::InputT *AsInput() const { - return type == OpParameter_Input ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- InterpT *AsInterp() { -+ MNN::InterpT *AsInterp() { - return type == OpParameter_Interp ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const InterpT *AsInterp() const { -+ const MNN::InterpT *AsInterp() const { - return type == OpParameter_Interp ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- LRNT *AsLRN() { -+ MNN::LRNT *AsLRN() { - return type == OpParameter_LRN ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const LRNT *AsLRN() const { -+ const MNN::LRNT *AsLRN() const { - return type == OpParameter_LRN ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- LSTMT *AsLSTM() { -+ MNN::LSTMT *AsLSTM() { - return type == OpParameter_LSTM ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const LSTMT *AsLSTM() const { -+ const MNN::LSTMT *AsLSTM() const { - return type == OpParameter_LSTM ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- MatMulT *AsMatMul() { -+ MNN::MatMulT *AsMatMul() { - return type == OpParameter_MatMul ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const MatMulT *AsMatMul() const { -+ const MNN::MatMulT *AsMatMul() const { - return type == OpParameter_MatMul ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- NonMaxSuppressionV2T *AsNonMaxSuppressionV2() { -+ MNN::NonMaxSuppressionV2T *AsNonMaxSuppressionV2() { - return type == OpParameter_NonMaxSuppressionV2 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const NonMaxSuppressionV2T *AsNonMaxSuppressionV2() const { -+ const MNN::NonMaxSuppressionV2T *AsNonMaxSuppressionV2() const { - return type == OpParameter_NonMaxSuppressionV2 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- NormalizeT *AsNormalize() { -+ MNN::NormalizeT *AsNormalize() { - return type == OpParameter_Normalize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const NormalizeT *AsNormalize() const { -+ const MNN::NormalizeT *AsNormalize() const { - return type == OpParameter_Normalize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- PackParamT *AsPackParam() { -+ MNN::PackParamT *AsPackParam() { - return type == OpParameter_PackParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const PackParamT *AsPackParam() const { -+ const MNN::PackParamT *AsPackParam() const { - return type == OpParameter_PackParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- PermuteT *AsPermute() { -+ MNN::PermuteT *AsPermute() { - return type == OpParameter_Permute ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const PermuteT *AsPermute() const { -+ const MNN::PermuteT *AsPermute() const { - return type == OpParameter_Permute ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- PluginT *AsPlugin() { -+ MNN::PluginT *AsPlugin() { - return type == OpParameter_Plugin ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const PluginT *AsPlugin() const { -+ const MNN::PluginT *AsPlugin() const { - return type == OpParameter_Plugin ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- PoolT *AsPool() { -+ MNN::PoolT *AsPool() { - return type == OpParameter_Pool ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const PoolT *AsPool() const { -+ const MNN::PoolT *AsPool() const { - return type == OpParameter_Pool ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- PReluT *AsPRelu() { -+ MNN::PReluT *AsPRelu() { - return type == OpParameter_PRelu ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const PReluT *AsPRelu() const { -+ const MNN::PReluT *AsPRelu() const { - return type == OpParameter_PRelu ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- PriorBoxT *AsPriorBox() { -+ MNN::PriorBoxT *AsPriorBox() { - return type == OpParameter_PriorBox ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const PriorBoxT *AsPriorBox() const { -+ const MNN::PriorBoxT *AsPriorBox() const { - return type == OpParameter_PriorBox ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ProposalT *AsProposal() { -+ MNN::ProposalT *AsProposal() { - return type == OpParameter_Proposal ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ProposalT *AsProposal() const { -+ const MNN::ProposalT *AsProposal() const { - return type == OpParameter_Proposal ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedAvgPoolT *AsQuantizedAvgPool() { -+ MNN::QuantizedAvgPoolT *AsQuantizedAvgPool() { - return type == OpParameter_QuantizedAvgPool ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedAvgPoolT *AsQuantizedAvgPool() const { -+ const MNN::QuantizedAvgPoolT *AsQuantizedAvgPool() const { - return type == OpParameter_QuantizedAvgPool ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedBiasAddT *AsQuantizedBiasAdd() { -+ MNN::QuantizedBiasAddT *AsQuantizedBiasAdd() { - return type == OpParameter_QuantizedBiasAdd ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedBiasAddT *AsQuantizedBiasAdd() const { -+ const MNN::QuantizedBiasAddT *AsQuantizedBiasAdd() const { - return type == OpParameter_QuantizedBiasAdd ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedConcatT *AsQuantizedConcat() { -+ MNN::QuantizedConcatT *AsQuantizedConcat() { - return type == OpParameter_QuantizedConcat ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedConcatT *AsQuantizedConcat() const { -+ const MNN::QuantizedConcatT *AsQuantizedConcat() const { - return type == OpParameter_QuantizedConcat ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedLogisticT *AsQuantizedLogistic() { -+ MNN::QuantizedLogisticT *AsQuantizedLogistic() { - return type == OpParameter_QuantizedLogistic ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedLogisticT *AsQuantizedLogistic() const { -+ const MNN::QuantizedLogisticT *AsQuantizedLogistic() const { - return type == OpParameter_QuantizedLogistic ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedMatMulT *AsQuantizedMatMul() { -+ MNN::QuantizedMatMulT *AsQuantizedMatMul() { - return type == OpParameter_QuantizedMatMul ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedMatMulT *AsQuantizedMatMul() const { -+ const MNN::QuantizedMatMulT *AsQuantizedMatMul() const { - return type == OpParameter_QuantizedMatMul ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedMaxPoolT *AsQuantizedMaxPool() { -+ MNN::QuantizedMaxPoolT *AsQuantizedMaxPool() { - return type == OpParameter_QuantizedMaxPool ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedMaxPoolT *AsQuantizedMaxPool() const { -+ const MNN::QuantizedMaxPoolT *AsQuantizedMaxPool() const { - return type == OpParameter_QuantizedMaxPool ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedReluT *AsQuantizedRelu() { -+ MNN::QuantizedReluT *AsQuantizedRelu() { - return type == OpParameter_QuantizedRelu ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedReluT *AsQuantizedRelu() const { -+ const MNN::QuantizedReluT *AsQuantizedRelu() const { - return type == OpParameter_QuantizedRelu ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedRelu6T *AsQuantizedRelu6() { -+ MNN::QuantizedRelu6T *AsQuantizedRelu6() { - return type == OpParameter_QuantizedRelu6 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedRelu6T *AsQuantizedRelu6() const { -+ const MNN::QuantizedRelu6T *AsQuantizedRelu6() const { - return type == OpParameter_QuantizedRelu6 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedReshapeT *AsQuantizedReshape() { -+ MNN::QuantizedReshapeT *AsQuantizedReshape() { - return type == OpParameter_QuantizedReshape ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedReshapeT *AsQuantizedReshape() const { -+ const MNN::QuantizedReshapeT *AsQuantizedReshape() const { - return type == OpParameter_QuantizedReshape ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedSoftmaxT *AsQuantizedSoftmax() { -+ MNN::QuantizedSoftmaxT *AsQuantizedSoftmax() { - return type == OpParameter_QuantizedSoftmax ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedSoftmaxT *AsQuantizedSoftmax() const { -+ const MNN::QuantizedSoftmaxT *AsQuantizedSoftmax() const { - return type == OpParameter_QuantizedSoftmax ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizeMaxMinT *AsQuantizeMaxMin() { -+ MNN::QuantizeMaxMinT *AsQuantizeMaxMin() { - return type == OpParameter_QuantizeMaxMin ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizeMaxMinT *AsQuantizeMaxMin() const { -+ const MNN::QuantizeMaxMinT *AsQuantizeMaxMin() const { - return type == OpParameter_QuantizeMaxMin ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizeV2T *AsQuantizeV2() { -+ MNN::QuantizeV2T *AsQuantizeV2() { - return type == OpParameter_QuantizeV2 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizeV2T *AsQuantizeV2() const { -+ const MNN::QuantizeV2T *AsQuantizeV2() const { - return type == OpParameter_QuantizeV2 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- RangeT *AsRange() { -+ MNN::RangeT *AsRange() { - return type == OpParameter_Range ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const RangeT *AsRange() const { -+ const MNN::RangeT *AsRange() const { - return type == OpParameter_Range ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- RankT *AsRank() { -+ MNN::RankT *AsRank() { - return type == OpParameter_Rank ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const RankT *AsRank() const { -+ const MNN::RankT *AsRank() const { - return type == OpParameter_Rank ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ReduceJoinT *AsReduceJoin() { -+ MNN::ReduceJoinT *AsReduceJoin() { - return type == OpParameter_ReduceJoin ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ReduceJoinT *AsReduceJoin() const { -+ const MNN::ReduceJoinT *AsReduceJoin() const { - return type == OpParameter_ReduceJoin ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ReductionParamT *AsReductionParam() { -+ MNN::ReductionParamT *AsReductionParam() { - return type == OpParameter_ReductionParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ReductionParamT *AsReductionParam() const { -+ const MNN::ReductionParamT *AsReductionParam() const { - return type == OpParameter_ReductionParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ReluT *AsRelu() { -+ MNN::ReluT *AsRelu() { - return type == OpParameter_Relu ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ReluT *AsRelu() const { -+ const MNN::ReluT *AsRelu() const { - return type == OpParameter_Relu ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- Relu6T *AsRelu6() { -+ MNN::Relu6T *AsRelu6() { - return type == OpParameter_Relu6 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const Relu6T *AsRelu6() const { -+ const MNN::Relu6T *AsRelu6() const { - return type == OpParameter_Relu6 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- RequantizationRangeT *AsRequantizationRange() { -+ MNN::RequantizationRangeT *AsRequantizationRange() { - return type == OpParameter_RequantizationRange ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const RequantizationRangeT *AsRequantizationRange() const { -+ const MNN::RequantizationRangeT *AsRequantizationRange() const { - return type == OpParameter_RequantizationRange ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- RequantizeT *AsRequantize() { -+ MNN::RequantizeT *AsRequantize() { - return type == OpParameter_Requantize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const RequantizeT *AsRequantize() const { -+ const MNN::RequantizeT *AsRequantize() const { - return type == OpParameter_Requantize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ReshapeT *AsReshape() { -+ MNN::ReshapeT *AsReshape() { - return type == OpParameter_Reshape ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ReshapeT *AsReshape() const { -+ const MNN::ReshapeT *AsReshape() const { - return type == OpParameter_Reshape ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ResizeT *AsResize() { -+ MNN::ResizeT *AsResize() { - return type == OpParameter_Resize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ResizeT *AsResize() const { -+ const MNN::ResizeT *AsResize() const { - return type == OpParameter_Resize ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- RoiPoolingT *AsRoiPooling() { -+ MNN::RoiPoolingT *AsRoiPooling() { - return type == OpParameter_RoiPooling ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const RoiPoolingT *AsRoiPooling() const { -+ const MNN::RoiPoolingT *AsRoiPooling() const { - return type == OpParameter_RoiPooling ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ScaleT *AsScale() { -+ MNN::ScaleT *AsScale() { - return type == OpParameter_Scale ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ScaleT *AsScale() const { -+ const MNN::ScaleT *AsScale() const { - return type == OpParameter_Scale ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- SeluT *AsSelu() { -+ MNN::SeluT *AsSelu() { - return type == OpParameter_Selu ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const SeluT *AsSelu() const { -+ const MNN::SeluT *AsSelu() const { - return type == OpParameter_Selu ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- SizeT *AsSize() { -+ MNN::SizeT *AsSize() { - return type == OpParameter_Size ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const SizeT *AsSize() const { -+ const MNN::SizeT *AsSize() const { - return type == OpParameter_Size ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- SliceT *AsSlice() { -+ MNN::SliceT *AsSlice() { - return type == OpParameter_Slice ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const SliceT *AsSlice() const { -+ const MNN::SliceT *AsSlice() const { - return type == OpParameter_Slice ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- SliceTfT *AsSliceTf() { -+ MNN::SliceTfT *AsSliceTf() { - return type == OpParameter_SliceTf ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const SliceTfT *AsSliceTf() const { -+ const MNN::SliceTfT *AsSliceTf() const { - return type == OpParameter_SliceTf ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- SpaceBatchT *AsSpaceBatch() { -+ MNN::SpaceBatchT *AsSpaceBatch() { - return type == OpParameter_SpaceBatch ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const SpaceBatchT *AsSpaceBatch() const { -+ const MNN::SpaceBatchT *AsSpaceBatch() const { - return type == OpParameter_SpaceBatch ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- SqueezeParamT *AsSqueezeParam() { -+ MNN::SqueezeParamT *AsSqueezeParam() { - return type == OpParameter_SqueezeParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const SqueezeParamT *AsSqueezeParam() const { -+ const MNN::SqueezeParamT *AsSqueezeParam() const { - return type == OpParameter_SqueezeParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- StridedSliceParamT *AsStridedSliceParam() { -+ MNN::StridedSliceParamT *AsStridedSliceParam() { - return type == OpParameter_StridedSliceParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const StridedSliceParamT *AsStridedSliceParam() const { -+ const MNN::StridedSliceParamT *AsStridedSliceParam() const { - return type == OpParameter_StridedSliceParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- TensorConvertInfoT *AsTensorConvertInfo() { -+ MNN::TensorConvertInfoT *AsTensorConvertInfo() { - return type == OpParameter_TensorConvertInfo ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const TensorConvertInfoT *AsTensorConvertInfo() const { -+ const MNN::TensorConvertInfoT *AsTensorConvertInfo() const { - return type == OpParameter_TensorConvertInfo ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- TfQuantizedConv2DT *AsTfQuantizedConv2D() { -+ MNN::TfQuantizedConv2DT *AsTfQuantizedConv2D() { - return type == OpParameter_TfQuantizedConv2D ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const TfQuantizedConv2DT *AsTfQuantizedConv2D() const { -+ const MNN::TfQuantizedConv2DT *AsTfQuantizedConv2D() const { - return type == OpParameter_TfQuantizedConv2D ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- TopKV2T *AsTopKV2() { -+ MNN::TopKV2T *AsTopKV2() { - return type == OpParameter_TopKV2 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const TopKV2T *AsTopKV2() const { -+ const MNN::TopKV2T *AsTopKV2() const { - return type == OpParameter_TopKV2 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- TransposeT *AsTranspose() { -+ MNN::TransposeT *AsTranspose() { - return type == OpParameter_Transpose ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const TransposeT *AsTranspose() const { -+ const MNN::TransposeT *AsTranspose() const { - return type == OpParameter_Transpose ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- UnaryOpT *AsUnaryOp() { -+ MNN::UnaryOpT *AsUnaryOp() { - return type == OpParameter_UnaryOp ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const UnaryOpT *AsUnaryOp() const { -+ const MNN::UnaryOpT *AsUnaryOp() const { - return type == OpParameter_UnaryOp ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- MomentsParamT *AsMomentsParam() { -+ MNN::MomentsParamT *AsMomentsParam() { - return type == OpParameter_MomentsParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const MomentsParamT *AsMomentsParam() const { -+ const MNN::MomentsParamT *AsMomentsParam() const { - return type == OpParameter_MomentsParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- RNNParamT *AsRNNParam() { -+ MNN::RNNParamT *AsRNNParam() { - return type == OpParameter_RNNParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const RNNParamT *AsRNNParam() const { -+ const MNN::RNNParamT *AsRNNParam() const { - return type == OpParameter_RNNParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- BatchMatMulParamT *AsBatchMatMulParam() { -+ MNN::BatchMatMulParamT *AsBatchMatMulParam() { - return type == OpParameter_BatchMatMulParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const BatchMatMulParamT *AsBatchMatMulParam() const { -+ const MNN::BatchMatMulParamT *AsBatchMatMulParam() const { - return type == OpParameter_BatchMatMulParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- QuantizedFloatParamT *AsQuantizedFloatParam() { -+ MNN::QuantizedFloatParamT *AsQuantizedFloatParam() { - return type == OpParameter_QuantizedFloatParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const QuantizedFloatParamT *AsQuantizedFloatParam() const { -+ const MNN::QuantizedFloatParamT *AsQuantizedFloatParam() const { - return type == OpParameter_QuantizedFloatParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- DepthSpaceParamT *AsDepthSpaceParam() { -+ MNN::DepthSpaceParamT *AsDepthSpaceParam() { - return type == OpParameter_DepthSpaceParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const DepthSpaceParamT *AsDepthSpaceParam() const { -+ const MNN::DepthSpaceParamT *AsDepthSpaceParam() const { - return type == OpParameter_DepthSpaceParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- EltwiseInt8T *AsEltwiseInt8() { -+ MNN::EltwiseInt8T *AsEltwiseInt8() { - return type == OpParameter_EltwiseInt8 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const EltwiseInt8T *AsEltwiseInt8() const { -+ const MNN::EltwiseInt8T *AsEltwiseInt8() const { - return type == OpParameter_EltwiseInt8 ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ReverseSequenceParamT *AsReverseSequenceParam() { -+ MNN::ReverseSequenceParamT *AsReverseSequenceParam() { - return type == OpParameter_ReverseSequenceParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ReverseSequenceParamT *AsReverseSequenceParam() const { -+ const MNN::ReverseSequenceParamT *AsReverseSequenceParam() const { - return type == OpParameter_ReverseSequenceParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ExtraT *AsExtra() { -+ MNN::ExtraT *AsExtra() { - return type == OpParameter_Extra ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ExtraT *AsExtra() const { -+ const MNN::ExtraT *AsExtra() const { - return type == OpParameter_Extra ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- Pool3DT *AsPool3D() { -+ MNN::Pool3DT *AsPool3D() { - return type == OpParameter_Pool3D ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const Pool3DT *AsPool3D() const { -+ const MNN::Pool3DT *AsPool3D() const { - return type == OpParameter_Pool3D ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- Convolution3DT *AsConvolution3D() { -+ MNN::Convolution3DT *AsConvolution3D() { - return type == OpParameter_Convolution3D ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const Convolution3DT *AsConvolution3D() const { -+ const MNN::Convolution3DT *AsConvolution3D() const { - return type == OpParameter_Convolution3D ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- ELUT *AsELU() { -+ MNN::ELUT *AsELU() { - return type == OpParameter_ELU ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const ELUT *AsELU() const { -+ const MNN::ELUT *AsELU() const { - return type == OpParameter_ELU ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- DetectionPostProcessParamT *AsDetectionPostProcessParam() { -+ MNN::DetectionPostProcessParamT *AsDetectionPostProcessParam() { - return type == OpParameter_DetectionPostProcessParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const DetectionPostProcessParamT *AsDetectionPostProcessParam() const { -+ const MNN::DetectionPostProcessParamT *AsDetectionPostProcessParam() const { - return type == OpParameter_DetectionPostProcessParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- OneHotParamT *AsOneHotParam() { -+ MNN::OneHotParamT *AsOneHotParam() { - return type == OpParameter_OneHotParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const OneHotParamT *AsOneHotParam() const { -+ const MNN::OneHotParamT *AsOneHotParam() const { - return type == OpParameter_OneHotParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- PadParamT *AsPadParam() { -+ MNN::PadParamT *AsPadParam() { - return type == OpParameter_PadParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const PadParamT *AsPadParam() const { -+ const MNN::PadParamT *AsPadParam() const { - return type == OpParameter_PadParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- WhileParamT *AsWhileParam() { -+ MNN::WhileParamT *AsWhileParam() { - return type == OpParameter_WhileParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const WhileParamT *AsWhileParam() const { -+ const MNN::WhileParamT *AsWhileParam() const { - return type == OpParameter_WhileParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- IfParamT *AsIfParam() { -+ MNN::IfParamT *AsIfParam() { - return type == OpParameter_IfParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const IfParamT *AsIfParam() const { -+ const MNN::IfParamT *AsIfParam() const { - return type == OpParameter_IfParam ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- RandomUniformT *AsRandomUniform() { -+ MNN::RandomUniformT *AsRandomUniform() { - return type == OpParameter_RandomUniform ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const RandomUniformT *AsRandomUniform() const { -+ const MNN::RandomUniformT *AsRandomUniform() const { - return type == OpParameter_RandomUniform ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- LayerNormT *AsLayerNorm() { -+ MNN::LayerNormT *AsLayerNorm() { - return type == OpParameter_LayerNorm ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } -- const LayerNormT *AsLayerNorm() const { -+ const MNN::LayerNormT *AsLayerNorm() const { - return type == OpParameter_LayerNorm ? -- reinterpret_cast(value) : nullptr; -+ reinterpret_cast(value) : nullptr; - } - }; - - bool VerifyOpParameter(flatbuffers::Verifier &verifier, const void *obj, OpParameter type); - bool VerifyOpParameterVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); - --enum ForwardType { -+enum ForwardType : int8_t { - ForwardType_CPU = 0, - ForwardType_METAL = 1, - ForwardType_OPENCL = 2, -@@ -2407,7 +2420,7 @@ inline const ForwardType (&EnumValuesForwardType())[5] { - } - - inline const char * const *EnumNamesForwardType() { -- static const char * const names[] = { -+ static const char * const names[6] = { - "CPU", - "METAL", - "OPENCL", -@@ -2419,12 +2432,12 @@ inline const char * const *EnumNamesForwardType() { - } - - inline const char *EnumNameForwardType(ForwardType e) { -- if (e < ForwardType_CPU || e > ForwardType_VULKAN) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, ForwardType_CPU, ForwardType_VULKAN)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesForwardType()[index]; - } - --enum Usage { -+enum Usage : int8_t { - Usage_INFERENCE = 0, - Usage_TRAIN = 1, - Usage_INFERENCE_STATIC = 2, -@@ -2442,7 +2455,7 @@ inline const Usage (&EnumValuesUsage())[3] { - } - - inline const char * const *EnumNamesUsage() { -- static const char * const names[] = { -+ static const char * const names[4] = { - "INFERENCE", - "TRAIN", - "INFERENCE_STATIC", -@@ -2452,21 +2465,20 @@ inline const char * const *EnumNamesUsage() { - } - - inline const char *EnumNameUsage(Usage e) { -- if (e < Usage_INFERENCE || e > Usage_INFERENCE_STATIC) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, Usage_INFERENCE, Usage_INFERENCE_STATIC)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesUsage()[index]; - } - - struct PluginT : public flatbuffers::NativeTable { - typedef Plugin TableType; -- std::string type; -- std::vector> attr; -- PluginT() { -- } -+ std::string type{}; -+ std::vector> attr{}; - }; - - struct Plugin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef PluginT NativeTableType; -+ typedef PluginBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return PluginTypeTable(); - } -@@ -2477,8 +2489,8 @@ struct Plugin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::String *type() const { - return GetPointer(VT_TYPE); - } -- const flatbuffers::Vector> *attr() const { -- return GetPointer> *>(VT_ATTR); -+ const flatbuffers::Vector> *attr() const { -+ return GetPointer> *>(VT_ATTR); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2495,19 +2507,19 @@ struct Plugin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct PluginBuilder { -+ typedef Plugin Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_type(flatbuffers::Offset type) { - fbb_.AddOffset(Plugin::VT_TYPE, type); - } -- void add_attr(flatbuffers::Offset>> attr) { -+ void add_attr(flatbuffers::Offset>> attr) { - fbb_.AddOffset(Plugin::VT_ATTR, attr); - } - explicit PluginBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- PluginBuilder &operator=(const PluginBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2518,7 +2530,7 @@ struct PluginBuilder { - inline flatbuffers::Offset CreatePlugin( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset type = 0, -- flatbuffers::Offset>> attr = 0) { -+ flatbuffers::Offset>> attr = 0) { - PluginBuilder builder_(_fbb); - builder_.add_attr(attr); - builder_.add_type(type); -@@ -2528,9 +2540,9 @@ inline flatbuffers::Offset CreatePlugin( - inline flatbuffers::Offset CreatePluginDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *type = nullptr, -- const std::vector> *attr = nullptr) { -+ const std::vector> *attr = nullptr) { - auto type__ = type ? _fbb.CreateString(type) : 0; -- auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; -+ auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; - return MNN::CreatePlugin( - _fbb, - type__, -@@ -2541,16 +2553,15 @@ flatbuffers::Offset CreatePlugin(flatbuffers::FlatBufferBuilder &_fbb, c - - struct ExtraT : public flatbuffers::NativeTable { - typedef Extra TableType; -- std::string type; -- std::string engine; -- std::vector info; -- std::vector> attr; -- ExtraT() { -- } -+ std::string type{}; -+ std::string engine{}; -+ std::vector info{}; -+ std::vector> attr{}; - }; - - struct Extra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ExtraT NativeTableType; -+ typedef ExtraBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ExtraTypeTable(); - } -@@ -2569,8 +2580,8 @@ struct Extra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *info() const { - return GetPointer *>(VT_INFO); - } -- const flatbuffers::Vector> *attr() const { -- return GetPointer> *>(VT_ATTR); -+ const flatbuffers::Vector> *attr() const { -+ return GetPointer> *>(VT_ATTR); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2591,6 +2602,7 @@ struct Extra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ExtraBuilder { -+ typedef Extra Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_type(flatbuffers::Offset type) { -@@ -2602,14 +2614,13 @@ struct ExtraBuilder { - void add_info(flatbuffers::Offset> info) { - fbb_.AddOffset(Extra::VT_INFO, info); - } -- void add_attr(flatbuffers::Offset>> attr) { -+ void add_attr(flatbuffers::Offset>> attr) { - fbb_.AddOffset(Extra::VT_ATTR, attr); - } - explicit ExtraBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ExtraBuilder &operator=(const ExtraBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2622,7 +2633,7 @@ inline flatbuffers::Offset CreateExtra( - flatbuffers::Offset type = 0, - flatbuffers::Offset engine = 0, - flatbuffers::Offset> info = 0, -- flatbuffers::Offset>> attr = 0) { -+ flatbuffers::Offset>> attr = 0) { - ExtraBuilder builder_(_fbb); - builder_.add_attr(attr); - builder_.add_info(info); -@@ -2636,11 +2647,11 @@ inline flatbuffers::Offset CreateExtraDirect( - const char *type = nullptr, - const char *engine = nullptr, - const std::vector *info = nullptr, -- const std::vector> *attr = nullptr) { -+ const std::vector> *attr = nullptr) { - auto type__ = type ? _fbb.CreateString(type) : 0; - auto engine__ = engine ? _fbb.CreateString(engine) : 0; - auto info__ = info ? _fbb.CreateVector(*info) : 0; -- auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; -+ auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; - return MNN::CreateExtra( - _fbb, - type__, -@@ -2653,13 +2664,12 @@ flatbuffers::Offset CreateExtra(flatbuffers::FlatBufferBuilder &_fbb, con - - struct StringVecT : public flatbuffers::NativeTable { - typedef StringVec TableType; -- std::vector data; -- StringVecT() { -- } -+ std::vector data{}; - }; - - struct StringVec FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StringVecT NativeTableType; -+ typedef StringVecBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return StringVecTypeTable(); - } -@@ -2682,6 +2692,7 @@ struct StringVec FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct StringVecBuilder { -+ typedef StringVec Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_data(flatbuffers::Offset>> data) { -@@ -2691,7 +2702,6 @@ struct StringVecBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- StringVecBuilder &operator=(const StringVecBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2720,17 +2730,16 @@ flatbuffers::Offset CreateStringVec(flatbuffers::FlatBufferBuilder &_ - - struct WhileParamT : public flatbuffers::NativeTable { - typedef WhileParam TableType; -- std::string cond_graph; -- std::string body_graph; -- std::vector> aliases_inputs; -- std::vector aliases_outputs; -- std::vector> aliases_updates; -- WhileParamT() { -- } -+ std::string cond_graph{}; -+ std::string body_graph{}; -+ std::vector> aliases_inputs{}; -+ std::vector aliases_outputs{}; -+ std::vector> aliases_updates{}; - }; - - struct WhileParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef WhileParamT NativeTableType; -+ typedef WhileParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return WhileParamTypeTable(); - } -@@ -2747,14 +2756,14 @@ struct WhileParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::String *body_graph() const { - return GetPointer(VT_BODY_GRAPH); - } -- const flatbuffers::Vector> *aliases_inputs() const { -- return GetPointer> *>(VT_ALIASES_INPUTS); -+ const flatbuffers::Vector> *aliases_inputs() const { -+ return GetPointer> *>(VT_ALIASES_INPUTS); - } - const flatbuffers::Vector> *aliases_outputs() const { - return GetPointer> *>(VT_ALIASES_OUTPUTS); - } -- const flatbuffers::Vector> *aliases_updates() const { -- return GetPointer> *>(VT_ALIASES_UPDATES); -+ const flatbuffers::Vector> *aliases_updates() const { -+ return GetPointer> *>(VT_ALIASES_UPDATES); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2779,6 +2788,7 @@ struct WhileParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct WhileParamBuilder { -+ typedef WhileParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_cond_graph(flatbuffers::Offset cond_graph) { -@@ -2787,20 +2797,19 @@ struct WhileParamBuilder { - void add_body_graph(flatbuffers::Offset body_graph) { - fbb_.AddOffset(WhileParam::VT_BODY_GRAPH, body_graph); - } -- void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { -+ void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { - fbb_.AddOffset(WhileParam::VT_ALIASES_INPUTS, aliases_inputs); - } - void add_aliases_outputs(flatbuffers::Offset>> aliases_outputs) { - fbb_.AddOffset(WhileParam::VT_ALIASES_OUTPUTS, aliases_outputs); - } -- void add_aliases_updates(flatbuffers::Offset>> aliases_updates) { -+ void add_aliases_updates(flatbuffers::Offset>> aliases_updates) { - fbb_.AddOffset(WhileParam::VT_ALIASES_UPDATES, aliases_updates); - } - explicit WhileParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- WhileParamBuilder &operator=(const WhileParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2812,9 +2821,9 @@ inline flatbuffers::Offset CreateWhileParam( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset cond_graph = 0, - flatbuffers::Offset body_graph = 0, -- flatbuffers::Offset>> aliases_inputs = 0, -+ flatbuffers::Offset>> aliases_inputs = 0, - flatbuffers::Offset>> aliases_outputs = 0, -- flatbuffers::Offset>> aliases_updates = 0) { -+ flatbuffers::Offset>> aliases_updates = 0) { - WhileParamBuilder builder_(_fbb); - builder_.add_aliases_updates(aliases_updates); - builder_.add_aliases_outputs(aliases_outputs); -@@ -2828,14 +2837,14 @@ inline flatbuffers::Offset CreateWhileParamDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *cond_graph = nullptr, - const char *body_graph = nullptr, -- const std::vector> *aliases_inputs = nullptr, -+ const std::vector> *aliases_inputs = nullptr, - const std::vector> *aliases_outputs = nullptr, -- const std::vector> *aliases_updates = nullptr) { -+ const std::vector> *aliases_updates = nullptr) { - auto cond_graph__ = cond_graph ? _fbb.CreateString(cond_graph) : 0; - auto body_graph__ = body_graph ? _fbb.CreateString(body_graph) : 0; -- auto aliases_inputs__ = aliases_inputs ? _fbb.CreateVector>(*aliases_inputs) : 0; -+ auto aliases_inputs__ = aliases_inputs ? _fbb.CreateVector>(*aliases_inputs) : 0; - auto aliases_outputs__ = aliases_outputs ? _fbb.CreateVector>(*aliases_outputs) : 0; -- auto aliases_updates__ = aliases_updates ? _fbb.CreateVector>(*aliases_updates) : 0; -+ auto aliases_updates__ = aliases_updates ? _fbb.CreateVector>(*aliases_updates) : 0; - return MNN::CreateWhileParam( - _fbb, - cond_graph__, -@@ -2849,16 +2858,15 @@ flatbuffers::Offset CreateWhileParam(flatbuffers::FlatBufferBuilder - - struct IfParamT : public flatbuffers::NativeTable { - typedef IfParam TableType; -- std::string then_graph; -- std::string else_graph; -- std::vector> aliases_inputs; -- std::vector> aliases_outputs; -- IfParamT() { -- } -+ std::string then_graph{}; -+ std::string else_graph{}; -+ std::vector> aliases_inputs{}; -+ std::vector> aliases_outputs{}; - }; - - struct IfParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef IfParamT NativeTableType; -+ typedef IfParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return IfParamTypeTable(); - } -@@ -2874,11 +2882,11 @@ struct IfParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::String *else_graph() const { - return GetPointer(VT_ELSE_GRAPH); - } -- const flatbuffers::Vector> *aliases_inputs() const { -- return GetPointer> *>(VT_ALIASES_INPUTS); -+ const flatbuffers::Vector> *aliases_inputs() const { -+ return GetPointer> *>(VT_ALIASES_INPUTS); - } -- const flatbuffers::Vector> *aliases_outputs() const { -- return GetPointer> *>(VT_ALIASES_OUTPUTS); -+ const flatbuffers::Vector> *aliases_outputs() const { -+ return GetPointer> *>(VT_ALIASES_OUTPUTS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2900,6 +2908,7 @@ struct IfParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct IfParamBuilder { -+ typedef IfParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_then_graph(flatbuffers::Offset then_graph) { -@@ -2908,17 +2917,16 @@ struct IfParamBuilder { - void add_else_graph(flatbuffers::Offset else_graph) { - fbb_.AddOffset(IfParam::VT_ELSE_GRAPH, else_graph); - } -- void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { -+ void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { - fbb_.AddOffset(IfParam::VT_ALIASES_INPUTS, aliases_inputs); - } -- void add_aliases_outputs(flatbuffers::Offset>> aliases_outputs) { -+ void add_aliases_outputs(flatbuffers::Offset>> aliases_outputs) { - fbb_.AddOffset(IfParam::VT_ALIASES_OUTPUTS, aliases_outputs); - } - explicit IfParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- IfParamBuilder &operator=(const IfParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2930,8 +2938,8 @@ inline flatbuffers::Offset CreateIfParam( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset then_graph = 0, - flatbuffers::Offset else_graph = 0, -- flatbuffers::Offset>> aliases_inputs = 0, -- flatbuffers::Offset>> aliases_outputs = 0) { -+ flatbuffers::Offset>> aliases_inputs = 0, -+ flatbuffers::Offset>> aliases_outputs = 0) { - IfParamBuilder builder_(_fbb); - builder_.add_aliases_outputs(aliases_outputs); - builder_.add_aliases_inputs(aliases_inputs); -@@ -2944,12 +2952,12 @@ inline flatbuffers::Offset CreateIfParamDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *then_graph = nullptr, - const char *else_graph = nullptr, -- const std::vector> *aliases_inputs = nullptr, -- const std::vector> *aliases_outputs = nullptr) { -+ const std::vector> *aliases_inputs = nullptr, -+ const std::vector> *aliases_outputs = nullptr) { - auto then_graph__ = then_graph ? _fbb.CreateString(then_graph) : 0; - auto else_graph__ = else_graph ? _fbb.CreateString(else_graph) : 0; -- auto aliases_inputs__ = aliases_inputs ? _fbb.CreateVector>(*aliases_inputs) : 0; -- auto aliases_outputs__ = aliases_outputs ? _fbb.CreateVector>(*aliases_outputs) : 0; -+ auto aliases_inputs__ = aliases_inputs ? _fbb.CreateVector>(*aliases_inputs) : 0; -+ auto aliases_outputs__ = aliases_outputs ? _fbb.CreateVector>(*aliases_outputs) : 0; - return MNN::CreateIfParam( - _fbb, - then_graph__, -@@ -2962,20 +2970,17 @@ flatbuffers::Offset CreateIfParam(flatbuffers::FlatBufferBuilder &_fbb, - - struct OpT : public flatbuffers::NativeTable { - typedef Op TableType; -- std::vector inputIndexes; -- OpParameterUnion main; -- std::string name; -- std::vector outputIndexes; -- OpType type; -- MNN_DATA_FORMAT defaultDimentionFormat; -- OpT() -- : type(OpType_AbsVal), -- defaultDimentionFormat(MNN_DATA_FORMAT_NHWC) { -- } -+ std::vector inputIndexes{}; -+ MNN::OpParameterUnion main{}; -+ std::string name{}; -+ std::vector outputIndexes{}; -+ MNN::OpType type = MNN::OpType_AbsVal; -+ MNN::MNN_DATA_FORMAT defaultDimentionFormat = MNN::MNN_DATA_FORMAT_NHWC; - }; - - struct Op FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OpT NativeTableType; -+ typedef OpBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return OpTypeTable(); - } -@@ -2991,276 +2996,276 @@ struct Op FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *inputIndexes() const { - return GetPointer *>(VT_INPUTINDEXES); - } -- OpParameter main_type() const { -- return static_cast(GetField(VT_MAIN_TYPE, 0)); -+ MNN::OpParameter main_type() const { -+ return static_cast(GetField(VT_MAIN_TYPE, 0)); - } - const void *main() const { - return GetPointer(VT_MAIN); - } - template const T *main_as() const; -- const QuantizedAdd *main_as_QuantizedAdd() const { -- return main_type() == OpParameter_QuantizedAdd ? static_cast(main()) : nullptr; -+ const MNN::QuantizedAdd *main_as_QuantizedAdd() const { -+ return main_type() == MNN::OpParameter_QuantizedAdd ? static_cast(main()) : nullptr; - } -- const ArgMax *main_as_ArgMax() const { -- return main_type() == OpParameter_ArgMax ? static_cast(main()) : nullptr; -+ const MNN::ArgMax *main_as_ArgMax() const { -+ return main_type() == MNN::OpParameter_ArgMax ? static_cast(main()) : nullptr; - } -- const AsString *main_as_AsString() const { -- return main_type() == OpParameter_AsString ? static_cast(main()) : nullptr; -+ const MNN::AsString *main_as_AsString() const { -+ return main_type() == MNN::OpParameter_AsString ? static_cast(main()) : nullptr; - } -- const Axis *main_as_Axis() const { -- return main_type() == OpParameter_Axis ? static_cast(main()) : nullptr; -+ const MNN::Axis *main_as_Axis() const { -+ return main_type() == MNN::OpParameter_Axis ? static_cast(main()) : nullptr; - } -- const BatchNorm *main_as_BatchNorm() const { -- return main_type() == OpParameter_BatchNorm ? static_cast(main()) : nullptr; -+ const MNN::BatchNorm *main_as_BatchNorm() const { -+ return main_type() == MNN::OpParameter_BatchNorm ? static_cast(main()) : nullptr; - } -- const BinaryOp *main_as_BinaryOp() const { -- return main_type() == OpParameter_BinaryOp ? static_cast(main()) : nullptr; -+ const MNN::BinaryOp *main_as_BinaryOp() const { -+ return main_type() == MNN::OpParameter_BinaryOp ? static_cast(main()) : nullptr; - } -- const Blob *main_as_Blob() const { -- return main_type() == OpParameter_Blob ? static_cast(main()) : nullptr; -+ const MNN::Blob *main_as_Blob() const { -+ return main_type() == MNN::OpParameter_Blob ? static_cast(main()) : nullptr; - } -- const CastParam *main_as_CastParam() const { -- return main_type() == OpParameter_CastParam ? static_cast(main()) : nullptr; -+ const MNN::CastParam *main_as_CastParam() const { -+ return main_type() == MNN::OpParameter_CastParam ? static_cast(main()) : nullptr; - } -- const Convolution2D *main_as_Convolution2D() const { -- return main_type() == OpParameter_Convolution2D ? static_cast(main()) : nullptr; -+ const MNN::Convolution2D *main_as_Convolution2D() const { -+ return main_type() == MNN::OpParameter_Convolution2D ? static_cast(main()) : nullptr; - } -- const Crop *main_as_Crop() const { -- return main_type() == OpParameter_Crop ? static_cast(main()) : nullptr; -+ const MNN::Crop *main_as_Crop() const { -+ return main_type() == MNN::OpParameter_Crop ? static_cast(main()) : nullptr; - } -- const CropAndResize *main_as_CropAndResize() const { -- return main_type() == OpParameter_CropAndResize ? static_cast(main()) : nullptr; -+ const MNN::CropAndResize *main_as_CropAndResize() const { -+ return main_type() == MNN::OpParameter_CropAndResize ? static_cast(main()) : nullptr; - } -- const Dequantize *main_as_Dequantize() const { -- return main_type() == OpParameter_Dequantize ? static_cast(main()) : nullptr; -+ const MNN::Dequantize *main_as_Dequantize() const { -+ return main_type() == MNN::OpParameter_Dequantize ? static_cast(main()) : nullptr; - } -- const DetectionOutput *main_as_DetectionOutput() const { -- return main_type() == OpParameter_DetectionOutput ? static_cast(main()) : nullptr; -+ const MNN::DetectionOutput *main_as_DetectionOutput() const { -+ return main_type() == MNN::OpParameter_DetectionOutput ? static_cast(main()) : nullptr; - } -- const Eltwise *main_as_Eltwise() const { -- return main_type() == OpParameter_Eltwise ? static_cast(main()) : nullptr; -+ const MNN::Eltwise *main_as_Eltwise() const { -+ return main_type() == MNN::OpParameter_Eltwise ? static_cast(main()) : nullptr; - } -- const ExpandDims *main_as_ExpandDims() const { -- return main_type() == OpParameter_ExpandDims ? static_cast(main()) : nullptr; -+ const MNN::ExpandDims *main_as_ExpandDims() const { -+ return main_type() == MNN::OpParameter_ExpandDims ? static_cast(main()) : nullptr; - } -- const Fill *main_as_Fill() const { -- return main_type() == OpParameter_Fill ? static_cast(main()) : nullptr; -+ const MNN::Fill *main_as_Fill() const { -+ return main_type() == MNN::OpParameter_Fill ? static_cast(main()) : nullptr; - } -- const Flatten *main_as_Flatten() const { -- return main_type() == OpParameter_Flatten ? static_cast(main()) : nullptr; -+ const MNN::Flatten *main_as_Flatten() const { -+ return main_type() == MNN::OpParameter_Flatten ? static_cast(main()) : nullptr; - } -- const Gather *main_as_Gather() const { -- return main_type() == OpParameter_Gather ? static_cast(main()) : nullptr; -+ const MNN::Gather *main_as_Gather() const { -+ return main_type() == MNN::OpParameter_Gather ? static_cast(main()) : nullptr; - } -- const GatherV2 *main_as_GatherV2() const { -- return main_type() == OpParameter_GatherV2 ? static_cast(main()) : nullptr; -+ const MNN::GatherV2 *main_as_GatherV2() const { -+ return main_type() == MNN::OpParameter_GatherV2 ? static_cast(main()) : nullptr; - } -- const InnerProduct *main_as_InnerProduct() const { -- return main_type() == OpParameter_InnerProduct ? static_cast(main()) : nullptr; -+ const MNN::InnerProduct *main_as_InnerProduct() const { -+ return main_type() == MNN::OpParameter_InnerProduct ? static_cast(main()) : nullptr; - } -- const Input *main_as_Input() const { -- return main_type() == OpParameter_Input ? static_cast(main()) : nullptr; -+ const MNN::Input *main_as_Input() const { -+ return main_type() == MNN::OpParameter_Input ? static_cast(main()) : nullptr; - } -- const Interp *main_as_Interp() const { -- return main_type() == OpParameter_Interp ? static_cast(main()) : nullptr; -+ const MNN::Interp *main_as_Interp() const { -+ return main_type() == MNN::OpParameter_Interp ? static_cast(main()) : nullptr; - } -- const LRN *main_as_LRN() const { -- return main_type() == OpParameter_LRN ? static_cast(main()) : nullptr; -+ const MNN::LRN *main_as_LRN() const { -+ return main_type() == MNN::OpParameter_LRN ? static_cast(main()) : nullptr; - } -- const LSTM *main_as_LSTM() const { -- return main_type() == OpParameter_LSTM ? static_cast(main()) : nullptr; -+ const MNN::LSTM *main_as_LSTM() const { -+ return main_type() == MNN::OpParameter_LSTM ? static_cast(main()) : nullptr; - } -- const MatMul *main_as_MatMul() const { -- return main_type() == OpParameter_MatMul ? static_cast(main()) : nullptr; -+ const MNN::MatMul *main_as_MatMul() const { -+ return main_type() == MNN::OpParameter_MatMul ? static_cast(main()) : nullptr; - } -- const NonMaxSuppressionV2 *main_as_NonMaxSuppressionV2() const { -- return main_type() == OpParameter_NonMaxSuppressionV2 ? static_cast(main()) : nullptr; -+ const MNN::NonMaxSuppressionV2 *main_as_NonMaxSuppressionV2() const { -+ return main_type() == MNN::OpParameter_NonMaxSuppressionV2 ? static_cast(main()) : nullptr; - } -- const Normalize *main_as_Normalize() const { -- return main_type() == OpParameter_Normalize ? static_cast(main()) : nullptr; -+ const MNN::Normalize *main_as_Normalize() const { -+ return main_type() == MNN::OpParameter_Normalize ? static_cast(main()) : nullptr; - } -- const PackParam *main_as_PackParam() const { -- return main_type() == OpParameter_PackParam ? static_cast(main()) : nullptr; -+ const MNN::PackParam *main_as_PackParam() const { -+ return main_type() == MNN::OpParameter_PackParam ? static_cast(main()) : nullptr; - } -- const Permute *main_as_Permute() const { -- return main_type() == OpParameter_Permute ? static_cast(main()) : nullptr; -+ const MNN::Permute *main_as_Permute() const { -+ return main_type() == MNN::OpParameter_Permute ? static_cast(main()) : nullptr; - } -- const Plugin *main_as_Plugin() const { -- return main_type() == OpParameter_Plugin ? static_cast(main()) : nullptr; -+ const MNN::Plugin *main_as_Plugin() const { -+ return main_type() == MNN::OpParameter_Plugin ? static_cast(main()) : nullptr; - } -- const Pool *main_as_Pool() const { -- return main_type() == OpParameter_Pool ? static_cast(main()) : nullptr; -+ const MNN::Pool *main_as_Pool() const { -+ return main_type() == MNN::OpParameter_Pool ? static_cast(main()) : nullptr; - } -- const PRelu *main_as_PRelu() const { -- return main_type() == OpParameter_PRelu ? static_cast(main()) : nullptr; -+ const MNN::PRelu *main_as_PRelu() const { -+ return main_type() == MNN::OpParameter_PRelu ? static_cast(main()) : nullptr; - } -- const PriorBox *main_as_PriorBox() const { -- return main_type() == OpParameter_PriorBox ? static_cast(main()) : nullptr; -+ const MNN::PriorBox *main_as_PriorBox() const { -+ return main_type() == MNN::OpParameter_PriorBox ? static_cast(main()) : nullptr; - } -- const Proposal *main_as_Proposal() const { -- return main_type() == OpParameter_Proposal ? static_cast(main()) : nullptr; -+ const MNN::Proposal *main_as_Proposal() const { -+ return main_type() == MNN::OpParameter_Proposal ? static_cast(main()) : nullptr; - } -- const QuantizedAvgPool *main_as_QuantizedAvgPool() const { -- return main_type() == OpParameter_QuantizedAvgPool ? static_cast(main()) : nullptr; -+ const MNN::QuantizedAvgPool *main_as_QuantizedAvgPool() const { -+ return main_type() == MNN::OpParameter_QuantizedAvgPool ? static_cast(main()) : nullptr; - } -- const QuantizedBiasAdd *main_as_QuantizedBiasAdd() const { -- return main_type() == OpParameter_QuantizedBiasAdd ? static_cast(main()) : nullptr; -+ const MNN::QuantizedBiasAdd *main_as_QuantizedBiasAdd() const { -+ return main_type() == MNN::OpParameter_QuantizedBiasAdd ? static_cast(main()) : nullptr; - } -- const QuantizedConcat *main_as_QuantizedConcat() const { -- return main_type() == OpParameter_QuantizedConcat ? static_cast(main()) : nullptr; -+ const MNN::QuantizedConcat *main_as_QuantizedConcat() const { -+ return main_type() == MNN::OpParameter_QuantizedConcat ? static_cast(main()) : nullptr; - } -- const QuantizedLogistic *main_as_QuantizedLogistic() const { -- return main_type() == OpParameter_QuantizedLogistic ? static_cast(main()) : nullptr; -+ const MNN::QuantizedLogistic *main_as_QuantizedLogistic() const { -+ return main_type() == MNN::OpParameter_QuantizedLogistic ? static_cast(main()) : nullptr; - } -- const QuantizedMatMul *main_as_QuantizedMatMul() const { -- return main_type() == OpParameter_QuantizedMatMul ? static_cast(main()) : nullptr; -+ const MNN::QuantizedMatMul *main_as_QuantizedMatMul() const { -+ return main_type() == MNN::OpParameter_QuantizedMatMul ? static_cast(main()) : nullptr; - } -- const QuantizedMaxPool *main_as_QuantizedMaxPool() const { -- return main_type() == OpParameter_QuantizedMaxPool ? static_cast(main()) : nullptr; -+ const MNN::QuantizedMaxPool *main_as_QuantizedMaxPool() const { -+ return main_type() == MNN::OpParameter_QuantizedMaxPool ? static_cast(main()) : nullptr; - } -- const QuantizedRelu *main_as_QuantizedRelu() const { -- return main_type() == OpParameter_QuantizedRelu ? static_cast(main()) : nullptr; -+ const MNN::QuantizedRelu *main_as_QuantizedRelu() const { -+ return main_type() == MNN::OpParameter_QuantizedRelu ? static_cast(main()) : nullptr; - } -- const QuantizedRelu6 *main_as_QuantizedRelu6() const { -- return main_type() == OpParameter_QuantizedRelu6 ? static_cast(main()) : nullptr; -+ const MNN::QuantizedRelu6 *main_as_QuantizedRelu6() const { -+ return main_type() == MNN::OpParameter_QuantizedRelu6 ? static_cast(main()) : nullptr; - } -- const QuantizedReshape *main_as_QuantizedReshape() const { -- return main_type() == OpParameter_QuantizedReshape ? static_cast(main()) : nullptr; -+ const MNN::QuantizedReshape *main_as_QuantizedReshape() const { -+ return main_type() == MNN::OpParameter_QuantizedReshape ? static_cast(main()) : nullptr; - } -- const QuantizedSoftmax *main_as_QuantizedSoftmax() const { -- return main_type() == OpParameter_QuantizedSoftmax ? static_cast(main()) : nullptr; -+ const MNN::QuantizedSoftmax *main_as_QuantizedSoftmax() const { -+ return main_type() == MNN::OpParameter_QuantizedSoftmax ? static_cast(main()) : nullptr; - } -- const QuantizeMaxMin *main_as_QuantizeMaxMin() const { -- return main_type() == OpParameter_QuantizeMaxMin ? static_cast(main()) : nullptr; -+ const MNN::QuantizeMaxMin *main_as_QuantizeMaxMin() const { -+ return main_type() == MNN::OpParameter_QuantizeMaxMin ? static_cast(main()) : nullptr; - } -- const QuantizeV2 *main_as_QuantizeV2() const { -- return main_type() == OpParameter_QuantizeV2 ? static_cast(main()) : nullptr; -+ const MNN::QuantizeV2 *main_as_QuantizeV2() const { -+ return main_type() == MNN::OpParameter_QuantizeV2 ? static_cast(main()) : nullptr; - } -- const Range *main_as_Range() const { -- return main_type() == OpParameter_Range ? static_cast(main()) : nullptr; -+ const MNN::Range *main_as_Range() const { -+ return main_type() == MNN::OpParameter_Range ? static_cast(main()) : nullptr; - } -- const Rank *main_as_Rank() const { -- return main_type() == OpParameter_Rank ? static_cast(main()) : nullptr; -+ const MNN::Rank *main_as_Rank() const { -+ return main_type() == MNN::OpParameter_Rank ? static_cast(main()) : nullptr; - } -- const ReduceJoin *main_as_ReduceJoin() const { -- return main_type() == OpParameter_ReduceJoin ? static_cast(main()) : nullptr; -+ const MNN::ReduceJoin *main_as_ReduceJoin() const { -+ return main_type() == MNN::OpParameter_ReduceJoin ? static_cast(main()) : nullptr; - } -- const ReductionParam *main_as_ReductionParam() const { -- return main_type() == OpParameter_ReductionParam ? static_cast(main()) : nullptr; -+ const MNN::ReductionParam *main_as_ReductionParam() const { -+ return main_type() == MNN::OpParameter_ReductionParam ? static_cast(main()) : nullptr; - } -- const Relu *main_as_Relu() const { -- return main_type() == OpParameter_Relu ? static_cast(main()) : nullptr; -+ const MNN::Relu *main_as_Relu() const { -+ return main_type() == MNN::OpParameter_Relu ? static_cast(main()) : nullptr; - } -- const Relu6 *main_as_Relu6() const { -- return main_type() == OpParameter_Relu6 ? static_cast(main()) : nullptr; -+ const MNN::Relu6 *main_as_Relu6() const { -+ return main_type() == MNN::OpParameter_Relu6 ? static_cast(main()) : nullptr; - } -- const RequantizationRange *main_as_RequantizationRange() const { -- return main_type() == OpParameter_RequantizationRange ? static_cast(main()) : nullptr; -+ const MNN::RequantizationRange *main_as_RequantizationRange() const { -+ return main_type() == MNN::OpParameter_RequantizationRange ? static_cast(main()) : nullptr; - } -- const Requantize *main_as_Requantize() const { -- return main_type() == OpParameter_Requantize ? static_cast(main()) : nullptr; -+ const MNN::Requantize *main_as_Requantize() const { -+ return main_type() == MNN::OpParameter_Requantize ? static_cast(main()) : nullptr; - } -- const Reshape *main_as_Reshape() const { -- return main_type() == OpParameter_Reshape ? static_cast(main()) : nullptr; -+ const MNN::Reshape *main_as_Reshape() const { -+ return main_type() == MNN::OpParameter_Reshape ? static_cast(main()) : nullptr; - } -- const Resize *main_as_Resize() const { -- return main_type() == OpParameter_Resize ? static_cast(main()) : nullptr; -+ const MNN::Resize *main_as_Resize() const { -+ return main_type() == MNN::OpParameter_Resize ? static_cast(main()) : nullptr; - } -- const RoiPooling *main_as_RoiPooling() const { -- return main_type() == OpParameter_RoiPooling ? static_cast(main()) : nullptr; -+ const MNN::RoiPooling *main_as_RoiPooling() const { -+ return main_type() == MNN::OpParameter_RoiPooling ? static_cast(main()) : nullptr; - } -- const Scale *main_as_Scale() const { -- return main_type() == OpParameter_Scale ? static_cast(main()) : nullptr; -+ const MNN::Scale *main_as_Scale() const { -+ return main_type() == MNN::OpParameter_Scale ? static_cast(main()) : nullptr; - } -- const Selu *main_as_Selu() const { -- return main_type() == OpParameter_Selu ? static_cast(main()) : nullptr; -+ const MNN::Selu *main_as_Selu() const { -+ return main_type() == MNN::OpParameter_Selu ? static_cast(main()) : nullptr; - } -- const Size *main_as_Size() const { -- return main_type() == OpParameter_Size ? static_cast(main()) : nullptr; -+ const MNN::Size *main_as_Size() const { -+ return main_type() == MNN::OpParameter_Size ? static_cast(main()) : nullptr; - } -- const Slice *main_as_Slice() const { -- return main_type() == OpParameter_Slice ? static_cast(main()) : nullptr; -+ const MNN::Slice *main_as_Slice() const { -+ return main_type() == MNN::OpParameter_Slice ? static_cast(main()) : nullptr; - } -- const SliceTf *main_as_SliceTf() const { -- return main_type() == OpParameter_SliceTf ? static_cast(main()) : nullptr; -+ const MNN::SliceTf *main_as_SliceTf() const { -+ return main_type() == MNN::OpParameter_SliceTf ? static_cast(main()) : nullptr; - } -- const SpaceBatch *main_as_SpaceBatch() const { -- return main_type() == OpParameter_SpaceBatch ? static_cast(main()) : nullptr; -+ const MNN::SpaceBatch *main_as_SpaceBatch() const { -+ return main_type() == MNN::OpParameter_SpaceBatch ? static_cast(main()) : nullptr; - } -- const SqueezeParam *main_as_SqueezeParam() const { -- return main_type() == OpParameter_SqueezeParam ? static_cast(main()) : nullptr; -+ const MNN::SqueezeParam *main_as_SqueezeParam() const { -+ return main_type() == MNN::OpParameter_SqueezeParam ? static_cast(main()) : nullptr; - } -- const StridedSliceParam *main_as_StridedSliceParam() const { -- return main_type() == OpParameter_StridedSliceParam ? static_cast(main()) : nullptr; -+ const MNN::StridedSliceParam *main_as_StridedSliceParam() const { -+ return main_type() == MNN::OpParameter_StridedSliceParam ? static_cast(main()) : nullptr; - } -- const TensorConvertInfo *main_as_TensorConvertInfo() const { -- return main_type() == OpParameter_TensorConvertInfo ? static_cast(main()) : nullptr; -+ const MNN::TensorConvertInfo *main_as_TensorConvertInfo() const { -+ return main_type() == MNN::OpParameter_TensorConvertInfo ? static_cast(main()) : nullptr; - } -- const TfQuantizedConv2D *main_as_TfQuantizedConv2D() const { -- return main_type() == OpParameter_TfQuantizedConv2D ? static_cast(main()) : nullptr; -+ const MNN::TfQuantizedConv2D *main_as_TfQuantizedConv2D() const { -+ return main_type() == MNN::OpParameter_TfQuantizedConv2D ? static_cast(main()) : nullptr; - } -- const TopKV2 *main_as_TopKV2() const { -- return main_type() == OpParameter_TopKV2 ? static_cast(main()) : nullptr; -+ const MNN::TopKV2 *main_as_TopKV2() const { -+ return main_type() == MNN::OpParameter_TopKV2 ? static_cast(main()) : nullptr; - } -- const Transpose *main_as_Transpose() const { -- return main_type() == OpParameter_Transpose ? static_cast(main()) : nullptr; -+ const MNN::Transpose *main_as_Transpose() const { -+ return main_type() == MNN::OpParameter_Transpose ? static_cast(main()) : nullptr; - } -- const UnaryOp *main_as_UnaryOp() const { -- return main_type() == OpParameter_UnaryOp ? static_cast(main()) : nullptr; -+ const MNN::UnaryOp *main_as_UnaryOp() const { -+ return main_type() == MNN::OpParameter_UnaryOp ? static_cast(main()) : nullptr; - } -- const MomentsParam *main_as_MomentsParam() const { -- return main_type() == OpParameter_MomentsParam ? static_cast(main()) : nullptr; -+ const MNN::MomentsParam *main_as_MomentsParam() const { -+ return main_type() == MNN::OpParameter_MomentsParam ? static_cast(main()) : nullptr; - } -- const RNNParam *main_as_RNNParam() const { -- return main_type() == OpParameter_RNNParam ? static_cast(main()) : nullptr; -+ const MNN::RNNParam *main_as_RNNParam() const { -+ return main_type() == MNN::OpParameter_RNNParam ? static_cast(main()) : nullptr; - } -- const BatchMatMulParam *main_as_BatchMatMulParam() const { -- return main_type() == OpParameter_BatchMatMulParam ? static_cast(main()) : nullptr; -+ const MNN::BatchMatMulParam *main_as_BatchMatMulParam() const { -+ return main_type() == MNN::OpParameter_BatchMatMulParam ? static_cast(main()) : nullptr; - } -- const QuantizedFloatParam *main_as_QuantizedFloatParam() const { -- return main_type() == OpParameter_QuantizedFloatParam ? static_cast(main()) : nullptr; -+ const MNN::QuantizedFloatParam *main_as_QuantizedFloatParam() const { -+ return main_type() == MNN::OpParameter_QuantizedFloatParam ? static_cast(main()) : nullptr; - } -- const DepthSpaceParam *main_as_DepthSpaceParam() const { -- return main_type() == OpParameter_DepthSpaceParam ? static_cast(main()) : nullptr; -+ const MNN::DepthSpaceParam *main_as_DepthSpaceParam() const { -+ return main_type() == MNN::OpParameter_DepthSpaceParam ? static_cast(main()) : nullptr; - } -- const EltwiseInt8 *main_as_EltwiseInt8() const { -- return main_type() == OpParameter_EltwiseInt8 ? static_cast(main()) : nullptr; -+ const MNN::EltwiseInt8 *main_as_EltwiseInt8() const { -+ return main_type() == MNN::OpParameter_EltwiseInt8 ? static_cast(main()) : nullptr; - } -- const ReverseSequenceParam *main_as_ReverseSequenceParam() const { -- return main_type() == OpParameter_ReverseSequenceParam ? static_cast(main()) : nullptr; -+ const MNN::ReverseSequenceParam *main_as_ReverseSequenceParam() const { -+ return main_type() == MNN::OpParameter_ReverseSequenceParam ? static_cast(main()) : nullptr; - } -- const Extra *main_as_Extra() const { -- return main_type() == OpParameter_Extra ? static_cast(main()) : nullptr; -+ const MNN::Extra *main_as_Extra() const { -+ return main_type() == MNN::OpParameter_Extra ? static_cast(main()) : nullptr; - } -- const Pool3D *main_as_Pool3D() const { -- return main_type() == OpParameter_Pool3D ? static_cast(main()) : nullptr; -+ const MNN::Pool3D *main_as_Pool3D() const { -+ return main_type() == MNN::OpParameter_Pool3D ? static_cast(main()) : nullptr; - } -- const Convolution3D *main_as_Convolution3D() const { -- return main_type() == OpParameter_Convolution3D ? static_cast(main()) : nullptr; -+ const MNN::Convolution3D *main_as_Convolution3D() const { -+ return main_type() == MNN::OpParameter_Convolution3D ? static_cast(main()) : nullptr; - } -- const ELU *main_as_ELU() const { -- return main_type() == OpParameter_ELU ? static_cast(main()) : nullptr; -+ const MNN::ELU *main_as_ELU() const { -+ return main_type() == MNN::OpParameter_ELU ? static_cast(main()) : nullptr; - } -- const DetectionPostProcessParam *main_as_DetectionPostProcessParam() const { -- return main_type() == OpParameter_DetectionPostProcessParam ? static_cast(main()) : nullptr; -+ const MNN::DetectionPostProcessParam *main_as_DetectionPostProcessParam() const { -+ return main_type() == MNN::OpParameter_DetectionPostProcessParam ? static_cast(main()) : nullptr; - } -- const OneHotParam *main_as_OneHotParam() const { -- return main_type() == OpParameter_OneHotParam ? static_cast(main()) : nullptr; -+ const MNN::OneHotParam *main_as_OneHotParam() const { -+ return main_type() == MNN::OpParameter_OneHotParam ? static_cast(main()) : nullptr; - } -- const PadParam *main_as_PadParam() const { -- return main_type() == OpParameter_PadParam ? static_cast(main()) : nullptr; -+ const MNN::PadParam *main_as_PadParam() const { -+ return main_type() == MNN::OpParameter_PadParam ? static_cast(main()) : nullptr; - } -- const WhileParam *main_as_WhileParam() const { -- return main_type() == OpParameter_WhileParam ? static_cast(main()) : nullptr; -+ const MNN::WhileParam *main_as_WhileParam() const { -+ return main_type() == MNN::OpParameter_WhileParam ? static_cast(main()) : nullptr; - } -- const IfParam *main_as_IfParam() const { -- return main_type() == OpParameter_IfParam ? static_cast(main()) : nullptr; -+ const MNN::IfParam *main_as_IfParam() const { -+ return main_type() == MNN::OpParameter_IfParam ? static_cast(main()) : nullptr; - } -- const RandomUniform *main_as_RandomUniform() const { -- return main_type() == OpParameter_RandomUniform ? static_cast(main()) : nullptr; -+ const MNN::RandomUniform *main_as_RandomUniform() const { -+ return main_type() == MNN::OpParameter_RandomUniform ? static_cast(main()) : nullptr; - } -- const LayerNorm *main_as_LayerNorm() const { -- return main_type() == OpParameter_LayerNorm ? static_cast(main()) : nullptr; -+ const MNN::LayerNorm *main_as_LayerNorm() const { -+ return main_type() == MNN::OpParameter_LayerNorm ? static_cast(main()) : nullptr; - } - const flatbuffers::String *name() const { - return GetPointer(VT_NAME); -@@ -3268,11 +3273,11 @@ struct Op FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *outputIndexes() const { - return GetPointer *>(VT_OUTPUTINDEXES); - } -- OpType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::OpType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } -- MNN_DATA_FORMAT defaultDimentionFormat() const { -- return static_cast(GetField(VT_DEFAULTDIMENTIONFORMAT, 1)); -+ MNN::MNN_DATA_FORMAT defaultDimentionFormat() const { -+ return static_cast(GetField(VT_DEFAULTDIMENTIONFORMAT, 1)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -3294,365 +3299,366 @@ struct Op FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const OpT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); - }; - --template<> inline const QuantizedAdd *Op::main_as() const { -+template<> inline const MNN::QuantizedAdd *Op::main_as() const { - return main_as_QuantizedAdd(); - } - --template<> inline const ArgMax *Op::main_as() const { -+template<> inline const MNN::ArgMax *Op::main_as() const { - return main_as_ArgMax(); - } - --template<> inline const AsString *Op::main_as() const { -+template<> inline const MNN::AsString *Op::main_as() const { - return main_as_AsString(); - } - --template<> inline const Axis *Op::main_as() const { -+template<> inline const MNN::Axis *Op::main_as() const { - return main_as_Axis(); - } - --template<> inline const BatchNorm *Op::main_as() const { -+template<> inline const MNN::BatchNorm *Op::main_as() const { - return main_as_BatchNorm(); - } - --template<> inline const BinaryOp *Op::main_as() const { -+template<> inline const MNN::BinaryOp *Op::main_as() const { - return main_as_BinaryOp(); - } - --template<> inline const Blob *Op::main_as() const { -+template<> inline const MNN::Blob *Op::main_as() const { - return main_as_Blob(); - } - --template<> inline const CastParam *Op::main_as() const { -+template<> inline const MNN::CastParam *Op::main_as() const { - return main_as_CastParam(); - } - --template<> inline const Convolution2D *Op::main_as() const { -+template<> inline const MNN::Convolution2D *Op::main_as() const { - return main_as_Convolution2D(); - } - --template<> inline const Crop *Op::main_as() const { -+template<> inline const MNN::Crop *Op::main_as() const { - return main_as_Crop(); - } - --template<> inline const CropAndResize *Op::main_as() const { -+template<> inline const MNN::CropAndResize *Op::main_as() const { - return main_as_CropAndResize(); - } - --template<> inline const Dequantize *Op::main_as() const { -+template<> inline const MNN::Dequantize *Op::main_as() const { - return main_as_Dequantize(); - } - --template<> inline const DetectionOutput *Op::main_as() const { -+template<> inline const MNN::DetectionOutput *Op::main_as() const { - return main_as_DetectionOutput(); - } - --template<> inline const Eltwise *Op::main_as() const { -+template<> inline const MNN::Eltwise *Op::main_as() const { - return main_as_Eltwise(); - } - --template<> inline const ExpandDims *Op::main_as() const { -+template<> inline const MNN::ExpandDims *Op::main_as() const { - return main_as_ExpandDims(); - } - --template<> inline const Fill *Op::main_as() const { -+template<> inline const MNN::Fill *Op::main_as() const { - return main_as_Fill(); - } - --template<> inline const Flatten *Op::main_as() const { -+template<> inline const MNN::Flatten *Op::main_as() const { - return main_as_Flatten(); - } - --template<> inline const Gather *Op::main_as() const { -+template<> inline const MNN::Gather *Op::main_as() const { - return main_as_Gather(); - } - --template<> inline const GatherV2 *Op::main_as() const { -+template<> inline const MNN::GatherV2 *Op::main_as() const { - return main_as_GatherV2(); - } - --template<> inline const InnerProduct *Op::main_as() const { -+template<> inline const MNN::InnerProduct *Op::main_as() const { - return main_as_InnerProduct(); - } - --template<> inline const Input *Op::main_as() const { -+template<> inline const MNN::Input *Op::main_as() const { - return main_as_Input(); - } - --template<> inline const Interp *Op::main_as() const { -+template<> inline const MNN::Interp *Op::main_as() const { - return main_as_Interp(); - } - --template<> inline const LRN *Op::main_as() const { -+template<> inline const MNN::LRN *Op::main_as() const { - return main_as_LRN(); - } - --template<> inline const LSTM *Op::main_as() const { -+template<> inline const MNN::LSTM *Op::main_as() const { - return main_as_LSTM(); - } - --template<> inline const MatMul *Op::main_as() const { -+template<> inline const MNN::MatMul *Op::main_as() const { - return main_as_MatMul(); - } - --template<> inline const NonMaxSuppressionV2 *Op::main_as() const { -+template<> inline const MNN::NonMaxSuppressionV2 *Op::main_as() const { - return main_as_NonMaxSuppressionV2(); - } - --template<> inline const Normalize *Op::main_as() const { -+template<> inline const MNN::Normalize *Op::main_as() const { - return main_as_Normalize(); - } - --template<> inline const PackParam *Op::main_as() const { -+template<> inline const MNN::PackParam *Op::main_as() const { - return main_as_PackParam(); - } - --template<> inline const Permute *Op::main_as() const { -+template<> inline const MNN::Permute *Op::main_as() const { - return main_as_Permute(); - } - --template<> inline const Plugin *Op::main_as() const { -+template<> inline const MNN::Plugin *Op::main_as() const { - return main_as_Plugin(); - } - --template<> inline const Pool *Op::main_as() const { -+template<> inline const MNN::Pool *Op::main_as() const { - return main_as_Pool(); - } - --template<> inline const PRelu *Op::main_as() const { -+template<> inline const MNN::PRelu *Op::main_as() const { - return main_as_PRelu(); - } - --template<> inline const PriorBox *Op::main_as() const { -+template<> inline const MNN::PriorBox *Op::main_as() const { - return main_as_PriorBox(); - } - --template<> inline const Proposal *Op::main_as() const { -+template<> inline const MNN::Proposal *Op::main_as() const { - return main_as_Proposal(); - } - --template<> inline const QuantizedAvgPool *Op::main_as() const { -+template<> inline const MNN::QuantizedAvgPool *Op::main_as() const { - return main_as_QuantizedAvgPool(); - } - --template<> inline const QuantizedBiasAdd *Op::main_as() const { -+template<> inline const MNN::QuantizedBiasAdd *Op::main_as() const { - return main_as_QuantizedBiasAdd(); - } - --template<> inline const QuantizedConcat *Op::main_as() const { -+template<> inline const MNN::QuantizedConcat *Op::main_as() const { - return main_as_QuantizedConcat(); - } - --template<> inline const QuantizedLogistic *Op::main_as() const { -+template<> inline const MNN::QuantizedLogistic *Op::main_as() const { - return main_as_QuantizedLogistic(); - } - --template<> inline const QuantizedMatMul *Op::main_as() const { -+template<> inline const MNN::QuantizedMatMul *Op::main_as() const { - return main_as_QuantizedMatMul(); - } - --template<> inline const QuantizedMaxPool *Op::main_as() const { -+template<> inline const MNN::QuantizedMaxPool *Op::main_as() const { - return main_as_QuantizedMaxPool(); - } - --template<> inline const QuantizedRelu *Op::main_as() const { -+template<> inline const MNN::QuantizedRelu *Op::main_as() const { - return main_as_QuantizedRelu(); - } - --template<> inline const QuantizedRelu6 *Op::main_as() const { -+template<> inline const MNN::QuantizedRelu6 *Op::main_as() const { - return main_as_QuantizedRelu6(); - } - --template<> inline const QuantizedReshape *Op::main_as() const { -+template<> inline const MNN::QuantizedReshape *Op::main_as() const { - return main_as_QuantizedReshape(); - } - --template<> inline const QuantizedSoftmax *Op::main_as() const { -+template<> inline const MNN::QuantizedSoftmax *Op::main_as() const { - return main_as_QuantizedSoftmax(); - } - --template<> inline const QuantizeMaxMin *Op::main_as() const { -+template<> inline const MNN::QuantizeMaxMin *Op::main_as() const { - return main_as_QuantizeMaxMin(); - } - --template<> inline const QuantizeV2 *Op::main_as() const { -+template<> inline const MNN::QuantizeV2 *Op::main_as() const { - return main_as_QuantizeV2(); - } - --template<> inline const Range *Op::main_as() const { -+template<> inline const MNN::Range *Op::main_as() const { - return main_as_Range(); - } - --template<> inline const Rank *Op::main_as() const { -+template<> inline const MNN::Rank *Op::main_as() const { - return main_as_Rank(); - } - --template<> inline const ReduceJoin *Op::main_as() const { -+template<> inline const MNN::ReduceJoin *Op::main_as() const { - return main_as_ReduceJoin(); - } - --template<> inline const ReductionParam *Op::main_as() const { -+template<> inline const MNN::ReductionParam *Op::main_as() const { - return main_as_ReductionParam(); - } - --template<> inline const Relu *Op::main_as() const { -+template<> inline const MNN::Relu *Op::main_as() const { - return main_as_Relu(); - } - --template<> inline const Relu6 *Op::main_as() const { -+template<> inline const MNN::Relu6 *Op::main_as() const { - return main_as_Relu6(); - } - --template<> inline const RequantizationRange *Op::main_as() const { -+template<> inline const MNN::RequantizationRange *Op::main_as() const { - return main_as_RequantizationRange(); - } - --template<> inline const Requantize *Op::main_as() const { -+template<> inline const MNN::Requantize *Op::main_as() const { - return main_as_Requantize(); - } - --template<> inline const Reshape *Op::main_as() const { -+template<> inline const MNN::Reshape *Op::main_as() const { - return main_as_Reshape(); - } - --template<> inline const Resize *Op::main_as() const { -+template<> inline const MNN::Resize *Op::main_as() const { - return main_as_Resize(); - } - --template<> inline const RoiPooling *Op::main_as() const { -+template<> inline const MNN::RoiPooling *Op::main_as() const { - return main_as_RoiPooling(); - } - --template<> inline const Scale *Op::main_as() const { -+template<> inline const MNN::Scale *Op::main_as() const { - return main_as_Scale(); - } - --template<> inline const Selu *Op::main_as() const { -+template<> inline const MNN::Selu *Op::main_as() const { - return main_as_Selu(); - } - --template<> inline const Size *Op::main_as() const { -+template<> inline const MNN::Size *Op::main_as() const { - return main_as_Size(); - } - --template<> inline const Slice *Op::main_as() const { -+template<> inline const MNN::Slice *Op::main_as() const { - return main_as_Slice(); - } - --template<> inline const SliceTf *Op::main_as() const { -+template<> inline const MNN::SliceTf *Op::main_as() const { - return main_as_SliceTf(); - } - --template<> inline const SpaceBatch *Op::main_as() const { -+template<> inline const MNN::SpaceBatch *Op::main_as() const { - return main_as_SpaceBatch(); - } - --template<> inline const SqueezeParam *Op::main_as() const { -+template<> inline const MNN::SqueezeParam *Op::main_as() const { - return main_as_SqueezeParam(); - } - --template<> inline const StridedSliceParam *Op::main_as() const { -+template<> inline const MNN::StridedSliceParam *Op::main_as() const { - return main_as_StridedSliceParam(); - } - --template<> inline const TensorConvertInfo *Op::main_as() const { -+template<> inline const MNN::TensorConvertInfo *Op::main_as() const { - return main_as_TensorConvertInfo(); - } - --template<> inline const TfQuantizedConv2D *Op::main_as() const { -+template<> inline const MNN::TfQuantizedConv2D *Op::main_as() const { - return main_as_TfQuantizedConv2D(); - } - --template<> inline const TopKV2 *Op::main_as() const { -+template<> inline const MNN::TopKV2 *Op::main_as() const { - return main_as_TopKV2(); - } - --template<> inline const Transpose *Op::main_as() const { -+template<> inline const MNN::Transpose *Op::main_as() const { - return main_as_Transpose(); - } - --template<> inline const UnaryOp *Op::main_as() const { -+template<> inline const MNN::UnaryOp *Op::main_as() const { - return main_as_UnaryOp(); - } - --template<> inline const MomentsParam *Op::main_as() const { -+template<> inline const MNN::MomentsParam *Op::main_as() const { - return main_as_MomentsParam(); - } - --template<> inline const RNNParam *Op::main_as() const { -+template<> inline const MNN::RNNParam *Op::main_as() const { - return main_as_RNNParam(); - } - --template<> inline const BatchMatMulParam *Op::main_as() const { -+template<> inline const MNN::BatchMatMulParam *Op::main_as() const { - return main_as_BatchMatMulParam(); - } - --template<> inline const QuantizedFloatParam *Op::main_as() const { -+template<> inline const MNN::QuantizedFloatParam *Op::main_as() const { - return main_as_QuantizedFloatParam(); - } - --template<> inline const DepthSpaceParam *Op::main_as() const { -+template<> inline const MNN::DepthSpaceParam *Op::main_as() const { - return main_as_DepthSpaceParam(); - } - --template<> inline const EltwiseInt8 *Op::main_as() const { -+template<> inline const MNN::EltwiseInt8 *Op::main_as() const { - return main_as_EltwiseInt8(); - } - --template<> inline const ReverseSequenceParam *Op::main_as() const { -+template<> inline const MNN::ReverseSequenceParam *Op::main_as() const { - return main_as_ReverseSequenceParam(); - } - --template<> inline const Extra *Op::main_as() const { -+template<> inline const MNN::Extra *Op::main_as() const { - return main_as_Extra(); - } - --template<> inline const Pool3D *Op::main_as() const { -+template<> inline const MNN::Pool3D *Op::main_as() const { - return main_as_Pool3D(); - } - --template<> inline const Convolution3D *Op::main_as() const { -+template<> inline const MNN::Convolution3D *Op::main_as() const { - return main_as_Convolution3D(); - } - --template<> inline const ELU *Op::main_as() const { -+template<> inline const MNN::ELU *Op::main_as() const { - return main_as_ELU(); - } - --template<> inline const DetectionPostProcessParam *Op::main_as() const { -+template<> inline const MNN::DetectionPostProcessParam *Op::main_as() const { - return main_as_DetectionPostProcessParam(); - } - --template<> inline const OneHotParam *Op::main_as() const { -+template<> inline const MNN::OneHotParam *Op::main_as() const { - return main_as_OneHotParam(); - } - --template<> inline const PadParam *Op::main_as() const { -+template<> inline const MNN::PadParam *Op::main_as() const { - return main_as_PadParam(); - } - --template<> inline const WhileParam *Op::main_as() const { -+template<> inline const MNN::WhileParam *Op::main_as() const { - return main_as_WhileParam(); - } - --template<> inline const IfParam *Op::main_as() const { -+template<> inline const MNN::IfParam *Op::main_as() const { - return main_as_IfParam(); - } - --template<> inline const RandomUniform *Op::main_as() const { -+template<> inline const MNN::RandomUniform *Op::main_as() const { - return main_as_RandomUniform(); - } - --template<> inline const LayerNorm *Op::main_as() const { -+template<> inline const MNN::LayerNorm *Op::main_as() const { - return main_as_LayerNorm(); - } - - struct OpBuilder { -+ typedef Op Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_inputIndexes(flatbuffers::Offset> inputIndexes) { - fbb_.AddOffset(Op::VT_INPUTINDEXES, inputIndexes); - } -- void add_main_type(OpParameter main_type) { -+ void add_main_type(MNN::OpParameter main_type) { - fbb_.AddElement(Op::VT_MAIN_TYPE, static_cast(main_type), 0); - } - void add_main(flatbuffers::Offset main) { -@@ -3664,17 +3670,16 @@ struct OpBuilder { - void add_outputIndexes(flatbuffers::Offset> outputIndexes) { - fbb_.AddOffset(Op::VT_OUTPUTINDEXES, outputIndexes); - } -- void add_type(OpType type) { -+ void add_type(MNN::OpType type) { - fbb_.AddElement(Op::VT_TYPE, static_cast(type), 0); - } -- void add_defaultDimentionFormat(MNN_DATA_FORMAT defaultDimentionFormat) { -+ void add_defaultDimentionFormat(MNN::MNN_DATA_FORMAT defaultDimentionFormat) { - fbb_.AddElement(Op::VT_DEFAULTDIMENTIONFORMAT, static_cast(defaultDimentionFormat), 1); - } - explicit OpBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- OpBuilder &operator=(const OpBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3685,12 +3690,12 @@ struct OpBuilder { - inline flatbuffers::Offset CreateOp( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> inputIndexes = 0, -- OpParameter main_type = OpParameter_NONE, -+ MNN::OpParameter main_type = MNN::OpParameter_NONE, - flatbuffers::Offset main = 0, - flatbuffers::Offset name = 0, - flatbuffers::Offset> outputIndexes = 0, -- OpType type = OpType_AbsVal, -- MNN_DATA_FORMAT defaultDimentionFormat = MNN_DATA_FORMAT_NHWC) { -+ MNN::OpType type = MNN::OpType_AbsVal, -+ MNN::MNN_DATA_FORMAT defaultDimentionFormat = MNN::MNN_DATA_FORMAT_NHWC) { - OpBuilder builder_(_fbb); - builder_.add_type(type); - builder_.add_outputIndexes(outputIndexes); -@@ -3705,12 +3710,12 @@ inline flatbuffers::Offset CreateOp( - inline flatbuffers::Offset CreateOpDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *inputIndexes = nullptr, -- OpParameter main_type = OpParameter_NONE, -+ MNN::OpParameter main_type = MNN::OpParameter_NONE, - flatbuffers::Offset main = 0, - const char *name = nullptr, - const std::vector *outputIndexes = nullptr, -- OpType type = OpType_AbsVal, -- MNN_DATA_FORMAT defaultDimentionFormat = MNN_DATA_FORMAT_NHWC) { -+ MNN::OpType type = MNN::OpType_AbsVal, -+ MNN::MNN_DATA_FORMAT defaultDimentionFormat = MNN::MNN_DATA_FORMAT_NHWC) { - auto inputIndexes__ = inputIndexes ? _fbb.CreateVector(*inputIndexes) : 0; - auto name__ = name ? _fbb.CreateString(name) : 0; - auto outputIndexes__ = outputIndexes ? _fbb.CreateVector(*outputIndexes) : 0; -@@ -3729,15 +3734,13 @@ flatbuffers::Offset CreateOp(flatbuffers::FlatBufferBuilder &_fbb, const OpT - - struct ViewT : public flatbuffers::NativeTable { - typedef View TableType; -- int32_t offset; -- std::vector stride; -- ViewT() -- : offset(0) { -- } -+ int32_t offset = 0; -+ std::vector stride{}; - }; - - struct View FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ViewT NativeTableType; -+ typedef ViewBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ViewTypeTable(); - } -@@ -3764,6 +3767,7 @@ struct View FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ViewBuilder { -+ typedef View Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_offset(int32_t offset) { -@@ -3776,7 +3780,6 @@ struct ViewBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ViewBuilder &operator=(const ViewBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3809,17 +3812,15 @@ flatbuffers::Offset CreateView(flatbuffers::FlatBufferBuilder &_fbb, const - - struct RegionT : public flatbuffers::NativeTable { - typedef Region TableType; -- std::unique_ptr src; -- std::unique_ptr dst; -- std::vector size; -- int32_t origin; -- RegionT() -- : origin(0) { -- } -+ std::unique_ptr src{}; -+ std::unique_ptr dst{}; -+ std::vector size{}; -+ int32_t origin = 0; - }; - - struct Region FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RegionT NativeTableType; -+ typedef RegionBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return RegionTypeTable(); - } -@@ -3829,11 +3830,11 @@ struct Region FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_SIZE = 8, - VT_ORIGIN = 10 - }; -- const View *src() const { -- return GetPointer(VT_SRC); -+ const MNN::View *src() const { -+ return GetPointer(VT_SRC); - } -- const View *dst() const { -- return GetPointer(VT_DST); -+ const MNN::View *dst() const { -+ return GetPointer(VT_DST); - } - const flatbuffers::Vector *size() const { - return GetPointer *>(VT_SIZE); -@@ -3858,12 +3859,13 @@ struct Region FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct RegionBuilder { -+ typedef Region Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_src(flatbuffers::Offset src) { -+ void add_src(flatbuffers::Offset src) { - fbb_.AddOffset(Region::VT_SRC, src); - } -- void add_dst(flatbuffers::Offset dst) { -+ void add_dst(flatbuffers::Offset dst) { - fbb_.AddOffset(Region::VT_DST, dst); - } - void add_size(flatbuffers::Offset> size) { -@@ -3876,7 +3878,6 @@ struct RegionBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- RegionBuilder &operator=(const RegionBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3886,8 +3887,8 @@ struct RegionBuilder { - - inline flatbuffers::Offset CreateRegion( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset src = 0, -- flatbuffers::Offset dst = 0, -+ flatbuffers::Offset src = 0, -+ flatbuffers::Offset dst = 0, - flatbuffers::Offset> size = 0, - int32_t origin = 0) { - RegionBuilder builder_(_fbb); -@@ -3900,8 +3901,8 @@ inline flatbuffers::Offset CreateRegion( - - inline flatbuffers::Offset CreateRegionDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset src = 0, -- flatbuffers::Offset dst = 0, -+ flatbuffers::Offset src = 0, -+ flatbuffers::Offset dst = 0, - const std::vector *size = nullptr, - int32_t origin = 0) { - auto size__ = size ? _fbb.CreateVector(*size) : 0; -@@ -3917,17 +3918,15 @@ flatbuffers::Offset CreateRegion(flatbuffers::FlatBufferBuilder &_fbb, c - - struct TensorDescribeT : public flatbuffers::NativeTable { - typedef TensorDescribe TableType; -- std::unique_ptr blob; -- int32_t index; -- std::string name; -- std::vector> regions; -- TensorDescribeT() -- : index(0) { -- } -+ std::unique_ptr blob{}; -+ int32_t index = 0; -+ std::string name{}; -+ std::vector> regions{}; - }; - - struct TensorDescribe FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TensorDescribeT NativeTableType; -+ typedef TensorDescribeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return TensorDescribeTypeTable(); - } -@@ -3937,8 +3936,8 @@ struct TensorDescribe FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_NAME = 8, - VT_REGIONS = 10 - }; -- const Blob *blob() const { -- return GetPointer(VT_BLOB); -+ const MNN::Blob *blob() const { -+ return GetPointer(VT_BLOB); - } - int32_t index() const { - return GetField(VT_INDEX, 0); -@@ -3946,8 +3945,8 @@ struct TensorDescribe FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::String *name() const { - return GetPointer(VT_NAME); - } -- const flatbuffers::Vector> *regions() const { -- return GetPointer> *>(VT_REGIONS); -+ const flatbuffers::Vector> *regions() const { -+ return GetPointer> *>(VT_REGIONS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -3967,9 +3966,10 @@ struct TensorDescribe FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct TensorDescribeBuilder { -+ typedef TensorDescribe Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_blob(flatbuffers::Offset blob) { -+ void add_blob(flatbuffers::Offset blob) { - fbb_.AddOffset(TensorDescribe::VT_BLOB, blob); - } - void add_index(int32_t index) { -@@ -3978,14 +3978,13 @@ struct TensorDescribeBuilder { - void add_name(flatbuffers::Offset name) { - fbb_.AddOffset(TensorDescribe::VT_NAME, name); - } -- void add_regions(flatbuffers::Offset>> regions) { -+ void add_regions(flatbuffers::Offset>> regions) { - fbb_.AddOffset(TensorDescribe::VT_REGIONS, regions); - } - explicit TensorDescribeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- TensorDescribeBuilder &operator=(const TensorDescribeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3995,10 +3994,10 @@ struct TensorDescribeBuilder { - - inline flatbuffers::Offset CreateTensorDescribe( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset blob = 0, -+ flatbuffers::Offset blob = 0, - int32_t index = 0, - flatbuffers::Offset name = 0, -- flatbuffers::Offset>> regions = 0) { -+ flatbuffers::Offset>> regions = 0) { - TensorDescribeBuilder builder_(_fbb); - builder_.add_regions(regions); - builder_.add_name(name); -@@ -4009,12 +4008,12 @@ inline flatbuffers::Offset CreateTensorDescribe( - - inline flatbuffers::Offset CreateTensorDescribeDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset blob = 0, -+ flatbuffers::Offset blob = 0, - int32_t index = 0, - const char *name = nullptr, -- const std::vector> *regions = nullptr) { -+ const std::vector> *regions = nullptr) { - auto name__ = name ? _fbb.CreateString(name) : 0; -- auto regions__ = regions ? _fbb.CreateVector>(*regions) : 0; -+ auto regions__ = regions ? _fbb.CreateVector>(*regions) : 0; - return MNN::CreateTensorDescribe( - _fbb, - blob, -@@ -4027,17 +4026,16 @@ flatbuffers::Offset CreateTensorDescribe(flatbuffers::FlatBuffer - - struct SubGraphProtoT : public flatbuffers::NativeTable { - typedef SubGraphProto TableType; -- std::string name; -- std::vector inputs; -- std::vector outputs; -- std::vector tensors; -- std::vector> nodes; -- SubGraphProtoT() { -- } -+ std::string name{}; -+ std::vector inputs{}; -+ std::vector outputs{}; -+ std::vector tensors{}; -+ std::vector> nodes{}; - }; - - struct SubGraphProto FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SubGraphProtoT NativeTableType; -+ typedef SubGraphProtoBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return SubGraphProtoTypeTable(); - } -@@ -4060,8 +4058,8 @@ struct SubGraphProto FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector> *tensors() const { - return GetPointer> *>(VT_TENSORS); - } -- const flatbuffers::Vector> *nodes() const { -- return GetPointer> *>(VT_NODES); -+ const flatbuffers::Vector> *nodes() const { -+ return GetPointer> *>(VT_NODES); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -4085,6 +4083,7 @@ struct SubGraphProto FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct SubGraphProtoBuilder { -+ typedef SubGraphProto Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) { -@@ -4099,14 +4098,13 @@ struct SubGraphProtoBuilder { - void add_tensors(flatbuffers::Offset>> tensors) { - fbb_.AddOffset(SubGraphProto::VT_TENSORS, tensors); - } -- void add_nodes(flatbuffers::Offset>> nodes) { -+ void add_nodes(flatbuffers::Offset>> nodes) { - fbb_.AddOffset(SubGraphProto::VT_NODES, nodes); - } - explicit SubGraphProtoBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- SubGraphProtoBuilder &operator=(const SubGraphProtoBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -4120,7 +4118,7 @@ inline flatbuffers::Offset CreateSubGraphProto( - flatbuffers::Offset> inputs = 0, - flatbuffers::Offset> outputs = 0, - flatbuffers::Offset>> tensors = 0, -- flatbuffers::Offset>> nodes = 0) { -+ flatbuffers::Offset>> nodes = 0) { - SubGraphProtoBuilder builder_(_fbb); - builder_.add_nodes(nodes); - builder_.add_tensors(tensors); -@@ -4136,12 +4134,12 @@ inline flatbuffers::Offset CreateSubGraphProtoDirect( - const std::vector *inputs = nullptr, - const std::vector *outputs = nullptr, - const std::vector> *tensors = nullptr, -- const std::vector> *nodes = nullptr) { -+ const std::vector> *nodes = nullptr) { - auto name__ = name ? _fbb.CreateString(name) : 0; - auto inputs__ = inputs ? _fbb.CreateVector(*inputs) : 0; - auto outputs__ = outputs ? _fbb.CreateVector(*outputs) : 0; - auto tensors__ = tensors ? _fbb.CreateVector>(*tensors) : 0; -- auto nodes__ = nodes ? _fbb.CreateVector>(*nodes) : 0; -+ auto nodes__ = nodes ? _fbb.CreateVector>(*nodes) : 0; - return MNN::CreateSubGraphProto( - _fbb, - name__, -@@ -4155,27 +4153,22 @@ flatbuffers::Offset CreateSubGraphProto(flatbuffers::FlatBufferBu - - struct NetT : public flatbuffers::NativeTable { - typedef Net TableType; -- std::string bizCode; -- std::vector> extraTensorDescribe; -- std::unique_ptr gpulibrary; -- std::vector> oplists; -- std::vector outputName; -- ForwardType preferForwardType; -- NetSource sourceType; -- std::vector tensorName; -- int32_t tensorNumber; -- Usage usage; -- std::vector> subgraphs; -- NetT() -- : preferForwardType(ForwardType_CPU), -- sourceType(NetSource_CAFFE), -- tensorNumber(0), -- usage(Usage_INFERENCE) { -- } -+ std::string bizCode{}; -+ std::vector> extraTensorDescribe{}; -+ std::unique_ptr gpulibrary{}; -+ std::vector> oplists{}; -+ std::vector outputName{}; -+ MNN::ForwardType preferForwardType = MNN::ForwardType_CPU; -+ MNN::NetSource sourceType = MNN::NetSource_CAFFE; -+ std::vector tensorName{}; -+ int32_t tensorNumber = 0; -+ MNN::Usage usage = MNN::Usage_INFERENCE; -+ std::vector> subgraphs{}; - }; - - struct Net FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef NetT NativeTableType; -+ typedef NetBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return NetTypeTable(); - } -@@ -4195,23 +4188,23 @@ struct Net FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::String *bizCode() const { - return GetPointer(VT_BIZCODE); - } -- const flatbuffers::Vector> *extraTensorDescribe() const { -- return GetPointer> *>(VT_EXTRATENSORDESCRIBE); -+ const flatbuffers::Vector> *extraTensorDescribe() const { -+ return GetPointer> *>(VT_EXTRATENSORDESCRIBE); - } -- const GpuLibrary *gpulibrary() const { -- return GetPointer(VT_GPULIBRARY); -+ const MNN::GpuLibrary *gpulibrary() const { -+ return GetPointer(VT_GPULIBRARY); - } -- const flatbuffers::Vector> *oplists() const { -- return GetPointer> *>(VT_OPLISTS); -+ const flatbuffers::Vector> *oplists() const { -+ return GetPointer> *>(VT_OPLISTS); - } - const flatbuffers::Vector> *outputName() const { - return GetPointer> *>(VT_OUTPUTNAME); - } -- ForwardType preferForwardType() const { -- return static_cast(GetField(VT_PREFERFORWARDTYPE, 0)); -+ MNN::ForwardType preferForwardType() const { -+ return static_cast(GetField(VT_PREFERFORWARDTYPE, 0)); - } -- NetSource sourceType() const { -- return static_cast(GetField(VT_SOURCETYPE, 0)); -+ MNN::NetSource sourceType() const { -+ return static_cast(GetField(VT_SOURCETYPE, 0)); - } - const flatbuffers::Vector> *tensorName() const { - return GetPointer> *>(VT_TENSORNAME); -@@ -4219,11 +4212,11 @@ struct Net FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t tensorNumber() const { - return GetField(VT_TENSORNUMBER, 0); - } -- Usage usage() const { -- return static_cast(GetField(VT_USAGE, 0)); -+ MNN::Usage usage() const { -+ return static_cast(GetField(VT_USAGE, 0)); - } -- const flatbuffers::Vector> *subgraphs() const { -- return GetPointer> *>(VT_SUBGRAPHS); -+ const flatbuffers::Vector> *subgraphs() const { -+ return GetPointer> *>(VT_SUBGRAPHS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -4258,27 +4251,28 @@ struct Net FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct NetBuilder { -+ typedef Net Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_bizCode(flatbuffers::Offset bizCode) { - fbb_.AddOffset(Net::VT_BIZCODE, bizCode); - } -- void add_extraTensorDescribe(flatbuffers::Offset>> extraTensorDescribe) { -+ void add_extraTensorDescribe(flatbuffers::Offset>> extraTensorDescribe) { - fbb_.AddOffset(Net::VT_EXTRATENSORDESCRIBE, extraTensorDescribe); - } -- void add_gpulibrary(flatbuffers::Offset gpulibrary) { -+ void add_gpulibrary(flatbuffers::Offset gpulibrary) { - fbb_.AddOffset(Net::VT_GPULIBRARY, gpulibrary); - } -- void add_oplists(flatbuffers::Offset>> oplists) { -+ void add_oplists(flatbuffers::Offset>> oplists) { - fbb_.AddOffset(Net::VT_OPLISTS, oplists); - } - void add_outputName(flatbuffers::Offset>> outputName) { - fbb_.AddOffset(Net::VT_OUTPUTNAME, outputName); - } -- void add_preferForwardType(ForwardType preferForwardType) { -+ void add_preferForwardType(MNN::ForwardType preferForwardType) { - fbb_.AddElement(Net::VT_PREFERFORWARDTYPE, static_cast(preferForwardType), 0); - } -- void add_sourceType(NetSource sourceType) { -+ void add_sourceType(MNN::NetSource sourceType) { - fbb_.AddElement(Net::VT_SOURCETYPE, static_cast(sourceType), 0); - } - void add_tensorName(flatbuffers::Offset>> tensorName) { -@@ -4287,17 +4281,16 @@ struct NetBuilder { - void add_tensorNumber(int32_t tensorNumber) { - fbb_.AddElement(Net::VT_TENSORNUMBER, tensorNumber, 0); - } -- void add_usage(Usage usage) { -+ void add_usage(MNN::Usage usage) { - fbb_.AddElement(Net::VT_USAGE, static_cast(usage), 0); - } -- void add_subgraphs(flatbuffers::Offset>> subgraphs) { -+ void add_subgraphs(flatbuffers::Offset>> subgraphs) { - fbb_.AddOffset(Net::VT_SUBGRAPHS, subgraphs); - } - explicit NetBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- NetBuilder &operator=(const NetBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -4308,16 +4301,16 @@ struct NetBuilder { - inline flatbuffers::Offset CreateNet( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset bizCode = 0, -- flatbuffers::Offset>> extraTensorDescribe = 0, -- flatbuffers::Offset gpulibrary = 0, -- flatbuffers::Offset>> oplists = 0, -+ flatbuffers::Offset>> extraTensorDescribe = 0, -+ flatbuffers::Offset gpulibrary = 0, -+ flatbuffers::Offset>> oplists = 0, - flatbuffers::Offset>> outputName = 0, -- ForwardType preferForwardType = ForwardType_CPU, -- NetSource sourceType = NetSource_CAFFE, -+ MNN::ForwardType preferForwardType = MNN::ForwardType_CPU, -+ MNN::NetSource sourceType = MNN::NetSource_CAFFE, - flatbuffers::Offset>> tensorName = 0, - int32_t tensorNumber = 0, -- Usage usage = Usage_INFERENCE, -- flatbuffers::Offset>> subgraphs = 0) { -+ MNN::Usage usage = MNN::Usage_INFERENCE, -+ flatbuffers::Offset>> subgraphs = 0) { - NetBuilder builder_(_fbb); - builder_.add_subgraphs(subgraphs); - builder_.add_tensorNumber(tensorNumber); -@@ -4336,22 +4329,22 @@ inline flatbuffers::Offset CreateNet( - inline flatbuffers::Offset CreateNetDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *bizCode = nullptr, -- const std::vector> *extraTensorDescribe = nullptr, -- flatbuffers::Offset gpulibrary = 0, -- const std::vector> *oplists = nullptr, -+ const std::vector> *extraTensorDescribe = nullptr, -+ flatbuffers::Offset gpulibrary = 0, -+ const std::vector> *oplists = nullptr, - const std::vector> *outputName = nullptr, -- ForwardType preferForwardType = ForwardType_CPU, -- NetSource sourceType = NetSource_CAFFE, -+ MNN::ForwardType preferForwardType = MNN::ForwardType_CPU, -+ MNN::NetSource sourceType = MNN::NetSource_CAFFE, - const std::vector> *tensorName = nullptr, - int32_t tensorNumber = 0, -- Usage usage = Usage_INFERENCE, -- const std::vector> *subgraphs = nullptr) { -+ MNN::Usage usage = MNN::Usage_INFERENCE, -+ const std::vector> *subgraphs = nullptr) { - auto bizCode__ = bizCode ? _fbb.CreateString(bizCode) : 0; -- auto extraTensorDescribe__ = extraTensorDescribe ? _fbb.CreateVector>(*extraTensorDescribe) : 0; -- auto oplists__ = oplists ? _fbb.CreateVector>(*oplists) : 0; -+ auto extraTensorDescribe__ = extraTensorDescribe ? _fbb.CreateVector>(*extraTensorDescribe) : 0; -+ auto oplists__ = oplists ? _fbb.CreateVector>(*oplists) : 0; - auto outputName__ = outputName ? _fbb.CreateVector>(*outputName) : 0; - auto tensorName__ = tensorName ? _fbb.CreateVector>(*tensorName) : 0; -- auto subgraphs__ = subgraphs ? _fbb.CreateVector>(*subgraphs) : 0; -+ auto subgraphs__ = subgraphs ? _fbb.CreateVector>(*subgraphs) : 0; - return MNN::CreateNet( - _fbb, - bizCode__, -@@ -4370,16 +4363,16 @@ inline flatbuffers::Offset CreateNetDirect( - flatbuffers::Offset CreateNet(flatbuffers::FlatBufferBuilder &_fbb, const NetT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); - - inline PluginT *Plugin::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new PluginT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new PluginT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Plugin::UnPackTo(PluginT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = type(); if (_e) _o->type = _e->str(); }; -- { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -+ { auto _e = type(); if (_e) _o->type = _e->str(); } -+ { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } - } - - inline flatbuffers::Offset Plugin::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PluginT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4391,7 +4384,7 @@ inline flatbuffers::Offset CreatePlugin(flatbuffers::FlatBufferBuilder & - (void)_o; - struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const PluginT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; - auto _type = _o->type.empty() ? 0 : _fbb.CreateString(_o->type); -- auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; - return MNN::CreatePlugin( - _fbb, - _type, -@@ -4399,18 +4392,18 @@ inline flatbuffers::Offset CreatePlugin(flatbuffers::FlatBufferBuilder & - } - - inline ExtraT *Extra::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ExtraT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ExtraT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Extra::UnPackTo(ExtraT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = type(); if (_e) _o->type = _e->str(); }; -- { auto _e = engine(); if (_e) _o->engine = _e->str(); }; -- { auto _e = info(); if (_e) { _o->info.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->info[_i] = _e->Get(_i); } } }; -- { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -+ { auto _e = type(); if (_e) _o->type = _e->str(); } -+ { auto _e = engine(); if (_e) _o->engine = _e->str(); } -+ { auto _e = info(); if (_e) { _o->info.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->info.begin()); } } -+ { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } - } - - inline flatbuffers::Offset Extra::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExtraT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4424,7 +4417,7 @@ inline flatbuffers::Offset CreateExtra(flatbuffers::FlatBufferBuilder &_f - auto _type = _o->type.empty() ? 0 : _fbb.CreateString(_o->type); - auto _engine = _o->engine.empty() ? 0 : _fbb.CreateString(_o->engine); - auto _info = _o->info.size() ? _fbb.CreateVector(_o->info) : 0; -- auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; - return MNN::CreateExtra( - _fbb, - _type, -@@ -4434,15 +4427,15 @@ inline flatbuffers::Offset CreateExtra(flatbuffers::FlatBufferBuilder &_f - } - - inline StringVecT *StringVec::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new StringVecT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new StringVecT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void StringVec::UnPackTo(StringVecT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = data(); if (_e) { _o->data.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->data[_i] = _e->Get(_i)->str(); } } }; -+ { auto _e = data(); if (_e) { _o->data.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->data[_i] = _e->Get(_i)->str(); } } } - } - - inline flatbuffers::Offset StringVec::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StringVecT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4460,19 +4453,19 @@ inline flatbuffers::Offset CreateStringVec(flatbuffers::FlatBufferBui - } - - inline WhileParamT *WhileParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new WhileParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new WhileParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void WhileParam::UnPackTo(WhileParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = cond_graph(); if (_e) _o->cond_graph = _e->str(); }; -- { auto _e = body_graph(); if (_e) _o->body_graph = _e->str(); }; -- { auto _e = aliases_inputs(); if (_e) { _o->aliases_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -- { auto _e = aliases_outputs(); if (_e) { _o->aliases_outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_outputs[_i] = _e->Get(_i)->str(); } } }; -- { auto _e = aliases_updates(); if (_e) { _o->aliases_updates.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_updates[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -+ { auto _e = cond_graph(); if (_e) _o->cond_graph = _e->str(); } -+ { auto _e = body_graph(); if (_e) _o->body_graph = _e->str(); } -+ { auto _e = aliases_inputs(); if (_e) { _o->aliases_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } -+ { auto _e = aliases_outputs(); if (_e) { _o->aliases_outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_outputs[_i] = _e->Get(_i)->str(); } } } -+ { auto _e = aliases_updates(); if (_e) { _o->aliases_updates.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_updates[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } - } - - inline flatbuffers::Offset WhileParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhileParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4485,9 +4478,9 @@ inline flatbuffers::Offset CreateWhileParam(flatbuffers::FlatBufferB - struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WhileParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; - auto _cond_graph = _o->cond_graph.empty() ? 0 : _fbb.CreateString(_o->cond_graph); - auto _body_graph = _o->body_graph.empty() ? 0 : _fbb.CreateString(_o->body_graph); -- auto _aliases_inputs = _o->aliases_inputs.size() ? _fbb.CreateVector> (_o->aliases_inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_inputs[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _aliases_inputs = _o->aliases_inputs.size() ? _fbb.CreateVector> (_o->aliases_inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_inputs[i].get(), __va->__rehasher); }, &_va ) : 0; - auto _aliases_outputs = _o->aliases_outputs.size() ? _fbb.CreateVectorOfStrings(_o->aliases_outputs) : 0; -- auto _aliases_updates = _o->aliases_updates.size() ? _fbb.CreateVector> (_o->aliases_updates.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_updates[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _aliases_updates = _o->aliases_updates.size() ? _fbb.CreateVector> (_o->aliases_updates.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_updates[i].get(), __va->__rehasher); }, &_va ) : 0; - return MNN::CreateWhileParam( - _fbb, - _cond_graph, -@@ -4498,18 +4491,18 @@ inline flatbuffers::Offset CreateWhileParam(flatbuffers::FlatBufferB - } - - inline IfParamT *IfParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new IfParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new IfParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void IfParam::UnPackTo(IfParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = then_graph(); if (_e) _o->then_graph = _e->str(); }; -- { auto _e = else_graph(); if (_e) _o->else_graph = _e->str(); }; -- { auto _e = aliases_inputs(); if (_e) { _o->aliases_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -- { auto _e = aliases_outputs(); if (_e) { _o->aliases_outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_outputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -+ { auto _e = then_graph(); if (_e) _o->then_graph = _e->str(); } -+ { auto _e = else_graph(); if (_e) _o->else_graph = _e->str(); } -+ { auto _e = aliases_inputs(); if (_e) { _o->aliases_inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } -+ { auto _e = aliases_outputs(); if (_e) { _o->aliases_outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->aliases_outputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } - } - - inline flatbuffers::Offset IfParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const IfParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4522,8 +4515,8 @@ inline flatbuffers::Offset CreateIfParam(flatbuffers::FlatBufferBuilder - struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const IfParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; - auto _then_graph = _o->then_graph.empty() ? 0 : _fbb.CreateString(_o->then_graph); - auto _else_graph = _o->else_graph.empty() ? 0 : _fbb.CreateString(_o->else_graph); -- auto _aliases_inputs = _o->aliases_inputs.size() ? _fbb.CreateVector> (_o->aliases_inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_inputs[i].get(), __va->__rehasher); }, &_va ) : 0; -- auto _aliases_outputs = _o->aliases_outputs.size() ? _fbb.CreateVector> (_o->aliases_outputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_outputs[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _aliases_inputs = _o->aliases_inputs.size() ? _fbb.CreateVector> (_o->aliases_inputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_inputs[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _aliases_outputs = _o->aliases_outputs.size() ? _fbb.CreateVector> (_o->aliases_outputs.size(), [](size_t i, _VectorArgs *__va) { return CreateStringVec(*__va->__fbb, __va->__o->aliases_outputs[i].get(), __va->__rehasher); }, &_va ) : 0; - return MNN::CreateIfParam( - _fbb, - _then_graph, -@@ -4533,21 +4526,21 @@ inline flatbuffers::Offset CreateIfParam(flatbuffers::FlatBufferBuilder - } - - inline OpT *Op::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new OpT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new OpT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Op::UnPackTo(OpT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } }; -- { auto _e = main_type(); _o->main.type = _e; }; -- { auto _e = main(); if (_e) _o->main.value = OpParameterUnion::UnPack(_e, main_type(), _resolver); }; -- { auto _e = name(); if (_e) _o->name = _e->str(); }; -- { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } }; -- { auto _e = type(); _o->type = _e; }; -- { auto _e = defaultDimentionFormat(); _o->defaultDimentionFormat = _e; }; -+ { auto _e = inputIndexes(); if (_e) { _o->inputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputIndexes[_i] = _e->Get(_i); } } } -+ { auto _e = main_type(); _o->main.type = _e; } -+ { auto _e = main(); if (_e) _o->main.value = MNN::OpParameterUnion::UnPack(_e, main_type(), _resolver); } -+ { auto _e = name(); if (_e) _o->name = _e->str(); } -+ { auto _e = outputIndexes(); if (_e) { _o->outputIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputIndexes[_i] = _e->Get(_i); } } } -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = defaultDimentionFormat(); _o->defaultDimentionFormat = _e; } - } - - inline flatbuffers::Offset Op::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OpT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4577,16 +4570,16 @@ inline flatbuffers::Offset CreateOp(flatbuffers::FlatBufferBuilder &_fbb, co - } - - inline ViewT *View::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ViewT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ViewT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void View::UnPackTo(ViewT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = offset(); _o->offset = _e; }; -- { auto _e = stride(); if (_e) { _o->stride.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->stride[_i] = _e->Get(_i); } } }; -+ { auto _e = offset(); _o->offset = _e; } -+ { auto _e = stride(); if (_e) { _o->stride.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->stride[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset View::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ViewT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4606,18 +4599,18 @@ inline flatbuffers::Offset CreateView(flatbuffers::FlatBufferBuilder &_fbb - } - - inline RegionT *Region::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new RegionT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new RegionT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Region::UnPackTo(RegionT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = src(); if (_e) _o->src = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = dst(); if (_e) _o->dst = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = size(); if (_e) { _o->size.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->size[_i] = _e->Get(_i); } } }; -- { auto _e = origin(); _o->origin = _e; }; -+ { auto _e = src(); if (_e) _o->src = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = dst(); if (_e) _o->dst = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = size(); if (_e) { _o->size.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->size[_i] = _e->Get(_i); } } } -+ { auto _e = origin(); _o->origin = _e; } - } - - inline flatbuffers::Offset Region::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RegionT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4641,18 +4634,18 @@ inline flatbuffers::Offset CreateRegion(flatbuffers::FlatBufferBuilder & - } - - inline TensorDescribeT *TensorDescribe::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new TensorDescribeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new TensorDescribeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void TensorDescribe::UnPackTo(TensorDescribeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = blob(); if (_e) _o->blob = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = index(); _o->index = _e; }; -- { auto _e = name(); if (_e) _o->name = _e->str(); }; -- { auto _e = regions(); if (_e) { _o->regions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->regions[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -+ { auto _e = blob(); if (_e) _o->blob = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = index(); _o->index = _e; } -+ { auto _e = name(); if (_e) _o->name = _e->str(); } -+ { auto _e = regions(); if (_e) { _o->regions.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->regions[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } - } - - inline flatbuffers::Offset TensorDescribe::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorDescribeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4666,7 +4659,7 @@ inline flatbuffers::Offset CreateTensorDescribe(flatbuffers::Fla - auto _blob = _o->blob ? CreateBlob(_fbb, _o->blob.get(), _rehasher) : 0; - auto _index = _o->index; - auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); -- auto _regions = _o->regions.size() ? _fbb.CreateVector> (_o->regions.size(), [](size_t i, _VectorArgs *__va) { return CreateRegion(*__va->__fbb, __va->__o->regions[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _regions = _o->regions.size() ? _fbb.CreateVector> (_o->regions.size(), [](size_t i, _VectorArgs *__va) { return CreateRegion(*__va->__fbb, __va->__o->regions[i].get(), __va->__rehasher); }, &_va ) : 0; - return MNN::CreateTensorDescribe( - _fbb, - _blob, -@@ -4676,19 +4669,19 @@ inline flatbuffers::Offset CreateTensorDescribe(flatbuffers::Fla - } - - inline SubGraphProtoT *SubGraphProto::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new SubGraphProtoT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new SubGraphProtoT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void SubGraphProto::UnPackTo(SubGraphProtoT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = name(); if (_e) _o->name = _e->str(); }; -- { 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 = tensors(); if (_e) { _o->tensors.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensors[_i] = _e->Get(_i)->str(); } } }; -- { auto _e = nodes(); if (_e) { _o->nodes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->nodes[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -+ { auto _e = name(); if (_e) _o->name = _e->str(); } -+ { 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 = tensors(); if (_e) { _o->tensors.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensors[_i] = _e->Get(_i)->str(); } } } -+ { auto _e = nodes(); if (_e) { _o->nodes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->nodes[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } - } - - inline flatbuffers::Offset SubGraphProto::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphProtoT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4703,7 +4696,7 @@ inline flatbuffers::Offset CreateSubGraphProto(flatbuffers::FlatB - auto _inputs = _o->inputs.size() ? _fbb.CreateVector(_o->inputs) : 0; - auto _outputs = _o->outputs.size() ? _fbb.CreateVector(_o->outputs) : 0; - auto _tensors = _o->tensors.size() ? _fbb.CreateVectorOfStrings(_o->tensors) : 0; -- auto _nodes = _o->nodes.size() ? _fbb.CreateVector> (_o->nodes.size(), [](size_t i, _VectorArgs *__va) { return CreateOp(*__va->__fbb, __va->__o->nodes[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _nodes = _o->nodes.size() ? _fbb.CreateVector> (_o->nodes.size(), [](size_t i, _VectorArgs *__va) { return CreateOp(*__va->__fbb, __va->__o->nodes[i].get(), __va->__rehasher); }, &_va ) : 0; - return MNN::CreateSubGraphProto( - _fbb, - _name, -@@ -4714,25 +4707,25 @@ inline flatbuffers::Offset CreateSubGraphProto(flatbuffers::FlatB - } - - inline NetT *Net::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new NetT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new NetT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Net::UnPackTo(NetT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = bizCode(); if (_e) _o->bizCode = _e->str(); }; -- { auto _e = extraTensorDescribe(); if (_e) { _o->extraTensorDescribe.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->extraTensorDescribe[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -- { auto _e = gpulibrary(); if (_e) _o->gpulibrary = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = oplists(); if (_e) { _o->oplists.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->oplists[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -- { auto _e = outputName(); if (_e) { _o->outputName.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputName[_i] = _e->Get(_i)->str(); } } }; -- { auto _e = preferForwardType(); _o->preferForwardType = _e; }; -- { auto _e = sourceType(); _o->sourceType = _e; }; -- { auto _e = tensorName(); if (_e) { _o->tensorName.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensorName[_i] = _e->Get(_i)->str(); } } }; -- { auto _e = tensorNumber(); _o->tensorNumber = _e; }; -- { auto _e = usage(); _o->usage = _e; }; -- { 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 = bizCode(); if (_e) _o->bizCode = _e->str(); } -+ { auto _e = extraTensorDescribe(); if (_e) { _o->extraTensorDescribe.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->extraTensorDescribe[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } -+ { auto _e = gpulibrary(); if (_e) _o->gpulibrary = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = oplists(); if (_e) { _o->oplists.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->oplists[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } -+ { auto _e = outputName(); if (_e) { _o->outputName.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputName[_i] = _e->Get(_i)->str(); } } } -+ { auto _e = preferForwardType(); _o->preferForwardType = _e; } -+ { auto _e = sourceType(); _o->sourceType = _e; } -+ { auto _e = tensorName(); if (_e) { _o->tensorName.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensorName[_i] = _e->Get(_i)->str(); } } } -+ { auto _e = tensorNumber(); _o->tensorNumber = _e; } -+ { auto _e = usage(); _o->usage = _e; } -+ { 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)); } } } - } - - inline flatbuffers::Offset Net::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NetT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4744,16 +4737,16 @@ inline flatbuffers::Offset CreateNet(flatbuffers::FlatBufferBuilder &_fbb, - (void)_o; - struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NetT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; - auto _bizCode = _o->bizCode.empty() ? 0 : _fbb.CreateString(_o->bizCode); -- auto _extraTensorDescribe = _o->extraTensorDescribe.size() ? _fbb.CreateVector> (_o->extraTensorDescribe.size(), [](size_t i, _VectorArgs *__va) { return CreateTensorDescribe(*__va->__fbb, __va->__o->extraTensorDescribe[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _extraTensorDescribe = _o->extraTensorDescribe.size() ? _fbb.CreateVector> (_o->extraTensorDescribe.size(), [](size_t i, _VectorArgs *__va) { return CreateTensorDescribe(*__va->__fbb, __va->__o->extraTensorDescribe[i].get(), __va->__rehasher); }, &_va ) : 0; - auto _gpulibrary = _o->gpulibrary ? CreateGpuLibrary(_fbb, _o->gpulibrary.get(), _rehasher) : 0; -- auto _oplists = _o->oplists.size() ? _fbb.CreateVector> (_o->oplists.size(), [](size_t i, _VectorArgs *__va) { return CreateOp(*__va->__fbb, __va->__o->oplists[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _oplists = _o->oplists.size() ? _fbb.CreateVector> (_o->oplists.size(), [](size_t i, _VectorArgs *__va) { return CreateOp(*__va->__fbb, __va->__o->oplists[i].get(), __va->__rehasher); }, &_va ) : 0; - auto _outputName = _o->outputName.size() ? _fbb.CreateVectorOfStrings(_o->outputName) : 0; - auto _preferForwardType = _o->preferForwardType; - auto _sourceType = _o->sourceType; - auto _tensorName = _o->tensorName.size() ? _fbb.CreateVectorOfStrings(_o->tensorName) : 0; - auto _tensorNumber = _o->tensorNumber; - auto _usage = _o->usage; -- auto _subgraphs = _o->subgraphs.size() ? _fbb.CreateVector> (_o->subgraphs.size(), [](size_t i, _VectorArgs *__va) { return CreateSubGraphProto(*__va->__fbb, __va->__o->subgraphs[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _subgraphs = _o->subgraphs.size() ? _fbb.CreateVector> (_o->subgraphs.size(), [](size_t i, _VectorArgs *__va) { return CreateSubGraphProto(*__va->__fbb, __va->__o->subgraphs[i].get(), __va->__rehasher); }, &_va ) : 0; - return MNN::CreateNet( - _fbb, - _bizCode, -@@ -4775,358 +4768,358 @@ inline bool VerifyOpParameter(flatbuffers::Verifier &verifier, const void *obj, - return true; - } - case OpParameter_QuantizedAdd: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_ArgMax: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_AsString: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Axis: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_BatchNorm: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_BinaryOp: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Blob: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_CastParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Convolution2D: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Crop: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_CropAndResize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Dequantize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_DetectionOutput: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Eltwise: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_ExpandDims: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Fill: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Flatten: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Gather: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_GatherV2: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_InnerProduct: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Input: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Interp: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_LRN: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_LSTM: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_MatMul: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_NonMaxSuppressionV2: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Normalize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_PackParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Permute: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Plugin: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Pool: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_PRelu: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_PriorBox: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Proposal: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedAvgPool: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedBiasAdd: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedConcat: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedLogistic: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedMatMul: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedMaxPool: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedRelu: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedRelu6: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedReshape: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedSoftmax: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizeMaxMin: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizeV2: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Range: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Rank: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_ReduceJoin: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_ReductionParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Relu: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Relu6: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_RequantizationRange: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Requantize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Reshape: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Resize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_RoiPooling: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Scale: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Selu: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Size: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Slice: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_SliceTf: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_SpaceBatch: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_SqueezeParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_StridedSliceParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_TensorConvertInfo: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_TfQuantizedConv2D: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_TopKV2: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Transpose: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_UnaryOp: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_MomentsParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_RNNParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_BatchMatMulParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_QuantizedFloatParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_DepthSpaceParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_EltwiseInt8: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_ReverseSequenceParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Extra: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Pool3D: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_Convolution3D: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_ELU: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_DetectionPostProcessParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_OneHotParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_PadParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_WhileParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_IfParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_RandomUniform: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case OpParameter_LayerNorm: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } -- default: return false; -+ default: return true; - } - } - -@@ -5145,355 +5138,355 @@ inline bool VerifyOpParameterVector(flatbuffers::Verifier &verifier, const flatb - inline void *OpParameterUnion::UnPack(const void *obj, OpParameter type, const flatbuffers::resolver_function_t *resolver) { - switch (type) { - case OpParameter_QuantizedAdd: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_ArgMax: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_AsString: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Axis: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_BatchNorm: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_BinaryOp: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Blob: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_CastParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Convolution2D: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Crop: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_CropAndResize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Dequantize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_DetectionOutput: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Eltwise: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_ExpandDims: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Fill: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Flatten: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Gather: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_GatherV2: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_InnerProduct: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Input: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Interp: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_LRN: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_LSTM: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_MatMul: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_NonMaxSuppressionV2: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Normalize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_PackParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Permute: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Plugin: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Pool: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_PRelu: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_PriorBox: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Proposal: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedAvgPool: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedBiasAdd: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedConcat: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedLogistic: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedMatMul: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedMaxPool: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedRelu: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedRelu6: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedReshape: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedSoftmax: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizeMaxMin: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizeV2: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Range: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Rank: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_ReduceJoin: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_ReductionParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Relu: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Relu6: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_RequantizationRange: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Requantize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Reshape: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Resize: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_RoiPooling: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Scale: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Selu: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Size: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Slice: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_SliceTf: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_SpaceBatch: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_SqueezeParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_StridedSliceParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_TensorConvertInfo: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_TfQuantizedConv2D: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_TopKV2: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Transpose: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_UnaryOp: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_MomentsParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_RNNParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_BatchMatMulParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_QuantizedFloatParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_DepthSpaceParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_EltwiseInt8: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_ReverseSequenceParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Extra: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Pool3D: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_Convolution3D: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_ELU: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_DetectionPostProcessParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_OneHotParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_PadParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_WhileParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_IfParam: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_RandomUniform: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - case OpParameter_LayerNorm: { -- auto ptr = reinterpret_cast(obj); -+ auto ptr = reinterpret_cast(obj); - return ptr->UnPack(resolver); - } - default: return nullptr; -@@ -5503,713 +5496,713 @@ inline void *OpParameterUnion::UnPack(const void *obj, OpParameter type, const f - inline flatbuffers::Offset OpParameterUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { - switch (type) { - case OpParameter_QuantizedAdd: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedAdd(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_ArgMax: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateArgMax(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_AsString: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateAsString(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Axis: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateAxis(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_BatchNorm: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateBatchNorm(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_BinaryOp: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateBinaryOp(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Blob: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateBlob(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_CastParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateCastParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Convolution2D: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateConvolution2D(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Crop: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateCrop(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_CropAndResize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateCropAndResize(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Dequantize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateDequantize(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_DetectionOutput: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateDetectionOutput(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Eltwise: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateEltwise(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_ExpandDims: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateExpandDims(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Fill: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateFill(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Flatten: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateFlatten(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Gather: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateGather(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_GatherV2: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateGatherV2(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_InnerProduct: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateInnerProduct(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Input: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateInput(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Interp: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateInterp(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_LRN: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateLRN(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_LSTM: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateLSTM(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_MatMul: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateMatMul(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_NonMaxSuppressionV2: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateNonMaxSuppressionV2(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Normalize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateNormalize(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_PackParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreatePackParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Permute: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreatePermute(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Plugin: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreatePlugin(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Pool: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreatePool(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_PRelu: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreatePRelu(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_PriorBox: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreatePriorBox(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Proposal: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateProposal(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedAvgPool: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedAvgPool(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedBiasAdd: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedBiasAdd(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedConcat: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedConcat(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedLogistic: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedLogistic(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedMatMul: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedMatMul(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedMaxPool: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedMaxPool(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedRelu: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedRelu(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedRelu6: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedRelu6(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedReshape: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedReshape(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedSoftmax: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedSoftmax(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizeMaxMin: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizeMaxMin(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizeV2: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizeV2(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Range: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateRange(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Rank: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateRank(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_ReduceJoin: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateReduceJoin(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_ReductionParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateReductionParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Relu: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateRelu(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Relu6: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateRelu6(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_RequantizationRange: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateRequantizationRange(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Requantize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateRequantize(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Reshape: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateReshape(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Resize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateResize(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_RoiPooling: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateRoiPooling(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Scale: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateScale(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Selu: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateSelu(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Size: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateSize(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Slice: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateSlice(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_SliceTf: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateSliceTf(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_SpaceBatch: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateSpaceBatch(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_SqueezeParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateSqueezeParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_StridedSliceParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateStridedSliceParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_TensorConvertInfo: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateTensorConvertInfo(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_TfQuantizedConv2D: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateTfQuantizedConv2D(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_TopKV2: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateTopKV2(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Transpose: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateTranspose(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_UnaryOp: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateUnaryOp(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_MomentsParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateMomentsParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_RNNParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateRNNParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_BatchMatMulParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateBatchMatMulParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_QuantizedFloatParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateQuantizedFloatParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_DepthSpaceParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateDepthSpaceParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_EltwiseInt8: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateEltwiseInt8(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_ReverseSequenceParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateReverseSequenceParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Extra: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateExtra(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Pool3D: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreatePool3D(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_Convolution3D: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateConvolution3D(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_ELU: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateELU(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_DetectionPostProcessParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateDetectionPostProcessParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_OneHotParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateOneHotParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_PadParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreatePadParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_WhileParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateWhileParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_IfParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateIfParam(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_RandomUniform: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateRandomUniform(_fbb, ptr, _rehasher).Union(); - } - case OpParameter_LayerNorm: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - return CreateLayerNorm(_fbb, ptr, _rehasher).Union(); - } - default: return 0; - } - } - --inline OpParameterUnion::OpParameterUnion(const OpParameterUnion &u) FLATBUFFERS_NOEXCEPT : type(u.type), value(nullptr) { -+inline OpParameterUnion::OpParameterUnion(const OpParameterUnion &u) : type(u.type), value(nullptr) { - switch (type) { - case OpParameter_QuantizedAdd: { -- FLATBUFFERS_ASSERT(false); // QuantizedAddT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::QuantizedAddT not copyable. - break; - } - case OpParameter_ArgMax: { -- value = new ArgMaxT(*reinterpret_cast(u.value)); -+ value = new MNN::ArgMaxT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_AsString: { -- value = new AsStringT(*reinterpret_cast(u.value)); -+ value = new MNN::AsStringT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Axis: { -- value = new AxisT(*reinterpret_cast(u.value)); -+ value = new MNN::AxisT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_BatchNorm: { -- value = new BatchNormT(*reinterpret_cast(u.value)); -+ value = new MNN::BatchNormT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_BinaryOp: { -- value = new BinaryOpT(*reinterpret_cast(u.value)); -+ value = new MNN::BinaryOpT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Blob: { -- value = new BlobT(*reinterpret_cast(u.value)); -+ value = new MNN::BlobT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_CastParam: { -- value = new CastParamT(*reinterpret_cast(u.value)); -+ value = new MNN::CastParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Convolution2D: { -- FLATBUFFERS_ASSERT(false); // Convolution2DT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::Convolution2DT not copyable. - break; - } - case OpParameter_Crop: { -- value = new CropT(*reinterpret_cast(u.value)); -+ value = new MNN::CropT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_CropAndResize: { -- value = new CropAndResizeT(*reinterpret_cast(u.value)); -+ value = new MNN::CropAndResizeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Dequantize: { -- FLATBUFFERS_ASSERT(false); // DequantizeT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::DequantizeT not copyable. - break; - } - case OpParameter_DetectionOutput: { -- value = new DetectionOutputT(*reinterpret_cast(u.value)); -+ value = new MNN::DetectionOutputT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Eltwise: { -- value = new EltwiseT(*reinterpret_cast(u.value)); -+ value = new MNN::EltwiseT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_ExpandDims: { -- value = new ExpandDimsT(*reinterpret_cast(u.value)); -+ value = new MNN::ExpandDimsT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Fill: { -- value = new FillT(*reinterpret_cast(u.value)); -+ value = new MNN::FillT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Flatten: { -- value = new FlattenT(*reinterpret_cast(u.value)); -+ value = new MNN::FlattenT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Gather: { -- value = new GatherT(*reinterpret_cast(u.value)); -+ value = new MNN::GatherT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_GatherV2: { -- value = new GatherV2T(*reinterpret_cast(u.value)); -+ value = new MNN::GatherV2T(*reinterpret_cast(u.value)); - break; - } - case OpParameter_InnerProduct: { -- FLATBUFFERS_ASSERT(false); // InnerProductT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::InnerProductT not copyable. - break; - } - case OpParameter_Input: { -- value = new InputT(*reinterpret_cast(u.value)); -+ value = new MNN::InputT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Interp: { -- value = new InterpT(*reinterpret_cast(u.value)); -+ value = new MNN::InterpT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_LRN: { -- value = new LRNT(*reinterpret_cast(u.value)); -+ value = new MNN::LRNT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_LSTM: { -- FLATBUFFERS_ASSERT(false); // LSTMT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::LSTMT not copyable. - break; - } - case OpParameter_MatMul: { -- value = new MatMulT(*reinterpret_cast(u.value)); -+ value = new MNN::MatMulT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_NonMaxSuppressionV2: { -- value = new NonMaxSuppressionV2T(*reinterpret_cast(u.value)); -+ value = new MNN::NonMaxSuppressionV2T(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Normalize: { -- value = new NormalizeT(*reinterpret_cast(u.value)); -+ value = new MNN::NormalizeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_PackParam: { -- value = new PackParamT(*reinterpret_cast(u.value)); -+ value = new MNN::PackParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Permute: { -- value = new PermuteT(*reinterpret_cast(u.value)); -+ value = new MNN::PermuteT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Plugin: { -- FLATBUFFERS_ASSERT(false); // PluginT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::PluginT not copyable. - break; - } - case OpParameter_Pool: { -- value = new PoolT(*reinterpret_cast(u.value)); -+ value = new MNN::PoolT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_PRelu: { -- value = new PReluT(*reinterpret_cast(u.value)); -+ value = new MNN::PReluT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_PriorBox: { -- value = new PriorBoxT(*reinterpret_cast(u.value)); -+ value = new MNN::PriorBoxT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Proposal: { -- FLATBUFFERS_ASSERT(false); // ProposalT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::ProposalT not copyable. - break; - } - case OpParameter_QuantizedAvgPool: { -- value = new QuantizedAvgPoolT(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizedAvgPoolT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizedBiasAdd: { -- value = new QuantizedBiasAddT(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizedBiasAddT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizedConcat: { -- FLATBUFFERS_ASSERT(false); // QuantizedConcatT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::QuantizedConcatT not copyable. - break; - } - case OpParameter_QuantizedLogistic: { -- FLATBUFFERS_ASSERT(false); // QuantizedLogisticT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::QuantizedLogisticT not copyable. - break; - } - case OpParameter_QuantizedMatMul: { -- value = new QuantizedMatMulT(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizedMatMulT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizedMaxPool: { -- value = new QuantizedMaxPoolT(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizedMaxPoolT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizedRelu: { -- value = new QuantizedReluT(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizedReluT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizedRelu6: { -- value = new QuantizedRelu6T(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizedRelu6T(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizedReshape: { -- value = new QuantizedReshapeT(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizedReshapeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizedSoftmax: { -- value = new QuantizedSoftmaxT(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizedSoftmaxT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizeMaxMin: { -- value = new QuantizeMaxMinT(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizeMaxMinT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizeV2: { -- value = new QuantizeV2T(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizeV2T(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Range: { -- value = new RangeT(*reinterpret_cast(u.value)); -+ value = new MNN::RangeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Rank: { -- value = new RankT(*reinterpret_cast(u.value)); -+ value = new MNN::RankT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_ReduceJoin: { -- value = new ReduceJoinT(*reinterpret_cast(u.value)); -+ value = new MNN::ReduceJoinT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_ReductionParam: { -- value = new ReductionParamT(*reinterpret_cast(u.value)); -+ value = new MNN::ReductionParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Relu: { -- value = new ReluT(*reinterpret_cast(u.value)); -+ value = new MNN::ReluT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Relu6: { -- value = new Relu6T(*reinterpret_cast(u.value)); -+ value = new MNN::Relu6T(*reinterpret_cast(u.value)); - break; - } - case OpParameter_RequantizationRange: { -- value = new RequantizationRangeT(*reinterpret_cast(u.value)); -+ value = new MNN::RequantizationRangeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Requantize: { -- value = new RequantizeT(*reinterpret_cast(u.value)); -+ value = new MNN::RequantizeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Reshape: { -- value = new ReshapeT(*reinterpret_cast(u.value)); -+ value = new MNN::ReshapeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Resize: { -- value = new ResizeT(*reinterpret_cast(u.value)); -+ value = new MNN::ResizeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_RoiPooling: { -- value = new RoiPoolingT(*reinterpret_cast(u.value)); -+ value = new MNN::RoiPoolingT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Scale: { -- value = new ScaleT(*reinterpret_cast(u.value)); -+ value = new MNN::ScaleT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Selu: { -- value = new SeluT(*reinterpret_cast(u.value)); -+ value = new MNN::SeluT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Size: { -- value = new SizeT(*reinterpret_cast(u.value)); -+ value = new MNN::SizeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Slice: { -- value = new SliceT(*reinterpret_cast(u.value)); -+ value = new MNN::SliceT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_SliceTf: { -- value = new SliceTfT(*reinterpret_cast(u.value)); -+ value = new MNN::SliceTfT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_SpaceBatch: { -- FLATBUFFERS_ASSERT(false); // SpaceBatchT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::SpaceBatchT not copyable. - break; - } - case OpParameter_SqueezeParam: { -- value = new SqueezeParamT(*reinterpret_cast(u.value)); -+ value = new MNN::SqueezeParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_StridedSliceParam: { -- value = new StridedSliceParamT(*reinterpret_cast(u.value)); -+ value = new MNN::StridedSliceParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_TensorConvertInfo: { -- value = new TensorConvertInfoT(*reinterpret_cast(u.value)); -+ value = new MNN::TensorConvertInfoT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_TfQuantizedConv2D: { -- FLATBUFFERS_ASSERT(false); // TfQuantizedConv2DT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::TfQuantizedConv2DT not copyable. - break; - } - case OpParameter_TopKV2: { -- value = new TopKV2T(*reinterpret_cast(u.value)); -+ value = new MNN::TopKV2T(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Transpose: { -- value = new TransposeT(*reinterpret_cast(u.value)); -+ value = new MNN::TransposeT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_UnaryOp: { -- value = new UnaryOpT(*reinterpret_cast(u.value)); -+ value = new MNN::UnaryOpT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_MomentsParam: { -- value = new MomentsParamT(*reinterpret_cast(u.value)); -+ value = new MNN::MomentsParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_RNNParam: { -- FLATBUFFERS_ASSERT(false); // RNNParamT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::RNNParamT not copyable. - break; - } - case OpParameter_BatchMatMulParam: { -- value = new BatchMatMulParamT(*reinterpret_cast(u.value)); -+ value = new MNN::BatchMatMulParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_QuantizedFloatParam: { -- value = new QuantizedFloatParamT(*reinterpret_cast(u.value)); -+ value = new MNN::QuantizedFloatParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_DepthSpaceParam: { -- value = new DepthSpaceParamT(*reinterpret_cast(u.value)); -+ value = new MNN::DepthSpaceParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_EltwiseInt8: { -- FLATBUFFERS_ASSERT(false); // EltwiseInt8T not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::EltwiseInt8T not copyable. - break; - } - case OpParameter_ReverseSequenceParam: { -- value = new ReverseSequenceParamT(*reinterpret_cast(u.value)); -+ value = new MNN::ReverseSequenceParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Extra: { -- FLATBUFFERS_ASSERT(false); // ExtraT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::ExtraT not copyable. - break; - } - case OpParameter_Pool3D: { -- value = new Pool3DT(*reinterpret_cast(u.value)); -+ value = new MNN::Pool3DT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_Convolution3D: { -- FLATBUFFERS_ASSERT(false); // Convolution3DT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::Convolution3DT not copyable. - break; - } - case OpParameter_ELU: { -- value = new ELUT(*reinterpret_cast(u.value)); -+ value = new MNN::ELUT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_DetectionPostProcessParam: { -- value = new DetectionPostProcessParamT(*reinterpret_cast(u.value)); -+ value = new MNN::DetectionPostProcessParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_OneHotParam: { -- value = new OneHotParamT(*reinterpret_cast(u.value)); -+ value = new MNN::OneHotParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_PadParam: { -- value = new PadParamT(*reinterpret_cast(u.value)); -+ value = new MNN::PadParamT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_WhileParam: { -- FLATBUFFERS_ASSERT(false); // WhileParamT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::WhileParamT not copyable. - break; - } - case OpParameter_IfParam: { -- FLATBUFFERS_ASSERT(false); // IfParamT not copyable. -+ FLATBUFFERS_ASSERT(false); // MNN::IfParamT not copyable. - break; - } - case OpParameter_RandomUniform: { -- value = new RandomUniformT(*reinterpret_cast(u.value)); -+ value = new MNN::RandomUniformT(*reinterpret_cast(u.value)); - break; - } - case OpParameter_LayerNorm: { -- value = new LayerNormT(*reinterpret_cast(u.value)); -+ value = new MNN::LayerNormT(*reinterpret_cast(u.value)); - break; - } - default: -@@ -6220,442 +6213,442 @@ inline OpParameterUnion::OpParameterUnion(const OpParameterUnion &u) FLATBUFFERS - inline void OpParameterUnion::Reset() { - switch (type) { - case OpParameter_QuantizedAdd: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_ArgMax: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_AsString: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Axis: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_BatchNorm: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_BinaryOp: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Blob: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_CastParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Convolution2D: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Crop: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_CropAndResize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Dequantize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_DetectionOutput: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Eltwise: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_ExpandDims: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Fill: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Flatten: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Gather: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_GatherV2: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_InnerProduct: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Input: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Interp: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_LRN: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_LSTM: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_MatMul: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_NonMaxSuppressionV2: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Normalize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_PackParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Permute: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Plugin: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Pool: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_PRelu: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_PriorBox: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Proposal: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedAvgPool: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedBiasAdd: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedConcat: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedLogistic: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedMatMul: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedMaxPool: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedRelu: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedRelu6: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedReshape: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedSoftmax: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizeMaxMin: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizeV2: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Range: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Rank: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_ReduceJoin: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_ReductionParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Relu: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Relu6: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_RequantizationRange: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Requantize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Reshape: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Resize: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_RoiPooling: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Scale: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Selu: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Size: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Slice: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_SliceTf: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_SpaceBatch: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_SqueezeParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_StridedSliceParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_TensorConvertInfo: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_TfQuantizedConv2D: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_TopKV2: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Transpose: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_UnaryOp: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_MomentsParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_RNNParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_BatchMatMulParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_QuantizedFloatParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_DepthSpaceParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_EltwiseInt8: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_ReverseSequenceParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Extra: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Pool3D: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_Convolution3D: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_ELU: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_DetectionPostProcessParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_OneHotParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_PadParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_WhileParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_IfParam: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_RandomUniform: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } - case OpParameter_LayerNorm: { -- auto ptr = reinterpret_cast(value); -+ auto ptr = reinterpret_cast(value); - delete ptr; - break; - } -@@ -6819,7 +6812,7 @@ inline const flatbuffers::TypeTable *OpTypeTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- OpTypeTypeTable -+ MNN::OpTypeTypeTable - }; - static const int64_t values[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 128, 129, 130, 131, 132, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 512, 513, 514, 515, 516, 517, 518, 600, 601, 603 }; - static const char * const names[] = { -@@ -6975,7 +6968,7 @@ inline const flatbuffers::TypeTable *OpTypeTypeTable() { - "LayerNorm" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 150, type_codes, type_refs, values, names -+ flatbuffers::ST_ENUM, 150, type_codes, type_refs, nullptr, values, names - }; - return &tt; - } -@@ -7073,94 +7066,94 @@ inline const flatbuffers::TypeTable *OpParameterTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 87 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- QuantizedAddTypeTable, -- ArgMaxTypeTable, -- AsStringTypeTable, -- AxisTypeTable, -- BatchNormTypeTable, -- BinaryOpTypeTable, -- BlobTypeTable, -- CastParamTypeTable, -- Convolution2DTypeTable, -- CropTypeTable, -- CropAndResizeTypeTable, -- DequantizeTypeTable, -- DetectionOutputTypeTable, -- EltwiseTypeTable, -- ExpandDimsTypeTable, -- FillTypeTable, -- FlattenTypeTable, -- GatherTypeTable, -- GatherV2TypeTable, -- InnerProductTypeTable, -- InputTypeTable, -- InterpTypeTable, -- LRNTypeTable, -- LSTMTypeTable, -- MatMulTypeTable, -- NonMaxSuppressionV2TypeTable, -- NormalizeTypeTable, -- PackParamTypeTable, -- PermuteTypeTable, -- PluginTypeTable, -- PoolTypeTable, -- PReluTypeTable, -- PriorBoxTypeTable, -- ProposalTypeTable, -- QuantizedAvgPoolTypeTable, -- QuantizedBiasAddTypeTable, -- QuantizedConcatTypeTable, -- QuantizedLogisticTypeTable, -- QuantizedMatMulTypeTable, -- QuantizedMaxPoolTypeTable, -- QuantizedReluTypeTable, -- QuantizedRelu6TypeTable, -- QuantizedReshapeTypeTable, -- QuantizedSoftmaxTypeTable, -- QuantizeMaxMinTypeTable, -- QuantizeV2TypeTable, -- RangeTypeTable, -- RankTypeTable, -- ReduceJoinTypeTable, -- ReductionParamTypeTable, -- ReluTypeTable, -- Relu6TypeTable, -- RequantizationRangeTypeTable, -- RequantizeTypeTable, -- ReshapeTypeTable, -- ResizeTypeTable, -- RoiPoolingTypeTable, -- ScaleTypeTable, -- SeluTypeTable, -- SizeTypeTable, -- SliceTypeTable, -- SliceTfTypeTable, -- SpaceBatchTypeTable, -- SqueezeParamTypeTable, -- StridedSliceParamTypeTable, -- TensorConvertInfoTypeTable, -- TfQuantizedConv2DTypeTable, -- TopKV2TypeTable, -- TransposeTypeTable, -- UnaryOpTypeTable, -- MomentsParamTypeTable, -- RNNParamTypeTable, -- BatchMatMulParamTypeTable, -- QuantizedFloatParamTypeTable, -- DepthSpaceParamTypeTable, -- EltwiseInt8TypeTable, -- ReverseSequenceParamTypeTable, -- ExtraTypeTable, -- Pool3DTypeTable, -- Convolution3DTypeTable, -- ELUTypeTable, -- DetectionPostProcessParamTypeTable, -- OneHotParamTypeTable, -- PadParamTypeTable, -- WhileParamTypeTable, -- IfParamTypeTable, -- RandomUniformTypeTable, -- LayerNormTypeTable -+ MNN::QuantizedAddTypeTable, -+ MNN::ArgMaxTypeTable, -+ MNN::AsStringTypeTable, -+ MNN::AxisTypeTable, -+ MNN::BatchNormTypeTable, -+ MNN::BinaryOpTypeTable, -+ MNN::BlobTypeTable, -+ MNN::CastParamTypeTable, -+ MNN::Convolution2DTypeTable, -+ MNN::CropTypeTable, -+ MNN::CropAndResizeTypeTable, -+ MNN::DequantizeTypeTable, -+ MNN::DetectionOutputTypeTable, -+ MNN::EltwiseTypeTable, -+ MNN::ExpandDimsTypeTable, -+ MNN::FillTypeTable, -+ MNN::FlattenTypeTable, -+ MNN::GatherTypeTable, -+ MNN::GatherV2TypeTable, -+ MNN::InnerProductTypeTable, -+ MNN::InputTypeTable, -+ MNN::InterpTypeTable, -+ MNN::LRNTypeTable, -+ MNN::LSTMTypeTable, -+ MNN::MatMulTypeTable, -+ MNN::NonMaxSuppressionV2TypeTable, -+ MNN::NormalizeTypeTable, -+ MNN::PackParamTypeTable, -+ MNN::PermuteTypeTable, -+ MNN::PluginTypeTable, -+ MNN::PoolTypeTable, -+ MNN::PReluTypeTable, -+ MNN::PriorBoxTypeTable, -+ MNN::ProposalTypeTable, -+ MNN::QuantizedAvgPoolTypeTable, -+ MNN::QuantizedBiasAddTypeTable, -+ MNN::QuantizedConcatTypeTable, -+ MNN::QuantizedLogisticTypeTable, -+ MNN::QuantizedMatMulTypeTable, -+ MNN::QuantizedMaxPoolTypeTable, -+ MNN::QuantizedReluTypeTable, -+ MNN::QuantizedRelu6TypeTable, -+ MNN::QuantizedReshapeTypeTable, -+ MNN::QuantizedSoftmaxTypeTable, -+ MNN::QuantizeMaxMinTypeTable, -+ MNN::QuantizeV2TypeTable, -+ MNN::RangeTypeTable, -+ MNN::RankTypeTable, -+ MNN::ReduceJoinTypeTable, -+ MNN::ReductionParamTypeTable, -+ MNN::ReluTypeTable, -+ MNN::Relu6TypeTable, -+ MNN::RequantizationRangeTypeTable, -+ MNN::RequantizeTypeTable, -+ MNN::ReshapeTypeTable, -+ MNN::ResizeTypeTable, -+ MNN::RoiPoolingTypeTable, -+ MNN::ScaleTypeTable, -+ MNN::SeluTypeTable, -+ MNN::SizeTypeTable, -+ MNN::SliceTypeTable, -+ MNN::SliceTfTypeTable, -+ MNN::SpaceBatchTypeTable, -+ MNN::SqueezeParamTypeTable, -+ MNN::StridedSliceParamTypeTable, -+ MNN::TensorConvertInfoTypeTable, -+ MNN::TfQuantizedConv2DTypeTable, -+ MNN::TopKV2TypeTable, -+ MNN::TransposeTypeTable, -+ MNN::UnaryOpTypeTable, -+ MNN::MomentsParamTypeTable, -+ MNN::RNNParamTypeTable, -+ MNN::BatchMatMulParamTypeTable, -+ MNN::QuantizedFloatParamTypeTable, -+ MNN::DepthSpaceParamTypeTable, -+ MNN::EltwiseInt8TypeTable, -+ MNN::ReverseSequenceParamTypeTable, -+ MNN::ExtraTypeTable, -+ MNN::Pool3DTypeTable, -+ MNN::Convolution3DTypeTable, -+ MNN::ELUTypeTable, -+ MNN::DetectionPostProcessParamTypeTable, -+ MNN::OneHotParamTypeTable, -+ MNN::PadParamTypeTable, -+ MNN::WhileParamTypeTable, -+ MNN::IfParamTypeTable, -+ MNN::RandomUniformTypeTable, -+ MNN::LayerNormTypeTable - }; - static const char * const names[] = { - "NONE", -@@ -7254,7 +7247,7 @@ inline const flatbuffers::TypeTable *OpParameterTypeTable() { - "LayerNorm" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_UNION, 89, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_UNION, 89, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7268,7 +7261,7 @@ inline const flatbuffers::TypeTable *ForwardTypeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ForwardTypeTypeTable -+ MNN::ForwardTypeTypeTable - }; - static const char * const names[] = { - "CPU", -@@ -7278,7 +7271,7 @@ inline const flatbuffers::TypeTable *ForwardTypeTypeTable() { - "VULKAN" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7290,7 +7283,7 @@ inline const flatbuffers::TypeTable *UsageTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- UsageTypeTable -+ MNN::UsageTypeTable - }; - static const char * const names[] = { - "INFERENCE", -@@ -7298,7 +7291,7 @@ inline const flatbuffers::TypeTable *UsageTypeTable() { - "INFERENCE_STATIC" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7309,14 +7302,14 @@ inline const flatbuffers::TypeTable *PluginTypeTable() { - { flatbuffers::ET_SEQUENCE, 1, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- AttributeTypeTable -+ MNN::AttributeTypeTable - }; - static const char * const names[] = { - "type", - "attr" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7329,7 +7322,7 @@ inline const flatbuffers::TypeTable *ExtraTypeTable() { - { flatbuffers::ET_SEQUENCE, 1, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- AttributeTypeTable -+ MNN::AttributeTypeTable - }; - static const char * const names[] = { - "type", -@@ -7338,7 +7331,7 @@ inline const flatbuffers::TypeTable *ExtraTypeTable() { - "attr" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7351,7 +7344,7 @@ inline const flatbuffers::TypeTable *StringVecTypeTable() { - "data" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -7365,7 +7358,7 @@ inline const flatbuffers::TypeTable *WhileParamTypeTable() { - { flatbuffers::ET_SEQUENCE, 1, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- StringVecTypeTable -+ MNN::StringVecTypeTable - }; - static const char * const names[] = { - "cond_graph", -@@ -7375,7 +7368,7 @@ inline const flatbuffers::TypeTable *WhileParamTypeTable() { - "aliases_updates" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7388,7 +7381,7 @@ inline const flatbuffers::TypeTable *IfParamTypeTable() { - { flatbuffers::ET_SEQUENCE, 1, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- StringVecTypeTable -+ MNN::StringVecTypeTable - }; - static const char * const names[] = { - "then_graph", -@@ -7397,7 +7390,7 @@ inline const flatbuffers::TypeTable *IfParamTypeTable() { - "aliases_outputs" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7413,9 +7406,9 @@ inline const flatbuffers::TypeTable *OpTypeTable() { - { flatbuffers::ET_CHAR, 0, 2 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- OpParameterTypeTable, -- OpTypeTypeTable, -- MNN_DATA_FORMATTypeTable -+ MNN::OpParameterTypeTable, -+ MNN::OpTypeTypeTable, -+ MNN::MNN_DATA_FORMATTypeTable - }; - static const char * const names[] = { - "inputIndexes", -@@ -7427,7 +7420,7 @@ inline const flatbuffers::TypeTable *OpTypeTable() { - "defaultDimentionFormat" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7442,7 +7435,7 @@ inline const flatbuffers::TypeTable *ViewTypeTable() { - "stride" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -7455,7 +7448,7 @@ inline const flatbuffers::TypeTable *RegionTypeTable() { - { flatbuffers::ET_INT, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ViewTypeTable -+ MNN::ViewTypeTable - }; - static const char * const names[] = { - "src", -@@ -7464,7 +7457,7 @@ inline const flatbuffers::TypeTable *RegionTypeTable() { - "origin" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7477,8 +7470,8 @@ inline const flatbuffers::TypeTable *TensorDescribeTypeTable() { - { flatbuffers::ET_SEQUENCE, 1, 1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- BlobTypeTable, -- RegionTypeTable -+ MNN::BlobTypeTable, -+ MNN::RegionTypeTable - }; - static const char * const names[] = { - "blob", -@@ -7487,7 +7480,7 @@ inline const flatbuffers::TypeTable *TensorDescribeTypeTable() { - "regions" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7501,7 +7494,7 @@ inline const flatbuffers::TypeTable *SubGraphProtoTypeTable() { - { flatbuffers::ET_SEQUENCE, 1, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- OpTypeTable -+ MNN::OpTypeTable - }; - static const char * const names[] = { - "name", -@@ -7511,7 +7504,7 @@ inline const flatbuffers::TypeTable *SubGraphProtoTypeTable() { - "nodes" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7531,13 +7524,13 @@ inline const flatbuffers::TypeTable *NetTypeTable() { - { flatbuffers::ET_SEQUENCE, 1, 6 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- TensorDescribeTypeTable, -- GpuLibraryTypeTable, -- OpTypeTable, -- ForwardTypeTypeTable, -- NetSourceTypeTable, -- UsageTypeTable, -- SubGraphProtoTypeTable -+ MNN::TensorDescribeTypeTable, -+ MNN::GpuLibraryTypeTable, -+ MNN::OpTypeTable, -+ MNN::ForwardTypeTypeTable, -+ MNN::NetSourceTypeTable, -+ MNN::UsageTypeTable, -+ MNN::SubGraphProtoTypeTable - }; - static const char * const names[] = { - "bizCode", -@@ -7553,7 +7546,7 @@ inline const flatbuffers::TypeTable *NetTypeTable() { - "subgraphs" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -7588,10 +7581,16 @@ inline void FinishSizePrefixedNetBuffer( - fbb.FinishSizePrefixed(root); - } - --inline std::unique_ptr UnPackNet( -+inline std::unique_ptr UnPackNet( -+ const void *buf, -+ const flatbuffers::resolver_function_t *res = nullptr) { -+ return std::unique_ptr(GetNet(buf)->UnPack(res)); -+} -+ -+inline std::unique_ptr UnPackSizePrefixedNet( - const void *buf, - const flatbuffers::resolver_function_t *res = nullptr) { -- return std::unique_ptr(GetNet(buf)->UnPack(res)); -+ return std::unique_ptr(GetSizePrefixedNet(buf)->UnPack(res)); - } - - } // namespace MNN -diff --git a/schema/current/TFQuantizeOp_generated.h b/schema/current/TFQuantizeOp_generated.h -index 18360b9c..34520b67 100644 ---- a/schema/current/TFQuantizeOp_generated.h -+++ b/schema/current/TFQuantizeOp_generated.h -@@ -4,62 +4,80 @@ - #ifndef FLATBUFFERS_GENERATED_TFQUANTIZEOP_MNN_H_ - #define FLATBUFFERS_GENERATED_TFQUANTIZEOP_MNN_H_ - -+#include "flatbuffers/flatbuffers.h" - -+#include "Type_generated.h" - #include "CaffeOp_generated.h" - #include "Tensor_generated.h" --#include "Type_generated.h" - - namespace MNN { - - struct QuantizedParam; -+struct QuantizedParamBuilder; - struct QuantizedParamT; - - struct QuantizedAdd; -+struct QuantizedAddBuilder; - struct QuantizedAddT; - - struct Dequantize; -+struct DequantizeBuilder; - struct DequantizeT; - - struct QuantizedAvgPool; -+struct QuantizedAvgPoolBuilder; - struct QuantizedAvgPoolT; - - struct QuantizedBiasAdd; -+struct QuantizedBiasAddBuilder; - struct QuantizedBiasAddT; - - struct QuantizedConcat; -+struct QuantizedConcatBuilder; - struct QuantizedConcatT; - - struct QuantizedLogistic; -+struct QuantizedLogisticBuilder; - struct QuantizedLogisticT; - - struct QuantizedMatMul; -+struct QuantizedMatMulBuilder; - struct QuantizedMatMulT; - - struct QuantizedMaxPool; -+struct QuantizedMaxPoolBuilder; - struct QuantizedMaxPoolT; - - struct QuantizedRelu; -+struct QuantizedReluBuilder; - struct QuantizedReluT; - - struct QuantizedRelu6; -+struct QuantizedRelu6Builder; - struct QuantizedRelu6T; - - struct QuantizedReshape; -+struct QuantizedReshapeBuilder; - struct QuantizedReshapeT; - - struct QuantizedSoftmax; -+struct QuantizedSoftmaxBuilder; - struct QuantizedSoftmaxT; - - struct QuantizeV2; -+struct QuantizeV2Builder; - struct QuantizeV2T; - - struct RequantizationRange; -+struct RequantizationRangeBuilder; - struct RequantizationRangeT; - - struct Requantize; -+struct RequantizeBuilder; - struct RequantizeT; - - struct TfQuantizedConv2D; -+struct TfQuantizedConv2DBuilder; - struct TfQuantizedConv2DT; - - inline const flatbuffers::TypeTable *QuantizedParamTypeTable(); -@@ -96,7 +114,7 @@ inline const flatbuffers::TypeTable *RequantizeTypeTable(); - - inline const flatbuffers::TypeTable *TfQuantizedConv2DTypeTable(); - --enum FusedActivation { -+enum FusedActivation : int8_t { - FusedActivation_kTfLiteActNone = 0, - FusedActivation_kTfLiteActRelu = 1, - FusedActivation_kTfLiteActRelu1 = 2, -@@ -122,7 +140,7 @@ inline const FusedActivation (&EnumValuesFusedActivation())[7] { - } - - inline const char * const *EnumNamesFusedActivation() { -- static const char * const names[] = { -+ static const char * const names[8] = { - "kTfLiteActNone", - "kTfLiteActRelu", - "kTfLiteActRelu1", -@@ -136,12 +154,12 @@ inline const char * const *EnumNamesFusedActivation() { - } - - inline const char *EnumNameFusedActivation(FusedActivation e) { -- if (e < FusedActivation_kTfLiteActNone || e > FusedActivation_kTfLiteActSigmoid) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, FusedActivation_kTfLiteActNone, FusedActivation_kTfLiteActSigmoid)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesFusedActivation()[index]; - } - --enum ModeFormat { -+enum ModeFormat : int8_t { - ModeFormat_TENSORFLOW = 0, - ModeFormat_TFLITE = 1, - ModeFormat_MIN = ModeFormat_TENSORFLOW, -@@ -157,7 +175,7 @@ inline const ModeFormat (&EnumValuesModeFormat())[2] { - } - - inline const char * const *EnumNamesModeFormat() { -- static const char * const names[] = { -+ static const char * const names[3] = { - "TENSORFLOW", - "TFLITE", - nullptr -@@ -166,12 +184,12 @@ inline const char * const *EnumNamesModeFormat() { - } - - inline const char *EnumNameModeFormat(ModeFormat e) { -- if (e < ModeFormat_TENSORFLOW || e > ModeFormat_TFLITE) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, ModeFormat_TENSORFLOW, ModeFormat_TFLITE)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesModeFormat()[index]; - } - --enum QuantizeMode { -+enum QuantizeMode : int8_t { - QuantizeMode_MIN_COMBINED = 0, - QuantizeMode_MIN_FIRST = 1, - QuantizeMode_SCALED = 2, -@@ -189,7 +207,7 @@ inline const QuantizeMode (&EnumValuesQuantizeMode())[3] { - } - - inline const char * const *EnumNamesQuantizeMode() { -- static const char * const names[] = { -+ static const char * const names[4] = { - "MIN_COMBINED", - "MIN_FIRST", - "SCALED", -@@ -199,12 +217,12 @@ inline const char * const *EnumNamesQuantizeMode() { - } - - inline const char *EnumNameQuantizeMode(QuantizeMode e) { -- if (e < QuantizeMode_MIN_COMBINED || e > QuantizeMode_SCALED) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, QuantizeMode_MIN_COMBINED, QuantizeMode_SCALED)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesQuantizeMode()[index]; - } - --enum QuantizeRoundMode { -+enum QuantizeRoundMode : int8_t { - QuantizeRoundMode_HALF_AWAY_FROM_ZERO = 0, - QuantizeRoundMode_HALF_TO_EVEN = 1, - QuantizeRoundMode_MIN = QuantizeRoundMode_HALF_AWAY_FROM_ZERO, -@@ -220,7 +238,7 @@ inline const QuantizeRoundMode (&EnumValuesQuantizeRoundMode())[2] { - } - - inline const char * const *EnumNamesQuantizeRoundMode() { -- static const char * const names[] = { -+ static const char * const names[3] = { - "HALF_AWAY_FROM_ZERO", - "HALF_TO_EVEN", - nullptr -@@ -229,23 +247,20 @@ inline const char * const *EnumNamesQuantizeRoundMode() { - } - - inline const char *EnumNameQuantizeRoundMode(QuantizeRoundMode e) { -- if (e < QuantizeRoundMode_HALF_AWAY_FROM_ZERO || e > QuantizeRoundMode_HALF_TO_EVEN) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, QuantizeRoundMode_HALF_AWAY_FROM_ZERO, QuantizeRoundMode_HALF_TO_EVEN)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesQuantizeRoundMode()[index]; - } - - struct QuantizedParamT : public flatbuffers::NativeTable { - typedef QuantizedParam TableType; -- int32_t zeroPoint; -- float scale; -- QuantizedParamT() -- : zeroPoint(0), -- scale(0.0f) { -- } -+ int32_t zeroPoint = 0; -+ float scale = 0.0f; - }; - - struct QuantizedParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedParamT NativeTableType; -+ typedef QuantizedParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedParamTypeTable(); - } -@@ -271,6 +286,7 @@ struct QuantizedParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedParamBuilder { -+ typedef QuantizedParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_zeroPoint(int32_t zeroPoint) { -@@ -283,7 +299,6 @@ struct QuantizedParamBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedParamBuilder &operator=(const QuantizedParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -305,17 +320,15 @@ flatbuffers::Offset CreateQuantizedParam(flatbuffers::FlatBuffer - - struct QuantizedAddT : public flatbuffers::NativeTable { - typedef QuantizedAdd TableType; -- FusedActivation activationType; -- std::unique_ptr input1QuantizedParam; -- std::unique_ptr input2QuantizedParam; -- std::unique_ptr outputQuantizedParam; -- QuantizedAddT() -- : activationType(FusedActivation_kTfLiteActNone) { -- } -+ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone; -+ std::unique_ptr input1QuantizedParam{}; -+ std::unique_ptr input2QuantizedParam{}; -+ std::unique_ptr outputQuantizedParam{}; - }; - - struct QuantizedAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedAddT NativeTableType; -+ typedef QuantizedAddBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedAddTypeTable(); - } -@@ -325,17 +338,17 @@ struct QuantizedAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_INPUT2QUANTIZEDPARAM = 8, - VT_OUTPUTQUANTIZEDPARAM = 10 - }; -- FusedActivation activationType() const { -- return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); -+ MNN::FusedActivation activationType() const { -+ return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); - } -- const QuantizedParam *input1QuantizedParam() const { -- return GetPointer(VT_INPUT1QUANTIZEDPARAM); -+ const MNN::QuantizedParam *input1QuantizedParam() const { -+ return GetPointer(VT_INPUT1QUANTIZEDPARAM); - } -- const QuantizedParam *input2QuantizedParam() const { -- return GetPointer(VT_INPUT2QUANTIZEDPARAM); -+ const MNN::QuantizedParam *input2QuantizedParam() const { -+ return GetPointer(VT_INPUT2QUANTIZEDPARAM); - } -- const QuantizedParam *outputQuantizedParam() const { -- return GetPointer(VT_OUTPUTQUANTIZEDPARAM); -+ const MNN::QuantizedParam *outputQuantizedParam() const { -+ return GetPointer(VT_OUTPUTQUANTIZEDPARAM); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -354,25 +367,25 @@ struct QuantizedAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedAddBuilder { -+ typedef QuantizedAdd Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_activationType(FusedActivation activationType) { -+ void add_activationType(MNN::FusedActivation activationType) { - fbb_.AddElement(QuantizedAdd::VT_ACTIVATIONTYPE, static_cast(activationType), 0); - } -- void add_input1QuantizedParam(flatbuffers::Offset input1QuantizedParam) { -+ void add_input1QuantizedParam(flatbuffers::Offset input1QuantizedParam) { - fbb_.AddOffset(QuantizedAdd::VT_INPUT1QUANTIZEDPARAM, input1QuantizedParam); - } -- void add_input2QuantizedParam(flatbuffers::Offset input2QuantizedParam) { -+ void add_input2QuantizedParam(flatbuffers::Offset input2QuantizedParam) { - fbb_.AddOffset(QuantizedAdd::VT_INPUT2QUANTIZEDPARAM, input2QuantizedParam); - } -- void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { -+ void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { - fbb_.AddOffset(QuantizedAdd::VT_OUTPUTQUANTIZEDPARAM, outputQuantizedParam); - } - explicit QuantizedAddBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedAddBuilder &operator=(const QuantizedAddBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -382,10 +395,10 @@ struct QuantizedAddBuilder { - - inline flatbuffers::Offset CreateQuantizedAdd( - flatbuffers::FlatBufferBuilder &_fbb, -- FusedActivation activationType = FusedActivation_kTfLiteActNone, -- flatbuffers::Offset input1QuantizedParam = 0, -- flatbuffers::Offset input2QuantizedParam = 0, -- flatbuffers::Offset outputQuantizedParam = 0) { -+ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, -+ flatbuffers::Offset input1QuantizedParam = 0, -+ flatbuffers::Offset input2QuantizedParam = 0, -+ flatbuffers::Offset outputQuantizedParam = 0) { - QuantizedAddBuilder builder_(_fbb); - builder_.add_outputQuantizedParam(outputQuantizedParam); - builder_.add_input2QuantizedParam(input2QuantizedParam); -@@ -398,19 +411,15 @@ flatbuffers::Offset CreateQuantizedAdd(flatbuffers::FlatBufferBuil - - struct DequantizeT : public flatbuffers::NativeTable { - typedef Dequantize TableType; -- std::unique_ptr inputQuantizedParam; -- QuantizeMode mode; -- ModeFormat modelFormat; -- DataType type; -- DequantizeT() -- : mode(QuantizeMode_MIN_COMBINED), -- modelFormat(ModeFormat_TENSORFLOW), -- type(DataType_DT_INVALID) { -- } -+ std::unique_ptr inputQuantizedParam{}; -+ MNN::QuantizeMode mode = MNN::QuantizeMode_MIN_COMBINED; -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; -+ MNN::DataType type = MNN::DataType_DT_INVALID; - }; - - struct Dequantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DequantizeT NativeTableType; -+ typedef DequantizeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return DequantizeTypeTable(); - } -@@ -420,17 +429,17 @@ struct Dequantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_MODELFORMAT = 8, - VT_TYPE = 10 - }; -- const QuantizedParam *inputQuantizedParam() const { -- return GetPointer(VT_INPUTQUANTIZEDPARAM); -+ const MNN::QuantizedParam *inputQuantizedParam() const { -+ return GetPointer(VT_INPUTQUANTIZEDPARAM); - } -- QuantizeMode mode() const { -- return static_cast(GetField(VT_MODE, 0)); -+ MNN::QuantizeMode mode() const { -+ return static_cast(GetField(VT_MODE, 0)); - } -- ModeFormat modelFormat() const { -- return static_cast(GetField(VT_MODELFORMAT, 0)); -+ MNN::ModeFormat modelFormat() const { -+ return static_cast(GetField(VT_MODELFORMAT, 0)); - } -- DataType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::DataType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -447,25 +456,25 @@ struct Dequantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct DequantizeBuilder { -+ typedef Dequantize Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { -+ void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { - fbb_.AddOffset(Dequantize::VT_INPUTQUANTIZEDPARAM, inputQuantizedParam); - } -- void add_mode(QuantizeMode mode) { -+ void add_mode(MNN::QuantizeMode mode) { - fbb_.AddElement(Dequantize::VT_MODE, static_cast(mode), 0); - } -- void add_modelFormat(ModeFormat modelFormat) { -+ void add_modelFormat(MNN::ModeFormat modelFormat) { - fbb_.AddElement(Dequantize::VT_MODELFORMAT, static_cast(modelFormat), 0); - } -- void add_type(DataType type) { -+ void add_type(MNN::DataType type) { - fbb_.AddElement(Dequantize::VT_TYPE, static_cast(type), 0); - } - explicit DequantizeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- DequantizeBuilder &operator=(const DequantizeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -475,10 +484,10 @@ struct DequantizeBuilder { - - inline flatbuffers::Offset CreateDequantize( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset inputQuantizedParam = 0, -- QuantizeMode mode = QuantizeMode_MIN_COMBINED, -- ModeFormat modelFormat = ModeFormat_TENSORFLOW, -- DataType type = DataType_DT_INVALID) { -+ flatbuffers::Offset inputQuantizedParam = 0, -+ MNN::QuantizeMode mode = MNN::QuantizeMode_MIN_COMBINED, -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, -+ MNN::DataType type = MNN::DataType_DT_INVALID) { - DequantizeBuilder builder_(_fbb); - builder_.add_type(type); - builder_.add_inputQuantizedParam(inputQuantizedParam); -@@ -491,34 +500,22 @@ flatbuffers::Offset CreateDequantize(flatbuffers::FlatBufferBuilder - - struct QuantizedAvgPoolT : public flatbuffers::NativeTable { - typedef QuantizedAvgPool TableType; -- int32_t kernelX; -- int32_t kernelY; -- ModeFormat modelFormat; -- int32_t outputActivationMax; -- int32_t outputActivationMin; -- PoolPadType padType; -- int32_t padX; -- int32_t padY; -- int32_t strideX; -- int32_t strideY; -- DataType type; -- QuantizedAvgPoolT() -- : kernelX(0), -- kernelY(0), -- modelFormat(ModeFormat_TENSORFLOW), -- outputActivationMax(0), -- outputActivationMin(0), -- padType(PoolPadType_CAFFE), -- padX(0), -- padY(0), -- strideX(0), -- strideY(0), -- type(DataType_DT_INVALID) { -- } -+ int32_t kernelX = 0; -+ int32_t kernelY = 0; -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; -+ int32_t outputActivationMax = 0; -+ int32_t outputActivationMin = 0; -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE; -+ int32_t padX = 0; -+ int32_t padY = 0; -+ int32_t strideX = 0; -+ int32_t strideY = 0; -+ MNN::DataType type = MNN::DataType_DT_INVALID; - }; - - struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedAvgPoolT NativeTableType; -+ typedef QuantizedAvgPoolBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedAvgPoolTypeTable(); - } -@@ -541,8 +538,8 @@ struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t kernelY() const { - return GetField(VT_KERNELY, 0); - } -- ModeFormat modelFormat() const { -- return static_cast(GetField(VT_MODELFORMAT, 0)); -+ MNN::ModeFormat modelFormat() const { -+ return static_cast(GetField(VT_MODELFORMAT, 0)); - } - int32_t outputActivationMax() const { - return GetField(VT_OUTPUTACTIVATIONMAX, 0); -@@ -550,8 +547,8 @@ struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t outputActivationMin() const { - return GetField(VT_OUTPUTACTIVATIONMIN, 0); - } -- PoolPadType padType() const { -- return static_cast(GetField(VT_PADTYPE, 0)); -+ MNN::PoolPadType padType() const { -+ return static_cast(GetField(VT_PADTYPE, 0)); - } - int32_t padX() const { - return GetField(VT_PADX, 0); -@@ -565,8 +562,8 @@ struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t strideY() const { - return GetField(VT_STRIDEY, 0); - } -- DataType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::DataType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -589,6 +586,7 @@ struct QuantizedAvgPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedAvgPoolBuilder { -+ typedef QuantizedAvgPool Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_kernelX(int32_t kernelX) { -@@ -597,7 +595,7 @@ struct QuantizedAvgPoolBuilder { - void add_kernelY(int32_t kernelY) { - fbb_.AddElement(QuantizedAvgPool::VT_KERNELY, kernelY, 0); - } -- void add_modelFormat(ModeFormat modelFormat) { -+ void add_modelFormat(MNN::ModeFormat modelFormat) { - fbb_.AddElement(QuantizedAvgPool::VT_MODELFORMAT, static_cast(modelFormat), 0); - } - void add_outputActivationMax(int32_t outputActivationMax) { -@@ -606,7 +604,7 @@ struct QuantizedAvgPoolBuilder { - void add_outputActivationMin(int32_t outputActivationMin) { - fbb_.AddElement(QuantizedAvgPool::VT_OUTPUTACTIVATIONMIN, outputActivationMin, 0); - } -- void add_padType(PoolPadType padType) { -+ void add_padType(MNN::PoolPadType padType) { - fbb_.AddElement(QuantizedAvgPool::VT_PADTYPE, static_cast(padType), 0); - } - void add_padX(int32_t padX) { -@@ -621,14 +619,13 @@ struct QuantizedAvgPoolBuilder { - void add_strideY(int32_t strideY) { - fbb_.AddElement(QuantizedAvgPool::VT_STRIDEY, strideY, 0); - } -- void add_type(DataType type) { -+ void add_type(MNN::DataType type) { - fbb_.AddElement(QuantizedAvgPool::VT_TYPE, static_cast(type), 0); - } - explicit QuantizedAvgPoolBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedAvgPoolBuilder &operator=(const QuantizedAvgPoolBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -640,15 +637,15 @@ inline flatbuffers::Offset CreateQuantizedAvgPool( - flatbuffers::FlatBufferBuilder &_fbb, - int32_t kernelX = 0, - int32_t kernelY = 0, -- ModeFormat modelFormat = ModeFormat_TENSORFLOW, -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, - int32_t outputActivationMax = 0, - int32_t outputActivationMin = 0, -- PoolPadType padType = PoolPadType_CAFFE, -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE, - int32_t padX = 0, - int32_t padY = 0, - int32_t strideX = 0, - int32_t strideY = 0, -- DataType type = DataType_DT_INVALID) { -+ MNN::DataType type = MNN::DataType_DT_INVALID) { - QuantizedAvgPoolBuilder builder_(_fbb); - builder_.add_type(type); - builder_.add_strideY(strideY); -@@ -668,21 +665,16 @@ flatbuffers::Offset CreateQuantizedAvgPool(flatbuffers::FlatBu - - struct QuantizedBiasAddT : public flatbuffers::NativeTable { - typedef QuantizedBiasAdd TableType; -- std::vector bias; -- DataType inputType; -- int32_t max; -- int32_t min; -- DataType outputType; -- QuantizedBiasAddT() -- : inputType(DataType_DT_INVALID), -- max(0), -- min(0), -- outputType(DataType_DT_INVALID) { -- } -+ std::vector bias{}; -+ MNN::DataType inputType = MNN::DataType_DT_INVALID; -+ int32_t max = 0; -+ int32_t min = 0; -+ MNN::DataType outputType = MNN::DataType_DT_INVALID; - }; - - struct QuantizedBiasAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedBiasAddT NativeTableType; -+ typedef QuantizedBiasAddBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedBiasAddTypeTable(); - } -@@ -696,8 +688,8 @@ struct QuantizedBiasAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *bias() const { - return GetPointer *>(VT_BIAS); - } -- DataType inputType() const { -- return static_cast(GetField(VT_INPUTTYPE, 0)); -+ MNN::DataType inputType() const { -+ return static_cast(GetField(VT_INPUTTYPE, 0)); - } - int32_t max() const { - return GetField(VT_MAX, 0); -@@ -705,8 +697,8 @@ struct QuantizedBiasAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t min() const { - return GetField(VT_MIN, 0); - } -- DataType outputType() const { -- return static_cast(GetField(VT_OUTPUTTYPE, 0)); -+ MNN::DataType outputType() const { -+ return static_cast(GetField(VT_OUTPUTTYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -724,12 +716,13 @@ struct QuantizedBiasAdd FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedBiasAddBuilder { -+ typedef QuantizedBiasAdd Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_bias(flatbuffers::Offset> bias) { - fbb_.AddOffset(QuantizedBiasAdd::VT_BIAS, bias); - } -- void add_inputType(DataType inputType) { -+ void add_inputType(MNN::DataType inputType) { - fbb_.AddElement(QuantizedBiasAdd::VT_INPUTTYPE, static_cast(inputType), 0); - } - void add_max(int32_t max) { -@@ -738,14 +731,13 @@ struct QuantizedBiasAddBuilder { - void add_min(int32_t min) { - fbb_.AddElement(QuantizedBiasAdd::VT_MIN, min, 0); - } -- void add_outputType(DataType outputType) { -+ void add_outputType(MNN::DataType outputType) { - fbb_.AddElement(QuantizedBiasAdd::VT_OUTPUTTYPE, static_cast(outputType), 0); - } - explicit QuantizedBiasAddBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedBiasAddBuilder &operator=(const QuantizedBiasAddBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -756,10 +748,10 @@ struct QuantizedBiasAddBuilder { - inline flatbuffers::Offset CreateQuantizedBiasAdd( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> bias = 0, -- DataType inputType = DataType_DT_INVALID, -+ MNN::DataType inputType = MNN::DataType_DT_INVALID, - int32_t max = 0, - int32_t min = 0, -- DataType outputType = DataType_DT_INVALID) { -+ MNN::DataType outputType = MNN::DataType_DT_INVALID) { - QuantizedBiasAddBuilder builder_(_fbb); - builder_.add_outputType(outputType); - builder_.add_min(min); -@@ -772,10 +764,10 @@ inline flatbuffers::Offset CreateQuantizedBiasAdd( - inline flatbuffers::Offset CreateQuantizedBiasAddDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *bias = nullptr, -- DataType inputType = DataType_DT_INVALID, -+ MNN::DataType inputType = MNN::DataType_DT_INVALID, - int32_t max = 0, - int32_t min = 0, -- DataType outputType = DataType_DT_INVALID) { -+ MNN::DataType outputType = MNN::DataType_DT_INVALID) { - auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; - return MNN::CreateQuantizedBiasAdd( - _fbb, -@@ -790,19 +782,16 @@ flatbuffers::Offset CreateQuantizedBiasAdd(flatbuffers::FlatBu - - struct QuantizedConcatT : public flatbuffers::NativeTable { - typedef QuantizedConcat TableType; -- FusedActivation activationType; -- int32_t axis; -- std::vector inputScale; -- std::vector inputZeroPoint; -- std::unique_ptr outputQuantizedParam; -- QuantizedConcatT() -- : activationType(FusedActivation_kTfLiteActNone), -- axis(0) { -- } -+ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone; -+ int32_t axis = 0; -+ std::vector inputScale{}; -+ std::vector inputZeroPoint{}; -+ std::unique_ptr outputQuantizedParam{}; - }; - - struct QuantizedConcat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedConcatT NativeTableType; -+ typedef QuantizedConcatBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedConcatTypeTable(); - } -@@ -813,8 +802,8 @@ struct QuantizedConcat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_INPUTZEROPOINT = 10, - VT_OUTPUTQUANTIZEDPARAM = 12 - }; -- FusedActivation activationType() const { -- return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); -+ MNN::FusedActivation activationType() const { -+ return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); - } - int32_t axis() const { - return GetField(VT_AXIS, 0); -@@ -825,8 +814,8 @@ struct QuantizedConcat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *inputZeroPoint() const { - return GetPointer *>(VT_INPUTZEROPOINT); - } -- const QuantizedParam *outputQuantizedParam() const { -- return GetPointer(VT_OUTPUTQUANTIZEDPARAM); -+ const MNN::QuantizedParam *outputQuantizedParam() const { -+ return GetPointer(VT_OUTPUTQUANTIZEDPARAM); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -846,9 +835,10 @@ struct QuantizedConcat FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedConcatBuilder { -+ typedef QuantizedConcat Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_activationType(FusedActivation activationType) { -+ void add_activationType(MNN::FusedActivation activationType) { - fbb_.AddElement(QuantizedConcat::VT_ACTIVATIONTYPE, static_cast(activationType), 0); - } - void add_axis(int32_t axis) { -@@ -860,14 +850,13 @@ struct QuantizedConcatBuilder { - void add_inputZeroPoint(flatbuffers::Offset> inputZeroPoint) { - fbb_.AddOffset(QuantizedConcat::VT_INPUTZEROPOINT, inputZeroPoint); - } -- void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { -+ void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { - fbb_.AddOffset(QuantizedConcat::VT_OUTPUTQUANTIZEDPARAM, outputQuantizedParam); - } - explicit QuantizedConcatBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedConcatBuilder &operator=(const QuantizedConcatBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -877,11 +866,11 @@ struct QuantizedConcatBuilder { - - inline flatbuffers::Offset CreateQuantizedConcat( - flatbuffers::FlatBufferBuilder &_fbb, -- FusedActivation activationType = FusedActivation_kTfLiteActNone, -+ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, - int32_t axis = 0, - flatbuffers::Offset> inputScale = 0, - flatbuffers::Offset> inputZeroPoint = 0, -- flatbuffers::Offset outputQuantizedParam = 0) { -+ flatbuffers::Offset outputQuantizedParam = 0) { - QuantizedConcatBuilder builder_(_fbb); - builder_.add_outputQuantizedParam(outputQuantizedParam); - builder_.add_inputZeroPoint(inputZeroPoint); -@@ -893,11 +882,11 @@ inline flatbuffers::Offset CreateQuantizedConcat( - - inline flatbuffers::Offset CreateQuantizedConcatDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- FusedActivation activationType = FusedActivation_kTfLiteActNone, -+ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, - int32_t axis = 0, - const std::vector *inputScale = nullptr, - const std::vector *inputZeroPoint = nullptr, -- flatbuffers::Offset outputQuantizedParam = 0) { -+ flatbuffers::Offset outputQuantizedParam = 0) { - auto inputScale__ = inputScale ? _fbb.CreateVector(*inputScale) : 0; - auto inputZeroPoint__ = inputZeroPoint ? _fbb.CreateVector(*inputZeroPoint) : 0; - return MNN::CreateQuantizedConcat( -@@ -913,14 +902,13 @@ flatbuffers::Offset CreateQuantizedConcat(flatbuffers::FlatBuff - - struct QuantizedLogisticT : public flatbuffers::NativeTable { - typedef QuantizedLogistic TableType; -- std::unique_ptr inputQuantizedParam; -- std::unique_ptr outputQuantizedParam; -- QuantizedLogisticT() { -- } -+ std::unique_ptr inputQuantizedParam{}; -+ std::unique_ptr outputQuantizedParam{}; - }; - - struct QuantizedLogistic FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedLogisticT NativeTableType; -+ typedef QuantizedLogisticBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedLogisticTypeTable(); - } -@@ -928,11 +916,11 @@ struct QuantizedLogistic FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_INPUTQUANTIZEDPARAM = 4, - VT_OUTPUTQUANTIZEDPARAM = 6 - }; -- const QuantizedParam *inputQuantizedParam() const { -- return GetPointer(VT_INPUTQUANTIZEDPARAM); -+ const MNN::QuantizedParam *inputQuantizedParam() const { -+ return GetPointer(VT_INPUTQUANTIZEDPARAM); - } -- const QuantizedParam *outputQuantizedParam() const { -- return GetPointer(VT_OUTPUTQUANTIZEDPARAM); -+ const MNN::QuantizedParam *outputQuantizedParam() const { -+ return GetPointer(VT_OUTPUTQUANTIZEDPARAM); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -948,19 +936,19 @@ struct QuantizedLogistic FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedLogisticBuilder { -+ typedef QuantizedLogistic Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { -+ void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { - fbb_.AddOffset(QuantizedLogistic::VT_INPUTQUANTIZEDPARAM, inputQuantizedParam); - } -- void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { -+ void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { - fbb_.AddOffset(QuantizedLogistic::VT_OUTPUTQUANTIZEDPARAM, outputQuantizedParam); - } - explicit QuantizedLogisticBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedLogisticBuilder &operator=(const QuantizedLogisticBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -970,8 +958,8 @@ struct QuantizedLogisticBuilder { - - inline flatbuffers::Offset CreateQuantizedLogistic( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset inputQuantizedParam = 0, -- flatbuffers::Offset outputQuantizedParam = 0) { -+ flatbuffers::Offset inputQuantizedParam = 0, -+ flatbuffers::Offset outputQuantizedParam = 0) { - QuantizedLogisticBuilder builder_(_fbb); - builder_.add_outputQuantizedParam(outputQuantizedParam); - builder_.add_inputQuantizedParam(inputQuantizedParam); -@@ -982,16 +970,13 @@ flatbuffers::Offset CreateQuantizedLogistic(flatbuffers::Flat - - struct QuantizedMatMulT : public flatbuffers::NativeTable { - typedef QuantizedMatMul TableType; -- bool transposeA; -- bool transposeB; -- QuantizedMatMulT() -- : transposeA(false), -- transposeB(false) { -- } -+ bool transposeA = false; -+ bool transposeB = false; - }; - - struct QuantizedMatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedMatMulT NativeTableType; -+ typedef QuantizedMatMulBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedMatMulTypeTable(); - } -@@ -1017,6 +1002,7 @@ struct QuantizedMatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedMatMulBuilder { -+ typedef QuantizedMatMul Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_transposeA(bool transposeA) { -@@ -1029,7 +1015,6 @@ struct QuantizedMatMulBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedMatMulBuilder &operator=(const QuantizedMatMulBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1051,34 +1036,22 @@ flatbuffers::Offset CreateQuantizedMatMul(flatbuffers::FlatBuff - - struct QuantizedMaxPoolT : public flatbuffers::NativeTable { - typedef QuantizedMaxPool TableType; -- int32_t kernelX; -- int32_t kernelY; -- ModeFormat modelFormat; -- int32_t outputActivationMax; -- int32_t outputActivationMin; -- PoolPadType padType; -- int32_t padX; -- int32_t padY; -- int32_t strideX; -- int32_t strideY; -- DataType type; -- QuantizedMaxPoolT() -- : kernelX(0), -- kernelY(0), -- modelFormat(ModeFormat_TENSORFLOW), -- outputActivationMax(0), -- outputActivationMin(0), -- padType(PoolPadType_CAFFE), -- padX(0), -- padY(0), -- strideX(0), -- strideY(0), -- type(DataType_DT_INVALID) { -- } -+ int32_t kernelX = 0; -+ int32_t kernelY = 0; -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; -+ int32_t outputActivationMax = 0; -+ int32_t outputActivationMin = 0; -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE; -+ int32_t padX = 0; -+ int32_t padY = 0; -+ int32_t strideX = 0; -+ int32_t strideY = 0; -+ MNN::DataType type = MNN::DataType_DT_INVALID; - }; - - struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedMaxPoolT NativeTableType; -+ typedef QuantizedMaxPoolBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedMaxPoolTypeTable(); - } -@@ -1101,8 +1074,8 @@ struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t kernelY() const { - return GetField(VT_KERNELY, 0); - } -- ModeFormat modelFormat() const { -- return static_cast(GetField(VT_MODELFORMAT, 0)); -+ MNN::ModeFormat modelFormat() const { -+ return static_cast(GetField(VT_MODELFORMAT, 0)); - } - int32_t outputActivationMax() const { - return GetField(VT_OUTPUTACTIVATIONMAX, 0); -@@ -1110,8 +1083,8 @@ struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t outputActivationMin() const { - return GetField(VT_OUTPUTACTIVATIONMIN, 0); - } -- PoolPadType padType() const { -- return static_cast(GetField(VT_PADTYPE, 0)); -+ MNN::PoolPadType padType() const { -+ return static_cast(GetField(VT_PADTYPE, 0)); - } - int32_t padX() const { - return GetField(VT_PADX, 0); -@@ -1125,8 +1098,8 @@ struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t strideY() const { - return GetField(VT_STRIDEY, 0); - } -- DataType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::DataType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1149,6 +1122,7 @@ struct QuantizedMaxPool FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedMaxPoolBuilder { -+ typedef QuantizedMaxPool Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_kernelX(int32_t kernelX) { -@@ -1157,7 +1131,7 @@ struct QuantizedMaxPoolBuilder { - void add_kernelY(int32_t kernelY) { - fbb_.AddElement(QuantizedMaxPool::VT_KERNELY, kernelY, 0); - } -- void add_modelFormat(ModeFormat modelFormat) { -+ void add_modelFormat(MNN::ModeFormat modelFormat) { - fbb_.AddElement(QuantizedMaxPool::VT_MODELFORMAT, static_cast(modelFormat), 0); - } - void add_outputActivationMax(int32_t outputActivationMax) { -@@ -1166,7 +1140,7 @@ struct QuantizedMaxPoolBuilder { - void add_outputActivationMin(int32_t outputActivationMin) { - fbb_.AddElement(QuantizedMaxPool::VT_OUTPUTACTIVATIONMIN, outputActivationMin, 0); - } -- void add_padType(PoolPadType padType) { -+ void add_padType(MNN::PoolPadType padType) { - fbb_.AddElement(QuantizedMaxPool::VT_PADTYPE, static_cast(padType), 0); - } - void add_padX(int32_t padX) { -@@ -1181,14 +1155,13 @@ struct QuantizedMaxPoolBuilder { - void add_strideY(int32_t strideY) { - fbb_.AddElement(QuantizedMaxPool::VT_STRIDEY, strideY, 0); - } -- void add_type(DataType type) { -+ void add_type(MNN::DataType type) { - fbb_.AddElement(QuantizedMaxPool::VT_TYPE, static_cast(type), 0); - } - explicit QuantizedMaxPoolBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedMaxPoolBuilder &operator=(const QuantizedMaxPoolBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1200,15 +1173,15 @@ inline flatbuffers::Offset CreateQuantizedMaxPool( - flatbuffers::FlatBufferBuilder &_fbb, - int32_t kernelX = 0, - int32_t kernelY = 0, -- ModeFormat modelFormat = ModeFormat_TENSORFLOW, -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, - int32_t outputActivationMax = 0, - int32_t outputActivationMin = 0, -- PoolPadType padType = PoolPadType_CAFFE, -+ MNN::PoolPadType padType = MNN::PoolPadType_CAFFE, - int32_t padX = 0, - int32_t padY = 0, - int32_t strideX = 0, - int32_t strideY = 0, -- DataType type = DataType_DT_INVALID) { -+ MNN::DataType type = MNN::DataType_DT_INVALID) { - QuantizedMaxPoolBuilder builder_(_fbb); - builder_.add_type(type); - builder_.add_strideY(strideY); -@@ -1228,22 +1201,20 @@ flatbuffers::Offset CreateQuantizedMaxPool(flatbuffers::FlatBu - - struct QuantizedReluT : public flatbuffers::NativeTable { - typedef QuantizedRelu TableType; -- DataType type; -- QuantizedReluT() -- : type(DataType_DT_INVALID) { -- } -+ MNN::DataType type = MNN::DataType_DT_INVALID; - }; - - struct QuantizedRelu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedReluT NativeTableType; -+ typedef QuantizedReluBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedReluTypeTable(); - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TYPE = 4 - }; -- DataType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::DataType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1256,16 +1227,16 @@ struct QuantizedRelu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedReluBuilder { -+ typedef QuantizedRelu Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_type(DataType type) { -+ void add_type(MNN::DataType type) { - fbb_.AddElement(QuantizedRelu::VT_TYPE, static_cast(type), 0); - } - explicit QuantizedReluBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedReluBuilder &operator=(const QuantizedReluBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1275,7 +1246,7 @@ struct QuantizedReluBuilder { - - inline flatbuffers::Offset CreateQuantizedRelu( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType type = DataType_DT_INVALID) { -+ MNN::DataType type = MNN::DataType_DT_INVALID) { - QuantizedReluBuilder builder_(_fbb); - builder_.add_type(type); - return builder_.Finish(); -@@ -1285,22 +1256,20 @@ flatbuffers::Offset CreateQuantizedRelu(flatbuffers::FlatBufferBu - - struct QuantizedRelu6T : public flatbuffers::NativeTable { - typedef QuantizedRelu6 TableType; -- DataType type; -- QuantizedRelu6T() -- : type(DataType_DT_INVALID) { -- } -+ MNN::DataType type = MNN::DataType_DT_INVALID; - }; - - struct QuantizedRelu6 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedRelu6T NativeTableType; -+ typedef QuantizedRelu6Builder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedRelu6TypeTable(); - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TYPE = 4 - }; -- DataType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::DataType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1313,16 +1282,16 @@ struct QuantizedRelu6 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedRelu6Builder { -+ typedef QuantizedRelu6 Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_type(DataType type) { -+ void add_type(MNN::DataType type) { - fbb_.AddElement(QuantizedRelu6::VT_TYPE, static_cast(type), 0); - } - explicit QuantizedRelu6Builder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedRelu6Builder &operator=(const QuantizedRelu6Builder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1332,7 +1301,7 @@ struct QuantizedRelu6Builder { - - inline flatbuffers::Offset CreateQuantizedRelu6( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType type = DataType_DT_INVALID) { -+ MNN::DataType type = MNN::DataType_DT_INVALID) { - QuantizedRelu6Builder builder_(_fbb); - builder_.add_type(type); - return builder_.Finish(); -@@ -1342,15 +1311,13 @@ flatbuffers::Offset CreateQuantizedRelu6(flatbuffers::FlatBuffer - - struct QuantizedReshapeT : public flatbuffers::NativeTable { - typedef QuantizedReshape TableType; -- std::vector dims; -- ModeFormat modelFormat; -- QuantizedReshapeT() -- : modelFormat(ModeFormat_TENSORFLOW) { -- } -+ std::vector dims{}; -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; - }; - - struct QuantizedReshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedReshapeT NativeTableType; -+ typedef QuantizedReshapeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedReshapeTypeTable(); - } -@@ -1361,8 +1328,8 @@ struct QuantizedReshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *dims() const { - return GetPointer *>(VT_DIMS); - } -- ModeFormat modelFormat() const { -- return static_cast(GetField(VT_MODELFORMAT, 0)); -+ MNN::ModeFormat modelFormat() const { -+ return static_cast(GetField(VT_MODELFORMAT, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1377,19 +1344,19 @@ struct QuantizedReshape FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedReshapeBuilder { -+ typedef QuantizedReshape Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_dims(flatbuffers::Offset> dims) { - fbb_.AddOffset(QuantizedReshape::VT_DIMS, dims); - } -- void add_modelFormat(ModeFormat modelFormat) { -+ void add_modelFormat(MNN::ModeFormat modelFormat) { - fbb_.AddElement(QuantizedReshape::VT_MODELFORMAT, static_cast(modelFormat), 0); - } - explicit QuantizedReshapeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedReshapeBuilder &operator=(const QuantizedReshapeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1400,7 +1367,7 @@ struct QuantizedReshapeBuilder { - inline flatbuffers::Offset CreateQuantizedReshape( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> dims = 0, -- ModeFormat modelFormat = ModeFormat_TENSORFLOW) { -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW) { - QuantizedReshapeBuilder builder_(_fbb); - builder_.add_dims(dims); - builder_.add_modelFormat(modelFormat); -@@ -1410,7 +1377,7 @@ inline flatbuffers::Offset CreateQuantizedReshape( - inline flatbuffers::Offset CreateQuantizedReshapeDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *dims = nullptr, -- ModeFormat modelFormat = ModeFormat_TENSORFLOW) { -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW) { - auto dims__ = dims ? _fbb.CreateVector(*dims) : 0; - return MNN::CreateQuantizedReshape( - _fbb, -@@ -1422,16 +1389,13 @@ flatbuffers::Offset CreateQuantizedReshape(flatbuffers::FlatBu - - struct QuantizedSoftmaxT : public flatbuffers::NativeTable { - typedef QuantizedSoftmax TableType; -- float beta; -- float inputScale; -- QuantizedSoftmaxT() -- : beta(0.0f), -- inputScale(0.0f) { -- } -+ float beta = 0.0f; -+ float inputScale = 0.0f; - }; - - struct QuantizedSoftmax FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizedSoftmaxT NativeTableType; -+ typedef QuantizedSoftmaxBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizedSoftmaxTypeTable(); - } -@@ -1457,6 +1421,7 @@ struct QuantizedSoftmax FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizedSoftmaxBuilder { -+ typedef QuantizedSoftmax Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_beta(float beta) { -@@ -1469,7 +1434,6 @@ struct QuantizedSoftmaxBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizedSoftmaxBuilder &operator=(const QuantizedSoftmaxBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1491,18 +1455,14 @@ flatbuffers::Offset CreateQuantizedSoftmax(flatbuffers::FlatBu - - struct QuantizeV2T : public flatbuffers::NativeTable { - typedef QuantizeV2 TableType; -- DataType type; -- QuantizeMode mode; -- QuantizeRoundMode roundMode; -- QuantizeV2T() -- : type(DataType_DT_INVALID), -- mode(QuantizeMode_MIN_COMBINED), -- roundMode(QuantizeRoundMode_HALF_AWAY_FROM_ZERO) { -- } -+ MNN::DataType type = MNN::DataType_DT_INVALID; -+ MNN::QuantizeMode mode = MNN::QuantizeMode_MIN_COMBINED; -+ MNN::QuantizeRoundMode roundMode = MNN::QuantizeRoundMode_HALF_AWAY_FROM_ZERO; - }; - - struct QuantizeV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizeV2T NativeTableType; -+ typedef QuantizeV2Builder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizeV2TypeTable(); - } -@@ -1511,14 +1471,14 @@ struct QuantizeV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_MODE = 6, - VT_ROUNDMODE = 8 - }; -- DataType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::DataType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } -- QuantizeMode mode() const { -- return static_cast(GetField(VT_MODE, 0)); -+ MNN::QuantizeMode mode() const { -+ return static_cast(GetField(VT_MODE, 0)); - } -- QuantizeRoundMode roundMode() const { -- return static_cast(GetField(VT_ROUNDMODE, 0)); -+ MNN::QuantizeRoundMode roundMode() const { -+ return static_cast(GetField(VT_ROUNDMODE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1533,22 +1493,22 @@ struct QuantizeV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizeV2Builder { -+ typedef QuantizeV2 Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_type(DataType type) { -+ void add_type(MNN::DataType type) { - fbb_.AddElement(QuantizeV2::VT_TYPE, static_cast(type), 0); - } -- void add_mode(QuantizeMode mode) { -+ void add_mode(MNN::QuantizeMode mode) { - fbb_.AddElement(QuantizeV2::VT_MODE, static_cast(mode), 0); - } -- void add_roundMode(QuantizeRoundMode roundMode) { -+ void add_roundMode(MNN::QuantizeRoundMode roundMode) { - fbb_.AddElement(QuantizeV2::VT_ROUNDMODE, static_cast(roundMode), 0); - } - explicit QuantizeV2Builder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizeV2Builder &operator=(const QuantizeV2Builder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1558,9 +1518,9 @@ struct QuantizeV2Builder { - - inline flatbuffers::Offset CreateQuantizeV2( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType type = DataType_DT_INVALID, -- QuantizeMode mode = QuantizeMode_MIN_COMBINED, -- QuantizeRoundMode roundMode = QuantizeRoundMode_HALF_AWAY_FROM_ZERO) { -+ MNN::DataType type = MNN::DataType_DT_INVALID, -+ MNN::QuantizeMode mode = MNN::QuantizeMode_MIN_COMBINED, -+ MNN::QuantizeRoundMode roundMode = MNN::QuantizeRoundMode_HALF_AWAY_FROM_ZERO) { - QuantizeV2Builder builder_(_fbb); - builder_.add_type(type); - builder_.add_roundMode(roundMode); -@@ -1572,12 +1532,11 @@ flatbuffers::Offset CreateQuantizeV2(flatbuffers::FlatBufferBuilder - - struct RequantizationRangeT : public flatbuffers::NativeTable { - typedef RequantizationRange TableType; -- RequantizationRangeT() { -- } - }; - - struct RequantizationRange FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RequantizationRangeT NativeTableType; -+ typedef RequantizationRangeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return RequantizationRangeTypeTable(); - } -@@ -1591,13 +1550,13 @@ struct RequantizationRange FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table - }; - - struct RequantizationRangeBuilder { -+ typedef RequantizationRange Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit RequantizationRangeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- RequantizationRangeBuilder &operator=(const RequantizationRangeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1615,12 +1574,11 @@ flatbuffers::Offset CreateRequantizationRange(flatbuffers:: - - struct RequantizeT : public flatbuffers::NativeTable { - typedef Requantize TableType; -- RequantizeT() { -- } - }; - - struct Requantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RequantizeT NativeTableType; -+ typedef RequantizeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return RequantizeTypeTable(); - } -@@ -1634,13 +1592,13 @@ struct Requantize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct RequantizeBuilder { -+ typedef Requantize Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit RequantizeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- RequantizeBuilder &operator=(const RequantizeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1658,35 +1616,26 @@ flatbuffers::Offset CreateRequantize(flatbuffers::FlatBufferBuilder - - struct TfQuantizedConv2DT : public flatbuffers::NativeTable { - typedef TfQuantizedConv2D TableType; -- std::vector bias; -- bool biasflag; -- std::unique_ptr common; -- std::vector weight; -- FusedActivation activationType; -- int32_t multiplier; -- int32_t outMax; -- int32_t outMin; -- int32_t shift; -- std::unique_ptr biasQuantizedParam; -- int32_t depthMultiplier; -- std::unique_ptr filterQuantizedParam; -- std::unique_ptr inputQuantizedParam; -- ModeFormat modelFormat; -- std::unique_ptr outputQuantizedParam; -- TfQuantizedConv2DT() -- : biasflag(false), -- activationType(FusedActivation_kTfLiteActNone), -- multiplier(0), -- outMax(0), -- outMin(0), -- shift(0), -- depthMultiplier(0), -- modelFormat(ModeFormat_TENSORFLOW) { -- } -+ std::vector bias{}; -+ bool biasflag = false; -+ std::unique_ptr common{}; -+ std::vector weight{}; -+ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone; -+ int32_t multiplier = 0; -+ int32_t outMax = 0; -+ int32_t outMin = 0; -+ int32_t shift = 0; -+ std::unique_ptr biasQuantizedParam{}; -+ int32_t depthMultiplier = 0; -+ std::unique_ptr filterQuantizedParam{}; -+ std::unique_ptr inputQuantizedParam{}; -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW; -+ std::unique_ptr outputQuantizedParam{}; - }; - - struct TfQuantizedConv2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TfQuantizedConv2DT NativeTableType; -+ typedef TfQuantizedConv2DBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return TfQuantizedConv2DTypeTable(); - } -@@ -1713,14 +1662,14 @@ struct TfQuantizedConv2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - bool biasflag() const { - return GetField(VT_BIASFLAG, 0) != 0; - } -- const Convolution2DCommon *common() const { -- return GetPointer(VT_COMMON); -+ const MNN::Convolution2DCommon *common() const { -+ return GetPointer(VT_COMMON); - } - const flatbuffers::Vector *weight() const { - return GetPointer *>(VT_WEIGHT); - } -- FusedActivation activationType() const { -- return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); -+ MNN::FusedActivation activationType() const { -+ return static_cast(GetField(VT_ACTIVATIONTYPE, 0)); - } - int32_t multiplier() const { - return GetField(VT_MULTIPLIER, 0); -@@ -1734,23 +1683,23 @@ struct TfQuantizedConv2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t shift() const { - return GetField(VT_SHIFT, 0); - } -- const QuantizedParam *biasQuantizedParam() const { -- return GetPointer(VT_BIASQUANTIZEDPARAM); -+ const MNN::QuantizedParam *biasQuantizedParam() const { -+ return GetPointer(VT_BIASQUANTIZEDPARAM); - } - int32_t depthMultiplier() const { - return GetField(VT_DEPTHMULTIPLIER, 0); - } -- const QuantizedParam *filterQuantizedParam() const { -- return GetPointer(VT_FILTERQUANTIZEDPARAM); -+ const MNN::QuantizedParam *filterQuantizedParam() const { -+ return GetPointer(VT_FILTERQUANTIZEDPARAM); - } -- const QuantizedParam *inputQuantizedParam() const { -- return GetPointer(VT_INPUTQUANTIZEDPARAM); -+ const MNN::QuantizedParam *inputQuantizedParam() const { -+ return GetPointer(VT_INPUTQUANTIZEDPARAM); - } -- ModeFormat modelFormat() const { -- return static_cast(GetField(VT_MODELFORMAT, 0)); -+ MNN::ModeFormat modelFormat() const { -+ return static_cast(GetField(VT_MODELFORMAT, 0)); - } -- const QuantizedParam *outputQuantizedParam() const { -- return GetPointer(VT_OUTPUTQUANTIZEDPARAM); -+ const MNN::QuantizedParam *outputQuantizedParam() const { -+ return GetPointer(VT_OUTPUTQUANTIZEDPARAM); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1784,6 +1733,7 @@ struct TfQuantizedConv2D FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct TfQuantizedConv2DBuilder { -+ typedef TfQuantizedConv2D Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_bias(flatbuffers::Offset> bias) { -@@ -1792,13 +1742,13 @@ struct TfQuantizedConv2DBuilder { - void add_biasflag(bool biasflag) { - fbb_.AddElement(TfQuantizedConv2D::VT_BIASFLAG, static_cast(biasflag), 0); - } -- void add_common(flatbuffers::Offset common) { -+ void add_common(flatbuffers::Offset common) { - fbb_.AddOffset(TfQuantizedConv2D::VT_COMMON, common); - } - void add_weight(flatbuffers::Offset> weight) { - fbb_.AddOffset(TfQuantizedConv2D::VT_WEIGHT, weight); - } -- void add_activationType(FusedActivation activationType) { -+ void add_activationType(MNN::FusedActivation activationType) { - fbb_.AddElement(TfQuantizedConv2D::VT_ACTIVATIONTYPE, static_cast(activationType), 0); - } - void add_multiplier(int32_t multiplier) { -@@ -1813,29 +1763,28 @@ struct TfQuantizedConv2DBuilder { - void add_shift(int32_t shift) { - fbb_.AddElement(TfQuantizedConv2D::VT_SHIFT, shift, 0); - } -- void add_biasQuantizedParam(flatbuffers::Offset biasQuantizedParam) { -+ void add_biasQuantizedParam(flatbuffers::Offset biasQuantizedParam) { - fbb_.AddOffset(TfQuantizedConv2D::VT_BIASQUANTIZEDPARAM, biasQuantizedParam); - } - void add_depthMultiplier(int32_t depthMultiplier) { - fbb_.AddElement(TfQuantizedConv2D::VT_DEPTHMULTIPLIER, depthMultiplier, 0); - } -- void add_filterQuantizedParam(flatbuffers::Offset filterQuantizedParam) { -+ void add_filterQuantizedParam(flatbuffers::Offset filterQuantizedParam) { - fbb_.AddOffset(TfQuantizedConv2D::VT_FILTERQUANTIZEDPARAM, filterQuantizedParam); - } -- void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { -+ void add_inputQuantizedParam(flatbuffers::Offset inputQuantizedParam) { - fbb_.AddOffset(TfQuantizedConv2D::VT_INPUTQUANTIZEDPARAM, inputQuantizedParam); - } -- void add_modelFormat(ModeFormat modelFormat) { -+ void add_modelFormat(MNN::ModeFormat modelFormat) { - fbb_.AddElement(TfQuantizedConv2D::VT_MODELFORMAT, static_cast(modelFormat), 0); - } -- void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { -+ void add_outputQuantizedParam(flatbuffers::Offset outputQuantizedParam) { - fbb_.AddOffset(TfQuantizedConv2D::VT_OUTPUTQUANTIZEDPARAM, outputQuantizedParam); - } - explicit TfQuantizedConv2DBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- TfQuantizedConv2DBuilder &operator=(const TfQuantizedConv2DBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1847,19 +1796,19 @@ inline flatbuffers::Offset CreateTfQuantizedConv2D( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> bias = 0, - bool biasflag = false, -- flatbuffers::Offset common = 0, -+ flatbuffers::Offset common = 0, - flatbuffers::Offset> weight = 0, -- FusedActivation activationType = FusedActivation_kTfLiteActNone, -+ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, - int32_t multiplier = 0, - int32_t outMax = 0, - int32_t outMin = 0, - int32_t shift = 0, -- flatbuffers::Offset biasQuantizedParam = 0, -+ flatbuffers::Offset biasQuantizedParam = 0, - int32_t depthMultiplier = 0, -- flatbuffers::Offset filterQuantizedParam = 0, -- flatbuffers::Offset inputQuantizedParam = 0, -- ModeFormat modelFormat = ModeFormat_TENSORFLOW, -- flatbuffers::Offset outputQuantizedParam = 0) { -+ flatbuffers::Offset filterQuantizedParam = 0, -+ flatbuffers::Offset inputQuantizedParam = 0, -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, -+ flatbuffers::Offset outputQuantizedParam = 0) { - TfQuantizedConv2DBuilder builder_(_fbb); - builder_.add_outputQuantizedParam(outputQuantizedParam); - builder_.add_inputQuantizedParam(inputQuantizedParam); -@@ -1883,19 +1832,19 @@ inline flatbuffers::Offset CreateTfQuantizedConv2DDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *bias = nullptr, - bool biasflag = false, -- flatbuffers::Offset common = 0, -+ flatbuffers::Offset common = 0, - const std::vector *weight = nullptr, -- FusedActivation activationType = FusedActivation_kTfLiteActNone, -+ MNN::FusedActivation activationType = MNN::FusedActivation_kTfLiteActNone, - int32_t multiplier = 0, - int32_t outMax = 0, - int32_t outMin = 0, - int32_t shift = 0, -- flatbuffers::Offset biasQuantizedParam = 0, -+ flatbuffers::Offset biasQuantizedParam = 0, - int32_t depthMultiplier = 0, -- flatbuffers::Offset filterQuantizedParam = 0, -- flatbuffers::Offset inputQuantizedParam = 0, -- ModeFormat modelFormat = ModeFormat_TENSORFLOW, -- flatbuffers::Offset outputQuantizedParam = 0) { -+ flatbuffers::Offset filterQuantizedParam = 0, -+ flatbuffers::Offset inputQuantizedParam = 0, -+ MNN::ModeFormat modelFormat = MNN::ModeFormat_TENSORFLOW, -+ flatbuffers::Offset outputQuantizedParam = 0) { - auto bias__ = bias ? _fbb.CreateVector(*bias) : 0; - auto weight__ = weight ? _fbb.CreateVector(*weight) : 0; - return MNN::CreateTfQuantizedConv2D( -@@ -1920,16 +1869,16 @@ inline flatbuffers::Offset CreateTfQuantizedConv2DDirect( - flatbuffers::Offset CreateTfQuantizedConv2D(flatbuffers::FlatBufferBuilder &_fbb, const TfQuantizedConv2DT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); - - inline QuantizedParamT *QuantizedParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedParam::UnPackTo(QuantizedParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = zeroPoint(); _o->zeroPoint = _e; }; -- { auto _e = scale(); _o->scale = _e; }; -+ { auto _e = zeroPoint(); _o->zeroPoint = _e; } -+ { auto _e = scale(); _o->scale = _e; } - } - - inline flatbuffers::Offset QuantizedParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -1949,18 +1898,18 @@ inline flatbuffers::Offset CreateQuantizedParam(flatbuffers::Fla - } - - inline QuantizedAddT *QuantizedAdd::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedAddT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedAddT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedAdd::UnPackTo(QuantizedAddT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = activationType(); _o->activationType = _e; }; -- { auto _e = input1QuantizedParam(); if (_e) _o->input1QuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = input2QuantizedParam(); if (_e) _o->input2QuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = activationType(); _o->activationType = _e; } -+ { auto _e = input1QuantizedParam(); if (_e) _o->input1QuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = input2QuantizedParam(); if (_e) _o->input2QuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset QuantizedAdd::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedAddT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -1984,18 +1933,18 @@ inline flatbuffers::Offset CreateQuantizedAdd(flatbuffers::FlatBuf - } - - inline DequantizeT *Dequantize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new DequantizeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new DequantizeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Dequantize::UnPackTo(DequantizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = mode(); _o->mode = _e; }; -- { auto _e = modelFormat(); _o->modelFormat = _e; }; -- { auto _e = type(); _o->type = _e; }; -+ { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = mode(); _o->mode = _e; } -+ { auto _e = modelFormat(); _o->modelFormat = _e; } -+ { auto _e = type(); _o->type = _e; } - } - - inline flatbuffers::Offset Dequantize::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DequantizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2019,25 +1968,25 @@ inline flatbuffers::Offset CreateDequantize(flatbuffers::FlatBufferB - } - - inline QuantizedAvgPoolT *QuantizedAvgPool::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedAvgPoolT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedAvgPoolT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedAvgPool::UnPackTo(QuantizedAvgPoolT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = kernelX(); _o->kernelX = _e; }; -- { auto _e = kernelY(); _o->kernelY = _e; }; -- { auto _e = modelFormat(); _o->modelFormat = _e; }; -- { auto _e = outputActivationMax(); _o->outputActivationMax = _e; }; -- { auto _e = outputActivationMin(); _o->outputActivationMin = _e; }; -- { auto _e = padType(); _o->padType = _e; }; -- { auto _e = padX(); _o->padX = _e; }; -- { auto _e = padY(); _o->padY = _e; }; -- { auto _e = strideX(); _o->strideX = _e; }; -- { auto _e = strideY(); _o->strideY = _e; }; -- { auto _e = type(); _o->type = _e; }; -+ { auto _e = kernelX(); _o->kernelX = _e; } -+ { auto _e = kernelY(); _o->kernelY = _e; } -+ { auto _e = modelFormat(); _o->modelFormat = _e; } -+ { auto _e = outputActivationMax(); _o->outputActivationMax = _e; } -+ { auto _e = outputActivationMin(); _o->outputActivationMin = _e; } -+ { auto _e = padType(); _o->padType = _e; } -+ { auto _e = padX(); _o->padX = _e; } -+ { auto _e = padY(); _o->padY = _e; } -+ { auto _e = strideX(); _o->strideX = _e; } -+ { auto _e = strideY(); _o->strideY = _e; } -+ { auto _e = type(); _o->type = _e; } - } - - inline flatbuffers::Offset QuantizedAvgPool::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedAvgPoolT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2075,19 +2024,19 @@ inline flatbuffers::Offset CreateQuantizedAvgPool(flatbuffers: - } - - inline QuantizedBiasAddT *QuantizedBiasAdd::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedBiasAddT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedBiasAddT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedBiasAdd::UnPackTo(QuantizedBiasAddT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; -- { auto _e = inputType(); _o->inputType = _e; }; -- { auto _e = max(); _o->max = _e; }; -- { auto _e = min(); _o->min = _e; }; -- { auto _e = outputType(); _o->outputType = _e; }; -+ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } -+ { auto _e = inputType(); _o->inputType = _e; } -+ { auto _e = max(); _o->max = _e; } -+ { auto _e = min(); _o->min = _e; } -+ { auto _e = outputType(); _o->outputType = _e; } - } - - inline flatbuffers::Offset QuantizedBiasAdd::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedBiasAddT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2113,19 +2062,19 @@ inline flatbuffers::Offset CreateQuantizedBiasAdd(flatbuffers: - } - - inline QuantizedConcatT *QuantizedConcat::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedConcatT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedConcatT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedConcat::UnPackTo(QuantizedConcatT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = activationType(); _o->activationType = _e; }; -- { auto _e = axis(); _o->axis = _e; }; -- { auto _e = inputScale(); if (_e) { _o->inputScale.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputScale[_i] = _e->Get(_i); } } }; -- { auto _e = inputZeroPoint(); if (_e) { _o->inputZeroPoint.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputZeroPoint[_i] = _e->Get(_i); } } }; -- { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = activationType(); _o->activationType = _e; } -+ { auto _e = axis(); _o->axis = _e; } -+ { auto _e = inputScale(); if (_e) { _o->inputScale.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputScale[_i] = _e->Get(_i); } } } -+ { auto _e = inputZeroPoint(); if (_e) { _o->inputZeroPoint.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputZeroPoint[_i] = _e->Get(_i); } } } -+ { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset QuantizedConcat::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedConcatT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2151,16 +2100,16 @@ inline flatbuffers::Offset CreateQuantizedConcat(flatbuffers::F - } - - inline QuantizedLogisticT *QuantizedLogistic::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedLogisticT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedLogisticT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedLogistic::UnPackTo(QuantizedLogisticT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset QuantizedLogistic::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedLogisticT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2180,16 +2129,16 @@ inline flatbuffers::Offset CreateQuantizedLogistic(flatbuffer - } - - inline QuantizedMatMulT *QuantizedMatMul::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedMatMulT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedMatMulT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedMatMul::UnPackTo(QuantizedMatMulT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = transposeA(); _o->transposeA = _e; }; -- { auto _e = transposeB(); _o->transposeB = _e; }; -+ { auto _e = transposeA(); _o->transposeA = _e; } -+ { auto _e = transposeB(); _o->transposeB = _e; } - } - - inline flatbuffers::Offset QuantizedMatMul::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedMatMulT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2209,25 +2158,25 @@ inline flatbuffers::Offset CreateQuantizedMatMul(flatbuffers::F - } - - inline QuantizedMaxPoolT *QuantizedMaxPool::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedMaxPoolT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedMaxPoolT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedMaxPool::UnPackTo(QuantizedMaxPoolT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = kernelX(); _o->kernelX = _e; }; -- { auto _e = kernelY(); _o->kernelY = _e; }; -- { auto _e = modelFormat(); _o->modelFormat = _e; }; -- { auto _e = outputActivationMax(); _o->outputActivationMax = _e; }; -- { auto _e = outputActivationMin(); _o->outputActivationMin = _e; }; -- { auto _e = padType(); _o->padType = _e; }; -- { auto _e = padX(); _o->padX = _e; }; -- { auto _e = padY(); _o->padY = _e; }; -- { auto _e = strideX(); _o->strideX = _e; }; -- { auto _e = strideY(); _o->strideY = _e; }; -- { auto _e = type(); _o->type = _e; }; -+ { auto _e = kernelX(); _o->kernelX = _e; } -+ { auto _e = kernelY(); _o->kernelY = _e; } -+ { auto _e = modelFormat(); _o->modelFormat = _e; } -+ { auto _e = outputActivationMax(); _o->outputActivationMax = _e; } -+ { auto _e = outputActivationMin(); _o->outputActivationMin = _e; } -+ { auto _e = padType(); _o->padType = _e; } -+ { auto _e = padX(); _o->padX = _e; } -+ { auto _e = padY(); _o->padY = _e; } -+ { auto _e = strideX(); _o->strideX = _e; } -+ { auto _e = strideY(); _o->strideY = _e; } -+ { auto _e = type(); _o->type = _e; } - } - - inline flatbuffers::Offset QuantizedMaxPool::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedMaxPoolT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2265,15 +2214,15 @@ inline flatbuffers::Offset CreateQuantizedMaxPool(flatbuffers: - } - - inline QuantizedReluT *QuantizedRelu::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedReluT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedReluT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedRelu::UnPackTo(QuantizedReluT *_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 QuantizedRelu::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedReluT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2291,15 +2240,15 @@ inline flatbuffers::Offset CreateQuantizedRelu(flatbuffers::FlatB - } - - inline QuantizedRelu6T *QuantizedRelu6::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedRelu6T(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedRelu6T()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedRelu6::UnPackTo(QuantizedRelu6T *_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 QuantizedRelu6::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedRelu6T* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2317,16 +2266,16 @@ inline flatbuffers::Offset CreateQuantizedRelu6(flatbuffers::Fla - } - - inline QuantizedReshapeT *QuantizedReshape::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedReshapeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedReshapeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedReshape::UnPackTo(QuantizedReshapeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; -- { auto _e = modelFormat(); _o->modelFormat = _e; }; -+ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } -+ { auto _e = modelFormat(); _o->modelFormat = _e; } - } - - inline flatbuffers::Offset QuantizedReshape::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedReshapeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2346,16 +2295,16 @@ inline flatbuffers::Offset CreateQuantizedReshape(flatbuffers: - } - - inline QuantizedSoftmaxT *QuantizedSoftmax::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizedSoftmaxT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizedSoftmaxT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizedSoftmax::UnPackTo(QuantizedSoftmaxT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = beta(); _o->beta = _e; }; -- { auto _e = inputScale(); _o->inputScale = _e; }; -+ { auto _e = beta(); _o->beta = _e; } -+ { auto _e = inputScale(); _o->inputScale = _e; } - } - - inline flatbuffers::Offset QuantizedSoftmax::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizedSoftmaxT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2375,17 +2324,17 @@ inline flatbuffers::Offset CreateQuantizedSoftmax(flatbuffers: - } - - inline QuantizeV2T *QuantizeV2::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizeV2T(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizeV2T()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizeV2::UnPackTo(QuantizeV2T *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = type(); _o->type = _e; }; -- { auto _e = mode(); _o->mode = _e; }; -- { auto _e = roundMode(); _o->roundMode = _e; }; -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = mode(); _o->mode = _e; } -+ { auto _e = roundMode(); _o->roundMode = _e; } - } - - inline flatbuffers::Offset QuantizeV2::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeV2T* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2407,9 +2356,9 @@ inline flatbuffers::Offset CreateQuantizeV2(flatbuffers::FlatBufferB - } - - inline RequantizationRangeT *RequantizationRange::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new RequantizationRangeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new RequantizationRangeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void RequantizationRange::UnPackTo(RequantizationRangeT *_o, const flatbuffers::resolver_function_t *_resolver) const { -@@ -2430,9 +2379,9 @@ inline flatbuffers::Offset CreateRequantizationRange(flatbu - } - - inline RequantizeT *Requantize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new RequantizeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new RequantizeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Requantize::UnPackTo(RequantizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { -@@ -2453,29 +2402,29 @@ inline flatbuffers::Offset CreateRequantize(flatbuffers::FlatBufferB - } - - inline TfQuantizedConv2DT *TfQuantizedConv2D::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new TfQuantizedConv2DT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new TfQuantizedConv2DT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void TfQuantizedConv2D::UnPackTo(TfQuantizedConv2DT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; -- { auto _e = biasflag(); _o->biasflag = _e; }; -- { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; -- { auto _e = activationType(); _o->activationType = _e; }; -- { auto _e = multiplier(); _o->multiplier = _e; }; -- { auto _e = outMax(); _o->outMax = _e; }; -- { auto _e = outMin(); _o->outMin = _e; }; -- { auto _e = shift(); _o->shift = _e; }; -- { auto _e = biasQuantizedParam(); if (_e) _o->biasQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = depthMultiplier(); _o->depthMultiplier = _e; }; -- { auto _e = filterQuantizedParam(); if (_e) _o->filterQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = modelFormat(); _o->modelFormat = _e; }; -- { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } -+ { auto _e = biasflag(); _o->biasflag = _e; } -+ { auto _e = common(); if (_e) _o->common = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->weight.begin()); } } -+ { auto _e = activationType(); _o->activationType = _e; } -+ { auto _e = multiplier(); _o->multiplier = _e; } -+ { auto _e = outMax(); _o->outMax = _e; } -+ { auto _e = outMin(); _o->outMin = _e; } -+ { auto _e = shift(); _o->shift = _e; } -+ { auto _e = biasQuantizedParam(); if (_e) _o->biasQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = depthMultiplier(); _o->depthMultiplier = _e; } -+ { auto _e = filterQuantizedParam(); if (_e) _o->filterQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = inputQuantizedParam(); if (_e) _o->inputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = modelFormat(); _o->modelFormat = _e; } -+ { auto _e = outputQuantizedParam(); if (_e) _o->outputQuantizedParam = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset TfQuantizedConv2D::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TfQuantizedConv2DT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -2531,7 +2480,7 @@ inline const flatbuffers::TypeTable *FusedActivationTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- FusedActivationTypeTable -+ MNN::FusedActivationTypeTable - }; - static const char * const names[] = { - "kTfLiteActNone", -@@ -2543,7 +2492,7 @@ inline const flatbuffers::TypeTable *FusedActivationTypeTable() { - "kTfLiteActSigmoid" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 7, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 7, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2554,14 +2503,14 @@ inline const flatbuffers::TypeTable *ModeFormatTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ModeFormatTypeTable -+ MNN::ModeFormatTypeTable - }; - static const char * const names[] = { - "TENSORFLOW", - "TFLITE" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2573,7 +2522,7 @@ inline const flatbuffers::TypeTable *QuantizeModeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- QuantizeModeTypeTable -+ MNN::QuantizeModeTypeTable - }; - static const char * const names[] = { - "MIN_COMBINED", -@@ -2581,7 +2530,7 @@ inline const flatbuffers::TypeTable *QuantizeModeTypeTable() { - "SCALED" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2592,14 +2541,14 @@ inline const flatbuffers::TypeTable *QuantizeRoundModeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- QuantizeRoundModeTypeTable -+ MNN::QuantizeRoundModeTypeTable - }; - static const char * const names[] = { - "HALF_AWAY_FROM_ZERO", - "HALF_TO_EVEN" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2614,7 +2563,7 @@ inline const flatbuffers::TypeTable *QuantizedParamTypeTable() { - "scale" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -2627,8 +2576,8 @@ inline const flatbuffers::TypeTable *QuantizedAddTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- FusedActivationTypeTable, -- QuantizedParamTypeTable -+ MNN::FusedActivationTypeTable, -+ MNN::QuantizedParamTypeTable - }; - static const char * const names[] = { - "activationType", -@@ -2637,7 +2586,7 @@ inline const flatbuffers::TypeTable *QuantizedAddTypeTable() { - "outputQuantizedParam" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2650,10 +2599,10 @@ inline const flatbuffers::TypeTable *DequantizeTypeTable() { - { flatbuffers::ET_INT, 0, 3 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- QuantizedParamTypeTable, -- QuantizeModeTypeTable, -- ModeFormatTypeTable, -- DataTypeTypeTable -+ MNN::QuantizedParamTypeTable, -+ MNN::QuantizeModeTypeTable, -+ MNN::ModeFormatTypeTable, -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "inputQuantizedParam", -@@ -2662,7 +2611,7 @@ inline const flatbuffers::TypeTable *DequantizeTypeTable() { - "type" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2682,9 +2631,9 @@ inline const flatbuffers::TypeTable *QuantizedAvgPoolTypeTable() { - { flatbuffers::ET_INT, 0, 2 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ModeFormatTypeTable, -- PoolPadTypeTypeTable, -- DataTypeTypeTable -+ MNN::ModeFormatTypeTable, -+ MNN::PoolPadTypeTypeTable, -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "kernelX", -@@ -2700,7 +2649,7 @@ inline const flatbuffers::TypeTable *QuantizedAvgPoolTypeTable() { - "type" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2714,7 +2663,7 @@ inline const flatbuffers::TypeTable *QuantizedBiasAddTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "bias", -@@ -2724,7 +2673,7 @@ inline const flatbuffers::TypeTable *QuantizedBiasAddTypeTable() { - "outputType" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2738,8 +2687,8 @@ inline const flatbuffers::TypeTable *QuantizedConcatTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- FusedActivationTypeTable, -- QuantizedParamTypeTable -+ MNN::FusedActivationTypeTable, -+ MNN::QuantizedParamTypeTable - }; - static const char * const names[] = { - "activationType", -@@ -2749,7 +2698,7 @@ inline const flatbuffers::TypeTable *QuantizedConcatTypeTable() { - "outputQuantizedParam" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2760,14 +2709,14 @@ inline const flatbuffers::TypeTable *QuantizedLogisticTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- QuantizedParamTypeTable -+ MNN::QuantizedParamTypeTable - }; - static const char * const names[] = { - "inputQuantizedParam", - "outputQuantizedParam" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2782,7 +2731,7 @@ inline const flatbuffers::TypeTable *QuantizedMatMulTypeTable() { - "transposeB" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -2802,9 +2751,9 @@ inline const flatbuffers::TypeTable *QuantizedMaxPoolTypeTable() { - { flatbuffers::ET_INT, 0, 2 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ModeFormatTypeTable, -- PoolPadTypeTypeTable, -- DataTypeTypeTable -+ MNN::ModeFormatTypeTable, -+ MNN::PoolPadTypeTypeTable, -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "kernelX", -@@ -2820,7 +2769,7 @@ inline const flatbuffers::TypeTable *QuantizedMaxPoolTypeTable() { - "type" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2830,13 +2779,13 @@ inline const flatbuffers::TypeTable *QuantizedReluTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "type" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2846,13 +2795,13 @@ inline const flatbuffers::TypeTable *QuantizedRelu6TypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "type" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2863,14 +2812,14 @@ inline const flatbuffers::TypeTable *QuantizedReshapeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ModeFormatTypeTable -+ MNN::ModeFormatTypeTable - }; - static const char * const names[] = { - "dims", - "modelFormat" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -2885,7 +2834,7 @@ inline const flatbuffers::TypeTable *QuantizedSoftmaxTypeTable() { - "inputScale" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -2897,9 +2846,9 @@ inline const flatbuffers::TypeTable *QuantizeV2TypeTable() { - { flatbuffers::ET_CHAR, 0, 2 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable, -- QuantizeModeTypeTable, -- QuantizeRoundModeTypeTable -+ MNN::DataTypeTypeTable, -+ MNN::QuantizeModeTypeTable, -+ MNN::QuantizeRoundModeTypeTable - }; - static const char * const names[] = { - "type", -@@ -2907,21 +2856,21 @@ inline const flatbuffers::TypeTable *QuantizeV2TypeTable() { - "roundMode" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } - - inline const flatbuffers::TypeTable *RequantizationRangeTypeTable() { - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr -+ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr - }; - return &tt; - } - - inline const flatbuffers::TypeTable *RequantizeTypeTable() { - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr -+ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr - }; - return &tt; - } -@@ -2945,10 +2894,10 @@ inline const flatbuffers::TypeTable *TfQuantizedConv2DTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 2 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- Convolution2DCommonTypeTable, -- FusedActivationTypeTable, -- QuantizedParamTypeTable, -- ModeFormatTypeTable -+ MNN::Convolution2DCommonTypeTable, -+ MNN::FusedActivationTypeTable, -+ MNN::QuantizedParamTypeTable, -+ MNN::ModeFormatTypeTable - }; - static const char * const names[] = { - "bias", -@@ -2968,7 +2917,7 @@ inline const flatbuffers::TypeTable *TfQuantizedConv2DTypeTable() { - "outputQuantizedParam" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 15, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 15, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -diff --git a/schema/current/Tensor_generated.h b/schema/current/Tensor_generated.h -index 6c7c0baa..455e66e9 100644 ---- a/schema/current/Tensor_generated.h -+++ b/schema/current/Tensor_generated.h -@@ -4,21 +4,26 @@ - #ifndef FLATBUFFERS_GENERATED_TENSOR_MNN_H_ - #define FLATBUFFERS_GENERATED_TENSOR_MNN_H_ - -+#include "flatbuffers/flatbuffers.h" - - #include "Type_generated.h" - - namespace MNN { - - struct Blob; -+struct BlobBuilder; - struct BlobT; - - struct ListValue; -+struct ListValueBuilder; - struct ListValueT; - - struct Attribute; -+struct AttributeBuilder; - struct AttributeT; - - struct NamedAttrList; -+struct NamedAttrListBuilder; - struct NamedAttrListT; - - inline const flatbuffers::TypeTable *BlobTypeTable(); -@@ -29,7 +34,7 @@ inline const flatbuffers::TypeTable *AttributeTypeTable(); - - inline const flatbuffers::TypeTable *NamedAttrListTypeTable(); - --enum MNN_DATA_FORMAT { -+enum MNN_DATA_FORMAT : int8_t { - MNN_DATA_FORMAT_NCHW = 0, - MNN_DATA_FORMAT_NHWC = 1, - MNN_DATA_FORMAT_NC4HW4 = 2, -@@ -51,7 +56,7 @@ inline const MNN_DATA_FORMAT (&EnumValuesMNN_DATA_FORMAT())[5] { - } - - inline const char * const *EnumNamesMNN_DATA_FORMAT() { -- static const char * const names[] = { -+ static const char * const names[6] = { - "NCHW", - "NHWC", - "NC4HW4", -@@ -63,30 +68,27 @@ inline const char * const *EnumNamesMNN_DATA_FORMAT() { - } - - inline const char *EnumNameMNN_DATA_FORMAT(MNN_DATA_FORMAT e) { -- if (e < MNN_DATA_FORMAT_NCHW || e > MNN_DATA_FORMAT_UNKNOWN) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, MNN_DATA_FORMAT_NCHW, MNN_DATA_FORMAT_UNKNOWN)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesMNN_DATA_FORMAT()[index]; - } - - struct BlobT : public flatbuffers::NativeTable { - typedef Blob TableType; -- std::vector dims; -- MNN_DATA_FORMAT dataFormat; -- DataType dataType; -- std::vector uint8s; -- std::vector int8s; -- std::vector int32s; -- std::vector int64s; -- std::vector float32s; -- std::vector strings; -- BlobT() -- : dataFormat(MNN_DATA_FORMAT_NCHW), -- dataType(DataType_DT_FLOAT) { -- } -+ std::vector dims{}; -+ MNN::MNN_DATA_FORMAT dataFormat = MNN::MNN_DATA_FORMAT_NCHW; -+ MNN::DataType dataType = MNN::DataType_DT_FLOAT; -+ std::vector uint8s{}; -+ std::vector int8s{}; -+ std::vector int32s{}; -+ std::vector int64s{}; -+ std::vector float32s{}; -+ std::vector strings{}; - }; - - struct Blob FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef BlobT NativeTableType; -+ typedef BlobBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return BlobTypeTable(); - } -@@ -104,11 +106,11 @@ struct Blob FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::Vector *dims() const { - return GetPointer *>(VT_DIMS); - } -- MNN_DATA_FORMAT dataFormat() const { -- return static_cast(GetField(VT_DATAFORMAT, 0)); -+ MNN::MNN_DATA_FORMAT dataFormat() const { -+ return static_cast(GetField(VT_DATAFORMAT, 0)); - } -- DataType dataType() const { -- return static_cast(GetField(VT_DATATYPE, 1)); -+ MNN::DataType dataType() const { -+ return static_cast(GetField(VT_DATATYPE, 1)); - } - const flatbuffers::Vector *uint8s() const { - return GetPointer *>(VT_UINT8S); -@@ -155,15 +157,16 @@ struct Blob FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct BlobBuilder { -+ typedef Blob Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_dims(flatbuffers::Offset> dims) { - fbb_.AddOffset(Blob::VT_DIMS, dims); - } -- void add_dataFormat(MNN_DATA_FORMAT dataFormat) { -+ void add_dataFormat(MNN::MNN_DATA_FORMAT dataFormat) { - fbb_.AddElement(Blob::VT_DATAFORMAT, static_cast(dataFormat), 0); - } -- void add_dataType(DataType dataType) { -+ void add_dataType(MNN::DataType dataType) { - fbb_.AddElement(Blob::VT_DATATYPE, static_cast(dataType), 1); - } - void add_uint8s(flatbuffers::Offset> uint8s) { -@@ -188,7 +191,6 @@ struct BlobBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- BlobBuilder &operator=(const BlobBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -199,8 +201,8 @@ struct BlobBuilder { - inline flatbuffers::Offset CreateBlob( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> dims = 0, -- MNN_DATA_FORMAT dataFormat = MNN_DATA_FORMAT_NCHW, -- DataType dataType = DataType_DT_FLOAT, -+ MNN::MNN_DATA_FORMAT dataFormat = MNN::MNN_DATA_FORMAT_NCHW, -+ MNN::DataType dataType = MNN::DataType_DT_FLOAT, - flatbuffers::Offset> uint8s = 0, - flatbuffers::Offset> int8s = 0, - flatbuffers::Offset> int32s = 0, -@@ -223,8 +225,8 @@ inline flatbuffers::Offset CreateBlob( - inline flatbuffers::Offset CreateBlobDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *dims = nullptr, -- MNN_DATA_FORMAT dataFormat = MNN_DATA_FORMAT_NCHW, -- DataType dataType = DataType_DT_FLOAT, -+ MNN::MNN_DATA_FORMAT dataFormat = MNN::MNN_DATA_FORMAT_NCHW, -+ MNN::DataType dataType = MNN::DataType_DT_FLOAT, - const std::vector *uint8s = nullptr, - const std::vector *int8s = nullptr, - const std::vector *int32s = nullptr, -@@ -255,17 +257,16 @@ flatbuffers::Offset CreateBlob(flatbuffers::FlatBufferBuilder &_fbb, const - - struct ListValueT : public flatbuffers::NativeTable { - typedef ListValue TableType; -- std::vector s; -- std::vector i; -- std::vector f; -- std::vector b; -- std::vector type; -- ListValueT() { -- } -+ std::vector s{}; -+ std::vector i{}; -+ std::vector f{}; -+ std::vector b{}; -+ std::vector type{}; - }; - - struct ListValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ListValueT NativeTableType; -+ typedef ListValueBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ListValueTypeTable(); - } -@@ -312,6 +313,7 @@ struct ListValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ListValueBuilder { -+ typedef ListValue Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_s(flatbuffers::Offset>> s) { -@@ -333,7 +335,6 @@ struct ListValueBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ListValueBuilder &operator=(const ListValueBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -382,25 +383,20 @@ flatbuffers::Offset CreateListValue(flatbuffers::FlatBufferBuilder &_ - - struct AttributeT : public flatbuffers::NativeTable { - typedef Attribute TableType; -- std::string s; -- int32_t i; -- bool b; -- std::string key; -- DataType type; -- float f; -- std::unique_ptr tensor; -- std::unique_ptr list; -- std::unique_ptr func; -- AttributeT() -- : i(0), -- b(false), -- type(DataType_DT_INVALID), -- f(0.0f) { -- } -+ std::string s{}; -+ int32_t i = 0; -+ bool b = false; -+ std::string key{}; -+ MNN::DataType type = MNN::DataType_DT_INVALID; -+ float f = 0.0f; -+ std::unique_ptr tensor{}; -+ std::unique_ptr list{}; -+ std::unique_ptr func{}; - }; - - struct Attribute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AttributeT NativeTableType; -+ typedef AttributeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return AttributeTypeTable(); - } -@@ -427,20 +423,20 @@ struct Attribute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::String *key() const { - return GetPointer(VT_KEY); - } -- DataType type() const { -- return static_cast(GetField(VT_TYPE, 0)); -+ MNN::DataType type() const { -+ return static_cast(GetField(VT_TYPE, 0)); - } - float f() const { - return GetField(VT_F, 0.0f); - } -- const Blob *tensor() const { -- return GetPointer(VT_TENSOR); -+ const MNN::Blob *tensor() const { -+ return GetPointer(VT_TENSOR); - } -- const ListValue *list() const { -- return GetPointer(VT_LIST); -+ const MNN::ListValue *list() const { -+ return GetPointer(VT_LIST); - } -- const NamedAttrList *func() const { -- return GetPointer(VT_FUNC); -+ const MNN::NamedAttrList *func() const { -+ return GetPointer(VT_FUNC); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -466,6 +462,7 @@ struct Attribute FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct AttributeBuilder { -+ typedef Attribute Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_s(flatbuffers::Offset s) { -@@ -480,26 +477,25 @@ struct AttributeBuilder { - void add_key(flatbuffers::Offset key) { - fbb_.AddOffset(Attribute::VT_KEY, key); - } -- void add_type(DataType type) { -+ void add_type(MNN::DataType type) { - fbb_.AddElement(Attribute::VT_TYPE, static_cast(type), 0); - } - void add_f(float f) { - fbb_.AddElement(Attribute::VT_F, f, 0.0f); - } -- void add_tensor(flatbuffers::Offset tensor) { -+ void add_tensor(flatbuffers::Offset tensor) { - fbb_.AddOffset(Attribute::VT_TENSOR, tensor); - } -- void add_list(flatbuffers::Offset list) { -+ void add_list(flatbuffers::Offset list) { - fbb_.AddOffset(Attribute::VT_LIST, list); - } -- void add_func(flatbuffers::Offset func) { -+ void add_func(flatbuffers::Offset func) { - fbb_.AddOffset(Attribute::VT_FUNC, func); - } - explicit AttributeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- AttributeBuilder &operator=(const AttributeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -513,11 +509,11 @@ inline flatbuffers::Offset CreateAttribute( - int32_t i = 0, - bool b = false, - flatbuffers::Offset key = 0, -- DataType type = DataType_DT_INVALID, -+ MNN::DataType type = MNN::DataType_DT_INVALID, - float f = 0.0f, -- flatbuffers::Offset tensor = 0, -- flatbuffers::Offset list = 0, -- flatbuffers::Offset func = 0) { -+ flatbuffers::Offset tensor = 0, -+ flatbuffers::Offset list = 0, -+ flatbuffers::Offset func = 0) { - AttributeBuilder builder_(_fbb); - builder_.add_func(func); - builder_.add_list(list); -@@ -537,11 +533,11 @@ inline flatbuffers::Offset CreateAttributeDirect( - int32_t i = 0, - bool b = false, - const char *key = nullptr, -- DataType type = DataType_DT_INVALID, -+ MNN::DataType type = MNN::DataType_DT_INVALID, - float f = 0.0f, -- flatbuffers::Offset tensor = 0, -- flatbuffers::Offset list = 0, -- flatbuffers::Offset func = 0) { -+ flatbuffers::Offset tensor = 0, -+ flatbuffers::Offset list = 0, -+ flatbuffers::Offset func = 0) { - auto s__ = s ? _fbb.CreateString(s) : 0; - auto key__ = key ? _fbb.CreateString(key) : 0; - return MNN::CreateAttribute( -@@ -561,14 +557,13 @@ flatbuffers::Offset CreateAttribute(flatbuffers::FlatBufferBuilder &_ - - struct NamedAttrListT : public flatbuffers::NativeTable { - typedef NamedAttrList TableType; -- std::string name; -- std::vector> attr; -- NamedAttrListT() { -- } -+ std::string name{}; -+ std::vector> attr{}; - }; - - struct NamedAttrList FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef NamedAttrListT NativeTableType; -+ typedef NamedAttrListBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return NamedAttrListTypeTable(); - } -@@ -579,8 +574,8 @@ struct NamedAttrList FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - const flatbuffers::String *name() const { - return GetPointer(VT_NAME); - } -- const flatbuffers::Vector> *attr() const { -- return GetPointer> *>(VT_ATTR); -+ const flatbuffers::Vector> *attr() const { -+ return GetPointer> *>(VT_ATTR); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -597,19 +592,19 @@ struct NamedAttrList FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct NamedAttrListBuilder { -+ typedef NamedAttrList Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) { - fbb_.AddOffset(NamedAttrList::VT_NAME, name); - } -- void add_attr(flatbuffers::Offset>> attr) { -+ void add_attr(flatbuffers::Offset>> attr) { - fbb_.AddOffset(NamedAttrList::VT_ATTR, attr); - } - explicit NamedAttrListBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- NamedAttrListBuilder &operator=(const NamedAttrListBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -620,7 +615,7 @@ struct NamedAttrListBuilder { - inline flatbuffers::Offset CreateNamedAttrList( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset name = 0, -- flatbuffers::Offset>> attr = 0) { -+ flatbuffers::Offset>> attr = 0) { - NamedAttrListBuilder builder_(_fbb); - builder_.add_attr(attr); - builder_.add_name(name); -@@ -630,9 +625,9 @@ inline flatbuffers::Offset CreateNamedAttrList( - inline flatbuffers::Offset CreateNamedAttrListDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *name = nullptr, -- const std::vector> *attr = nullptr) { -+ const std::vector> *attr = nullptr) { - auto name__ = name ? _fbb.CreateString(name) : 0; -- auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; -+ auto attr__ = attr ? _fbb.CreateVector>(*attr) : 0; - return MNN::CreateNamedAttrList( - _fbb, - name__, -@@ -642,23 +637,23 @@ inline flatbuffers::Offset CreateNamedAttrListDirect( - flatbuffers::Offset CreateNamedAttrList(flatbuffers::FlatBufferBuilder &_fbb, const NamedAttrListT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); - - inline BlobT *Blob::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new BlobT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new BlobT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Blob::UnPackTo(BlobT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } }; -- { auto _e = dataFormat(); _o->dataFormat = _e; }; -- { auto _e = dataType(); _o->dataType = _e; }; -- { auto _e = uint8s(); if (_e) { _o->uint8s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->uint8s[_i] = _e->Get(_i); } } }; -- { auto _e = int8s(); if (_e) { _o->int8s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int8s[_i] = _e->Get(_i); } } }; -- { auto _e = int32s(); if (_e) { _o->int32s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int32s[_i] = _e->Get(_i); } } }; -- { auto _e = int64s(); if (_e) { _o->int64s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int64s[_i] = _e->Get(_i); } } }; -- { auto _e = float32s(); if (_e) { _o->float32s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->float32s[_i] = _e->Get(_i); } } }; -- { auto _e = strings(); if (_e) { _o->strings.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->strings[_i] = _e->Get(_i)->str(); } } }; -+ { auto _e = dims(); if (_e) { _o->dims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dims[_i] = _e->Get(_i); } } } -+ { auto _e = dataFormat(); _o->dataFormat = _e; } -+ { auto _e = dataType(); _o->dataType = _e; } -+ { auto _e = uint8s(); if (_e) { _o->uint8s.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->uint8s.begin()); } } -+ { auto _e = int8s(); if (_e) { _o->int8s.resize(_e->size()); std::copy(_e->begin(), _e->end(), _o->int8s.begin()); } } -+ { auto _e = int32s(); if (_e) { _o->int32s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int32s[_i] = _e->Get(_i); } } } -+ { auto _e = int64s(); if (_e) { _o->int64s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->int64s[_i] = _e->Get(_i); } } } -+ { auto _e = float32s(); if (_e) { _o->float32s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->float32s[_i] = _e->Get(_i); } } } -+ { auto _e = strings(); if (_e) { _o->strings.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->strings[_i] = _e->Get(_i)->str(); } } } - } - - inline flatbuffers::Offset Blob::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BlobT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -692,19 +687,19 @@ inline flatbuffers::Offset CreateBlob(flatbuffers::FlatBufferBuilder &_fbb - } - - inline ListValueT *ListValue::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ListValueT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ListValueT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void ListValue::UnPackTo(ListValueT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = s(); if (_e) { _o->s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->s[_i] = _e->Get(_i)->str(); } } }; -- { auto _e = i(); if (_e) { _o->i.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->i[_i] = _e->Get(_i); } } }; -- { auto _e = f(); if (_e) { _o->f.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->f[_i] = _e->Get(_i); } } }; -- { auto _e = b(); if (_e) { _o->b.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->b[_i] = _e->Get(_i) != 0; } } }; -- { auto _e = type(); if (_e) { _o->type.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->type[_i] = static_cast(_e->Get(_i)); } } }; -+ { auto _e = s(); if (_e) { _o->s.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->s[_i] = _e->Get(_i)->str(); } } } -+ { auto _e = i(); if (_e) { _o->i.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->i[_i] = _e->Get(_i); } } } -+ { auto _e = f(); if (_e) { _o->f.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->f[_i] = _e->Get(_i); } } } -+ { auto _e = b(); if (_e) { _o->b.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->b[_i] = _e->Get(_i) != 0; } } } -+ { auto _e = type(); if (_e) { _o->type.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->type[_i] = static_cast(_e->Get(_i)); } } } - } - - inline flatbuffers::Offset ListValue::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ListValueT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -730,23 +725,23 @@ inline flatbuffers::Offset CreateListValue(flatbuffers::FlatBufferBui - } - - inline AttributeT *Attribute::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new AttributeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new AttributeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Attribute::UnPackTo(AttributeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = s(); if (_e) _o->s = _e->str(); }; -- { auto _e = i(); _o->i = _e; }; -- { auto _e = b(); _o->b = _e; }; -- { auto _e = key(); if (_e) _o->key = _e->str(); }; -- { auto _e = type(); _o->type = _e; }; -- { auto _e = f(); _o->f = _e; }; -- { auto _e = tensor(); if (_e) _o->tensor = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = list(); if (_e) _o->list = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = func(); if (_e) _o->func = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = s(); if (_e) _o->s = _e->str(); } -+ { auto _e = i(); _o->i = _e; } -+ { auto _e = b(); _o->b = _e; } -+ { auto _e = key(); if (_e) _o->key = _e->str(); } -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = f(); _o->f = _e; } -+ { auto _e = tensor(); if (_e) _o->tensor = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = list(); if (_e) _o->list = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = func(); if (_e) _o->func = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset Attribute::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AttributeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -780,16 +775,16 @@ inline flatbuffers::Offset CreateAttribute(flatbuffers::FlatBufferBui - } - - inline NamedAttrListT *NamedAttrList::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new NamedAttrListT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new NamedAttrListT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void NamedAttrList::UnPackTo(NamedAttrListT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = name(); if (_e) _o->name = _e->str(); }; -- { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; -+ { auto _e = name(); if (_e) _o->name = _e->str(); } -+ { auto _e = attr(); if (_e) { _o->attr.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->attr[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } - } - - inline flatbuffers::Offset NamedAttrList::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NamedAttrListT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -801,7 +796,7 @@ inline flatbuffers::Offset CreateNamedAttrList(flatbuffers::FlatB - (void)_o; - struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NamedAttrListT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; - auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); -- auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; -+ auto _attr = _o->attr.size() ? _fbb.CreateVector> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; - return MNN::CreateNamedAttrList( - _fbb, - _name, -@@ -817,7 +812,7 @@ inline const flatbuffers::TypeTable *MNN_DATA_FORMATTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- MNN_DATA_FORMATTypeTable -+ MNN::MNN_DATA_FORMATTypeTable - }; - static const char * const names[] = { - "NCHW", -@@ -827,7 +822,7 @@ inline const flatbuffers::TypeTable *MNN_DATA_FORMATTypeTable() { - "UNKNOWN" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -845,8 +840,8 @@ inline const flatbuffers::TypeTable *BlobTypeTable() { - { flatbuffers::ET_STRING, 1, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- MNN_DATA_FORMATTypeTable, -- DataTypeTypeTable -+ MNN::MNN_DATA_FORMATTypeTable, -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "dims", -@@ -860,7 +855,7 @@ inline const flatbuffers::TypeTable *BlobTypeTable() { - "strings" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -874,7 +869,7 @@ inline const flatbuffers::TypeTable *ListValueTypeTable() { - { flatbuffers::ET_INT, 1, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "s", -@@ -884,7 +879,7 @@ inline const flatbuffers::TypeTable *ListValueTypeTable() { - "type" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -902,10 +897,10 @@ inline const flatbuffers::TypeTable *AttributeTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 3 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable, -- BlobTypeTable, -- ListValueTypeTable, -- NamedAttrListTypeTable -+ MNN::DataTypeTypeTable, -+ MNN::BlobTypeTable, -+ MNN::ListValueTypeTable, -+ MNN::NamedAttrListTypeTable - }; - static const char * const names[] = { - "s", -@@ -919,7 +914,7 @@ inline const flatbuffers::TypeTable *AttributeTypeTable() { - "func" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 9, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -930,14 +925,14 @@ inline const flatbuffers::TypeTable *NamedAttrListTypeTable() { - { flatbuffers::ET_SEQUENCE, 1, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- AttributeTypeTable -+ MNN::AttributeTypeTable - }; - static const char * const names[] = { - "name", - "attr" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -diff --git a/schema/current/TensorflowOp_generated.h b/schema/current/TensorflowOp_generated.h -index 3427a03a..b75296e2 100644 ---- a/schema/current/TensorflowOp_generated.h -+++ b/schema/current/TensorflowOp_generated.h -@@ -4,118 +4,155 @@ - #ifndef FLATBUFFERS_GENERATED_TENSORFLOWOP_MNN_H_ - #define FLATBUFFERS_GENERATED_TENSORFLOWOP_MNN_H_ - -+#include "flatbuffers/flatbuffers.h" - --#include "Tensor_generated.h" - #include "Type_generated.h" -+#include "Tensor_generated.h" - - namespace MNN { - - struct BinaryOp; -+struct BinaryOpBuilder; - struct BinaryOpT; - - struct PackParam; -+struct PackParamBuilder; - struct PackParamT; - - struct StridedSliceParam; -+struct StridedSliceParamBuilder; - struct StridedSliceParamT; - - struct SqueezeParam; -+struct SqueezeParamBuilder; - struct SqueezeParamT; - - struct CastParam; -+struct CastParamBuilder; - struct CastParamT; - - struct ReductionParam; -+struct ReductionParamBuilder; - struct ReductionParamT; - - struct Gather; -+struct GatherBuilder; - struct GatherT; - - struct ExpandDims; -+struct ExpandDimsBuilder; - struct ExpandDimsT; - - struct Selu; -+struct SeluBuilder; - struct SeluT; - - struct AsString; -+struct AsStringBuilder; - struct AsStringT; - - struct ReduceJoin; -+struct ReduceJoinBuilder; - struct ReduceJoinT; - - struct UnaryOp; -+struct UnaryOpBuilder; - struct UnaryOpT; - - struct TopKV2; -+struct TopKV2Builder; - struct TopKV2T; - - struct CropAndResize; -+struct CropAndResizeBuilder; - struct CropAndResizeT; - - struct Fill; -+struct FillBuilder; - struct FillT; - - struct GatherV2; -+struct GatherV2Builder; - struct GatherV2T; - - struct NonMaxSuppressionV2; -+struct NonMaxSuppressionV2Builder; - struct NonMaxSuppressionV2T; - - struct Range; -+struct RangeBuilder; - struct RangeT; - - struct Rank; -+struct RankBuilder; - struct RankT; - - struct Size; -+struct SizeBuilder; - struct SizeT; - - struct Transpose; -+struct TransposeBuilder; - struct TransposeT; - - struct SliceTf; -+struct SliceTfBuilder; - struct SliceTfT; - - struct QuantizeMaxMin; -+struct QuantizeMaxMinBuilder; - struct QuantizeMaxMinT; - - struct Crop; -+struct CropBuilder; - struct CropT; - - struct SpaceBatch; -+struct SpaceBatchBuilder; - struct SpaceBatchT; - - struct MatMul; -+struct MatMulBuilder; - struct MatMulT; - - struct MomentsParam; -+struct MomentsParamBuilder; - struct MomentsParamT; - - struct RNNParam; -+struct RNNParamBuilder; - struct RNNParamT; - - struct BatchMatMulParam; -+struct BatchMatMulParamBuilder; - struct BatchMatMulParamT; - - struct DepthSpaceParam; -+struct DepthSpaceParamBuilder; - struct DepthSpaceParamT; - - struct ReverseSequenceParam; -+struct ReverseSequenceParamBuilder; - struct ReverseSequenceParamT; - - struct DetectionPostProcessParam; -+struct DetectionPostProcessParamBuilder; - struct DetectionPostProcessParamT; - - struct OneHotParam; -+struct OneHotParamBuilder; - struct OneHotParamT; - - struct PadParam; -+struct PadParamBuilder; - struct PadParamT; - - struct LayerNorm; -+struct LayerNormBuilder; - struct LayerNormT; - - struct RandomUniform; -+struct RandomUniformBuilder; - struct RandomUniformT; - - inline const flatbuffers::TypeTable *BinaryOpTypeTable(); -@@ -190,7 +227,7 @@ inline const flatbuffers::TypeTable *LayerNormTypeTable(); - - inline const flatbuffers::TypeTable *RandomUniformTypeTable(); - --enum BinaryOpOperation { -+enum BinaryOpOperation : int8_t { - BinaryOpOperation_ADD = 0, - BinaryOpOperation_SUB = 1, - BinaryOpOperation_MUL = 2, -@@ -246,7 +283,7 @@ inline const BinaryOpOperation (&EnumValuesBinaryOpOperation())[22] { - } - - inline const char * const *EnumNamesBinaryOpOperation() { -- static const char * const names[] = { -+ static const char * const names[24] = { - "ADD", - "SUB", - "MUL", -@@ -276,12 +313,12 @@ inline const char * const *EnumNamesBinaryOpOperation() { - } - - inline const char *EnumNameBinaryOpOperation(BinaryOpOperation e) { -- if (e < BinaryOpOperation_ADD || e > BinaryOpOperation_NOTEQUAL) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, BinaryOpOperation_ADD, BinaryOpOperation_NOTEQUAL)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesBinaryOpOperation()[index]; - } - --enum ReductionType { -+enum ReductionType : int8_t { - ReductionType_SUM = 0, - ReductionType_ASUM = 1, - ReductionType_SUMSQ = 2, -@@ -311,7 +348,7 @@ inline const ReductionType (&EnumValuesReductionType())[9] { - } - - inline const char * const *EnumNamesReductionType() { -- static const char * const names[] = { -+ static const char * const names[10] = { - "SUM", - "ASUM", - "SUMSQ", -@@ -327,12 +364,12 @@ inline const char * const *EnumNamesReductionType() { - } - - inline const char *EnumNameReductionType(ReductionType e) { -- if (e < ReductionType_SUM || e > ReductionType_ALL) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, ReductionType_SUM, ReductionType_ALL)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesReductionType()[index]; - } - --enum UnaryOpOperation { -+enum UnaryOpOperation : int32_t { - UnaryOpOperation_ABS = 0, - UnaryOpOperation_NEG = 1, - UnaryOpOperation_FLOOR = 2, -@@ -406,7 +443,7 @@ inline const UnaryOpOperation (&EnumValuesUnaryOpOperation())[31] { - } - - inline const char * const *EnumNamesUnaryOpOperation() { -- static const char * const names[] = { -+ static const char * const names[32] = { - "ABS", - "NEG", - "FLOOR", -@@ -444,12 +481,12 @@ inline const char * const *EnumNamesUnaryOpOperation() { - } - - inline const char *EnumNameUnaryOpOperation(UnaryOpOperation e) { -- if (e < UnaryOpOperation_ABS || e > UnaryOpOperation_TANH) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, UnaryOpOperation_ABS, UnaryOpOperation_TANH)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesUnaryOpOperation()[index]; - } - --enum CropAndResizeMethod { -+enum CropAndResizeMethod : int8_t { - CropAndResizeMethod_BILINEAR = 0, - CropAndResizeMethod_NEAREST = 1, - CropAndResizeMethod_MIN = CropAndResizeMethod_BILINEAR, -@@ -465,7 +502,7 @@ inline const CropAndResizeMethod (&EnumValuesCropAndResizeMethod())[2] { - } - - inline const char * const *EnumNamesCropAndResizeMethod() { -- static const char * const names[] = { -+ static const char * const names[3] = { - "BILINEAR", - "NEAREST", - nullptr -@@ -474,12 +511,12 @@ inline const char * const *EnumNamesCropAndResizeMethod() { - } - - inline const char *EnumNameCropAndResizeMethod(CropAndResizeMethod e) { -- if (e < CropAndResizeMethod_BILINEAR || e > CropAndResizeMethod_NEAREST) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, CropAndResizeMethod_BILINEAR, CropAndResizeMethod_NEAREST)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesCropAndResizeMethod()[index]; - } - --enum DepthToSpaceMode { -+enum DepthToSpaceMode : int8_t { - DepthToSpaceMode_DCR = 0, - DepthToSpaceMode_CRD = 1, - DepthToSpaceMode_MIN = DepthToSpaceMode_DCR, -@@ -495,7 +532,7 @@ inline const DepthToSpaceMode (&EnumValuesDepthToSpaceMode())[2] { - } - - inline const char * const *EnumNamesDepthToSpaceMode() { -- static const char * const names[] = { -+ static const char * const names[3] = { - "DCR", - "CRD", - nullptr -@@ -504,12 +541,12 @@ inline const char * const *EnumNamesDepthToSpaceMode() { - } - - inline const char *EnumNameDepthToSpaceMode(DepthToSpaceMode e) { -- if (e < DepthToSpaceMode_DCR || e > DepthToSpaceMode_CRD) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, DepthToSpaceMode_DCR, DepthToSpaceMode_CRD)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesDepthToSpaceMode()[index]; - } - --enum PadValueMode { -+enum PadValueMode : int8_t { - PadValueMode_CONSTANT = 0, - PadValueMode_REFLECT = 1, - PadValueMode_SYMMETRIC = 2, -@@ -527,7 +564,7 @@ inline const PadValueMode (&EnumValuesPadValueMode())[3] { - } - - inline const char * const *EnumNamesPadValueMode() { -- static const char * const names[] = { -+ static const char * const names[4] = { - "CONSTANT", - "REFLECT", - "SYMMETRIC", -@@ -537,23 +574,20 @@ inline const char * const *EnumNamesPadValueMode() { - } - - inline const char *EnumNamePadValueMode(PadValueMode e) { -- if (e < PadValueMode_CONSTANT || e > PadValueMode_SYMMETRIC) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, PadValueMode_CONSTANT, PadValueMode_SYMMETRIC)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesPadValueMode()[index]; - } - - struct BinaryOpT : public flatbuffers::NativeTable { - typedef BinaryOp TableType; -- int32_t opType; -- DataType T; -- BinaryOpT() -- : opType(0), -- T(DataType_DT_FLOAT) { -- } -+ int32_t opType = 0; -+ MNN::DataType T = MNN::DataType_DT_FLOAT; - }; - - struct BinaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef BinaryOpT NativeTableType; -+ typedef BinaryOpBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return BinaryOpTypeTable(); - } -@@ -564,8 +598,8 @@ struct BinaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t opType() const { - return GetField(VT_OPTYPE, 0); - } -- DataType T() const { -- return static_cast(GetField(VT_T, 1)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 1)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -579,19 +613,19 @@ struct BinaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct BinaryOpBuilder { -+ typedef BinaryOp Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_opType(int32_t opType) { - fbb_.AddElement(BinaryOp::VT_OPTYPE, opType, 0); - } -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(BinaryOp::VT_T, static_cast(T), 1); - } - explicit BinaryOpBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- BinaryOpBuilder &operator=(const BinaryOpBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -602,7 +636,7 @@ struct BinaryOpBuilder { - inline flatbuffers::Offset CreateBinaryOp( - flatbuffers::FlatBufferBuilder &_fbb, - int32_t opType = 0, -- DataType T = DataType_DT_FLOAT) { -+ MNN::DataType T = MNN::DataType_DT_FLOAT) { - BinaryOpBuilder builder_(_fbb); - builder_.add_T(T); - builder_.add_opType(opType); -@@ -613,16 +647,13 @@ flatbuffers::Offset CreateBinaryOp(flatbuffers::FlatBufferBuilder &_fb - - struct PackParamT : public flatbuffers::NativeTable { - typedef PackParam TableType; -- DataType dataType; -- int32_t axis; -- PackParamT() -- : dataType(DataType_DT_INVALID), -- axis(0) { -- } -+ MNN::DataType dataType = MNN::DataType_DT_INVALID; -+ int32_t axis = 0; - }; - - struct PackParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef PackParamT NativeTableType; -+ typedef PackParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return PackParamTypeTable(); - } -@@ -630,8 +661,8 @@ struct PackParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_DATATYPE = 4, - VT_AXIS = 6 - }; -- DataType dataType() const { -- return static_cast(GetField(VT_DATATYPE, 0)); -+ MNN::DataType dataType() const { -+ return static_cast(GetField(VT_DATATYPE, 0)); - } - int32_t axis() const { - return GetField(VT_AXIS, 0); -@@ -648,9 +679,10 @@ struct PackParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct PackParamBuilder { -+ typedef PackParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_dataType(DataType dataType) { -+ void add_dataType(MNN::DataType dataType) { - fbb_.AddElement(PackParam::VT_DATATYPE, static_cast(dataType), 0); - } - void add_axis(int32_t axis) { -@@ -660,7 +692,6 @@ struct PackParamBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- PackParamBuilder &operator=(const PackParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -670,7 +701,7 @@ struct PackParamBuilder { - - inline flatbuffers::Offset CreatePackParam( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType dataType = DataType_DT_INVALID, -+ MNN::DataType dataType = MNN::DataType_DT_INVALID, - int32_t axis = 0) { - PackParamBuilder builder_(_fbb); - builder_.add_axis(axis); -@@ -682,26 +713,18 @@ flatbuffers::Offset CreatePackParam(flatbuffers::FlatBufferBuilder &_ - - struct StridedSliceParamT : public flatbuffers::NativeTable { - typedef StridedSliceParam TableType; -- DataType Index; -- DataType T; -- int32_t beginMask; -- int32_t endMask; -- int32_t ellipsisMask; -- int32_t newAxisMask; -- int32_t shrinkAxisMask; -- StridedSliceParamT() -- : Index(DataType_DT_INVALID), -- T(DataType_DT_INVALID), -- beginMask(0), -- endMask(0), -- ellipsisMask(0), -- newAxisMask(0), -- shrinkAxisMask(0) { -- } -+ MNN::DataType Index = MNN::DataType_DT_INVALID; -+ MNN::DataType T = MNN::DataType_DT_INVALID; -+ int32_t beginMask = 0; -+ int32_t endMask = 0; -+ int32_t ellipsisMask = 0; -+ int32_t newAxisMask = 0; -+ int32_t shrinkAxisMask = 0; - }; - - struct StridedSliceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StridedSliceParamT NativeTableType; -+ typedef StridedSliceParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return StridedSliceParamTypeTable(); - } -@@ -714,11 +737,11 @@ struct StridedSliceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_NEWAXISMASK = 14, - VT_SHRINKAXISMASK = 16 - }; -- DataType Index() const { -- return static_cast(GetField(VT_INDEX, 0)); -+ MNN::DataType Index() const { -+ return static_cast(GetField(VT_INDEX, 0)); - } -- DataType T() const { -- return static_cast(GetField(VT_T, 0)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 0)); - } - int32_t beginMask() const { - return GetField(VT_BEGINMASK, 0); -@@ -752,12 +775,13 @@ struct StridedSliceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct StridedSliceParamBuilder { -+ typedef StridedSliceParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_Index(DataType Index) { -+ void add_Index(MNN::DataType Index) { - fbb_.AddElement(StridedSliceParam::VT_INDEX, static_cast(Index), 0); - } -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(StridedSliceParam::VT_T, static_cast(T), 0); - } - void add_beginMask(int32_t beginMask) { -@@ -779,7 +803,6 @@ struct StridedSliceParamBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- StridedSliceParamBuilder &operator=(const StridedSliceParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -789,8 +812,8 @@ struct StridedSliceParamBuilder { - - inline flatbuffers::Offset CreateStridedSliceParam( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType Index = DataType_DT_INVALID, -- DataType T = DataType_DT_INVALID, -+ MNN::DataType Index = MNN::DataType_DT_INVALID, -+ MNN::DataType T = MNN::DataType_DT_INVALID, - int32_t beginMask = 0, - int32_t endMask = 0, - int32_t ellipsisMask = 0, -@@ -811,13 +834,12 @@ flatbuffers::Offset CreateStridedSliceParam(flatbuffers::Flat - - struct SqueezeParamT : public flatbuffers::NativeTable { - typedef SqueezeParam TableType; -- std::vector squeezeDims; -- SqueezeParamT() { -- } -+ std::vector squeezeDims{}; - }; - - struct SqueezeParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SqueezeParamT NativeTableType; -+ typedef SqueezeParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return SqueezeParamTypeTable(); - } -@@ -839,6 +861,7 @@ struct SqueezeParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct SqueezeParamBuilder { -+ typedef SqueezeParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_squeezeDims(flatbuffers::Offset> squeezeDims) { -@@ -848,7 +871,6 @@ struct SqueezeParamBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- SqueezeParamBuilder &operator=(const SqueezeParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -877,16 +899,13 @@ flatbuffers::Offset CreateSqueezeParam(flatbuffers::FlatBufferBuil - - struct CastParamT : public flatbuffers::NativeTable { - typedef CastParam TableType; -- DataType srcT; -- DataType dstT; -- CastParamT() -- : srcT(DataType_DT_INVALID), -- dstT(DataType_DT_INVALID) { -- } -+ MNN::DataType srcT = MNN::DataType_DT_INVALID; -+ MNN::DataType dstT = MNN::DataType_DT_INVALID; - }; - - struct CastParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef CastParamT NativeTableType; -+ typedef CastParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return CastParamTypeTable(); - } -@@ -894,11 +913,11 @@ struct CastParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_SRCT = 4, - VT_DSTT = 6 - }; -- DataType srcT() const { -- return static_cast(GetField(VT_SRCT, 0)); -+ MNN::DataType srcT() const { -+ return static_cast(GetField(VT_SRCT, 0)); - } -- DataType dstT() const { -- return static_cast(GetField(VT_DSTT, 0)); -+ MNN::DataType dstT() const { -+ return static_cast(GetField(VT_DSTT, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -912,19 +931,19 @@ struct CastParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct CastParamBuilder { -+ typedef CastParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_srcT(DataType srcT) { -+ void add_srcT(MNN::DataType srcT) { - fbb_.AddElement(CastParam::VT_SRCT, static_cast(srcT), 0); - } -- void add_dstT(DataType dstT) { -+ void add_dstT(MNN::DataType dstT) { - fbb_.AddElement(CastParam::VT_DSTT, static_cast(dstT), 0); - } - explicit CastParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- CastParamBuilder &operator=(const CastParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -934,8 +953,8 @@ struct CastParamBuilder { - - inline flatbuffers::Offset CreateCastParam( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType srcT = DataType_DT_INVALID, -- DataType dstT = DataType_DT_INVALID) { -+ MNN::DataType srcT = MNN::DataType_DT_INVALID, -+ MNN::DataType dstT = MNN::DataType_DT_INVALID) { - CastParamBuilder builder_(_fbb); - builder_.add_dstT(dstT); - builder_.add_srcT(srcT); -@@ -946,21 +965,16 @@ flatbuffers::Offset CreateCastParam(flatbuffers::FlatBufferBuilder &_ - - struct ReductionParamT : public flatbuffers::NativeTable { - typedef ReductionParam TableType; -- ReductionType operation; -- std::vector dim; -- float coeff; -- bool keepDims; -- DataType dType; -- ReductionParamT() -- : operation(ReductionType_SUM), -- coeff(0.0f), -- keepDims(false), -- dType(DataType_DT_FLOAT) { -- } -+ MNN::ReductionType operation = MNN::ReductionType_SUM; -+ std::vector dim{}; -+ float coeff = 0.0f; -+ bool keepDims = false; -+ MNN::DataType dType = MNN::DataType_DT_FLOAT; - }; - - struct ReductionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ReductionParamT NativeTableType; -+ typedef ReductionParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ReductionParamTypeTable(); - } -@@ -971,8 +985,8 @@ struct ReductionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_KEEPDIMS = 10, - VT_DTYPE = 12 - }; -- ReductionType operation() const { -- return static_cast(GetField(VT_OPERATION, 0)); -+ MNN::ReductionType operation() const { -+ return static_cast(GetField(VT_OPERATION, 0)); - } - const flatbuffers::Vector *dim() const { - return GetPointer *>(VT_DIM); -@@ -983,8 +997,8 @@ struct ReductionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - bool keepDims() const { - return GetField(VT_KEEPDIMS, 0) != 0; - } -- DataType dType() const { -- return static_cast(GetField(VT_DTYPE, 1)); -+ MNN::DataType dType() const { -+ return static_cast(GetField(VT_DTYPE, 1)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1002,9 +1016,10 @@ struct ReductionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ReductionParamBuilder { -+ typedef ReductionParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_operation(ReductionType operation) { -+ void add_operation(MNN::ReductionType operation) { - fbb_.AddElement(ReductionParam::VT_OPERATION, static_cast(operation), 0); - } - void add_dim(flatbuffers::Offset> dim) { -@@ -1016,14 +1031,13 @@ struct ReductionParamBuilder { - void add_keepDims(bool keepDims) { - fbb_.AddElement(ReductionParam::VT_KEEPDIMS, static_cast(keepDims), 0); - } -- void add_dType(DataType dType) { -+ void add_dType(MNN::DataType dType) { - fbb_.AddElement(ReductionParam::VT_DTYPE, static_cast(dType), 1); - } - explicit ReductionParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ReductionParamBuilder &operator=(const ReductionParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1033,11 +1047,11 @@ struct ReductionParamBuilder { - - inline flatbuffers::Offset CreateReductionParam( - flatbuffers::FlatBufferBuilder &_fbb, -- ReductionType operation = ReductionType_SUM, -+ MNN::ReductionType operation = MNN::ReductionType_SUM, - flatbuffers::Offset> dim = 0, - float coeff = 0.0f, - bool keepDims = false, -- DataType dType = DataType_DT_FLOAT) { -+ MNN::DataType dType = MNN::DataType_DT_FLOAT) { - ReductionParamBuilder builder_(_fbb); - builder_.add_dType(dType); - builder_.add_coeff(coeff); -@@ -1049,11 +1063,11 @@ inline flatbuffers::Offset CreateReductionParam( - - inline flatbuffers::Offset CreateReductionParamDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- ReductionType operation = ReductionType_SUM, -+ MNN::ReductionType operation = MNN::ReductionType_SUM, - const std::vector *dim = nullptr, - float coeff = 0.0f, - bool keepDims = false, -- DataType dType = DataType_DT_FLOAT) { -+ MNN::DataType dType = MNN::DataType_DT_FLOAT) { - auto dim__ = dim ? _fbb.CreateVector(*dim) : 0; - return MNN::CreateReductionParam( - _fbb, -@@ -1068,20 +1082,15 @@ flatbuffers::Offset CreateReductionParam(flatbuffers::FlatBuffer - - struct GatherT : public flatbuffers::NativeTable { - typedef Gather TableType; -- DataType Tindices; -- DataType Tparams; -- bool validateIndices; -- int32_t axis; -- GatherT() -- : Tindices(DataType_DT_INVALID), -- Tparams(DataType_DT_INVALID), -- validateIndices(false), -- axis(0) { -- } -+ MNN::DataType Tindices = MNN::DataType_DT_INVALID; -+ MNN::DataType Tparams = MNN::DataType_DT_INVALID; -+ bool validateIndices = false; -+ int32_t axis = 0; - }; - - struct Gather FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef GatherT NativeTableType; -+ typedef GatherBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return GatherTypeTable(); - } -@@ -1091,11 +1100,11 @@ struct Gather FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_VALIDATEINDICES = 8, - VT_AXIS = 10 - }; -- DataType Tindices() const { -- return static_cast(GetField(VT_TINDICES, 0)); -+ MNN::DataType Tindices() const { -+ return static_cast(GetField(VT_TINDICES, 0)); - } -- DataType Tparams() const { -- return static_cast(GetField(VT_TPARAMS, 0)); -+ MNN::DataType Tparams() const { -+ return static_cast(GetField(VT_TPARAMS, 0)); - } - bool validateIndices() const { - return GetField(VT_VALIDATEINDICES, 0) != 0; -@@ -1117,12 +1126,13 @@ struct Gather FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct GatherBuilder { -+ typedef Gather Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_Tindices(DataType Tindices) { -+ void add_Tindices(MNN::DataType Tindices) { - fbb_.AddElement(Gather::VT_TINDICES, static_cast(Tindices), 0); - } -- void add_Tparams(DataType Tparams) { -+ void add_Tparams(MNN::DataType Tparams) { - fbb_.AddElement(Gather::VT_TPARAMS, static_cast(Tparams), 0); - } - void add_validateIndices(bool validateIndices) { -@@ -1135,7 +1145,6 @@ struct GatherBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- GatherBuilder &operator=(const GatherBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1145,8 +1154,8 @@ struct GatherBuilder { - - inline flatbuffers::Offset CreateGather( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType Tindices = DataType_DT_INVALID, -- DataType Tparams = DataType_DT_INVALID, -+ MNN::DataType Tindices = MNN::DataType_DT_INVALID, -+ MNN::DataType Tparams = MNN::DataType_DT_INVALID, - bool validateIndices = false, - int32_t axis = 0) { - GatherBuilder builder_(_fbb); -@@ -1161,18 +1170,14 @@ flatbuffers::Offset CreateGather(flatbuffers::FlatBufferBuilder &_fbb, c - - struct ExpandDimsT : public flatbuffers::NativeTable { - typedef ExpandDims TableType; -- DataType T; -- DataType Tdim; -- int32_t axis; -- ExpandDimsT() -- : T(DataType_DT_INVALID), -- Tdim(DataType_DT_INVALID), -- axis(0) { -- } -+ MNN::DataType T = MNN::DataType_DT_INVALID; -+ MNN::DataType Tdim = MNN::DataType_DT_INVALID; -+ int32_t axis = 0; - }; - - struct ExpandDims FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ExpandDimsT NativeTableType; -+ typedef ExpandDimsBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ExpandDimsTypeTable(); - } -@@ -1181,11 +1186,11 @@ struct ExpandDims FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_TDIM = 6, - VT_AXIS = 8 - }; -- DataType T() const { -- return static_cast(GetField(VT_T, 0)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 0)); - } -- DataType Tdim() const { -- return static_cast(GetField(VT_TDIM, 0)); -+ MNN::DataType Tdim() const { -+ return static_cast(GetField(VT_TDIM, 0)); - } - int32_t axis() const { - return GetField(VT_AXIS, 0); -@@ -1203,12 +1208,13 @@ struct ExpandDims FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ExpandDimsBuilder { -+ typedef ExpandDims Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(ExpandDims::VT_T, static_cast(T), 0); - } -- void add_Tdim(DataType Tdim) { -+ void add_Tdim(MNN::DataType Tdim) { - fbb_.AddElement(ExpandDims::VT_TDIM, static_cast(Tdim), 0); - } - void add_axis(int32_t axis) { -@@ -1218,7 +1224,6 @@ struct ExpandDimsBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ExpandDimsBuilder &operator=(const ExpandDimsBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1228,8 +1233,8 @@ struct ExpandDimsBuilder { - - inline flatbuffers::Offset CreateExpandDims( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType T = DataType_DT_INVALID, -- DataType Tdim = DataType_DT_INVALID, -+ MNN::DataType T = MNN::DataType_DT_INVALID, -+ MNN::DataType Tdim = MNN::DataType_DT_INVALID, - int32_t axis = 0) { - ExpandDimsBuilder builder_(_fbb); - builder_.add_axis(axis); -@@ -1242,16 +1247,13 @@ flatbuffers::Offset CreateExpandDims(flatbuffers::FlatBufferBuilder - - struct SeluT : public flatbuffers::NativeTable { - typedef Selu TableType; -- float scale; -- float alpha; -- SeluT() -- : scale(0.0f), -- alpha(0.0f) { -- } -+ float scale = 0.0f; -+ float alpha = 0.0f; - }; - - struct Selu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SeluT NativeTableType; -+ typedef SeluBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return SeluTypeTable(); - } -@@ -1277,6 +1279,7 @@ struct Selu FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct SeluBuilder { -+ typedef Selu Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_scale(float scale) { -@@ -1289,7 +1292,6 @@ struct SeluBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- SeluBuilder &operator=(const SeluBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1311,23 +1313,17 @@ flatbuffers::Offset CreateSelu(flatbuffers::FlatBufferBuilder &_fbb, const - - struct AsStringT : public flatbuffers::NativeTable { - typedef AsString TableType; -- DataType T; -- int32_t precision; -- bool scientific; -- bool shortest; -- int32_t width; -- std::string fillString; -- AsStringT() -- : T(DataType_DT_INVALID), -- precision(0), -- scientific(false), -- shortest(false), -- width(0) { -- } -+ MNN::DataType T = MNN::DataType_DT_INVALID; -+ int32_t precision = 0; -+ bool scientific = false; -+ bool shortest = false; -+ int32_t width = 0; -+ std::string fillString{}; - }; - - struct AsString FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AsStringT NativeTableType; -+ typedef AsStringBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return AsStringTypeTable(); - } -@@ -1339,8 +1335,8 @@ struct AsString FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_WIDTH = 12, - VT_FILLSTRING = 14 - }; -- DataType T() const { -- return static_cast(GetField(VT_T, 0)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 0)); - } - int32_t precision() const { - return GetField(VT_PRECISION, 0); -@@ -1374,9 +1370,10 @@ struct AsString FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct AsStringBuilder { -+ typedef AsString Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(AsString::VT_T, static_cast(T), 0); - } - void add_precision(int32_t precision) { -@@ -1398,7 +1395,6 @@ struct AsStringBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- AsStringBuilder &operator=(const AsStringBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1408,7 +1404,7 @@ struct AsStringBuilder { - - inline flatbuffers::Offset CreateAsString( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType T = DataType_DT_INVALID, -+ MNN::DataType T = MNN::DataType_DT_INVALID, - int32_t precision = 0, - bool scientific = false, - bool shortest = false, -@@ -1426,7 +1422,7 @@ inline flatbuffers::Offset CreateAsString( - - inline flatbuffers::Offset CreateAsStringDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType T = DataType_DT_INVALID, -+ MNN::DataType T = MNN::DataType_DT_INVALID, - int32_t precision = 0, - bool scientific = false, - bool shortest = false, -@@ -1447,15 +1443,13 @@ flatbuffers::Offset CreateAsString(flatbuffers::FlatBufferBuilder &_fb - - struct ReduceJoinT : public flatbuffers::NativeTable { - typedef ReduceJoin TableType; -- bool keepDims; -- std::string separator; -- ReduceJoinT() -- : keepDims(false) { -- } -+ bool keepDims = false; -+ std::string separator{}; - }; - - struct ReduceJoin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ReduceJoinT NativeTableType; -+ typedef ReduceJoinBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ReduceJoinTypeTable(); - } -@@ -1482,6 +1476,7 @@ struct ReduceJoin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct ReduceJoinBuilder { -+ typedef ReduceJoin Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_keepDims(bool keepDims) { -@@ -1494,7 +1489,6 @@ struct ReduceJoinBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ReduceJoinBuilder &operator=(const ReduceJoinBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1527,16 +1521,13 @@ flatbuffers::Offset CreateReduceJoin(flatbuffers::FlatBufferBuilder - - struct UnaryOpT : public flatbuffers::NativeTable { - typedef UnaryOp TableType; -- UnaryOpOperation opType; -- DataType T; -- UnaryOpT() -- : opType(UnaryOpOperation_ABS), -- T(DataType_DT_INVALID) { -- } -+ MNN::UnaryOpOperation opType = MNN::UnaryOpOperation_ABS; -+ MNN::DataType T = MNN::DataType_DT_INVALID; - }; - - struct UnaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef UnaryOpT NativeTableType; -+ typedef UnaryOpBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return UnaryOpTypeTable(); - } -@@ -1544,11 +1535,11 @@ struct UnaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_OPTYPE = 4, - VT_T = 6 - }; -- UnaryOpOperation opType() const { -- return static_cast(GetField(VT_OPTYPE, 0)); -+ MNN::UnaryOpOperation opType() const { -+ return static_cast(GetField(VT_OPTYPE, 0)); - } -- DataType T() const { -- return static_cast(GetField(VT_T, 0)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1562,19 +1553,19 @@ struct UnaryOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct UnaryOpBuilder { -+ typedef UnaryOp Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_opType(UnaryOpOperation opType) { -+ void add_opType(MNN::UnaryOpOperation opType) { - fbb_.AddElement(UnaryOp::VT_OPTYPE, static_cast(opType), 0); - } -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(UnaryOp::VT_T, static_cast(T), 0); - } - explicit UnaryOpBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- UnaryOpBuilder &operator=(const UnaryOpBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1584,8 +1575,8 @@ struct UnaryOpBuilder { - - inline flatbuffers::Offset CreateUnaryOp( - flatbuffers::FlatBufferBuilder &_fbb, -- UnaryOpOperation opType = UnaryOpOperation_ABS, -- DataType T = DataType_DT_INVALID) { -+ MNN::UnaryOpOperation opType = MNN::UnaryOpOperation_ABS, -+ MNN::DataType T = MNN::DataType_DT_INVALID) { - UnaryOpBuilder builder_(_fbb); - builder_.add_T(T); - builder_.add_opType(opType); -@@ -1596,16 +1587,13 @@ flatbuffers::Offset CreateUnaryOp(flatbuffers::FlatBufferBuilder &_fbb, - - struct TopKV2T : public flatbuffers::NativeTable { - typedef TopKV2 TableType; -- DataType T; -- bool sorted; -- TopKV2T() -- : T(DataType_DT_FLOAT), -- sorted(false) { -- } -+ MNN::DataType T = MNN::DataType_DT_FLOAT; -+ bool sorted = false; - }; - - struct TopKV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TopKV2T NativeTableType; -+ typedef TopKV2Builder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return TopKV2TypeTable(); - } -@@ -1613,8 +1601,8 @@ struct TopKV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_T = 4, - VT_SORTED = 6 - }; -- DataType T() const { -- return static_cast(GetField(VT_T, 1)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 1)); - } - bool sorted() const { - return GetField(VT_SORTED, 0) != 0; -@@ -1631,9 +1619,10 @@ struct TopKV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct TopKV2Builder { -+ typedef TopKV2 Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(TopKV2::VT_T, static_cast(T), 1); - } - void add_sorted(bool sorted) { -@@ -1643,7 +1632,6 @@ struct TopKV2Builder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- TopKV2Builder &operator=(const TopKV2Builder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1653,7 +1641,7 @@ struct TopKV2Builder { - - inline flatbuffers::Offset CreateTopKV2( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType T = DataType_DT_FLOAT, -+ MNN::DataType T = MNN::DataType_DT_FLOAT, - bool sorted = false) { - TopKV2Builder builder_(_fbb); - builder_.add_T(T); -@@ -1665,16 +1653,13 @@ flatbuffers::Offset CreateTopKV2(flatbuffers::FlatBufferBuilder &_fbb, c - - struct CropAndResizeT : public flatbuffers::NativeTable { - typedef CropAndResize TableType; -- float extrapolationValue; -- CropAndResizeMethod method; -- CropAndResizeT() -- : extrapolationValue(0.0f), -- method(CropAndResizeMethod_BILINEAR) { -- } -+ float extrapolationValue = 0.0f; -+ MNN::CropAndResizeMethod method = MNN::CropAndResizeMethod_BILINEAR; - }; - - struct CropAndResize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef CropAndResizeT NativeTableType; -+ typedef CropAndResizeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return CropAndResizeTypeTable(); - } -@@ -1685,8 +1670,8 @@ struct CropAndResize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - float extrapolationValue() const { - return GetField(VT_EXTRAPOLATIONVALUE, 0.0f); - } -- CropAndResizeMethod method() const { -- return static_cast(GetField(VT_METHOD, 0)); -+ MNN::CropAndResizeMethod method() const { -+ return static_cast(GetField(VT_METHOD, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1700,19 +1685,19 @@ struct CropAndResize FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct CropAndResizeBuilder { -+ typedef CropAndResize Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_extrapolationValue(float extrapolationValue) { - fbb_.AddElement(CropAndResize::VT_EXTRAPOLATIONVALUE, extrapolationValue, 0.0f); - } -- void add_method(CropAndResizeMethod method) { -+ void add_method(MNN::CropAndResizeMethod method) { - fbb_.AddElement(CropAndResize::VT_METHOD, static_cast(method), 0); - } - explicit CropAndResizeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- CropAndResizeBuilder &operator=(const CropAndResizeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1723,7 +1708,7 @@ struct CropAndResizeBuilder { - inline flatbuffers::Offset CreateCropAndResize( - flatbuffers::FlatBufferBuilder &_fbb, - float extrapolationValue = 0.0f, -- CropAndResizeMethod method = CropAndResizeMethod_BILINEAR) { -+ MNN::CropAndResizeMethod method = MNN::CropAndResizeMethod_BILINEAR) { - CropAndResizeBuilder builder_(_fbb); - builder_.add_extrapolationValue(extrapolationValue); - builder_.add_method(method); -@@ -1734,12 +1719,11 @@ flatbuffers::Offset CreateCropAndResize(flatbuffers::FlatBufferBu - - struct FillT : public flatbuffers::NativeTable { - typedef Fill TableType; -- FillT() { -- } - }; - - struct Fill FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef FillT NativeTableType; -+ typedef FillBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return FillTypeTable(); - } -@@ -1753,13 +1737,13 @@ struct Fill FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct FillBuilder { -+ typedef Fill Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit FillBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- FillBuilder &operator=(const FillBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1777,18 +1761,14 @@ flatbuffers::Offset CreateFill(flatbuffers::FlatBufferBuilder &_fbb, const - - struct GatherV2T : public flatbuffers::NativeTable { - typedef GatherV2 TableType; -- DataType Taxis; -- DataType Tindices; -- DataType Tparams; -- GatherV2T() -- : Taxis(DataType_DT_INVALID), -- Tindices(DataType_DT_INVALID), -- Tparams(DataType_DT_INVALID) { -- } -+ MNN::DataType Taxis = MNN::DataType_DT_INVALID; -+ MNN::DataType Tindices = MNN::DataType_DT_INVALID; -+ MNN::DataType Tparams = MNN::DataType_DT_INVALID; - }; - - struct GatherV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef GatherV2T NativeTableType; -+ typedef GatherV2Builder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return GatherV2TypeTable(); - } -@@ -1797,14 +1777,14 @@ struct GatherV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_TINDICES = 6, - VT_TPARAMS = 8 - }; -- DataType Taxis() const { -- return static_cast(GetField(VT_TAXIS, 0)); -+ MNN::DataType Taxis() const { -+ return static_cast(GetField(VT_TAXIS, 0)); - } -- DataType Tindices() const { -- return static_cast(GetField(VT_TINDICES, 0)); -+ MNN::DataType Tindices() const { -+ return static_cast(GetField(VT_TINDICES, 0)); - } -- DataType Tparams() const { -- return static_cast(GetField(VT_TPARAMS, 0)); -+ MNN::DataType Tparams() const { -+ return static_cast(GetField(VT_TPARAMS, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1819,22 +1799,22 @@ struct GatherV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct GatherV2Builder { -+ typedef GatherV2 Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_Taxis(DataType Taxis) { -+ void add_Taxis(MNN::DataType Taxis) { - fbb_.AddElement(GatherV2::VT_TAXIS, static_cast(Taxis), 0); - } -- void add_Tindices(DataType Tindices) { -+ void add_Tindices(MNN::DataType Tindices) { - fbb_.AddElement(GatherV2::VT_TINDICES, static_cast(Tindices), 0); - } -- void add_Tparams(DataType Tparams) { -+ void add_Tparams(MNN::DataType Tparams) { - fbb_.AddElement(GatherV2::VT_TPARAMS, static_cast(Tparams), 0); - } - explicit GatherV2Builder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- GatherV2Builder &operator=(const GatherV2Builder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1844,9 +1824,9 @@ struct GatherV2Builder { - - inline flatbuffers::Offset CreateGatherV2( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType Taxis = DataType_DT_INVALID, -- DataType Tindices = DataType_DT_INVALID, -- DataType Tparams = DataType_DT_INVALID) { -+ MNN::DataType Taxis = MNN::DataType_DT_INVALID, -+ MNN::DataType Tindices = MNN::DataType_DT_INVALID, -+ MNN::DataType Tparams = MNN::DataType_DT_INVALID) { - GatherV2Builder builder_(_fbb); - builder_.add_Tparams(Tparams); - builder_.add_Tindices(Tindices); -@@ -1858,12 +1838,11 @@ flatbuffers::Offset CreateGatherV2(flatbuffers::FlatBufferBuilder &_fb - - struct NonMaxSuppressionV2T : public flatbuffers::NativeTable { - typedef NonMaxSuppressionV2 TableType; -- NonMaxSuppressionV2T() { -- } - }; - - struct NonMaxSuppressionV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef NonMaxSuppressionV2T NativeTableType; -+ typedef NonMaxSuppressionV2Builder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return NonMaxSuppressionV2TypeTable(); - } -@@ -1877,13 +1856,13 @@ struct NonMaxSuppressionV2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table - }; - - struct NonMaxSuppressionV2Builder { -+ typedef NonMaxSuppressionV2 Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit NonMaxSuppressionV2Builder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- NonMaxSuppressionV2Builder &operator=(const NonMaxSuppressionV2Builder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1901,22 +1880,20 @@ flatbuffers::Offset CreateNonMaxSuppressionV2(flatbuffers:: - - struct RangeT : public flatbuffers::NativeTable { - typedef Range TableType; -- DataType Tidx; -- RangeT() -- : Tidx(DataType_DT_INVALID) { -- } -+ MNN::DataType Tidx = MNN::DataType_DT_INVALID; - }; - - struct Range FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RangeT NativeTableType; -+ typedef RangeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return RangeTypeTable(); - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TIDX = 4 - }; -- DataType Tidx() const { -- return static_cast(GetField(VT_TIDX, 0)); -+ MNN::DataType Tidx() const { -+ return static_cast(GetField(VT_TIDX, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -1929,16 +1906,16 @@ struct Range FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct RangeBuilder { -+ typedef Range Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_Tidx(DataType Tidx) { -+ void add_Tidx(MNN::DataType Tidx) { - fbb_.AddElement(Range::VT_TIDX, static_cast(Tidx), 0); - } - explicit RangeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- RangeBuilder &operator=(const RangeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -1948,7 +1925,7 @@ struct RangeBuilder { - - inline flatbuffers::Offset CreateRange( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType Tidx = DataType_DT_INVALID) { -+ MNN::DataType Tidx = MNN::DataType_DT_INVALID) { - RangeBuilder builder_(_fbb); - builder_.add_Tidx(Tidx); - return builder_.Finish(); -@@ -1958,12 +1935,11 @@ flatbuffers::Offset CreateRange(flatbuffers::FlatBufferBuilder &_fbb, con - - struct RankT : public flatbuffers::NativeTable { - typedef Rank TableType; -- RankT() { -- } - }; - - struct Rank FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RankT NativeTableType; -+ typedef RankBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return RankTypeTable(); - } -@@ -1977,13 +1953,13 @@ struct Rank FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct RankBuilder { -+ typedef Rank Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit RankBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- RankBuilder &operator=(const RankBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2001,22 +1977,20 @@ flatbuffers::Offset CreateRank(flatbuffers::FlatBufferBuilder &_fbb, const - - struct SizeT : public flatbuffers::NativeTable { - typedef Size TableType; -- DataType outputDataType; -- SizeT() -- : outputDataType(DataType_DT_INVALID) { -- } -+ MNN::DataType outputDataType = MNN::DataType_DT_INVALID; - }; - - struct Size FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SizeT NativeTableType; -+ typedef SizeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return SizeTypeTable(); - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_OUTPUTDATATYPE = 4 - }; -- DataType outputDataType() const { -- return static_cast(GetField(VT_OUTPUTDATATYPE, 0)); -+ MNN::DataType outputDataType() const { -+ return static_cast(GetField(VT_OUTPUTDATATYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2029,16 +2003,16 @@ struct Size FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct SizeBuilder { -+ typedef Size Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_outputDataType(DataType outputDataType) { -+ void add_outputDataType(MNN::DataType outputDataType) { - fbb_.AddElement(Size::VT_OUTPUTDATATYPE, static_cast(outputDataType), 0); - } - explicit SizeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- SizeBuilder &operator=(const SizeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2048,7 +2022,7 @@ struct SizeBuilder { - - inline flatbuffers::Offset CreateSize( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType outputDataType = DataType_DT_INVALID) { -+ MNN::DataType outputDataType = MNN::DataType_DT_INVALID) { - SizeBuilder builder_(_fbb); - builder_.add_outputDataType(outputDataType); - return builder_.Finish(); -@@ -2058,22 +2032,20 @@ flatbuffers::Offset CreateSize(flatbuffers::FlatBufferBuilder &_fbb, const - - struct TransposeT : public flatbuffers::NativeTable { - typedef Transpose TableType; -- DataType Tperm; -- TransposeT() -- : Tperm(DataType_DT_INVALID) { -- } -+ MNN::DataType Tperm = MNN::DataType_DT_INVALID; - }; - - struct Transpose FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TransposeT NativeTableType; -+ typedef TransposeBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return TransposeTypeTable(); - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TPERM = 4 - }; -- DataType Tperm() const { -- return static_cast(GetField(VT_TPERM, 0)); -+ MNN::DataType Tperm() const { -+ return static_cast(GetField(VT_TPERM, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2086,16 +2058,16 @@ struct Transpose FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct TransposeBuilder { -+ typedef Transpose Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_Tperm(DataType Tperm) { -+ void add_Tperm(MNN::DataType Tperm) { - fbb_.AddElement(Transpose::VT_TPERM, static_cast(Tperm), 0); - } - explicit TransposeBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- TransposeBuilder &operator=(const TransposeBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2105,7 +2077,7 @@ struct TransposeBuilder { - - inline flatbuffers::Offset CreateTranspose( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType Tperm = DataType_DT_INVALID) { -+ MNN::DataType Tperm = MNN::DataType_DT_INVALID) { - TransposeBuilder builder_(_fbb); - builder_.add_Tperm(Tperm); - return builder_.Finish(); -@@ -2115,22 +2087,20 @@ flatbuffers::Offset CreateTranspose(flatbuffers::FlatBufferBuilder &_ - - struct SliceTfT : public flatbuffers::NativeTable { - typedef SliceTf TableType; -- DataType T; -- SliceTfT() -- : T(DataType_DT_INVALID) { -- } -+ MNN::DataType T = MNN::DataType_DT_INVALID; - }; - - struct SliceTf FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SliceTfT NativeTableType; -+ typedef SliceTfBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return SliceTfTypeTable(); - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_T = 4 - }; -- DataType T() const { -- return static_cast(GetField(VT_T, 0)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2143,16 +2113,16 @@ struct SliceTf FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct SliceTfBuilder { -+ typedef SliceTf Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(SliceTf::VT_T, static_cast(T), 0); - } - explicit SliceTfBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- SliceTfBuilder &operator=(const SliceTfBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2162,7 +2132,7 @@ struct SliceTfBuilder { - - inline flatbuffers::Offset CreateSliceTf( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType T = DataType_DT_INVALID) { -+ MNN::DataType T = MNN::DataType_DT_INVALID) { - SliceTfBuilder builder_(_fbb); - builder_.add_T(T); - return builder_.Finish(); -@@ -2172,22 +2142,20 @@ flatbuffers::Offset CreateSliceTf(flatbuffers::FlatBufferBuilder &_fbb, - - struct QuantizeMaxMinT : public flatbuffers::NativeTable { - typedef QuantizeMaxMin TableType; -- DataType T; -- QuantizeMaxMinT() -- : T(DataType_DT_INVALID) { -- } -+ MNN::DataType T = MNN::DataType_DT_INVALID; - }; - - struct QuantizeMaxMin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef QuantizeMaxMinT NativeTableType; -+ typedef QuantizeMaxMinBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return QuantizeMaxMinTypeTable(); - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_T = 4 - }; -- DataType T() const { -- return static_cast(GetField(VT_T, 0)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2200,16 +2168,16 @@ struct QuantizeMaxMin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct QuantizeMaxMinBuilder { -+ typedef QuantizeMaxMin Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(QuantizeMaxMin::VT_T, static_cast(T), 0); - } - explicit QuantizeMaxMinBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- QuantizeMaxMinBuilder &operator=(const QuantizeMaxMinBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2219,7 +2187,7 @@ struct QuantizeMaxMinBuilder { - - inline flatbuffers::Offset CreateQuantizeMaxMin( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType T = DataType_DT_INVALID) { -+ MNN::DataType T = MNN::DataType_DT_INVALID) { - QuantizeMaxMinBuilder builder_(_fbb); - builder_.add_T(T); - return builder_.Finish(); -@@ -2229,15 +2197,13 @@ flatbuffers::Offset CreateQuantizeMaxMin(flatbuffers::FlatBuffer - - struct CropT : public flatbuffers::NativeTable { - typedef Crop TableType; -- int32_t axis; -- std::vector offset; -- CropT() -- : axis(2) { -- } -+ int32_t axis = 2; -+ std::vector offset{}; - }; - - struct Crop FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef CropT NativeTableType; -+ typedef CropBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return CropTypeTable(); - } -@@ -2264,6 +2230,7 @@ struct Crop FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct CropBuilder { -+ typedef Crop Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_axis(int32_t axis) { -@@ -2276,7 +2243,6 @@ struct CropBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- CropBuilder &operator=(const CropBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2309,14 +2275,13 @@ flatbuffers::Offset CreateCrop(flatbuffers::FlatBufferBuilder &_fbb, const - - struct SpaceBatchT : public flatbuffers::NativeTable { - typedef SpaceBatch TableType; -- std::unique_ptr blockShape; -- std::unique_ptr padding; -- SpaceBatchT() { -- } -+ std::unique_ptr blockShape{}; -+ std::unique_ptr padding{}; - }; - - struct SpaceBatch FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SpaceBatchT NativeTableType; -+ typedef SpaceBatchBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return SpaceBatchTypeTable(); - } -@@ -2324,11 +2289,11 @@ struct SpaceBatch FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_BLOCKSHAPE = 4, - VT_PADDING = 6 - }; -- const Blob *blockShape() const { -- return GetPointer(VT_BLOCKSHAPE); -+ const MNN::Blob *blockShape() const { -+ return GetPointer(VT_BLOCKSHAPE); - } -- const Blob *padding() const { -- return GetPointer(VT_PADDING); -+ const MNN::Blob *padding() const { -+ return GetPointer(VT_PADDING); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2344,19 +2309,19 @@ struct SpaceBatch FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct SpaceBatchBuilder { -+ typedef SpaceBatch Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_blockShape(flatbuffers::Offset blockShape) { -+ void add_blockShape(flatbuffers::Offset blockShape) { - fbb_.AddOffset(SpaceBatch::VT_BLOCKSHAPE, blockShape); - } -- void add_padding(flatbuffers::Offset padding) { -+ void add_padding(flatbuffers::Offset padding) { - fbb_.AddOffset(SpaceBatch::VT_PADDING, padding); - } - explicit SpaceBatchBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- SpaceBatchBuilder &operator=(const SpaceBatchBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2366,8 +2331,8 @@ struct SpaceBatchBuilder { - - inline flatbuffers::Offset CreateSpaceBatch( - flatbuffers::FlatBufferBuilder &_fbb, -- flatbuffers::Offset blockShape = 0, -- flatbuffers::Offset padding = 0) { -+ flatbuffers::Offset blockShape = 0, -+ flatbuffers::Offset padding = 0) { - SpaceBatchBuilder builder_(_fbb); - builder_.add_padding(padding); - builder_.add_blockShape(blockShape); -@@ -2378,20 +2343,16 @@ flatbuffers::Offset CreateSpaceBatch(flatbuffers::FlatBufferBuilder - - struct MatMulT : public flatbuffers::NativeTable { - typedef MatMul TableType; -- DataType T; -- bool transposeA; -- bool transposeB; -- std::vector weight; -- std::vector bias; -- MatMulT() -- : T(DataType_DT_INVALID), -- transposeA(false), -- transposeB(false) { -- } -+ MNN::DataType T = MNN::DataType_DT_INVALID; -+ bool transposeA = false; -+ bool transposeB = false; -+ std::vector weight{}; -+ std::vector bias{}; - }; - - struct MatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef MatMulT NativeTableType; -+ typedef MatMulBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return MatMulTypeTable(); - } -@@ -2402,8 +2363,8 @@ struct MatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_WEIGHT = 10, - VT_BIAS = 12 - }; -- DataType T() const { -- return static_cast(GetField(VT_T, 0)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 0)); - } - bool transposeA() const { - return GetField(VT_TRANSPOSEA, 0) != 0; -@@ -2434,9 +2395,10 @@ struct MatMul FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct MatMulBuilder { -+ typedef MatMul Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(MatMul::VT_T, static_cast(T), 0); - } - void add_transposeA(bool transposeA) { -@@ -2455,7 +2417,6 @@ struct MatMulBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- MatMulBuilder &operator=(const MatMulBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2465,7 +2426,7 @@ struct MatMulBuilder { - - inline flatbuffers::Offset CreateMatMul( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType T = DataType_DT_INVALID, -+ MNN::DataType T = MNN::DataType_DT_INVALID, - bool transposeA = false, - bool transposeB = false, - flatbuffers::Offset> weight = 0, -@@ -2481,7 +2442,7 @@ inline flatbuffers::Offset CreateMatMul( - - inline flatbuffers::Offset CreateMatMulDirect( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType T = DataType_DT_INVALID, -+ MNN::DataType T = MNN::DataType_DT_INVALID, - bool transposeA = false, - bool transposeB = false, - const std::vector *weight = nullptr, -@@ -2501,17 +2462,14 @@ flatbuffers::Offset CreateMatMul(flatbuffers::FlatBufferBuilder &_fbb, c - - struct MomentsParamT : public flatbuffers::NativeTable { - typedef MomentsParam TableType; -- std::vector dim; -- bool keepDims; -- DataType dType; -- MomentsParamT() -- : keepDims(true), -- dType(DataType_DT_FLOAT) { -- } -+ std::vector dim{}; -+ bool keepDims = true; -+ MNN::DataType dType = MNN::DataType_DT_FLOAT; - }; - - struct MomentsParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef MomentsParamT NativeTableType; -+ typedef MomentsParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return MomentsParamTypeTable(); - } -@@ -2526,8 +2484,8 @@ struct MomentsParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - bool keepDims() const { - return GetField(VT_KEEPDIMS, 1) != 0; - } -- DataType dType() const { -- return static_cast(GetField(VT_DTYPE, 1)); -+ MNN::DataType dType() const { -+ return static_cast(GetField(VT_DTYPE, 1)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2543,6 +2501,7 @@ struct MomentsParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct MomentsParamBuilder { -+ typedef MomentsParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_dim(flatbuffers::Offset> dim) { -@@ -2551,14 +2510,13 @@ struct MomentsParamBuilder { - void add_keepDims(bool keepDims) { - fbb_.AddElement(MomentsParam::VT_KEEPDIMS, static_cast(keepDims), 1); - } -- void add_dType(DataType dType) { -+ void add_dType(MNN::DataType dType) { - fbb_.AddElement(MomentsParam::VT_DTYPE, static_cast(dType), 1); - } - explicit MomentsParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- MomentsParamBuilder &operator=(const MomentsParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2570,7 +2528,7 @@ inline flatbuffers::Offset CreateMomentsParam( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset> dim = 0, - bool keepDims = true, -- DataType dType = DataType_DT_FLOAT) { -+ MNN::DataType dType = MNN::DataType_DT_FLOAT) { - MomentsParamBuilder builder_(_fbb); - builder_.add_dType(dType); - builder_.add_dim(dim); -@@ -2582,7 +2540,7 @@ inline flatbuffers::Offset CreateMomentsParamDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector *dim = nullptr, - bool keepDims = true, -- DataType dType = DataType_DT_FLOAT) { -+ MNN::DataType dType = MNN::DataType_DT_FLOAT) { - auto dim__ = dim ? _fbb.CreateVector(*dim) : 0; - return MNN::CreateMomentsParam( - _fbb, -@@ -2595,26 +2553,22 @@ flatbuffers::Offset CreateMomentsParam(flatbuffers::FlatBufferBuil - - struct RNNParamT : public flatbuffers::NativeTable { - typedef RNNParam TableType; -- int32_t numUnits; -- bool isBidirectionalRNN; -- bool keepAllOutputs; -- std::unique_ptr fwGateWeight; -- std::unique_ptr fwGateBias; -- std::unique_ptr fwCandidateWeight; -- std::unique_ptr fwCandidateBias; -- std::unique_ptr bwGateWeight; -- std::unique_ptr bwGateBias; -- std::unique_ptr bwCandidateWeight; -- std::unique_ptr bwCandidateBias; -- RNNParamT() -- : numUnits(0), -- isBidirectionalRNN(false), -- keepAllOutputs(false) { -- } -+ int32_t numUnits = 0; -+ bool isBidirectionalRNN = false; -+ bool keepAllOutputs = false; -+ std::unique_ptr fwGateWeight{}; -+ std::unique_ptr fwGateBias{}; -+ std::unique_ptr fwCandidateWeight{}; -+ std::unique_ptr fwCandidateBias{}; -+ std::unique_ptr bwGateWeight{}; -+ std::unique_ptr bwGateBias{}; -+ std::unique_ptr bwCandidateWeight{}; -+ std::unique_ptr bwCandidateBias{}; - }; - - struct RNNParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RNNParamT NativeTableType; -+ typedef RNNParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return RNNParamTypeTable(); - } -@@ -2640,29 +2594,29 @@ struct RNNParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - bool keepAllOutputs() const { - return GetField(VT_KEEPALLOUTPUTS, 0) != 0; - } -- const Blob *fwGateWeight() const { -- return GetPointer(VT_FWGATEWEIGHT); -+ const MNN::Blob *fwGateWeight() const { -+ return GetPointer(VT_FWGATEWEIGHT); - } -- const Blob *fwGateBias() const { -- return GetPointer(VT_FWGATEBIAS); -+ const MNN::Blob *fwGateBias() const { -+ return GetPointer(VT_FWGATEBIAS); - } -- const Blob *fwCandidateWeight() const { -- return GetPointer(VT_FWCANDIDATEWEIGHT); -+ const MNN::Blob *fwCandidateWeight() const { -+ return GetPointer(VT_FWCANDIDATEWEIGHT); - } -- const Blob *fwCandidateBias() const { -- return GetPointer(VT_FWCANDIDATEBIAS); -+ const MNN::Blob *fwCandidateBias() const { -+ return GetPointer(VT_FWCANDIDATEBIAS); - } -- const Blob *bwGateWeight() const { -- return GetPointer(VT_BWGATEWEIGHT); -+ const MNN::Blob *bwGateWeight() const { -+ return GetPointer(VT_BWGATEWEIGHT); - } -- const Blob *bwGateBias() const { -- return GetPointer(VT_BWGATEBIAS); -+ const MNN::Blob *bwGateBias() const { -+ return GetPointer(VT_BWGATEBIAS); - } -- const Blob *bwCandidateWeight() const { -- return GetPointer(VT_BWCANDIDATEWEIGHT); -+ const MNN::Blob *bwCandidateWeight() const { -+ return GetPointer(VT_BWCANDIDATEWEIGHT); - } -- const Blob *bwCandidateBias() const { -- return GetPointer(VT_BWCANDIDATEBIAS); -+ const MNN::Blob *bwCandidateBias() const { -+ return GetPointer(VT_BWCANDIDATEBIAS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2693,6 +2647,7 @@ struct RNNParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct RNNParamBuilder { -+ typedef RNNParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_numUnits(int32_t numUnits) { -@@ -2704,35 +2659,34 @@ struct RNNParamBuilder { - void add_keepAllOutputs(bool keepAllOutputs) { - fbb_.AddElement(RNNParam::VT_KEEPALLOUTPUTS, static_cast(keepAllOutputs), 0); - } -- void add_fwGateWeight(flatbuffers::Offset fwGateWeight) { -+ void add_fwGateWeight(flatbuffers::Offset fwGateWeight) { - fbb_.AddOffset(RNNParam::VT_FWGATEWEIGHT, fwGateWeight); - } -- void add_fwGateBias(flatbuffers::Offset fwGateBias) { -+ void add_fwGateBias(flatbuffers::Offset fwGateBias) { - fbb_.AddOffset(RNNParam::VT_FWGATEBIAS, fwGateBias); - } -- void add_fwCandidateWeight(flatbuffers::Offset fwCandidateWeight) { -+ void add_fwCandidateWeight(flatbuffers::Offset fwCandidateWeight) { - fbb_.AddOffset(RNNParam::VT_FWCANDIDATEWEIGHT, fwCandidateWeight); - } -- void add_fwCandidateBias(flatbuffers::Offset fwCandidateBias) { -+ void add_fwCandidateBias(flatbuffers::Offset fwCandidateBias) { - fbb_.AddOffset(RNNParam::VT_FWCANDIDATEBIAS, fwCandidateBias); - } -- void add_bwGateWeight(flatbuffers::Offset bwGateWeight) { -+ void add_bwGateWeight(flatbuffers::Offset bwGateWeight) { - fbb_.AddOffset(RNNParam::VT_BWGATEWEIGHT, bwGateWeight); - } -- void add_bwGateBias(flatbuffers::Offset bwGateBias) { -+ void add_bwGateBias(flatbuffers::Offset bwGateBias) { - fbb_.AddOffset(RNNParam::VT_BWGATEBIAS, bwGateBias); - } -- void add_bwCandidateWeight(flatbuffers::Offset bwCandidateWeight) { -+ void add_bwCandidateWeight(flatbuffers::Offset bwCandidateWeight) { - fbb_.AddOffset(RNNParam::VT_BWCANDIDATEWEIGHT, bwCandidateWeight); - } -- void add_bwCandidateBias(flatbuffers::Offset bwCandidateBias) { -+ void add_bwCandidateBias(flatbuffers::Offset bwCandidateBias) { - fbb_.AddOffset(RNNParam::VT_BWCANDIDATEBIAS, bwCandidateBias); - } - explicit RNNParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- RNNParamBuilder &operator=(const RNNParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2745,14 +2699,14 @@ inline flatbuffers::Offset CreateRNNParam( - int32_t numUnits = 0, - bool isBidirectionalRNN = false, - bool keepAllOutputs = false, -- flatbuffers::Offset fwGateWeight = 0, -- flatbuffers::Offset fwGateBias = 0, -- flatbuffers::Offset fwCandidateWeight = 0, -- flatbuffers::Offset fwCandidateBias = 0, -- flatbuffers::Offset bwGateWeight = 0, -- flatbuffers::Offset bwGateBias = 0, -- flatbuffers::Offset bwCandidateWeight = 0, -- flatbuffers::Offset bwCandidateBias = 0) { -+ flatbuffers::Offset fwGateWeight = 0, -+ flatbuffers::Offset fwGateBias = 0, -+ flatbuffers::Offset fwCandidateWeight = 0, -+ flatbuffers::Offset fwCandidateBias = 0, -+ flatbuffers::Offset bwGateWeight = 0, -+ flatbuffers::Offset bwGateBias = 0, -+ flatbuffers::Offset bwCandidateWeight = 0, -+ flatbuffers::Offset bwCandidateBias = 0) { - RNNParamBuilder builder_(_fbb); - builder_.add_bwCandidateBias(bwCandidateBias); - builder_.add_bwCandidateWeight(bwCandidateWeight); -@@ -2772,16 +2726,13 @@ flatbuffers::Offset CreateRNNParam(flatbuffers::FlatBufferBuilder &_fb - - struct BatchMatMulParamT : public flatbuffers::NativeTable { - typedef BatchMatMulParam TableType; -- bool adjX; -- bool adjY; -- BatchMatMulParamT() -- : adjX(false), -- adjY(false) { -- } -+ bool adjX = false; -+ bool adjY = false; - }; - - struct BatchMatMulParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef BatchMatMulParamT NativeTableType; -+ typedef BatchMatMulParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return BatchMatMulParamTypeTable(); - } -@@ -2807,6 +2758,7 @@ struct BatchMatMulParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct BatchMatMulParamBuilder { -+ typedef BatchMatMulParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_adjX(bool adjX) { -@@ -2819,7 +2771,6 @@ struct BatchMatMulParamBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- BatchMatMulParamBuilder &operator=(const BatchMatMulParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2841,16 +2792,13 @@ flatbuffers::Offset CreateBatchMatMulParam(flatbuffers::FlatBu - - struct DepthSpaceParamT : public flatbuffers::NativeTable { - typedef DepthSpaceParam TableType; -- int32_t blockSize; -- DepthToSpaceMode mode; -- DepthSpaceParamT() -- : blockSize(0), -- mode(DepthToSpaceMode_DCR) { -- } -+ int32_t blockSize = 0; -+ MNN::DepthToSpaceMode mode = MNN::DepthToSpaceMode_DCR; - }; - - struct DepthSpaceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DepthSpaceParamT NativeTableType; -+ typedef DepthSpaceParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return DepthSpaceParamTypeTable(); - } -@@ -2861,8 +2809,8 @@ struct DepthSpaceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t blockSize() const { - return GetField(VT_BLOCKSIZE, 0); - } -- DepthToSpaceMode mode() const { -- return static_cast(GetField(VT_MODE, 0)); -+ MNN::DepthToSpaceMode mode() const { -+ return static_cast(GetField(VT_MODE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -2876,19 +2824,19 @@ struct DepthSpaceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct DepthSpaceParamBuilder { -+ typedef DepthSpaceParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_blockSize(int32_t blockSize) { - fbb_.AddElement(DepthSpaceParam::VT_BLOCKSIZE, blockSize, 0); - } -- void add_mode(DepthToSpaceMode mode) { -+ void add_mode(MNN::DepthToSpaceMode mode) { - fbb_.AddElement(DepthSpaceParam::VT_MODE, static_cast(mode), 0); - } - explicit DepthSpaceParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- DepthSpaceParamBuilder &operator=(const DepthSpaceParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2899,7 +2847,7 @@ struct DepthSpaceParamBuilder { - inline flatbuffers::Offset CreateDepthSpaceParam( - flatbuffers::FlatBufferBuilder &_fbb, - int32_t blockSize = 0, -- DepthToSpaceMode mode = DepthToSpaceMode_DCR) { -+ MNN::DepthToSpaceMode mode = MNN::DepthToSpaceMode_DCR) { - DepthSpaceParamBuilder builder_(_fbb); - builder_.add_blockSize(blockSize); - builder_.add_mode(mode); -@@ -2910,16 +2858,13 @@ flatbuffers::Offset CreateDepthSpaceParam(flatbuffers::FlatBuff - - struct ReverseSequenceParamT : public flatbuffers::NativeTable { - typedef ReverseSequenceParam TableType; -- int32_t batchDim; -- int32_t seqDim; -- ReverseSequenceParamT() -- : batchDim(0), -- seqDim(0) { -- } -+ int32_t batchDim = 0; -+ int32_t seqDim = 0; - }; - - struct ReverseSequenceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ReverseSequenceParamT NativeTableType; -+ typedef ReverseSequenceParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return ReverseSequenceParamTypeTable(); - } -@@ -2945,6 +2890,7 @@ struct ReverseSequenceParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table - }; - - struct ReverseSequenceParamBuilder { -+ typedef ReverseSequenceParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_batchDim(int32_t batchDim) { -@@ -2957,7 +2903,6 @@ struct ReverseSequenceParamBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- ReverseSequenceParamBuilder &operator=(const ReverseSequenceParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -2979,27 +2924,19 @@ flatbuffers::Offset CreateReverseSequenceParam(flatbuffers - - struct DetectionPostProcessParamT : public flatbuffers::NativeTable { - typedef DetectionPostProcessParam TableType; -- int32_t maxDetections; -- int32_t maxClassesPerDetection; -- int32_t detectionsPerClass; -- float nmsScoreThreshold; -- float iouThreshold; -- int32_t numClasses; -- bool useRegularNMS; -- std::vector centerSizeEncoding; -- DetectionPostProcessParamT() -- : maxDetections(0), -- maxClassesPerDetection(0), -- detectionsPerClass(0), -- nmsScoreThreshold(0.0f), -- iouThreshold(0.0f), -- numClasses(0), -- useRegularNMS(false) { -- } -+ int32_t maxDetections = 0; -+ int32_t maxClassesPerDetection = 0; -+ int32_t detectionsPerClass = 0; -+ float nmsScoreThreshold = 0.0f; -+ float iouThreshold = 0.0f; -+ int32_t numClasses = 0; -+ bool useRegularNMS = false; -+ std::vector centerSizeEncoding{}; - }; - - struct DetectionPostProcessParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DetectionPostProcessParamT NativeTableType; -+ typedef DetectionPostProcessParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return DetectionPostProcessParamTypeTable(); - } -@@ -3056,6 +2993,7 @@ struct DetectionPostProcessParam FLATBUFFERS_FINAL_CLASS : private flatbuffers:: - }; - - struct DetectionPostProcessParamBuilder { -+ typedef DetectionPostProcessParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_maxDetections(int32_t maxDetections) { -@@ -3086,7 +3024,6 @@ struct DetectionPostProcessParamBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- DetectionPostProcessParamBuilder &operator=(const DetectionPostProcessParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3143,16 +3080,13 @@ flatbuffers::Offset CreateDetectionPostProcessParam(f - - struct OneHotParamT : public flatbuffers::NativeTable { - typedef OneHotParam TableType; -- DataType dType; -- int32_t axis; -- OneHotParamT() -- : dType(DataType_DT_FLOAT), -- axis(-1) { -- } -+ MNN::DataType dType = MNN::DataType_DT_FLOAT; -+ int32_t axis = -1; - }; - - struct OneHotParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OneHotParamT NativeTableType; -+ typedef OneHotParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return OneHotParamTypeTable(); - } -@@ -3160,8 +3094,8 @@ struct OneHotParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_DTYPE = 4, - VT_AXIS = 6 - }; -- DataType dType() const { -- return static_cast(GetField(VT_DTYPE, 1)); -+ MNN::DataType dType() const { -+ return static_cast(GetField(VT_DTYPE, 1)); - } - int32_t axis() const { - return GetField(VT_AXIS, -1); -@@ -3178,9 +3112,10 @@ struct OneHotParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct OneHotParamBuilder { -+ typedef OneHotParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_dType(DataType dType) { -+ void add_dType(MNN::DataType dType) { - fbb_.AddElement(OneHotParam::VT_DTYPE, static_cast(dType), 1); - } - void add_axis(int32_t axis) { -@@ -3190,7 +3125,6 @@ struct OneHotParamBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- OneHotParamBuilder &operator=(const OneHotParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3200,7 +3134,7 @@ struct OneHotParamBuilder { - - inline flatbuffers::Offset CreateOneHotParam( - flatbuffers::FlatBufferBuilder &_fbb, -- DataType dType = DataType_DT_FLOAT, -+ MNN::DataType dType = MNN::DataType_DT_FLOAT, - int32_t axis = -1) { - OneHotParamBuilder builder_(_fbb); - builder_.add_axis(axis); -@@ -3212,22 +3146,20 @@ flatbuffers::Offset CreateOneHotParam(flatbuffers::FlatBufferBuilde - - struct PadParamT : public flatbuffers::NativeTable { - typedef PadParam TableType; -- PadValueMode mode; -- PadParamT() -- : mode(PadValueMode_CONSTANT) { -- } -+ MNN::PadValueMode mode = MNN::PadValueMode_CONSTANT; - }; - - struct PadParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef PadParamT NativeTableType; -+ typedef PadParamBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return PadParamTypeTable(); - } - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MODE = 4 - }; -- PadValueMode mode() const { -- return static_cast(GetField(VT_MODE, 0)); -+ MNN::PadValueMode mode() const { -+ return static_cast(GetField(VT_MODE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -3240,16 +3172,16 @@ struct PadParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct PadParamBuilder { -+ typedef PadParam Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_mode(PadValueMode mode) { -+ void add_mode(MNN::PadValueMode mode) { - fbb_.AddElement(PadParam::VT_MODE, static_cast(mode), 0); - } - explicit PadParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- PadParamBuilder &operator=(const PadParamBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3259,7 +3191,7 @@ struct PadParamBuilder { - - inline flatbuffers::Offset CreatePadParam( - flatbuffers::FlatBufferBuilder &_fbb, -- PadValueMode mode = PadValueMode_CONSTANT) { -+ MNN::PadValueMode mode = MNN::PadValueMode_CONSTANT) { - PadParamBuilder builder_(_fbb); - builder_.add_mode(mode); - return builder_.Finish(); -@@ -3269,17 +3201,15 @@ flatbuffers::Offset CreatePadParam(flatbuffers::FlatBufferBuilder &_fb - - struct LayerNormT : public flatbuffers::NativeTable { - typedef LayerNorm TableType; -- std::vector axis; -- float epsilon; -- std::vector gamma; -- std::vector beta; -- LayerNormT() -- : epsilon(0.0f) { -- } -+ std::vector axis{}; -+ float epsilon = 0.0f; -+ std::vector gamma{}; -+ std::vector beta{}; - }; - - struct LayerNorm FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef LayerNormT NativeTableType; -+ typedef LayerNormBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return LayerNormTypeTable(); - } -@@ -3318,6 +3248,7 @@ struct LayerNorm FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct LayerNormBuilder { -+ typedef LayerNorm Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_axis(flatbuffers::Offset> axis) { -@@ -3336,7 +3267,6 @@ struct LayerNormBuilder { - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- LayerNormBuilder &operator=(const LayerNormBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3379,20 +3309,15 @@ flatbuffers::Offset CreateLayerNorm(flatbuffers::FlatBufferBuilder &_ - - struct RandomUniformT : public flatbuffers::NativeTable { - typedef RandomUniform TableType; -- int32_t seed; -- int32_t seed2; -- DataType type; -- DataType T; -- RandomUniformT() -- : seed(0), -- seed2(0), -- type(DataType_DT_FLOAT), -- T(DataType_DT_INT32) { -- } -+ int32_t seed = 0; -+ int32_t seed2 = 0; -+ MNN::DataType type = MNN::DataType_DT_FLOAT; -+ MNN::DataType T = MNN::DataType_DT_INT32; - }; - - struct RandomUniform FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RandomUniformT NativeTableType; -+ typedef RandomUniformBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return RandomUniformTypeTable(); - } -@@ -3408,11 +3333,11 @@ struct RandomUniform FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - int32_t seed2() const { - return GetField(VT_SEED2, 0); - } -- DataType type() const { -- return static_cast(GetField(VT_TYPE, 1)); -+ MNN::DataType type() const { -+ return static_cast(GetField(VT_TYPE, 1)); - } -- DataType T() const { -- return static_cast(GetField(VT_T, 3)); -+ MNN::DataType T() const { -+ return static_cast(GetField(VT_T, 3)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -3428,6 +3353,7 @@ struct RandomUniform FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct RandomUniformBuilder { -+ typedef RandomUniform Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_seed(int32_t seed) { -@@ -3436,17 +3362,16 @@ struct RandomUniformBuilder { - void add_seed2(int32_t seed2) { - fbb_.AddElement(RandomUniform::VT_SEED2, seed2, 0); - } -- void add_type(DataType type) { -+ void add_type(MNN::DataType type) { - fbb_.AddElement(RandomUniform::VT_TYPE, static_cast(type), 1); - } -- void add_T(DataType T) { -+ void add_T(MNN::DataType T) { - fbb_.AddElement(RandomUniform::VT_T, static_cast(T), 3); - } - explicit RandomUniformBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- RandomUniformBuilder &operator=(const RandomUniformBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -3458,8 +3383,8 @@ inline flatbuffers::Offset CreateRandomUniform( - flatbuffers::FlatBufferBuilder &_fbb, - int32_t seed = 0, - int32_t seed2 = 0, -- DataType type = DataType_DT_FLOAT, -- DataType T = DataType_DT_INT32) { -+ MNN::DataType type = MNN::DataType_DT_FLOAT, -+ MNN::DataType T = MNN::DataType_DT_INT32) { - RandomUniformBuilder builder_(_fbb); - builder_.add_T(T); - builder_.add_type(type); -@@ -3471,16 +3396,16 @@ inline flatbuffers::Offset CreateRandomUniform( - flatbuffers::Offset CreateRandomUniform(flatbuffers::FlatBufferBuilder &_fbb, const RandomUniformT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); - - inline BinaryOpT *BinaryOp::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new BinaryOpT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new BinaryOpT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void BinaryOp::UnPackTo(BinaryOpT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = opType(); _o->opType = _e; }; -- { auto _e = T(); _o->T = _e; }; -+ { auto _e = opType(); _o->opType = _e; } -+ { auto _e = T(); _o->T = _e; } - } - - inline flatbuffers::Offset BinaryOp::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BinaryOpT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3500,16 +3425,16 @@ inline flatbuffers::Offset CreateBinaryOp(flatbuffers::FlatBufferBuild - } - - inline PackParamT *PackParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new PackParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new PackParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void PackParam::UnPackTo(PackParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = dataType(); _o->dataType = _e; }; -- { auto _e = axis(); _o->axis = _e; }; -+ { auto _e = dataType(); _o->dataType = _e; } -+ { auto _e = axis(); _o->axis = _e; } - } - - inline flatbuffers::Offset PackParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PackParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3529,21 +3454,21 @@ inline flatbuffers::Offset CreatePackParam(flatbuffers::FlatBufferBui - } - - inline StridedSliceParamT *StridedSliceParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new StridedSliceParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new StridedSliceParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void StridedSliceParam::UnPackTo(StridedSliceParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = Index(); _o->Index = _e; }; -- { auto _e = T(); _o->T = _e; }; -- { auto _e = beginMask(); _o->beginMask = _e; }; -- { auto _e = endMask(); _o->endMask = _e; }; -- { auto _e = ellipsisMask(); _o->ellipsisMask = _e; }; -- { auto _e = newAxisMask(); _o->newAxisMask = _e; }; -- { auto _e = shrinkAxisMask(); _o->shrinkAxisMask = _e; }; -+ { auto _e = Index(); _o->Index = _e; } -+ { auto _e = T(); _o->T = _e; } -+ { auto _e = beginMask(); _o->beginMask = _e; } -+ { auto _e = endMask(); _o->endMask = _e; } -+ { auto _e = ellipsisMask(); _o->ellipsisMask = _e; } -+ { auto _e = newAxisMask(); _o->newAxisMask = _e; } -+ { auto _e = shrinkAxisMask(); _o->shrinkAxisMask = _e; } - } - - inline flatbuffers::Offset StridedSliceParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StridedSliceParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3573,15 +3498,15 @@ inline flatbuffers::Offset CreateStridedSliceParam(flatbuffer - } - - inline SqueezeParamT *SqueezeParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new SqueezeParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new SqueezeParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void SqueezeParam::UnPackTo(SqueezeParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = squeezeDims(); if (_e) { _o->squeezeDims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->squeezeDims[_i] = _e->Get(_i); } } }; -+ { auto _e = squeezeDims(); if (_e) { _o->squeezeDims.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->squeezeDims[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset SqueezeParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SqueezeParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3599,16 +3524,16 @@ inline flatbuffers::Offset CreateSqueezeParam(flatbuffers::FlatBuf - } - - inline CastParamT *CastParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new CastParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new CastParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void CastParam::UnPackTo(CastParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = srcT(); _o->srcT = _e; }; -- { auto _e = dstT(); _o->dstT = _e; }; -+ { auto _e = srcT(); _o->srcT = _e; } -+ { auto _e = dstT(); _o->dstT = _e; } - } - - inline flatbuffers::Offset CastParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CastParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3628,19 +3553,19 @@ inline flatbuffers::Offset CreateCastParam(flatbuffers::FlatBufferBui - } - - inline ReductionParamT *ReductionParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ReductionParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ReductionParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void ReductionParam::UnPackTo(ReductionParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = operation(); _o->operation = _e; }; -- { auto _e = dim(); if (_e) { _o->dim.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim[_i] = _e->Get(_i); } } }; -- { auto _e = coeff(); _o->coeff = _e; }; -- { auto _e = keepDims(); _o->keepDims = _e; }; -- { auto _e = dType(); _o->dType = _e; }; -+ { auto _e = operation(); _o->operation = _e; } -+ { auto _e = dim(); if (_e) { _o->dim.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim[_i] = _e->Get(_i); } } } -+ { auto _e = coeff(); _o->coeff = _e; } -+ { auto _e = keepDims(); _o->keepDims = _e; } -+ { auto _e = dType(); _o->dType = _e; } - } - - inline flatbuffers::Offset ReductionParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReductionParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3666,18 +3591,18 @@ inline flatbuffers::Offset CreateReductionParam(flatbuffers::Fla - } - - inline GatherT *Gather::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new GatherT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new GatherT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Gather::UnPackTo(GatherT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = Tindices(); _o->Tindices = _e; }; -- { auto _e = Tparams(); _o->Tparams = _e; }; -- { auto _e = validateIndices(); _o->validateIndices = _e; }; -- { auto _e = axis(); _o->axis = _e; }; -+ { auto _e = Tindices(); _o->Tindices = _e; } -+ { auto _e = Tparams(); _o->Tparams = _e; } -+ { auto _e = validateIndices(); _o->validateIndices = _e; } -+ { auto _e = axis(); _o->axis = _e; } - } - - inline flatbuffers::Offset Gather::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3701,17 +3626,17 @@ inline flatbuffers::Offset CreateGather(flatbuffers::FlatBufferBuilder & - } - - inline ExpandDimsT *ExpandDims::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ExpandDimsT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ExpandDimsT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void ExpandDims::UnPackTo(ExpandDimsT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = T(); _o->T = _e; }; -- { auto _e = Tdim(); _o->Tdim = _e; }; -- { auto _e = axis(); _o->axis = _e; }; -+ { auto _e = T(); _o->T = _e; } -+ { auto _e = Tdim(); _o->Tdim = _e; } -+ { auto _e = axis(); _o->axis = _e; } - } - - inline flatbuffers::Offset ExpandDims::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExpandDimsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3733,16 +3658,16 @@ inline flatbuffers::Offset CreateExpandDims(flatbuffers::FlatBufferB - } - - inline SeluT *Selu::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new SeluT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new SeluT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Selu::UnPackTo(SeluT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = scale(); _o->scale = _e; }; -- { auto _e = alpha(); _o->alpha = _e; }; -+ { auto _e = scale(); _o->scale = _e; } -+ { auto _e = alpha(); _o->alpha = _e; } - } - - inline flatbuffers::Offset Selu::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SeluT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3762,20 +3687,20 @@ inline flatbuffers::Offset CreateSelu(flatbuffers::FlatBufferBuilder &_fbb - } - - inline AsStringT *AsString::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new AsStringT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new AsStringT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void AsString::UnPackTo(AsStringT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = T(); _o->T = _e; }; -- { auto _e = precision(); _o->precision = _e; }; -- { auto _e = scientific(); _o->scientific = _e; }; -- { auto _e = shortest(); _o->shortest = _e; }; -- { auto _e = width(); _o->width = _e; }; -- { auto _e = fillString(); if (_e) _o->fillString = _e->str(); }; -+ { auto _e = T(); _o->T = _e; } -+ { auto _e = precision(); _o->precision = _e; } -+ { auto _e = scientific(); _o->scientific = _e; } -+ { auto _e = shortest(); _o->shortest = _e; } -+ { auto _e = width(); _o->width = _e; } -+ { auto _e = fillString(); if (_e) _o->fillString = _e->str(); } - } - - inline flatbuffers::Offset AsString::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AsStringT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3803,16 +3728,16 @@ inline flatbuffers::Offset CreateAsString(flatbuffers::FlatBufferBuild - } - - inline ReduceJoinT *ReduceJoin::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ReduceJoinT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ReduceJoinT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void ReduceJoin::UnPackTo(ReduceJoinT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = keepDims(); _o->keepDims = _e; }; -- { auto _e = separator(); if (_e) _o->separator = _e->str(); }; -+ { auto _e = keepDims(); _o->keepDims = _e; } -+ { auto _e = separator(); if (_e) _o->separator = _e->str(); } - } - - inline flatbuffers::Offset ReduceJoin::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReduceJoinT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3832,16 +3757,16 @@ inline flatbuffers::Offset CreateReduceJoin(flatbuffers::FlatBufferB - } - - inline UnaryOpT *UnaryOp::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new UnaryOpT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new UnaryOpT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void UnaryOp::UnPackTo(UnaryOpT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = opType(); _o->opType = _e; }; -- { auto _e = T(); _o->T = _e; }; -+ { auto _e = opType(); _o->opType = _e; } -+ { auto _e = T(); _o->T = _e; } - } - - inline flatbuffers::Offset UnaryOp::Pack(flatbuffers::FlatBufferBuilder &_fbb, const UnaryOpT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3861,16 +3786,16 @@ inline flatbuffers::Offset CreateUnaryOp(flatbuffers::FlatBufferBuilder - } - - inline TopKV2T *TopKV2::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new TopKV2T(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new TopKV2T()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void TopKV2::UnPackTo(TopKV2T *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = T(); _o->T = _e; }; -- { auto _e = sorted(); _o->sorted = _e; }; -+ { auto _e = T(); _o->T = _e; } -+ { auto _e = sorted(); _o->sorted = _e; } - } - - inline flatbuffers::Offset TopKV2::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TopKV2T* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3890,16 +3815,16 @@ inline flatbuffers::Offset CreateTopKV2(flatbuffers::FlatBufferBuilder & - } - - inline CropAndResizeT *CropAndResize::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new CropAndResizeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new CropAndResizeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void CropAndResize::UnPackTo(CropAndResizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = extrapolationValue(); _o->extrapolationValue = _e; }; -- { auto _e = method(); _o->method = _e; }; -+ { auto _e = extrapolationValue(); _o->extrapolationValue = _e; } -+ { auto _e = method(); _o->method = _e; } - } - - inline flatbuffers::Offset CropAndResize::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CropAndResizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3919,9 +3844,9 @@ inline flatbuffers::Offset CreateCropAndResize(flatbuffers::FlatB - } - - inline FillT *Fill::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new FillT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new FillT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Fill::UnPackTo(FillT *_o, const flatbuffers::resolver_function_t *_resolver) const { -@@ -3942,17 +3867,17 @@ inline flatbuffers::Offset CreateFill(flatbuffers::FlatBufferBuilder &_fbb - } - - inline GatherV2T *GatherV2::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new GatherV2T(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new GatherV2T()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void GatherV2::UnPackTo(GatherV2T *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = Taxis(); _o->Taxis = _e; }; -- { auto _e = Tindices(); _o->Tindices = _e; }; -- { auto _e = Tparams(); _o->Tparams = _e; }; -+ { auto _e = Taxis(); _o->Taxis = _e; } -+ { auto _e = Tindices(); _o->Tindices = _e; } -+ { auto _e = Tparams(); _o->Tparams = _e; } - } - - inline flatbuffers::Offset GatherV2::Pack(flatbuffers::FlatBufferBuilder &_fbb, const GatherV2T* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -3974,9 +3899,9 @@ inline flatbuffers::Offset CreateGatherV2(flatbuffers::FlatBufferBuild - } - - inline NonMaxSuppressionV2T *NonMaxSuppressionV2::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new NonMaxSuppressionV2T(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new NonMaxSuppressionV2T()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void NonMaxSuppressionV2::UnPackTo(NonMaxSuppressionV2T *_o, const flatbuffers::resolver_function_t *_resolver) const { -@@ -3997,15 +3922,15 @@ inline flatbuffers::Offset CreateNonMaxSuppressionV2(flatbu - } - - inline RangeT *Range::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new RangeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new RangeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Range::UnPackTo(RangeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = Tidx(); _o->Tidx = _e; }; -+ { auto _e = Tidx(); _o->Tidx = _e; } - } - - inline flatbuffers::Offset Range::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RangeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4023,9 +3948,9 @@ inline flatbuffers::Offset CreateRange(flatbuffers::FlatBufferBuilder &_f - } - - inline RankT *Rank::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new RankT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new RankT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Rank::UnPackTo(RankT *_o, const flatbuffers::resolver_function_t *_resolver) const { -@@ -4046,15 +3971,15 @@ inline flatbuffers::Offset CreateRank(flatbuffers::FlatBufferBuilder &_fbb - } - - inline SizeT *Size::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new SizeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new SizeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Size::UnPackTo(SizeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = outputDataType(); _o->outputDataType = _e; }; -+ { auto _e = outputDataType(); _o->outputDataType = _e; } - } - - inline flatbuffers::Offset Size::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SizeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4072,15 +3997,15 @@ inline flatbuffers::Offset CreateSize(flatbuffers::FlatBufferBuilder &_fbb - } - - inline TransposeT *Transpose::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new TransposeT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new TransposeT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Transpose::UnPackTo(TransposeT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = Tperm(); _o->Tperm = _e; }; -+ { auto _e = Tperm(); _o->Tperm = _e; } - } - - inline flatbuffers::Offset Transpose::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TransposeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4098,15 +4023,15 @@ inline flatbuffers::Offset CreateTranspose(flatbuffers::FlatBufferBui - } - - inline SliceTfT *SliceTf::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new SliceTfT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new SliceTfT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void SliceTf::UnPackTo(SliceTfT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = T(); _o->T = _e; }; -+ { auto _e = T(); _o->T = _e; } - } - - inline flatbuffers::Offset SliceTf::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SliceTfT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4124,15 +4049,15 @@ inline flatbuffers::Offset CreateSliceTf(flatbuffers::FlatBufferBuilder - } - - inline QuantizeMaxMinT *QuantizeMaxMin::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new QuantizeMaxMinT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new QuantizeMaxMinT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void QuantizeMaxMin::UnPackTo(QuantizeMaxMinT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = T(); _o->T = _e; }; -+ { auto _e = T(); _o->T = _e; } - } - - inline flatbuffers::Offset QuantizeMaxMin::Pack(flatbuffers::FlatBufferBuilder &_fbb, const QuantizeMaxMinT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4150,16 +4075,16 @@ inline flatbuffers::Offset CreateQuantizeMaxMin(flatbuffers::Fla - } - - inline CropT *Crop::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new CropT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new CropT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void Crop::UnPackTo(CropT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = axis(); _o->axis = _e; }; -- { auto _e = offset(); if (_e) { _o->offset.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->offset[_i] = _e->Get(_i); } } }; -+ { auto _e = axis(); _o->axis = _e; } -+ { auto _e = offset(); if (_e) { _o->offset.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->offset[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset Crop::Pack(flatbuffers::FlatBufferBuilder &_fbb, const CropT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4179,16 +4104,16 @@ inline flatbuffers::Offset CreateCrop(flatbuffers::FlatBufferBuilder &_fbb - } - - inline SpaceBatchT *SpaceBatch::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new SpaceBatchT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new SpaceBatchT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void SpaceBatch::UnPackTo(SpaceBatchT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = blockShape(); if (_e) _o->blockShape = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = padding(); if (_e) _o->padding = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = blockShape(); if (_e) _o->blockShape = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = padding(); if (_e) _o->padding = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset SpaceBatch::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SpaceBatchT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4208,19 +4133,19 @@ inline flatbuffers::Offset CreateSpaceBatch(flatbuffers::FlatBufferB - } - - inline MatMulT *MatMul::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new MatMulT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new MatMulT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void MatMul::UnPackTo(MatMulT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = T(); _o->T = _e; }; -- { auto _e = transposeA(); _o->transposeA = _e; }; -- { auto _e = transposeB(); _o->transposeB = _e; }; -- { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } }; -- { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } }; -+ { auto _e = T(); _o->T = _e; } -+ { auto _e = transposeA(); _o->transposeA = _e; } -+ { auto _e = transposeB(); _o->transposeB = _e; } -+ { auto _e = weight(); if (_e) { _o->weight.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->weight[_i] = _e->Get(_i); } } } -+ { auto _e = bias(); if (_e) { _o->bias.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->bias[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset MatMul::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MatMulT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4246,17 +4171,17 @@ inline flatbuffers::Offset CreateMatMul(flatbuffers::FlatBufferBuilder & - } - - inline MomentsParamT *MomentsParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new MomentsParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new MomentsParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void MomentsParam::UnPackTo(MomentsParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = dim(); if (_e) { _o->dim.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim[_i] = _e->Get(_i); } } }; -- { auto _e = keepDims(); _o->keepDims = _e; }; -- { auto _e = dType(); _o->dType = _e; }; -+ { auto _e = dim(); if (_e) { _o->dim.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim[_i] = _e->Get(_i); } } } -+ { auto _e = keepDims(); _o->keepDims = _e; } -+ { auto _e = dType(); _o->dType = _e; } - } - - inline flatbuffers::Offset MomentsParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MomentsParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4278,25 +4203,25 @@ inline flatbuffers::Offset CreateMomentsParam(flatbuffers::FlatBuf - } - - inline RNNParamT *RNNParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new RNNParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new RNNParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void RNNParam::UnPackTo(RNNParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = numUnits(); _o->numUnits = _e; }; -- { auto _e = isBidirectionalRNN(); _o->isBidirectionalRNN = _e; }; -- { auto _e = keepAllOutputs(); _o->keepAllOutputs = _e; }; -- { auto _e = fwGateWeight(); if (_e) _o->fwGateWeight = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = fwGateBias(); if (_e) _o->fwGateBias = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = fwCandidateWeight(); if (_e) _o->fwCandidateWeight = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = fwCandidateBias(); if (_e) _o->fwCandidateBias = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = bwGateWeight(); if (_e) _o->bwGateWeight = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = bwGateBias(); if (_e) _o->bwGateBias = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = bwCandidateWeight(); if (_e) _o->bwCandidateWeight = std::unique_ptr(_e->UnPack(_resolver)); }; -- { auto _e = bwCandidateBias(); if (_e) _o->bwCandidateBias = std::unique_ptr(_e->UnPack(_resolver)); }; -+ { auto _e = numUnits(); _o->numUnits = _e; } -+ { auto _e = isBidirectionalRNN(); _o->isBidirectionalRNN = _e; } -+ { auto _e = keepAllOutputs(); _o->keepAllOutputs = _e; } -+ { auto _e = fwGateWeight(); if (_e) _o->fwGateWeight = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = fwGateBias(); if (_e) _o->fwGateBias = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = fwCandidateWeight(); if (_e) _o->fwCandidateWeight = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = fwCandidateBias(); if (_e) _o->fwCandidateBias = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = bwGateWeight(); if (_e) _o->bwGateWeight = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = bwGateBias(); if (_e) _o->bwGateBias = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = bwCandidateWeight(); if (_e) _o->bwCandidateWeight = std::unique_ptr(_e->UnPack(_resolver)); } -+ { auto _e = bwCandidateBias(); if (_e) _o->bwCandidateBias = std::unique_ptr(_e->UnPack(_resolver)); } - } - - inline flatbuffers::Offset RNNParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RNNParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4334,16 +4259,16 @@ inline flatbuffers::Offset CreateRNNParam(flatbuffers::FlatBufferBuild - } - - inline BatchMatMulParamT *BatchMatMulParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new BatchMatMulParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new BatchMatMulParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void BatchMatMulParam::UnPackTo(BatchMatMulParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = adjX(); _o->adjX = _e; }; -- { auto _e = adjY(); _o->adjY = _e; }; -+ { auto _e = adjX(); _o->adjX = _e; } -+ { auto _e = adjY(); _o->adjY = _e; } - } - - inline flatbuffers::Offset BatchMatMulParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BatchMatMulParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4363,16 +4288,16 @@ inline flatbuffers::Offset CreateBatchMatMulParam(flatbuffers: - } - - inline DepthSpaceParamT *DepthSpaceParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new DepthSpaceParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new DepthSpaceParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void DepthSpaceParam::UnPackTo(DepthSpaceParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = blockSize(); _o->blockSize = _e; }; -- { auto _e = mode(); _o->mode = _e; }; -+ { auto _e = blockSize(); _o->blockSize = _e; } -+ { auto _e = mode(); _o->mode = _e; } - } - - inline flatbuffers::Offset DepthSpaceParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DepthSpaceParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4392,16 +4317,16 @@ inline flatbuffers::Offset CreateDepthSpaceParam(flatbuffers::F - } - - inline ReverseSequenceParamT *ReverseSequenceParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new ReverseSequenceParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new ReverseSequenceParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void ReverseSequenceParam::UnPackTo(ReverseSequenceParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = batchDim(); _o->batchDim = _e; }; -- { auto _e = seqDim(); _o->seqDim = _e; }; -+ { auto _e = batchDim(); _o->batchDim = _e; } -+ { auto _e = seqDim(); _o->seqDim = _e; } - } - - inline flatbuffers::Offset ReverseSequenceParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ReverseSequenceParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4421,22 +4346,22 @@ inline flatbuffers::Offset CreateReverseSequenceParam(flat - } - - inline DetectionPostProcessParamT *DetectionPostProcessParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new DetectionPostProcessParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new DetectionPostProcessParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void DetectionPostProcessParam::UnPackTo(DetectionPostProcessParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = maxDetections(); _o->maxDetections = _e; }; -- { auto _e = maxClassesPerDetection(); _o->maxClassesPerDetection = _e; }; -- { auto _e = detectionsPerClass(); _o->detectionsPerClass = _e; }; -- { auto _e = nmsScoreThreshold(); _o->nmsScoreThreshold = _e; }; -- { auto _e = iouThreshold(); _o->iouThreshold = _e; }; -- { auto _e = numClasses(); _o->numClasses = _e; }; -- { auto _e = useRegularNMS(); _o->useRegularNMS = _e; }; -- { auto _e = centerSizeEncoding(); if (_e) { _o->centerSizeEncoding.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->centerSizeEncoding[_i] = _e->Get(_i); } } }; -+ { auto _e = maxDetections(); _o->maxDetections = _e; } -+ { auto _e = maxClassesPerDetection(); _o->maxClassesPerDetection = _e; } -+ { auto _e = detectionsPerClass(); _o->detectionsPerClass = _e; } -+ { auto _e = nmsScoreThreshold(); _o->nmsScoreThreshold = _e; } -+ { auto _e = iouThreshold(); _o->iouThreshold = _e; } -+ { auto _e = numClasses(); _o->numClasses = _e; } -+ { auto _e = useRegularNMS(); _o->useRegularNMS = _e; } -+ { auto _e = centerSizeEncoding(); if (_e) { _o->centerSizeEncoding.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->centerSizeEncoding[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset DetectionPostProcessParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const DetectionPostProcessParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4468,16 +4393,16 @@ inline flatbuffers::Offset CreateDetectionPostProcess - } - - inline OneHotParamT *OneHotParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new OneHotParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new OneHotParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void OneHotParam::UnPackTo(OneHotParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = dType(); _o->dType = _e; }; -- { auto _e = axis(); _o->axis = _e; }; -+ { auto _e = dType(); _o->dType = _e; } -+ { auto _e = axis(); _o->axis = _e; } - } - - inline flatbuffers::Offset OneHotParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OneHotParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4497,15 +4422,15 @@ inline flatbuffers::Offset CreateOneHotParam(flatbuffers::FlatBuffe - } - - inline PadParamT *PadParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new PadParamT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new PadParamT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void PadParam::UnPackTo(PadParamT *_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 PadParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PadParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4523,18 +4448,18 @@ inline flatbuffers::Offset CreatePadParam(flatbuffers::FlatBufferBuild - } - - inline LayerNormT *LayerNorm::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new LayerNormT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new LayerNormT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void LayerNorm::UnPackTo(LayerNormT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = axis(); if (_e) { _o->axis.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->axis[_i] = _e->Get(_i); } } }; -- { auto _e = epsilon(); _o->epsilon = _e; }; -- { auto _e = gamma(); if (_e) { _o->gamma.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->gamma[_i] = _e->Get(_i); } } }; -- { auto _e = beta(); if (_e) { _o->beta.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->beta[_i] = _e->Get(_i); } } }; -+ { auto _e = axis(); if (_e) { _o->axis.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->axis[_i] = _e->Get(_i); } } } -+ { auto _e = epsilon(); _o->epsilon = _e; } -+ { auto _e = gamma(); if (_e) { _o->gamma.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->gamma[_i] = _e->Get(_i); } } } -+ { auto _e = beta(); if (_e) { _o->beta.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->beta[_i] = _e->Get(_i); } } } - } - - inline flatbuffers::Offset LayerNorm::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LayerNormT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4558,18 +4483,18 @@ inline flatbuffers::Offset CreateLayerNorm(flatbuffers::FlatBufferBui - } - - inline RandomUniformT *RandomUniform::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new RandomUniformT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new RandomUniformT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void RandomUniform::UnPackTo(RandomUniformT *_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 = type(); _o->type = _e; }; -- { auto _e = T(); _o->T = _e; }; -+ { auto _e = seed(); _o->seed = _e; } -+ { auto _e = seed2(); _o->seed2 = _e; } -+ { auto _e = type(); _o->type = _e; } -+ { auto _e = T(); _o->T = _e; } - } - - inline flatbuffers::Offset RandomUniform::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RandomUniformT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -4618,7 +4543,7 @@ inline const flatbuffers::TypeTable *BinaryOpOperationTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- BinaryOpOperationTypeTable -+ MNN::BinaryOpOperationTypeTable - }; - static const int64_t values[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22 }; - static const char * const names[] = { -@@ -4646,7 +4571,7 @@ inline const flatbuffers::TypeTable *BinaryOpOperationTypeTable() { - "NOTEQUAL" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 22, type_codes, type_refs, values, names -+ flatbuffers::ST_ENUM, 22, type_codes, type_refs, nullptr, values, names - }; - return &tt; - } -@@ -4664,7 +4589,7 @@ inline const flatbuffers::TypeTable *ReductionTypeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ReductionTypeTypeTable -+ MNN::ReductionTypeTypeTable - }; - static const char * const names[] = { - "SUM", -@@ -4678,7 +4603,7 @@ inline const flatbuffers::TypeTable *ReductionTypeTypeTable() { - "ALL" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 9, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 9, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4718,7 +4643,7 @@ inline const flatbuffers::TypeTable *UnaryOpOperationTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- UnaryOpOperationTypeTable -+ MNN::UnaryOpOperationTypeTable - }; - static const char * const names[] = { - "ABS", -@@ -4754,7 +4679,7 @@ inline const flatbuffers::TypeTable *UnaryOpOperationTypeTable() { - "TANH" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 31, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 31, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4765,14 +4690,14 @@ inline const flatbuffers::TypeTable *CropAndResizeMethodTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- CropAndResizeMethodTypeTable -+ MNN::CropAndResizeMethodTypeTable - }; - static const char * const names[] = { - "BILINEAR", - "NEAREST" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4783,14 +4708,14 @@ inline const flatbuffers::TypeTable *DepthToSpaceModeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DepthToSpaceModeTypeTable -+ MNN::DepthToSpaceModeTypeTable - }; - static const char * const names[] = { - "DCR", - "CRD" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4802,7 +4727,7 @@ inline const flatbuffers::TypeTable *PadValueModeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- PadValueModeTypeTable -+ MNN::PadValueModeTypeTable - }; - static const char * const names[] = { - "CONSTANT", -@@ -4810,7 +4735,7 @@ inline const flatbuffers::TypeTable *PadValueModeTypeTable() { - "SYMMETRIC" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4821,14 +4746,14 @@ inline const flatbuffers::TypeTable *BinaryOpTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "opType", - "T" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4839,14 +4764,14 @@ inline const flatbuffers::TypeTable *PackParamTypeTable() { - { flatbuffers::ET_INT, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "dataType", - "axis" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4862,7 +4787,7 @@ inline const flatbuffers::TypeTable *StridedSliceParamTypeTable() { - { flatbuffers::ET_INT, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "Index", -@@ -4874,7 +4799,7 @@ inline const flatbuffers::TypeTable *StridedSliceParamTypeTable() { - "shrinkAxisMask" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4887,7 +4812,7 @@ inline const flatbuffers::TypeTable *SqueezeParamTypeTable() { - "squeezeDims" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -4898,14 +4823,14 @@ inline const flatbuffers::TypeTable *CastParamTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "srcT", - "dstT" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4919,8 +4844,8 @@ inline const flatbuffers::TypeTable *ReductionParamTypeTable() { - { flatbuffers::ET_INT, 0, 1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- ReductionTypeTypeTable, -- DataTypeTypeTable -+ MNN::ReductionTypeTypeTable, -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "operation", -@@ -4930,7 +4855,7 @@ inline const flatbuffers::TypeTable *ReductionParamTypeTable() { - "dType" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4943,7 +4868,7 @@ inline const flatbuffers::TypeTable *GatherTypeTable() { - { flatbuffers::ET_INT, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "Tindices", -@@ -4952,7 +4877,7 @@ inline const flatbuffers::TypeTable *GatherTypeTable() { - "axis" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4964,7 +4889,7 @@ inline const flatbuffers::TypeTable *ExpandDimsTypeTable() { - { flatbuffers::ET_INT, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "T", -@@ -4972,7 +4897,7 @@ inline const flatbuffers::TypeTable *ExpandDimsTypeTable() { - "axis" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -4987,7 +4912,7 @@ inline const flatbuffers::TypeTable *SeluTypeTable() { - "alpha" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -5002,7 +4927,7 @@ inline const flatbuffers::TypeTable *AsStringTypeTable() { - { flatbuffers::ET_STRING, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "T", -@@ -5013,7 +4938,7 @@ inline const flatbuffers::TypeTable *AsStringTypeTable() { - "fillString" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5028,7 +4953,7 @@ inline const flatbuffers::TypeTable *ReduceJoinTypeTable() { - "separator" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -5039,15 +4964,15 @@ inline const flatbuffers::TypeTable *UnaryOpTypeTable() { - { flatbuffers::ET_INT, 0, 1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- UnaryOpOperationTypeTable, -- DataTypeTypeTable -+ MNN::UnaryOpOperationTypeTable, -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "opType", - "T" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5058,14 +4983,14 @@ inline const flatbuffers::TypeTable *TopKV2TypeTable() { - { flatbuffers::ET_BOOL, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "T", - "sorted" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5076,21 +5001,21 @@ inline const flatbuffers::TypeTable *CropAndResizeTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- CropAndResizeMethodTypeTable -+ MNN::CropAndResizeMethodTypeTable - }; - static const char * const names[] = { - "extrapolationValue", - "method" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } - - inline const flatbuffers::TypeTable *FillTypeTable() { - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr -+ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr - }; - return &tt; - } -@@ -5102,7 +5027,7 @@ inline const flatbuffers::TypeTable *GatherV2TypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "Taxis", -@@ -5110,14 +5035,14 @@ inline const flatbuffers::TypeTable *GatherV2TypeTable() { - "Tparams" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } - - inline const flatbuffers::TypeTable *NonMaxSuppressionV2TypeTable() { - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr -+ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr - }; - return &tt; - } -@@ -5127,20 +5052,20 @@ inline const flatbuffers::TypeTable *RangeTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "Tidx" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } - - inline const flatbuffers::TypeTable *RankTypeTable() { - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr -+ flatbuffers::ST_TABLE, 0, nullptr, nullptr, nullptr, nullptr, nullptr - }; - return &tt; - } -@@ -5150,13 +5075,13 @@ inline const flatbuffers::TypeTable *SizeTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "outputDataType" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5166,13 +5091,13 @@ inline const flatbuffers::TypeTable *TransposeTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "Tperm" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5182,13 +5107,13 @@ inline const flatbuffers::TypeTable *SliceTfTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "T" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5198,13 +5123,13 @@ inline const flatbuffers::TypeTable *QuantizeMaxMinTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "T" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5219,7 +5144,7 @@ inline const flatbuffers::TypeTable *CropTypeTable() { - "offset" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -5230,14 +5155,14 @@ inline const flatbuffers::TypeTable *SpaceBatchTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- BlobTypeTable -+ MNN::BlobTypeTable - }; - static const char * const names[] = { - "blockShape", - "padding" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5251,7 +5176,7 @@ inline const flatbuffers::TypeTable *MatMulTypeTable() { - { flatbuffers::ET_FLOAT, 1, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "T", -@@ -5261,7 +5186,7 @@ inline const flatbuffers::TypeTable *MatMulTypeTable() { - "bias" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5273,7 +5198,7 @@ inline const flatbuffers::TypeTable *MomentsParamTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "dim", -@@ -5281,7 +5206,7 @@ inline const flatbuffers::TypeTable *MomentsParamTypeTable() { - "dType" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 3, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5301,7 +5226,7 @@ inline const flatbuffers::TypeTable *RNNParamTypeTable() { - { flatbuffers::ET_SEQUENCE, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- BlobTypeTable -+ MNN::BlobTypeTable - }; - static const char * const names[] = { - "numUnits", -@@ -5317,7 +5242,7 @@ inline const flatbuffers::TypeTable *RNNParamTypeTable() { - "bwCandidateBias" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 11, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5332,7 +5257,7 @@ inline const flatbuffers::TypeTable *BatchMatMulParamTypeTable() { - "adjY" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -5343,14 +5268,14 @@ inline const flatbuffers::TypeTable *DepthSpaceParamTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DepthToSpaceModeTypeTable -+ MNN::DepthToSpaceModeTypeTable - }; - static const char * const names[] = { - "blockSize", - "mode" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5365,7 +5290,7 @@ inline const flatbuffers::TypeTable *ReverseSequenceParamTypeTable() { - "seqDim" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -5392,7 +5317,7 @@ inline const flatbuffers::TypeTable *DetectionPostProcessParamTypeTable() { - "centerSizeEncoding" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 8, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 8, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -5403,14 +5328,14 @@ inline const flatbuffers::TypeTable *OneHotParamTypeTable() { - { flatbuffers::ET_INT, 0, -1 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "dType", - "axis" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5420,13 +5345,13 @@ inline const flatbuffers::TypeTable *PadParamTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- PadValueModeTypeTable -+ MNN::PadValueModeTypeTable - }; - static const char * const names[] = { - "mode" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 1, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -5445,7 +5370,7 @@ inline const flatbuffers::TypeTable *LayerNormTypeTable() { - "beta" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, nullptr, names - }; - return &tt; - } -@@ -5458,7 +5383,7 @@ inline const flatbuffers::TypeTable *RandomUniformTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "seed", -@@ -5467,7 +5392,7 @@ inline const flatbuffers::TypeTable *RandomUniformTypeTable() { - "T" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -diff --git a/schema/current/Type_generated.h b/schema/current/Type_generated.h -index f444072f..b7bfd4d9 100644 ---- a/schema/current/Type_generated.h -+++ b/schema/current/Type_generated.h -@@ -8,7 +8,7 @@ - - namespace MNN { - --enum NetSource { -+enum NetSource : int8_t { - NetSource_CAFFE = 0, - NetSource_TENSORFLOW = 1, - NetSource_TFLITE = 2, -@@ -28,7 +28,7 @@ inline const NetSource (&EnumValuesNetSource())[4] { - } - - inline const char * const *EnumNamesNetSource() { -- static const char * const names[] = { -+ static const char * const names[5] = { - "CAFFE", - "TENSORFLOW", - "TFLITE", -@@ -39,12 +39,12 @@ inline const char * const *EnumNamesNetSource() { - } - - inline const char *EnumNameNetSource(NetSource e) { -- if (e < NetSource_CAFFE || e > NetSource_ONNX) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, NetSource_CAFFE, NetSource_ONNX)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesNetSource()[index]; - } - --enum DataType { -+enum DataType : int32_t { - DataType_DT_INVALID = 0, - DataType_DT_FLOAT = 1, - DataType_DT_DOUBLE = 2, -@@ -100,7 +100,7 @@ inline const DataType (&EnumValuesDataType())[22] { - } - - inline const char * const *EnumNamesDataType() { -- static const char * const names[] = { -+ static const char * const names[23] = { - "DT_INVALID", - "DT_FLOAT", - "DT_DOUBLE", -@@ -129,8 +129,8 @@ inline const char * const *EnumNamesDataType() { - } - - inline const char *EnumNameDataType(DataType e) { -- if (e < DataType_DT_INVALID || e > DataType_DT_VARIANT) return ""; -- const size_t index = static_cast(e); -+ if (flatbuffers::IsOutRange(e, DataType_DT_INVALID, DataType_DT_VARIANT)) return ""; -+ const size_t index = static_cast(e); - return EnumNamesDataType()[index]; - } - -@@ -142,7 +142,7 @@ inline const flatbuffers::TypeTable *NetSourceTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- NetSourceTypeTable -+ MNN::NetSourceTypeTable - }; - static const char * const names[] = { - "CAFFE", -@@ -151,7 +151,7 @@ inline const flatbuffers::TypeTable *NetSourceTypeTable() { - "ONNX" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 4, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 4, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -@@ -182,7 +182,7 @@ inline const flatbuffers::TypeTable *DataTypeTypeTable() { - { flatbuffers::ET_INT, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- DataTypeTypeTable -+ MNN::DataTypeTypeTable - }; - static const char * const names[] = { - "DT_INVALID", -@@ -209,7 +209,7 @@ inline const flatbuffers::TypeTable *DataTypeTypeTable() { - "DT_VARIANT" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_ENUM, 22, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_ENUM, 22, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } -diff --git a/schema/current/UserDefine_generated.h b/schema/current/UserDefine_generated.h -index 7935cf21..f41a4771 100644 ---- a/schema/current/UserDefine_generated.h -+++ b/schema/current/UserDefine_generated.h -@@ -4,29 +4,28 @@ - #ifndef FLATBUFFERS_GENERATED_USERDEFINE_MNN_H_ - #define FLATBUFFERS_GENERATED_USERDEFINE_MNN_H_ - -+#include "flatbuffers/flatbuffers.h" - --#include "Tensor_generated.h" - #include "Type_generated.h" -+#include "Tensor_generated.h" - - namespace MNN { - - struct TensorConvertInfo; -+struct TensorConvertInfoBuilder; - struct TensorConvertInfoT; - - inline const flatbuffers::TypeTable *TensorConvertInfoTypeTable(); - - struct TensorConvertInfoT : public flatbuffers::NativeTable { - typedef TensorConvertInfo TableType; -- MNN_DATA_FORMAT source; -- MNN_DATA_FORMAT dest; -- TensorConvertInfoT() -- : source(MNN_DATA_FORMAT_NCHW), -- dest(MNN_DATA_FORMAT_NCHW) { -- } -+ MNN::MNN_DATA_FORMAT source = MNN::MNN_DATA_FORMAT_NCHW; -+ MNN::MNN_DATA_FORMAT dest = MNN::MNN_DATA_FORMAT_NCHW; - }; - - struct TensorConvertInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TensorConvertInfoT NativeTableType; -+ typedef TensorConvertInfoBuilder Builder; - static const flatbuffers::TypeTable *MiniReflectTypeTable() { - return TensorConvertInfoTypeTable(); - } -@@ -34,11 +33,11 @@ struct TensorConvertInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - VT_SOURCE = 4, - VT_DEST = 6 - }; -- MNN_DATA_FORMAT source() const { -- return static_cast(GetField(VT_SOURCE, 0)); -+ MNN::MNN_DATA_FORMAT source() const { -+ return static_cast(GetField(VT_SOURCE, 0)); - } -- MNN_DATA_FORMAT dest() const { -- return static_cast(GetField(VT_DEST, 0)); -+ MNN::MNN_DATA_FORMAT dest() const { -+ return static_cast(GetField(VT_DEST, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && -@@ -52,19 +51,19 @@ struct TensorConvertInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - }; - - struct TensorConvertInfoBuilder { -+ typedef TensorConvertInfo Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; -- void add_source(MNN_DATA_FORMAT source) { -+ void add_source(MNN::MNN_DATA_FORMAT source) { - fbb_.AddElement(TensorConvertInfo::VT_SOURCE, static_cast(source), 0); - } -- void add_dest(MNN_DATA_FORMAT dest) { -+ void add_dest(MNN::MNN_DATA_FORMAT dest) { - fbb_.AddElement(TensorConvertInfo::VT_DEST, static_cast(dest), 0); - } - explicit TensorConvertInfoBuilder(flatbuffers::FlatBufferBuilder &_fbb) - : fbb_(_fbb) { - start_ = fbb_.StartTable(); - } -- TensorConvertInfoBuilder &operator=(const TensorConvertInfoBuilder &); - flatbuffers::Offset Finish() { - const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); -@@ -74,8 +73,8 @@ struct TensorConvertInfoBuilder { - - inline flatbuffers::Offset CreateTensorConvertInfo( - flatbuffers::FlatBufferBuilder &_fbb, -- MNN_DATA_FORMAT source = MNN_DATA_FORMAT_NCHW, -- MNN_DATA_FORMAT dest = MNN_DATA_FORMAT_NCHW) { -+ MNN::MNN_DATA_FORMAT source = MNN::MNN_DATA_FORMAT_NCHW, -+ MNN::MNN_DATA_FORMAT dest = MNN::MNN_DATA_FORMAT_NCHW) { - TensorConvertInfoBuilder builder_(_fbb); - builder_.add_dest(dest); - builder_.add_source(source); -@@ -85,16 +84,16 @@ inline flatbuffers::Offset CreateTensorConvertInfo( - flatbuffers::Offset CreateTensorConvertInfo(flatbuffers::FlatBufferBuilder &_fbb, const TensorConvertInfoT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); - - inline TensorConvertInfoT *TensorConvertInfo::UnPack(const flatbuffers::resolver_function_t *_resolver) const { -- auto _o = new TensorConvertInfoT(); -- UnPackTo(_o, _resolver); -- return _o; -+ auto _o = std::unique_ptr(new TensorConvertInfoT()); -+ UnPackTo(_o.get(), _resolver); -+ return _o.release(); - } - - inline void TensorConvertInfo::UnPackTo(TensorConvertInfoT *_o, const flatbuffers::resolver_function_t *_resolver) const { - (void)_o; - (void)_resolver; -- { auto _e = source(); _o->source = _e; }; -- { auto _e = dest(); _o->dest = _e; }; -+ { auto _e = source(); _o->source = _e; } -+ { auto _e = dest(); _o->dest = _e; } - } - - inline flatbuffers::Offset TensorConvertInfo::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorConvertInfoT* _o, const flatbuffers::rehasher_function_t *_rehasher) { -@@ -119,14 +118,14 @@ inline const flatbuffers::TypeTable *TensorConvertInfoTypeTable() { - { flatbuffers::ET_CHAR, 0, 0 } - }; - static const flatbuffers::TypeFunction type_refs[] = { -- MNN_DATA_FORMATTypeTable -+ MNN::MNN_DATA_FORMATTypeTable - }; - static const char * const names[] = { - "source", - "dest" - }; - static const flatbuffers::TypeTable tt = { -- flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names -+ flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, nullptr, names - }; - return &tt; - } diff --git a/ports/mnn/vcpkg.json b/ports/mnn/vcpkg.json index 037bf3c53cc991..8b757f7329c805 100644 --- a/ports/mnn/vcpkg.json +++ b/ports/mnn/vcpkg.json @@ -7,7 +7,10 @@ "license": "Apache-2.0", "supports": "!(arm | uwp | ios | android)", "dependencies": [ - "flatbuffers", + { + "name": "flatbuffers", + "host": true + }, "rapidjson", "stb" ], From 68de0bd1e425e56389042b1571090574b21598dc Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Wed, 14 Jul 2021 21:59:18 +0800 Subject: [PATCH 11/19] run `vcpkg x-add-version mnn --overwrite-version` --- versions/m-/mnn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index a79c8f77fcbabc..d4ec18dd5f9246 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "c57886000ea4ca96f6c61dd5b432ee8cb2b1852b", + "git-tree": "97b7a72e27319f0fdbd5a3878b555d6d300b9822", "version": "1.1.0", "port-version": 1 }, From fbb566ccb6812299af0e42f1a3c2dda29207a47e Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Thu, 15 Jul 2021 10:38:39 +0800 Subject: [PATCH 12/19] add `flatbuffers` in dependencies --- ports/mnn/vcpkg.json | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/mnn/vcpkg.json b/ports/mnn/vcpkg.json index 8b757f7329c805..27676e8630fd49 100644 --- a/ports/mnn/vcpkg.json +++ b/ports/mnn/vcpkg.json @@ -7,6 +7,7 @@ "license": "Apache-2.0", "supports": "!(arm | uwp | ios | android)", "dependencies": [ + "flatbuffers", { "name": "flatbuffers", "host": true From 68a79c6cb582bcc969bff7e95ec99ea237bb437f Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Thu, 15 Jul 2021 10:39:06 +0800 Subject: [PATCH 13/19] run `vcpkg x-add-version mnn --overwrite-version` --- versions/m-/mnn.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index d4ec18dd5f9246..7b4336ccead156 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "97b7a72e27319f0fdbd5a3878b555d6d300b9822", + "git-tree": "4b1958684046b17ebc9460740b6f7dd32e51a113", "version": "1.1.0", "port-version": 1 }, From a9ccb2ff21dcc97688d418025ee0669ab41ba181 Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Thu, 15 Jul 2021 11:10:55 +0800 Subject: [PATCH 14/19] new port version for mnn --- ports/mnn/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mnn/vcpkg.json b/ports/mnn/vcpkg.json index 27676e8630fd49..0b21ba2f4a8251 100644 --- a/ports/mnn/vcpkg.json +++ b/ports/mnn/vcpkg.json @@ -1,7 +1,7 @@ { "name": "mnn", "version": "1.1.0", - "port-version": 1, + "port-version": 2, "description": "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba", "homepage": "https://www.mnn.zone/", "license": "Apache-2.0", From feefdf63171460e1387f19983cf09bce29eae2f7 Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Thu, 15 Jul 2021 11:29:56 +0800 Subject: [PATCH 15/19] run `vcpkg x-add-version mnn --overwrite-version` to rebuild --- versions/baseline.json | 2 +- versions/m-/mnn.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index cff11adf95d939..19f1405e763011 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4086,7 +4086,7 @@ }, "mnn": { "baseline": "1.1.0", - "port-version": 1 + "port-version": 2 }, "modp-base64": { "baseline": "2020-09-26", diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index 7b4336ccead156..0dc4b8f270e515 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "333b22206e7febfd1c11f9ce7789c47ac19a9105", + "version": "1.1.0", + "port-version": 2 + }, { "git-tree": "4b1958684046b17ebc9460740b6f7dd32e51a113", "version": "1.1.0", From 2df069d518c5ffe0863fc5c0932ab6d88188997f Mon Sep 17 00:00:00 2001 From: Xing Ji <33065325+jixingcn@users.noreply.github.com> Date: Thu, 15 Jul 2021 14:39:02 +0800 Subject: [PATCH 16/19] Update versions/m-/mnn.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- versions/m-/mnn.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index 0dc4b8f270e515..7b4336ccead156 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,10 +1,5 @@ { "versions": [ - { - "git-tree": "333b22206e7febfd1c11f9ce7789c47ac19a9105", - "version": "1.1.0", - "port-version": 2 - }, { "git-tree": "4b1958684046b17ebc9460740b6f7dd32e51a113", "version": "1.1.0", From 8c42465ed6f975d43c198c7eed868c439ea053fc Mon Sep 17 00:00:00 2001 From: Xing Ji <33065325+jixingcn@users.noreply.github.com> Date: Thu, 15 Jul 2021 14:39:14 +0800 Subject: [PATCH 17/19] Update ports/mnn/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> --- ports/mnn/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/mnn/vcpkg.json b/ports/mnn/vcpkg.json index 0b21ba2f4a8251..27676e8630fd49 100644 --- a/ports/mnn/vcpkg.json +++ b/ports/mnn/vcpkg.json @@ -1,7 +1,7 @@ { "name": "mnn", "version": "1.1.0", - "port-version": 2, + "port-version": 1, "description": "MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba", "homepage": "https://www.mnn.zone/", "license": "Apache-2.0", From 888b50b01a6f64c98e4f17174f175460c366f0a3 Mon Sep 17 00:00:00 2001 From: Xing Ji Date: Thu, 15 Jul 2021 17:50:28 +0800 Subject: [PATCH 18/19] run `vcpkg x-add-version mnn --overwrite-version` --- versions/baseline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 19f1405e763011..cff11adf95d939 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4086,7 +4086,7 @@ }, "mnn": { "baseline": "1.1.0", - "port-version": 2 + "port-version": 1 }, "modp-base64": { "baseline": "2020-09-26", From 4b8a9047eeba399ad8a17611de8019e855861554 Mon Sep 17 00:00:00 2001 From: Billy Robert ONeal III Date: Fri, 16 Jul 2021 00:34:26 -0700 Subject: [PATCH 19/19] Add missing quotes. --- ports/mnn/portfile.cmake | 8 ++++---- versions/m-/mnn.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/mnn/portfile.cmake b/ports/mnn/portfile.cmake index d816477fe07870..8147fddb1dba20 100644 --- a/ports/mnn/portfile.cmake +++ b/ports/mnn/portfile.cmake @@ -34,7 +34,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS ) # 'cuda' feature in Windows failes with Ninja because of parallel PDB access. Make it optional -set(NINJA_OPTION PREFER_NINJA) +set(NINJA_OPTION PREFER_NINJA) if("cuda" IN_LIST FEATURES) unset(NINJA_OPTION) endif() @@ -46,7 +46,7 @@ endif() # regenerate some code files by schemes and flatbuffers vcpkg_execute_build_process( - COMMAND ${FLATC_EXEC} "-c" "-b" "--gen-object-api" "--reflect-names" + COMMAND "${FLATC_EXEC}" "-c" "-b" "--gen-object-api" "--reflect-names" "../default/BasicOptimizer.fbs" "../default/CaffeOp.fbs" "../default/GpuLibrary.fbs" @@ -56,7 +56,7 @@ vcpkg_execute_build_process( "../default/TFQuantizeOp.fbs" "../default/Type.fbs" "../default/UserDefine.fbs" - WORKING_DIRECTORY ${SOURCE_PATH}/schema/current/ + WORKING_DIRECTORY "${SOURCE_PATH}/schema/current/" LOGNAME flatc-${TARGET_TRIPLET} ) @@ -82,7 +82,7 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_download_distfile(COPYRIGHT_PATH - URLS "https://apache.org/licenses/LICENSE-2.0.txt" + URLS "https://apache.org/licenses/LICENSE-2.0.txt" FILENAME 98f6b79b778f7b0a1541.txt SHA512 98f6b79b778f7b0a15415bd750c3a8a097d650511cb4ec8115188e115c47053fe700f578895c097051c9bc3dfb6197c2b13a15de203273e1a3218884f86e90e8 ) diff --git a/versions/m-/mnn.json b/versions/m-/mnn.json index 7b4336ccead156..fd88fd1d559b0b 100644 --- a/versions/m-/mnn.json +++ b/versions/m-/mnn.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "4b1958684046b17ebc9460740b6f7dd32e51a113", + "git-tree": "10351b13b0daa0e66de483597da63e0d60e9777a", "version": "1.1.0", "port-version": 1 },