// automatically generated by the FlatBuffers compiler, do not modify #ifndef FLATBUFFERS_GENERATED_MNN_MNN_H_ #define FLATBUFFERS_GENERATED_MNN_MNN_H_ #include "CaffeOp_generated.h" #include "ExtraInfo_generated.h" #include "TFQuantizeOp_generated.h" #include "Tensor_generated.h" #include "TensorflowOp_generated.h" #include "Type_generated.h" #include "UserDefine_generated.h" namespace MNN { struct Plugin; struct PluginT; struct Extra; struct ExtraT; struct StringVec; struct StringVecT; struct AttentionParam; struct AttentionParamT; struct LinearAttentionParam; struct LinearAttentionParamT; struct RoPEParam; struct RoPEParamT; struct FmhaV2Param; struct FmhaV2ParamT; struct FmhcaParam; struct FmhcaParamT; struct StftParam; struct StftParamT; struct ShapeParam; struct ShapeParamT; struct WhileParam; struct WhileParamT; struct IfParam; struct IfParamT; struct RegionCommand; struct RegionCommandT; struct LoopParam; struct LoopParamT; struct Op; struct OpT; struct View; struct ViewT; struct Region; struct RegionT; struct TensorDescribe; struct TensorDescribeT; struct SubGraphProto; struct SubGraphProtoT; struct TensorQuantInfo; struct TensorQuantInfoT; struct Net; struct NetT; inline const flatbuffers::TypeTable *PluginTypeTable(); inline const flatbuffers::TypeTable *ExtraTypeTable(); inline const flatbuffers::TypeTable *StringVecTypeTable(); inline const flatbuffers::TypeTable *AttentionParamTypeTable(); inline const flatbuffers::TypeTable *LinearAttentionParamTypeTable(); inline const flatbuffers::TypeTable *RoPEParamTypeTable(); inline const flatbuffers::TypeTable *FmhaV2ParamTypeTable(); inline const flatbuffers::TypeTable *FmhcaParamTypeTable(); inline const flatbuffers::TypeTable *StftParamTypeTable(); inline const flatbuffers::TypeTable *ShapeParamTypeTable(); inline const flatbuffers::TypeTable *WhileParamTypeTable(); inline const flatbuffers::TypeTable *IfParamTypeTable(); inline const flatbuffers::TypeTable *RegionCommandTypeTable(); inline const flatbuffers::TypeTable *LoopParamTypeTable(); inline const flatbuffers::TypeTable *OpTypeTable(); inline const flatbuffers::TypeTable *ViewTypeTable(); inline const flatbuffers::TypeTable *RegionTypeTable(); inline const flatbuffers::TypeTable *TensorDescribeTypeTable(); inline const flatbuffers::TypeTable *SubGraphProtoTypeTable(); inline const flatbuffers::TypeTable *TensorQuantInfoTypeTable(); inline const flatbuffers::TypeTable *NetTypeTable(); enum OpType { OpType_AbsVal = 0, OpType_QuantizedAdd = 1, OpType_ArgMax = 2, OpType_AsString = 3, OpType_InstanceNorm = 4, OpType_BatchToSpaceND = 5, OpType_Copy = 6, OpType_BinaryOp = 7, OpType_Bnll = 8, OpType_Cast = 9, OpType_Concat = 10, OpType_Const = 11, OpType_Convolution = 12, OpType_ConvolutionDepthwise = 13, OpType_Crop = 14, OpType_CropAndResize = 15, OpType_ImageProcess = 16, OpType_Deconvolution = 17, OpType_DeconvolutionDepthwise = 18, OpType_Dequantize = 19, OpType_DetectionOutput = 20, OpType_Dropout = 21, OpType_Eltwise = 22, OpType_ELU = 23, OpType_Unique = 24, OpType_Exp = 25, OpType_ExpandDims = 26, OpType_Fill = 27, OpType_Flatten = 28, OpType_Im2Col = 29, OpType_Gather = 30, OpType_GatherV2 = 31, OpType_Im2Seq = 32, OpType_InnerProduct = 33, OpType_Input = 34, OpType_Interp = 35, OpType_Log = 36, OpType_LRN = 37, OpType_LSTM = 38, OpType_MatMul = 39, OpType_MoE = 40, OpType_NonMaxSuppression = 41, OpType_NonMaxSuppressionV2 = 42, OpType_Normalize = 43, OpType_Pack = 44, OpType_Padding = 45, OpType_Permute = 46, OpType_Pooling = 47, OpType_Power = 48, OpType_PReLU = 49, OpType_PriorBox = 50, OpType_Proposal = 51, OpType_QuantizedAvgPool = 52, OpType_QuantizedBiasAdd = 53, OpType_QuantizedConcat = 54, OpType_QuantizedDepthwiseConv2D = 55, OpType_QuantizedLogistic = 56, OpType_RasterAndInterpolate = 57, OpType_QuantizedMaxPool = 58, OpType_Texture = 59, OpType_RasterDiff = 60, OpType_QuantizedReshape = 61, OpType_QuantizedSoftmax = 62, OpType_QuantizeMaxMin = 63, OpType_QuantizeV2 = 64, OpType_Range = 65, OpType_Rank = 66, OpType_ReduceJoin = 67, OpType_Reduction = 68, OpType_ReLU = 69, OpType_ReLU6 = 70, OpType_RequantizationRange = 71, OpType_Requantize = 72, OpType_Reshape = 73, OpType_Resize = 74, OpType_RNN = 75, OpType_ROIPooling = 76, OpType_Scale = 77, OpType_Selu = 78, OpType_Seq2Out = 79, OpType_Shape = 80, OpType_Sigmoid = 81, OpType_Size = 82, OpType_Slice = 83, OpType_SliceTf = 84, OpType_Softmax = 85, OpType_SpaceToBatchND = 86, OpType_SpatialProduct = 87, OpType_Col2Im = 88, OpType_Segment = 89, OpType_Squeeze = 90, OpType_StridedSlice = 91, OpType_CastLike = 92, OpType_StringSplit = 93, OpType_StringToNumber = 94, OpType_TanH = 95, OpType_TfQuantizedConv2D = 96, OpType_Threshold = 97, OpType_Tile = 98, OpType_TopKV2 = 99, OpType_Transpose = 100, OpType_UnaryOp = 101, OpType_Unpack = 102, OpType_Where = 103, OpType_Moments = 104, OpType_RNNSequenceGRU = 105, OpType_BatchMatMul = 106, OpType_Unsqueeze = 107, OpType_CosineSimilarity = 108, OpType_DepthToSpace = 109, OpType_SpaceToDepth = 110, OpType_ReverseSequence = 111, OpType_Pooling3D = 112, OpType_Convolution3D = 113, OpType_MatrixBandPart = 114, OpType_GatherND = 115, OpType_DetectionPostProcess = 116, OpType_UnravelIndex = 117, OpType_ScatterNd = 118, OpType_OneHot = 119, OpType_BroadcastTo = 120, OpType_Dilation2D = 121, OpType_Interp3D = 122, OpType_Raster = 128, OpType_ConvertTensor = 129, OpType_ArgMin = 130, OpType_LinSpace = 131, OpType_RandomUniform = 132, OpType_TensorArray = 133, OpType_TensorArraySize = 134, OpType_TensorArrayRead = 135, OpType_TensorArrayWrite = 136, OpType_TensorArrayGather = 137, OpType_TensorArrayScatter = 138, OpType_TensorArraySplit = 139, OpType_TensorArrayConcat = 140, OpType_LSTMBlockCell = 141, OpType_Reverse = 142, OpType_ROIAlign = 143, OpType_RandomNormal = 144, OpType_TensorArrayInsert = 145, OpType_TensorArrayErase = 146, OpType_EyeLike = 147, OpType_CumSum = 148, OpType_Det = 149, OpType_CumProd = 150, OpType_ScatterElements = 151, OpType_GatherElements = 152, OpType_Svd = 153, OpType_Histogram = 154, OpType_DynamicQuant = 155, OpType_Stft = 156, OpType_Plugin = 256, OpType_Select = 257, OpType_ZerosLike = 258, OpType_Broastcast = 259, OpType_SetDiff1D = 260, OpType_ReluGrad = 261, OpType_Identity = 262, OpType_PoolGrad = 263, OpType_SoftmaxGrad = 264, OpType_Conv2DBackPropFilter = 265, OpType_TrainableParam = 266, OpType_BatchNorm = 267, OpType_ConvTranspose3D = 268, OpType_ZeroGrad = 269, OpType_Attention = 299, OpType_FmhaV2 = 300, OpType_Fmhca = 301, OpType_SeqLen2Spatial = 302, OpType_SplitGeLU = 303, OpType_GroupNorm = 304, OpType_LinearAttention = 305, OpType_RoPE = 306, OpType_Extra = 512, OpType_ConvInt8 = 513, OpType_Int8ToFloat = 514, OpType_DepthwiseConvInt8 = 515, OpType_FloatToInt8 = 517, OpType_EltwiseInt8 = 518, OpType_While = 600, OpType_If = 601, OpType_LayerNorm = 603, OpType_GridSample = 604, OpType_MIN = OpType_AbsVal, OpType_MAX = OpType_GridSample }; inline const OpType (&EnumValuesOpType())[184] { static const OpType values[] = { OpType_AbsVal, OpType_QuantizedAdd, OpType_ArgMax, OpType_AsString, OpType_InstanceNorm, OpType_BatchToSpaceND, OpType_Copy, OpType_BinaryOp, OpType_Bnll, OpType_Cast, OpType_Concat, OpType_Const, OpType_Convolution, OpType_ConvolutionDepthwise, OpType_Crop, OpType_CropAndResize, OpType_ImageProcess, OpType_Deconvolution, OpType_DeconvolutionDepthwise, OpType_Dequantize, OpType_DetectionOutput, OpType_Dropout, OpType_Eltwise, OpType_ELU, OpType_Unique, OpType_Exp, OpType_ExpandDims, OpType_Fill, OpType_Flatten, OpType_Im2Col, OpType_Gather, OpType_GatherV2, OpType_Im2Seq, OpType_InnerProduct, OpType_Input, OpType_Interp, OpType_Log, OpType_LRN, OpType_LSTM, OpType_MatMul, OpType_MoE, OpType_NonMaxSuppression, OpType_NonMaxSuppressionV2, OpType_Normalize, OpType_Pack, OpType_Padding, OpType_Permute, OpType_Pooling, OpType_Power, OpType_PReLU, OpType_PriorBox, OpType_Proposal, OpType_QuantizedAvgPool, OpType_QuantizedBiasAdd, OpType_QuantizedConcat, OpType_QuantizedDepthwiseConv2D, OpType_QuantizedLogistic, OpType_RasterAndInterpolate, OpType_QuantizedMaxPool, OpType_Texture, OpType_RasterDiff, OpType_QuantizedReshape, OpType_QuantizedSoftmax, OpType_QuantizeMaxMin, OpType_QuantizeV2, OpType_Range, OpType_Rank, OpType_ReduceJoin, OpType_Reduction, OpType_ReLU, OpType_ReLU6, OpType_RequantizationRange, OpType_Requantize, OpType_Reshape, OpType_Resize, OpType_RNN, OpType_ROIPooling, OpType_Scale, OpType_Selu, OpType_Seq2Out, OpType_Shape, OpType_Sigmoid, OpType_Size, OpType_Slice, OpType_SliceTf, OpType_Softmax, OpType_SpaceToBatchND, OpType_SpatialProduct, OpType_Col2Im, OpType_Segment, OpType_Squeeze, OpType_StridedSlice, OpType_CastLike, OpType_StringSplit, OpType_StringToNumber, OpType_TanH, OpType_TfQuantizedConv2D, OpType_Threshold, OpType_Tile, OpType_TopKV2, OpType_Transpose, OpType_UnaryOp, OpType_Unpack, OpType_Where, OpType_Moments, OpType_RNNSequenceGRU, OpType_BatchMatMul, OpType_Unsqueeze, OpType_CosineSimilarity, OpType_DepthToSpace, OpType_SpaceToDepth, OpType_ReverseSequence, OpType_Pooling3D, OpType_Convolution3D, OpType_MatrixBandPart, OpType_GatherND, OpType_DetectionPostProcess, OpType_UnravelIndex, OpType_ScatterNd, OpType_OneHot, OpType_BroadcastTo, OpType_Dilation2D, OpType_Interp3D, OpType_Raster, OpType_ConvertTensor, OpType_ArgMin, OpType_LinSpace, OpType_RandomUniform, OpType_TensorArray, OpType_TensorArraySize, OpType_TensorArrayRead, OpType_TensorArrayWrite, OpType_TensorArrayGather, OpType_TensorArrayScatter, OpType_TensorArraySplit, OpType_TensorArrayConcat, OpType_LSTMBlockCell, OpType_Reverse, OpType_ROIAlign, OpType_RandomNormal, OpType_TensorArrayInsert, OpType_TensorArrayErase, OpType_EyeLike, OpType_CumSum, OpType_Det, OpType_CumProd, OpType_ScatterElements, OpType_GatherElements, OpType_Svd, OpType_Histogram, OpType_DynamicQuant, OpType_Stft, OpType_Plugin, OpType_Select, OpType_ZerosLike, OpType_Broastcast, OpType_SetDiff1D, OpType_ReluGrad, OpType_Identity, OpType_PoolGrad, OpType_SoftmaxGrad, OpType_Conv2DBackPropFilter, OpType_TrainableParam, OpType_BatchNorm, OpType_ConvTranspose3D, OpType_ZeroGrad, OpType_Attention, OpType_FmhaV2, OpType_Fmhca, OpType_SeqLen2Spatial, OpType_SplitGeLU, OpType_GroupNorm, OpType_LinearAttention, OpType_RoPE, OpType_Extra, OpType_ConvInt8, OpType_Int8ToFloat, OpType_DepthwiseConvInt8, OpType_FloatToInt8, OpType_EltwiseInt8, OpType_While, OpType_If, OpType_LayerNorm, OpType_GridSample }; return values; } inline const char * const *EnumNamesOpType() { static const char * const names[] = { "AbsVal", "QuantizedAdd", "ArgMax", "AsString", "InstanceNorm", "BatchToSpaceND", "Copy", "BinaryOp", "Bnll", "Cast", "Concat", "Const", "Convolution", "ConvolutionDepthwise", "Crop", "CropAndResize", "ImageProcess", "Deconvolution", "DeconvolutionDepthwise", "Dequantize", "DetectionOutput", "Dropout", "Eltwise", "ELU", "Unique", "Exp", "ExpandDims", "Fill", "Flatten", "Im2Col", "Gather", "GatherV2", "Im2Seq", "InnerProduct", "Input", "Interp", "Log", "LRN", "LSTM", "MatMul", "MoE", "NonMaxSuppression", "NonMaxSuppressionV2", "Normalize", "Pack", "Padding", "Permute", "Pooling", "Power", "PReLU", "PriorBox", "Proposal", "QuantizedAvgPool", "QuantizedBiasAdd", "QuantizedConcat", "QuantizedDepthwiseConv2D", "QuantizedLogistic", "RasterAndInterpolate", "QuantizedMaxPool", "Texture", "RasterDiff", "QuantizedReshape", "QuantizedSoftmax", "QuantizeMaxMin", "QuantizeV2", "Range", "Rank", "ReduceJoin", "Reduction", "ReLU", "ReLU6", "RequantizationRange", "Requantize", "Reshape", "Resize", "RNN", "ROIPooling", "Scale", "Selu", "Seq2Out", "Shape", "Sigmoid", "Size", "Slice", "SliceTf", "Softmax", "SpaceToBatchND", "SpatialProduct", "Col2Im", "Segment", "Squeeze", "StridedSlice", "CastLike", "StringSplit", "StringToNumber", "TanH", "TfQuantizedConv2D", "Threshold", "Tile", "TopKV2", "Transpose", "UnaryOp", "Unpack", "Where", "Moments", "RNNSequenceGRU", "BatchMatMul", "Unsqueeze", "CosineSimilarity", "DepthToSpace", "SpaceToDepth", "ReverseSequence", "Pooling3D", "Convolution3D", "MatrixBandPart", "GatherND", "DetectionPostProcess", "UnravelIndex", "ScatterNd", "OneHot", "BroadcastTo", "Dilation2D", "Interp3D", "", "", "", "", "", "Raster", "ConvertTensor", "ArgMin", "LinSpace", "RandomUniform", "TensorArray", "TensorArraySize", "TensorArrayRead", "TensorArrayWrite", "TensorArrayGather", "TensorArrayScatter", "TensorArraySplit", "TensorArrayConcat", "LSTMBlockCell", "Reverse", "ROIAlign", "RandomNormal", "TensorArrayInsert", "TensorArrayErase", "EyeLike", "CumSum", "Det", "CumProd", "ScatterElements", "GatherElements", "Svd", "Histogram", "DynamicQuant", "Stft", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Plugin", "Select", "ZerosLike", "Broastcast", "SetDiff1D", "ReluGrad", "Identity", "PoolGrad", "SoftmaxGrad", "Conv2DBackPropFilter", "TrainableParam", "BatchNorm", "ConvTranspose3D", "ZeroGrad", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Attention", "FmhaV2", "Fmhca", "SeqLen2Spatial", "SplitGeLU", "GroupNorm", "LinearAttention", "RoPE", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Extra", "ConvInt8", "Int8ToFloat", "DepthwiseConvInt8", "", "FloatToInt8", "EltwiseInt8", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "While", "If", "", "LayerNorm", "GridSample", nullptr }; return names; } inline const char *EnumNameOpType(OpType e) { if (e < OpType_AbsVal || e > OpType_GridSample) return ""; const size_t index = static_cast(e); return EnumNamesOpType()[index]; } enum OpParameter { OpParameter_NONE = 0, OpParameter_QuantizedAdd = 1, OpParameter_ArgMax = 2, OpParameter_AsString = 3, OpParameter_Axis = 4, OpParameter_BatchNorm = 5, OpParameter_BinaryOp = 6, OpParameter_Blob = 7, OpParameter_CastParam = 8, OpParameter_Convolution2D = 9, OpParameter_Crop = 10, OpParameter_CropAndResize = 11, OpParameter_Dequantize = 12, OpParameter_DetectionOutput = 13, OpParameter_Eltwise = 14, OpParameter_ExpandDims = 15, OpParameter_Fill = 16, OpParameter_Flatten = 17, OpParameter_Gather = 18, OpParameter_GatherV2 = 19, OpParameter_InnerProduct = 20, OpParameter_Input = 21, OpParameter_Interp = 22, OpParameter_LRN = 23, OpParameter_LSTM = 24, OpParameter_MatMul = 25, OpParameter_NonMaxSuppressionV2 = 26, OpParameter_Normalize = 27, OpParameter_PackParam = 28, OpParameter_Permute = 29, OpParameter_Plugin = 30, OpParameter_Pool = 31, OpParameter_PRelu = 32, OpParameter_PriorBox = 33, OpParameter_Proposal = 34, OpParameter_QuantizedAvgPool = 35, OpParameter_QuantizedBiasAdd = 36, OpParameter_QuantizedConcat = 37, OpParameter_QuantizedLogistic = 38, OpParameter_QuantizedMatMul = 39, OpParameter_QuantizedMaxPool = 40, OpParameter_QuantizedRelu = 41, OpParameter_QuantizedRelu6 = 42, OpParameter_QuantizedReshape = 43, OpParameter_QuantizedSoftmax = 44, OpParameter_QuantizeMaxMin = 45, OpParameter_QuantizeV2 = 46, OpParameter_Range = 47, OpParameter_Rank = 48, OpParameter_ReduceJoin = 49, OpParameter_ReductionParam = 50, OpParameter_Relu = 51, OpParameter_Relu6 = 52, OpParameter_RequantizationRange = 53, OpParameter_Requantize = 54, OpParameter_Reshape = 55, OpParameter_Resize = 56, OpParameter_RoiParameters = 57, OpParameter_Scale = 58, OpParameter_Selu = 59, OpParameter_Size = 60, OpParameter_Slice = 61, OpParameter_SliceTf = 62, OpParameter_SpaceBatch = 63, OpParameter_SqueezeParam = 64, OpParameter_StridedSliceParam = 65, OpParameter_TensorConvertInfo = 66, OpParameter_TfQuantizedConv2D = 67, OpParameter_TopKV2 = 68, OpParameter_Transpose = 69, OpParameter_UnaryOp = 70, OpParameter_MomentsParam = 71, OpParameter_RNNParam = 72, OpParameter_BatchMatMulParam = 73, OpParameter_QuantizedFloatParam = 74, OpParameter_DepthSpaceParam = 75, OpParameter_EltwiseInt8 = 76, OpParameter_ReverseSequenceParam = 77, OpParameter_Extra = 78, OpParameter_Pool3D = 79, OpParameter_Convolution3D = 80, OpParameter_ELU = 81, OpParameter_DetectionPostProcessParam = 82, OpParameter_OneHotParam = 83, OpParameter_PadParam = 84, OpParameter_WhileParam = 85, OpParameter_IfParam = 86, OpParameter_RandomUniform = 87, OpParameter_LayerNorm = 88, OpParameter_TensorArray = 89, OpParameter_LSTMBlockCell = 90, OpParameter_GridSample = 91, OpParameter_LoopParam = 92, OpParameter_ImageProcessParam = 93, OpParameter_CumSum = 94, OpParameter_GroupNorm = 95, OpParameter_FmhaV2Param = 96, OpParameter_FmhcaParam = 97, OpParameter_AttentionParam = 98, OpParameter_StftParam = 99, OpParameter_LinearAttentionParam = 100, OpParameter_ShapeParam = 101, OpParameter_RoPEParam = 102, OpParameter_MIN = OpParameter_NONE, OpParameter_MAX = OpParameter_RoPEParam }; inline const OpParameter (&EnumValuesOpParameter())[103] { static const OpParameter values[] = { OpParameter_NONE, OpParameter_QuantizedAdd, OpParameter_ArgMax, OpParameter_AsString, OpParameter_Axis, OpParameter_BatchNorm, OpParameter_BinaryOp, OpParameter_Blob, OpParameter_CastParam, OpParameter_Convolution2D, OpParameter_Crop, OpParameter_CropAndResize, OpParameter_Dequantize, OpParameter_DetectionOutput, OpParameter_Eltwise, OpParameter_ExpandDims, OpParameter_Fill, OpParameter_Flatten, OpParameter_Gather, OpParameter_GatherV2, OpParameter_InnerProduct, OpParameter_Input, OpParameter_Interp, OpParameter_LRN, OpParameter_LSTM, OpParameter_MatMul, OpParameter_NonMaxSuppressionV2, OpParameter_Normalize, OpParameter_PackParam, OpParameter_Permute, OpParameter_Plugin, OpParameter_Pool, OpParameter_PRelu, OpParameter_PriorBox, OpParameter_Proposal, OpParameter_QuantizedAvgPool, OpParameter_QuantizedBiasAdd, OpParameter_QuantizedConcat, OpParameter_QuantizedLogistic, OpParameter_QuantizedMatMul, OpParameter_QuantizedMaxPool, OpParameter_QuantizedRelu, OpParameter_QuantizedRelu6, OpParameter_QuantizedReshape, OpParameter_QuantizedSoftmax, OpParameter_QuantizeMaxMin, OpParameter_QuantizeV2, OpParameter_Range, OpParameter_Rank, OpParameter_ReduceJoin, OpParameter_ReductionParam, OpParameter_Relu, OpParameter_Relu6, OpParameter_RequantizationRange, OpParameter_Requantize, OpParameter_Reshape, OpParameter_Resize, OpParameter_RoiParameters, OpParameter_Scale, OpParameter_Selu, OpParameter_Size, OpParameter_Slice, OpParameter_SliceTf, OpParameter_SpaceBatch, OpParameter_SqueezeParam, OpParameter_StridedSliceParam, OpParameter_TensorConvertInfo, OpParameter_TfQuantizedConv2D, OpParameter_TopKV2, OpParameter_Transpose, OpParameter_UnaryOp, OpParameter_MomentsParam, OpParameter_RNNParam, OpParameter_BatchMatMulParam, OpParameter_QuantizedFloatParam, OpParameter_DepthSpaceParam, OpParameter_EltwiseInt8, OpParameter_ReverseSequenceParam, OpParameter_Extra, OpParameter_Pool3D, OpParameter_Convolution3D, OpParameter_ELU, OpParameter_DetectionPostProcessParam, OpParameter_OneHotParam, OpParameter_PadParam, OpParameter_WhileParam, OpParameter_IfParam, OpParameter_RandomUniform, OpParameter_LayerNorm, OpParameter_TensorArray, OpParameter_LSTMBlockCell, OpParameter_GridSample, OpParameter_LoopParam, OpParameter_ImageProcessParam, OpParameter_CumSum, OpParameter_GroupNorm, OpParameter_FmhaV2Param, OpParameter_FmhcaParam, OpParameter_AttentionParam, OpParameter_StftParam, OpParameter_LinearAttentionParam, OpParameter_ShapeParam, OpParameter_RoPEParam }; return values; } inline const char * const *EnumNamesOpParameter() { static const char * const names[] = { "NONE", "QuantizedAdd", "ArgMax", "AsString", "Axis", "BatchNorm", "BinaryOp", "Blob", "CastParam", "Convolution2D", "Crop", "CropAndResize", "Dequantize", "DetectionOutput", "Eltwise", "ExpandDims", "Fill", "Flatten", "Gather", "GatherV2", "InnerProduct", "Input", "Interp", "LRN", "LSTM", "MatMul", "NonMaxSuppressionV2", "Normalize", "PackParam", "Permute", "Plugin", "Pool", "PRelu", "PriorBox", "Proposal", "QuantizedAvgPool", "QuantizedBiasAdd", "QuantizedConcat", "QuantizedLogistic", "QuantizedMatMul", "QuantizedMaxPool", "QuantizedRelu", "QuantizedRelu6", "QuantizedReshape", "QuantizedSoftmax", "QuantizeMaxMin", "QuantizeV2", "Range", "Rank", "ReduceJoin", "ReductionParam", "Relu", "Relu6", "RequantizationRange", "Requantize", "Reshape", "Resize", "RoiParameters", "Scale", "Selu", "Size", "Slice", "SliceTf", "SpaceBatch", "SqueezeParam", "StridedSliceParam", "TensorConvertInfo", "TfQuantizedConv2D", "TopKV2", "Transpose", "UnaryOp", "MomentsParam", "RNNParam", "BatchMatMulParam", "QuantizedFloatParam", "DepthSpaceParam", "EltwiseInt8", "ReverseSequenceParam", "Extra", "Pool3D", "Convolution3D", "ELU", "DetectionPostProcessParam", "OneHotParam", "PadParam", "WhileParam", "IfParam", "RandomUniform", "LayerNorm", "TensorArray", "LSTMBlockCell", "GridSample", "LoopParam", "ImageProcessParam", "CumSum", "GroupNorm", "FmhaV2Param", "FmhcaParam", "AttentionParam", "StftParam", "LinearAttentionParam", "ShapeParam", "RoPEParam", nullptr }; return names; } inline const char *EnumNameOpParameter(OpParameter e) { if (e < OpParameter_NONE || e > OpParameter_RoPEParam) return ""; const size_t index = static_cast(e); return EnumNamesOpParameter()[index]; } template struct OpParameterTraits { static const OpParameter enum_value = OpParameter_NONE; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedAdd; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_ArgMax; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_AsString; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Axis; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_BatchNorm; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_BinaryOp; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Blob; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_CastParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Convolution2D; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Crop; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_CropAndResize; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Dequantize; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_DetectionOutput; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Eltwise; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_ExpandDims; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Fill; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Flatten; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Gather; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_GatherV2; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_InnerProduct; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Input; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Interp; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_LRN; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_LSTM; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_MatMul; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_NonMaxSuppressionV2; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Normalize; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_PackParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Permute; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Plugin; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Pool; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_PRelu; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_PriorBox; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Proposal; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedAvgPool; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedBiasAdd; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedConcat; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedLogistic; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedMatMul; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedMaxPool; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedRelu; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedRelu6; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedReshape; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedSoftmax; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizeMaxMin; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizeV2; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Range; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Rank; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_ReduceJoin; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_ReductionParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Relu; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Relu6; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_RequantizationRange; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Requantize; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Reshape; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Resize; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_RoiParameters; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Scale; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Selu; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Size; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Slice; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_SliceTf; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_SpaceBatch; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_SqueezeParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_StridedSliceParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_TensorConvertInfo; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_TfQuantizedConv2D; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_TopKV2; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Transpose; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_UnaryOp; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_MomentsParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_RNNParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_BatchMatMulParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_QuantizedFloatParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_DepthSpaceParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_EltwiseInt8; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_ReverseSequenceParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Extra; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Pool3D; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_Convolution3D; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_ELU; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_DetectionPostProcessParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_OneHotParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_PadParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_WhileParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_IfParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_RandomUniform; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_LayerNorm; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_TensorArray; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_LSTMBlockCell; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_GridSample; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_LoopParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_ImageProcessParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_CumSum; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_GroupNorm; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_FmhaV2Param; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_FmhcaParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_AttentionParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_StftParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_LinearAttentionParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_ShapeParam; }; template<> struct OpParameterTraits { static const OpParameter enum_value = OpParameter_RoPEParam; }; struct OpParameterUnion { OpParameter type; void *value; OpParameterUnion() : type(OpParameter_NONE), value(nullptr) {} 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 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; } ~OpParameterUnion() { Reset(); } void Reset(); #ifndef FLATBUFFERS_CPP98_STL template void Set(T&& val) { Reset(); type = OpParameterTraits::enum_value; if (type != OpParameter_NONE) { value = new T(std::forward(val)); } } #endif // FLATBUFFERS_CPP98_STL 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() { return type == OpParameter_QuantizedAdd ? reinterpret_cast(value) : nullptr; } const QuantizedAddT *AsQuantizedAdd() const { return type == OpParameter_QuantizedAdd ? reinterpret_cast(value) : nullptr; } ArgMaxT *AsArgMax() { return type == OpParameter_ArgMax ? reinterpret_cast(value) : nullptr; } const ArgMaxT *AsArgMax() const { return type == OpParameter_ArgMax ? reinterpret_cast(value) : nullptr; } AsStringT *AsAsString() { return type == OpParameter_AsString ? reinterpret_cast(value) : nullptr; } const AsStringT *AsAsString() const { return type == OpParameter_AsString ? reinterpret_cast(value) : nullptr; } AxisT *AsAxis() { return type == OpParameter_Axis ? reinterpret_cast(value) : nullptr; } const AxisT *AsAxis() const { return type == OpParameter_Axis ? reinterpret_cast(value) : nullptr; } BatchNormT *AsBatchNorm() { return type == OpParameter_BatchNorm ? reinterpret_cast(value) : nullptr; } const BatchNormT *AsBatchNorm() const { return type == OpParameter_BatchNorm ? reinterpret_cast(value) : nullptr; } BinaryOpT *AsBinaryOp() { return type == OpParameter_BinaryOp ? reinterpret_cast(value) : nullptr; } const BinaryOpT *AsBinaryOp() const { return type == OpParameter_BinaryOp ? reinterpret_cast(value) : nullptr; } BlobT *AsBlob() { return type == OpParameter_Blob ? reinterpret_cast(value) : nullptr; } const BlobT *AsBlob() const { return type == OpParameter_Blob ? reinterpret_cast(value) : nullptr; } CastParamT *AsCastParam() { return type == OpParameter_CastParam ? reinterpret_cast(value) : nullptr; } const CastParamT *AsCastParam() const { return type == OpParameter_CastParam ? reinterpret_cast(value) : nullptr; } Convolution2DT *AsConvolution2D() { return type == OpParameter_Convolution2D ? reinterpret_cast(value) : nullptr; } const Convolution2DT *AsConvolution2D() const { return type == OpParameter_Convolution2D ? reinterpret_cast(value) : nullptr; } CropT *AsCrop() { return type == OpParameter_Crop ? reinterpret_cast(value) : nullptr; } const CropT *AsCrop() const { return type == OpParameter_Crop ? reinterpret_cast(value) : nullptr; } CropAndResizeT *AsCropAndResize() { return type == OpParameter_CropAndResize ? reinterpret_cast(value) : nullptr; } const CropAndResizeT *AsCropAndResize() const { return type == OpParameter_CropAndResize ? reinterpret_cast(value) : nullptr; } DequantizeT *AsDequantize() { return type == OpParameter_Dequantize ? reinterpret_cast(value) : nullptr; } const DequantizeT *AsDequantize() const { return type == OpParameter_Dequantize ? reinterpret_cast(value) : nullptr; } DetectionOutputT *AsDetectionOutput() { return type == OpParameter_DetectionOutput ? reinterpret_cast(value) : nullptr; } const DetectionOutputT *AsDetectionOutput() const { return type == OpParameter_DetectionOutput ? reinterpret_cast(value) : nullptr; } EltwiseT *AsEltwise() { return type == OpParameter_Eltwise ? reinterpret_cast(value) : nullptr; } const EltwiseT *AsEltwise() const { return type == OpParameter_Eltwise ? reinterpret_cast(value) : nullptr; } ExpandDimsT *AsExpandDims() { return type == OpParameter_ExpandDims ? reinterpret_cast(value) : nullptr; } const ExpandDimsT *AsExpandDims() const { return type == OpParameter_ExpandDims ? reinterpret_cast(value) : nullptr; } FillT *AsFill() { return type == OpParameter_Fill ? reinterpret_cast(value) : nullptr; } const FillT *AsFill() const { return type == OpParameter_Fill ? reinterpret_cast(value) : nullptr; } FlattenT *AsFlatten() { return type == OpParameter_Flatten ? reinterpret_cast(value) : nullptr; } const FlattenT *AsFlatten() const { return type == OpParameter_Flatten ? reinterpret_cast(value) : nullptr; } GatherT *AsGather() { return type == OpParameter_Gather ? reinterpret_cast(value) : nullptr; } const GatherT *AsGather() const { return type == OpParameter_Gather ? reinterpret_cast(value) : nullptr; } GatherV2T *AsGatherV2() { return type == OpParameter_GatherV2 ? reinterpret_cast(value) : nullptr; } const GatherV2T *AsGatherV2() const { return type == OpParameter_GatherV2 ? reinterpret_cast(value) : nullptr; } InnerProductT *AsInnerProduct() { return type == OpParameter_InnerProduct ? reinterpret_cast(value) : nullptr; } const InnerProductT *AsInnerProduct() const { return type == OpParameter_InnerProduct ? reinterpret_cast(value) : nullptr; } InputT *AsInput() { return type == OpParameter_Input ? reinterpret_cast(value) : nullptr; } const InputT *AsInput() const { return type == OpParameter_Input ? reinterpret_cast(value) : nullptr; } InterpT *AsInterp() { return type == OpParameter_Interp ? reinterpret_cast(value) : nullptr; } const InterpT *AsInterp() const { return type == OpParameter_Interp ? reinterpret_cast(value) : nullptr; } LRNT *AsLRN() { return type == OpParameter_LRN ? reinterpret_cast(value) : nullptr; } const LRNT *AsLRN() const { return type == OpParameter_LRN ? reinterpret_cast(value) : nullptr; } LSTMT *AsLSTM() { return type == OpParameter_LSTM ? reinterpret_cast(value) : nullptr; } const LSTMT *AsLSTM() const { return type == OpParameter_LSTM ? reinterpret_cast(value) : nullptr; } MatMulT *AsMatMul() { return type == OpParameter_MatMul ? reinterpret_cast(value) : nullptr; } const MatMulT *AsMatMul() const { return type == OpParameter_MatMul ? reinterpret_cast(value) : nullptr; } NonMaxSuppressionV2T *AsNonMaxSuppressionV2() { return type == OpParameter_NonMaxSuppressionV2 ? reinterpret_cast(value) : nullptr; } const NonMaxSuppressionV2T *AsNonMaxSuppressionV2() const { return type == OpParameter_NonMaxSuppressionV2 ? reinterpret_cast(value) : nullptr; } NormalizeT *AsNormalize() { return type == OpParameter_Normalize ? reinterpret_cast(value) : nullptr; } const NormalizeT *AsNormalize() const { return type == OpParameter_Normalize ? reinterpret_cast(value) : nullptr; } PackParamT *AsPackParam() { return type == OpParameter_PackParam ? reinterpret_cast(value) : nullptr; } const PackParamT *AsPackParam() const { return type == OpParameter_PackParam ? reinterpret_cast(value) : nullptr; } PermuteT *AsPermute() { return type == OpParameter_Permute ? reinterpret_cast(value) : nullptr; } const PermuteT *AsPermute() const { return type == OpParameter_Permute ? reinterpret_cast(value) : nullptr; } PluginT *AsPlugin() { return type == OpParameter_Plugin ? reinterpret_cast(value) : nullptr; } const PluginT *AsPlugin() const { return type == OpParameter_Plugin ? reinterpret_cast(value) : nullptr; } PoolT *AsPool() { return type == OpParameter_Pool ? reinterpret_cast(value) : nullptr; } const PoolT *AsPool() const { return type == OpParameter_Pool ? reinterpret_cast(value) : nullptr; } PReluT *AsPRelu() { return type == OpParameter_PRelu ? reinterpret_cast(value) : nullptr; } const PReluT *AsPRelu() const { return type == OpParameter_PRelu ? reinterpret_cast(value) : nullptr; } PriorBoxT *AsPriorBox() { return type == OpParameter_PriorBox ? reinterpret_cast(value) : nullptr; } const PriorBoxT *AsPriorBox() const { return type == OpParameter_PriorBox ? reinterpret_cast(value) : nullptr; } ProposalT *AsProposal() { return type == OpParameter_Proposal ? reinterpret_cast(value) : nullptr; } const ProposalT *AsProposal() const { return type == OpParameter_Proposal ? reinterpret_cast(value) : nullptr; } QuantizedAvgPoolT *AsQuantizedAvgPool() { return type == OpParameter_QuantizedAvgPool ? reinterpret_cast(value) : nullptr; } const QuantizedAvgPoolT *AsQuantizedAvgPool() const { return type == OpParameter_QuantizedAvgPool ? reinterpret_cast(value) : nullptr; } QuantizedBiasAddT *AsQuantizedBiasAdd() { return type == OpParameter_QuantizedBiasAdd ? reinterpret_cast(value) : nullptr; } const QuantizedBiasAddT *AsQuantizedBiasAdd() const { return type == OpParameter_QuantizedBiasAdd ? reinterpret_cast(value) : nullptr; } QuantizedConcatT *AsQuantizedConcat() { return type == OpParameter_QuantizedConcat ? reinterpret_cast(value) : nullptr; } const QuantizedConcatT *AsQuantizedConcat() const { return type == OpParameter_QuantizedConcat ? reinterpret_cast(value) : nullptr; } QuantizedLogisticT *AsQuantizedLogistic() { return type == OpParameter_QuantizedLogistic ? reinterpret_cast(value) : nullptr; } const QuantizedLogisticT *AsQuantizedLogistic() const { return type == OpParameter_QuantizedLogistic ? reinterpret_cast(value) : nullptr; } QuantizedMatMulT *AsQuantizedMatMul() { return type == OpParameter_QuantizedMatMul ? reinterpret_cast(value) : nullptr; } const QuantizedMatMulT *AsQuantizedMatMul() const { return type == OpParameter_QuantizedMatMul ? reinterpret_cast(value) : nullptr; } QuantizedMaxPoolT *AsQuantizedMaxPool() { return type == OpParameter_QuantizedMaxPool ? reinterpret_cast(value) : nullptr; } const QuantizedMaxPoolT *AsQuantizedMaxPool() const { return type == OpParameter_QuantizedMaxPool ? reinterpret_cast(value) : nullptr; } QuantizedReluT *AsQuantizedRelu() { return type == OpParameter_QuantizedRelu ? reinterpret_cast(value) : nullptr; } const QuantizedReluT *AsQuantizedRelu() const { return type == OpParameter_QuantizedRelu ? reinterpret_cast(value) : nullptr; } QuantizedRelu6T *AsQuantizedRelu6() { return type == OpParameter_QuantizedRelu6 ? reinterpret_cast(value) : nullptr; } const QuantizedRelu6T *AsQuantizedRelu6() const { return type == OpParameter_QuantizedRelu6 ? reinterpret_cast(value) : nullptr; } QuantizedReshapeT *AsQuantizedReshape() { return type == OpParameter_QuantizedReshape ? reinterpret_cast(value) : nullptr; } const QuantizedReshapeT *AsQuantizedReshape() const { return type == OpParameter_QuantizedReshape ? reinterpret_cast(value) : nullptr; } QuantizedSoftmaxT *AsQuantizedSoftmax() { return type == OpParameter_QuantizedSoftmax ? reinterpret_cast(value) : nullptr; } const QuantizedSoftmaxT *AsQuantizedSoftmax() const { return type == OpParameter_QuantizedSoftmax ? reinterpret_cast(value) : nullptr; } QuantizeMaxMinT *AsQuantizeMaxMin() { return type == OpParameter_QuantizeMaxMin ? reinterpret_cast(value) : nullptr; } const QuantizeMaxMinT *AsQuantizeMaxMin() const { return type == OpParameter_QuantizeMaxMin ? reinterpret_cast(value) : nullptr; } QuantizeV2T *AsQuantizeV2() { return type == OpParameter_QuantizeV2 ? reinterpret_cast(value) : nullptr; } const QuantizeV2T *AsQuantizeV2() const { return type == OpParameter_QuantizeV2 ? reinterpret_cast(value) : nullptr; } RangeT *AsRange() { return type == OpParameter_Range ? reinterpret_cast(value) : nullptr; } const RangeT *AsRange() const { return type == OpParameter_Range ? reinterpret_cast(value) : nullptr; } RankT *AsRank() { return type == OpParameter_Rank ? reinterpret_cast(value) : nullptr; } const RankT *AsRank() const { return type == OpParameter_Rank ? reinterpret_cast(value) : nullptr; } ReduceJoinT *AsReduceJoin() { return type == OpParameter_ReduceJoin ? reinterpret_cast(value) : nullptr; } const ReduceJoinT *AsReduceJoin() const { return type == OpParameter_ReduceJoin ? reinterpret_cast(value) : nullptr; } ReductionParamT *AsReductionParam() { return type == OpParameter_ReductionParam ? reinterpret_cast(value) : nullptr; } const ReductionParamT *AsReductionParam() const { return type == OpParameter_ReductionParam ? reinterpret_cast(value) : nullptr; } ReluT *AsRelu() { return type == OpParameter_Relu ? reinterpret_cast(value) : nullptr; } const ReluT *AsRelu() const { return type == OpParameter_Relu ? reinterpret_cast(value) : nullptr; } Relu6T *AsRelu6() { return type == OpParameter_Relu6 ? reinterpret_cast(value) : nullptr; } const Relu6T *AsRelu6() const { return type == OpParameter_Relu6 ? reinterpret_cast(value) : nullptr; } RequantizationRangeT *AsRequantizationRange() { return type == OpParameter_RequantizationRange ? reinterpret_cast(value) : nullptr; } const RequantizationRangeT *AsRequantizationRange() const { return type == OpParameter_RequantizationRange ? reinterpret_cast(value) : nullptr; } RequantizeT *AsRequantize() { return type == OpParameter_Requantize ? reinterpret_cast(value) : nullptr; } const RequantizeT *AsRequantize() const { return type == OpParameter_Requantize ? reinterpret_cast(value) : nullptr; } ReshapeT *AsReshape() { return type == OpParameter_Reshape ? reinterpret_cast(value) : nullptr; } const ReshapeT *AsReshape() const { return type == OpParameter_Reshape ? reinterpret_cast(value) : nullptr; } ResizeT *AsResize() { return type == OpParameter_Resize ? reinterpret_cast(value) : nullptr; } const ResizeT *AsResize() const { return type == OpParameter_Resize ? reinterpret_cast(value) : nullptr; } RoiParametersT *AsRoiParameters() { return type == OpParameter_RoiParameters ? reinterpret_cast(value) : nullptr; } const RoiParametersT *AsRoiParameters() const { return type == OpParameter_RoiParameters ? reinterpret_cast(value) : nullptr; } ScaleT *AsScale() { return type == OpParameter_Scale ? reinterpret_cast(value) : nullptr; } const ScaleT *AsScale() const { return type == OpParameter_Scale ? reinterpret_cast(value) : nullptr; } SeluT *AsSelu() { return type == OpParameter_Selu ? reinterpret_cast(value) : nullptr; } const SeluT *AsSelu() const { return type == OpParameter_Selu ? reinterpret_cast(value) : nullptr; } SizeT *AsSize() { return type == OpParameter_Size ? reinterpret_cast(value) : nullptr; } const SizeT *AsSize() const { return type == OpParameter_Size ? reinterpret_cast(value) : nullptr; } SliceT *AsSlice() { return type == OpParameter_Slice ? reinterpret_cast(value) : nullptr; } const SliceT *AsSlice() const { return type == OpParameter_Slice ? reinterpret_cast(value) : nullptr; } SliceTfT *AsSliceTf() { return type == OpParameter_SliceTf ? reinterpret_cast(value) : nullptr; } const SliceTfT *AsSliceTf() const { return type == OpParameter_SliceTf ? reinterpret_cast(value) : nullptr; } SpaceBatchT *AsSpaceBatch() { return type == OpParameter_SpaceBatch ? reinterpret_cast(value) : nullptr; } const SpaceBatchT *AsSpaceBatch() const { return type == OpParameter_SpaceBatch ? reinterpret_cast(value) : nullptr; } SqueezeParamT *AsSqueezeParam() { return type == OpParameter_SqueezeParam ? reinterpret_cast(value) : nullptr; } const SqueezeParamT *AsSqueezeParam() const { return type == OpParameter_SqueezeParam ? reinterpret_cast(value) : nullptr; } StridedSliceParamT *AsStridedSliceParam() { return type == OpParameter_StridedSliceParam ? reinterpret_cast(value) : nullptr; } const StridedSliceParamT *AsStridedSliceParam() const { return type == OpParameter_StridedSliceParam ? reinterpret_cast(value) : nullptr; } TensorConvertInfoT *AsTensorConvertInfo() { return type == OpParameter_TensorConvertInfo ? reinterpret_cast(value) : nullptr; } const TensorConvertInfoT *AsTensorConvertInfo() const { return type == OpParameter_TensorConvertInfo ? reinterpret_cast(value) : nullptr; } TfQuantizedConv2DT *AsTfQuantizedConv2D() { return type == OpParameter_TfQuantizedConv2D ? reinterpret_cast(value) : nullptr; } const TfQuantizedConv2DT *AsTfQuantizedConv2D() const { return type == OpParameter_TfQuantizedConv2D ? reinterpret_cast(value) : nullptr; } TopKV2T *AsTopKV2() { return type == OpParameter_TopKV2 ? reinterpret_cast(value) : nullptr; } const TopKV2T *AsTopKV2() const { return type == OpParameter_TopKV2 ? reinterpret_cast(value) : nullptr; } TransposeT *AsTranspose() { return type == OpParameter_Transpose ? reinterpret_cast(value) : nullptr; } const TransposeT *AsTranspose() const { return type == OpParameter_Transpose ? reinterpret_cast(value) : nullptr; } UnaryOpT *AsUnaryOp() { return type == OpParameter_UnaryOp ? reinterpret_cast(value) : nullptr; } const UnaryOpT *AsUnaryOp() const { return type == OpParameter_UnaryOp ? reinterpret_cast(value) : nullptr; } MomentsParamT *AsMomentsParam() { return type == OpParameter_MomentsParam ? reinterpret_cast(value) : nullptr; } const MomentsParamT *AsMomentsParam() const { return type == OpParameter_MomentsParam ? reinterpret_cast(value) : nullptr; } RNNParamT *AsRNNParam() { return type == OpParameter_RNNParam ? reinterpret_cast(value) : nullptr; } const RNNParamT *AsRNNParam() const { return type == OpParameter_RNNParam ? reinterpret_cast(value) : nullptr; } BatchMatMulParamT *AsBatchMatMulParam() { return type == OpParameter_BatchMatMulParam ? reinterpret_cast(value) : nullptr; } const BatchMatMulParamT *AsBatchMatMulParam() const { return type == OpParameter_BatchMatMulParam ? reinterpret_cast(value) : nullptr; } QuantizedFloatParamT *AsQuantizedFloatParam() { return type == OpParameter_QuantizedFloatParam ? reinterpret_cast(value) : nullptr; } const QuantizedFloatParamT *AsQuantizedFloatParam() const { return type == OpParameter_QuantizedFloatParam ? reinterpret_cast(value) : nullptr; } DepthSpaceParamT *AsDepthSpaceParam() { return type == OpParameter_DepthSpaceParam ? reinterpret_cast(value) : nullptr; } const DepthSpaceParamT *AsDepthSpaceParam() const { return type == OpParameter_DepthSpaceParam ? reinterpret_cast(value) : nullptr; } EltwiseInt8T *AsEltwiseInt8() { return type == OpParameter_EltwiseInt8 ? reinterpret_cast(value) : nullptr; } const EltwiseInt8T *AsEltwiseInt8() const { return type == OpParameter_EltwiseInt8 ? reinterpret_cast(value) : nullptr; } ReverseSequenceParamT *AsReverseSequenceParam() { return type == OpParameter_ReverseSequenceParam ? reinterpret_cast(value) : nullptr; } const ReverseSequenceParamT *AsReverseSequenceParam() const { return type == OpParameter_ReverseSequenceParam ? reinterpret_cast(value) : nullptr; } ExtraT *AsExtra() { return type == OpParameter_Extra ? reinterpret_cast(value) : nullptr; } const ExtraT *AsExtra() const { return type == OpParameter_Extra ? reinterpret_cast(value) : nullptr; } Pool3DT *AsPool3D() { return type == OpParameter_Pool3D ? reinterpret_cast(value) : nullptr; } const Pool3DT *AsPool3D() const { return type == OpParameter_Pool3D ? reinterpret_cast(value) : nullptr; } Convolution3DT *AsConvolution3D() { return type == OpParameter_Convolution3D ? reinterpret_cast(value) : nullptr; } const Convolution3DT *AsConvolution3D() const { return type == OpParameter_Convolution3D ? reinterpret_cast(value) : nullptr; } ELUT *AsELU() { return type == OpParameter_ELU ? reinterpret_cast(value) : nullptr; } const ELUT *AsELU() const { return type == OpParameter_ELU ? reinterpret_cast(value) : nullptr; } DetectionPostProcessParamT *AsDetectionPostProcessParam() { return type == OpParameter_DetectionPostProcessParam ? reinterpret_cast(value) : nullptr; } const DetectionPostProcessParamT *AsDetectionPostProcessParam() const { return type == OpParameter_DetectionPostProcessParam ? reinterpret_cast(value) : nullptr; } OneHotParamT *AsOneHotParam() { return type == OpParameter_OneHotParam ? reinterpret_cast(value) : nullptr; } const OneHotParamT *AsOneHotParam() const { return type == OpParameter_OneHotParam ? reinterpret_cast(value) : nullptr; } PadParamT *AsPadParam() { return type == OpParameter_PadParam ? reinterpret_cast(value) : nullptr; } const PadParamT *AsPadParam() const { return type == OpParameter_PadParam ? reinterpret_cast(value) : nullptr; } WhileParamT *AsWhileParam() { return type == OpParameter_WhileParam ? reinterpret_cast(value) : nullptr; } const WhileParamT *AsWhileParam() const { return type == OpParameter_WhileParam ? reinterpret_cast(value) : nullptr; } IfParamT *AsIfParam() { return type == OpParameter_IfParam ? reinterpret_cast(value) : nullptr; } const IfParamT *AsIfParam() const { return type == OpParameter_IfParam ? reinterpret_cast(value) : nullptr; } RandomUniformT *AsRandomUniform() { return type == OpParameter_RandomUniform ? reinterpret_cast(value) : nullptr; } const RandomUniformT *AsRandomUniform() const { return type == OpParameter_RandomUniform ? reinterpret_cast(value) : nullptr; } LayerNormT *AsLayerNorm() { return type == OpParameter_LayerNorm ? reinterpret_cast(value) : nullptr; } const LayerNormT *AsLayerNorm() const { return type == OpParameter_LayerNorm ? reinterpret_cast(value) : nullptr; } TensorArrayT *AsTensorArray() { return type == OpParameter_TensorArray ? reinterpret_cast(value) : nullptr; } const TensorArrayT *AsTensorArray() const { return type == OpParameter_TensorArray ? reinterpret_cast(value) : nullptr; } LSTMBlockCellT *AsLSTMBlockCell() { return type == OpParameter_LSTMBlockCell ? reinterpret_cast(value) : nullptr; } const LSTMBlockCellT *AsLSTMBlockCell() const { return type == OpParameter_LSTMBlockCell ? reinterpret_cast(value) : nullptr; } GridSampleT *AsGridSample() { return type == OpParameter_GridSample ? reinterpret_cast(value) : nullptr; } const GridSampleT *AsGridSample() const { return type == OpParameter_GridSample ? reinterpret_cast(value) : nullptr; } LoopParamT *AsLoopParam() { return type == OpParameter_LoopParam ? reinterpret_cast(value) : nullptr; } const LoopParamT *AsLoopParam() const { return type == OpParameter_LoopParam ? reinterpret_cast(value) : nullptr; } ImageProcessParamT *AsImageProcessParam() { return type == OpParameter_ImageProcessParam ? reinterpret_cast(value) : nullptr; } const ImageProcessParamT *AsImageProcessParam() const { return type == OpParameter_ImageProcessParam ? reinterpret_cast(value) : nullptr; } CumSumT *AsCumSum() { return type == OpParameter_CumSum ? reinterpret_cast(value) : nullptr; } const CumSumT *AsCumSum() const { return type == OpParameter_CumSum ? reinterpret_cast(value) : nullptr; } GroupNormT *AsGroupNorm() { return type == OpParameter_GroupNorm ? reinterpret_cast(value) : nullptr; } const GroupNormT *AsGroupNorm() const { return type == OpParameter_GroupNorm ? reinterpret_cast(value) : nullptr; } FmhaV2ParamT *AsFmhaV2Param() { return type == OpParameter_FmhaV2Param ? reinterpret_cast(value) : nullptr; } const FmhaV2ParamT *AsFmhaV2Param() const { return type == OpParameter_FmhaV2Param ? reinterpret_cast(value) : nullptr; } FmhcaParamT *AsFmhcaParam() { return type == OpParameter_FmhcaParam ? reinterpret_cast(value) : nullptr; } const FmhcaParamT *AsFmhcaParam() const { return type == OpParameter_FmhcaParam ? reinterpret_cast(value) : nullptr; } AttentionParamT *AsAttentionParam() { return type == OpParameter_AttentionParam ? reinterpret_cast(value) : nullptr; } const AttentionParamT *AsAttentionParam() const { return type == OpParameter_AttentionParam ? reinterpret_cast(value) : nullptr; } StftParamT *AsStftParam() { return type == OpParameter_StftParam ? reinterpret_cast(value) : nullptr; } const StftParamT *AsStftParam() const { return type == OpParameter_StftParam ? reinterpret_cast(value) : nullptr; } LinearAttentionParamT *AsLinearAttentionParam() { return type == OpParameter_LinearAttentionParam ? reinterpret_cast(value) : nullptr; } const LinearAttentionParamT *AsLinearAttentionParam() const { return type == OpParameter_LinearAttentionParam ? reinterpret_cast(value) : nullptr; } ShapeParamT *AsShapeParam() { return type == OpParameter_ShapeParam ? reinterpret_cast(value) : nullptr; } const ShapeParamT *AsShapeParam() const { return type == OpParameter_ShapeParam ? reinterpret_cast(value) : nullptr; } RoPEParamT *AsRoPEParam() { return type == OpParameter_RoPEParam ? reinterpret_cast(value) : nullptr; } const RoPEParamT *AsRoPEParam() const { return type == OpParameter_RoPEParam ? 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 { ForwardType_CPU = 0, ForwardType_METAL = 1, ForwardType_CUDA = 2, ForwardType_OPENCL = 3, ForwardType_AUTO = 4, ForwardType_NNAPI = 5, ForwardType_OPENGLES = 6, ForwardType_VULKAN = 7, ForwardType_MIN = ForwardType_CPU, ForwardType_MAX = ForwardType_VULKAN }; inline const ForwardType (&EnumValuesForwardType())[8] { static const ForwardType values[] = { ForwardType_CPU, ForwardType_METAL, ForwardType_CUDA, ForwardType_OPENCL, ForwardType_AUTO, ForwardType_NNAPI, ForwardType_OPENGLES, ForwardType_VULKAN }; return values; } inline const char * const *EnumNamesForwardType() { static const char * const names[] = { "CPU", "METAL", "CUDA", "OPENCL", "AUTO", "NNAPI", "OPENGLES", "VULKAN", nullptr }; return names; } inline const char *EnumNameForwardType(ForwardType e) { if (e < ForwardType_CPU || e > ForwardType_VULKAN) return ""; const size_t index = static_cast(e); return EnumNamesForwardType()[index]; } enum Usage { Usage_INFERENCE = 0, Usage_TRAIN = 1, Usage_INFERENCE_STATIC = 2, Usage_MIN = Usage_INFERENCE, Usage_MAX = Usage_INFERENCE_STATIC }; inline const Usage (&EnumValuesUsage())[3] { static const Usage values[] = { Usage_INFERENCE, Usage_TRAIN, Usage_INFERENCE_STATIC }; return values; } inline const char * const *EnumNamesUsage() { static const char * const names[] = { "INFERENCE", "TRAIN", "INFERENCE_STATIC", nullptr }; return names; } inline const char *EnumNameUsage(Usage e) { if (e < Usage_INFERENCE || e > 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() { } }; struct Plugin FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef PluginT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return PluginTypeTable(); } const flatbuffers::String *type() const { return GetPointer(4); } const flatbuffers::Vector> *attr() const { return GetPointer> *>(6); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyString(type()) && VerifyOffset(verifier, 6) && verifier.VerifyVector(attr()) && verifier.VerifyVectorOfTables(attr()) && verifier.EndTable(); } PluginT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(PluginT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const PluginT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct PluginBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_type(flatbuffers::Offset type) { fbb_.AddOffset(4, type); } void add_attr(flatbuffers::Offset>> attr) { fbb_.AddOffset(6, 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); return o; } }; inline flatbuffers::Offset CreatePlugin( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset type = 0, flatbuffers::Offset>> attr = 0) { PluginBuilder builder_(_fbb); builder_.add_attr(attr); builder_.add_type(type); return builder_.Finish(); } flatbuffers::Offset CreatePlugin(flatbuffers::FlatBufferBuilder &_fbb, const PluginT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct ExtraT : public flatbuffers::NativeTable { typedef Extra TableType; std::string type; std::string engine; std::vector info; std::vector> attr; bool vector; ExtraT() : vector(false) { } }; struct Extra FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef ExtraT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return ExtraTypeTable(); } const flatbuffers::String *type() const { return GetPointer(4); } const flatbuffers::String *engine() const { return GetPointer(6); } const flatbuffers::Vector *info() const { return GetPointer *>(8); } const flatbuffers::Vector> *attr() const { return GetPointer> *>(10); } bool vector() const { return GetField(12, 0) != 0; } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyString(type()) && VerifyOffset(verifier, 6) && verifier.VerifyString(engine()) && VerifyOffset(verifier, 8) && verifier.VerifyVector(info()) && VerifyOffset(verifier, 10) && verifier.VerifyVector(attr()) && verifier.VerifyVectorOfTables(attr()) && VerifyField(verifier, 12) && verifier.EndTable(); } ExtraT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(ExtraT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExtraT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct ExtraBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_type(flatbuffers::Offset type) { fbb_.AddOffset(4, type); } void add_engine(flatbuffers::Offset engine) { fbb_.AddOffset(6, engine); } void add_info(flatbuffers::Offset> info) { fbb_.AddOffset(8, info); } void add_attr(flatbuffers::Offset>> attr) { fbb_.AddOffset(10, attr); } void add_vector(bool vector) { fbb_.AddElement(12, static_cast(vector), 0); } 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); return o; } }; inline flatbuffers::Offset CreateExtra( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset type = 0, flatbuffers::Offset engine = 0, flatbuffers::Offset> info = 0, flatbuffers::Offset>> attr = 0, bool vector = false) { ExtraBuilder builder_(_fbb); builder_.add_attr(attr); builder_.add_info(info); builder_.add_engine(engine); builder_.add_type(type); builder_.add_vector(vector); return builder_.Finish(); } flatbuffers::Offset CreateExtra(flatbuffers::FlatBufferBuilder &_fbb, const ExtraT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct StringVecT : public flatbuffers::NativeTable { typedef StringVec TableType; std::vector data; StringVecT() { } }; struct StringVec FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef StringVecT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return StringVecTypeTable(); } const flatbuffers::Vector> *data() const { return GetPointer> *>(4); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyVector(data()) && verifier.VerifyVectorOfStrings(data()) && verifier.EndTable(); } StringVecT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(StringVecT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StringVecT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct StringVecBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_data(flatbuffers::Offset>> data) { fbb_.AddOffset(4, data); } explicit StringVecBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } StringVecBuilder &operator=(const StringVecBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateStringVec( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset>> data = 0) { StringVecBuilder builder_(_fbb); builder_.add_data(data); return builder_.Finish(); } flatbuffers::Offset CreateStringVec(flatbuffers::FlatBufferBuilder &_fbb, const StringVecT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct AttentionParamT : public flatbuffers::NativeTable { typedef AttentionParam TableType; bool kv_cache; std::string kv_shared_layer; int32_t layer_index; int32_t kv_shared_layer_index; std::vector> mhq_quant; bool output_c4; float attnScale; AttentionParamT() : kv_cache(true), layer_index(-1), kv_shared_layer_index(-1), output_c4(false), attnScale(0.0f) { } }; struct AttentionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef AttentionParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return AttentionParamTypeTable(); } bool kv_cache() const { return GetField(4, 1) != 0; } const flatbuffers::String *kv_shared_layer() const { return GetPointer(6); } int32_t layer_index() const { return GetField(8, -1); } int32_t kv_shared_layer_index() const { return GetField(10, -1); } const flatbuffers::Vector> *mhq_quant() const { return GetPointer> *>(12); } bool output_c4() const { return GetField(14, 0) != 0; } float attnScale() const { return GetField(16, 0.0f); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4) && VerifyOffset(verifier, 6) && verifier.VerifyString(kv_shared_layer()) && VerifyField(verifier, 8) && VerifyField(verifier, 10) && VerifyOffset(verifier, 12) && verifier.VerifyVector(mhq_quant()) && verifier.VerifyVectorOfTables(mhq_quant()) && VerifyField(verifier, 14) && VerifyField(verifier, 16) && verifier.EndTable(); } AttentionParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(AttentionParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const AttentionParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct AttentionParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_kv_cache(bool kv_cache) { fbb_.AddElement(4, static_cast(kv_cache), 1); } void add_kv_shared_layer(flatbuffers::Offset kv_shared_layer) { fbb_.AddOffset(6, kv_shared_layer); } void add_layer_index(int32_t layer_index) { fbb_.AddElement(8, layer_index, -1); } void add_kv_shared_layer_index(int32_t kv_shared_layer_index) { fbb_.AddElement(10, kv_shared_layer_index, -1); } void add_mhq_quant(flatbuffers::Offset>> mhq_quant) { fbb_.AddOffset(12, mhq_quant); } void add_output_c4(bool output_c4) { fbb_.AddElement(14, static_cast(output_c4), 0); } void add_attnScale(float attnScale) { fbb_.AddElement(16, attnScale, 0.0f); } explicit AttentionParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } AttentionParamBuilder &operator=(const AttentionParamBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateAttentionParam( flatbuffers::FlatBufferBuilder &_fbb, bool kv_cache = true, flatbuffers::Offset kv_shared_layer = 0, int32_t layer_index = -1, int32_t kv_shared_layer_index = -1, flatbuffers::Offset>> mhq_quant = 0, bool output_c4 = false, float attnScale = 0.0f) { AttentionParamBuilder builder_(_fbb); builder_.add_attnScale(attnScale); builder_.add_mhq_quant(mhq_quant); builder_.add_kv_shared_layer_index(kv_shared_layer_index); builder_.add_layer_index(layer_index); builder_.add_kv_shared_layer(kv_shared_layer); builder_.add_output_c4(output_c4); builder_.add_kv_cache(kv_cache); return builder_.Finish(); } flatbuffers::Offset CreateAttentionParam(flatbuffers::FlatBufferBuilder &_fbb, const AttentionParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct LinearAttentionParamT : public flatbuffers::NativeTable { typedef LinearAttentionParam TableType; std::string attn_type; int32_t num_k_heads; int32_t num_v_heads; int32_t head_k_dim; int32_t head_v_dim; bool use_qk_l2norm; LinearAttentionParamT() : num_k_heads(0), num_v_heads(0), head_k_dim(0), head_v_dim(0), use_qk_l2norm(false) { } }; struct LinearAttentionParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef LinearAttentionParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return LinearAttentionParamTypeTable(); } const flatbuffers::String *attn_type() const { return GetPointer(4); } int32_t num_k_heads() const { return GetField(6, 0); } int32_t num_v_heads() const { return GetField(8, 0); } int32_t head_k_dim() const { return GetField(10, 0); } int32_t head_v_dim() const { return GetField(12, 0); } bool use_qk_l2norm() const { return GetField(14, 0) != 0; } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyString(attn_type()) && VerifyField(verifier, 6) && VerifyField(verifier, 8) && VerifyField(verifier, 10) && VerifyField(verifier, 12) && VerifyField(verifier, 14) && verifier.EndTable(); } LinearAttentionParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(LinearAttentionParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LinearAttentionParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct LinearAttentionParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_attn_type(flatbuffers::Offset attn_type) { fbb_.AddOffset(4, attn_type); } void add_num_k_heads(int32_t num_k_heads) { fbb_.AddElement(6, num_k_heads, 0); } void add_num_v_heads(int32_t num_v_heads) { fbb_.AddElement(8, num_v_heads, 0); } void add_head_k_dim(int32_t head_k_dim) { fbb_.AddElement(10, head_k_dim, 0); } void add_head_v_dim(int32_t head_v_dim) { fbb_.AddElement(12, head_v_dim, 0); } void add_use_qk_l2norm(bool use_qk_l2norm) { fbb_.AddElement(14, static_cast(use_qk_l2norm), 0); } explicit LinearAttentionParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } LinearAttentionParamBuilder &operator=(const LinearAttentionParamBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateLinearAttentionParam( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset attn_type = 0, int32_t num_k_heads = 0, int32_t num_v_heads = 0, int32_t head_k_dim = 0, int32_t head_v_dim = 0, bool use_qk_l2norm = false) { LinearAttentionParamBuilder builder_(_fbb); builder_.add_head_v_dim(head_v_dim); builder_.add_head_k_dim(head_k_dim); builder_.add_num_v_heads(num_v_heads); builder_.add_num_k_heads(num_k_heads); builder_.add_attn_type(attn_type); builder_.add_use_qk_l2norm(use_qk_l2norm); return builder_.Finish(); } flatbuffers::Offset CreateLinearAttentionParam(flatbuffers::FlatBufferBuilder &_fbb, const LinearAttentionParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct RoPEParamT : public flatbuffers::NativeTable { typedef RoPEParam TableType; int32_t rope_cut_head_dim; int32_t num_head; int32_t kv_num_head; int32_t head_dim; std::unique_ptr q_norm; std::unique_ptr k_norm; RoPEParamT() : rope_cut_head_dim(0), num_head(0), kv_num_head(0), head_dim(0) { } }; struct RoPEParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef RoPEParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return RoPEParamTypeTable(); } int32_t rope_cut_head_dim() const { return GetField(4, 0); } int32_t num_head() const { return GetField(6, 0); } int32_t kv_num_head() const { return GetField(8, 0); } int32_t head_dim() const { return GetField(10, 0); } const LayerNorm *q_norm() const { return GetPointer(12); } const LayerNorm *k_norm() const { return GetPointer(14); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4) && VerifyField(verifier, 6) && VerifyField(verifier, 8) && VerifyField(verifier, 10) && VerifyOffset(verifier, 12) && verifier.VerifyTable(q_norm()) && VerifyOffset(verifier, 14) && verifier.VerifyTable(k_norm()) && verifier.EndTable(); } RoPEParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(RoPEParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const RoPEParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct RoPEParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_rope_cut_head_dim(int32_t rope_cut_head_dim) { fbb_.AddElement(4, rope_cut_head_dim, 0); } void add_num_head(int32_t num_head) { fbb_.AddElement(6, num_head, 0); } void add_kv_num_head(int32_t kv_num_head) { fbb_.AddElement(8, kv_num_head, 0); } void add_head_dim(int32_t head_dim) { fbb_.AddElement(10, head_dim, 0); } void add_q_norm(flatbuffers::Offset q_norm) { fbb_.AddOffset(12, q_norm); } void add_k_norm(flatbuffers::Offset k_norm) { fbb_.AddOffset(14, k_norm); } explicit RoPEParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } RoPEParamBuilder &operator=(const RoPEParamBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateRoPEParam( flatbuffers::FlatBufferBuilder &_fbb, int32_t rope_cut_head_dim = 0, int32_t num_head = 0, int32_t kv_num_head = 0, int32_t head_dim = 0, flatbuffers::Offset q_norm = 0, flatbuffers::Offset k_norm = 0) { RoPEParamBuilder builder_(_fbb); builder_.add_k_norm(k_norm); builder_.add_q_norm(q_norm); builder_.add_head_dim(head_dim); builder_.add_kv_num_head(kv_num_head); builder_.add_num_head(num_head); builder_.add_rope_cut_head_dim(rope_cut_head_dim); return builder_.Finish(); } flatbuffers::Offset CreateRoPEParam(flatbuffers::FlatBufferBuilder &_fbb, const RoPEParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct FmhaV2ParamT : public flatbuffers::NativeTable { typedef FmhaV2Param TableType; int32_t heads; FmhaV2ParamT() : heads(0) { } }; struct FmhaV2Param FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef FmhaV2ParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return FmhaV2ParamTypeTable(); } int32_t heads() const { return GetField(4, 0); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4) && verifier.EndTable(); } FmhaV2ParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(FmhaV2ParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const FmhaV2ParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct FmhaV2ParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_heads(int32_t heads) { fbb_.AddElement(4, heads, 0); } explicit FmhaV2ParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } FmhaV2ParamBuilder &operator=(const FmhaV2ParamBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateFmhaV2Param( flatbuffers::FlatBufferBuilder &_fbb, int32_t heads = 0) { FmhaV2ParamBuilder builder_(_fbb); builder_.add_heads(heads); return builder_.Finish(); } flatbuffers::Offset CreateFmhaV2Param(flatbuffers::FlatBufferBuilder &_fbb, const FmhaV2ParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct FmhcaParamT : public flatbuffers::NativeTable { typedef FmhcaParam TableType; int32_t heads; FmhcaParamT() : heads(0) { } }; struct FmhcaParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef FmhcaParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return FmhcaParamTypeTable(); } int32_t heads() const { return GetField(4, 0); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4) && verifier.EndTable(); } FmhcaParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(FmhcaParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const FmhcaParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct FmhcaParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_heads(int32_t heads) { fbb_.AddElement(4, heads, 0); } explicit FmhcaParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } FmhcaParamBuilder &operator=(const FmhcaParamBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateFmhcaParam( flatbuffers::FlatBufferBuilder &_fbb, int32_t heads = 0) { FmhcaParamBuilder builder_(_fbb); builder_.add_heads(heads); return builder_.Finish(); } flatbuffers::Offset CreateFmhcaParam(flatbuffers::FlatBufferBuilder &_fbb, const FmhcaParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct StftParamT : public flatbuffers::NativeTable { typedef StftParam TableType; int32_t n_fft; int32_t hop_length; bool abs; StftParamT() : n_fft(0), hop_length(0), abs(true) { } }; struct StftParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef StftParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return StftParamTypeTable(); } int32_t n_fft() const { return GetField(4, 0); } int32_t hop_length() const { return GetField(6, 0); } bool abs() const { return GetField(8, 1) != 0; } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4) && VerifyField(verifier, 6) && VerifyField(verifier, 8) && verifier.EndTable(); } StftParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(StftParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const StftParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct StftParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_n_fft(int32_t n_fft) { fbb_.AddElement(4, n_fft, 0); } void add_hop_length(int32_t hop_length) { fbb_.AddElement(6, hop_length, 0); } void add_abs(bool abs) { fbb_.AddElement(8, static_cast(abs), 1); } explicit StftParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } StftParamBuilder &operator=(const StftParamBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateStftParam( flatbuffers::FlatBufferBuilder &_fbb, int32_t n_fft = 0, int32_t hop_length = 0, bool abs = true) { StftParamBuilder builder_(_fbb); builder_.add_hop_length(hop_length); builder_.add_n_fft(n_fft); builder_.add_abs(abs); return builder_.Finish(); } flatbuffers::Offset CreateStftParam(flatbuffers::FlatBufferBuilder &_fbb, const StftParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct ShapeParamT : public flatbuffers::NativeTable { typedef ShapeParam TableType; bool hasStart; int32_t start; bool hasEnd; int32_t end; ShapeParamT() : hasStart(false), start(0), hasEnd(false), end(0) { } }; struct ShapeParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef ShapeParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return ShapeParamTypeTable(); } bool hasStart() const { return GetField(4, 0) != 0; } int32_t start() const { return GetField(6, 0); } bool hasEnd() const { return GetField(8, 0) != 0; } int32_t end() const { return GetField(10, 0); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4) && VerifyField(verifier, 6) && VerifyField(verifier, 8) && VerifyField(verifier, 10) && verifier.EndTable(); } ShapeParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(ShapeParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ShapeParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct ShapeParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_hasStart(bool hasStart) { fbb_.AddElement(4, static_cast(hasStart), 0); } void add_start(int32_t start) { fbb_.AddElement(6, start, 0); } void add_hasEnd(bool hasEnd) { fbb_.AddElement(8, static_cast(hasEnd), 0); } void add_end(int32_t end) { fbb_.AddElement(10, end, 0); } explicit ShapeParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } ShapeParamBuilder &operator=(const ShapeParamBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateShapeParam( flatbuffers::FlatBufferBuilder &_fbb, bool hasStart = false, int32_t start = 0, bool hasEnd = false, int32_t end = 0) { ShapeParamBuilder builder_(_fbb); builder_.add_end(end); builder_.add_start(start); builder_.add_hasEnd(hasEnd); builder_.add_hasStart(hasStart); return builder_.Finish(); } flatbuffers::Offset CreateShapeParam(flatbuffers::FlatBufferBuilder &_fbb, const ShapeParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); 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() { } }; struct WhileParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef WhileParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return WhileParamTypeTable(); } const flatbuffers::String *cond_graph() const { return GetPointer(4); } const flatbuffers::String *body_graph() const { return GetPointer(6); } const flatbuffers::Vector> *aliases_inputs() const { return GetPointer> *>(8); } const flatbuffers::Vector> *aliases_outputs() const { return GetPointer> *>(10); } const flatbuffers::Vector> *aliases_updates() const { return GetPointer> *>(12); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyString(cond_graph()) && VerifyOffset(verifier, 6) && verifier.VerifyString(body_graph()) && VerifyOffset(verifier, 8) && verifier.VerifyVector(aliases_inputs()) && verifier.VerifyVectorOfTables(aliases_inputs()) && VerifyOffset(verifier, 10) && verifier.VerifyVector(aliases_outputs()) && verifier.VerifyVectorOfStrings(aliases_outputs()) && VerifyOffset(verifier, 12) && verifier.VerifyVector(aliases_updates()) && verifier.VerifyVectorOfTables(aliases_updates()) && verifier.EndTable(); } WhileParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(WhileParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhileParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct WhileParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_cond_graph(flatbuffers::Offset cond_graph) { fbb_.AddOffset(4, cond_graph); } void add_body_graph(flatbuffers::Offset body_graph) { fbb_.AddOffset(6, body_graph); } void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { fbb_.AddOffset(8, aliases_inputs); } void add_aliases_outputs(flatbuffers::Offset>> aliases_outputs) { fbb_.AddOffset(10, aliases_outputs); } void add_aliases_updates(flatbuffers::Offset>> aliases_updates) { fbb_.AddOffset(12, 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); return o; } }; 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_outputs = 0, flatbuffers::Offset>> aliases_updates = 0) { WhileParamBuilder builder_(_fbb); builder_.add_aliases_updates(aliases_updates); builder_.add_aliases_outputs(aliases_outputs); builder_.add_aliases_inputs(aliases_inputs); builder_.add_body_graph(body_graph); builder_.add_cond_graph(cond_graph); return builder_.Finish(); } flatbuffers::Offset CreateWhileParam(flatbuffers::FlatBufferBuilder &_fbb, const WhileParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); 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() { } }; struct IfParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef IfParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return IfParamTypeTable(); } const flatbuffers::String *then_graph() const { return GetPointer(4); } const flatbuffers::String *else_graph() const { return GetPointer(6); } const flatbuffers::Vector> *aliases_inputs() const { return GetPointer> *>(8); } const flatbuffers::Vector> *aliases_outputs() const { return GetPointer> *>(10); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyString(then_graph()) && VerifyOffset(verifier, 6) && verifier.VerifyString(else_graph()) && VerifyOffset(verifier, 8) && verifier.VerifyVector(aliases_inputs()) && verifier.VerifyVectorOfTables(aliases_inputs()) && VerifyOffset(verifier, 10) && verifier.VerifyVector(aliases_outputs()) && verifier.VerifyVectorOfTables(aliases_outputs()) && verifier.EndTable(); } IfParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(IfParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const IfParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct IfParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_then_graph(flatbuffers::Offset then_graph) { fbb_.AddOffset(4, then_graph); } void add_else_graph(flatbuffers::Offset else_graph) { fbb_.AddOffset(6, else_graph); } void add_aliases_inputs(flatbuffers::Offset>> aliases_inputs) { fbb_.AddOffset(8, aliases_inputs); } void add_aliases_outputs(flatbuffers::Offset>> aliases_outputs) { fbb_.AddOffset(10, 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); return o; } }; 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) { IfParamBuilder builder_(_fbb); builder_.add_aliases_outputs(aliases_outputs); builder_.add_aliases_inputs(aliases_inputs); builder_.add_else_graph(else_graph); builder_.add_then_graph(then_graph); return builder_.Finish(); } flatbuffers::Offset CreateIfParam(flatbuffers::FlatBufferBuilder &_fbb, const IfParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct RegionCommandT : public flatbuffers::NativeTable { typedef RegionCommand TableType; std::unique_ptr op; std::vector steps; std::vector size; std::vector indexes; std::vector> view; int32_t fuse; std::vector iterIndexes; RegionCommandT() : fuse(-1) { } }; struct RegionCommand FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef RegionCommandT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return RegionCommandTypeTable(); } const Op *op() const { return GetPointer(4); } const flatbuffers::Vector *steps() const { return GetPointer *>(6); } const flatbuffers::Vector *size() const { return GetPointer *>(8); } const flatbuffers::Vector *indexes() const { return GetPointer *>(10); } const flatbuffers::Vector> *view() const { return GetPointer> *>(12); } int32_t fuse() const { return GetField(14, -1); } const flatbuffers::Vector *iterIndexes() const { return GetPointer *>(16); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyTable(op()) && VerifyOffset(verifier, 6) && verifier.VerifyVector(steps()) && VerifyOffset(verifier, 8) && verifier.VerifyVector(size()) && VerifyOffset(verifier, 10) && verifier.VerifyVector(indexes()) && VerifyOffset(verifier, 12) && verifier.VerifyVector(view()) && verifier.VerifyVectorOfTables(view()) && VerifyField(verifier, 14) && VerifyOffset(verifier, 16) && verifier.VerifyVector(iterIndexes()) && verifier.EndTable(); } RegionCommandT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(RegionCommandT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const RegionCommandT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct RegionCommandBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_op(flatbuffers::Offset op) { fbb_.AddOffset(4, op); } void add_steps(flatbuffers::Offset> steps) { fbb_.AddOffset(6, steps); } void add_size(flatbuffers::Offset> size) { fbb_.AddOffset(8, size); } void add_indexes(flatbuffers::Offset> indexes) { fbb_.AddOffset(10, indexes); } void add_view(flatbuffers::Offset>> view) { fbb_.AddOffset(12, view); } void add_fuse(int32_t fuse) { fbb_.AddElement(14, fuse, -1); } void add_iterIndexes(flatbuffers::Offset> iterIndexes) { fbb_.AddOffset(16, iterIndexes); } explicit RegionCommandBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } RegionCommandBuilder &operator=(const RegionCommandBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateRegionCommand( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset op = 0, flatbuffers::Offset> steps = 0, flatbuffers::Offset> size = 0, flatbuffers::Offset> indexes = 0, flatbuffers::Offset>> view = 0, int32_t fuse = -1, flatbuffers::Offset> iterIndexes = 0) { RegionCommandBuilder builder_(_fbb); builder_.add_iterIndexes(iterIndexes); builder_.add_fuse(fuse); builder_.add_view(view); builder_.add_indexes(indexes); builder_.add_size(size); builder_.add_steps(steps); builder_.add_op(op); return builder_.Finish(); } flatbuffers::Offset CreateRegionCommand(flatbuffers::FlatBufferBuilder &_fbb, const RegionCommandT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct LoopParamT : public flatbuffers::NativeTable { typedef LoopParam TableType; int32_t tensorNumber; std::vector outputIndexes; std::vector inputIndexes; std::vector> extraTensorInfos; bool parallel; int32_t loopNumber; std::vector> commands; std::vector> initCommand; LoopParamT() : tensorNumber(0), parallel(true), loopNumber(0) { } }; struct LoopParam FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef LoopParamT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return LoopParamTypeTable(); } enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_TENSORNUMBER = 4, VT_OUTPUTINDEXES = 6, VT_INPUTINDEXES = 8, VT_EXTRATENSORINFOS = 10, VT_PARALLEL = 12, VT_LOOPNUMBER = 14, VT_COMMANDS = 16, VT_INITCOMMAND = 18 }; int32_t tensorNumber() const { return GetField(4, 0); } const flatbuffers::Vector *outputIndexes() const { return GetPointer *>(6); } const flatbuffers::Vector *inputIndexes() const { return GetPointer *>(8); } const flatbuffers::Vector> *extraTensorInfos() const { return GetPointer> *>(10); } bool parallel() const { return GetField(12, 1) != 0; } int32_t loopNumber() const { return GetField(14, 0); } const flatbuffers::Vector> *commands() const { return GetPointer> *>(16); } const flatbuffers::Vector> *initCommand() const { return GetPointer> *>(18); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4) && VerifyOffset(verifier, 6) && verifier.VerifyVector(outputIndexes()) && VerifyOffset(verifier, 8) && verifier.VerifyVector(inputIndexes()) && VerifyOffset(verifier, 10) && verifier.VerifyVector(extraTensorInfos()) && verifier.VerifyVectorOfTables(extraTensorInfos()) && VerifyField(verifier, 12) && VerifyField(verifier, 14) && VerifyOffset(verifier, 16) && verifier.VerifyVector(commands()) && verifier.VerifyVectorOfTables(commands()) && VerifyOffset(verifier, 18) && verifier.VerifyVector(initCommand()) && verifier.VerifyVectorOfTables(initCommand()) && verifier.EndTable(); } LoopParamT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(LoopParamT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const LoopParamT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct LoopParamBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_tensorNumber(int32_t tensorNumber) { fbb_.AddElement(4, tensorNumber, 0); } void add_outputIndexes(flatbuffers::Offset> outputIndexes) { fbb_.AddOffset(6, outputIndexes); } void add_inputIndexes(flatbuffers::Offset> inputIndexes) { fbb_.AddOffset(8, inputIndexes); } void add_extraTensorInfos(flatbuffers::Offset>> extraTensorInfos) { fbb_.AddOffset(10, extraTensorInfos); } void add_parallel(bool parallel) { fbb_.AddElement(12, static_cast(parallel), 1); } void add_loopNumber(int32_t loopNumber) { fbb_.AddElement(14, loopNumber, 0); } void add_commands(flatbuffers::Offset>> commands) { fbb_.AddOffset(16, commands); } void add_initCommand(flatbuffers::Offset>> initCommand) { fbb_.AddOffset(18, initCommand); } explicit LoopParamBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } LoopParamBuilder &operator=(const LoopParamBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateLoopParam( flatbuffers::FlatBufferBuilder &_fbb, int32_t tensorNumber = 0, flatbuffers::Offset> outputIndexes = 0, flatbuffers::Offset> inputIndexes = 0, flatbuffers::Offset>> extraTensorInfos = 0, bool parallel = true, int32_t loopNumber = 0, flatbuffers::Offset>> commands = 0, flatbuffers::Offset>> initCommand = 0) { LoopParamBuilder builder_(_fbb); builder_.add_initCommand(initCommand); builder_.add_commands(commands); builder_.add_loopNumber(loopNumber); builder_.add_extraTensorInfos(extraTensorInfos); builder_.add_inputIndexes(inputIndexes); builder_.add_outputIndexes(outputIndexes); builder_.add_tensorNumber(tensorNumber); builder_.add_parallel(parallel); return builder_.Finish(); } flatbuffers::Offset CreateLoopParam(flatbuffers::FlatBufferBuilder &_fbb, const LoopParamT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); 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; std::string externalPath; OpT() : type(OpType_AbsVal), defaultDimentionFormat(MNN_DATA_FORMAT_NHWC) { } }; struct Op FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef OpT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return OpTypeTable(); } const flatbuffers::Vector *inputIndexes() const { return GetPointer *>(4); } OpParameter main_type() const { return static_cast(GetField(6, 0)); } const void *main() const { return GetPointer(8); } template const T *main_as() const; const QuantizedAdd *main_as_QuantizedAdd() const { return main_type() == OpParameter_QuantizedAdd ? static_cast(main()) : nullptr; } const ArgMax *main_as_ArgMax() const { return main_type() == OpParameter_ArgMax ? static_cast(main()) : nullptr; } const AsString *main_as_AsString() const { return main_type() == OpParameter_AsString ? static_cast(main()) : nullptr; } const Axis *main_as_Axis() const { return main_type() == OpParameter_Axis ? static_cast(main()) : nullptr; } const BatchNorm *main_as_BatchNorm() const { return main_type() == OpParameter_BatchNorm ? static_cast(main()) : nullptr; } const BinaryOp *main_as_BinaryOp() const { return main_type() == OpParameter_BinaryOp ? static_cast(main()) : nullptr; } const Blob *main_as_Blob() const { return main_type() == OpParameter_Blob ? static_cast(main()) : nullptr; } const CastParam *main_as_CastParam() const { return main_type() == OpParameter_CastParam ? static_cast(main()) : nullptr; } const Convolution2D *main_as_Convolution2D() const { return main_type() == OpParameter_Convolution2D ? static_cast(main()) : nullptr; } const Crop *main_as_Crop() const { return main_type() == OpParameter_Crop ? static_cast(main()) : nullptr; } const CropAndResize *main_as_CropAndResize() const { return main_type() == OpParameter_CropAndResize ? static_cast(main()) : nullptr; } const Dequantize *main_as_Dequantize() const { return main_type() == OpParameter_Dequantize ? static_cast(main()) : nullptr; } const DetectionOutput *main_as_DetectionOutput() const { return main_type() == OpParameter_DetectionOutput ? static_cast(main()) : nullptr; } const Eltwise *main_as_Eltwise() const { return main_type() == OpParameter_Eltwise ? static_cast(main()) : nullptr; } const ExpandDims *main_as_ExpandDims() const { return main_type() == OpParameter_ExpandDims ? static_cast(main()) : nullptr; } const Fill *main_as_Fill() const { return main_type() == OpParameter_Fill ? static_cast(main()) : nullptr; } const Flatten *main_as_Flatten() const { return main_type() == OpParameter_Flatten ? static_cast(main()) : nullptr; } const Gather *main_as_Gather() const { return main_type() == OpParameter_Gather ? static_cast(main()) : nullptr; } const GatherV2 *main_as_GatherV2() const { return main_type() == OpParameter_GatherV2 ? static_cast(main()) : nullptr; } const InnerProduct *main_as_InnerProduct() const { return main_type() == OpParameter_InnerProduct ? static_cast(main()) : nullptr; } const Input *main_as_Input() const { return main_type() == OpParameter_Input ? static_cast(main()) : nullptr; } const Interp *main_as_Interp() const { return main_type() == OpParameter_Interp ? static_cast(main()) : nullptr; } const LRN *main_as_LRN() const { return main_type() == OpParameter_LRN ? static_cast(main()) : nullptr; } const LSTM *main_as_LSTM() const { return main_type() == OpParameter_LSTM ? static_cast(main()) : nullptr; } const MatMul *main_as_MatMul() const { return main_type() == OpParameter_MatMul ? static_cast(main()) : nullptr; } const NonMaxSuppressionV2 *main_as_NonMaxSuppressionV2() const { return main_type() == OpParameter_NonMaxSuppressionV2 ? static_cast(main()) : nullptr; } const Normalize *main_as_Normalize() const { return main_type() == OpParameter_Normalize ? static_cast(main()) : nullptr; } const PackParam *main_as_PackParam() const { return main_type() == OpParameter_PackParam ? static_cast(main()) : nullptr; } const Permute *main_as_Permute() const { return main_type() == OpParameter_Permute ? static_cast(main()) : nullptr; } const Plugin *main_as_Plugin() const { return main_type() == OpParameter_Plugin ? static_cast(main()) : nullptr; } const Pool *main_as_Pool() const { return main_type() == OpParameter_Pool ? static_cast(main()) : nullptr; } const PRelu *main_as_PRelu() const { return main_type() == OpParameter_PRelu ? static_cast(main()) : nullptr; } const PriorBox *main_as_PriorBox() const { return main_type() == OpParameter_PriorBox ? static_cast(main()) : nullptr; } const Proposal *main_as_Proposal() const { return main_type() == OpParameter_Proposal ? static_cast(main()) : nullptr; } const QuantizedAvgPool *main_as_QuantizedAvgPool() const { return main_type() == OpParameter_QuantizedAvgPool ? static_cast(main()) : nullptr; } const QuantizedBiasAdd *main_as_QuantizedBiasAdd() const { return main_type() == OpParameter_QuantizedBiasAdd ? static_cast(main()) : nullptr; } const QuantizedConcat *main_as_QuantizedConcat() const { return main_type() == OpParameter_QuantizedConcat ? static_cast(main()) : nullptr; } const QuantizedLogistic *main_as_QuantizedLogistic() const { return main_type() == OpParameter_QuantizedLogistic ? static_cast(main()) : nullptr; } const QuantizedMatMul *main_as_QuantizedMatMul() const { return main_type() == OpParameter_QuantizedMatMul ? static_cast(main()) : nullptr; } const QuantizedMaxPool *main_as_QuantizedMaxPool() const { return main_type() == OpParameter_QuantizedMaxPool ? static_cast(main()) : nullptr; } const QuantizedRelu *main_as_QuantizedRelu() const { return main_type() == OpParameter_QuantizedRelu ? static_cast(main()) : nullptr; } const QuantizedRelu6 *main_as_QuantizedRelu6() const { return main_type() == OpParameter_QuantizedRelu6 ? static_cast(main()) : nullptr; } const QuantizedReshape *main_as_QuantizedReshape() const { return main_type() == OpParameter_QuantizedReshape ? static_cast(main()) : nullptr; } const QuantizedSoftmax *main_as_QuantizedSoftmax() const { return main_type() == OpParameter_QuantizedSoftmax ? static_cast(main()) : nullptr; } const QuantizeMaxMin *main_as_QuantizeMaxMin() const { return main_type() == OpParameter_QuantizeMaxMin ? static_cast(main()) : nullptr; } const QuantizeV2 *main_as_QuantizeV2() const { return main_type() == OpParameter_QuantizeV2 ? static_cast(main()) : nullptr; } const Range *main_as_Range() const { return main_type() == OpParameter_Range ? static_cast(main()) : nullptr; } const Rank *main_as_Rank() const { return main_type() == OpParameter_Rank ? static_cast(main()) : nullptr; } const ReduceJoin *main_as_ReduceJoin() const { return main_type() == OpParameter_ReduceJoin ? static_cast(main()) : nullptr; } const ReductionParam *main_as_ReductionParam() const { return main_type() == OpParameter_ReductionParam ? static_cast(main()) : nullptr; } const Relu *main_as_Relu() const { return main_type() == OpParameter_Relu ? static_cast(main()) : nullptr; } const Relu6 *main_as_Relu6() const { return main_type() == OpParameter_Relu6 ? static_cast(main()) : nullptr; } const RequantizationRange *main_as_RequantizationRange() const { return main_type() == OpParameter_RequantizationRange ? static_cast(main()) : nullptr; } const Requantize *main_as_Requantize() const { return main_type() == OpParameter_Requantize ? static_cast(main()) : nullptr; } const Reshape *main_as_Reshape() const { return main_type() == OpParameter_Reshape ? static_cast(main()) : nullptr; } const Resize *main_as_Resize() const { return main_type() == OpParameter_Resize ? static_cast(main()) : nullptr; } const RoiParameters *main_as_RoiParameters() const { return main_type() == OpParameter_RoiParameters ? static_cast(main()) : nullptr; } const Scale *main_as_Scale() const { return main_type() == OpParameter_Scale ? static_cast(main()) : nullptr; } const Selu *main_as_Selu() const { return main_type() == OpParameter_Selu ? static_cast(main()) : nullptr; } const Size *main_as_Size() const { return main_type() == OpParameter_Size ? static_cast(main()) : nullptr; } const Slice *main_as_Slice() const { return main_type() == OpParameter_Slice ? static_cast(main()) : nullptr; } const SliceTf *main_as_SliceTf() const { return main_type() == OpParameter_SliceTf ? static_cast(main()) : nullptr; } const SpaceBatch *main_as_SpaceBatch() const { return main_type() == OpParameter_SpaceBatch ? static_cast(main()) : nullptr; } const SqueezeParam *main_as_SqueezeParam() const { return main_type() == OpParameter_SqueezeParam ? static_cast(main()) : nullptr; } const StridedSliceParam *main_as_StridedSliceParam() const { return main_type() == OpParameter_StridedSliceParam ? static_cast(main()) : nullptr; } const TensorConvertInfo *main_as_TensorConvertInfo() const { return main_type() == OpParameter_TensorConvertInfo ? static_cast(main()) : nullptr; } const TfQuantizedConv2D *main_as_TfQuantizedConv2D() const { return main_type() == OpParameter_TfQuantizedConv2D ? static_cast(main()) : nullptr; } const TopKV2 *main_as_TopKV2() const { return main_type() == OpParameter_TopKV2 ? static_cast(main()) : nullptr; } const Transpose *main_as_Transpose() const { return main_type() == OpParameter_Transpose ? static_cast(main()) : nullptr; } const UnaryOp *main_as_UnaryOp() const { return main_type() == OpParameter_UnaryOp ? static_cast(main()) : nullptr; } const MomentsParam *main_as_MomentsParam() const { return main_type() == OpParameter_MomentsParam ? static_cast(main()) : nullptr; } const RNNParam *main_as_RNNParam() const { return main_type() == OpParameter_RNNParam ? static_cast(main()) : nullptr; } const BatchMatMulParam *main_as_BatchMatMulParam() const { return main_type() == OpParameter_BatchMatMulParam ? static_cast(main()) : nullptr; } const QuantizedFloatParam *main_as_QuantizedFloatParam() const { return main_type() == OpParameter_QuantizedFloatParam ? static_cast(main()) : nullptr; } const DepthSpaceParam *main_as_DepthSpaceParam() const { return main_type() == OpParameter_DepthSpaceParam ? static_cast(main()) : nullptr; } const EltwiseInt8 *main_as_EltwiseInt8() const { return main_type() == OpParameter_EltwiseInt8 ? static_cast(main()) : nullptr; } const ReverseSequenceParam *main_as_ReverseSequenceParam() const { return main_type() == OpParameter_ReverseSequenceParam ? static_cast(main()) : nullptr; } const Extra *main_as_Extra() const { return main_type() == OpParameter_Extra ? static_cast(main()) : nullptr; } const Pool3D *main_as_Pool3D() const { return main_type() == OpParameter_Pool3D ? static_cast(main()) : nullptr; } const Convolution3D *main_as_Convolution3D() const { return main_type() == OpParameter_Convolution3D ? static_cast(main()) : nullptr; } const ELU *main_as_ELU() const { return main_type() == OpParameter_ELU ? static_cast(main()) : nullptr; } const DetectionPostProcessParam *main_as_DetectionPostProcessParam() const { return main_type() == OpParameter_DetectionPostProcessParam ? static_cast(main()) : nullptr; } const OneHotParam *main_as_OneHotParam() const { return main_type() == OpParameter_OneHotParam ? static_cast(main()) : nullptr; } const PadParam *main_as_PadParam() const { return main_type() == OpParameter_PadParam ? static_cast(main()) : nullptr; } const WhileParam *main_as_WhileParam() const { return main_type() == OpParameter_WhileParam ? static_cast(main()) : nullptr; } const IfParam *main_as_IfParam() const { return main_type() == OpParameter_IfParam ? static_cast(main()) : nullptr; } const RandomUniform *main_as_RandomUniform() const { return main_type() == OpParameter_RandomUniform ? static_cast(main()) : nullptr; } const LayerNorm *main_as_LayerNorm() const { return main_type() == OpParameter_LayerNorm ? static_cast(main()) : nullptr; } const TensorArray *main_as_TensorArray() const { return main_type() == OpParameter_TensorArray ? static_cast(main()) : nullptr; } const LSTMBlockCell *main_as_LSTMBlockCell() const { return main_type() == OpParameter_LSTMBlockCell ? static_cast(main()) : nullptr; } const GridSample *main_as_GridSample() const { return main_type() == OpParameter_GridSample ? static_cast(main()) : nullptr; } const LoopParam *main_as_LoopParam() const { return main_type() == OpParameter_LoopParam ? static_cast(main()) : nullptr; } const ImageProcessParam *main_as_ImageProcessParam() const { return main_type() == OpParameter_ImageProcessParam ? static_cast(main()) : nullptr; } const CumSum *main_as_CumSum() const { return main_type() == OpParameter_CumSum ? static_cast(main()) : nullptr; } const GroupNorm *main_as_GroupNorm() const { return main_type() == OpParameter_GroupNorm ? static_cast(main()) : nullptr; } const FmhaV2Param *main_as_FmhaV2Param() const { return main_type() == OpParameter_FmhaV2Param ? static_cast(main()) : nullptr; } const FmhcaParam *main_as_FmhcaParam() const { return main_type() == OpParameter_FmhcaParam ? static_cast(main()) : nullptr; } const AttentionParam *main_as_AttentionParam() const { return main_type() == OpParameter_AttentionParam ? static_cast(main()) : nullptr; } const StftParam *main_as_StftParam() const { return main_type() == OpParameter_StftParam ? static_cast(main()) : nullptr; } const LinearAttentionParam *main_as_LinearAttentionParam() const { return main_type() == OpParameter_LinearAttentionParam ? static_cast(main()) : nullptr; } const ShapeParam *main_as_ShapeParam() const { return main_type() == OpParameter_ShapeParam ? static_cast(main()) : nullptr; } const RoPEParam *main_as_RoPEParam() const { return main_type() == OpParameter_RoPEParam ? static_cast(main()) : nullptr; } const flatbuffers::String *name() const { return GetPointer(10); } const flatbuffers::Vector *outputIndexes() const { return GetPointer *>(12); } OpType type() const { return static_cast(GetField(14, 0)); } MNN_DATA_FORMAT defaultDimentionFormat() const { return static_cast(GetField(16, 1)); } const flatbuffers::String *externalPath() const { return GetPointer(18); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyVector(inputIndexes()) && VerifyField(verifier, 6) && VerifyOffset(verifier, 8) && VerifyOpParameter(verifier, main(), main_type()) && VerifyOffset(verifier, 10) && verifier.VerifyString(name()) && VerifyOffset(verifier, 12) && verifier.VerifyVector(outputIndexes()) && VerifyField(verifier, 14) && VerifyField(verifier, 16) && VerifyOffset(verifier, 18) && verifier.VerifyString(externalPath()) && verifier.EndTable(); } OpT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(OpT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; 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 { return main_as_QuantizedAdd(); } template<> inline const ArgMax *Op::main_as() const { return main_as_ArgMax(); } template<> inline const AsString *Op::main_as() const { return main_as_AsString(); } template<> inline const Axis *Op::main_as() const { return main_as_Axis(); } template<> inline const BatchNorm *Op::main_as() const { return main_as_BatchNorm(); } template<> inline const BinaryOp *Op::main_as() const { return main_as_BinaryOp(); } template<> inline const Blob *Op::main_as() const { return main_as_Blob(); } template<> inline const CastParam *Op::main_as() const { return main_as_CastParam(); } template<> inline const Convolution2D *Op::main_as() const { return main_as_Convolution2D(); } template<> inline const Crop *Op::main_as() const { return main_as_Crop(); } template<> inline const CropAndResize *Op::main_as() const { return main_as_CropAndResize(); } template<> inline const Dequantize *Op::main_as() const { return main_as_Dequantize(); } template<> inline const DetectionOutput *Op::main_as() const { return main_as_DetectionOutput(); } template<> inline const Eltwise *Op::main_as() const { return main_as_Eltwise(); } template<> inline const ExpandDims *Op::main_as() const { return main_as_ExpandDims(); } template<> inline const Fill *Op::main_as() const { return main_as_Fill(); } template<> inline const Flatten *Op::main_as() const { return main_as_Flatten(); } template<> inline const Gather *Op::main_as() const { return main_as_Gather(); } template<> inline const GatherV2 *Op::main_as() const { return main_as_GatherV2(); } template<> inline const InnerProduct *Op::main_as() const { return main_as_InnerProduct(); } template<> inline const Input *Op::main_as() const { return main_as_Input(); } template<> inline const Interp *Op::main_as() const { return main_as_Interp(); } template<> inline const LRN *Op::main_as() const { return main_as_LRN(); } template<> inline const LSTM *Op::main_as() const { return main_as_LSTM(); } template<> inline const MatMul *Op::main_as() const { return main_as_MatMul(); } template<> inline const NonMaxSuppressionV2 *Op::main_as() const { return main_as_NonMaxSuppressionV2(); } template<> inline const Normalize *Op::main_as() const { return main_as_Normalize(); } template<> inline const PackParam *Op::main_as() const { return main_as_PackParam(); } template<> inline const Permute *Op::main_as() const { return main_as_Permute(); } template<> inline const Plugin *Op::main_as() const { return main_as_Plugin(); } template<> inline const Pool *Op::main_as() const { return main_as_Pool(); } template<> inline const PRelu *Op::main_as() const { return main_as_PRelu(); } template<> inline const PriorBox *Op::main_as() const { return main_as_PriorBox(); } template<> inline const Proposal *Op::main_as() const { return main_as_Proposal(); } template<> inline const QuantizedAvgPool *Op::main_as() const { return main_as_QuantizedAvgPool(); } template<> inline const QuantizedBiasAdd *Op::main_as() const { return main_as_QuantizedBiasAdd(); } template<> inline const QuantizedConcat *Op::main_as() const { return main_as_QuantizedConcat(); } template<> inline const QuantizedLogistic *Op::main_as() const { return main_as_QuantizedLogistic(); } template<> inline const QuantizedMatMul *Op::main_as() const { return main_as_QuantizedMatMul(); } template<> inline const QuantizedMaxPool *Op::main_as() const { return main_as_QuantizedMaxPool(); } template<> inline const QuantizedRelu *Op::main_as() const { return main_as_QuantizedRelu(); } template<> inline const QuantizedRelu6 *Op::main_as() const { return main_as_QuantizedRelu6(); } template<> inline const QuantizedReshape *Op::main_as() const { return main_as_QuantizedReshape(); } template<> inline const QuantizedSoftmax *Op::main_as() const { return main_as_QuantizedSoftmax(); } template<> inline const QuantizeMaxMin *Op::main_as() const { return main_as_QuantizeMaxMin(); } template<> inline const QuantizeV2 *Op::main_as() const { return main_as_QuantizeV2(); } template<> inline const Range *Op::main_as() const { return main_as_Range(); } template<> inline const Rank *Op::main_as() const { return main_as_Rank(); } template<> inline const ReduceJoin *Op::main_as() const { return main_as_ReduceJoin(); } template<> inline const ReductionParam *Op::main_as() const { return main_as_ReductionParam(); } template<> inline const Relu *Op::main_as() const { return main_as_Relu(); } template<> inline const Relu6 *Op::main_as() const { return main_as_Relu6(); } template<> inline const RequantizationRange *Op::main_as() const { return main_as_RequantizationRange(); } template<> inline const Requantize *Op::main_as() const { return main_as_Requantize(); } template<> inline const Reshape *Op::main_as() const { return main_as_Reshape(); } template<> inline const Resize *Op::main_as() const { return main_as_Resize(); } template<> inline const RoiParameters *Op::main_as() const { return main_as_RoiParameters(); } template<> inline const Scale *Op::main_as() const { return main_as_Scale(); } template<> inline const Selu *Op::main_as() const { return main_as_Selu(); } template<> inline const Size *Op::main_as() const { return main_as_Size(); } template<> inline const Slice *Op::main_as() const { return main_as_Slice(); } template<> inline const SliceTf *Op::main_as() const { return main_as_SliceTf(); } template<> inline const SpaceBatch *Op::main_as() const { return main_as_SpaceBatch(); } template<> inline const SqueezeParam *Op::main_as() const { return main_as_SqueezeParam(); } template<> inline const StridedSliceParam *Op::main_as() const { return main_as_StridedSliceParam(); } template<> inline const TensorConvertInfo *Op::main_as() const { return main_as_TensorConvertInfo(); } template<> inline const TfQuantizedConv2D *Op::main_as() const { return main_as_TfQuantizedConv2D(); } template<> inline const TopKV2 *Op::main_as() const { return main_as_TopKV2(); } template<> inline const Transpose *Op::main_as() const { return main_as_Transpose(); } template<> inline const UnaryOp *Op::main_as() const { return main_as_UnaryOp(); } template<> inline const MomentsParam *Op::main_as() const { return main_as_MomentsParam(); } template<> inline const RNNParam *Op::main_as() const { return main_as_RNNParam(); } template<> inline const BatchMatMulParam *Op::main_as() const { return main_as_BatchMatMulParam(); } template<> inline const QuantizedFloatParam *Op::main_as() const { return main_as_QuantizedFloatParam(); } template<> inline const DepthSpaceParam *Op::main_as() const { return main_as_DepthSpaceParam(); } template<> inline const EltwiseInt8 *Op::main_as() const { return main_as_EltwiseInt8(); } template<> inline const ReverseSequenceParam *Op::main_as() const { return main_as_ReverseSequenceParam(); } template<> inline const Extra *Op::main_as() const { return main_as_Extra(); } template<> inline const Pool3D *Op::main_as() const { return main_as_Pool3D(); } template<> inline const Convolution3D *Op::main_as() const { return main_as_Convolution3D(); } template<> inline const ELU *Op::main_as() const { return main_as_ELU(); } template<> inline const DetectionPostProcessParam *Op::main_as() const { return main_as_DetectionPostProcessParam(); } template<> inline const OneHotParam *Op::main_as() const { return main_as_OneHotParam(); } template<> inline const PadParam *Op::main_as() const { return main_as_PadParam(); } template<> inline const WhileParam *Op::main_as() const { return main_as_WhileParam(); } template<> inline const IfParam *Op::main_as() const { return main_as_IfParam(); } template<> inline const RandomUniform *Op::main_as() const { return main_as_RandomUniform(); } template<> inline const LayerNorm *Op::main_as() const { return main_as_LayerNorm(); } template<> inline const TensorArray *Op::main_as() const { return main_as_TensorArray(); } template<> inline const LSTMBlockCell *Op::main_as() const { return main_as_LSTMBlockCell(); } template<> inline const GridSample *Op::main_as() const { return main_as_GridSample(); } template<> inline const LoopParam *Op::main_as() const { return main_as_LoopParam(); } template<> inline const ImageProcessParam *Op::main_as() const { return main_as_ImageProcessParam(); } template<> inline const CumSum *Op::main_as() const { return main_as_CumSum(); } template<> inline const GroupNorm *Op::main_as() const { return main_as_GroupNorm(); } template<> inline const FmhaV2Param *Op::main_as() const { return main_as_FmhaV2Param(); } template<> inline const FmhcaParam *Op::main_as() const { return main_as_FmhcaParam(); } template<> inline const AttentionParam *Op::main_as() const { return main_as_AttentionParam(); } template<> inline const StftParam *Op::main_as() const { return main_as_StftParam(); } template<> inline const LinearAttentionParam *Op::main_as() const { return main_as_LinearAttentionParam(); } template<> inline const ShapeParam *Op::main_as() const { return main_as_ShapeParam(); } template<> inline const RoPEParam *Op::main_as() const { return main_as_RoPEParam(); } struct OpBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_inputIndexes(flatbuffers::Offset> inputIndexes) { fbb_.AddOffset(4, inputIndexes); } void add_main_type(OpParameter main_type) { fbb_.AddElement(6, static_cast(main_type), 0); } void add_main(flatbuffers::Offset main) { fbb_.AddOffset(8, main); } void add_name(flatbuffers::Offset name) { fbb_.AddOffset(10, name); } void add_outputIndexes(flatbuffers::Offset> outputIndexes) { fbb_.AddOffset(12, outputIndexes); } void add_type(OpType type) { fbb_.AddElement(14, static_cast(type), 0); } void add_defaultDimentionFormat(MNN_DATA_FORMAT defaultDimentionFormat) { fbb_.AddElement(16, static_cast(defaultDimentionFormat), 1); } void add_externalPath(flatbuffers::Offset externalPath) { fbb_.AddOffset(18, externalPath); } 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); return o; } }; inline flatbuffers::Offset CreateOp( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset> inputIndexes = 0, OpParameter main_type = 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, flatbuffers::Offset externalPath = 0) { OpBuilder builder_(_fbb); builder_.add_externalPath(externalPath); builder_.add_type(type); builder_.add_outputIndexes(outputIndexes); builder_.add_name(name); builder_.add_main(main); builder_.add_inputIndexes(inputIndexes); builder_.add_defaultDimentionFormat(defaultDimentionFormat); builder_.add_main_type(main_type); return builder_.Finish(); } flatbuffers::Offset CreateOp(flatbuffers::FlatBufferBuilder &_fbb, const OpT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct ViewT : public flatbuffers::NativeTable { typedef View TableType; int32_t offset; std::vector stride; ViewT() : offset(0) { } }; struct View FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef ViewT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return ViewTypeTable(); } int32_t offset() const { return GetField(4, 0); } const flatbuffers::Vector *stride() const { return GetPointer *>(6); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4) && VerifyOffset(verifier, 6) && verifier.VerifyVector(stride()) && verifier.EndTable(); } ViewT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(ViewT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const ViewT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct ViewBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_offset(int32_t offset) { fbb_.AddElement(4, offset, 0); } void add_stride(flatbuffers::Offset> stride) { fbb_.AddOffset(6, stride); } explicit ViewBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } ViewBuilder &operator=(const ViewBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateView( flatbuffers::FlatBufferBuilder &_fbb, int32_t offset = 0, flatbuffers::Offset> stride = 0) { ViewBuilder builder_(_fbb); builder_.add_stride(stride); builder_.add_offset(offset); return builder_.Finish(); } flatbuffers::Offset CreateView(flatbuffers::FlatBufferBuilder &_fbb, const ViewT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); 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) { } }; struct Region FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef RegionT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return RegionTypeTable(); } const View *src() const { return GetPointer(4); } const View *dst() const { return GetPointer(6); } const flatbuffers::Vector *size() const { return GetPointer *>(8); } int32_t origin() const { return GetField(10, 0); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyTable(src()) && VerifyOffset(verifier, 6) && verifier.VerifyTable(dst()) && VerifyOffset(verifier, 8) && verifier.VerifyVector(size()) && VerifyField(verifier, 10) && verifier.EndTable(); } RegionT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(RegionT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const RegionT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct RegionBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_src(flatbuffers::Offset src) { fbb_.AddOffset(4, src); } void add_dst(flatbuffers::Offset dst) { fbb_.AddOffset(6, dst); } void add_size(flatbuffers::Offset> size) { fbb_.AddOffset(8, size); } void add_origin(int32_t origin) { fbb_.AddElement(10, origin, 0); } explicit RegionBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } RegionBuilder &operator=(const RegionBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateRegion( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset src = 0, flatbuffers::Offset dst = 0, flatbuffers::Offset> size = 0, int32_t origin = 0) { RegionBuilder builder_(_fbb); builder_.add_origin(origin); builder_.add_size(size); builder_.add_dst(dst); builder_.add_src(src); return builder_.Finish(); } flatbuffers::Offset CreateRegion(flatbuffers::FlatBufferBuilder &_fbb, const RegionT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct TensorDescribeT : public flatbuffers::NativeTable { typedef TensorDescribe TableType; std::unique_ptr blob; int32_t index; std::string name; std::vector> regions; std::unique_ptr quantInfo; TensorDescribeT() : index(0) { } }; struct TensorDescribe FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef TensorDescribeT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return TensorDescribeTypeTable(); } const Blob *blob() const { return GetPointer(4); } int32_t index() const { return GetField(6, 0); } const flatbuffers::String *name() const { return GetPointer(8); } const flatbuffers::Vector> *regions() const { return GetPointer> *>(10); } const TensorQuantInfo *quantInfo() const { return GetPointer(12); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyTable(blob()) && VerifyField(verifier, 6) && VerifyOffset(verifier, 8) && verifier.VerifyString(name()) && VerifyOffset(verifier, 10) && verifier.VerifyVector(regions()) && verifier.VerifyVectorOfTables(regions()) && VerifyOffset(verifier, 12) && verifier.VerifyTable(quantInfo()) && verifier.EndTable(); } TensorDescribeT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(TensorDescribeT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorDescribeT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct TensorDescribeBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_blob(flatbuffers::Offset blob) { fbb_.AddOffset(4, blob); } void add_index(int32_t index) { fbb_.AddElement(6, index, 0); } void add_name(flatbuffers::Offset name) { fbb_.AddOffset(8, name); } void add_regions(flatbuffers::Offset>> regions) { fbb_.AddOffset(10, regions); } void add_quantInfo(flatbuffers::Offset quantInfo) { fbb_.AddOffset(12, quantInfo); } 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); return o; } }; inline flatbuffers::Offset CreateTensorDescribe( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset blob = 0, int32_t index = 0, flatbuffers::Offset name = 0, flatbuffers::Offset>> regions = 0, flatbuffers::Offset quantInfo = 0) { TensorDescribeBuilder builder_(_fbb); builder_.add_quantInfo(quantInfo); builder_.add_regions(regions); builder_.add_name(name); builder_.add_index(index); builder_.add_blob(blob); return builder_.Finish(); } flatbuffers::Offset CreateTensorDescribe(flatbuffers::FlatBufferBuilder &_fbb, const TensorDescribeT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct SubGraphProtoT : public flatbuffers::NativeTable { typedef SubGraphProto TableType; std::string name; std::vector inputs; std::vector outputs; std::vector tensors; std::vector> nodes; std::vector> extraTensorDescribe; SubGraphProtoT() { } }; struct SubGraphProto FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef SubGraphProtoT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return SubGraphProtoTypeTable(); } const flatbuffers::String *name() const { return GetPointer(4); } const flatbuffers::Vector *inputs() const { return GetPointer *>(6); } const flatbuffers::Vector *outputs() const { return GetPointer *>(8); } const flatbuffers::Vector> *tensors() const { return GetPointer> *>(10); } const flatbuffers::Vector> *nodes() const { return GetPointer> *>(12); } const flatbuffers::Vector> *extraTensorDescribe() const { return GetPointer> *>(14); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyString(name()) && VerifyOffset(verifier, 6) && verifier.VerifyVector(inputs()) && VerifyOffset(verifier, 8) && verifier.VerifyVector(outputs()) && VerifyOffset(verifier, 10) && verifier.VerifyVector(tensors()) && verifier.VerifyVectorOfStrings(tensors()) && VerifyOffset(verifier, 12) && verifier.VerifyVector(nodes()) && verifier.VerifyVectorOfTables(nodes()) && VerifyOffset(verifier, 14) && verifier.VerifyVector(extraTensorDescribe()) && verifier.VerifyVectorOfTables(extraTensorDescribe()) && verifier.EndTable(); } SubGraphProtoT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(SubGraphProtoT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphProtoT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct SubGraphProtoBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_name(flatbuffers::Offset name) { fbb_.AddOffset(4, name); } void add_inputs(flatbuffers::Offset> inputs) { fbb_.AddOffset(6, inputs); } void add_outputs(flatbuffers::Offset> outputs) { fbb_.AddOffset(8, outputs); } void add_tensors(flatbuffers::Offset>> tensors) { fbb_.AddOffset(10, tensors); } void add_nodes(flatbuffers::Offset>> nodes) { fbb_.AddOffset(12, nodes); } void add_extraTensorDescribe(flatbuffers::Offset>> extraTensorDescribe) { fbb_.AddOffset(14, extraTensorDescribe); } 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); return o; } }; inline flatbuffers::Offset CreateSubGraphProto( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset name = 0, flatbuffers::Offset> inputs = 0, flatbuffers::Offset> outputs = 0, flatbuffers::Offset>> tensors = 0, flatbuffers::Offset>> nodes = 0, flatbuffers::Offset>> extraTensorDescribe = 0) { SubGraphProtoBuilder builder_(_fbb); builder_.add_extraTensorDescribe(extraTensorDescribe); builder_.add_nodes(nodes); builder_.add_tensors(tensors); builder_.add_outputs(outputs); builder_.add_inputs(inputs); builder_.add_name(name); return builder_.Finish(); } flatbuffers::Offset CreateSubGraphProto(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphProtoT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct TensorQuantInfoT : public flatbuffers::NativeTable { typedef TensorQuantInfo TableType; float scale; float zero; float min; float max; DataType type; TensorQuantInfoT() : scale(0.0f), zero(0.0f), min(-128.0f), max(127.0f), type(DataType_DT_INVALID) { } }; struct TensorQuantInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef TensorQuantInfoT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return TensorQuantInfoTypeTable(); } float scale() const { return GetField(4, 0.0f); } float zero() const { return GetField(6, 0.0f); } float min() const { return GetField(8, -128.0f); } float max() const { return GetField(10, 127.0f); } DataType type() const { return static_cast(GetField(12, 0)); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, 4) && VerifyField(verifier, 6) && VerifyField(verifier, 8) && VerifyField(verifier, 10) && VerifyField(verifier, 12) && verifier.EndTable(); } TensorQuantInfoT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(TensorQuantInfoT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorQuantInfoT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct TensorQuantInfoBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_scale(float scale) { fbb_.AddElement(4, scale, 0.0f); } void add_zero(float zero) { fbb_.AddElement(6, zero, 0.0f); } void add_min(float min) { fbb_.AddElement(8, min, -128.0f); } void add_max(float max) { fbb_.AddElement(10, max, 127.0f); } void add_type(DataType type) { fbb_.AddElement(12, static_cast(type), 0); } explicit TensorQuantInfoBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } TensorQuantInfoBuilder &operator=(const TensorQuantInfoBuilder &); flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); auto o = flatbuffers::Offset(end); return o; } }; inline flatbuffers::Offset CreateTensorQuantInfo( flatbuffers::FlatBufferBuilder &_fbb, float scale = 0.0f, float zero = 0.0f, float min = -128.0f, float max = 127.0f, DataType type = DataType_DT_INVALID) { TensorQuantInfoBuilder builder_(_fbb); builder_.add_type(type); builder_.add_max(max); builder_.add_min(min); builder_.add_zero(zero); builder_.add_scale(scale); return builder_.Finish(); } flatbuffers::Offset CreateTensorQuantInfo(flatbuffers::FlatBufferBuilder &_fbb, const TensorQuantInfoT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); struct NetT : public flatbuffers::NativeTable { typedef Net TableType; std::string bizCode; std::vector> extraTensorDescribe; std::unique_ptr extraInfo; std::vector> oplists; std::vector outputName; ForwardType preferForwardType; NetSource sourceType; std::vector tensorName; int32_t tensorNumber; Usage usage; std::vector> subgraphs; std::string mnn_uuid; NetT() : preferForwardType(ForwardType_CPU), sourceType(NetSource_CAFFE), tensorNumber(0), usage(Usage_INFERENCE) { } }; struct Net FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef NetT NativeTableType; static const flatbuffers::TypeTable *MiniReflectTypeTable() { return NetTypeTable(); } const flatbuffers::String *bizCode() const { return GetPointer(4); } const flatbuffers::Vector> *extraTensorDescribe() const { return GetPointer> *>(6); } const ExtraInfo *extraInfo() const { return GetPointer(8); } const flatbuffers::Vector> *oplists() const { return GetPointer> *>(10); } const flatbuffers::Vector> *outputName() const { return GetPointer> *>(12); } ForwardType preferForwardType() const { return static_cast(GetField(14, 0)); } NetSource sourceType() const { return static_cast(GetField(16, 0)); } const flatbuffers::Vector> *tensorName() const { return GetPointer> *>(18); } int32_t tensorNumber() const { return GetField(20, 0); } Usage usage() const { return static_cast(GetField(22, 0)); } const flatbuffers::Vector> *subgraphs() const { return GetPointer> *>(24); } const flatbuffers::String *mnn_uuid() const { return GetPointer(26); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, 4) && verifier.VerifyString(bizCode()) && VerifyOffset(verifier, 6) && verifier.VerifyVector(extraTensorDescribe()) && verifier.VerifyVectorOfTables(extraTensorDescribe()) && VerifyOffset(verifier, 8) && verifier.VerifyTable(extraInfo()) && VerifyOffset(verifier, 10) && verifier.VerifyVector(oplists()) && verifier.VerifyVectorOfTables(oplists()) && VerifyOffset(verifier, 12) && verifier.VerifyVector(outputName()) && verifier.VerifyVectorOfStrings(outputName()) && VerifyField(verifier, 14) && VerifyField(verifier, 16) && VerifyOffset(verifier, 18) && verifier.VerifyVector(tensorName()) && verifier.VerifyVectorOfStrings(tensorName()) && VerifyField(verifier, 20) && VerifyField(verifier, 22) && VerifyOffset(verifier, 24) && verifier.VerifyVector(subgraphs()) && verifier.VerifyVectorOfTables(subgraphs()) && VerifyOffset(verifier, 26) && verifier.VerifyString(mnn_uuid()) && verifier.EndTable(); } NetT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; void UnPackTo(NetT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; static flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const NetT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); }; struct NetBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_bizCode(flatbuffers::Offset bizCode) { fbb_.AddOffset(4, bizCode); } void add_extraTensorDescribe(flatbuffers::Offset>> extraTensorDescribe) { fbb_.AddOffset(6, extraTensorDescribe); } void add_extraInfo(flatbuffers::Offset extraInfo) { fbb_.AddOffset(8, extraInfo); } void add_oplists(flatbuffers::Offset>> oplists) { fbb_.AddOffset(10, oplists); } void add_outputName(flatbuffers::Offset>> outputName) { fbb_.AddOffset(12, outputName); } void add_preferForwardType(ForwardType preferForwardType) { fbb_.AddElement(14, static_cast(preferForwardType), 0); } void add_sourceType(NetSource sourceType) { fbb_.AddElement(16, static_cast(sourceType), 0); } void add_tensorName(flatbuffers::Offset>> tensorName) { fbb_.AddOffset(18, tensorName); } void add_tensorNumber(int32_t tensorNumber) { fbb_.AddElement(20, tensorNumber, 0); } void add_usage(Usage usage) { fbb_.AddElement(22, static_cast(usage), 0); } void add_subgraphs(flatbuffers::Offset>> subgraphs) { fbb_.AddOffset(24, subgraphs); } void add_mnn_uuid(flatbuffers::Offset mnn_uuid) { fbb_.AddOffset(26, mnn_uuid); } 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); return o; } }; inline flatbuffers::Offset CreateNet( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset bizCode = 0, flatbuffers::Offset>> extraTensorDescribe = 0, flatbuffers::Offset extraInfo = 0, flatbuffers::Offset>> oplists = 0, flatbuffers::Offset>> outputName = 0, ForwardType preferForwardType = ForwardType_CPU, NetSource sourceType = NetSource_CAFFE, flatbuffers::Offset>> tensorName = 0, int32_t tensorNumber = 0, Usage usage = Usage_INFERENCE, flatbuffers::Offset>> subgraphs = 0, flatbuffers::Offset mnn_uuid = 0) { NetBuilder builder_(_fbb); builder_.add_mnn_uuid(mnn_uuid); builder_.add_subgraphs(subgraphs); builder_.add_tensorNumber(tensorNumber); builder_.add_tensorName(tensorName); builder_.add_outputName(outputName); builder_.add_oplists(oplists); builder_.add_extraInfo(extraInfo); builder_.add_extraTensorDescribe(extraTensorDescribe); builder_.add_bizCode(bizCode); builder_.add_usage(usage); builder_.add_sourceType(sourceType); builder_.add_preferForwardType(preferForwardType); return builder_.Finish(); } 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; } 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)); } } }; } inline flatbuffers::Offset Plugin::Pack(flatbuffers::FlatBufferBuilder &_fbb, const PluginT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreatePlugin(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreatePlugin(flatbuffers::FlatBufferBuilder &_fbb, const PluginT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (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; return MNN::CreatePlugin( _fbb, _type, _attr); } inline ExtraT *Extra::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new ExtraT(); UnPackTo(_o, _resolver); return _o; } 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 = vector(); _o->vector = _e; }; } inline flatbuffers::Offset Extra::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ExtraT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateExtra(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateExtra(flatbuffers::FlatBufferBuilder &_fbb, const ExtraT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ExtraT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; 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 _vector = _o->vector; return MNN::CreateExtra( _fbb, _type, _engine, _info, _attr, _vector); } inline StringVecT *StringVec::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new StringVecT(); UnPackTo(_o, _resolver); return _o; } 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(); } } }; } inline flatbuffers::Offset StringVec::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StringVecT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateStringVec(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateStringVec(flatbuffers::FlatBufferBuilder &_fbb, const StringVecT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StringVecT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _data = _o->data.size() ? _fbb.CreateVectorOfStrings(_o->data) : 0; return MNN::CreateStringVec( _fbb, _data); } inline AttentionParamT *AttentionParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new AttentionParamT(); UnPackTo(_o, _resolver); return _o; } inline void AttentionParam::UnPackTo(AttentionParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = kv_cache(); _o->kv_cache = _e; }; { auto _e = kv_shared_layer(); if (_e) _o->kv_shared_layer = _e->str(); }; { auto _e = layer_index(); _o->layer_index = _e; }; { auto _e = kv_shared_layer_index(); _o->kv_shared_layer_index = _e; }; { auto _e = mhq_quant(); if (_e) { _o->mhq_quant.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->mhq_quant[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; { auto _e = output_c4(); _o->output_c4 = _e; }; { auto _e = attnScale(); _o->attnScale = _e; }; } inline flatbuffers::Offset AttentionParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const AttentionParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateAttentionParam(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateAttentionParam(flatbuffers::FlatBufferBuilder &_fbb, const AttentionParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const AttentionParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _kv_cache = _o->kv_cache; auto _kv_shared_layer = _o->kv_shared_layer.empty() ? 0 : _fbb.CreateString(_o->kv_shared_layer); auto _layer_index = _o->layer_index; auto _kv_shared_layer_index = _o->kv_shared_layer_index; auto _mhq_quant = _o->mhq_quant.size() ? _fbb.CreateVector> (_o->mhq_quant.size(), [](size_t i, _VectorArgs *__va) { return CreateTensorQuantInfo(*__va->__fbb, __va->__o->mhq_quant[i].get(), __va->__rehasher); }, &_va ) : 0; auto _output_c4 = _o->output_c4; auto _attnScale = _o->attnScale; return MNN::CreateAttentionParam( _fbb, _kv_cache, _kv_shared_layer, _layer_index, _kv_shared_layer_index, _mhq_quant, _output_c4, _attnScale); } inline LinearAttentionParamT *LinearAttentionParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new LinearAttentionParamT(); UnPackTo(_o, _resolver); return _o; } inline void LinearAttentionParam::UnPackTo(LinearAttentionParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = attn_type(); if (_e) _o->attn_type = _e->str(); }; { auto _e = num_k_heads(); _o->num_k_heads = _e; }; { auto _e = num_v_heads(); _o->num_v_heads = _e; }; { auto _e = head_k_dim(); _o->head_k_dim = _e; }; { auto _e = head_v_dim(); _o->head_v_dim = _e; }; { auto _e = use_qk_l2norm(); _o->use_qk_l2norm = _e; }; } inline flatbuffers::Offset LinearAttentionParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LinearAttentionParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLinearAttentionParam(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateLinearAttentionParam(flatbuffers::FlatBufferBuilder &_fbb, const LinearAttentionParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LinearAttentionParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _attn_type = _o->attn_type.empty() ? 0 : _fbb.CreateString(_o->attn_type); auto _num_k_heads = _o->num_k_heads; auto _num_v_heads = _o->num_v_heads; auto _head_k_dim = _o->head_k_dim; auto _head_v_dim = _o->head_v_dim; auto _use_qk_l2norm = _o->use_qk_l2norm; return MNN::CreateLinearAttentionParam( _fbb, _attn_type, _num_k_heads, _num_v_heads, _head_k_dim, _head_v_dim, _use_qk_l2norm); } inline RoPEParamT *RoPEParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new RoPEParamT(); UnPackTo(_o, _resolver); return _o; } inline void RoPEParam::UnPackTo(RoPEParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = rope_cut_head_dim(); _o->rope_cut_head_dim = _e; }; { auto _e = num_head(); _o->num_head = _e; }; { auto _e = kv_num_head(); _o->kv_num_head = _e; }; { auto _e = head_dim(); _o->head_dim = _e; }; { auto _e = q_norm(); if (_e) _o->q_norm = std::unique_ptr(_e->UnPack(_resolver)); }; { auto _e = k_norm(); if (_e) _o->k_norm = std::unique_ptr(_e->UnPack(_resolver)); }; } inline flatbuffers::Offset RoPEParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RoPEParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateRoPEParam(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateRoPEParam(flatbuffers::FlatBufferBuilder &_fbb, const RoPEParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const RoPEParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _rope_cut_head_dim = _o->rope_cut_head_dim; auto _num_head = _o->num_head; auto _kv_num_head = _o->kv_num_head; auto _head_dim = _o->head_dim; auto _q_norm = _o->q_norm ? CreateLayerNorm(_fbb, _o->q_norm.get(), _rehasher) : 0; auto _k_norm = _o->k_norm ? CreateLayerNorm(_fbb, _o->k_norm.get(), _rehasher) : 0; return MNN::CreateRoPEParam( _fbb, _rope_cut_head_dim, _num_head, _kv_num_head, _head_dim, _q_norm, _k_norm); } inline FmhaV2ParamT *FmhaV2Param::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new FmhaV2ParamT(); UnPackTo(_o, _resolver); return _o; } inline void FmhaV2Param::UnPackTo(FmhaV2ParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = heads(); _o->heads = _e; }; } inline flatbuffers::Offset FmhaV2Param::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FmhaV2ParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateFmhaV2Param(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateFmhaV2Param(flatbuffers::FlatBufferBuilder &_fbb, const FmhaV2ParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const FmhaV2ParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _heads = _o->heads; return MNN::CreateFmhaV2Param( _fbb, _heads); } inline FmhcaParamT *FmhcaParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new FmhcaParamT(); UnPackTo(_o, _resolver); return _o; } inline void FmhcaParam::UnPackTo(FmhcaParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = heads(); _o->heads = _e; }; } inline flatbuffers::Offset FmhcaParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const FmhcaParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateFmhcaParam(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateFmhcaParam(flatbuffers::FlatBufferBuilder &_fbb, const FmhcaParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const FmhcaParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _heads = _o->heads; return MNN::CreateFmhcaParam( _fbb, _heads); } inline StftParamT *StftParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new StftParamT(); UnPackTo(_o, _resolver); return _o; } inline void StftParam::UnPackTo(StftParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = n_fft(); _o->n_fft = _e; }; { auto _e = hop_length(); _o->hop_length = _e; }; { auto _e = abs(); _o->abs = _e; }; } inline flatbuffers::Offset StftParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const StftParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateStftParam(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateStftParam(flatbuffers::FlatBufferBuilder &_fbb, const StftParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const StftParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _n_fft = _o->n_fft; auto _hop_length = _o->hop_length; auto _abs = _o->abs; return MNN::CreateStftParam( _fbb, _n_fft, _hop_length, _abs); } inline ShapeParamT *ShapeParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new ShapeParamT(); UnPackTo(_o, _resolver); return _o; } inline void ShapeParam::UnPackTo(ShapeParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = hasStart(); _o->hasStart = _e; }; { auto _e = start(); _o->start = _e; }; { auto _e = hasEnd(); _o->hasEnd = _e; }; { auto _e = end(); _o->end = _e; }; } inline flatbuffers::Offset ShapeParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ShapeParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateShapeParam(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateShapeParam(flatbuffers::FlatBufferBuilder &_fbb, const ShapeParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ShapeParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _hasStart = _o->hasStart; auto _start = _o->start; auto _hasEnd = _o->hasEnd; auto _end = _o->end; return MNN::CreateShapeParam( _fbb, _hasStart, _start, _hasEnd, _end); } inline WhileParamT *WhileParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new WhileParamT(); UnPackTo(_o, _resolver); return _o; } 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)); } } }; } inline flatbuffers::Offset WhileParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const WhileParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateWhileParam(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateWhileParam(flatbuffers::FlatBufferBuilder &_fbb, const WhileParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; 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_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; return MNN::CreateWhileParam( _fbb, _cond_graph, _body_graph, _aliases_inputs, _aliases_outputs, _aliases_updates); } inline IfParamT *IfParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new IfParamT(); UnPackTo(_o, _resolver); return _o; } 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)); } } }; } inline flatbuffers::Offset IfParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const IfParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateIfParam(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateIfParam(flatbuffers::FlatBufferBuilder &_fbb, const IfParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; 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; return MNN::CreateIfParam( _fbb, _then_graph, _else_graph, _aliases_inputs, _aliases_outputs); } inline RegionCommandT *RegionCommand::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new RegionCommandT(); UnPackTo(_o, _resolver); return _o; } inline void RegionCommand::UnPackTo(RegionCommandT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = op(); if (_e) _o->op = std::unique_ptr(_e->UnPack(_resolver)); }; { auto _e = steps(); if (_e) { _o->steps.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->steps[_i] = _e->Get(_i); } } }; { 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 = indexes(); if (_e) { _o->indexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->indexes[_i] = _e->Get(_i); } } }; { auto _e = view(); if (_e) { _o->view.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->view[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; { auto _e = fuse(); _o->fuse = _e; }; { auto _e = iterIndexes(); if (_e) { _o->iterIndexes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->iterIndexes[_i] = _e->Get(_i); } } }; } inline flatbuffers::Offset RegionCommand::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RegionCommandT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateRegionCommand(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateRegionCommand(flatbuffers::FlatBufferBuilder &_fbb, const RegionCommandT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const RegionCommandT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _op = _o->op ? CreateOp(_fbb, _o->op.get(), _rehasher) : 0; auto _steps = _o->steps.size() ? _fbb.CreateVector(_o->steps) : 0; auto _size = _o->size.size() ? _fbb.CreateVector(_o->size) : 0; auto _indexes = _o->indexes.size() ? _fbb.CreateVector(_o->indexes) : 0; auto _view = _o->view.size() ? _fbb.CreateVector> (_o->view.size(), [](size_t i, _VectorArgs *__va) { return CreateView(*__va->__fbb, __va->__o->view[i].get(), __va->__rehasher); }, &_va ) : 0; auto _fuse = _o->fuse; auto _iterIndexes = _o->iterIndexes.size() ? _fbb.CreateVector(_o->iterIndexes) : 0; return MNN::CreateRegionCommand( _fbb, _op, _steps, _size, _indexes, _view, _fuse, _iterIndexes); } inline LoopParamT *LoopParam::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new LoopParamT(); UnPackTo(_o, _resolver); return _o; } inline void LoopParam::UnPackTo(LoopParamT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = tensorNumber(); _o->tensorNumber = _e; }; { 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 = extraTensorInfos(); if (_e) { _o->extraTensorInfos.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->extraTensorInfos[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; { auto _e = parallel(); _o->parallel = _e; }; { auto _e = loopNumber(); _o->loopNumber = _e; }; { auto _e = commands(); if (_e) { _o->commands.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->commands[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; { auto _e = initCommand(); if (_e) { _o->initCommand.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->initCommand[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } }; } inline flatbuffers::Offset LoopParam::Pack(flatbuffers::FlatBufferBuilder &_fbb, const LoopParamT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateLoopParam(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateLoopParam(flatbuffers::FlatBufferBuilder &_fbb, const LoopParamT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const LoopParamT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _tensorNumber = _o->tensorNumber; auto _outputIndexes = _o->outputIndexes.size() ? _fbb.CreateVector(_o->outputIndexes) : 0; auto _inputIndexes = _o->inputIndexes.size() ? _fbb.CreateVector(_o->inputIndexes) : 0; auto _extraTensorInfos = _o->extraTensorInfos.size() ? _fbb.CreateVector> (_o->extraTensorInfos.size(), [](size_t i, _VectorArgs *__va) { return CreateTensorDescribe(*__va->__fbb, __va->__o->extraTensorInfos[i].get(), __va->__rehasher); }, &_va ) : 0; auto _parallel = _o->parallel; auto _loopNumber = _o->loopNumber; auto _commands = _o->commands.size() ? _fbb.CreateVector> (_o->commands.size(), [](size_t i, _VectorArgs *__va) { return CreateRegionCommand(*__va->__fbb, __va->__o->commands[i].get(), __va->__rehasher); }, &_va ) : 0; auto _initCommand = _o->initCommand.size() ? _fbb.CreateVector> (_o->initCommand.size(), [](size_t i, _VectorArgs *__va) { return CreateRegionCommand(*__va->__fbb, __va->__o->initCommand[i].get(), __va->__rehasher); }, &_va ) : 0; return MNN::CreateLoopParam( _fbb, _tensorNumber, _outputIndexes, _inputIndexes, _extraTensorInfos, _parallel, _loopNumber, _commands, _initCommand); } inline OpT *Op::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new OpT(); UnPackTo(_o, _resolver); return _o; } 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 = externalPath(); if (_e) _o->externalPath = _e->str(); }; } inline flatbuffers::Offset Op::Pack(flatbuffers::FlatBufferBuilder &_fbb, const OpT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateOp(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateOp(flatbuffers::FlatBufferBuilder &_fbb, const OpT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const OpT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _inputIndexes = _o->inputIndexes.size() ? _fbb.CreateVector(_o->inputIndexes) : 0; auto _main_type = _o->main.type; auto _main = _o->main.Pack(_fbb); auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); auto _outputIndexes = _o->outputIndexes.size() ? _fbb.CreateVector(_o->outputIndexes) : 0; auto _type = _o->type; auto _defaultDimentionFormat = _o->defaultDimentionFormat; auto _externalPath = _o->externalPath.empty() ? 0 : _fbb.CreateString(_o->externalPath); return MNN::CreateOp( _fbb, _inputIndexes, _main_type, _main, _name, _outputIndexes, _type, _defaultDimentionFormat, _externalPath); } inline ViewT *View::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new ViewT(); UnPackTo(_o, _resolver); return _o; } 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); } } }; } inline flatbuffers::Offset View::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ViewT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateView(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateView(flatbuffers::FlatBufferBuilder &_fbb, const ViewT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ViewT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _offset = _o->offset; auto _stride = _o->stride.size() ? _fbb.CreateVector(_o->stride) : 0; return MNN::CreateView( _fbb, _offset, _stride); } inline RegionT *Region::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new RegionT(); UnPackTo(_o, _resolver); return _o; } 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; }; } inline flatbuffers::Offset Region::Pack(flatbuffers::FlatBufferBuilder &_fbb, const RegionT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateRegion(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateRegion(flatbuffers::FlatBufferBuilder &_fbb, const RegionT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const RegionT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _src = _o->src ? CreateView(_fbb, _o->src.get(), _rehasher) : 0; auto _dst = _o->dst ? CreateView(_fbb, _o->dst.get(), _rehasher) : 0; auto _size = _o->size.size() ? _fbb.CreateVector(_o->size) : 0; auto _origin = _o->origin; return MNN::CreateRegion( _fbb, _src, _dst, _size, _origin); } inline TensorDescribeT *TensorDescribe::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new TensorDescribeT(); UnPackTo(_o, _resolver); return _o; } 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 = quantInfo(); if (_e) _o->quantInfo = std::unique_ptr(_e->UnPack(_resolver)); }; } inline flatbuffers::Offset TensorDescribe::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorDescribeT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateTensorDescribe(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateTensorDescribe(flatbuffers::FlatBufferBuilder &_fbb, const TensorDescribeT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TensorDescribeT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; 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 _quantInfo = _o->quantInfo ? CreateTensorQuantInfo(_fbb, _o->quantInfo.get(), _rehasher) : 0; return MNN::CreateTensorDescribe( _fbb, _blob, _index, _name, _regions, _quantInfo); } inline SubGraphProtoT *SubGraphProto::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new SubGraphProtoT(); UnPackTo(_o, _resolver); return _o; } 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 = 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)); } } }; } inline flatbuffers::Offset SubGraphProto::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphProtoT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateSubGraphProto(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateSubGraphProto(flatbuffers::FlatBufferBuilder &_fbb, const SubGraphProtoT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const SubGraphProtoT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); 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 _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; return MNN::CreateSubGraphProto( _fbb, _name, _inputs, _outputs, _tensors, _nodes, _extraTensorDescribe); } inline TensorQuantInfoT *TensorQuantInfo::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new TensorQuantInfoT(); UnPackTo(_o, _resolver); return _o; } inline void TensorQuantInfo::UnPackTo(TensorQuantInfoT *_o, const flatbuffers::resolver_function_t *_resolver) const { (void)_o; (void)_resolver; { auto _e = scale(); _o->scale = _e; }; { auto _e = zero(); _o->zero = _e; }; { auto _e = min(); _o->min = _e; }; { auto _e = max(); _o->max = _e; }; { auto _e = type(); _o->type = _e; }; } inline flatbuffers::Offset TensorQuantInfo::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TensorQuantInfoT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateTensorQuantInfo(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateTensorQuantInfo(flatbuffers::FlatBufferBuilder &_fbb, const TensorQuantInfoT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const TensorQuantInfoT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _scale = _o->scale; auto _zero = _o->zero; auto _min = _o->min; auto _max = _o->max; auto _type = _o->type; return MNN::CreateTensorQuantInfo( _fbb, _scale, _zero, _min, _max, _type); } inline NetT *Net::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new NetT(); UnPackTo(_o, _resolver); return _o; } 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 = extraInfo(); if (_e) _o->extraInfo = 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 = mnn_uuid(); if (_e) _o->mnn_uuid = _e->str(); }; } inline flatbuffers::Offset Net::Pack(flatbuffers::FlatBufferBuilder &_fbb, const NetT* _o, const flatbuffers::rehasher_function_t *_rehasher) { return CreateNet(_fbb, _o, _rehasher); } inline flatbuffers::Offset CreateNet(flatbuffers::FlatBufferBuilder &_fbb, const NetT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (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 _extraInfo = _o->extraInfo ? CreateExtraInfo(_fbb, _o->extraInfo.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 _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 _mnn_uuid = _o->mnn_uuid.empty() ? 0 : _fbb.CreateString(_o->mnn_uuid); return MNN::CreateNet( _fbb, _bizCode, _extraTensorDescribe, _extraInfo, _oplists, _outputName, _preferForwardType, _sourceType, _tensorName, _tensorNumber, _usage, _subgraphs, _mnn_uuid); } inline bool VerifyOpParameter(flatbuffers::Verifier &verifier, const void *obj, OpParameter type) { switch (type) { case OpParameter_NONE: { return true; } case OpParameter_QuantizedAdd: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_ArgMax: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_AsString: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Axis: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_BatchNorm: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_BinaryOp: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Blob: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_CastParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Convolution2D: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Crop: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_CropAndResize: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Dequantize: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_DetectionOutput: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Eltwise: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_ExpandDims: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Fill: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Flatten: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Gather: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_GatherV2: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_InnerProduct: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Input: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Interp: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_LRN: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_LSTM: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_MatMul: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_NonMaxSuppressionV2: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Normalize: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_PackParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Permute: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Plugin: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Pool: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_PRelu: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_PriorBox: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Proposal: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedAvgPool: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedBiasAdd: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedConcat: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedLogistic: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedMatMul: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedMaxPool: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedRelu: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedRelu6: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedReshape: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedSoftmax: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizeMaxMin: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizeV2: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Range: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Rank: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_ReduceJoin: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_ReductionParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Relu: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Relu6: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_RequantizationRange: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Requantize: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Reshape: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Resize: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_RoiParameters: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Scale: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Selu: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Size: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Slice: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_SliceTf: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_SpaceBatch: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_SqueezeParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_StridedSliceParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_TensorConvertInfo: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_TfQuantizedConv2D: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_TopKV2: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Transpose: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_UnaryOp: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_MomentsParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_RNNParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_BatchMatMulParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_QuantizedFloatParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_DepthSpaceParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_EltwiseInt8: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_ReverseSequenceParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Extra: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Pool3D: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_Convolution3D: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_ELU: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_DetectionPostProcessParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_OneHotParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_PadParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_WhileParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_IfParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_RandomUniform: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_LayerNorm: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_TensorArray: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_LSTMBlockCell: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_GridSample: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_LoopParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_ImageProcessParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_CumSum: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_GroupNorm: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_FmhaV2Param: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_FmhcaParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_AttentionParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_StftParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_LinearAttentionParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_ShapeParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case OpParameter_RoPEParam: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } default: return false; } } inline bool VerifyOpParameterVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { if (!values || !types) return !values && !types; if (values->size() != types->size()) return false; for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { if (!VerifyOpParameter( verifier, values->Get(i), types->GetEnum(i))) { return false; } } return true; } 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); return ptr->UnPack(resolver); } case OpParameter_ArgMax: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_AsString: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Axis: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_BatchNorm: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_BinaryOp: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Blob: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_CastParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Convolution2D: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Crop: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_CropAndResize: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Dequantize: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_DetectionOutput: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Eltwise: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_ExpandDims: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Fill: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Flatten: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Gather: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_GatherV2: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_InnerProduct: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Input: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Interp: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_LRN: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_LSTM: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_MatMul: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_NonMaxSuppressionV2: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Normalize: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_PackParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Permute: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Plugin: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Pool: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_PRelu: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_PriorBox: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Proposal: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedAvgPool: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedBiasAdd: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedConcat: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedLogistic: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedMatMul: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedMaxPool: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedRelu: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedRelu6: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedReshape: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedSoftmax: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizeMaxMin: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizeV2: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Range: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Rank: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_ReduceJoin: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_ReductionParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Relu: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Relu6: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_RequantizationRange: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Requantize: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Reshape: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Resize: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_RoiParameters: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Scale: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Selu: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Size: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Slice: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_SliceTf: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_SpaceBatch: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_SqueezeParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_StridedSliceParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_TensorConvertInfo: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_TfQuantizedConv2D: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_TopKV2: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Transpose: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_UnaryOp: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_MomentsParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_RNNParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_BatchMatMulParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_QuantizedFloatParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_DepthSpaceParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_EltwiseInt8: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_ReverseSequenceParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Extra: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Pool3D: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_Convolution3D: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_ELU: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_DetectionPostProcessParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_OneHotParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_PadParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_WhileParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_IfParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_RandomUniform: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_LayerNorm: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_TensorArray: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_LSTMBlockCell: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_GridSample: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_LoopParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_ImageProcessParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_CumSum: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_GroupNorm: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_FmhaV2Param: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_FmhcaParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_AttentionParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_StftParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_LinearAttentionParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_ShapeParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } case OpParameter_RoPEParam: { auto ptr = reinterpret_cast(obj); return ptr->UnPack(resolver); } default: return nullptr; } } 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); return CreateQuantizedAdd(_fbb, ptr, _rehasher).Union(); } case OpParameter_ArgMax: { auto ptr = reinterpret_cast(value); return CreateArgMax(_fbb, ptr, _rehasher).Union(); } case OpParameter_AsString: { auto ptr = reinterpret_cast(value); return CreateAsString(_fbb, ptr, _rehasher).Union(); } case OpParameter_Axis: { auto ptr = reinterpret_cast(value); return CreateAxis(_fbb, ptr, _rehasher).Union(); } case OpParameter_BatchNorm: { auto ptr = reinterpret_cast(value); return CreateBatchNorm(_fbb, ptr, _rehasher).Union(); } case OpParameter_BinaryOp: { auto ptr = reinterpret_cast(value); return CreateBinaryOp(_fbb, ptr, _rehasher).Union(); } case OpParameter_Blob: { auto ptr = reinterpret_cast(value); return CreateBlob(_fbb, ptr, _rehasher).Union(); } case OpParameter_CastParam: { auto ptr = reinterpret_cast(value); return CreateCastParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_Convolution2D: { auto ptr = reinterpret_cast(value); return CreateConvolution2D(_fbb, ptr, _rehasher).Union(); } case OpParameter_Crop: { auto ptr = reinterpret_cast(value); return CreateCrop(_fbb, ptr, _rehasher).Union(); } case OpParameter_CropAndResize: { auto ptr = reinterpret_cast(value); return CreateCropAndResize(_fbb, ptr, _rehasher).Union(); } case OpParameter_Dequantize: { auto ptr = reinterpret_cast(value); return CreateDequantize(_fbb, ptr, _rehasher).Union(); } case OpParameter_DetectionOutput: { auto ptr = reinterpret_cast(value); return CreateDetectionOutput(_fbb, ptr, _rehasher).Union(); } case OpParameter_Eltwise: { auto ptr = reinterpret_cast(value); return CreateEltwise(_fbb, ptr, _rehasher).Union(); } case OpParameter_ExpandDims: { auto ptr = reinterpret_cast(value); return CreateExpandDims(_fbb, ptr, _rehasher).Union(); } case OpParameter_Fill: { auto ptr = reinterpret_cast(value); return CreateFill(_fbb, ptr, _rehasher).Union(); } case OpParameter_Flatten: { auto ptr = reinterpret_cast(value); return CreateFlatten(_fbb, ptr, _rehasher).Union(); } case OpParameter_Gather: { auto ptr = reinterpret_cast(value); return CreateGather(_fbb, ptr, _rehasher).Union(); } case OpParameter_GatherV2: { auto ptr = reinterpret_cast(value); return CreateGatherV2(_fbb, ptr, _rehasher).Union(); } case OpParameter_InnerProduct: { auto ptr = reinterpret_cast(value); return CreateInnerProduct(_fbb, ptr, _rehasher).Union(); } case OpParameter_Input: { auto ptr = reinterpret_cast(value); return CreateInput(_fbb, ptr, _rehasher).Union(); } case OpParameter_Interp: { auto ptr = reinterpret_cast(value); return CreateInterp(_fbb, ptr, _rehasher).Union(); } case OpParameter_LRN: { auto ptr = reinterpret_cast(value); return CreateLRN(_fbb, ptr, _rehasher).Union(); } case OpParameter_LSTM: { auto ptr = reinterpret_cast(value); return CreateLSTM(_fbb, ptr, _rehasher).Union(); } case OpParameter_MatMul: { auto ptr = reinterpret_cast(value); return CreateMatMul(_fbb, ptr, _rehasher).Union(); } case OpParameter_NonMaxSuppressionV2: { auto ptr = reinterpret_cast(value); return CreateNonMaxSuppressionV2(_fbb, ptr, _rehasher).Union(); } case OpParameter_Normalize: { auto ptr = reinterpret_cast(value); return CreateNormalize(_fbb, ptr, _rehasher).Union(); } case OpParameter_PackParam: { auto ptr = reinterpret_cast(value); return CreatePackParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_Permute: { auto ptr = reinterpret_cast(value); return CreatePermute(_fbb, ptr, _rehasher).Union(); } case OpParameter_Plugin: { auto ptr = reinterpret_cast(value); return CreatePlugin(_fbb, ptr, _rehasher).Union(); } case OpParameter_Pool: { auto ptr = reinterpret_cast(value); return CreatePool(_fbb, ptr, _rehasher).Union(); } case OpParameter_PRelu: { auto ptr = reinterpret_cast(value); return CreatePRelu(_fbb, ptr, _rehasher).Union(); } case OpParameter_PriorBox: { auto ptr = reinterpret_cast(value); return CreatePriorBox(_fbb, ptr, _rehasher).Union(); } case OpParameter_Proposal: { auto ptr = reinterpret_cast(value); return CreateProposal(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedAvgPool: { auto ptr = reinterpret_cast(value); return CreateQuantizedAvgPool(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedBiasAdd: { auto ptr = reinterpret_cast(value); return CreateQuantizedBiasAdd(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedConcat: { auto ptr = reinterpret_cast(value); return CreateQuantizedConcat(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedLogistic: { auto ptr = reinterpret_cast(value); return CreateQuantizedLogistic(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedMatMul: { auto ptr = reinterpret_cast(value); return CreateQuantizedMatMul(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedMaxPool: { auto ptr = reinterpret_cast(value); return CreateQuantizedMaxPool(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedRelu: { auto ptr = reinterpret_cast(value); return CreateQuantizedRelu(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedRelu6: { auto ptr = reinterpret_cast(value); return CreateQuantizedRelu6(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedReshape: { auto ptr = reinterpret_cast(value); return CreateQuantizedReshape(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedSoftmax: { auto ptr = reinterpret_cast(value); return CreateQuantizedSoftmax(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizeMaxMin: { auto ptr = reinterpret_cast(value); return CreateQuantizeMaxMin(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizeV2: { auto ptr = reinterpret_cast(value); return CreateQuantizeV2(_fbb, ptr, _rehasher).Union(); } case OpParameter_Range: { auto ptr = reinterpret_cast(value); return CreateRange(_fbb, ptr, _rehasher).Union(); } case OpParameter_Rank: { auto ptr = reinterpret_cast(value); return CreateRank(_fbb, ptr, _rehasher).Union(); } case OpParameter_ReduceJoin: { auto ptr = reinterpret_cast(value); return CreateReduceJoin(_fbb, ptr, _rehasher).Union(); } case OpParameter_ReductionParam: { auto ptr = reinterpret_cast(value); return CreateReductionParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_Relu: { auto ptr = reinterpret_cast(value); return CreateRelu(_fbb, ptr, _rehasher).Union(); } case OpParameter_Relu6: { auto ptr = reinterpret_cast(value); return CreateRelu6(_fbb, ptr, _rehasher).Union(); } case OpParameter_RequantizationRange: { auto ptr = reinterpret_cast(value); return CreateRequantizationRange(_fbb, ptr, _rehasher).Union(); } case OpParameter_Requantize: { auto ptr = reinterpret_cast(value); return CreateRequantize(_fbb, ptr, _rehasher).Union(); } case OpParameter_Reshape: { auto ptr = reinterpret_cast(value); return CreateReshape(_fbb, ptr, _rehasher).Union(); } case OpParameter_Resize: { auto ptr = reinterpret_cast(value); return CreateResize(_fbb, ptr, _rehasher).Union(); } case OpParameter_RoiParameters: { auto ptr = reinterpret_cast(value); return CreateRoiParameters(_fbb, ptr, _rehasher).Union(); } case OpParameter_Scale: { auto ptr = reinterpret_cast(value); return CreateScale(_fbb, ptr, _rehasher).Union(); } case OpParameter_Selu: { auto ptr = reinterpret_cast(value); return CreateSelu(_fbb, ptr, _rehasher).Union(); } case OpParameter_Size: { auto ptr = reinterpret_cast(value); return CreateSize(_fbb, ptr, _rehasher).Union(); } case OpParameter_Slice: { auto ptr = reinterpret_cast(value); return CreateSlice(_fbb, ptr, _rehasher).Union(); } case OpParameter_SliceTf: { auto ptr = reinterpret_cast(value); return CreateSliceTf(_fbb, ptr, _rehasher).Union(); } case OpParameter_SpaceBatch: { auto ptr = reinterpret_cast(value); return CreateSpaceBatch(_fbb, ptr, _rehasher).Union(); } case OpParameter_SqueezeParam: { auto ptr = reinterpret_cast(value); return CreateSqueezeParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_StridedSliceParam: { auto ptr = reinterpret_cast(value); return CreateStridedSliceParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_TensorConvertInfo: { auto ptr = reinterpret_cast(value); return CreateTensorConvertInfo(_fbb, ptr, _rehasher).Union(); } case OpParameter_TfQuantizedConv2D: { auto ptr = reinterpret_cast(value); return CreateTfQuantizedConv2D(_fbb, ptr, _rehasher).Union(); } case OpParameter_TopKV2: { auto ptr = reinterpret_cast(value); return CreateTopKV2(_fbb, ptr, _rehasher).Union(); } case OpParameter_Transpose: { auto ptr = reinterpret_cast(value); return CreateTranspose(_fbb, ptr, _rehasher).Union(); } case OpParameter_UnaryOp: { auto ptr = reinterpret_cast(value); return CreateUnaryOp(_fbb, ptr, _rehasher).Union(); } case OpParameter_MomentsParam: { auto ptr = reinterpret_cast(value); return CreateMomentsParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_RNNParam: { auto ptr = reinterpret_cast(value); return CreateRNNParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_BatchMatMulParam: { auto ptr = reinterpret_cast(value); return CreateBatchMatMulParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_QuantizedFloatParam: { auto ptr = reinterpret_cast(value); return CreateQuantizedFloatParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_DepthSpaceParam: { auto ptr = reinterpret_cast(value); return CreateDepthSpaceParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_EltwiseInt8: { auto ptr = reinterpret_cast(value); return CreateEltwiseInt8(_fbb, ptr, _rehasher).Union(); } case OpParameter_ReverseSequenceParam: { auto ptr = reinterpret_cast(value); return CreateReverseSequenceParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_Extra: { auto ptr = reinterpret_cast(value); return CreateExtra(_fbb, ptr, _rehasher).Union(); } case OpParameter_Pool3D: { auto ptr = reinterpret_cast(value); return CreatePool3D(_fbb, ptr, _rehasher).Union(); } case OpParameter_Convolution3D: { auto ptr = reinterpret_cast(value); return CreateConvolution3D(_fbb, ptr, _rehasher).Union(); } case OpParameter_ELU: { auto ptr = reinterpret_cast(value); return CreateELU(_fbb, ptr, _rehasher).Union(); } case OpParameter_DetectionPostProcessParam: { auto ptr = reinterpret_cast(value); return CreateDetectionPostProcessParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_OneHotParam: { auto ptr = reinterpret_cast(value); return CreateOneHotParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_PadParam: { auto ptr = reinterpret_cast(value); return CreatePadParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_WhileParam: { auto ptr = reinterpret_cast(value); return CreateWhileParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_IfParam: { auto ptr = reinterpret_cast(value); return CreateIfParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_RandomUniform: { auto ptr = reinterpret_cast(value); return CreateRandomUniform(_fbb, ptr, _rehasher).Union(); } case OpParameter_LayerNorm: { auto ptr = reinterpret_cast(value); return CreateLayerNorm(_fbb, ptr, _rehasher).Union(); } case OpParameter_TensorArray: { auto ptr = reinterpret_cast(value); return CreateTensorArray(_fbb, ptr, _rehasher).Union(); } case OpParameter_LSTMBlockCell: { auto ptr = reinterpret_cast(value); return CreateLSTMBlockCell(_fbb, ptr, _rehasher).Union(); } case OpParameter_GridSample: { auto ptr = reinterpret_cast(value); return CreateGridSample(_fbb, ptr, _rehasher).Union(); } case OpParameter_LoopParam: { auto ptr = reinterpret_cast(value); return CreateLoopParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_ImageProcessParam: { auto ptr = reinterpret_cast(value); return CreateImageProcessParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_CumSum: { auto ptr = reinterpret_cast(value); return CreateCumSum(_fbb, ptr, _rehasher).Union(); } case OpParameter_GroupNorm: { auto ptr = reinterpret_cast(value); return CreateGroupNorm(_fbb, ptr, _rehasher).Union(); } case OpParameter_FmhaV2Param: { auto ptr = reinterpret_cast(value); return CreateFmhaV2Param(_fbb, ptr, _rehasher).Union(); } case OpParameter_FmhcaParam: { auto ptr = reinterpret_cast(value); return CreateFmhcaParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_AttentionParam: { auto ptr = reinterpret_cast(value); return CreateAttentionParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_StftParam: { auto ptr = reinterpret_cast(value); return CreateStftParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_LinearAttentionParam: { auto ptr = reinterpret_cast(value); return CreateLinearAttentionParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_ShapeParam: { auto ptr = reinterpret_cast(value); return CreateShapeParam(_fbb, ptr, _rehasher).Union(); } case OpParameter_RoPEParam: { auto ptr = reinterpret_cast(value); return CreateRoPEParam(_fbb, ptr, _rehasher).Union(); } default: return 0; } } inline OpParameterUnion::OpParameterUnion(const OpParameterUnion &u) FLATBUFFERS_NOEXCEPT : type(u.type), value(nullptr) { switch (type) { case OpParameter_QuantizedAdd: { FLATBUFFERS_ASSERT(false); // QuantizedAddT not copyable. break; } case OpParameter_ArgMax: { value = new ArgMaxT(*reinterpret_cast(u.value)); break; } case OpParameter_AsString: { value = new AsStringT(*reinterpret_cast(u.value)); break; } case OpParameter_Axis: { value = new AxisT(*reinterpret_cast(u.value)); break; } case OpParameter_BatchNorm: { value = new BatchNormT(*reinterpret_cast(u.value)); break; } case OpParameter_BinaryOp: { value = new BinaryOpT(*reinterpret_cast(u.value)); break; } case OpParameter_Blob: { value = new BlobT(*reinterpret_cast(u.value)); break; } case OpParameter_CastParam: { value = new CastParamT(*reinterpret_cast(u.value)); break; } case OpParameter_Convolution2D: { FLATBUFFERS_ASSERT(false); // Convolution2DT not copyable. break; } case OpParameter_Crop: { value = new CropT(*reinterpret_cast(u.value)); break; } case OpParameter_CropAndResize: { value = new CropAndResizeT(*reinterpret_cast(u.value)); break; } case OpParameter_Dequantize: { FLATBUFFERS_ASSERT(false); // DequantizeT not copyable. break; } case OpParameter_DetectionOutput: { value = new DetectionOutputT(*reinterpret_cast(u.value)); break; } case OpParameter_Eltwise: { value = new EltwiseT(*reinterpret_cast(u.value)); break; } case OpParameter_ExpandDims: { value = new ExpandDimsT(*reinterpret_cast(u.value)); break; } case OpParameter_Fill: { value = new FillT(*reinterpret_cast(u.value)); break; } case OpParameter_Flatten: { value = new FlattenT(*reinterpret_cast(u.value)); break; } case OpParameter_Gather: { value = new GatherT(*reinterpret_cast(u.value)); break; } case OpParameter_GatherV2: { value = new GatherV2T(*reinterpret_cast(u.value)); break; } case OpParameter_InnerProduct: { FLATBUFFERS_ASSERT(false); // InnerProductT not copyable. break; } case OpParameter_Input: { value = new InputT(*reinterpret_cast(u.value)); break; } case OpParameter_Interp: { value = new InterpT(*reinterpret_cast(u.value)); break; } case OpParameter_LRN: { value = new LRNT(*reinterpret_cast(u.value)); break; } case OpParameter_LSTM: { FLATBUFFERS_ASSERT(false); // LSTMT not copyable. break; } case OpParameter_MatMul: { value = new MatMulT(*reinterpret_cast(u.value)); break; } case OpParameter_NonMaxSuppressionV2: { value = new NonMaxSuppressionV2T(*reinterpret_cast(u.value)); break; } case OpParameter_Normalize: { value = new NormalizeT(*reinterpret_cast(u.value)); break; } case OpParameter_PackParam: { value = new PackParamT(*reinterpret_cast(u.value)); break; } case OpParameter_Permute: { value = new PermuteT(*reinterpret_cast(u.value)); break; } case OpParameter_Plugin: { FLATBUFFERS_ASSERT(false); // PluginT not copyable. break; } case OpParameter_Pool: { value = new PoolT(*reinterpret_cast(u.value)); break; } case OpParameter_PRelu: { value = new PReluT(*reinterpret_cast(u.value)); break; } case OpParameter_PriorBox: { value = new PriorBoxT(*reinterpret_cast(u.value)); break; } case OpParameter_Proposal: { FLATBUFFERS_ASSERT(false); // ProposalT not copyable. break; } case OpParameter_QuantizedAvgPool: { value = new QuantizedAvgPoolT(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizedBiasAdd: { value = new QuantizedBiasAddT(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizedConcat: { FLATBUFFERS_ASSERT(false); // QuantizedConcatT not copyable. break; } case OpParameter_QuantizedLogistic: { FLATBUFFERS_ASSERT(false); // QuantizedLogisticT not copyable. break; } case OpParameter_QuantizedMatMul: { value = new QuantizedMatMulT(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizedMaxPool: { value = new QuantizedMaxPoolT(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizedRelu: { value = new QuantizedReluT(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizedRelu6: { value = new QuantizedRelu6T(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizedReshape: { value = new QuantizedReshapeT(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizedSoftmax: { value = new QuantizedSoftmaxT(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizeMaxMin: { value = new QuantizeMaxMinT(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizeV2: { value = new QuantizeV2T(*reinterpret_cast(u.value)); break; } case OpParameter_Range: { value = new RangeT(*reinterpret_cast(u.value)); break; } case OpParameter_Rank: { value = new RankT(*reinterpret_cast(u.value)); break; } case OpParameter_ReduceJoin: { value = new ReduceJoinT(*reinterpret_cast(u.value)); break; } case OpParameter_ReductionParam: { value = new ReductionParamT(*reinterpret_cast(u.value)); break; } case OpParameter_Relu: { value = new ReluT(*reinterpret_cast(u.value)); break; } case OpParameter_Relu6: { value = new Relu6T(*reinterpret_cast(u.value)); break; } case OpParameter_RequantizationRange: { value = new RequantizationRangeT(*reinterpret_cast(u.value)); break; } case OpParameter_Requantize: { value = new RequantizeT(*reinterpret_cast(u.value)); break; } case OpParameter_Reshape: { value = new ReshapeT(*reinterpret_cast(u.value)); break; } case OpParameter_Resize: { value = new ResizeT(*reinterpret_cast(u.value)); break; } case OpParameter_RoiParameters: { value = new RoiParametersT(*reinterpret_cast(u.value)); break; } case OpParameter_Scale: { value = new ScaleT(*reinterpret_cast(u.value)); break; } case OpParameter_Selu: { value = new SeluT(*reinterpret_cast(u.value)); break; } case OpParameter_Size: { value = new SizeT(*reinterpret_cast(u.value)); break; } case OpParameter_Slice: { value = new SliceT(*reinterpret_cast(u.value)); break; } case OpParameter_SliceTf: { value = new SliceTfT(*reinterpret_cast(u.value)); break; } case OpParameter_SpaceBatch: { FLATBUFFERS_ASSERT(false); // SpaceBatchT not copyable. break; } case OpParameter_SqueezeParam: { value = new SqueezeParamT(*reinterpret_cast(u.value)); break; } case OpParameter_StridedSliceParam: { value = new StridedSliceParamT(*reinterpret_cast(u.value)); break; } case OpParameter_TensorConvertInfo: { value = new TensorConvertInfoT(*reinterpret_cast(u.value)); break; } case OpParameter_TfQuantizedConv2D: { FLATBUFFERS_ASSERT(false); // TfQuantizedConv2DT not copyable. break; } case OpParameter_TopKV2: { value = new TopKV2T(*reinterpret_cast(u.value)); break; } case OpParameter_Transpose: { value = new TransposeT(*reinterpret_cast(u.value)); break; } case OpParameter_UnaryOp: { value = new UnaryOpT(*reinterpret_cast(u.value)); break; } case OpParameter_MomentsParam: { value = new MomentsParamT(*reinterpret_cast(u.value)); break; } case OpParameter_RNNParam: { FLATBUFFERS_ASSERT(false); // RNNParamT not copyable. break; } case OpParameter_BatchMatMulParam: { value = new BatchMatMulParamT(*reinterpret_cast(u.value)); break; } case OpParameter_QuantizedFloatParam: { value = new QuantizedFloatParamT(*reinterpret_cast(u.value)); break; } case OpParameter_DepthSpaceParam: { value = new DepthSpaceParamT(*reinterpret_cast(u.value)); break; } case OpParameter_EltwiseInt8: { FLATBUFFERS_ASSERT(false); // EltwiseInt8T not copyable. break; } case OpParameter_ReverseSequenceParam: { value = new ReverseSequenceParamT(*reinterpret_cast(u.value)); break; } case OpParameter_Extra: { FLATBUFFERS_ASSERT(false); // ExtraT not copyable. break; } case OpParameter_Pool3D: { value = new Pool3DT(*reinterpret_cast(u.value)); break; } case OpParameter_Convolution3D: { FLATBUFFERS_ASSERT(false); // Convolution3DT not copyable. break; } case OpParameter_ELU: { value = new ELUT(*reinterpret_cast(u.value)); break; } case OpParameter_DetectionPostProcessParam: { value = new DetectionPostProcessParamT(*reinterpret_cast(u.value)); break; } case OpParameter_OneHotParam: { value = new OneHotParamT(*reinterpret_cast(u.value)); break; } case OpParameter_PadParam: { value = new PadParamT(*reinterpret_cast(u.value)); break; } case OpParameter_WhileParam: { FLATBUFFERS_ASSERT(false); // WhileParamT not copyable. break; } case OpParameter_IfParam: { FLATBUFFERS_ASSERT(false); // IfParamT not copyable. break; } case OpParameter_RandomUniform: { value = new RandomUniformT(*reinterpret_cast(u.value)); break; } case OpParameter_LayerNorm: { value = new LayerNormT(*reinterpret_cast(u.value)); break; } case OpParameter_TensorArray: { value = new TensorArrayT(*reinterpret_cast(u.value)); break; } case OpParameter_LSTMBlockCell: { value = new LSTMBlockCellT(*reinterpret_cast(u.value)); break; } case OpParameter_GridSample: { value = new GridSampleT(*reinterpret_cast(u.value)); break; } case OpParameter_LoopParam: { FLATBUFFERS_ASSERT(false); // LoopParamT not copyable. break; } case OpParameter_ImageProcessParam: { value = new ImageProcessParamT(*reinterpret_cast(u.value)); break; } case OpParameter_CumSum: { value = new CumSumT(*reinterpret_cast(u.value)); break; } case OpParameter_GroupNorm: { value = new GroupNormT(*reinterpret_cast(u.value)); break; } case OpParameter_FmhaV2Param: { value = new FmhaV2ParamT(*reinterpret_cast(u.value)); break; } case OpParameter_FmhcaParam: { value = new FmhcaParamT(*reinterpret_cast(u.value)); break; } case OpParameter_AttentionParam: { FLATBUFFERS_ASSERT(false); // AttentionParamT not copyable. break; } case OpParameter_StftParam: { value = new StftParamT(*reinterpret_cast(u.value)); break; } case OpParameter_LinearAttentionParam: { value = new LinearAttentionParamT(*reinterpret_cast(u.value)); break; } case OpParameter_ShapeParam: { value = new ShapeParamT(*reinterpret_cast(u.value)); break; } case OpParameter_RoPEParam: { FLATBUFFERS_ASSERT(false); // RoPEParamT not copyable. break; } default: break; } } inline void OpParameterUnion::Reset() { switch (type) { case OpParameter_QuantizedAdd: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_ArgMax: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_AsString: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Axis: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_BatchNorm: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_BinaryOp: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Blob: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_CastParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Convolution2D: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Crop: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_CropAndResize: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Dequantize: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_DetectionOutput: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Eltwise: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_ExpandDims: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Fill: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Flatten: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Gather: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_GatherV2: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_InnerProduct: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Input: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Interp: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_LRN: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_LSTM: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_MatMul: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_NonMaxSuppressionV2: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Normalize: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_PackParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Permute: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Plugin: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Pool: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_PRelu: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_PriorBox: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Proposal: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedAvgPool: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedBiasAdd: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedConcat: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedLogistic: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedMatMul: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedMaxPool: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedRelu: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedRelu6: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedReshape: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedSoftmax: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizeMaxMin: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizeV2: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Range: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Rank: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_ReduceJoin: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_ReductionParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Relu: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Relu6: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_RequantizationRange: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Requantize: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Reshape: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Resize: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_RoiParameters: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Scale: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Selu: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Size: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Slice: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_SliceTf: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_SpaceBatch: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_SqueezeParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_StridedSliceParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_TensorConvertInfo: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_TfQuantizedConv2D: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_TopKV2: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Transpose: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_UnaryOp: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_MomentsParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_RNNParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_BatchMatMulParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_QuantizedFloatParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_DepthSpaceParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_EltwiseInt8: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_ReverseSequenceParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Extra: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Pool3D: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_Convolution3D: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_ELU: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_DetectionPostProcessParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_OneHotParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_PadParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_WhileParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_IfParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_RandomUniform: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_LayerNorm: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_TensorArray: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_LSTMBlockCell: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_GridSample: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_LoopParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_ImageProcessParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_CumSum: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_GroupNorm: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_FmhaV2Param: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_FmhcaParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_AttentionParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_StftParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_LinearAttentionParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_ShapeParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } case OpParameter_RoPEParam: { auto ptr = reinterpret_cast(value); delete ptr; break; } default: break; } value = nullptr; type = OpParameter_NONE; } inline const flatbuffers::TypeTable *OpTypeTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 }, { flatbuffers::ET_INT, 0, 0 } }; static const flatbuffers::TypeFunction type_refs[] = { 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, 122, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 299, 300, 301, 302, 303, 304, 305, 306, 512, 513, 514, 515, 517, 518, 600, 601, 603, 604 }; static const char * const names[] = { "AbsVal", "QuantizedAdd", "ArgMax", "AsString", "InstanceNorm", "BatchToSpaceND", "Copy", "BinaryOp", "Bnll", "Cast", "Concat", "Const", "Convolution", "ConvolutionDepthwise", "Crop", "CropAndResize", "ImageProcess", "Deconvolution", "DeconvolutionDepthwise", "Dequantize", "DetectionOutput", "Dropout", "Eltwise", "ELU", "Unique", "Exp", "ExpandDims", "Fill", "Flatten", "Im2Col", "Gather", "GatherV2", "Im2Seq", "InnerProduct", "Input", "Interp", "Log", "LRN", "LSTM", "MatMul", "MoE", "NonMaxSuppression", "NonMaxSuppressionV2", "Normalize", "Pack", "Padding", "Permute", "Pooling", "Power", "PReLU", "PriorBox", "Proposal", "QuantizedAvgPool", "QuantizedBiasAdd", "QuantizedConcat", "QuantizedDepthwiseConv2D", "QuantizedLogistic", "RasterAndInterpolate", "QuantizedMaxPool", "Texture", "RasterDiff", "QuantizedReshape", "QuantizedSoftmax", "QuantizeMaxMin", "QuantizeV2", "Range", "Rank", "ReduceJoin", "Reduction", "ReLU", "ReLU6", "RequantizationRange", "Requantize", "Reshape", "Resize", "RNN", "ROIPooling", "Scale", "Selu", "Seq2Out", "Shape", "Sigmoid", "Size", "Slice", "SliceTf", "Softmax", "SpaceToBatchND", "SpatialProduct", "Col2Im", "Segment", "Squeeze", "StridedSlice", "CastLike", "StringSplit", "StringToNumber", "TanH", "TfQuantizedConv2D", "Threshold", "Tile", "TopKV2", "Transpose", "UnaryOp", "Unpack", "Where", "Moments", "RNNSequenceGRU", "BatchMatMul", "Unsqueeze", "CosineSimilarity", "DepthToSpace", "SpaceToDepth", "ReverseSequence", "Pooling3D", "Convolution3D", "MatrixBandPart", "GatherND", "DetectionPostProcess", "UnravelIndex", "ScatterNd", "OneHot", "BroadcastTo", "Dilation2D", "Interp3D", "Raster", "ConvertTensor", "ArgMin", "LinSpace", "RandomUniform", "TensorArray", "TensorArraySize", "TensorArrayRead", "TensorArrayWrite", "TensorArrayGather", "TensorArrayScatter", "TensorArraySplit", "TensorArrayConcat", "LSTMBlockCell", "Reverse", "ROIAlign", "RandomNormal", "TensorArrayInsert", "TensorArrayErase", "EyeLike", "CumSum", "Det", "CumProd", "ScatterElements", "GatherElements", "Svd", "Histogram", "DynamicQuant", "Stft", "Plugin", "Select", "ZerosLike", "Broastcast", "SetDiff1D", "ReluGrad", "Identity", "PoolGrad", "SoftmaxGrad", "Conv2DBackPropFilter", "TrainableParam", "BatchNorm", "ConvTranspose3D", "ZeroGrad", "Attention", "FmhaV2", "Fmhca", "SeqLen2Spatial", "SplitGeLU", "GroupNorm", "LinearAttention", "RoPE", "Extra", "ConvInt8", "Int8ToFloat", "DepthwiseConvInt8", "FloatToInt8", "EltwiseInt8", "While", "If", "LayerNorm", "GridSample" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_ENUM, 184, type_codes, type_refs, values, names }; return &tt; } inline const flatbuffers::TypeTable *OpParameterTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_SEQUENCE, 0, -1 }, { flatbuffers::ET_SEQUENCE, 0, 0 }, { flatbuffers::ET_SEQUENCE, 0, 1 }, { flatbuffers::ET_SEQUENCE, 0, 2 }, { flatbuffers::ET_SEQUENCE, 0, 3 }, { flatbuffers::ET_SEQUENCE, 0, 4 }, { flatbuffers::ET_SEQUENCE, 0, 5 }, { flatbuffers::ET_SEQUENCE, 0, 6 }, { flatbuffers::ET_SEQUENCE, 0, 7 }, { flatbuffers::ET_SEQUENCE, 0, 8 }, { flatbuffers::ET_SEQUENCE, 0, 9 }, { flatbuffers::ET_SEQUENCE, 0, 10 }, { flatbuffers::ET_SEQUENCE, 0, 11 }, { flatbuffers::ET_SEQUENCE, 0, 12 }, { flatbuffers::ET_SEQUENCE, 0, 13 }, { flatbuffers::ET_SEQUENCE, 0, 14 }, { flatbuffers::ET_SEQUENCE, 0, 15 }, { flatbuffers::ET_SEQUENCE, 0, 16 }, { flatbuffers::ET_SEQUENCE, 0, 17 }, { flatbuffers::ET_SEQUENCE, 0, 18 }, { flatbuffers::ET_SEQUENCE, 0, 19 }, { flatbuffers::ET_SEQUENCE, 0, 20 }, { flatbuffers::ET_SEQUENCE, 0, 21 }, { flatbuffers::ET_SEQUENCE, 0, 22 }, { flatbuffers::ET_SEQUENCE, 0, 23 }, { flatbuffers::ET_SEQUENCE, 0, 24 }, { flatbuffers::ET_SEQUENCE, 0, 25 }, { flatbuffers::ET_SEQUENCE, 0, 26 }, { flatbuffers::ET_SEQUENCE, 0, 27 }, { flatbuffers::ET_SEQUENCE, 0, 28 }, { flatbuffers::ET_SEQUENCE, 0, 29 }, { flatbuffers::ET_SEQUENCE, 0, 30 }, { flatbuffers::ET_SEQUENCE, 0, 31 }, { flatbuffers::ET_SEQUENCE, 0, 32 }, { flatbuffers::ET_SEQUENCE, 0, 33 }, { flatbuffers::ET_SEQUENCE, 0, 34 }, { flatbuffers::ET_SEQUENCE, 0, 35 }, { flatbuffers::ET_SEQUENCE, 0, 36 }, { flatbuffers::ET_SEQUENCE, 0, 37 }, { flatbuffers::ET_SEQUENCE, 0, 38 }, { flatbuffers::ET_SEQUENCE, 0, 39 }, { flatbuffers::ET_SEQUENCE, 0, 40 }, { flatbuffers::ET_SEQUENCE, 0, 41 }, { flatbuffers::ET_SEQUENCE, 0, 42 }, { flatbuffers::ET_SEQUENCE, 0, 43 }, { flatbuffers::ET_SEQUENCE, 0, 44 }, { flatbuffers::ET_SEQUENCE, 0, 45 }, { flatbuffers::ET_SEQUENCE, 0, 46 }, { flatbuffers::ET_SEQUENCE, 0, 47 }, { flatbuffers::ET_SEQUENCE, 0, 48 }, { flatbuffers::ET_SEQUENCE, 0, 49 }, { flatbuffers::ET_SEQUENCE, 0, 50 }, { flatbuffers::ET_SEQUENCE, 0, 51 }, { flatbuffers::ET_SEQUENCE, 0, 52 }, { flatbuffers::ET_SEQUENCE, 0, 53 }, { flatbuffers::ET_SEQUENCE, 0, 54 }, { flatbuffers::ET_SEQUENCE, 0, 55 }, { flatbuffers::ET_SEQUENCE, 0, 56 }, { flatbuffers::ET_SEQUENCE, 0, 57 }, { flatbuffers::ET_SEQUENCE, 0, 58 }, { flatbuffers::ET_SEQUENCE, 0, 59 }, { flatbuffers::ET_SEQUENCE, 0, 60 }, { flatbuffers::ET_SEQUENCE, 0, 61 }, { flatbuffers::ET_SEQUENCE, 0, 62 }, { flatbuffers::ET_SEQUENCE, 0, 63 }, { flatbuffers::ET_SEQUENCE, 0, 64 }, { flatbuffers::ET_SEQUENCE, 0, 65 }, { flatbuffers::ET_SEQUENCE, 0, 66 }, { flatbuffers::ET_SEQUENCE, 0, 67 }, { flatbuffers::ET_SEQUENCE, 0, 68 }, { flatbuffers::ET_SEQUENCE, 0, 69 }, { flatbuffers::ET_SEQUENCE, 0, 70 }, { flatbuffers::ET_SEQUENCE, 0, 71 }, { flatbuffers::ET_SEQUENCE, 0, 72 }, { flatbuffers::ET_SEQUENCE, 0, 73 }, { flatbuffers::ET_SEQUENCE, 0, 74 }, { flatbuffers::ET_SEQUENCE, 0, 75 }, { flatbuffers::ET_SEQUENCE, 0, 76 }, { flatbuffers::ET_SEQUENCE, 0, 77 }, { flatbuffers::ET_SEQUENCE, 0, 78 }, { flatbuffers::ET_SEQUENCE, 0, 79 }, { flatbuffers::ET_SEQUENCE, 0, 80 }, { flatbuffers::ET_SEQUENCE, 0, 81 }, { flatbuffers::ET_SEQUENCE, 0, 82 }, { flatbuffers::ET_SEQUENCE, 0, 83 }, { flatbuffers::ET_SEQUENCE, 0, 84 }, { flatbuffers::ET_SEQUENCE, 0, 85 }, { flatbuffers::ET_SEQUENCE, 0, 86 }, { flatbuffers::ET_SEQUENCE, 0, 87 }, { flatbuffers::ET_SEQUENCE, 0, 88 }, { flatbuffers::ET_SEQUENCE, 0, 89 }, { flatbuffers::ET_SEQUENCE, 0, 90 }, { flatbuffers::ET_SEQUENCE, 0, 91 }, { flatbuffers::ET_SEQUENCE, 0, 92 }, { flatbuffers::ET_SEQUENCE, 0, 93 }, { flatbuffers::ET_SEQUENCE, 0, 94 }, { flatbuffers::ET_SEQUENCE, 0, 95 }, { flatbuffers::ET_SEQUENCE, 0, 96 }, { flatbuffers::ET_SEQUENCE, 0, 97 }, { flatbuffers::ET_SEQUENCE, 0, 98 }, { flatbuffers::ET_SEQUENCE, 0, 99 }, { flatbuffers::ET_SEQUENCE, 0, 100 }, { flatbuffers::ET_SEQUENCE, 0, 101 } }; 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, RoiParametersTypeTable, 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, TensorArrayTypeTable, LSTMBlockCellTypeTable, GridSampleTypeTable, LoopParamTypeTable, ImageProcessParamTypeTable, CumSumTypeTable, GroupNormTypeTable, FmhaV2ParamTypeTable, FmhcaParamTypeTable, AttentionParamTypeTable, StftParamTypeTable, LinearAttentionParamTypeTable, ShapeParamTypeTable, RoPEParamTypeTable }; static const char * const names[] = { "NONE", "QuantizedAdd", "ArgMax", "AsString", "Axis", "BatchNorm", "BinaryOp", "Blob", "CastParam", "Convolution2D", "Crop", "CropAndResize", "Dequantize", "DetectionOutput", "Eltwise", "ExpandDims", "Fill", "Flatten", "Gather", "GatherV2", "InnerProduct", "Input", "Interp", "LRN", "LSTM", "MatMul", "NonMaxSuppressionV2", "Normalize", "PackParam", "Permute", "Plugin", "Pool", "PRelu", "PriorBox", "Proposal", "QuantizedAvgPool", "QuantizedBiasAdd", "QuantizedConcat", "QuantizedLogistic", "QuantizedMatMul", "QuantizedMaxPool", "QuantizedRelu", "QuantizedRelu6", "QuantizedReshape", "QuantizedSoftmax", "QuantizeMaxMin", "QuantizeV2", "Range", "Rank", "ReduceJoin", "ReductionParam", "Relu", "Relu6", "RequantizationRange", "Requantize", "Reshape", "Resize", "RoiParameters", "Scale", "Selu", "Size", "Slice", "SliceTf", "SpaceBatch", "SqueezeParam", "StridedSliceParam", "TensorConvertInfo", "TfQuantizedConv2D", "TopKV2", "Transpose", "UnaryOp", "MomentsParam", "RNNParam", "BatchMatMulParam", "QuantizedFloatParam", "DepthSpaceParam", "EltwiseInt8", "ReverseSequenceParam", "Extra", "Pool3D", "Convolution3D", "ELU", "DetectionPostProcessParam", "OneHotParam", "PadParam", "WhileParam", "IfParam", "RandomUniform", "LayerNorm", "TensorArray", "LSTMBlockCell", "GridSample", "LoopParam", "ImageProcessParam", "CumSum", "GroupNorm", "FmhaV2Param", "FmhcaParam", "AttentionParam", "StftParam", "LinearAttentionParam", "ShapeParam", "RoPEParam" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_UNION, 103, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *ForwardTypeTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_CHAR, 0, 0 }, { flatbuffers::ET_CHAR, 0, 0 }, { flatbuffers::ET_CHAR, 0, 0 }, { flatbuffers::ET_CHAR, 0, 0 }, { flatbuffers::ET_CHAR, 0, 0 }, { flatbuffers::ET_CHAR, 0, 0 }, { flatbuffers::ET_CHAR, 0, 0 }, { flatbuffers::ET_CHAR, 0, 0 } }; static const flatbuffers::TypeFunction type_refs[] = { ForwardTypeTypeTable }; static const char * const names[] = { "CPU", "METAL", "CUDA", "OPENCL", "AUTO", "NNAPI", "OPENGLES", "VULKAN" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_ENUM, 8, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *UsageTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_CHAR, 0, 0 }, { flatbuffers::ET_CHAR, 0, 0 }, { flatbuffers::ET_CHAR, 0, 0 } }; static const flatbuffers::TypeFunction type_refs[] = { UsageTypeTable }; static const char * const names[] = { "INFERENCE", "TRAIN", "INFERENCE_STATIC" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_ENUM, 3, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *PluginTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_SEQUENCE, 1, 0 } }; static const flatbuffers::TypeFunction type_refs[] = { AttributeTypeTable }; static const char * const names[] = { "type", "attr" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 2, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *ExtraTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_CHAR, 1, -1 }, { flatbuffers::ET_SEQUENCE, 1, 0 }, { flatbuffers::ET_BOOL, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { AttributeTypeTable }; static const char * const names[] = { "type", "engine", "info", "attr", "vector" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *StringVecTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_STRING, 1, -1 } }; static const char * const names[] = { "data" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *AttentionParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_BOOL, 0, -1 }, { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_SEQUENCE, 1, 0 }, { flatbuffers::ET_BOOL, 0, -1 }, { flatbuffers::ET_FLOAT, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { TensorQuantInfoTypeTable }; static const char * const names[] = { "kv_cache", "kv_shared_layer", "layer_index", "kv_shared_layer_index", "mhq_quant", "output_c4", "attnScale" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *LinearAttentionParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_BOOL, 0, -1 } }; static const char * const names[] = { "attn_type", "num_k_heads", "num_v_heads", "head_k_dim", "head_v_dim", "use_qk_l2norm" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 6, type_codes, nullptr, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *RoPEParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_SEQUENCE, 0, 0 }, { flatbuffers::ET_SEQUENCE, 0, 0 } }; static const flatbuffers::TypeFunction type_refs[] = { LayerNormTypeTable }; static const char * const names[] = { "rope_cut_head_dim", "num_head", "kv_num_head", "head_dim", "q_norm", "k_norm" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *FmhaV2ParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, -1 } }; static const char * const names[] = { "heads" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *FmhcaParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, -1 } }; static const char * const names[] = { "heads" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 1, type_codes, nullptr, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *StftParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_BOOL, 0, -1 } }; static const char * const names[] = { "n_fft", "hop_length", "abs" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 3, type_codes, nullptr, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *ShapeParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_BOOL, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_BOOL, 0, -1 }, { flatbuffers::ET_INT, 0, -1 } }; static const char * const names[] = { "hasStart", "start", "hasEnd", "end" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 4, type_codes, nullptr, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *WhileParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_SEQUENCE, 1, 0 }, { flatbuffers::ET_STRING, 1, -1 }, { flatbuffers::ET_SEQUENCE, 1, 0 } }; static const flatbuffers::TypeFunction type_refs[] = { StringVecTypeTable }; static const char * const names[] = { "cond_graph", "body_graph", "aliases_inputs", "aliases_outputs", "aliases_updates" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *IfParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_SEQUENCE, 1, 0 }, { flatbuffers::ET_SEQUENCE, 1, 0 } }; static const flatbuffers::TypeFunction type_refs[] = { StringVecTypeTable }; static const char * const names[] = { "then_graph", "else_graph", "aliases_inputs", "aliases_outputs" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *RegionCommandTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_SEQUENCE, 0, 0 }, { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_SEQUENCE, 1, 1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 1, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { OpTypeTable, ViewTypeTable }; static const char * const names[] = { "op", "steps", "size", "indexes", "view", "fuse", "iterIndexes" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *LoopParamTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_SEQUENCE, 1, 0 }, { flatbuffers::ET_BOOL, 0, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_SEQUENCE, 1, 1 }, { flatbuffers::ET_SEQUENCE, 1, 1 } }; static const flatbuffers::TypeFunction type_refs[] = { TensorDescribeTypeTable, RegionCommandTypeTable }; static const char * const names[] = { "tensorNumber", "outputIndexes", "inputIndexes", "extraTensorInfos", "parallel", "loopNumber", "commands", "initCommand" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 8, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *OpTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_UTYPE, 0, 0 }, { flatbuffers::ET_SEQUENCE, 0, 0 }, { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_INT, 0, 1 }, { flatbuffers::ET_CHAR, 0, 2 }, { flatbuffers::ET_STRING, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { OpParameterTypeTable, OpTypeTypeTable, MNN_DATA_FORMATTypeTable }; static const char * const names[] = { "inputIndexes", "main_type", "main", "name", "outputIndexes", "type", "defaultDimentionFormat", "externalPath" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 8, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *ViewTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_INT, 1, -1 } }; static const char * const names[] = { "offset", "stride" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 2, type_codes, nullptr, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *RegionTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_SEQUENCE, 0, 0 }, { flatbuffers::ET_SEQUENCE, 0, 0 }, { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_INT, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { ViewTypeTable }; static const char * const names[] = { "src", "dst", "size", "origin" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 4, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *TensorDescribeTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_SEQUENCE, 0, 0 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_SEQUENCE, 1, 1 }, { flatbuffers::ET_SEQUENCE, 0, 2 } }; static const flatbuffers::TypeFunction type_refs[] = { BlobTypeTable, RegionTypeTable, TensorQuantInfoTypeTable }; static const char * const names[] = { "blob", "index", "name", "regions", "quantInfo" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *SubGraphProtoTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_INT, 1, -1 }, { flatbuffers::ET_STRING, 1, -1 }, { flatbuffers::ET_SEQUENCE, 1, 0 }, { flatbuffers::ET_SEQUENCE, 1, 1 } }; static const flatbuffers::TypeFunction type_refs[] = { OpTypeTable, TensorDescribeTypeTable }; static const char * const names[] = { "name", "inputs", "outputs", "tensors", "nodes", "extraTensorDescribe" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 6, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *TensorQuantInfoTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_FLOAT, 0, -1 }, { flatbuffers::ET_FLOAT, 0, -1 }, { flatbuffers::ET_FLOAT, 0, -1 }, { flatbuffers::ET_FLOAT, 0, -1 }, { flatbuffers::ET_INT, 0, 0 } }; static const flatbuffers::TypeFunction type_refs[] = { DataTypeTypeTable }; static const char * const names[] = { "scale", "zero", "min", "max", "type" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, names }; return &tt; } inline const flatbuffers::TypeTable *NetTypeTable() { static const flatbuffers::TypeCode type_codes[] = { { flatbuffers::ET_STRING, 0, -1 }, { flatbuffers::ET_SEQUENCE, 1, 0 }, { flatbuffers::ET_SEQUENCE, 0, 1 }, { flatbuffers::ET_SEQUENCE, 1, 2 }, { flatbuffers::ET_STRING, 1, -1 }, { flatbuffers::ET_CHAR, 0, 3 }, { flatbuffers::ET_CHAR, 0, 4 }, { flatbuffers::ET_STRING, 1, -1 }, { flatbuffers::ET_INT, 0, -1 }, { flatbuffers::ET_CHAR, 0, 5 }, { flatbuffers::ET_SEQUENCE, 1, 6 }, { flatbuffers::ET_STRING, 0, -1 } }; static const flatbuffers::TypeFunction type_refs[] = { TensorDescribeTypeTable, ExtraInfoTypeTable, OpTypeTable, ForwardTypeTypeTable, NetSourceTypeTable, UsageTypeTable, SubGraphProtoTypeTable }; static const char * const names[] = { "bizCode", "extraTensorDescribe", "extraInfo", "oplists", "outputName", "preferForwardType", "sourceType", "tensorName", "tensorNumber", "usage", "subgraphs", "mnn_uuid" }; static const flatbuffers::TypeTable tt = { flatbuffers::ST_TABLE, 12, type_codes, type_refs, nullptr, names }; return &tt; } inline const MNN::Net *GetNet(const void *buf) { return flatbuffers::GetRoot(buf); } inline const MNN::Net *GetSizePrefixedNet(const void *buf) { return flatbuffers::GetSizePrefixedRoot(buf); } inline bool VerifyNetBuffer( flatbuffers::Verifier &verifier) { return verifier.VerifyBuffer(nullptr); } inline bool VerifySizePrefixedNetBuffer( flatbuffers::Verifier &verifier) { return verifier.VerifySizePrefixedBuffer(nullptr); } inline void FinishNetBuffer( flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset root) { fbb.Finish(root); } inline void FinishSizePrefixedNetBuffer( flatbuffers::FlatBufferBuilder &fbb, flatbuffers::Offset root) { fbb.FinishSizePrefixed(root); } inline std::unique_ptr UnPackNet( const void *buf, const flatbuffers::resolver_function_t *res = nullptr) { return std::unique_ptr(GetNet(buf)->UnPack(res)); } } // namespace MNN #endif // FLATBUFFERS_GENERATED_MNN_MNN_H_