1 // automatically generated by the FlatBuffers compiler, do not modify
2
3
4 #ifndef FLATBUFFERS_GENERATED_ARMNNSCHEMA_ARMNNSERIALIZER_H_
5 #define FLATBUFFERS_GENERATED_ARMNNSCHEMA_ARMNNSERIALIZER_H_
6
7 #include "flatbuffers/flatbuffers.h"
8
9 // Ensure the included flatbuffers.h is the same version as when this file was
10 // generated, otherwise it may not be compatible.
11 static_assert(FLATBUFFERS_VERSION_MAJOR == 2 &&
12 FLATBUFFERS_VERSION_MINOR == 0 &&
13 FLATBUFFERS_VERSION_REVISION == 7,
14 "Non-compatible flatbuffers version included");
15
16 namespace armnnSerializer {
17
18 struct TensorInfo;
19 struct TensorInfoBuilder;
20
21 struct Connection;
22
23 struct ByteData;
24 struct ByteDataBuilder;
25
26 struct ShortData;
27 struct ShortDataBuilder;
28
29 struct IntData;
30 struct IntDataBuilder;
31
32 struct LongData;
33 struct LongDataBuilder;
34
35 struct ConstTensor;
36 struct ConstTensorBuilder;
37
38 struct InputSlot;
39 struct InputSlotBuilder;
40
41 struct OutputSlot;
42 struct OutputSlotBuilder;
43
44 struct LayerBase;
45 struct LayerBaseBuilder;
46
47 struct BindableLayerBase;
48 struct BindableLayerBaseBuilder;
49
50 struct AbsLayer;
51 struct AbsLayerBuilder;
52
53 struct ActivationLayer;
54 struct ActivationLayerBuilder;
55
56 struct ActivationDescriptor;
57 struct ActivationDescriptorBuilder;
58
59 struct AdditionLayer;
60 struct AdditionLayerBuilder;
61
62 struct ArgMinMaxLayer;
63 struct ArgMinMaxLayerBuilder;
64
65 struct ArgMinMaxDescriptor;
66 struct ArgMinMaxDescriptorBuilder;
67
68 struct CastLayer;
69 struct CastLayerBuilder;
70
71 struct ChannelShuffleLayer;
72 struct ChannelShuffleLayerBuilder;
73
74 struct ChannelShuffleDescriptor;
75 struct ChannelShuffleDescriptorBuilder;
76
77 struct ComparisonDescriptor;
78 struct ComparisonDescriptorBuilder;
79
80 struct ComparisonLayer;
81 struct ComparisonLayerBuilder;
82
83 struct ConstantLayer;
84 struct ConstantLayerBuilder;
85
86 struct Convolution2dLayer;
87 struct Convolution2dLayerBuilder;
88
89 struct Convolution2dDescriptor;
90 struct Convolution2dDescriptorBuilder;
91
92 struct Convolution3dLayer;
93 struct Convolution3dLayerBuilder;
94
95 struct Convolution3dDescriptor;
96 struct Convolution3dDescriptorBuilder;
97
98 struct DepthToSpaceLayer;
99 struct DepthToSpaceLayerBuilder;
100
101 struct DepthToSpaceDescriptor;
102 struct DepthToSpaceDescriptorBuilder;
103
104 struct DivisionLayer;
105 struct DivisionLayerBuilder;
106
107 struct ElementwiseBinaryDescriptor;
108 struct ElementwiseBinaryDescriptorBuilder;
109
110 struct ElementwiseBinaryLayer;
111 struct ElementwiseBinaryLayerBuilder;
112
113 struct ElementwiseUnaryDescriptor;
114 struct ElementwiseUnaryDescriptorBuilder;
115
116 struct ElementwiseUnaryLayer;
117 struct ElementwiseUnaryLayerBuilder;
118
119 struct EqualLayer;
120 struct EqualLayerBuilder;
121
122 struct FillLayer;
123 struct FillLayerBuilder;
124
125 struct FillDescriptor;
126 struct FillDescriptorBuilder;
127
128 struct FloorLayer;
129 struct FloorLayerBuilder;
130
131 struct FullyConnectedLayer;
132 struct FullyConnectedLayerBuilder;
133
134 struct FullyConnectedDescriptor;
135 struct FullyConnectedDescriptorBuilder;
136
137 struct GatherLayer;
138 struct GatherLayerBuilder;
139
140 struct GatherDescriptor;
141 struct GatherDescriptorBuilder;
142
143 struct GatherNdLayer;
144 struct GatherNdLayerBuilder;
145
146 struct GreaterLayer;
147 struct GreaterLayerBuilder;
148
149 struct InputLayer;
150 struct InputLayerBuilder;
151
152 struct InstanceNormalizationLayer;
153 struct InstanceNormalizationLayerBuilder;
154
155 struct InstanceNormalizationDescriptor;
156 struct InstanceNormalizationDescriptorBuilder;
157
158 struct LogSoftmaxLayer;
159 struct LogSoftmaxLayerBuilder;
160
161 struct LogSoftmaxDescriptor;
162 struct LogSoftmaxDescriptorBuilder;
163
164 struct L2NormalizationLayer;
165 struct L2NormalizationLayerBuilder;
166
167 struct L2NormalizationDescriptor;
168 struct L2NormalizationDescriptorBuilder;
169
170 struct LogicalBinaryDescriptor;
171 struct LogicalBinaryDescriptorBuilder;
172
173 struct LogicalBinaryLayer;
174 struct LogicalBinaryLayerBuilder;
175
176 struct MinimumLayer;
177 struct MinimumLayerBuilder;
178
179 struct MaximumLayer;
180 struct MaximumLayerBuilder;
181
182 struct MultiplicationLayer;
183 struct MultiplicationLayerBuilder;
184
185 struct Pooling2dLayer;
186 struct Pooling2dLayerBuilder;
187
188 struct Pooling3dLayer;
189 struct Pooling3dLayerBuilder;
190
191 struct Pooling2dDescriptor;
192 struct Pooling2dDescriptorBuilder;
193
194 struct Pooling3dDescriptor;
195 struct Pooling3dDescriptorBuilder;
196
197 struct QuantizeLayer;
198 struct QuantizeLayerBuilder;
199
200 struct SoftmaxLayer;
201 struct SoftmaxLayerBuilder;
202
203 struct SoftmaxDescriptor;
204 struct SoftmaxDescriptorBuilder;
205
206 struct DepthwiseConvolution2dLayer;
207 struct DepthwiseConvolution2dLayerBuilder;
208
209 struct DepthwiseConvolution2dDescriptor;
210 struct DepthwiseConvolution2dDescriptorBuilder;
211
212 struct OutputLayer;
213 struct OutputLayerBuilder;
214
215 struct ReshapeLayer;
216 struct ReshapeLayerBuilder;
217
218 struct ReshapeDescriptor;
219 struct ReshapeDescriptorBuilder;
220
221 struct PermuteLayer;
222 struct PermuteLayerBuilder;
223
224 struct PermuteDescriptor;
225 struct PermuteDescriptorBuilder;
226
227 struct ShapeLayer;
228 struct ShapeLayerBuilder;
229
230 struct SpaceToBatchNdLayer;
231 struct SpaceToBatchNdLayerBuilder;
232
233 struct SpaceToBatchNdDescriptor;
234 struct SpaceToBatchNdDescriptorBuilder;
235
236 struct SpaceToDepthLayer;
237 struct SpaceToDepthLayerBuilder;
238
239 struct SpaceToDepthDescriptor;
240 struct SpaceToDepthDescriptorBuilder;
241
242 struct SubtractionLayer;
243 struct SubtractionLayerBuilder;
244
245 struct BatchToSpaceNdLayer;
246 struct BatchToSpaceNdLayerBuilder;
247
248 struct BatchToSpaceNdDescriptor;
249 struct BatchToSpaceNdDescriptorBuilder;
250
251 struct NormalizationLayer;
252 struct NormalizationLayerBuilder;
253
254 struct NormalizationDescriptor;
255 struct NormalizationDescriptorBuilder;
256
257 struct MeanLayer;
258 struct MeanLayerBuilder;
259
260 struct MeanDescriptor;
261 struct MeanDescriptorBuilder;
262
263 struct PadLayer;
264 struct PadLayerBuilder;
265
266 struct PadDescriptor;
267 struct PadDescriptorBuilder;
268
269 struct RsqrtLayer;
270 struct RsqrtLayerBuilder;
271
272 struct BatchNormalizationLayer;
273 struct BatchNormalizationLayerBuilder;
274
275 struct BatchNormalizationDescriptor;
276 struct BatchNormalizationDescriptorBuilder;
277
278 struct ResizeBilinearLayer;
279 struct ResizeBilinearLayerBuilder;
280
281 struct ResizeBilinearDescriptor;
282 struct ResizeBilinearDescriptorBuilder;
283
284 struct SliceLayer;
285 struct SliceLayerBuilder;
286
287 struct SliceDescriptor;
288 struct SliceDescriptorBuilder;
289
290 struct StridedSliceLayer;
291 struct StridedSliceLayerBuilder;
292
293 struct StridedSliceDescriptor;
294 struct StridedSliceDescriptorBuilder;
295
296 struct ConcatLayer;
297 struct ConcatLayerBuilder;
298
299 struct MergerLayer;
300 struct MergerLayerBuilder;
301
302 struct UintVector;
303 struct UintVectorBuilder;
304
305 struct OriginsDescriptor;
306 struct OriginsDescriptorBuilder;
307
308 struct ViewsDescriptor;
309 struct ViewsDescriptorBuilder;
310
311 struct SplitterLayer;
312 struct SplitterLayerBuilder;
313
314 struct DetectionPostProcessLayer;
315 struct DetectionPostProcessLayerBuilder;
316
317 struct DetectionPostProcessDescriptor;
318 struct DetectionPostProcessDescriptorBuilder;
319
320 struct LstmInputParams;
321 struct LstmInputParamsBuilder;
322
323 struct LstmDescriptor;
324 struct LstmDescriptorBuilder;
325
326 struct LstmLayer;
327 struct LstmLayerBuilder;
328
329 struct QLstmInputParams;
330 struct QLstmInputParamsBuilder;
331
332 struct QLstmDescriptor;
333 struct QLstmDescriptorBuilder;
334
335 struct QLstmLayer;
336 struct QLstmLayerBuilder;
337
338 struct QuantizedLstmInputParams;
339 struct QuantizedLstmInputParamsBuilder;
340
341 struct QuantizedLstmLayer;
342 struct QuantizedLstmLayerBuilder;
343
344 struct DequantizeLayer;
345 struct DequantizeLayerBuilder;
346
347 struct MergeLayer;
348 struct MergeLayerBuilder;
349
350 struct SwitchLayer;
351 struct SwitchLayerBuilder;
352
353 struct PreluLayer;
354 struct PreluLayerBuilder;
355
356 struct TransposeConvolution2dLayer;
357 struct TransposeConvolution2dLayerBuilder;
358
359 struct TransposeConvolution2dDescriptor;
360 struct TransposeConvolution2dDescriptorBuilder;
361
362 struct TransposeLayer;
363 struct TransposeLayerBuilder;
364
365 struct TransposeDescriptor;
366 struct TransposeDescriptorBuilder;
367
368 struct ResizeLayer;
369 struct ResizeLayerBuilder;
370
371 struct ResizeDescriptor;
372 struct ResizeDescriptorBuilder;
373
374 struct StackLayer;
375 struct StackLayerBuilder;
376
377 struct StackDescriptor;
378 struct StackDescriptorBuilder;
379
380 struct StandInDescriptor;
381 struct StandInDescriptorBuilder;
382
383 struct StandInLayer;
384 struct StandInLayerBuilder;
385
386 struct RankLayer;
387 struct RankLayerBuilder;
388
389 struct ReduceLayer;
390 struct ReduceLayerBuilder;
391
392 struct ReduceDescriptor;
393 struct ReduceDescriptorBuilder;
394
395 struct UnidirectionalSequenceLstmDescriptor;
396 struct UnidirectionalSequenceLstmDescriptorBuilder;
397
398 struct UnidirectionalSequenceLstmLayer;
399 struct UnidirectionalSequenceLstmLayerBuilder;
400
401 struct BatchMatMulDescriptor;
402 struct BatchMatMulDescriptorBuilder;
403
404 struct BatchMatMulLayer;
405 struct BatchMatMulLayerBuilder;
406
407 struct AnyLayer;
408 struct AnyLayerBuilder;
409
410 struct FeatureCompatibilityVersions;
411 struct FeatureCompatibilityVersionsBuilder;
412
413 struct SerializedGraph;
414 struct SerializedGraphBuilder;
415
416 enum ActivationFunction : int8_t {
417 ActivationFunction_Sigmoid = 0,
418 ActivationFunction_TanH = 1,
419 ActivationFunction_Linear = 2,
420 ActivationFunction_ReLu = 3,
421 ActivationFunction_BoundedReLu = 4,
422 ActivationFunction_SoftReLu = 5,
423 ActivationFunction_LeakyReLu = 6,
424 ActivationFunction_Abs = 7,
425 ActivationFunction_Sqrt = 8,
426 ActivationFunction_Square = 9,
427 ActivationFunction_Elu = 10,
428 ActivationFunction_HardSwish = 11,
429 ActivationFunction_MIN = ActivationFunction_Sigmoid,
430 ActivationFunction_MAX = ActivationFunction_HardSwish
431 };
432
EnumValuesActivationFunction()433 inline const ActivationFunction (&EnumValuesActivationFunction())[12] {
434 static const ActivationFunction values[] = {
435 ActivationFunction_Sigmoid,
436 ActivationFunction_TanH,
437 ActivationFunction_Linear,
438 ActivationFunction_ReLu,
439 ActivationFunction_BoundedReLu,
440 ActivationFunction_SoftReLu,
441 ActivationFunction_LeakyReLu,
442 ActivationFunction_Abs,
443 ActivationFunction_Sqrt,
444 ActivationFunction_Square,
445 ActivationFunction_Elu,
446 ActivationFunction_HardSwish
447 };
448 return values;
449 }
450
EnumNamesActivationFunction()451 inline const char * const *EnumNamesActivationFunction() {
452 static const char * const names[13] = {
453 "Sigmoid",
454 "TanH",
455 "Linear",
456 "ReLu",
457 "BoundedReLu",
458 "SoftReLu",
459 "LeakyReLu",
460 "Abs",
461 "Sqrt",
462 "Square",
463 "Elu",
464 "HardSwish",
465 nullptr
466 };
467 return names;
468 }
469
EnumNameActivationFunction(ActivationFunction e)470 inline const char *EnumNameActivationFunction(ActivationFunction e) {
471 if (flatbuffers::IsOutRange(e, ActivationFunction_Sigmoid, ActivationFunction_HardSwish)) return "";
472 const size_t index = static_cast<size_t>(e);
473 return EnumNamesActivationFunction()[index];
474 }
475
476 enum ArgMinMaxFunction : int8_t {
477 ArgMinMaxFunction_Min = 0,
478 ArgMinMaxFunction_Max = 1,
479 ArgMinMaxFunction_MIN = ArgMinMaxFunction_Min,
480 ArgMinMaxFunction_MAX = ArgMinMaxFunction_Max
481 };
482
EnumValuesArgMinMaxFunction()483 inline const ArgMinMaxFunction (&EnumValuesArgMinMaxFunction())[2] {
484 static const ArgMinMaxFunction values[] = {
485 ArgMinMaxFunction_Min,
486 ArgMinMaxFunction_Max
487 };
488 return values;
489 }
490
EnumNamesArgMinMaxFunction()491 inline const char * const *EnumNamesArgMinMaxFunction() {
492 static const char * const names[3] = {
493 "Min",
494 "Max",
495 nullptr
496 };
497 return names;
498 }
499
EnumNameArgMinMaxFunction(ArgMinMaxFunction e)500 inline const char *EnumNameArgMinMaxFunction(ArgMinMaxFunction e) {
501 if (flatbuffers::IsOutRange(e, ArgMinMaxFunction_Min, ArgMinMaxFunction_Max)) return "";
502 const size_t index = static_cast<size_t>(e);
503 return EnumNamesArgMinMaxFunction()[index];
504 }
505
506 enum DataType : int8_t {
507 DataType_Float16 = 0,
508 DataType_Float32 = 1,
509 DataType_QuantisedAsymm8 = 2,
510 DataType_Signed32 = 3,
511 DataType_Boolean = 4,
512 DataType_QuantisedSymm16 = 5,
513 DataType_QAsymmU8 = 6,
514 DataType_QSymmS16 = 7,
515 DataType_QAsymmS8 = 8,
516 DataType_QSymmS8 = 9,
517 DataType_Signed64 = 10,
518 DataType_MIN = DataType_Float16,
519 DataType_MAX = DataType_Signed64
520 };
521
EnumValuesDataType()522 inline const DataType (&EnumValuesDataType())[11] {
523 static const DataType values[] = {
524 DataType_Float16,
525 DataType_Float32,
526 DataType_QuantisedAsymm8,
527 DataType_Signed32,
528 DataType_Boolean,
529 DataType_QuantisedSymm16,
530 DataType_QAsymmU8,
531 DataType_QSymmS16,
532 DataType_QAsymmS8,
533 DataType_QSymmS8,
534 DataType_Signed64
535 };
536 return values;
537 }
538
EnumNamesDataType()539 inline const char * const *EnumNamesDataType() {
540 static const char * const names[12] = {
541 "Float16",
542 "Float32",
543 "QuantisedAsymm8",
544 "Signed32",
545 "Boolean",
546 "QuantisedSymm16",
547 "QAsymmU8",
548 "QSymmS16",
549 "QAsymmS8",
550 "QSymmS8",
551 "Signed64",
552 nullptr
553 };
554 return names;
555 }
556
EnumNameDataType(DataType e)557 inline const char *EnumNameDataType(DataType e) {
558 if (flatbuffers::IsOutRange(e, DataType_Float16, DataType_Signed64)) return "";
559 const size_t index = static_cast<size_t>(e);
560 return EnumNamesDataType()[index];
561 }
562
563 enum DataLayout : int8_t {
564 DataLayout_NHWC = 0,
565 DataLayout_NCHW = 1,
566 DataLayout_NDHWC = 2,
567 DataLayout_NCDHW = 3,
568 DataLayout_MIN = DataLayout_NHWC,
569 DataLayout_MAX = DataLayout_NCDHW
570 };
571
EnumValuesDataLayout()572 inline const DataLayout (&EnumValuesDataLayout())[4] {
573 static const DataLayout values[] = {
574 DataLayout_NHWC,
575 DataLayout_NCHW,
576 DataLayout_NDHWC,
577 DataLayout_NCDHW
578 };
579 return values;
580 }
581
EnumNamesDataLayout()582 inline const char * const *EnumNamesDataLayout() {
583 static const char * const names[5] = {
584 "NHWC",
585 "NCHW",
586 "NDHWC",
587 "NCDHW",
588 nullptr
589 };
590 return names;
591 }
592
EnumNameDataLayout(DataLayout e)593 inline const char *EnumNameDataLayout(DataLayout e) {
594 if (flatbuffers::IsOutRange(e, DataLayout_NHWC, DataLayout_NCDHW)) return "";
595 const size_t index = static_cast<size_t>(e);
596 return EnumNamesDataLayout()[index];
597 }
598
599 enum ReduceOperation : int8_t {
600 ReduceOperation_Sum = 0,
601 ReduceOperation_Max = 1,
602 ReduceOperation_Mean = 2,
603 ReduceOperation_Min = 3,
604 ReduceOperation_Prod = 4,
605 ReduceOperation_MIN = ReduceOperation_Sum,
606 ReduceOperation_MAX = ReduceOperation_Prod
607 };
608
EnumValuesReduceOperation()609 inline const ReduceOperation (&EnumValuesReduceOperation())[5] {
610 static const ReduceOperation values[] = {
611 ReduceOperation_Sum,
612 ReduceOperation_Max,
613 ReduceOperation_Mean,
614 ReduceOperation_Min,
615 ReduceOperation_Prod
616 };
617 return values;
618 }
619
EnumNamesReduceOperation()620 inline const char * const *EnumNamesReduceOperation() {
621 static const char * const names[6] = {
622 "Sum",
623 "Max",
624 "Mean",
625 "Min",
626 "Prod",
627 nullptr
628 };
629 return names;
630 }
631
EnumNameReduceOperation(ReduceOperation e)632 inline const char *EnumNameReduceOperation(ReduceOperation e) {
633 if (flatbuffers::IsOutRange(e, ReduceOperation_Sum, ReduceOperation_Prod)) return "";
634 const size_t index = static_cast<size_t>(e);
635 return EnumNamesReduceOperation()[index];
636 }
637
638 enum ResizeMethod : int8_t {
639 ResizeMethod_NearestNeighbor = 0,
640 ResizeMethod_Bilinear = 1,
641 ResizeMethod_MIN = ResizeMethod_NearestNeighbor,
642 ResizeMethod_MAX = ResizeMethod_Bilinear
643 };
644
EnumValuesResizeMethod()645 inline const ResizeMethod (&EnumValuesResizeMethod())[2] {
646 static const ResizeMethod values[] = {
647 ResizeMethod_NearestNeighbor,
648 ResizeMethod_Bilinear
649 };
650 return values;
651 }
652
EnumNamesResizeMethod()653 inline const char * const *EnumNamesResizeMethod() {
654 static const char * const names[3] = {
655 "NearestNeighbor",
656 "Bilinear",
657 nullptr
658 };
659 return names;
660 }
661
EnumNameResizeMethod(ResizeMethod e)662 inline const char *EnumNameResizeMethod(ResizeMethod e) {
663 if (flatbuffers::IsOutRange(e, ResizeMethod_NearestNeighbor, ResizeMethod_Bilinear)) return "";
664 const size_t index = static_cast<size_t>(e);
665 return EnumNamesResizeMethod()[index];
666 }
667
668 enum ConstTensorData : uint8_t {
669 ConstTensorData_NONE = 0,
670 ConstTensorData_ByteData = 1,
671 ConstTensorData_ShortData = 2,
672 ConstTensorData_IntData = 3,
673 ConstTensorData_LongData = 4,
674 ConstTensorData_MIN = ConstTensorData_NONE,
675 ConstTensorData_MAX = ConstTensorData_LongData
676 };
677
EnumValuesConstTensorData()678 inline const ConstTensorData (&EnumValuesConstTensorData())[5] {
679 static const ConstTensorData values[] = {
680 ConstTensorData_NONE,
681 ConstTensorData_ByteData,
682 ConstTensorData_ShortData,
683 ConstTensorData_IntData,
684 ConstTensorData_LongData
685 };
686 return values;
687 }
688
EnumNamesConstTensorData()689 inline const char * const *EnumNamesConstTensorData() {
690 static const char * const names[6] = {
691 "NONE",
692 "ByteData",
693 "ShortData",
694 "IntData",
695 "LongData",
696 nullptr
697 };
698 return names;
699 }
700
EnumNameConstTensorData(ConstTensorData e)701 inline const char *EnumNameConstTensorData(ConstTensorData e) {
702 if (flatbuffers::IsOutRange(e, ConstTensorData_NONE, ConstTensorData_LongData)) return "";
703 const size_t index = static_cast<size_t>(e);
704 return EnumNamesConstTensorData()[index];
705 }
706
707 template<typename T> struct ConstTensorDataTraits {
708 static const ConstTensorData enum_value = ConstTensorData_NONE;
709 };
710
711 template<> struct ConstTensorDataTraits<armnnSerializer::ByteData> {
712 static const ConstTensorData enum_value = ConstTensorData_ByteData;
713 };
714
715 template<> struct ConstTensorDataTraits<armnnSerializer::ShortData> {
716 static const ConstTensorData enum_value = ConstTensorData_ShortData;
717 };
718
719 template<> struct ConstTensorDataTraits<armnnSerializer::IntData> {
720 static const ConstTensorData enum_value = ConstTensorData_IntData;
721 };
722
723 template<> struct ConstTensorDataTraits<armnnSerializer::LongData> {
724 static const ConstTensorData enum_value = ConstTensorData_LongData;
725 };
726
727 bool VerifyConstTensorData(flatbuffers::Verifier &verifier, const void *obj, ConstTensorData type);
728 bool VerifyConstTensorDataVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
729
730 enum LayerType : uint32_t {
731 LayerType_Addition = 0,
732 LayerType_Input = 1,
733 LayerType_Multiplication = 2,
734 LayerType_Output = 3,
735 LayerType_Pooling2d = 4,
736 LayerType_Reshape = 5,
737 LayerType_Softmax = 6,
738 LayerType_Convolution2d = 7,
739 LayerType_DepthwiseConvolution2d = 8,
740 LayerType_Activation = 9,
741 LayerType_Permute = 10,
742 LayerType_FullyConnected = 11,
743 LayerType_Constant = 12,
744 LayerType_SpaceToBatchNd = 13,
745 LayerType_BatchToSpaceNd = 14,
746 LayerType_Division = 15,
747 LayerType_Minimum = 16,
748 LayerType_Equal = 17,
749 LayerType_Maximum = 18,
750 LayerType_Normalization = 19,
751 LayerType_Pad = 20,
752 LayerType_Rsqrt = 21,
753 LayerType_Floor = 22,
754 LayerType_BatchNormalization = 23,
755 LayerType_Greater = 24,
756 LayerType_ResizeBilinear = 25,
757 LayerType_Subtraction = 26,
758 LayerType_StridedSlice = 27,
759 LayerType_Gather = 28,
760 LayerType_Mean = 29,
761 LayerType_Merger = 30,
762 LayerType_L2Normalization = 31,
763 LayerType_Splitter = 32,
764 LayerType_DetectionPostProcess = 33,
765 LayerType_Lstm = 34,
766 LayerType_Quantize = 35,
767 LayerType_Dequantize = 36,
768 LayerType_Merge = 37,
769 LayerType_Switch = 38,
770 LayerType_Concat = 39,
771 LayerType_SpaceToDepth = 40,
772 LayerType_Prelu = 41,
773 LayerType_TransposeConvolution2d = 42,
774 LayerType_Resize = 43,
775 LayerType_Stack = 44,
776 LayerType_QuantizedLstm = 45,
777 LayerType_Abs = 46,
778 LayerType_ArgMinMax = 47,
779 LayerType_Slice = 48,
780 LayerType_DepthToSpace = 49,
781 LayerType_InstanceNormalization = 50,
782 LayerType_LogSoftmax = 51,
783 LayerType_Comparison = 52,
784 LayerType_StandIn = 53,
785 LayerType_ElementwiseUnary = 54,
786 LayerType_Transpose = 55,
787 LayerType_QLstm = 56,
788 LayerType_Fill = 57,
789 LayerType_Rank = 58,
790 LayerType_LogicalBinary = 59,
791 LayerType_Reduce = 60,
792 LayerType_Cast = 61,
793 LayerType_Shape = 62,
794 LayerType_UnidirectionalSequenceLstm = 63,
795 LayerType_ChannelShuffle = 64,
796 LayerType_Convolution3d = 65,
797 LayerType_Pooling3d = 66,
798 LayerType_GatherNd = 67,
799 LayerType_BatchMatMul = 68,
800 LayerType_ElementwiseBinary = 69,
801 LayerType_MIN = LayerType_Addition,
802 LayerType_MAX = LayerType_ElementwiseBinary
803 };
804
805 inline const LayerType (&EnumValuesLayerType())[70] {
806 static const LayerType values[] = {
807 LayerType_Addition,
808 LayerType_Input,
809 LayerType_Multiplication,
810 LayerType_Output,
811 LayerType_Pooling2d,
812 LayerType_Reshape,
813 LayerType_Softmax,
814 LayerType_Convolution2d,
815 LayerType_DepthwiseConvolution2d,
816 LayerType_Activation,
817 LayerType_Permute,
818 LayerType_FullyConnected,
819 LayerType_Constant,
820 LayerType_SpaceToBatchNd,
821 LayerType_BatchToSpaceNd,
822 LayerType_Division,
823 LayerType_Minimum,
824 LayerType_Equal,
825 LayerType_Maximum,
826 LayerType_Normalization,
827 LayerType_Pad,
828 LayerType_Rsqrt,
829 LayerType_Floor,
830 LayerType_BatchNormalization,
831 LayerType_Greater,
832 LayerType_ResizeBilinear,
833 LayerType_Subtraction,
834 LayerType_StridedSlice,
835 LayerType_Gather,
836 LayerType_Mean,
837 LayerType_Merger,
838 LayerType_L2Normalization,
839 LayerType_Splitter,
840 LayerType_DetectionPostProcess,
841 LayerType_Lstm,
842 LayerType_Quantize,
843 LayerType_Dequantize,
844 LayerType_Merge,
845 LayerType_Switch,
846 LayerType_Concat,
847 LayerType_SpaceToDepth,
848 LayerType_Prelu,
849 LayerType_TransposeConvolution2d,
850 LayerType_Resize,
851 LayerType_Stack,
852 LayerType_QuantizedLstm,
853 LayerType_Abs,
854 LayerType_ArgMinMax,
855 LayerType_Slice,
856 LayerType_DepthToSpace,
857 LayerType_InstanceNormalization,
858 LayerType_LogSoftmax,
859 LayerType_Comparison,
860 LayerType_StandIn,
861 LayerType_ElementwiseUnary,
862 LayerType_Transpose,
863 LayerType_QLstm,
864 LayerType_Fill,
865 LayerType_Rank,
866 LayerType_LogicalBinary,
867 LayerType_Reduce,
868 LayerType_Cast,
869 LayerType_Shape,
870 LayerType_UnidirectionalSequenceLstm,
871 LayerType_ChannelShuffle,
872 LayerType_Convolution3d,
873 LayerType_Pooling3d,
874 LayerType_GatherNd,
875 LayerType_BatchMatMul,
876 LayerType_ElementwiseBinary
877 };
878 return values;
879 }
880
881 inline const char * const *EnumNamesLayerType() {
882 static const char * const names[71] = {
883 "Addition",
884 "Input",
885 "Multiplication",
886 "Output",
887 "Pooling2d",
888 "Reshape",
889 "Softmax",
890 "Convolution2d",
891 "DepthwiseConvolution2d",
892 "Activation",
893 "Permute",
894 "FullyConnected",
895 "Constant",
896 "SpaceToBatchNd",
897 "BatchToSpaceNd",
898 "Division",
899 "Minimum",
900 "Equal",
901 "Maximum",
902 "Normalization",
903 "Pad",
904 "Rsqrt",
905 "Floor",
906 "BatchNormalization",
907 "Greater",
908 "ResizeBilinear",
909 "Subtraction",
910 "StridedSlice",
911 "Gather",
912 "Mean",
913 "Merger",
914 "L2Normalization",
915 "Splitter",
916 "DetectionPostProcess",
917 "Lstm",
918 "Quantize",
919 "Dequantize",
920 "Merge",
921 "Switch",
922 "Concat",
923 "SpaceToDepth",
924 "Prelu",
925 "TransposeConvolution2d",
926 "Resize",
927 "Stack",
928 "QuantizedLstm",
929 "Abs",
930 "ArgMinMax",
931 "Slice",
932 "DepthToSpace",
933 "InstanceNormalization",
934 "LogSoftmax",
935 "Comparison",
936 "StandIn",
937 "ElementwiseUnary",
938 "Transpose",
939 "QLstm",
940 "Fill",
941 "Rank",
942 "LogicalBinary",
943 "Reduce",
944 "Cast",
945 "Shape",
946 "UnidirectionalSequenceLstm",
947 "ChannelShuffle",
948 "Convolution3d",
949 "Pooling3d",
950 "GatherNd",
951 "BatchMatMul",
952 "ElementwiseBinary",
953 nullptr
954 };
955 return names;
956 }
957
958 inline const char *EnumNameLayerType(LayerType e) {
959 if (flatbuffers::IsOutRange(e, LayerType_Addition, LayerType_ElementwiseBinary)) return "";
960 const size_t index = static_cast<size_t>(e);
961 return EnumNamesLayerType()[index];
962 }
963
964 enum ComparisonOperation : int8_t {
965 ComparisonOperation_Equal = 0,
966 ComparisonOperation_Greater = 1,
967 ComparisonOperation_GreaterOrEqual = 2,
968 ComparisonOperation_Less = 3,
969 ComparisonOperation_LessOrEqual = 4,
970 ComparisonOperation_NotEqual = 5,
971 ComparisonOperation_MIN = ComparisonOperation_Equal,
972 ComparisonOperation_MAX = ComparisonOperation_NotEqual
973 };
974
975 inline const ComparisonOperation (&EnumValuesComparisonOperation())[6] {
976 static const ComparisonOperation values[] = {
977 ComparisonOperation_Equal,
978 ComparisonOperation_Greater,
979 ComparisonOperation_GreaterOrEqual,
980 ComparisonOperation_Less,
981 ComparisonOperation_LessOrEqual,
982 ComparisonOperation_NotEqual
983 };
984 return values;
985 }
986
987 inline const char * const *EnumNamesComparisonOperation() {
988 static const char * const names[7] = {
989 "Equal",
990 "Greater",
991 "GreaterOrEqual",
992 "Less",
993 "LessOrEqual",
994 "NotEqual",
995 nullptr
996 };
997 return names;
998 }
999
1000 inline const char *EnumNameComparisonOperation(ComparisonOperation e) {
1001 if (flatbuffers::IsOutRange(e, ComparisonOperation_Equal, ComparisonOperation_NotEqual)) return "";
1002 const size_t index = static_cast<size_t>(e);
1003 return EnumNamesComparisonOperation()[index];
1004 }
1005
1006 enum BinaryOperation : int8_t {
1007 BinaryOperation_Add = 0,
1008 BinaryOperation_Div = 1,
1009 BinaryOperation_Maximum = 2,
1010 BinaryOperation_Minimum = 3,
1011 BinaryOperation_Mul = 4,
1012 BinaryOperation_Sub = 5,
1013 BinaryOperation_MIN = BinaryOperation_Add,
1014 BinaryOperation_MAX = BinaryOperation_Sub
1015 };
1016
1017 inline const BinaryOperation (&EnumValuesBinaryOperation())[6] {
1018 static const BinaryOperation values[] = {
1019 BinaryOperation_Add,
1020 BinaryOperation_Div,
1021 BinaryOperation_Maximum,
1022 BinaryOperation_Minimum,
1023 BinaryOperation_Mul,
1024 BinaryOperation_Sub
1025 };
1026 return values;
1027 }
1028
1029 inline const char * const *EnumNamesBinaryOperation() {
1030 static const char * const names[7] = {
1031 "Add",
1032 "Div",
1033 "Maximum",
1034 "Minimum",
1035 "Mul",
1036 "Sub",
1037 nullptr
1038 };
1039 return names;
1040 }
1041
1042 inline const char *EnumNameBinaryOperation(BinaryOperation e) {
1043 if (flatbuffers::IsOutRange(e, BinaryOperation_Add, BinaryOperation_Sub)) return "";
1044 const size_t index = static_cast<size_t>(e);
1045 return EnumNamesBinaryOperation()[index];
1046 }
1047
1048 enum UnaryOperation : int8_t {
1049 UnaryOperation_Abs = 0,
1050 UnaryOperation_Rsqrt = 1,
1051 UnaryOperation_Sqrt = 2,
1052 UnaryOperation_Exp = 3,
1053 UnaryOperation_Neg = 4,
1054 UnaryOperation_LogicalNot = 5,
1055 UnaryOperation_Log = 6,
1056 UnaryOperation_Sin = 7,
1057 UnaryOperation_Ceil = 8,
1058 UnaryOperation_MIN = UnaryOperation_Abs,
1059 UnaryOperation_MAX = UnaryOperation_Ceil
1060 };
1061
1062 inline const UnaryOperation (&EnumValuesUnaryOperation())[9] {
1063 static const UnaryOperation values[] = {
1064 UnaryOperation_Abs,
1065 UnaryOperation_Rsqrt,
1066 UnaryOperation_Sqrt,
1067 UnaryOperation_Exp,
1068 UnaryOperation_Neg,
1069 UnaryOperation_LogicalNot,
1070 UnaryOperation_Log,
1071 UnaryOperation_Sin,
1072 UnaryOperation_Ceil
1073 };
1074 return values;
1075 }
1076
1077 inline const char * const *EnumNamesUnaryOperation() {
1078 static const char * const names[10] = {
1079 "Abs",
1080 "Rsqrt",
1081 "Sqrt",
1082 "Exp",
1083 "Neg",
1084 "LogicalNot",
1085 "Log",
1086 "Sin",
1087 "Ceil",
1088 nullptr
1089 };
1090 return names;
1091 }
1092
1093 inline const char *EnumNameUnaryOperation(UnaryOperation e) {
1094 if (flatbuffers::IsOutRange(e, UnaryOperation_Abs, UnaryOperation_Ceil)) return "";
1095 const size_t index = static_cast<size_t>(e);
1096 return EnumNamesUnaryOperation()[index];
1097 }
1098
1099 enum LogicalBinaryOperation : int8_t {
1100 LogicalBinaryOperation_LogicalAnd = 0,
1101 LogicalBinaryOperation_LogicalOr = 1,
1102 LogicalBinaryOperation_MIN = LogicalBinaryOperation_LogicalAnd,
1103 LogicalBinaryOperation_MAX = LogicalBinaryOperation_LogicalOr
1104 };
1105
1106 inline const LogicalBinaryOperation (&EnumValuesLogicalBinaryOperation())[2] {
1107 static const LogicalBinaryOperation values[] = {
1108 LogicalBinaryOperation_LogicalAnd,
1109 LogicalBinaryOperation_LogicalOr
1110 };
1111 return values;
1112 }
1113
1114 inline const char * const *EnumNamesLogicalBinaryOperation() {
1115 static const char * const names[3] = {
1116 "LogicalAnd",
1117 "LogicalOr",
1118 nullptr
1119 };
1120 return names;
1121 }
1122
1123 inline const char *EnumNameLogicalBinaryOperation(LogicalBinaryOperation e) {
1124 if (flatbuffers::IsOutRange(e, LogicalBinaryOperation_LogicalAnd, LogicalBinaryOperation_LogicalOr)) return "";
1125 const size_t index = static_cast<size_t>(e);
1126 return EnumNamesLogicalBinaryOperation()[index];
1127 }
1128
1129 enum PoolingAlgorithm : int8_t {
1130 PoolingAlgorithm_Max = 0,
1131 PoolingAlgorithm_Average = 1,
1132 PoolingAlgorithm_L2 = 2,
1133 PoolingAlgorithm_MIN = PoolingAlgorithm_Max,
1134 PoolingAlgorithm_MAX = PoolingAlgorithm_L2
1135 };
1136
1137 inline const PoolingAlgorithm (&EnumValuesPoolingAlgorithm())[3] {
1138 static const PoolingAlgorithm values[] = {
1139 PoolingAlgorithm_Max,
1140 PoolingAlgorithm_Average,
1141 PoolingAlgorithm_L2
1142 };
1143 return values;
1144 }
1145
1146 inline const char * const *EnumNamesPoolingAlgorithm() {
1147 static const char * const names[4] = {
1148 "Max",
1149 "Average",
1150 "L2",
1151 nullptr
1152 };
1153 return names;
1154 }
1155
1156 inline const char *EnumNamePoolingAlgorithm(PoolingAlgorithm e) {
1157 if (flatbuffers::IsOutRange(e, PoolingAlgorithm_Max, PoolingAlgorithm_L2)) return "";
1158 const size_t index = static_cast<size_t>(e);
1159 return EnumNamesPoolingAlgorithm()[index];
1160 }
1161
1162 enum OutputShapeRounding : int8_t {
1163 OutputShapeRounding_Floor = 0,
1164 OutputShapeRounding_Ceiling = 1,
1165 OutputShapeRounding_MIN = OutputShapeRounding_Floor,
1166 OutputShapeRounding_MAX = OutputShapeRounding_Ceiling
1167 };
1168
1169 inline const OutputShapeRounding (&EnumValuesOutputShapeRounding())[2] {
1170 static const OutputShapeRounding values[] = {
1171 OutputShapeRounding_Floor,
1172 OutputShapeRounding_Ceiling
1173 };
1174 return values;
1175 }
1176
1177 inline const char * const *EnumNamesOutputShapeRounding() {
1178 static const char * const names[3] = {
1179 "Floor",
1180 "Ceiling",
1181 nullptr
1182 };
1183 return names;
1184 }
1185
1186 inline const char *EnumNameOutputShapeRounding(OutputShapeRounding e) {
1187 if (flatbuffers::IsOutRange(e, OutputShapeRounding_Floor, OutputShapeRounding_Ceiling)) return "";
1188 const size_t index = static_cast<size_t>(e);
1189 return EnumNamesOutputShapeRounding()[index];
1190 }
1191
1192 enum PaddingMethod : int8_t {
1193 PaddingMethod_IgnoreValue = 0,
1194 PaddingMethod_Exclude = 1,
1195 PaddingMethod_MIN = PaddingMethod_IgnoreValue,
1196 PaddingMethod_MAX = PaddingMethod_Exclude
1197 };
1198
1199 inline const PaddingMethod (&EnumValuesPaddingMethod())[2] {
1200 static const PaddingMethod values[] = {
1201 PaddingMethod_IgnoreValue,
1202 PaddingMethod_Exclude
1203 };
1204 return values;
1205 }
1206
1207 inline const char * const *EnumNamesPaddingMethod() {
1208 static const char * const names[3] = {
1209 "IgnoreValue",
1210 "Exclude",
1211 nullptr
1212 };
1213 return names;
1214 }
1215
1216 inline const char *EnumNamePaddingMethod(PaddingMethod e) {
1217 if (flatbuffers::IsOutRange(e, PaddingMethod_IgnoreValue, PaddingMethod_Exclude)) return "";
1218 const size_t index = static_cast<size_t>(e);
1219 return EnumNamesPaddingMethod()[index];
1220 }
1221
1222 enum NormalizationAlgorithmChannel : int8_t {
1223 NormalizationAlgorithmChannel_Across = 0,
1224 NormalizationAlgorithmChannel_Within = 1,
1225 NormalizationAlgorithmChannel_MIN = NormalizationAlgorithmChannel_Across,
1226 NormalizationAlgorithmChannel_MAX = NormalizationAlgorithmChannel_Within
1227 };
1228
1229 inline const NormalizationAlgorithmChannel (&EnumValuesNormalizationAlgorithmChannel())[2] {
1230 static const NormalizationAlgorithmChannel values[] = {
1231 NormalizationAlgorithmChannel_Across,
1232 NormalizationAlgorithmChannel_Within
1233 };
1234 return values;
1235 }
1236
1237 inline const char * const *EnumNamesNormalizationAlgorithmChannel() {
1238 static const char * const names[3] = {
1239 "Across",
1240 "Within",
1241 nullptr
1242 };
1243 return names;
1244 }
1245
1246 inline const char *EnumNameNormalizationAlgorithmChannel(NormalizationAlgorithmChannel e) {
1247 if (flatbuffers::IsOutRange(e, NormalizationAlgorithmChannel_Across, NormalizationAlgorithmChannel_Within)) return "";
1248 const size_t index = static_cast<size_t>(e);
1249 return EnumNamesNormalizationAlgorithmChannel()[index];
1250 }
1251
1252 enum NormalizationAlgorithmMethod : int8_t {
1253 NormalizationAlgorithmMethod_LocalBrightness = 0,
1254 NormalizationAlgorithmMethod_LocalContrast = 1,
1255 NormalizationAlgorithmMethod_MIN = NormalizationAlgorithmMethod_LocalBrightness,
1256 NormalizationAlgorithmMethod_MAX = NormalizationAlgorithmMethod_LocalContrast
1257 };
1258
1259 inline const NormalizationAlgorithmMethod (&EnumValuesNormalizationAlgorithmMethod())[2] {
1260 static const NormalizationAlgorithmMethod values[] = {
1261 NormalizationAlgorithmMethod_LocalBrightness,
1262 NormalizationAlgorithmMethod_LocalContrast
1263 };
1264 return values;
1265 }
1266
1267 inline const char * const *EnumNamesNormalizationAlgorithmMethod() {
1268 static const char * const names[3] = {
1269 "LocalBrightness",
1270 "LocalContrast",
1271 nullptr
1272 };
1273 return names;
1274 }
1275
1276 inline const char *EnumNameNormalizationAlgorithmMethod(NormalizationAlgorithmMethod e) {
1277 if (flatbuffers::IsOutRange(e, NormalizationAlgorithmMethod_LocalBrightness, NormalizationAlgorithmMethod_LocalContrast)) return "";
1278 const size_t index = static_cast<size_t>(e);
1279 return EnumNamesNormalizationAlgorithmMethod()[index];
1280 }
1281
1282 enum PaddingMode : int8_t {
1283 PaddingMode_Constant = 0,
1284 PaddingMode_Reflect = 1,
1285 PaddingMode_Symmetric = 2,
1286 PaddingMode_MIN = PaddingMode_Constant,
1287 PaddingMode_MAX = PaddingMode_Symmetric
1288 };
1289
1290 inline const PaddingMode (&EnumValuesPaddingMode())[3] {
1291 static const PaddingMode values[] = {
1292 PaddingMode_Constant,
1293 PaddingMode_Reflect,
1294 PaddingMode_Symmetric
1295 };
1296 return values;
1297 }
1298
1299 inline const char * const *EnumNamesPaddingMode() {
1300 static const char * const names[4] = {
1301 "Constant",
1302 "Reflect",
1303 "Symmetric",
1304 nullptr
1305 };
1306 return names;
1307 }
1308
1309 inline const char *EnumNamePaddingMode(PaddingMode e) {
1310 if (flatbuffers::IsOutRange(e, PaddingMode_Constant, PaddingMode_Symmetric)) return "";
1311 const size_t index = static_cast<size_t>(e);
1312 return EnumNamesPaddingMode()[index];
1313 }
1314
1315 enum Layer : uint8_t {
1316 Layer_NONE = 0,
1317 Layer_ActivationLayer = 1,
1318 Layer_AdditionLayer = 2,
1319 Layer_BatchToSpaceNdLayer = 3,
1320 Layer_BatchNormalizationLayer = 4,
1321 Layer_ConstantLayer = 5,
1322 Layer_Convolution2dLayer = 6,
1323 Layer_DepthwiseConvolution2dLayer = 7,
1324 Layer_FullyConnectedLayer = 8,
1325 Layer_InputLayer = 9,
1326 Layer_MultiplicationLayer = 10,
1327 Layer_OutputLayer = 11,
1328 Layer_PermuteLayer = 12,
1329 Layer_Pooling2dLayer = 13,
1330 Layer_ReshapeLayer = 14,
1331 Layer_SoftmaxLayer = 15,
1332 Layer_SpaceToBatchNdLayer = 16,
1333 Layer_DivisionLayer = 17,
1334 Layer_MinimumLayer = 18,
1335 Layer_EqualLayer = 19,
1336 Layer_MaximumLayer = 20,
1337 Layer_NormalizationLayer = 21,
1338 Layer_PadLayer = 22,
1339 Layer_RsqrtLayer = 23,
1340 Layer_FloorLayer = 24,
1341 Layer_GreaterLayer = 25,
1342 Layer_ResizeBilinearLayer = 26,
1343 Layer_SubtractionLayer = 27,
1344 Layer_StridedSliceLayer = 28,
1345 Layer_GatherLayer = 29,
1346 Layer_MeanLayer = 30,
1347 Layer_MergerLayer = 31,
1348 Layer_L2NormalizationLayer = 32,
1349 Layer_SplitterLayer = 33,
1350 Layer_DetectionPostProcessLayer = 34,
1351 Layer_LstmLayer = 35,
1352 Layer_QuantizedLstmLayer = 36,
1353 Layer_QuantizeLayer = 37,
1354 Layer_DequantizeLayer = 38,
1355 Layer_MergeLayer = 39,
1356 Layer_SwitchLayer = 40,
1357 Layer_ConcatLayer = 41,
1358 Layer_SpaceToDepthLayer = 42,
1359 Layer_PreluLayer = 43,
1360 Layer_TransposeConvolution2dLayer = 44,
1361 Layer_ResizeLayer = 45,
1362 Layer_StackLayer = 46,
1363 Layer_AbsLayer = 47,
1364 Layer_ArgMinMaxLayer = 48,
1365 Layer_SliceLayer = 49,
1366 Layer_DepthToSpaceLayer = 50,
1367 Layer_InstanceNormalizationLayer = 51,
1368 Layer_LogSoftmaxLayer = 52,
1369 Layer_ComparisonLayer = 53,
1370 Layer_StandInLayer = 54,
1371 Layer_ElementwiseUnaryLayer = 55,
1372 Layer_TransposeLayer = 56,
1373 Layer_QLstmLayer = 57,
1374 Layer_FillLayer = 58,
1375 Layer_RankLayer = 59,
1376 Layer_LogicalBinaryLayer = 60,
1377 Layer_ReduceLayer = 61,
1378 Layer_CastLayer = 62,
1379 Layer_ShapeLayer = 63,
1380 Layer_UnidirectionalSequenceLstmLayer = 64,
1381 Layer_ChannelShuffleLayer = 65,
1382 Layer_Convolution3dLayer = 66,
1383 Layer_Pooling3dLayer = 67,
1384 Layer_GatherNdLayer = 68,
1385 Layer_BatchMatMulLayer = 69,
1386 Layer_ElementwiseBinaryLayer = 70,
1387 Layer_MIN = Layer_NONE,
1388 Layer_MAX = Layer_ElementwiseBinaryLayer
1389 };
1390
1391 inline const Layer (&EnumValuesLayer())[71] {
1392 static const Layer values[] = {
1393 Layer_NONE,
1394 Layer_ActivationLayer,
1395 Layer_AdditionLayer,
1396 Layer_BatchToSpaceNdLayer,
1397 Layer_BatchNormalizationLayer,
1398 Layer_ConstantLayer,
1399 Layer_Convolution2dLayer,
1400 Layer_DepthwiseConvolution2dLayer,
1401 Layer_FullyConnectedLayer,
1402 Layer_InputLayer,
1403 Layer_MultiplicationLayer,
1404 Layer_OutputLayer,
1405 Layer_PermuteLayer,
1406 Layer_Pooling2dLayer,
1407 Layer_ReshapeLayer,
1408 Layer_SoftmaxLayer,
1409 Layer_SpaceToBatchNdLayer,
1410 Layer_DivisionLayer,
1411 Layer_MinimumLayer,
1412 Layer_EqualLayer,
1413 Layer_MaximumLayer,
1414 Layer_NormalizationLayer,
1415 Layer_PadLayer,
1416 Layer_RsqrtLayer,
1417 Layer_FloorLayer,
1418 Layer_GreaterLayer,
1419 Layer_ResizeBilinearLayer,
1420 Layer_SubtractionLayer,
1421 Layer_StridedSliceLayer,
1422 Layer_GatherLayer,
1423 Layer_MeanLayer,
1424 Layer_MergerLayer,
1425 Layer_L2NormalizationLayer,
1426 Layer_SplitterLayer,
1427 Layer_DetectionPostProcessLayer,
1428 Layer_LstmLayer,
1429 Layer_QuantizedLstmLayer,
1430 Layer_QuantizeLayer,
1431 Layer_DequantizeLayer,
1432 Layer_MergeLayer,
1433 Layer_SwitchLayer,
1434 Layer_ConcatLayer,
1435 Layer_SpaceToDepthLayer,
1436 Layer_PreluLayer,
1437 Layer_TransposeConvolution2dLayer,
1438 Layer_ResizeLayer,
1439 Layer_StackLayer,
1440 Layer_AbsLayer,
1441 Layer_ArgMinMaxLayer,
1442 Layer_SliceLayer,
1443 Layer_DepthToSpaceLayer,
1444 Layer_InstanceNormalizationLayer,
1445 Layer_LogSoftmaxLayer,
1446 Layer_ComparisonLayer,
1447 Layer_StandInLayer,
1448 Layer_ElementwiseUnaryLayer,
1449 Layer_TransposeLayer,
1450 Layer_QLstmLayer,
1451 Layer_FillLayer,
1452 Layer_RankLayer,
1453 Layer_LogicalBinaryLayer,
1454 Layer_ReduceLayer,
1455 Layer_CastLayer,
1456 Layer_ShapeLayer,
1457 Layer_UnidirectionalSequenceLstmLayer,
1458 Layer_ChannelShuffleLayer,
1459 Layer_Convolution3dLayer,
1460 Layer_Pooling3dLayer,
1461 Layer_GatherNdLayer,
1462 Layer_BatchMatMulLayer,
1463 Layer_ElementwiseBinaryLayer
1464 };
1465 return values;
1466 }
1467
1468 inline const char * const *EnumNamesLayer() {
1469 static const char * const names[72] = {
1470 "NONE",
1471 "ActivationLayer",
1472 "AdditionLayer",
1473 "BatchToSpaceNdLayer",
1474 "BatchNormalizationLayer",
1475 "ConstantLayer",
1476 "Convolution2dLayer",
1477 "DepthwiseConvolution2dLayer",
1478 "FullyConnectedLayer",
1479 "InputLayer",
1480 "MultiplicationLayer",
1481 "OutputLayer",
1482 "PermuteLayer",
1483 "Pooling2dLayer",
1484 "ReshapeLayer",
1485 "SoftmaxLayer",
1486 "SpaceToBatchNdLayer",
1487 "DivisionLayer",
1488 "MinimumLayer",
1489 "EqualLayer",
1490 "MaximumLayer",
1491 "NormalizationLayer",
1492 "PadLayer",
1493 "RsqrtLayer",
1494 "FloorLayer",
1495 "GreaterLayer",
1496 "ResizeBilinearLayer",
1497 "SubtractionLayer",
1498 "StridedSliceLayer",
1499 "GatherLayer",
1500 "MeanLayer",
1501 "MergerLayer",
1502 "L2NormalizationLayer",
1503 "SplitterLayer",
1504 "DetectionPostProcessLayer",
1505 "LstmLayer",
1506 "QuantizedLstmLayer",
1507 "QuantizeLayer",
1508 "DequantizeLayer",
1509 "MergeLayer",
1510 "SwitchLayer",
1511 "ConcatLayer",
1512 "SpaceToDepthLayer",
1513 "PreluLayer",
1514 "TransposeConvolution2dLayer",
1515 "ResizeLayer",
1516 "StackLayer",
1517 "AbsLayer",
1518 "ArgMinMaxLayer",
1519 "SliceLayer",
1520 "DepthToSpaceLayer",
1521 "InstanceNormalizationLayer",
1522 "LogSoftmaxLayer",
1523 "ComparisonLayer",
1524 "StandInLayer",
1525 "ElementwiseUnaryLayer",
1526 "TransposeLayer",
1527 "QLstmLayer",
1528 "FillLayer",
1529 "RankLayer",
1530 "LogicalBinaryLayer",
1531 "ReduceLayer",
1532 "CastLayer",
1533 "ShapeLayer",
1534 "UnidirectionalSequenceLstmLayer",
1535 "ChannelShuffleLayer",
1536 "Convolution3dLayer",
1537 "Pooling3dLayer",
1538 "GatherNdLayer",
1539 "BatchMatMulLayer",
1540 "ElementwiseBinaryLayer",
1541 nullptr
1542 };
1543 return names;
1544 }
1545
1546 inline const char *EnumNameLayer(Layer e) {
1547 if (flatbuffers::IsOutRange(e, Layer_NONE, Layer_ElementwiseBinaryLayer)) return "";
1548 const size_t index = static_cast<size_t>(e);
1549 return EnumNamesLayer()[index];
1550 }
1551
1552 template<typename T> struct LayerTraits {
1553 static const Layer enum_value = Layer_NONE;
1554 };
1555
1556 template<> struct LayerTraits<armnnSerializer::ActivationLayer> {
1557 static const Layer enum_value = Layer_ActivationLayer;
1558 };
1559
1560 template<> struct LayerTraits<armnnSerializer::AdditionLayer> {
1561 static const Layer enum_value = Layer_AdditionLayer;
1562 };
1563
1564 template<> struct LayerTraits<armnnSerializer::BatchToSpaceNdLayer> {
1565 static const Layer enum_value = Layer_BatchToSpaceNdLayer;
1566 };
1567
1568 template<> struct LayerTraits<armnnSerializer::BatchNormalizationLayer> {
1569 static const Layer enum_value = Layer_BatchNormalizationLayer;
1570 };
1571
1572 template<> struct LayerTraits<armnnSerializer::ConstantLayer> {
1573 static const Layer enum_value = Layer_ConstantLayer;
1574 };
1575
1576 template<> struct LayerTraits<armnnSerializer::Convolution2dLayer> {
1577 static const Layer enum_value = Layer_Convolution2dLayer;
1578 };
1579
1580 template<> struct LayerTraits<armnnSerializer::DepthwiseConvolution2dLayer> {
1581 static const Layer enum_value = Layer_DepthwiseConvolution2dLayer;
1582 };
1583
1584 template<> struct LayerTraits<armnnSerializer::FullyConnectedLayer> {
1585 static const Layer enum_value = Layer_FullyConnectedLayer;
1586 };
1587
1588 template<> struct LayerTraits<armnnSerializer::InputLayer> {
1589 static const Layer enum_value = Layer_InputLayer;
1590 };
1591
1592 template<> struct LayerTraits<armnnSerializer::MultiplicationLayer> {
1593 static const Layer enum_value = Layer_MultiplicationLayer;
1594 };
1595
1596 template<> struct LayerTraits<armnnSerializer::OutputLayer> {
1597 static const Layer enum_value = Layer_OutputLayer;
1598 };
1599
1600 template<> struct LayerTraits<armnnSerializer::PermuteLayer> {
1601 static const Layer enum_value = Layer_PermuteLayer;
1602 };
1603
1604 template<> struct LayerTraits<armnnSerializer::Pooling2dLayer> {
1605 static const Layer enum_value = Layer_Pooling2dLayer;
1606 };
1607
1608 template<> struct LayerTraits<armnnSerializer::ReshapeLayer> {
1609 static const Layer enum_value = Layer_ReshapeLayer;
1610 };
1611
1612 template<> struct LayerTraits<armnnSerializer::SoftmaxLayer> {
1613 static const Layer enum_value = Layer_SoftmaxLayer;
1614 };
1615
1616 template<> struct LayerTraits<armnnSerializer::SpaceToBatchNdLayer> {
1617 static const Layer enum_value = Layer_SpaceToBatchNdLayer;
1618 };
1619
1620 template<> struct LayerTraits<armnnSerializer::DivisionLayer> {
1621 static const Layer enum_value = Layer_DivisionLayer;
1622 };
1623
1624 template<> struct LayerTraits<armnnSerializer::MinimumLayer> {
1625 static const Layer enum_value = Layer_MinimumLayer;
1626 };
1627
1628 template<> struct LayerTraits<armnnSerializer::EqualLayer> {
1629 static const Layer enum_value = Layer_EqualLayer;
1630 };
1631
1632 template<> struct LayerTraits<armnnSerializer::MaximumLayer> {
1633 static const Layer enum_value = Layer_MaximumLayer;
1634 };
1635
1636 template<> struct LayerTraits<armnnSerializer::NormalizationLayer> {
1637 static const Layer enum_value = Layer_NormalizationLayer;
1638 };
1639
1640 template<> struct LayerTraits<armnnSerializer::PadLayer> {
1641 static const Layer enum_value = Layer_PadLayer;
1642 };
1643
1644 template<> struct LayerTraits<armnnSerializer::RsqrtLayer> {
1645 static const Layer enum_value = Layer_RsqrtLayer;
1646 };
1647
1648 template<> struct LayerTraits<armnnSerializer::FloorLayer> {
1649 static const Layer enum_value = Layer_FloorLayer;
1650 };
1651
1652 template<> struct LayerTraits<armnnSerializer::GreaterLayer> {
1653 static const Layer enum_value = Layer_GreaterLayer;
1654 };
1655
1656 template<> struct LayerTraits<armnnSerializer::ResizeBilinearLayer> {
1657 static const Layer enum_value = Layer_ResizeBilinearLayer;
1658 };
1659
1660 template<> struct LayerTraits<armnnSerializer::SubtractionLayer> {
1661 static const Layer enum_value = Layer_SubtractionLayer;
1662 };
1663
1664 template<> struct LayerTraits<armnnSerializer::StridedSliceLayer> {
1665 static const Layer enum_value = Layer_StridedSliceLayer;
1666 };
1667
1668 template<> struct LayerTraits<armnnSerializer::GatherLayer> {
1669 static const Layer enum_value = Layer_GatherLayer;
1670 };
1671
1672 template<> struct LayerTraits<armnnSerializer::MeanLayer> {
1673 static const Layer enum_value = Layer_MeanLayer;
1674 };
1675
1676 template<> struct LayerTraits<armnnSerializer::MergerLayer> {
1677 static const Layer enum_value = Layer_MergerLayer;
1678 };
1679
1680 template<> struct LayerTraits<armnnSerializer::L2NormalizationLayer> {
1681 static const Layer enum_value = Layer_L2NormalizationLayer;
1682 };
1683
1684 template<> struct LayerTraits<armnnSerializer::SplitterLayer> {
1685 static const Layer enum_value = Layer_SplitterLayer;
1686 };
1687
1688 template<> struct LayerTraits<armnnSerializer::DetectionPostProcessLayer> {
1689 static const Layer enum_value = Layer_DetectionPostProcessLayer;
1690 };
1691
1692 template<> struct LayerTraits<armnnSerializer::LstmLayer> {
1693 static const Layer enum_value = Layer_LstmLayer;
1694 };
1695
1696 template<> struct LayerTraits<armnnSerializer::QuantizedLstmLayer> {
1697 static const Layer enum_value = Layer_QuantizedLstmLayer;
1698 };
1699
1700 template<> struct LayerTraits<armnnSerializer::QuantizeLayer> {
1701 static const Layer enum_value = Layer_QuantizeLayer;
1702 };
1703
1704 template<> struct LayerTraits<armnnSerializer::DequantizeLayer> {
1705 static const Layer enum_value = Layer_DequantizeLayer;
1706 };
1707
1708 template<> struct LayerTraits<armnnSerializer::MergeLayer> {
1709 static const Layer enum_value = Layer_MergeLayer;
1710 };
1711
1712 template<> struct LayerTraits<armnnSerializer::SwitchLayer> {
1713 static const Layer enum_value = Layer_SwitchLayer;
1714 };
1715
1716 template<> struct LayerTraits<armnnSerializer::ConcatLayer> {
1717 static const Layer enum_value = Layer_ConcatLayer;
1718 };
1719
1720 template<> struct LayerTraits<armnnSerializer::SpaceToDepthLayer> {
1721 static const Layer enum_value = Layer_SpaceToDepthLayer;
1722 };
1723
1724 template<> struct LayerTraits<armnnSerializer::PreluLayer> {
1725 static const Layer enum_value = Layer_PreluLayer;
1726 };
1727
1728 template<> struct LayerTraits<armnnSerializer::TransposeConvolution2dLayer> {
1729 static const Layer enum_value = Layer_TransposeConvolution2dLayer;
1730 };
1731
1732 template<> struct LayerTraits<armnnSerializer::ResizeLayer> {
1733 static const Layer enum_value = Layer_ResizeLayer;
1734 };
1735
1736 template<> struct LayerTraits<armnnSerializer::StackLayer> {
1737 static const Layer enum_value = Layer_StackLayer;
1738 };
1739
1740 template<> struct LayerTraits<armnnSerializer::AbsLayer> {
1741 static const Layer enum_value = Layer_AbsLayer;
1742 };
1743
1744 template<> struct LayerTraits<armnnSerializer::ArgMinMaxLayer> {
1745 static const Layer enum_value = Layer_ArgMinMaxLayer;
1746 };
1747
1748 template<> struct LayerTraits<armnnSerializer::SliceLayer> {
1749 static const Layer enum_value = Layer_SliceLayer;
1750 };
1751
1752 template<> struct LayerTraits<armnnSerializer::DepthToSpaceLayer> {
1753 static const Layer enum_value = Layer_DepthToSpaceLayer;
1754 };
1755
1756 template<> struct LayerTraits<armnnSerializer::InstanceNormalizationLayer> {
1757 static const Layer enum_value = Layer_InstanceNormalizationLayer;
1758 };
1759
1760 template<> struct LayerTraits<armnnSerializer::LogSoftmaxLayer> {
1761 static const Layer enum_value = Layer_LogSoftmaxLayer;
1762 };
1763
1764 template<> struct LayerTraits<armnnSerializer::ComparisonLayer> {
1765 static const Layer enum_value = Layer_ComparisonLayer;
1766 };
1767
1768 template<> struct LayerTraits<armnnSerializer::StandInLayer> {
1769 static const Layer enum_value = Layer_StandInLayer;
1770 };
1771
1772 template<> struct LayerTraits<armnnSerializer::ElementwiseUnaryLayer> {
1773 static const Layer enum_value = Layer_ElementwiseUnaryLayer;
1774 };
1775
1776 template<> struct LayerTraits<armnnSerializer::TransposeLayer> {
1777 static const Layer enum_value = Layer_TransposeLayer;
1778 };
1779
1780 template<> struct LayerTraits<armnnSerializer::QLstmLayer> {
1781 static const Layer enum_value = Layer_QLstmLayer;
1782 };
1783
1784 template<> struct LayerTraits<armnnSerializer::FillLayer> {
1785 static const Layer enum_value = Layer_FillLayer;
1786 };
1787
1788 template<> struct LayerTraits<armnnSerializer::RankLayer> {
1789 static const Layer enum_value = Layer_RankLayer;
1790 };
1791
1792 template<> struct LayerTraits<armnnSerializer::LogicalBinaryLayer> {
1793 static const Layer enum_value = Layer_LogicalBinaryLayer;
1794 };
1795
1796 template<> struct LayerTraits<armnnSerializer::ReduceLayer> {
1797 static const Layer enum_value = Layer_ReduceLayer;
1798 };
1799
1800 template<> struct LayerTraits<armnnSerializer::CastLayer> {
1801 static const Layer enum_value = Layer_CastLayer;
1802 };
1803
1804 template<> struct LayerTraits<armnnSerializer::ShapeLayer> {
1805 static const Layer enum_value = Layer_ShapeLayer;
1806 };
1807
1808 template<> struct LayerTraits<armnnSerializer::UnidirectionalSequenceLstmLayer> {
1809 static const Layer enum_value = Layer_UnidirectionalSequenceLstmLayer;
1810 };
1811
1812 template<> struct LayerTraits<armnnSerializer::ChannelShuffleLayer> {
1813 static const Layer enum_value = Layer_ChannelShuffleLayer;
1814 };
1815
1816 template<> struct LayerTraits<armnnSerializer::Convolution3dLayer> {
1817 static const Layer enum_value = Layer_Convolution3dLayer;
1818 };
1819
1820 template<> struct LayerTraits<armnnSerializer::Pooling3dLayer> {
1821 static const Layer enum_value = Layer_Pooling3dLayer;
1822 };
1823
1824 template<> struct LayerTraits<armnnSerializer::GatherNdLayer> {
1825 static const Layer enum_value = Layer_GatherNdLayer;
1826 };
1827
1828 template<> struct LayerTraits<armnnSerializer::BatchMatMulLayer> {
1829 static const Layer enum_value = Layer_BatchMatMulLayer;
1830 };
1831
1832 template<> struct LayerTraits<armnnSerializer::ElementwiseBinaryLayer> {
1833 static const Layer enum_value = Layer_ElementwiseBinaryLayer;
1834 };
1835
1836 bool VerifyLayer(flatbuffers::Verifier &verifier, const void *obj, Layer type);
1837 bool VerifyLayerVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
1838
1839 FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Connection FLATBUFFERS_FINAL_CLASS {
1840 private:
1841 uint32_t sourceLayerIndex_;
1842 uint32_t outputSlotIndex_;
1843
1844 public:
1845 Connection()
1846 : sourceLayerIndex_(0),
1847 outputSlotIndex_(0) {
1848 }
1849 Connection(uint32_t _sourceLayerIndex, uint32_t _outputSlotIndex)
1850 : sourceLayerIndex_(flatbuffers::EndianScalar(_sourceLayerIndex)),
1851 outputSlotIndex_(flatbuffers::EndianScalar(_outputSlotIndex)) {
1852 }
1853 uint32_t sourceLayerIndex() const {
1854 return flatbuffers::EndianScalar(sourceLayerIndex_);
1855 }
1856 uint32_t outputSlotIndex() const {
1857 return flatbuffers::EndianScalar(outputSlotIndex_);
1858 }
1859 };
1860 FLATBUFFERS_STRUCT_END(Connection, 8);
1861
1862 struct TensorInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
1863 typedef TensorInfoBuilder Builder;
1864 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
1865 VT_DIMENSIONS = 4,
1866 VT_DATATYPE = 6,
1867 VT_QUANTIZATIONSCALE = 8,
1868 VT_QUANTIZATIONOFFSET = 10,
1869 VT_QUANTIZATIONSCALES = 12,
1870 VT_QUANTIZATIONDIM = 14,
1871 VT_DIMENSIONALITY = 16,
1872 VT_DIMENSIONSPECIFICITY = 18,
1873 VT_ISCONSTANT = 20
1874 };
1875 const flatbuffers::Vector<uint32_t> *dimensions() const {
1876 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_DIMENSIONS);
1877 }
1878 armnnSerializer::DataType dataType() const {
1879 return static_cast<armnnSerializer::DataType>(GetField<int8_t>(VT_DATATYPE, 0));
1880 }
1881 float quantizationScale() const {
1882 return GetField<float>(VT_QUANTIZATIONSCALE, 1.0f);
1883 }
1884 int32_t quantizationOffset() const {
1885 return GetField<int32_t>(VT_QUANTIZATIONOFFSET, 0);
1886 }
1887 const flatbuffers::Vector<float> *quantizationScales() const {
1888 return GetPointer<const flatbuffers::Vector<float> *>(VT_QUANTIZATIONSCALES);
1889 }
1890 uint32_t quantizationDim() const {
1891 return GetField<uint32_t>(VT_QUANTIZATIONDIM, 0);
1892 }
1893 uint32_t dimensionality() const {
1894 return GetField<uint32_t>(VT_DIMENSIONALITY, 1);
1895 }
1896 const flatbuffers::Vector<uint8_t> *dimensionSpecificity() const {
1897 return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_DIMENSIONSPECIFICITY);
1898 }
1899 bool isConstant() const {
1900 return GetField<uint8_t>(VT_ISCONSTANT, 0) != 0;
1901 }
1902 bool Verify(flatbuffers::Verifier &verifier) const {
1903 return VerifyTableStart(verifier) &&
1904 VerifyOffset(verifier, VT_DIMENSIONS) &&
1905 verifier.VerifyVector(dimensions()) &&
1906 VerifyField<int8_t>(verifier, VT_DATATYPE, 1) &&
1907 VerifyField<float>(verifier, VT_QUANTIZATIONSCALE, 4) &&
1908 VerifyField<int32_t>(verifier, VT_QUANTIZATIONOFFSET, 4) &&
1909 VerifyOffset(verifier, VT_QUANTIZATIONSCALES) &&
1910 verifier.VerifyVector(quantizationScales()) &&
1911 VerifyField<uint32_t>(verifier, VT_QUANTIZATIONDIM, 4) &&
1912 VerifyField<uint32_t>(verifier, VT_DIMENSIONALITY, 4) &&
1913 VerifyOffset(verifier, VT_DIMENSIONSPECIFICITY) &&
1914 verifier.VerifyVector(dimensionSpecificity()) &&
1915 VerifyField<uint8_t>(verifier, VT_ISCONSTANT, 1) &&
1916 verifier.EndTable();
1917 }
1918 };
1919
1920 struct TensorInfoBuilder {
1921 typedef TensorInfo Table;
1922 flatbuffers::FlatBufferBuilder &fbb_;
1923 flatbuffers::uoffset_t start_;
1924 void add_dimensions(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> dimensions) {
1925 fbb_.AddOffset(TensorInfo::VT_DIMENSIONS, dimensions);
1926 }
1927 void add_dataType(armnnSerializer::DataType dataType) {
1928 fbb_.AddElement<int8_t>(TensorInfo::VT_DATATYPE, static_cast<int8_t>(dataType), 0);
1929 }
1930 void add_quantizationScale(float quantizationScale) {
1931 fbb_.AddElement<float>(TensorInfo::VT_QUANTIZATIONSCALE, quantizationScale, 1.0f);
1932 }
1933 void add_quantizationOffset(int32_t quantizationOffset) {
1934 fbb_.AddElement<int32_t>(TensorInfo::VT_QUANTIZATIONOFFSET, quantizationOffset, 0);
1935 }
1936 void add_quantizationScales(flatbuffers::Offset<flatbuffers::Vector<float>> quantizationScales) {
1937 fbb_.AddOffset(TensorInfo::VT_QUANTIZATIONSCALES, quantizationScales);
1938 }
1939 void add_quantizationDim(uint32_t quantizationDim) {
1940 fbb_.AddElement<uint32_t>(TensorInfo::VT_QUANTIZATIONDIM, quantizationDim, 0);
1941 }
1942 void add_dimensionality(uint32_t dimensionality) {
1943 fbb_.AddElement<uint32_t>(TensorInfo::VT_DIMENSIONALITY, dimensionality, 1);
1944 }
1945 void add_dimensionSpecificity(flatbuffers::Offset<flatbuffers::Vector<uint8_t>> dimensionSpecificity) {
1946 fbb_.AddOffset(TensorInfo::VT_DIMENSIONSPECIFICITY, dimensionSpecificity);
1947 }
1948 void add_isConstant(bool isConstant) {
1949 fbb_.AddElement<uint8_t>(TensorInfo::VT_ISCONSTANT, static_cast<uint8_t>(isConstant), 0);
1950 }
1951 explicit TensorInfoBuilder(flatbuffers::FlatBufferBuilder &_fbb)
1952 : fbb_(_fbb) {
1953 start_ = fbb_.StartTable();
1954 }
1955 flatbuffers::Offset<TensorInfo> Finish() {
1956 const auto end = fbb_.EndTable(start_);
1957 auto o = flatbuffers::Offset<TensorInfo>(end);
1958 return o;
1959 }
1960 };
1961
1962 inline flatbuffers::Offset<TensorInfo> CreateTensorInfo(
1963 flatbuffers::FlatBufferBuilder &_fbb,
1964 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> dimensions = 0,
1965 armnnSerializer::DataType dataType = armnnSerializer::DataType_Float16,
1966 float quantizationScale = 1.0f,
1967 int32_t quantizationOffset = 0,
1968 flatbuffers::Offset<flatbuffers::Vector<float>> quantizationScales = 0,
1969 uint32_t quantizationDim = 0,
1970 uint32_t dimensionality = 1,
1971 flatbuffers::Offset<flatbuffers::Vector<uint8_t>> dimensionSpecificity = 0,
1972 bool isConstant = false) {
1973 TensorInfoBuilder builder_(_fbb);
1974 builder_.add_dimensionSpecificity(dimensionSpecificity);
1975 builder_.add_dimensionality(dimensionality);
1976 builder_.add_quantizationDim(quantizationDim);
1977 builder_.add_quantizationScales(quantizationScales);
1978 builder_.add_quantizationOffset(quantizationOffset);
1979 builder_.add_quantizationScale(quantizationScale);
1980 builder_.add_dimensions(dimensions);
1981 builder_.add_isConstant(isConstant);
1982 builder_.add_dataType(dataType);
1983 return builder_.Finish();
1984 }
1985
1986 inline flatbuffers::Offset<TensorInfo> CreateTensorInfoDirect(
1987 flatbuffers::FlatBufferBuilder &_fbb,
1988 const std::vector<uint32_t> *dimensions = nullptr,
1989 armnnSerializer::DataType dataType = armnnSerializer::DataType_Float16,
1990 float quantizationScale = 1.0f,
1991 int32_t quantizationOffset = 0,
1992 const std::vector<float> *quantizationScales = nullptr,
1993 uint32_t quantizationDim = 0,
1994 uint32_t dimensionality = 1,
1995 const std::vector<uint8_t> *dimensionSpecificity = nullptr,
1996 bool isConstant = false) {
1997 auto dimensions__ = dimensions ? _fbb.CreateVector<uint32_t>(*dimensions) : 0;
1998 auto quantizationScales__ = quantizationScales ? _fbb.CreateVector<float>(*quantizationScales) : 0;
1999 auto dimensionSpecificity__ = dimensionSpecificity ? _fbb.CreateVector<uint8_t>(*dimensionSpecificity) : 0;
2000 return armnnSerializer::CreateTensorInfo(
2001 _fbb,
2002 dimensions__,
2003 dataType,
2004 quantizationScale,
2005 quantizationOffset,
2006 quantizationScales__,
2007 quantizationDim,
2008 dimensionality,
2009 dimensionSpecificity__,
2010 isConstant);
2011 }
2012
2013 struct ByteData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2014 typedef ByteDataBuilder Builder;
2015 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2016 VT_DATA = 4
2017 };
2018 const flatbuffers::Vector<int8_t> *data() const {
2019 return GetPointer<const flatbuffers::Vector<int8_t> *>(VT_DATA);
2020 }
2021 bool Verify(flatbuffers::Verifier &verifier) const {
2022 return VerifyTableStart(verifier) &&
2023 VerifyOffset(verifier, VT_DATA) &&
2024 verifier.VerifyVector(data()) &&
2025 verifier.EndTable();
2026 }
2027 };
2028
2029 struct ByteDataBuilder {
2030 typedef ByteData Table;
2031 flatbuffers::FlatBufferBuilder &fbb_;
2032 flatbuffers::uoffset_t start_;
2033 void add_data(flatbuffers::Offset<flatbuffers::Vector<int8_t>> data) {
2034 fbb_.AddOffset(ByteData::VT_DATA, data);
2035 }
2036 explicit ByteDataBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2037 : fbb_(_fbb) {
2038 start_ = fbb_.StartTable();
2039 }
2040 flatbuffers::Offset<ByteData> Finish() {
2041 const auto end = fbb_.EndTable(start_);
2042 auto o = flatbuffers::Offset<ByteData>(end);
2043 return o;
2044 }
2045 };
2046
2047 inline flatbuffers::Offset<ByteData> CreateByteData(
2048 flatbuffers::FlatBufferBuilder &_fbb,
2049 flatbuffers::Offset<flatbuffers::Vector<int8_t>> data = 0) {
2050 ByteDataBuilder builder_(_fbb);
2051 builder_.add_data(data);
2052 return builder_.Finish();
2053 }
2054
2055 inline flatbuffers::Offset<ByteData> CreateByteDataDirect(
2056 flatbuffers::FlatBufferBuilder &_fbb,
2057 const std::vector<int8_t> *data = nullptr) {
2058 auto data__ = data ? _fbb.CreateVector<int8_t>(*data) : 0;
2059 return armnnSerializer::CreateByteData(
2060 _fbb,
2061 data__);
2062 }
2063
2064 struct ShortData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2065 typedef ShortDataBuilder Builder;
2066 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2067 VT_DATA = 4
2068 };
2069 const flatbuffers::Vector<int16_t> *data() const {
2070 return GetPointer<const flatbuffers::Vector<int16_t> *>(VT_DATA);
2071 }
2072 bool Verify(flatbuffers::Verifier &verifier) const {
2073 return VerifyTableStart(verifier) &&
2074 VerifyOffset(verifier, VT_DATA) &&
2075 verifier.VerifyVector(data()) &&
2076 verifier.EndTable();
2077 }
2078 };
2079
2080 struct ShortDataBuilder {
2081 typedef ShortData Table;
2082 flatbuffers::FlatBufferBuilder &fbb_;
2083 flatbuffers::uoffset_t start_;
2084 void add_data(flatbuffers::Offset<flatbuffers::Vector<int16_t>> data) {
2085 fbb_.AddOffset(ShortData::VT_DATA, data);
2086 }
2087 explicit ShortDataBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2088 : fbb_(_fbb) {
2089 start_ = fbb_.StartTable();
2090 }
2091 flatbuffers::Offset<ShortData> Finish() {
2092 const auto end = fbb_.EndTable(start_);
2093 auto o = flatbuffers::Offset<ShortData>(end);
2094 return o;
2095 }
2096 };
2097
2098 inline flatbuffers::Offset<ShortData> CreateShortData(
2099 flatbuffers::FlatBufferBuilder &_fbb,
2100 flatbuffers::Offset<flatbuffers::Vector<int16_t>> data = 0) {
2101 ShortDataBuilder builder_(_fbb);
2102 builder_.add_data(data);
2103 return builder_.Finish();
2104 }
2105
2106 inline flatbuffers::Offset<ShortData> CreateShortDataDirect(
2107 flatbuffers::FlatBufferBuilder &_fbb,
2108 const std::vector<int16_t> *data = nullptr) {
2109 auto data__ = data ? _fbb.CreateVector<int16_t>(*data) : 0;
2110 return armnnSerializer::CreateShortData(
2111 _fbb,
2112 data__);
2113 }
2114
2115 struct IntData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2116 typedef IntDataBuilder Builder;
2117 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2118 VT_DATA = 4
2119 };
2120 const flatbuffers::Vector<int32_t> *data() const {
2121 return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_DATA);
2122 }
2123 bool Verify(flatbuffers::Verifier &verifier) const {
2124 return VerifyTableStart(verifier) &&
2125 VerifyOffset(verifier, VT_DATA) &&
2126 verifier.VerifyVector(data()) &&
2127 verifier.EndTable();
2128 }
2129 };
2130
2131 struct IntDataBuilder {
2132 typedef IntData Table;
2133 flatbuffers::FlatBufferBuilder &fbb_;
2134 flatbuffers::uoffset_t start_;
2135 void add_data(flatbuffers::Offset<flatbuffers::Vector<int32_t>> data) {
2136 fbb_.AddOffset(IntData::VT_DATA, data);
2137 }
2138 explicit IntDataBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2139 : fbb_(_fbb) {
2140 start_ = fbb_.StartTable();
2141 }
2142 flatbuffers::Offset<IntData> Finish() {
2143 const auto end = fbb_.EndTable(start_);
2144 auto o = flatbuffers::Offset<IntData>(end);
2145 return o;
2146 }
2147 };
2148
2149 inline flatbuffers::Offset<IntData> CreateIntData(
2150 flatbuffers::FlatBufferBuilder &_fbb,
2151 flatbuffers::Offset<flatbuffers::Vector<int32_t>> data = 0) {
2152 IntDataBuilder builder_(_fbb);
2153 builder_.add_data(data);
2154 return builder_.Finish();
2155 }
2156
2157 inline flatbuffers::Offset<IntData> CreateIntDataDirect(
2158 flatbuffers::FlatBufferBuilder &_fbb,
2159 const std::vector<int32_t> *data = nullptr) {
2160 auto data__ = data ? _fbb.CreateVector<int32_t>(*data) : 0;
2161 return armnnSerializer::CreateIntData(
2162 _fbb,
2163 data__);
2164 }
2165
2166 struct LongData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2167 typedef LongDataBuilder Builder;
2168 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2169 VT_DATA = 4
2170 };
2171 const flatbuffers::Vector<int64_t> *data() const {
2172 return GetPointer<const flatbuffers::Vector<int64_t> *>(VT_DATA);
2173 }
2174 bool Verify(flatbuffers::Verifier &verifier) const {
2175 return VerifyTableStart(verifier) &&
2176 VerifyOffset(verifier, VT_DATA) &&
2177 verifier.VerifyVector(data()) &&
2178 verifier.EndTable();
2179 }
2180 };
2181
2182 struct LongDataBuilder {
2183 typedef LongData Table;
2184 flatbuffers::FlatBufferBuilder &fbb_;
2185 flatbuffers::uoffset_t start_;
2186 void add_data(flatbuffers::Offset<flatbuffers::Vector<int64_t>> data) {
2187 fbb_.AddOffset(LongData::VT_DATA, data);
2188 }
2189 explicit LongDataBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2190 : fbb_(_fbb) {
2191 start_ = fbb_.StartTable();
2192 }
2193 flatbuffers::Offset<LongData> Finish() {
2194 const auto end = fbb_.EndTable(start_);
2195 auto o = flatbuffers::Offset<LongData>(end);
2196 return o;
2197 }
2198 };
2199
2200 inline flatbuffers::Offset<LongData> CreateLongData(
2201 flatbuffers::FlatBufferBuilder &_fbb,
2202 flatbuffers::Offset<flatbuffers::Vector<int64_t>> data = 0) {
2203 LongDataBuilder builder_(_fbb);
2204 builder_.add_data(data);
2205 return builder_.Finish();
2206 }
2207
2208 inline flatbuffers::Offset<LongData> CreateLongDataDirect(
2209 flatbuffers::FlatBufferBuilder &_fbb,
2210 const std::vector<int64_t> *data = nullptr) {
2211 auto data__ = data ? _fbb.CreateVector<int64_t>(*data) : 0;
2212 return armnnSerializer::CreateLongData(
2213 _fbb,
2214 data__);
2215 }
2216
2217 struct ConstTensor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2218 typedef ConstTensorBuilder Builder;
2219 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2220 VT_INFO = 4,
2221 VT_DATA_TYPE = 6,
2222 VT_DATA = 8
2223 };
2224 const armnnSerializer::TensorInfo *info() const {
2225 return GetPointer<const armnnSerializer::TensorInfo *>(VT_INFO);
2226 }
2227 armnnSerializer::ConstTensorData data_type() const {
2228 return static_cast<armnnSerializer::ConstTensorData>(GetField<uint8_t>(VT_DATA_TYPE, 0));
2229 }
2230 const void *data() const {
2231 return GetPointer<const void *>(VT_DATA);
2232 }
2233 template<typename T> const T *data_as() const;
2234 const armnnSerializer::ByteData *data_as_ByteData() const {
2235 return data_type() == armnnSerializer::ConstTensorData_ByteData ? static_cast<const armnnSerializer::ByteData *>(data()) : nullptr;
2236 }
2237 const armnnSerializer::ShortData *data_as_ShortData() const {
2238 return data_type() == armnnSerializer::ConstTensorData_ShortData ? static_cast<const armnnSerializer::ShortData *>(data()) : nullptr;
2239 }
2240 const armnnSerializer::IntData *data_as_IntData() const {
2241 return data_type() == armnnSerializer::ConstTensorData_IntData ? static_cast<const armnnSerializer::IntData *>(data()) : nullptr;
2242 }
2243 const armnnSerializer::LongData *data_as_LongData() const {
2244 return data_type() == armnnSerializer::ConstTensorData_LongData ? static_cast<const armnnSerializer::LongData *>(data()) : nullptr;
2245 }
2246 bool Verify(flatbuffers::Verifier &verifier) const {
2247 return VerifyTableStart(verifier) &&
2248 VerifyOffset(verifier, VT_INFO) &&
2249 verifier.VerifyTable(info()) &&
2250 VerifyField<uint8_t>(verifier, VT_DATA_TYPE, 1) &&
2251 VerifyOffset(verifier, VT_DATA) &&
2252 VerifyConstTensorData(verifier, data(), data_type()) &&
2253 verifier.EndTable();
2254 }
2255 };
2256
2257 template<> inline const armnnSerializer::ByteData *ConstTensor::data_as<armnnSerializer::ByteData>() const {
2258 return data_as_ByteData();
2259 }
2260
2261 template<> inline const armnnSerializer::ShortData *ConstTensor::data_as<armnnSerializer::ShortData>() const {
2262 return data_as_ShortData();
2263 }
2264
2265 template<> inline const armnnSerializer::IntData *ConstTensor::data_as<armnnSerializer::IntData>() const {
2266 return data_as_IntData();
2267 }
2268
2269 template<> inline const armnnSerializer::LongData *ConstTensor::data_as<armnnSerializer::LongData>() const {
2270 return data_as_LongData();
2271 }
2272
2273 struct ConstTensorBuilder {
2274 typedef ConstTensor Table;
2275 flatbuffers::FlatBufferBuilder &fbb_;
2276 flatbuffers::uoffset_t start_;
2277 void add_info(flatbuffers::Offset<armnnSerializer::TensorInfo> info) {
2278 fbb_.AddOffset(ConstTensor::VT_INFO, info);
2279 }
2280 void add_data_type(armnnSerializer::ConstTensorData data_type) {
2281 fbb_.AddElement<uint8_t>(ConstTensor::VT_DATA_TYPE, static_cast<uint8_t>(data_type), 0);
2282 }
2283 void add_data(flatbuffers::Offset<void> data) {
2284 fbb_.AddOffset(ConstTensor::VT_DATA, data);
2285 }
2286 explicit ConstTensorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2287 : fbb_(_fbb) {
2288 start_ = fbb_.StartTable();
2289 }
2290 flatbuffers::Offset<ConstTensor> Finish() {
2291 const auto end = fbb_.EndTable(start_);
2292 auto o = flatbuffers::Offset<ConstTensor>(end);
2293 return o;
2294 }
2295 };
2296
2297 inline flatbuffers::Offset<ConstTensor> CreateConstTensor(
2298 flatbuffers::FlatBufferBuilder &_fbb,
2299 flatbuffers::Offset<armnnSerializer::TensorInfo> info = 0,
2300 armnnSerializer::ConstTensorData data_type = armnnSerializer::ConstTensorData_NONE,
2301 flatbuffers::Offset<void> data = 0) {
2302 ConstTensorBuilder builder_(_fbb);
2303 builder_.add_data(data);
2304 builder_.add_info(info);
2305 builder_.add_data_type(data_type);
2306 return builder_.Finish();
2307 }
2308
2309 struct InputSlot FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2310 typedef InputSlotBuilder Builder;
2311 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2312 VT_INDEX = 4,
2313 VT_CONNECTION = 6
2314 };
2315 uint32_t index() const {
2316 return GetField<uint32_t>(VT_INDEX, 0);
2317 }
2318 const armnnSerializer::Connection *connection() const {
2319 return GetStruct<const armnnSerializer::Connection *>(VT_CONNECTION);
2320 }
2321 bool Verify(flatbuffers::Verifier &verifier) const {
2322 return VerifyTableStart(verifier) &&
2323 VerifyField<uint32_t>(verifier, VT_INDEX, 4) &&
2324 VerifyField<armnnSerializer::Connection>(verifier, VT_CONNECTION, 4) &&
2325 verifier.EndTable();
2326 }
2327 };
2328
2329 struct InputSlotBuilder {
2330 typedef InputSlot Table;
2331 flatbuffers::FlatBufferBuilder &fbb_;
2332 flatbuffers::uoffset_t start_;
2333 void add_index(uint32_t index) {
2334 fbb_.AddElement<uint32_t>(InputSlot::VT_INDEX, index, 0);
2335 }
2336 void add_connection(const armnnSerializer::Connection *connection) {
2337 fbb_.AddStruct(InputSlot::VT_CONNECTION, connection);
2338 }
2339 explicit InputSlotBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2340 : fbb_(_fbb) {
2341 start_ = fbb_.StartTable();
2342 }
2343 flatbuffers::Offset<InputSlot> Finish() {
2344 const auto end = fbb_.EndTable(start_);
2345 auto o = flatbuffers::Offset<InputSlot>(end);
2346 return o;
2347 }
2348 };
2349
2350 inline flatbuffers::Offset<InputSlot> CreateInputSlot(
2351 flatbuffers::FlatBufferBuilder &_fbb,
2352 uint32_t index = 0,
2353 const armnnSerializer::Connection *connection = nullptr) {
2354 InputSlotBuilder builder_(_fbb);
2355 builder_.add_connection(connection);
2356 builder_.add_index(index);
2357 return builder_.Finish();
2358 }
2359
2360 struct OutputSlot FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2361 typedef OutputSlotBuilder Builder;
2362 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2363 VT_INDEX = 4,
2364 VT_TENSORINFO = 6
2365 };
2366 uint32_t index() const {
2367 return GetField<uint32_t>(VT_INDEX, 0);
2368 }
2369 const armnnSerializer::TensorInfo *tensorInfo() const {
2370 return GetPointer<const armnnSerializer::TensorInfo *>(VT_TENSORINFO);
2371 }
2372 bool Verify(flatbuffers::Verifier &verifier) const {
2373 return VerifyTableStart(verifier) &&
2374 VerifyField<uint32_t>(verifier, VT_INDEX, 4) &&
2375 VerifyOffset(verifier, VT_TENSORINFO) &&
2376 verifier.VerifyTable(tensorInfo()) &&
2377 verifier.EndTable();
2378 }
2379 };
2380
2381 struct OutputSlotBuilder {
2382 typedef OutputSlot Table;
2383 flatbuffers::FlatBufferBuilder &fbb_;
2384 flatbuffers::uoffset_t start_;
2385 void add_index(uint32_t index) {
2386 fbb_.AddElement<uint32_t>(OutputSlot::VT_INDEX, index, 0);
2387 }
2388 void add_tensorInfo(flatbuffers::Offset<armnnSerializer::TensorInfo> tensorInfo) {
2389 fbb_.AddOffset(OutputSlot::VT_TENSORINFO, tensorInfo);
2390 }
2391 explicit OutputSlotBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2392 : fbb_(_fbb) {
2393 start_ = fbb_.StartTable();
2394 }
2395 flatbuffers::Offset<OutputSlot> Finish() {
2396 const auto end = fbb_.EndTable(start_);
2397 auto o = flatbuffers::Offset<OutputSlot>(end);
2398 return o;
2399 }
2400 };
2401
2402 inline flatbuffers::Offset<OutputSlot> CreateOutputSlot(
2403 flatbuffers::FlatBufferBuilder &_fbb,
2404 uint32_t index = 0,
2405 flatbuffers::Offset<armnnSerializer::TensorInfo> tensorInfo = 0) {
2406 OutputSlotBuilder builder_(_fbb);
2407 builder_.add_tensorInfo(tensorInfo);
2408 builder_.add_index(index);
2409 return builder_.Finish();
2410 }
2411
2412 struct LayerBase FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2413 typedef LayerBaseBuilder Builder;
2414 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2415 VT_INDEX = 4,
2416 VT_LAYERNAME = 6,
2417 VT_LAYERTYPE = 8,
2418 VT_INPUTSLOTS = 10,
2419 VT_OUTPUTSLOTS = 12
2420 };
2421 uint32_t index() const {
2422 return GetField<uint32_t>(VT_INDEX, 0);
2423 }
2424 const flatbuffers::String *layerName() const {
2425 return GetPointer<const flatbuffers::String *>(VT_LAYERNAME);
2426 }
2427 armnnSerializer::LayerType layerType() const {
2428 return static_cast<armnnSerializer::LayerType>(GetField<uint32_t>(VT_LAYERTYPE, 0));
2429 }
2430 const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::InputSlot>> *inputSlots() const {
2431 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::InputSlot>> *>(VT_INPUTSLOTS);
2432 }
2433 const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::OutputSlot>> *outputSlots() const {
2434 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::OutputSlot>> *>(VT_OUTPUTSLOTS);
2435 }
2436 bool Verify(flatbuffers::Verifier &verifier) const {
2437 return VerifyTableStart(verifier) &&
2438 VerifyField<uint32_t>(verifier, VT_INDEX, 4) &&
2439 VerifyOffset(verifier, VT_LAYERNAME) &&
2440 verifier.VerifyString(layerName()) &&
2441 VerifyField<uint32_t>(verifier, VT_LAYERTYPE, 4) &&
2442 VerifyOffset(verifier, VT_INPUTSLOTS) &&
2443 verifier.VerifyVector(inputSlots()) &&
2444 verifier.VerifyVectorOfTables(inputSlots()) &&
2445 VerifyOffset(verifier, VT_OUTPUTSLOTS) &&
2446 verifier.VerifyVector(outputSlots()) &&
2447 verifier.VerifyVectorOfTables(outputSlots()) &&
2448 verifier.EndTable();
2449 }
2450 };
2451
2452 struct LayerBaseBuilder {
2453 typedef LayerBase Table;
2454 flatbuffers::FlatBufferBuilder &fbb_;
2455 flatbuffers::uoffset_t start_;
2456 void add_index(uint32_t index) {
2457 fbb_.AddElement<uint32_t>(LayerBase::VT_INDEX, index, 0);
2458 }
2459 void add_layerName(flatbuffers::Offset<flatbuffers::String> layerName) {
2460 fbb_.AddOffset(LayerBase::VT_LAYERNAME, layerName);
2461 }
2462 void add_layerType(armnnSerializer::LayerType layerType) {
2463 fbb_.AddElement<uint32_t>(LayerBase::VT_LAYERTYPE, static_cast<uint32_t>(layerType), 0);
2464 }
2465 void add_inputSlots(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::InputSlot>>> inputSlots) {
2466 fbb_.AddOffset(LayerBase::VT_INPUTSLOTS, inputSlots);
2467 }
2468 void add_outputSlots(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::OutputSlot>>> outputSlots) {
2469 fbb_.AddOffset(LayerBase::VT_OUTPUTSLOTS, outputSlots);
2470 }
2471 explicit LayerBaseBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2472 : fbb_(_fbb) {
2473 start_ = fbb_.StartTable();
2474 }
2475 flatbuffers::Offset<LayerBase> Finish() {
2476 const auto end = fbb_.EndTable(start_);
2477 auto o = flatbuffers::Offset<LayerBase>(end);
2478 return o;
2479 }
2480 };
2481
2482 inline flatbuffers::Offset<LayerBase> CreateLayerBase(
2483 flatbuffers::FlatBufferBuilder &_fbb,
2484 uint32_t index = 0,
2485 flatbuffers::Offset<flatbuffers::String> layerName = 0,
2486 armnnSerializer::LayerType layerType = armnnSerializer::LayerType_Addition,
2487 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::InputSlot>>> inputSlots = 0,
2488 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::OutputSlot>>> outputSlots = 0) {
2489 LayerBaseBuilder builder_(_fbb);
2490 builder_.add_outputSlots(outputSlots);
2491 builder_.add_inputSlots(inputSlots);
2492 builder_.add_layerType(layerType);
2493 builder_.add_layerName(layerName);
2494 builder_.add_index(index);
2495 return builder_.Finish();
2496 }
2497
2498 inline flatbuffers::Offset<LayerBase> CreateLayerBaseDirect(
2499 flatbuffers::FlatBufferBuilder &_fbb,
2500 uint32_t index = 0,
2501 const char *layerName = nullptr,
2502 armnnSerializer::LayerType layerType = armnnSerializer::LayerType_Addition,
2503 const std::vector<flatbuffers::Offset<armnnSerializer::InputSlot>> *inputSlots = nullptr,
2504 const std::vector<flatbuffers::Offset<armnnSerializer::OutputSlot>> *outputSlots = nullptr) {
2505 auto layerName__ = layerName ? _fbb.CreateString(layerName) : 0;
2506 auto inputSlots__ = inputSlots ? _fbb.CreateVector<flatbuffers::Offset<armnnSerializer::InputSlot>>(*inputSlots) : 0;
2507 auto outputSlots__ = outputSlots ? _fbb.CreateVector<flatbuffers::Offset<armnnSerializer::OutputSlot>>(*outputSlots) : 0;
2508 return armnnSerializer::CreateLayerBase(
2509 _fbb,
2510 index,
2511 layerName__,
2512 layerType,
2513 inputSlots__,
2514 outputSlots__);
2515 }
2516
2517 struct BindableLayerBase FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2518 typedef BindableLayerBaseBuilder Builder;
2519 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2520 VT_BASE = 4,
2521 VT_LAYERBINDINGID = 6
2522 };
2523 const armnnSerializer::LayerBase *base() const {
2524 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
2525 }
2526 int32_t layerBindingId() const {
2527 return GetField<int32_t>(VT_LAYERBINDINGID, 0);
2528 }
2529 bool Verify(flatbuffers::Verifier &verifier) const {
2530 return VerifyTableStart(verifier) &&
2531 VerifyOffset(verifier, VT_BASE) &&
2532 verifier.VerifyTable(base()) &&
2533 VerifyField<int32_t>(verifier, VT_LAYERBINDINGID, 4) &&
2534 verifier.EndTable();
2535 }
2536 };
2537
2538 struct BindableLayerBaseBuilder {
2539 typedef BindableLayerBase Table;
2540 flatbuffers::FlatBufferBuilder &fbb_;
2541 flatbuffers::uoffset_t start_;
2542 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
2543 fbb_.AddOffset(BindableLayerBase::VT_BASE, base);
2544 }
2545 void add_layerBindingId(int32_t layerBindingId) {
2546 fbb_.AddElement<int32_t>(BindableLayerBase::VT_LAYERBINDINGID, layerBindingId, 0);
2547 }
2548 explicit BindableLayerBaseBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2549 : fbb_(_fbb) {
2550 start_ = fbb_.StartTable();
2551 }
2552 flatbuffers::Offset<BindableLayerBase> Finish() {
2553 const auto end = fbb_.EndTable(start_);
2554 auto o = flatbuffers::Offset<BindableLayerBase>(end);
2555 return o;
2556 }
2557 };
2558
2559 inline flatbuffers::Offset<BindableLayerBase> CreateBindableLayerBase(
2560 flatbuffers::FlatBufferBuilder &_fbb,
2561 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
2562 int32_t layerBindingId = 0) {
2563 BindableLayerBaseBuilder builder_(_fbb);
2564 builder_.add_layerBindingId(layerBindingId);
2565 builder_.add_base(base);
2566 return builder_.Finish();
2567 }
2568
2569 /// @deprecated Use ElementwiseUnaryLayer instead
2570 struct AbsLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2571 typedef AbsLayerBuilder Builder;
2572 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2573 VT_BASE = 4
2574 };
2575 const armnnSerializer::LayerBase *base() const {
2576 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
2577 }
2578 bool Verify(flatbuffers::Verifier &verifier) const {
2579 return VerifyTableStart(verifier) &&
2580 VerifyOffset(verifier, VT_BASE) &&
2581 verifier.VerifyTable(base()) &&
2582 verifier.EndTable();
2583 }
2584 };
2585
2586 struct AbsLayerBuilder {
2587 typedef AbsLayer Table;
2588 flatbuffers::FlatBufferBuilder &fbb_;
2589 flatbuffers::uoffset_t start_;
2590 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
2591 fbb_.AddOffset(AbsLayer::VT_BASE, base);
2592 }
2593 explicit AbsLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2594 : fbb_(_fbb) {
2595 start_ = fbb_.StartTable();
2596 }
2597 flatbuffers::Offset<AbsLayer> Finish() {
2598 const auto end = fbb_.EndTable(start_);
2599 auto o = flatbuffers::Offset<AbsLayer>(end);
2600 return o;
2601 }
2602 };
2603
2604 inline flatbuffers::Offset<AbsLayer> CreateAbsLayer(
2605 flatbuffers::FlatBufferBuilder &_fbb,
2606 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
2607 AbsLayerBuilder builder_(_fbb);
2608 builder_.add_base(base);
2609 return builder_.Finish();
2610 }
2611
2612 struct ActivationLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2613 typedef ActivationLayerBuilder Builder;
2614 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2615 VT_BASE = 4,
2616 VT_DESCRIPTOR = 6
2617 };
2618 const armnnSerializer::LayerBase *base() const {
2619 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
2620 }
2621 const armnnSerializer::ActivationDescriptor *descriptor() const {
2622 return GetPointer<const armnnSerializer::ActivationDescriptor *>(VT_DESCRIPTOR);
2623 }
2624 bool Verify(flatbuffers::Verifier &verifier) const {
2625 return VerifyTableStart(verifier) &&
2626 VerifyOffset(verifier, VT_BASE) &&
2627 verifier.VerifyTable(base()) &&
2628 VerifyOffset(verifier, VT_DESCRIPTOR) &&
2629 verifier.VerifyTable(descriptor()) &&
2630 verifier.EndTable();
2631 }
2632 };
2633
2634 struct ActivationLayerBuilder {
2635 typedef ActivationLayer Table;
2636 flatbuffers::FlatBufferBuilder &fbb_;
2637 flatbuffers::uoffset_t start_;
2638 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
2639 fbb_.AddOffset(ActivationLayer::VT_BASE, base);
2640 }
2641 void add_descriptor(flatbuffers::Offset<armnnSerializer::ActivationDescriptor> descriptor) {
2642 fbb_.AddOffset(ActivationLayer::VT_DESCRIPTOR, descriptor);
2643 }
2644 explicit ActivationLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2645 : fbb_(_fbb) {
2646 start_ = fbb_.StartTable();
2647 }
2648 flatbuffers::Offset<ActivationLayer> Finish() {
2649 const auto end = fbb_.EndTable(start_);
2650 auto o = flatbuffers::Offset<ActivationLayer>(end);
2651 return o;
2652 }
2653 };
2654
2655 inline flatbuffers::Offset<ActivationLayer> CreateActivationLayer(
2656 flatbuffers::FlatBufferBuilder &_fbb,
2657 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
2658 flatbuffers::Offset<armnnSerializer::ActivationDescriptor> descriptor = 0) {
2659 ActivationLayerBuilder builder_(_fbb);
2660 builder_.add_descriptor(descriptor);
2661 builder_.add_base(base);
2662 return builder_.Finish();
2663 }
2664
2665 struct ActivationDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2666 typedef ActivationDescriptorBuilder Builder;
2667 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2668 VT_ACTIVATIONFUNCTION = 4,
2669 VT_A = 6,
2670 VT_B = 8
2671 };
2672 armnnSerializer::ActivationFunction activationFunction() const {
2673 return static_cast<armnnSerializer::ActivationFunction>(GetField<int8_t>(VT_ACTIVATIONFUNCTION, 0));
2674 }
2675 float a() const {
2676 return GetField<float>(VT_A, 0.0f);
2677 }
2678 float b() const {
2679 return GetField<float>(VT_B, 0.0f);
2680 }
2681 bool Verify(flatbuffers::Verifier &verifier) const {
2682 return VerifyTableStart(verifier) &&
2683 VerifyField<int8_t>(verifier, VT_ACTIVATIONFUNCTION, 1) &&
2684 VerifyField<float>(verifier, VT_A, 4) &&
2685 VerifyField<float>(verifier, VT_B, 4) &&
2686 verifier.EndTable();
2687 }
2688 };
2689
2690 struct ActivationDescriptorBuilder {
2691 typedef ActivationDescriptor Table;
2692 flatbuffers::FlatBufferBuilder &fbb_;
2693 flatbuffers::uoffset_t start_;
2694 void add_activationFunction(armnnSerializer::ActivationFunction activationFunction) {
2695 fbb_.AddElement<int8_t>(ActivationDescriptor::VT_ACTIVATIONFUNCTION, static_cast<int8_t>(activationFunction), 0);
2696 }
2697 void add_a(float a) {
2698 fbb_.AddElement<float>(ActivationDescriptor::VT_A, a, 0.0f);
2699 }
2700 void add_b(float b) {
2701 fbb_.AddElement<float>(ActivationDescriptor::VT_B, b, 0.0f);
2702 }
2703 explicit ActivationDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2704 : fbb_(_fbb) {
2705 start_ = fbb_.StartTable();
2706 }
2707 flatbuffers::Offset<ActivationDescriptor> Finish() {
2708 const auto end = fbb_.EndTable(start_);
2709 auto o = flatbuffers::Offset<ActivationDescriptor>(end);
2710 return o;
2711 }
2712 };
2713
2714 inline flatbuffers::Offset<ActivationDescriptor> CreateActivationDescriptor(
2715 flatbuffers::FlatBufferBuilder &_fbb,
2716 armnnSerializer::ActivationFunction activationFunction = armnnSerializer::ActivationFunction_Sigmoid,
2717 float a = 0.0f,
2718 float b = 0.0f) {
2719 ActivationDescriptorBuilder builder_(_fbb);
2720 builder_.add_b(b);
2721 builder_.add_a(a);
2722 builder_.add_activationFunction(activationFunction);
2723 return builder_.Finish();
2724 }
2725
2726 struct AdditionLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2727 typedef AdditionLayerBuilder Builder;
2728 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2729 VT_BASE = 4
2730 };
2731 const armnnSerializer::LayerBase *base() const {
2732 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
2733 }
2734 bool Verify(flatbuffers::Verifier &verifier) const {
2735 return VerifyTableStart(verifier) &&
2736 VerifyOffset(verifier, VT_BASE) &&
2737 verifier.VerifyTable(base()) &&
2738 verifier.EndTable();
2739 }
2740 };
2741
2742 struct AdditionLayerBuilder {
2743 typedef AdditionLayer Table;
2744 flatbuffers::FlatBufferBuilder &fbb_;
2745 flatbuffers::uoffset_t start_;
2746 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
2747 fbb_.AddOffset(AdditionLayer::VT_BASE, base);
2748 }
2749 explicit AdditionLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2750 : fbb_(_fbb) {
2751 start_ = fbb_.StartTable();
2752 }
2753 flatbuffers::Offset<AdditionLayer> Finish() {
2754 const auto end = fbb_.EndTable(start_);
2755 auto o = flatbuffers::Offset<AdditionLayer>(end);
2756 return o;
2757 }
2758 };
2759
2760 inline flatbuffers::Offset<AdditionLayer> CreateAdditionLayer(
2761 flatbuffers::FlatBufferBuilder &_fbb,
2762 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
2763 AdditionLayerBuilder builder_(_fbb);
2764 builder_.add_base(base);
2765 return builder_.Finish();
2766 }
2767
2768 struct ArgMinMaxLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2769 typedef ArgMinMaxLayerBuilder Builder;
2770 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2771 VT_BASE = 4,
2772 VT_DESCRIPTOR = 6
2773 };
2774 const armnnSerializer::LayerBase *base() const {
2775 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
2776 }
2777 const armnnSerializer::ArgMinMaxDescriptor *descriptor() const {
2778 return GetPointer<const armnnSerializer::ArgMinMaxDescriptor *>(VT_DESCRIPTOR);
2779 }
2780 bool Verify(flatbuffers::Verifier &verifier) const {
2781 return VerifyTableStart(verifier) &&
2782 VerifyOffset(verifier, VT_BASE) &&
2783 verifier.VerifyTable(base()) &&
2784 VerifyOffset(verifier, VT_DESCRIPTOR) &&
2785 verifier.VerifyTable(descriptor()) &&
2786 verifier.EndTable();
2787 }
2788 };
2789
2790 struct ArgMinMaxLayerBuilder {
2791 typedef ArgMinMaxLayer Table;
2792 flatbuffers::FlatBufferBuilder &fbb_;
2793 flatbuffers::uoffset_t start_;
2794 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
2795 fbb_.AddOffset(ArgMinMaxLayer::VT_BASE, base);
2796 }
2797 void add_descriptor(flatbuffers::Offset<armnnSerializer::ArgMinMaxDescriptor> descriptor) {
2798 fbb_.AddOffset(ArgMinMaxLayer::VT_DESCRIPTOR, descriptor);
2799 }
2800 explicit ArgMinMaxLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2801 : fbb_(_fbb) {
2802 start_ = fbb_.StartTable();
2803 }
2804 flatbuffers::Offset<ArgMinMaxLayer> Finish() {
2805 const auto end = fbb_.EndTable(start_);
2806 auto o = flatbuffers::Offset<ArgMinMaxLayer>(end);
2807 return o;
2808 }
2809 };
2810
2811 inline flatbuffers::Offset<ArgMinMaxLayer> CreateArgMinMaxLayer(
2812 flatbuffers::FlatBufferBuilder &_fbb,
2813 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
2814 flatbuffers::Offset<armnnSerializer::ArgMinMaxDescriptor> descriptor = 0) {
2815 ArgMinMaxLayerBuilder builder_(_fbb);
2816 builder_.add_descriptor(descriptor);
2817 builder_.add_base(base);
2818 return builder_.Finish();
2819 }
2820
2821 struct ArgMinMaxDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2822 typedef ArgMinMaxDescriptorBuilder Builder;
2823 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2824 VT_ARGMINMAXFUNCTION = 4,
2825 VT_AXIS = 6
2826 };
2827 armnnSerializer::ArgMinMaxFunction argMinMaxFunction() const {
2828 return static_cast<armnnSerializer::ArgMinMaxFunction>(GetField<int8_t>(VT_ARGMINMAXFUNCTION, 0));
2829 }
2830 int32_t axis() const {
2831 return GetField<int32_t>(VT_AXIS, 0);
2832 }
2833 bool Verify(flatbuffers::Verifier &verifier) const {
2834 return VerifyTableStart(verifier) &&
2835 VerifyField<int8_t>(verifier, VT_ARGMINMAXFUNCTION, 1) &&
2836 VerifyField<int32_t>(verifier, VT_AXIS, 4) &&
2837 verifier.EndTable();
2838 }
2839 };
2840
2841 struct ArgMinMaxDescriptorBuilder {
2842 typedef ArgMinMaxDescriptor Table;
2843 flatbuffers::FlatBufferBuilder &fbb_;
2844 flatbuffers::uoffset_t start_;
2845 void add_argMinMaxFunction(armnnSerializer::ArgMinMaxFunction argMinMaxFunction) {
2846 fbb_.AddElement<int8_t>(ArgMinMaxDescriptor::VT_ARGMINMAXFUNCTION, static_cast<int8_t>(argMinMaxFunction), 0);
2847 }
2848 void add_axis(int32_t axis) {
2849 fbb_.AddElement<int32_t>(ArgMinMaxDescriptor::VT_AXIS, axis, 0);
2850 }
2851 explicit ArgMinMaxDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2852 : fbb_(_fbb) {
2853 start_ = fbb_.StartTable();
2854 }
2855 flatbuffers::Offset<ArgMinMaxDescriptor> Finish() {
2856 const auto end = fbb_.EndTable(start_);
2857 auto o = flatbuffers::Offset<ArgMinMaxDescriptor>(end);
2858 return o;
2859 }
2860 };
2861
2862 inline flatbuffers::Offset<ArgMinMaxDescriptor> CreateArgMinMaxDescriptor(
2863 flatbuffers::FlatBufferBuilder &_fbb,
2864 armnnSerializer::ArgMinMaxFunction argMinMaxFunction = armnnSerializer::ArgMinMaxFunction_Min,
2865 int32_t axis = 0) {
2866 ArgMinMaxDescriptorBuilder builder_(_fbb);
2867 builder_.add_axis(axis);
2868 builder_.add_argMinMaxFunction(argMinMaxFunction);
2869 return builder_.Finish();
2870 }
2871
2872 struct CastLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2873 typedef CastLayerBuilder Builder;
2874 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2875 VT_BASE = 4
2876 };
2877 const armnnSerializer::LayerBase *base() const {
2878 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
2879 }
2880 bool Verify(flatbuffers::Verifier &verifier) const {
2881 return VerifyTableStart(verifier) &&
2882 VerifyOffset(verifier, VT_BASE) &&
2883 verifier.VerifyTable(base()) &&
2884 verifier.EndTable();
2885 }
2886 };
2887
2888 struct CastLayerBuilder {
2889 typedef CastLayer Table;
2890 flatbuffers::FlatBufferBuilder &fbb_;
2891 flatbuffers::uoffset_t start_;
2892 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
2893 fbb_.AddOffset(CastLayer::VT_BASE, base);
2894 }
2895 explicit CastLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2896 : fbb_(_fbb) {
2897 start_ = fbb_.StartTable();
2898 }
2899 flatbuffers::Offset<CastLayer> Finish() {
2900 const auto end = fbb_.EndTable(start_);
2901 auto o = flatbuffers::Offset<CastLayer>(end);
2902 return o;
2903 }
2904 };
2905
2906 inline flatbuffers::Offset<CastLayer> CreateCastLayer(
2907 flatbuffers::FlatBufferBuilder &_fbb,
2908 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
2909 CastLayerBuilder builder_(_fbb);
2910 builder_.add_base(base);
2911 return builder_.Finish();
2912 }
2913
2914 struct ChannelShuffleLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2915 typedef ChannelShuffleLayerBuilder Builder;
2916 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2917 VT_BASE = 4,
2918 VT_DESCRIPTOR = 6
2919 };
2920 const armnnSerializer::LayerBase *base() const {
2921 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
2922 }
2923 const armnnSerializer::ChannelShuffleDescriptor *descriptor() const {
2924 return GetPointer<const armnnSerializer::ChannelShuffleDescriptor *>(VT_DESCRIPTOR);
2925 }
2926 bool Verify(flatbuffers::Verifier &verifier) const {
2927 return VerifyTableStart(verifier) &&
2928 VerifyOffset(verifier, VT_BASE) &&
2929 verifier.VerifyTable(base()) &&
2930 VerifyOffset(verifier, VT_DESCRIPTOR) &&
2931 verifier.VerifyTable(descriptor()) &&
2932 verifier.EndTable();
2933 }
2934 };
2935
2936 struct ChannelShuffleLayerBuilder {
2937 typedef ChannelShuffleLayer Table;
2938 flatbuffers::FlatBufferBuilder &fbb_;
2939 flatbuffers::uoffset_t start_;
2940 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
2941 fbb_.AddOffset(ChannelShuffleLayer::VT_BASE, base);
2942 }
2943 void add_descriptor(flatbuffers::Offset<armnnSerializer::ChannelShuffleDescriptor> descriptor) {
2944 fbb_.AddOffset(ChannelShuffleLayer::VT_DESCRIPTOR, descriptor);
2945 }
2946 explicit ChannelShuffleLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2947 : fbb_(_fbb) {
2948 start_ = fbb_.StartTable();
2949 }
2950 flatbuffers::Offset<ChannelShuffleLayer> Finish() {
2951 const auto end = fbb_.EndTable(start_);
2952 auto o = flatbuffers::Offset<ChannelShuffleLayer>(end);
2953 return o;
2954 }
2955 };
2956
2957 inline flatbuffers::Offset<ChannelShuffleLayer> CreateChannelShuffleLayer(
2958 flatbuffers::FlatBufferBuilder &_fbb,
2959 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
2960 flatbuffers::Offset<armnnSerializer::ChannelShuffleDescriptor> descriptor = 0) {
2961 ChannelShuffleLayerBuilder builder_(_fbb);
2962 builder_.add_descriptor(descriptor);
2963 builder_.add_base(base);
2964 return builder_.Finish();
2965 }
2966
2967 struct ChannelShuffleDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
2968 typedef ChannelShuffleDescriptorBuilder Builder;
2969 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
2970 VT_AXIS = 4,
2971 VT_NUMGROUPS = 6
2972 };
2973 uint32_t axis() const {
2974 return GetField<uint32_t>(VT_AXIS, 0);
2975 }
2976 uint32_t numGroups() const {
2977 return GetField<uint32_t>(VT_NUMGROUPS, 0);
2978 }
2979 bool Verify(flatbuffers::Verifier &verifier) const {
2980 return VerifyTableStart(verifier) &&
2981 VerifyField<uint32_t>(verifier, VT_AXIS, 4) &&
2982 VerifyField<uint32_t>(verifier, VT_NUMGROUPS, 4) &&
2983 verifier.EndTable();
2984 }
2985 };
2986
2987 struct ChannelShuffleDescriptorBuilder {
2988 typedef ChannelShuffleDescriptor Table;
2989 flatbuffers::FlatBufferBuilder &fbb_;
2990 flatbuffers::uoffset_t start_;
2991 void add_axis(uint32_t axis) {
2992 fbb_.AddElement<uint32_t>(ChannelShuffleDescriptor::VT_AXIS, axis, 0);
2993 }
2994 void add_numGroups(uint32_t numGroups) {
2995 fbb_.AddElement<uint32_t>(ChannelShuffleDescriptor::VT_NUMGROUPS, numGroups, 0);
2996 }
2997 explicit ChannelShuffleDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
2998 : fbb_(_fbb) {
2999 start_ = fbb_.StartTable();
3000 }
3001 flatbuffers::Offset<ChannelShuffleDescriptor> Finish() {
3002 const auto end = fbb_.EndTable(start_);
3003 auto o = flatbuffers::Offset<ChannelShuffleDescriptor>(end);
3004 return o;
3005 }
3006 };
3007
3008 inline flatbuffers::Offset<ChannelShuffleDescriptor> CreateChannelShuffleDescriptor(
3009 flatbuffers::FlatBufferBuilder &_fbb,
3010 uint32_t axis = 0,
3011 uint32_t numGroups = 0) {
3012 ChannelShuffleDescriptorBuilder builder_(_fbb);
3013 builder_.add_numGroups(numGroups);
3014 builder_.add_axis(axis);
3015 return builder_.Finish();
3016 }
3017
3018 struct ComparisonDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3019 typedef ComparisonDescriptorBuilder Builder;
3020 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3021 VT_OPERATION = 4
3022 };
3023 armnnSerializer::ComparisonOperation operation() const {
3024 return static_cast<armnnSerializer::ComparisonOperation>(GetField<int8_t>(VT_OPERATION, 0));
3025 }
3026 bool Verify(flatbuffers::Verifier &verifier) const {
3027 return VerifyTableStart(verifier) &&
3028 VerifyField<int8_t>(verifier, VT_OPERATION, 1) &&
3029 verifier.EndTable();
3030 }
3031 };
3032
3033 struct ComparisonDescriptorBuilder {
3034 typedef ComparisonDescriptor Table;
3035 flatbuffers::FlatBufferBuilder &fbb_;
3036 flatbuffers::uoffset_t start_;
3037 void add_operation(armnnSerializer::ComparisonOperation operation) {
3038 fbb_.AddElement<int8_t>(ComparisonDescriptor::VT_OPERATION, static_cast<int8_t>(operation), 0);
3039 }
3040 explicit ComparisonDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3041 : fbb_(_fbb) {
3042 start_ = fbb_.StartTable();
3043 }
3044 flatbuffers::Offset<ComparisonDescriptor> Finish() {
3045 const auto end = fbb_.EndTable(start_);
3046 auto o = flatbuffers::Offset<ComparisonDescriptor>(end);
3047 return o;
3048 }
3049 };
3050
3051 inline flatbuffers::Offset<ComparisonDescriptor> CreateComparisonDescriptor(
3052 flatbuffers::FlatBufferBuilder &_fbb,
3053 armnnSerializer::ComparisonOperation operation = armnnSerializer::ComparisonOperation_Equal) {
3054 ComparisonDescriptorBuilder builder_(_fbb);
3055 builder_.add_operation(operation);
3056 return builder_.Finish();
3057 }
3058
3059 struct ComparisonLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3060 typedef ComparisonLayerBuilder Builder;
3061 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3062 VT_BASE = 4,
3063 VT_DESCRIPTOR = 6
3064 };
3065 const armnnSerializer::LayerBase *base() const {
3066 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3067 }
3068 const armnnSerializer::ComparisonDescriptor *descriptor() const {
3069 return GetPointer<const armnnSerializer::ComparisonDescriptor *>(VT_DESCRIPTOR);
3070 }
3071 bool Verify(flatbuffers::Verifier &verifier) const {
3072 return VerifyTableStart(verifier) &&
3073 VerifyOffset(verifier, VT_BASE) &&
3074 verifier.VerifyTable(base()) &&
3075 VerifyOffset(verifier, VT_DESCRIPTOR) &&
3076 verifier.VerifyTable(descriptor()) &&
3077 verifier.EndTable();
3078 }
3079 };
3080
3081 struct ComparisonLayerBuilder {
3082 typedef ComparisonLayer Table;
3083 flatbuffers::FlatBufferBuilder &fbb_;
3084 flatbuffers::uoffset_t start_;
3085 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3086 fbb_.AddOffset(ComparisonLayer::VT_BASE, base);
3087 }
3088 void add_descriptor(flatbuffers::Offset<armnnSerializer::ComparisonDescriptor> descriptor) {
3089 fbb_.AddOffset(ComparisonLayer::VT_DESCRIPTOR, descriptor);
3090 }
3091 explicit ComparisonLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3092 : fbb_(_fbb) {
3093 start_ = fbb_.StartTable();
3094 }
3095 flatbuffers::Offset<ComparisonLayer> Finish() {
3096 const auto end = fbb_.EndTable(start_);
3097 auto o = flatbuffers::Offset<ComparisonLayer>(end);
3098 return o;
3099 }
3100 };
3101
3102 inline flatbuffers::Offset<ComparisonLayer> CreateComparisonLayer(
3103 flatbuffers::FlatBufferBuilder &_fbb,
3104 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
3105 flatbuffers::Offset<armnnSerializer::ComparisonDescriptor> descriptor = 0) {
3106 ComparisonLayerBuilder builder_(_fbb);
3107 builder_.add_descriptor(descriptor);
3108 builder_.add_base(base);
3109 return builder_.Finish();
3110 }
3111
3112 struct ConstantLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3113 typedef ConstantLayerBuilder Builder;
3114 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3115 VT_BASE = 4,
3116 VT_INPUT = 6
3117 };
3118 const armnnSerializer::LayerBase *base() const {
3119 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3120 }
3121 const armnnSerializer::ConstTensor *input() const {
3122 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUT);
3123 }
3124 bool Verify(flatbuffers::Verifier &verifier) const {
3125 return VerifyTableStart(verifier) &&
3126 VerifyOffset(verifier, VT_BASE) &&
3127 verifier.VerifyTable(base()) &&
3128 VerifyOffset(verifier, VT_INPUT) &&
3129 verifier.VerifyTable(input()) &&
3130 verifier.EndTable();
3131 }
3132 };
3133
3134 struct ConstantLayerBuilder {
3135 typedef ConstantLayer Table;
3136 flatbuffers::FlatBufferBuilder &fbb_;
3137 flatbuffers::uoffset_t start_;
3138 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3139 fbb_.AddOffset(ConstantLayer::VT_BASE, base);
3140 }
3141 void add_input(flatbuffers::Offset<armnnSerializer::ConstTensor> input) {
3142 fbb_.AddOffset(ConstantLayer::VT_INPUT, input);
3143 }
3144 explicit ConstantLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3145 : fbb_(_fbb) {
3146 start_ = fbb_.StartTable();
3147 }
3148 flatbuffers::Offset<ConstantLayer> Finish() {
3149 const auto end = fbb_.EndTable(start_);
3150 auto o = flatbuffers::Offset<ConstantLayer>(end);
3151 return o;
3152 }
3153 };
3154
3155 inline flatbuffers::Offset<ConstantLayer> CreateConstantLayer(
3156 flatbuffers::FlatBufferBuilder &_fbb,
3157 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
3158 flatbuffers::Offset<armnnSerializer::ConstTensor> input = 0) {
3159 ConstantLayerBuilder builder_(_fbb);
3160 builder_.add_input(input);
3161 builder_.add_base(base);
3162 return builder_.Finish();
3163 }
3164
3165 struct Convolution2dLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3166 typedef Convolution2dLayerBuilder Builder;
3167 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3168 VT_BASE = 4,
3169 VT_DESCRIPTOR = 6,
3170 VT_WEIGHTS = 8,
3171 VT_BIASES = 10
3172 };
3173 const armnnSerializer::LayerBase *base() const {
3174 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3175 }
3176 const armnnSerializer::Convolution2dDescriptor *descriptor() const {
3177 return GetPointer<const armnnSerializer::Convolution2dDescriptor *>(VT_DESCRIPTOR);
3178 }
3179 const armnnSerializer::ConstTensor *weights() const {
3180 return GetPointer<const armnnSerializer::ConstTensor *>(VT_WEIGHTS);
3181 }
3182 const armnnSerializer::ConstTensor *biases() const {
3183 return GetPointer<const armnnSerializer::ConstTensor *>(VT_BIASES);
3184 }
3185 bool Verify(flatbuffers::Verifier &verifier) const {
3186 return VerifyTableStart(verifier) &&
3187 VerifyOffset(verifier, VT_BASE) &&
3188 verifier.VerifyTable(base()) &&
3189 VerifyOffset(verifier, VT_DESCRIPTOR) &&
3190 verifier.VerifyTable(descriptor()) &&
3191 VerifyOffset(verifier, VT_WEIGHTS) &&
3192 verifier.VerifyTable(weights()) &&
3193 VerifyOffset(verifier, VT_BIASES) &&
3194 verifier.VerifyTable(biases()) &&
3195 verifier.EndTable();
3196 }
3197 };
3198
3199 struct Convolution2dLayerBuilder {
3200 typedef Convolution2dLayer Table;
3201 flatbuffers::FlatBufferBuilder &fbb_;
3202 flatbuffers::uoffset_t start_;
3203 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3204 fbb_.AddOffset(Convolution2dLayer::VT_BASE, base);
3205 }
3206 void add_descriptor(flatbuffers::Offset<armnnSerializer::Convolution2dDescriptor> descriptor) {
3207 fbb_.AddOffset(Convolution2dLayer::VT_DESCRIPTOR, descriptor);
3208 }
3209 void add_weights(flatbuffers::Offset<armnnSerializer::ConstTensor> weights) {
3210 fbb_.AddOffset(Convolution2dLayer::VT_WEIGHTS, weights);
3211 }
3212 void add_biases(flatbuffers::Offset<armnnSerializer::ConstTensor> biases) {
3213 fbb_.AddOffset(Convolution2dLayer::VT_BIASES, biases);
3214 }
3215 explicit Convolution2dLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3216 : fbb_(_fbb) {
3217 start_ = fbb_.StartTable();
3218 }
3219 flatbuffers::Offset<Convolution2dLayer> Finish() {
3220 const auto end = fbb_.EndTable(start_);
3221 auto o = flatbuffers::Offset<Convolution2dLayer>(end);
3222 return o;
3223 }
3224 };
3225
3226 inline flatbuffers::Offset<Convolution2dLayer> CreateConvolution2dLayer(
3227 flatbuffers::FlatBufferBuilder &_fbb,
3228 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
3229 flatbuffers::Offset<armnnSerializer::Convolution2dDescriptor> descriptor = 0,
3230 flatbuffers::Offset<armnnSerializer::ConstTensor> weights = 0,
3231 flatbuffers::Offset<armnnSerializer::ConstTensor> biases = 0) {
3232 Convolution2dLayerBuilder builder_(_fbb);
3233 builder_.add_biases(biases);
3234 builder_.add_weights(weights);
3235 builder_.add_descriptor(descriptor);
3236 builder_.add_base(base);
3237 return builder_.Finish();
3238 }
3239
3240 struct Convolution2dDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3241 typedef Convolution2dDescriptorBuilder Builder;
3242 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3243 VT_PADLEFT = 4,
3244 VT_PADRIGHT = 6,
3245 VT_PADTOP = 8,
3246 VT_PADBOTTOM = 10,
3247 VT_STRIDEX = 12,
3248 VT_STRIDEY = 14,
3249 VT_DILATIONX = 16,
3250 VT_DILATIONY = 18,
3251 VT_BIASENABLED = 20,
3252 VT_DATALAYOUT = 22
3253 };
3254 uint32_t padLeft() const {
3255 return GetField<uint32_t>(VT_PADLEFT, 0);
3256 }
3257 uint32_t padRight() const {
3258 return GetField<uint32_t>(VT_PADRIGHT, 0);
3259 }
3260 uint32_t padTop() const {
3261 return GetField<uint32_t>(VT_PADTOP, 0);
3262 }
3263 uint32_t padBottom() const {
3264 return GetField<uint32_t>(VT_PADBOTTOM, 0);
3265 }
3266 uint32_t strideX() const {
3267 return GetField<uint32_t>(VT_STRIDEX, 0);
3268 }
3269 uint32_t strideY() const {
3270 return GetField<uint32_t>(VT_STRIDEY, 0);
3271 }
3272 uint32_t dilationX() const {
3273 return GetField<uint32_t>(VT_DILATIONX, 1);
3274 }
3275 uint32_t dilationY() const {
3276 return GetField<uint32_t>(VT_DILATIONY, 1);
3277 }
3278 bool biasEnabled() const {
3279 return GetField<uint8_t>(VT_BIASENABLED, 0) != 0;
3280 }
3281 armnnSerializer::DataLayout dataLayout() const {
3282 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 1));
3283 }
3284 bool Verify(flatbuffers::Verifier &verifier) const {
3285 return VerifyTableStart(verifier) &&
3286 VerifyField<uint32_t>(verifier, VT_PADLEFT, 4) &&
3287 VerifyField<uint32_t>(verifier, VT_PADRIGHT, 4) &&
3288 VerifyField<uint32_t>(verifier, VT_PADTOP, 4) &&
3289 VerifyField<uint32_t>(verifier, VT_PADBOTTOM, 4) &&
3290 VerifyField<uint32_t>(verifier, VT_STRIDEX, 4) &&
3291 VerifyField<uint32_t>(verifier, VT_STRIDEY, 4) &&
3292 VerifyField<uint32_t>(verifier, VT_DILATIONX, 4) &&
3293 VerifyField<uint32_t>(verifier, VT_DILATIONY, 4) &&
3294 VerifyField<uint8_t>(verifier, VT_BIASENABLED, 1) &&
3295 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
3296 verifier.EndTable();
3297 }
3298 };
3299
3300 struct Convolution2dDescriptorBuilder {
3301 typedef Convolution2dDescriptor Table;
3302 flatbuffers::FlatBufferBuilder &fbb_;
3303 flatbuffers::uoffset_t start_;
3304 void add_padLeft(uint32_t padLeft) {
3305 fbb_.AddElement<uint32_t>(Convolution2dDescriptor::VT_PADLEFT, padLeft, 0);
3306 }
3307 void add_padRight(uint32_t padRight) {
3308 fbb_.AddElement<uint32_t>(Convolution2dDescriptor::VT_PADRIGHT, padRight, 0);
3309 }
3310 void add_padTop(uint32_t padTop) {
3311 fbb_.AddElement<uint32_t>(Convolution2dDescriptor::VT_PADTOP, padTop, 0);
3312 }
3313 void add_padBottom(uint32_t padBottom) {
3314 fbb_.AddElement<uint32_t>(Convolution2dDescriptor::VT_PADBOTTOM, padBottom, 0);
3315 }
3316 void add_strideX(uint32_t strideX) {
3317 fbb_.AddElement<uint32_t>(Convolution2dDescriptor::VT_STRIDEX, strideX, 0);
3318 }
3319 void add_strideY(uint32_t strideY) {
3320 fbb_.AddElement<uint32_t>(Convolution2dDescriptor::VT_STRIDEY, strideY, 0);
3321 }
3322 void add_dilationX(uint32_t dilationX) {
3323 fbb_.AddElement<uint32_t>(Convolution2dDescriptor::VT_DILATIONX, dilationX, 1);
3324 }
3325 void add_dilationY(uint32_t dilationY) {
3326 fbb_.AddElement<uint32_t>(Convolution2dDescriptor::VT_DILATIONY, dilationY, 1);
3327 }
3328 void add_biasEnabled(bool biasEnabled) {
3329 fbb_.AddElement<uint8_t>(Convolution2dDescriptor::VT_BIASENABLED, static_cast<uint8_t>(biasEnabled), 0);
3330 }
3331 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
3332 fbb_.AddElement<int8_t>(Convolution2dDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 1);
3333 }
3334 explicit Convolution2dDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3335 : fbb_(_fbb) {
3336 start_ = fbb_.StartTable();
3337 }
3338 flatbuffers::Offset<Convolution2dDescriptor> Finish() {
3339 const auto end = fbb_.EndTable(start_);
3340 auto o = flatbuffers::Offset<Convolution2dDescriptor>(end);
3341 return o;
3342 }
3343 };
3344
3345 inline flatbuffers::Offset<Convolution2dDescriptor> CreateConvolution2dDescriptor(
3346 flatbuffers::FlatBufferBuilder &_fbb,
3347 uint32_t padLeft = 0,
3348 uint32_t padRight = 0,
3349 uint32_t padTop = 0,
3350 uint32_t padBottom = 0,
3351 uint32_t strideX = 0,
3352 uint32_t strideY = 0,
3353 uint32_t dilationX = 1,
3354 uint32_t dilationY = 1,
3355 bool biasEnabled = false,
3356 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NCHW) {
3357 Convolution2dDescriptorBuilder builder_(_fbb);
3358 builder_.add_dilationY(dilationY);
3359 builder_.add_dilationX(dilationX);
3360 builder_.add_strideY(strideY);
3361 builder_.add_strideX(strideX);
3362 builder_.add_padBottom(padBottom);
3363 builder_.add_padTop(padTop);
3364 builder_.add_padRight(padRight);
3365 builder_.add_padLeft(padLeft);
3366 builder_.add_dataLayout(dataLayout);
3367 builder_.add_biasEnabled(biasEnabled);
3368 return builder_.Finish();
3369 }
3370
3371 struct Convolution3dLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3372 typedef Convolution3dLayerBuilder Builder;
3373 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3374 VT_BASE = 4,
3375 VT_DESCRIPTOR = 6
3376 };
3377 const armnnSerializer::LayerBase *base() const {
3378 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3379 }
3380 const armnnSerializer::Convolution3dDescriptor *descriptor() const {
3381 return GetPointer<const armnnSerializer::Convolution3dDescriptor *>(VT_DESCRIPTOR);
3382 }
3383 bool Verify(flatbuffers::Verifier &verifier) const {
3384 return VerifyTableStart(verifier) &&
3385 VerifyOffset(verifier, VT_BASE) &&
3386 verifier.VerifyTable(base()) &&
3387 VerifyOffset(verifier, VT_DESCRIPTOR) &&
3388 verifier.VerifyTable(descriptor()) &&
3389 verifier.EndTable();
3390 }
3391 };
3392
3393 struct Convolution3dLayerBuilder {
3394 typedef Convolution3dLayer Table;
3395 flatbuffers::FlatBufferBuilder &fbb_;
3396 flatbuffers::uoffset_t start_;
3397 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3398 fbb_.AddOffset(Convolution3dLayer::VT_BASE, base);
3399 }
3400 void add_descriptor(flatbuffers::Offset<armnnSerializer::Convolution3dDescriptor> descriptor) {
3401 fbb_.AddOffset(Convolution3dLayer::VT_DESCRIPTOR, descriptor);
3402 }
3403 explicit Convolution3dLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3404 : fbb_(_fbb) {
3405 start_ = fbb_.StartTable();
3406 }
3407 flatbuffers::Offset<Convolution3dLayer> Finish() {
3408 const auto end = fbb_.EndTable(start_);
3409 auto o = flatbuffers::Offset<Convolution3dLayer>(end);
3410 return o;
3411 }
3412 };
3413
3414 inline flatbuffers::Offset<Convolution3dLayer> CreateConvolution3dLayer(
3415 flatbuffers::FlatBufferBuilder &_fbb,
3416 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
3417 flatbuffers::Offset<armnnSerializer::Convolution3dDescriptor> descriptor = 0) {
3418 Convolution3dLayerBuilder builder_(_fbb);
3419 builder_.add_descriptor(descriptor);
3420 builder_.add_base(base);
3421 return builder_.Finish();
3422 }
3423
3424 struct Convolution3dDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3425 typedef Convolution3dDescriptorBuilder Builder;
3426 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3427 VT_PADLEFT = 4,
3428 VT_PADRIGHT = 6,
3429 VT_PADTOP = 8,
3430 VT_PADBOTTOM = 10,
3431 VT_PADFRONT = 12,
3432 VT_PADBACK = 14,
3433 VT_STRIDEX = 16,
3434 VT_STRIDEY = 18,
3435 VT_STRIDEZ = 20,
3436 VT_DILATIONX = 22,
3437 VT_DILATIONY = 24,
3438 VT_DILATIONZ = 26,
3439 VT_BIASENABLED = 28,
3440 VT_DATALAYOUT = 30
3441 };
3442 uint32_t padLeft() const {
3443 return GetField<uint32_t>(VT_PADLEFT, 0);
3444 }
3445 uint32_t padRight() const {
3446 return GetField<uint32_t>(VT_PADRIGHT, 0);
3447 }
3448 uint32_t padTop() const {
3449 return GetField<uint32_t>(VT_PADTOP, 0);
3450 }
3451 uint32_t padBottom() const {
3452 return GetField<uint32_t>(VT_PADBOTTOM, 0);
3453 }
3454 uint32_t padFront() const {
3455 return GetField<uint32_t>(VT_PADFRONT, 0);
3456 }
3457 uint32_t padBack() const {
3458 return GetField<uint32_t>(VT_PADBACK, 0);
3459 }
3460 uint32_t strideX() const {
3461 return GetField<uint32_t>(VT_STRIDEX, 0);
3462 }
3463 uint32_t strideY() const {
3464 return GetField<uint32_t>(VT_STRIDEY, 0);
3465 }
3466 uint32_t strideZ() const {
3467 return GetField<uint32_t>(VT_STRIDEZ, 0);
3468 }
3469 uint32_t dilationX() const {
3470 return GetField<uint32_t>(VT_DILATIONX, 1);
3471 }
3472 uint32_t dilationY() const {
3473 return GetField<uint32_t>(VT_DILATIONY, 1);
3474 }
3475 uint32_t dilationZ() const {
3476 return GetField<uint32_t>(VT_DILATIONZ, 1);
3477 }
3478 bool biasEnabled() const {
3479 return GetField<uint8_t>(VT_BIASENABLED, 0) != 0;
3480 }
3481 armnnSerializer::DataLayout dataLayout() const {
3482 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 2));
3483 }
3484 bool Verify(flatbuffers::Verifier &verifier) const {
3485 return VerifyTableStart(verifier) &&
3486 VerifyField<uint32_t>(verifier, VT_PADLEFT, 4) &&
3487 VerifyField<uint32_t>(verifier, VT_PADRIGHT, 4) &&
3488 VerifyField<uint32_t>(verifier, VT_PADTOP, 4) &&
3489 VerifyField<uint32_t>(verifier, VT_PADBOTTOM, 4) &&
3490 VerifyField<uint32_t>(verifier, VT_PADFRONT, 4) &&
3491 VerifyField<uint32_t>(verifier, VT_PADBACK, 4) &&
3492 VerifyField<uint32_t>(verifier, VT_STRIDEX, 4) &&
3493 VerifyField<uint32_t>(verifier, VT_STRIDEY, 4) &&
3494 VerifyField<uint32_t>(verifier, VT_STRIDEZ, 4) &&
3495 VerifyField<uint32_t>(verifier, VT_DILATIONX, 4) &&
3496 VerifyField<uint32_t>(verifier, VT_DILATIONY, 4) &&
3497 VerifyField<uint32_t>(verifier, VT_DILATIONZ, 4) &&
3498 VerifyField<uint8_t>(verifier, VT_BIASENABLED, 1) &&
3499 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
3500 verifier.EndTable();
3501 }
3502 };
3503
3504 struct Convolution3dDescriptorBuilder {
3505 typedef Convolution3dDescriptor Table;
3506 flatbuffers::FlatBufferBuilder &fbb_;
3507 flatbuffers::uoffset_t start_;
3508 void add_padLeft(uint32_t padLeft) {
3509 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_PADLEFT, padLeft, 0);
3510 }
3511 void add_padRight(uint32_t padRight) {
3512 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_PADRIGHT, padRight, 0);
3513 }
3514 void add_padTop(uint32_t padTop) {
3515 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_PADTOP, padTop, 0);
3516 }
3517 void add_padBottom(uint32_t padBottom) {
3518 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_PADBOTTOM, padBottom, 0);
3519 }
3520 void add_padFront(uint32_t padFront) {
3521 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_PADFRONT, padFront, 0);
3522 }
3523 void add_padBack(uint32_t padBack) {
3524 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_PADBACK, padBack, 0);
3525 }
3526 void add_strideX(uint32_t strideX) {
3527 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_STRIDEX, strideX, 0);
3528 }
3529 void add_strideY(uint32_t strideY) {
3530 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_STRIDEY, strideY, 0);
3531 }
3532 void add_strideZ(uint32_t strideZ) {
3533 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_STRIDEZ, strideZ, 0);
3534 }
3535 void add_dilationX(uint32_t dilationX) {
3536 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_DILATIONX, dilationX, 1);
3537 }
3538 void add_dilationY(uint32_t dilationY) {
3539 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_DILATIONY, dilationY, 1);
3540 }
3541 void add_dilationZ(uint32_t dilationZ) {
3542 fbb_.AddElement<uint32_t>(Convolution3dDescriptor::VT_DILATIONZ, dilationZ, 1);
3543 }
3544 void add_biasEnabled(bool biasEnabled) {
3545 fbb_.AddElement<uint8_t>(Convolution3dDescriptor::VT_BIASENABLED, static_cast<uint8_t>(biasEnabled), 0);
3546 }
3547 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
3548 fbb_.AddElement<int8_t>(Convolution3dDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 2);
3549 }
3550 explicit Convolution3dDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3551 : fbb_(_fbb) {
3552 start_ = fbb_.StartTable();
3553 }
3554 flatbuffers::Offset<Convolution3dDescriptor> Finish() {
3555 const auto end = fbb_.EndTable(start_);
3556 auto o = flatbuffers::Offset<Convolution3dDescriptor>(end);
3557 return o;
3558 }
3559 };
3560
3561 inline flatbuffers::Offset<Convolution3dDescriptor> CreateConvolution3dDescriptor(
3562 flatbuffers::FlatBufferBuilder &_fbb,
3563 uint32_t padLeft = 0,
3564 uint32_t padRight = 0,
3565 uint32_t padTop = 0,
3566 uint32_t padBottom = 0,
3567 uint32_t padFront = 0,
3568 uint32_t padBack = 0,
3569 uint32_t strideX = 0,
3570 uint32_t strideY = 0,
3571 uint32_t strideZ = 0,
3572 uint32_t dilationX = 1,
3573 uint32_t dilationY = 1,
3574 uint32_t dilationZ = 1,
3575 bool biasEnabled = false,
3576 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NDHWC) {
3577 Convolution3dDescriptorBuilder builder_(_fbb);
3578 builder_.add_dilationZ(dilationZ);
3579 builder_.add_dilationY(dilationY);
3580 builder_.add_dilationX(dilationX);
3581 builder_.add_strideZ(strideZ);
3582 builder_.add_strideY(strideY);
3583 builder_.add_strideX(strideX);
3584 builder_.add_padBack(padBack);
3585 builder_.add_padFront(padFront);
3586 builder_.add_padBottom(padBottom);
3587 builder_.add_padTop(padTop);
3588 builder_.add_padRight(padRight);
3589 builder_.add_padLeft(padLeft);
3590 builder_.add_dataLayout(dataLayout);
3591 builder_.add_biasEnabled(biasEnabled);
3592 return builder_.Finish();
3593 }
3594
3595 struct DepthToSpaceLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3596 typedef DepthToSpaceLayerBuilder Builder;
3597 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3598 VT_BASE = 4,
3599 VT_DESCRIPTOR = 6
3600 };
3601 const armnnSerializer::LayerBase *base() const {
3602 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3603 }
3604 const armnnSerializer::DepthToSpaceDescriptor *descriptor() const {
3605 return GetPointer<const armnnSerializer::DepthToSpaceDescriptor *>(VT_DESCRIPTOR);
3606 }
3607 bool Verify(flatbuffers::Verifier &verifier) const {
3608 return VerifyTableStart(verifier) &&
3609 VerifyOffset(verifier, VT_BASE) &&
3610 verifier.VerifyTable(base()) &&
3611 VerifyOffset(verifier, VT_DESCRIPTOR) &&
3612 verifier.VerifyTable(descriptor()) &&
3613 verifier.EndTable();
3614 }
3615 };
3616
3617 struct DepthToSpaceLayerBuilder {
3618 typedef DepthToSpaceLayer Table;
3619 flatbuffers::FlatBufferBuilder &fbb_;
3620 flatbuffers::uoffset_t start_;
3621 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3622 fbb_.AddOffset(DepthToSpaceLayer::VT_BASE, base);
3623 }
3624 void add_descriptor(flatbuffers::Offset<armnnSerializer::DepthToSpaceDescriptor> descriptor) {
3625 fbb_.AddOffset(DepthToSpaceLayer::VT_DESCRIPTOR, descriptor);
3626 }
3627 explicit DepthToSpaceLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3628 : fbb_(_fbb) {
3629 start_ = fbb_.StartTable();
3630 }
3631 flatbuffers::Offset<DepthToSpaceLayer> Finish() {
3632 const auto end = fbb_.EndTable(start_);
3633 auto o = flatbuffers::Offset<DepthToSpaceLayer>(end);
3634 return o;
3635 }
3636 };
3637
3638 inline flatbuffers::Offset<DepthToSpaceLayer> CreateDepthToSpaceLayer(
3639 flatbuffers::FlatBufferBuilder &_fbb,
3640 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
3641 flatbuffers::Offset<armnnSerializer::DepthToSpaceDescriptor> descriptor = 0) {
3642 DepthToSpaceLayerBuilder builder_(_fbb);
3643 builder_.add_descriptor(descriptor);
3644 builder_.add_base(base);
3645 return builder_.Finish();
3646 }
3647
3648 struct DepthToSpaceDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3649 typedef DepthToSpaceDescriptorBuilder Builder;
3650 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3651 VT_BLOCKSIZE = 4,
3652 VT_DATALAYOUT = 6
3653 };
3654 uint32_t blockSize() const {
3655 return GetField<uint32_t>(VT_BLOCKSIZE, 0);
3656 }
3657 armnnSerializer::DataLayout dataLayout() const {
3658 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
3659 }
3660 bool Verify(flatbuffers::Verifier &verifier) const {
3661 return VerifyTableStart(verifier) &&
3662 VerifyField<uint32_t>(verifier, VT_BLOCKSIZE, 4) &&
3663 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
3664 verifier.EndTable();
3665 }
3666 };
3667
3668 struct DepthToSpaceDescriptorBuilder {
3669 typedef DepthToSpaceDescriptor Table;
3670 flatbuffers::FlatBufferBuilder &fbb_;
3671 flatbuffers::uoffset_t start_;
3672 void add_blockSize(uint32_t blockSize) {
3673 fbb_.AddElement<uint32_t>(DepthToSpaceDescriptor::VT_BLOCKSIZE, blockSize, 0);
3674 }
3675 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
3676 fbb_.AddElement<int8_t>(DepthToSpaceDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
3677 }
3678 explicit DepthToSpaceDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3679 : fbb_(_fbb) {
3680 start_ = fbb_.StartTable();
3681 }
3682 flatbuffers::Offset<DepthToSpaceDescriptor> Finish() {
3683 const auto end = fbb_.EndTable(start_);
3684 auto o = flatbuffers::Offset<DepthToSpaceDescriptor>(end);
3685 return o;
3686 }
3687 };
3688
3689 inline flatbuffers::Offset<DepthToSpaceDescriptor> CreateDepthToSpaceDescriptor(
3690 flatbuffers::FlatBufferBuilder &_fbb,
3691 uint32_t blockSize = 0,
3692 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
3693 DepthToSpaceDescriptorBuilder builder_(_fbb);
3694 builder_.add_blockSize(blockSize);
3695 builder_.add_dataLayout(dataLayout);
3696 return builder_.Finish();
3697 }
3698
3699 struct DivisionLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3700 typedef DivisionLayerBuilder Builder;
3701 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3702 VT_BASE = 4
3703 };
3704 const armnnSerializer::LayerBase *base() const {
3705 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3706 }
3707 bool Verify(flatbuffers::Verifier &verifier) const {
3708 return VerifyTableStart(verifier) &&
3709 VerifyOffset(verifier, VT_BASE) &&
3710 verifier.VerifyTable(base()) &&
3711 verifier.EndTable();
3712 }
3713 };
3714
3715 struct DivisionLayerBuilder {
3716 typedef DivisionLayer Table;
3717 flatbuffers::FlatBufferBuilder &fbb_;
3718 flatbuffers::uoffset_t start_;
3719 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3720 fbb_.AddOffset(DivisionLayer::VT_BASE, base);
3721 }
3722 explicit DivisionLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3723 : fbb_(_fbb) {
3724 start_ = fbb_.StartTable();
3725 }
3726 flatbuffers::Offset<DivisionLayer> Finish() {
3727 const auto end = fbb_.EndTable(start_);
3728 auto o = flatbuffers::Offset<DivisionLayer>(end);
3729 return o;
3730 }
3731 };
3732
3733 inline flatbuffers::Offset<DivisionLayer> CreateDivisionLayer(
3734 flatbuffers::FlatBufferBuilder &_fbb,
3735 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
3736 DivisionLayerBuilder builder_(_fbb);
3737 builder_.add_base(base);
3738 return builder_.Finish();
3739 }
3740
3741 struct ElementwiseBinaryDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3742 typedef ElementwiseBinaryDescriptorBuilder Builder;
3743 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3744 VT_OPERATION = 4
3745 };
3746 armnnSerializer::BinaryOperation operation() const {
3747 return static_cast<armnnSerializer::BinaryOperation>(GetField<int8_t>(VT_OPERATION, 0));
3748 }
3749 bool Verify(flatbuffers::Verifier &verifier) const {
3750 return VerifyTableStart(verifier) &&
3751 VerifyField<int8_t>(verifier, VT_OPERATION, 1) &&
3752 verifier.EndTable();
3753 }
3754 };
3755
3756 struct ElementwiseBinaryDescriptorBuilder {
3757 typedef ElementwiseBinaryDescriptor Table;
3758 flatbuffers::FlatBufferBuilder &fbb_;
3759 flatbuffers::uoffset_t start_;
3760 void add_operation(armnnSerializer::BinaryOperation operation) {
3761 fbb_.AddElement<int8_t>(ElementwiseBinaryDescriptor::VT_OPERATION, static_cast<int8_t>(operation), 0);
3762 }
3763 explicit ElementwiseBinaryDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3764 : fbb_(_fbb) {
3765 start_ = fbb_.StartTable();
3766 }
3767 flatbuffers::Offset<ElementwiseBinaryDescriptor> Finish() {
3768 const auto end = fbb_.EndTable(start_);
3769 auto o = flatbuffers::Offset<ElementwiseBinaryDescriptor>(end);
3770 return o;
3771 }
3772 };
3773
3774 inline flatbuffers::Offset<ElementwiseBinaryDescriptor> CreateElementwiseBinaryDescriptor(
3775 flatbuffers::FlatBufferBuilder &_fbb,
3776 armnnSerializer::BinaryOperation operation = armnnSerializer::BinaryOperation_Add) {
3777 ElementwiseBinaryDescriptorBuilder builder_(_fbb);
3778 builder_.add_operation(operation);
3779 return builder_.Finish();
3780 }
3781
3782 struct ElementwiseBinaryLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3783 typedef ElementwiseBinaryLayerBuilder Builder;
3784 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3785 VT_BASE = 4,
3786 VT_DESCRIPTOR = 6
3787 };
3788 const armnnSerializer::LayerBase *base() const {
3789 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3790 }
3791 const armnnSerializer::ElementwiseBinaryDescriptor *descriptor() const {
3792 return GetPointer<const armnnSerializer::ElementwiseBinaryDescriptor *>(VT_DESCRIPTOR);
3793 }
3794 bool Verify(flatbuffers::Verifier &verifier) const {
3795 return VerifyTableStart(verifier) &&
3796 VerifyOffset(verifier, VT_BASE) &&
3797 verifier.VerifyTable(base()) &&
3798 VerifyOffset(verifier, VT_DESCRIPTOR) &&
3799 verifier.VerifyTable(descriptor()) &&
3800 verifier.EndTable();
3801 }
3802 };
3803
3804 struct ElementwiseBinaryLayerBuilder {
3805 typedef ElementwiseBinaryLayer Table;
3806 flatbuffers::FlatBufferBuilder &fbb_;
3807 flatbuffers::uoffset_t start_;
3808 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3809 fbb_.AddOffset(ElementwiseBinaryLayer::VT_BASE, base);
3810 }
3811 void add_descriptor(flatbuffers::Offset<armnnSerializer::ElementwiseBinaryDescriptor> descriptor) {
3812 fbb_.AddOffset(ElementwiseBinaryLayer::VT_DESCRIPTOR, descriptor);
3813 }
3814 explicit ElementwiseBinaryLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3815 : fbb_(_fbb) {
3816 start_ = fbb_.StartTable();
3817 }
3818 flatbuffers::Offset<ElementwiseBinaryLayer> Finish() {
3819 const auto end = fbb_.EndTable(start_);
3820 auto o = flatbuffers::Offset<ElementwiseBinaryLayer>(end);
3821 return o;
3822 }
3823 };
3824
3825 inline flatbuffers::Offset<ElementwiseBinaryLayer> CreateElementwiseBinaryLayer(
3826 flatbuffers::FlatBufferBuilder &_fbb,
3827 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
3828 flatbuffers::Offset<armnnSerializer::ElementwiseBinaryDescriptor> descriptor = 0) {
3829 ElementwiseBinaryLayerBuilder builder_(_fbb);
3830 builder_.add_descriptor(descriptor);
3831 builder_.add_base(base);
3832 return builder_.Finish();
3833 }
3834
3835 struct ElementwiseUnaryDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3836 typedef ElementwiseUnaryDescriptorBuilder Builder;
3837 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3838 VT_OPERATION = 4
3839 };
3840 armnnSerializer::UnaryOperation operation() const {
3841 return static_cast<armnnSerializer::UnaryOperation>(GetField<int8_t>(VT_OPERATION, 0));
3842 }
3843 bool Verify(flatbuffers::Verifier &verifier) const {
3844 return VerifyTableStart(verifier) &&
3845 VerifyField<int8_t>(verifier, VT_OPERATION, 1) &&
3846 verifier.EndTable();
3847 }
3848 };
3849
3850 struct ElementwiseUnaryDescriptorBuilder {
3851 typedef ElementwiseUnaryDescriptor Table;
3852 flatbuffers::FlatBufferBuilder &fbb_;
3853 flatbuffers::uoffset_t start_;
3854 void add_operation(armnnSerializer::UnaryOperation operation) {
3855 fbb_.AddElement<int8_t>(ElementwiseUnaryDescriptor::VT_OPERATION, static_cast<int8_t>(operation), 0);
3856 }
3857 explicit ElementwiseUnaryDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3858 : fbb_(_fbb) {
3859 start_ = fbb_.StartTable();
3860 }
3861 flatbuffers::Offset<ElementwiseUnaryDescriptor> Finish() {
3862 const auto end = fbb_.EndTable(start_);
3863 auto o = flatbuffers::Offset<ElementwiseUnaryDescriptor>(end);
3864 return o;
3865 }
3866 };
3867
3868 inline flatbuffers::Offset<ElementwiseUnaryDescriptor> CreateElementwiseUnaryDescriptor(
3869 flatbuffers::FlatBufferBuilder &_fbb,
3870 armnnSerializer::UnaryOperation operation = armnnSerializer::UnaryOperation_Abs) {
3871 ElementwiseUnaryDescriptorBuilder builder_(_fbb);
3872 builder_.add_operation(operation);
3873 return builder_.Finish();
3874 }
3875
3876 struct ElementwiseUnaryLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3877 typedef ElementwiseUnaryLayerBuilder Builder;
3878 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3879 VT_BASE = 4,
3880 VT_DESCRIPTOR = 6
3881 };
3882 const armnnSerializer::LayerBase *base() const {
3883 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3884 }
3885 const armnnSerializer::ElementwiseUnaryDescriptor *descriptor() const {
3886 return GetPointer<const armnnSerializer::ElementwiseUnaryDescriptor *>(VT_DESCRIPTOR);
3887 }
3888 bool Verify(flatbuffers::Verifier &verifier) const {
3889 return VerifyTableStart(verifier) &&
3890 VerifyOffset(verifier, VT_BASE) &&
3891 verifier.VerifyTable(base()) &&
3892 VerifyOffset(verifier, VT_DESCRIPTOR) &&
3893 verifier.VerifyTable(descriptor()) &&
3894 verifier.EndTable();
3895 }
3896 };
3897
3898 struct ElementwiseUnaryLayerBuilder {
3899 typedef ElementwiseUnaryLayer Table;
3900 flatbuffers::FlatBufferBuilder &fbb_;
3901 flatbuffers::uoffset_t start_;
3902 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3903 fbb_.AddOffset(ElementwiseUnaryLayer::VT_BASE, base);
3904 }
3905 void add_descriptor(flatbuffers::Offset<armnnSerializer::ElementwiseUnaryDescriptor> descriptor) {
3906 fbb_.AddOffset(ElementwiseUnaryLayer::VT_DESCRIPTOR, descriptor);
3907 }
3908 explicit ElementwiseUnaryLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3909 : fbb_(_fbb) {
3910 start_ = fbb_.StartTable();
3911 }
3912 flatbuffers::Offset<ElementwiseUnaryLayer> Finish() {
3913 const auto end = fbb_.EndTable(start_);
3914 auto o = flatbuffers::Offset<ElementwiseUnaryLayer>(end);
3915 return o;
3916 }
3917 };
3918
3919 inline flatbuffers::Offset<ElementwiseUnaryLayer> CreateElementwiseUnaryLayer(
3920 flatbuffers::FlatBufferBuilder &_fbb,
3921 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
3922 flatbuffers::Offset<armnnSerializer::ElementwiseUnaryDescriptor> descriptor = 0) {
3923 ElementwiseUnaryLayerBuilder builder_(_fbb);
3924 builder_.add_descriptor(descriptor);
3925 builder_.add_base(base);
3926 return builder_.Finish();
3927 }
3928
3929 /// @deprecated Use ComparisonLayer instead
3930 struct EqualLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3931 typedef EqualLayerBuilder Builder;
3932 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3933 VT_BASE = 4
3934 };
3935 const armnnSerializer::LayerBase *base() const {
3936 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3937 }
3938 bool Verify(flatbuffers::Verifier &verifier) const {
3939 return VerifyTableStart(verifier) &&
3940 VerifyOffset(verifier, VT_BASE) &&
3941 verifier.VerifyTable(base()) &&
3942 verifier.EndTable();
3943 }
3944 };
3945
3946 struct EqualLayerBuilder {
3947 typedef EqualLayer Table;
3948 flatbuffers::FlatBufferBuilder &fbb_;
3949 flatbuffers::uoffset_t start_;
3950 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3951 fbb_.AddOffset(EqualLayer::VT_BASE, base);
3952 }
3953 explicit EqualLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
3954 : fbb_(_fbb) {
3955 start_ = fbb_.StartTable();
3956 }
3957 flatbuffers::Offset<EqualLayer> Finish() {
3958 const auto end = fbb_.EndTable(start_);
3959 auto o = flatbuffers::Offset<EqualLayer>(end);
3960 return o;
3961 }
3962 };
3963
3964 inline flatbuffers::Offset<EqualLayer> CreateEqualLayer(
3965 flatbuffers::FlatBufferBuilder &_fbb,
3966 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
3967 EqualLayerBuilder builder_(_fbb);
3968 builder_.add_base(base);
3969 return builder_.Finish();
3970 }
3971
3972 struct FillLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
3973 typedef FillLayerBuilder Builder;
3974 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
3975 VT_BASE = 4,
3976 VT_DESCRIPTOR = 6
3977 };
3978 const armnnSerializer::LayerBase *base() const {
3979 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
3980 }
3981 const armnnSerializer::FillDescriptor *descriptor() const {
3982 return GetPointer<const armnnSerializer::FillDescriptor *>(VT_DESCRIPTOR);
3983 }
3984 bool Verify(flatbuffers::Verifier &verifier) const {
3985 return VerifyTableStart(verifier) &&
3986 VerifyOffset(verifier, VT_BASE) &&
3987 verifier.VerifyTable(base()) &&
3988 VerifyOffset(verifier, VT_DESCRIPTOR) &&
3989 verifier.VerifyTable(descriptor()) &&
3990 verifier.EndTable();
3991 }
3992 };
3993
3994 struct FillLayerBuilder {
3995 typedef FillLayer Table;
3996 flatbuffers::FlatBufferBuilder &fbb_;
3997 flatbuffers::uoffset_t start_;
3998 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
3999 fbb_.AddOffset(FillLayer::VT_BASE, base);
4000 }
4001 void add_descriptor(flatbuffers::Offset<armnnSerializer::FillDescriptor> descriptor) {
4002 fbb_.AddOffset(FillLayer::VT_DESCRIPTOR, descriptor);
4003 }
4004 explicit FillLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4005 : fbb_(_fbb) {
4006 start_ = fbb_.StartTable();
4007 }
4008 flatbuffers::Offset<FillLayer> Finish() {
4009 const auto end = fbb_.EndTable(start_);
4010 auto o = flatbuffers::Offset<FillLayer>(end);
4011 return o;
4012 }
4013 };
4014
4015 inline flatbuffers::Offset<FillLayer> CreateFillLayer(
4016 flatbuffers::FlatBufferBuilder &_fbb,
4017 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
4018 flatbuffers::Offset<armnnSerializer::FillDescriptor> descriptor = 0) {
4019 FillLayerBuilder builder_(_fbb);
4020 builder_.add_descriptor(descriptor);
4021 builder_.add_base(base);
4022 return builder_.Finish();
4023 }
4024
4025 struct FillDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4026 typedef FillDescriptorBuilder Builder;
4027 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4028 VT_VALUE = 4
4029 };
4030 float value() const {
4031 return GetField<float>(VT_VALUE, 0.0f);
4032 }
4033 bool Verify(flatbuffers::Verifier &verifier) const {
4034 return VerifyTableStart(verifier) &&
4035 VerifyField<float>(verifier, VT_VALUE, 4) &&
4036 verifier.EndTable();
4037 }
4038 };
4039
4040 struct FillDescriptorBuilder {
4041 typedef FillDescriptor Table;
4042 flatbuffers::FlatBufferBuilder &fbb_;
4043 flatbuffers::uoffset_t start_;
4044 void add_value(float value) {
4045 fbb_.AddElement<float>(FillDescriptor::VT_VALUE, value, 0.0f);
4046 }
4047 explicit FillDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4048 : fbb_(_fbb) {
4049 start_ = fbb_.StartTable();
4050 }
4051 flatbuffers::Offset<FillDescriptor> Finish() {
4052 const auto end = fbb_.EndTable(start_);
4053 auto o = flatbuffers::Offset<FillDescriptor>(end);
4054 return o;
4055 }
4056 };
4057
4058 inline flatbuffers::Offset<FillDescriptor> CreateFillDescriptor(
4059 flatbuffers::FlatBufferBuilder &_fbb,
4060 float value = 0.0f) {
4061 FillDescriptorBuilder builder_(_fbb);
4062 builder_.add_value(value);
4063 return builder_.Finish();
4064 }
4065
4066 struct FloorLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4067 typedef FloorLayerBuilder Builder;
4068 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4069 VT_BASE = 4
4070 };
4071 const armnnSerializer::LayerBase *base() const {
4072 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4073 }
4074 bool Verify(flatbuffers::Verifier &verifier) const {
4075 return VerifyTableStart(verifier) &&
4076 VerifyOffset(verifier, VT_BASE) &&
4077 verifier.VerifyTable(base()) &&
4078 verifier.EndTable();
4079 }
4080 };
4081
4082 struct FloorLayerBuilder {
4083 typedef FloorLayer Table;
4084 flatbuffers::FlatBufferBuilder &fbb_;
4085 flatbuffers::uoffset_t start_;
4086 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4087 fbb_.AddOffset(FloorLayer::VT_BASE, base);
4088 }
4089 explicit FloorLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4090 : fbb_(_fbb) {
4091 start_ = fbb_.StartTable();
4092 }
4093 flatbuffers::Offset<FloorLayer> Finish() {
4094 const auto end = fbb_.EndTable(start_);
4095 auto o = flatbuffers::Offset<FloorLayer>(end);
4096 return o;
4097 }
4098 };
4099
4100 inline flatbuffers::Offset<FloorLayer> CreateFloorLayer(
4101 flatbuffers::FlatBufferBuilder &_fbb,
4102 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
4103 FloorLayerBuilder builder_(_fbb);
4104 builder_.add_base(base);
4105 return builder_.Finish();
4106 }
4107
4108 struct FullyConnectedLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4109 typedef FullyConnectedLayerBuilder Builder;
4110 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4111 VT_BASE = 4,
4112 VT_DESCRIPTOR = 6,
4113 VT_WEIGHTS = 8,
4114 VT_BIASES = 10
4115 };
4116 const armnnSerializer::LayerBase *base() const {
4117 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4118 }
4119 const armnnSerializer::FullyConnectedDescriptor *descriptor() const {
4120 return GetPointer<const armnnSerializer::FullyConnectedDescriptor *>(VT_DESCRIPTOR);
4121 }
4122 const armnnSerializer::ConstTensor *weights() const {
4123 return GetPointer<const armnnSerializer::ConstTensor *>(VT_WEIGHTS);
4124 }
4125 const armnnSerializer::ConstTensor *biases() const {
4126 return GetPointer<const armnnSerializer::ConstTensor *>(VT_BIASES);
4127 }
4128 bool Verify(flatbuffers::Verifier &verifier) const {
4129 return VerifyTableStart(verifier) &&
4130 VerifyOffset(verifier, VT_BASE) &&
4131 verifier.VerifyTable(base()) &&
4132 VerifyOffset(verifier, VT_DESCRIPTOR) &&
4133 verifier.VerifyTable(descriptor()) &&
4134 VerifyOffset(verifier, VT_WEIGHTS) &&
4135 verifier.VerifyTable(weights()) &&
4136 VerifyOffset(verifier, VT_BIASES) &&
4137 verifier.VerifyTable(biases()) &&
4138 verifier.EndTable();
4139 }
4140 };
4141
4142 struct FullyConnectedLayerBuilder {
4143 typedef FullyConnectedLayer Table;
4144 flatbuffers::FlatBufferBuilder &fbb_;
4145 flatbuffers::uoffset_t start_;
4146 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4147 fbb_.AddOffset(FullyConnectedLayer::VT_BASE, base);
4148 }
4149 void add_descriptor(flatbuffers::Offset<armnnSerializer::FullyConnectedDescriptor> descriptor) {
4150 fbb_.AddOffset(FullyConnectedLayer::VT_DESCRIPTOR, descriptor);
4151 }
4152 void add_weights(flatbuffers::Offset<armnnSerializer::ConstTensor> weights) {
4153 fbb_.AddOffset(FullyConnectedLayer::VT_WEIGHTS, weights);
4154 }
4155 void add_biases(flatbuffers::Offset<armnnSerializer::ConstTensor> biases) {
4156 fbb_.AddOffset(FullyConnectedLayer::VT_BIASES, biases);
4157 }
4158 explicit FullyConnectedLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4159 : fbb_(_fbb) {
4160 start_ = fbb_.StartTable();
4161 }
4162 flatbuffers::Offset<FullyConnectedLayer> Finish() {
4163 const auto end = fbb_.EndTable(start_);
4164 auto o = flatbuffers::Offset<FullyConnectedLayer>(end);
4165 return o;
4166 }
4167 };
4168
4169 inline flatbuffers::Offset<FullyConnectedLayer> CreateFullyConnectedLayer(
4170 flatbuffers::FlatBufferBuilder &_fbb,
4171 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
4172 flatbuffers::Offset<armnnSerializer::FullyConnectedDescriptor> descriptor = 0,
4173 flatbuffers::Offset<armnnSerializer::ConstTensor> weights = 0,
4174 flatbuffers::Offset<armnnSerializer::ConstTensor> biases = 0) {
4175 FullyConnectedLayerBuilder builder_(_fbb);
4176 builder_.add_biases(biases);
4177 builder_.add_weights(weights);
4178 builder_.add_descriptor(descriptor);
4179 builder_.add_base(base);
4180 return builder_.Finish();
4181 }
4182
4183 struct FullyConnectedDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4184 typedef FullyConnectedDescriptorBuilder Builder;
4185 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4186 VT_BIASENABLED = 4,
4187 VT_TRANSPOSEWEIGHTSMATRIX = 6,
4188 VT_CONSTANTWEIGHTS = 8
4189 };
4190 bool biasEnabled() const {
4191 return GetField<uint8_t>(VT_BIASENABLED, 0) != 0;
4192 }
4193 bool transposeWeightsMatrix() const {
4194 return GetField<uint8_t>(VT_TRANSPOSEWEIGHTSMATRIX, 0) != 0;
4195 }
4196 bool constantWeights() const {
4197 return GetField<uint8_t>(VT_CONSTANTWEIGHTS, 1) != 0;
4198 }
4199 bool Verify(flatbuffers::Verifier &verifier) const {
4200 return VerifyTableStart(verifier) &&
4201 VerifyField<uint8_t>(verifier, VT_BIASENABLED, 1) &&
4202 VerifyField<uint8_t>(verifier, VT_TRANSPOSEWEIGHTSMATRIX, 1) &&
4203 VerifyField<uint8_t>(verifier, VT_CONSTANTWEIGHTS, 1) &&
4204 verifier.EndTable();
4205 }
4206 };
4207
4208 struct FullyConnectedDescriptorBuilder {
4209 typedef FullyConnectedDescriptor Table;
4210 flatbuffers::FlatBufferBuilder &fbb_;
4211 flatbuffers::uoffset_t start_;
4212 void add_biasEnabled(bool biasEnabled) {
4213 fbb_.AddElement<uint8_t>(FullyConnectedDescriptor::VT_BIASENABLED, static_cast<uint8_t>(biasEnabled), 0);
4214 }
4215 void add_transposeWeightsMatrix(bool transposeWeightsMatrix) {
4216 fbb_.AddElement<uint8_t>(FullyConnectedDescriptor::VT_TRANSPOSEWEIGHTSMATRIX, static_cast<uint8_t>(transposeWeightsMatrix), 0);
4217 }
4218 void add_constantWeights(bool constantWeights) {
4219 fbb_.AddElement<uint8_t>(FullyConnectedDescriptor::VT_CONSTANTWEIGHTS, static_cast<uint8_t>(constantWeights), 1);
4220 }
4221 explicit FullyConnectedDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4222 : fbb_(_fbb) {
4223 start_ = fbb_.StartTable();
4224 }
4225 flatbuffers::Offset<FullyConnectedDescriptor> Finish() {
4226 const auto end = fbb_.EndTable(start_);
4227 auto o = flatbuffers::Offset<FullyConnectedDescriptor>(end);
4228 return o;
4229 }
4230 };
4231
4232 inline flatbuffers::Offset<FullyConnectedDescriptor> CreateFullyConnectedDescriptor(
4233 flatbuffers::FlatBufferBuilder &_fbb,
4234 bool biasEnabled = false,
4235 bool transposeWeightsMatrix = false,
4236 bool constantWeights = true) {
4237 FullyConnectedDescriptorBuilder builder_(_fbb);
4238 builder_.add_constantWeights(constantWeights);
4239 builder_.add_transposeWeightsMatrix(transposeWeightsMatrix);
4240 builder_.add_biasEnabled(biasEnabled);
4241 return builder_.Finish();
4242 }
4243
4244 struct GatherLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4245 typedef GatherLayerBuilder Builder;
4246 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4247 VT_BASE = 4,
4248 VT_DESCRIPTOR = 6
4249 };
4250 const armnnSerializer::LayerBase *base() const {
4251 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4252 }
4253 const armnnSerializer::GatherDescriptor *descriptor() const {
4254 return GetPointer<const armnnSerializer::GatherDescriptor *>(VT_DESCRIPTOR);
4255 }
4256 bool Verify(flatbuffers::Verifier &verifier) const {
4257 return VerifyTableStart(verifier) &&
4258 VerifyOffset(verifier, VT_BASE) &&
4259 verifier.VerifyTable(base()) &&
4260 VerifyOffset(verifier, VT_DESCRIPTOR) &&
4261 verifier.VerifyTable(descriptor()) &&
4262 verifier.EndTable();
4263 }
4264 };
4265
4266 struct GatherLayerBuilder {
4267 typedef GatherLayer Table;
4268 flatbuffers::FlatBufferBuilder &fbb_;
4269 flatbuffers::uoffset_t start_;
4270 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4271 fbb_.AddOffset(GatherLayer::VT_BASE, base);
4272 }
4273 void add_descriptor(flatbuffers::Offset<armnnSerializer::GatherDescriptor> descriptor) {
4274 fbb_.AddOffset(GatherLayer::VT_DESCRIPTOR, descriptor);
4275 }
4276 explicit GatherLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4277 : fbb_(_fbb) {
4278 start_ = fbb_.StartTable();
4279 }
4280 flatbuffers::Offset<GatherLayer> Finish() {
4281 const auto end = fbb_.EndTable(start_);
4282 auto o = flatbuffers::Offset<GatherLayer>(end);
4283 return o;
4284 }
4285 };
4286
4287 inline flatbuffers::Offset<GatherLayer> CreateGatherLayer(
4288 flatbuffers::FlatBufferBuilder &_fbb,
4289 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
4290 flatbuffers::Offset<armnnSerializer::GatherDescriptor> descriptor = 0) {
4291 GatherLayerBuilder builder_(_fbb);
4292 builder_.add_descriptor(descriptor);
4293 builder_.add_base(base);
4294 return builder_.Finish();
4295 }
4296
4297 struct GatherDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4298 typedef GatherDescriptorBuilder Builder;
4299 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4300 VT_AXIS = 4
4301 };
4302 int32_t axis() const {
4303 return GetField<int32_t>(VT_AXIS, 0);
4304 }
4305 bool Verify(flatbuffers::Verifier &verifier) const {
4306 return VerifyTableStart(verifier) &&
4307 VerifyField<int32_t>(verifier, VT_AXIS, 4) &&
4308 verifier.EndTable();
4309 }
4310 };
4311
4312 struct GatherDescriptorBuilder {
4313 typedef GatherDescriptor Table;
4314 flatbuffers::FlatBufferBuilder &fbb_;
4315 flatbuffers::uoffset_t start_;
4316 void add_axis(int32_t axis) {
4317 fbb_.AddElement<int32_t>(GatherDescriptor::VT_AXIS, axis, 0);
4318 }
4319 explicit GatherDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4320 : fbb_(_fbb) {
4321 start_ = fbb_.StartTable();
4322 }
4323 flatbuffers::Offset<GatherDescriptor> Finish() {
4324 const auto end = fbb_.EndTable(start_);
4325 auto o = flatbuffers::Offset<GatherDescriptor>(end);
4326 return o;
4327 }
4328 };
4329
4330 inline flatbuffers::Offset<GatherDescriptor> CreateGatherDescriptor(
4331 flatbuffers::FlatBufferBuilder &_fbb,
4332 int32_t axis = 0) {
4333 GatherDescriptorBuilder builder_(_fbb);
4334 builder_.add_axis(axis);
4335 return builder_.Finish();
4336 }
4337
4338 struct GatherNdLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4339 typedef GatherNdLayerBuilder Builder;
4340 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4341 VT_BASE = 4
4342 };
4343 const armnnSerializer::LayerBase *base() const {
4344 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4345 }
4346 bool Verify(flatbuffers::Verifier &verifier) const {
4347 return VerifyTableStart(verifier) &&
4348 VerifyOffset(verifier, VT_BASE) &&
4349 verifier.VerifyTable(base()) &&
4350 verifier.EndTable();
4351 }
4352 };
4353
4354 struct GatherNdLayerBuilder {
4355 typedef GatherNdLayer Table;
4356 flatbuffers::FlatBufferBuilder &fbb_;
4357 flatbuffers::uoffset_t start_;
4358 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4359 fbb_.AddOffset(GatherNdLayer::VT_BASE, base);
4360 }
4361 explicit GatherNdLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4362 : fbb_(_fbb) {
4363 start_ = fbb_.StartTable();
4364 }
4365 flatbuffers::Offset<GatherNdLayer> Finish() {
4366 const auto end = fbb_.EndTable(start_);
4367 auto o = flatbuffers::Offset<GatherNdLayer>(end);
4368 return o;
4369 }
4370 };
4371
4372 inline flatbuffers::Offset<GatherNdLayer> CreateGatherNdLayer(
4373 flatbuffers::FlatBufferBuilder &_fbb,
4374 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
4375 GatherNdLayerBuilder builder_(_fbb);
4376 builder_.add_base(base);
4377 return builder_.Finish();
4378 }
4379
4380 /// @deprecated Use ComparisonLayer instead
4381 struct GreaterLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4382 typedef GreaterLayerBuilder Builder;
4383 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4384 VT_BASE = 4
4385 };
4386 const armnnSerializer::LayerBase *base() const {
4387 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4388 }
4389 bool Verify(flatbuffers::Verifier &verifier) const {
4390 return VerifyTableStart(verifier) &&
4391 VerifyOffset(verifier, VT_BASE) &&
4392 verifier.VerifyTable(base()) &&
4393 verifier.EndTable();
4394 }
4395 };
4396
4397 struct GreaterLayerBuilder {
4398 typedef GreaterLayer Table;
4399 flatbuffers::FlatBufferBuilder &fbb_;
4400 flatbuffers::uoffset_t start_;
4401 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4402 fbb_.AddOffset(GreaterLayer::VT_BASE, base);
4403 }
4404 explicit GreaterLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4405 : fbb_(_fbb) {
4406 start_ = fbb_.StartTable();
4407 }
4408 flatbuffers::Offset<GreaterLayer> Finish() {
4409 const auto end = fbb_.EndTable(start_);
4410 auto o = flatbuffers::Offset<GreaterLayer>(end);
4411 return o;
4412 }
4413 };
4414
4415 inline flatbuffers::Offset<GreaterLayer> CreateGreaterLayer(
4416 flatbuffers::FlatBufferBuilder &_fbb,
4417 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
4418 GreaterLayerBuilder builder_(_fbb);
4419 builder_.add_base(base);
4420 return builder_.Finish();
4421 }
4422
4423 struct InputLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4424 typedef InputLayerBuilder Builder;
4425 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4426 VT_BASE = 4
4427 };
4428 const armnnSerializer::BindableLayerBase *base() const {
4429 return GetPointer<const armnnSerializer::BindableLayerBase *>(VT_BASE);
4430 }
4431 bool Verify(flatbuffers::Verifier &verifier) const {
4432 return VerifyTableStart(verifier) &&
4433 VerifyOffset(verifier, VT_BASE) &&
4434 verifier.VerifyTable(base()) &&
4435 verifier.EndTable();
4436 }
4437 };
4438
4439 struct InputLayerBuilder {
4440 typedef InputLayer Table;
4441 flatbuffers::FlatBufferBuilder &fbb_;
4442 flatbuffers::uoffset_t start_;
4443 void add_base(flatbuffers::Offset<armnnSerializer::BindableLayerBase> base) {
4444 fbb_.AddOffset(InputLayer::VT_BASE, base);
4445 }
4446 explicit InputLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4447 : fbb_(_fbb) {
4448 start_ = fbb_.StartTable();
4449 }
4450 flatbuffers::Offset<InputLayer> Finish() {
4451 const auto end = fbb_.EndTable(start_);
4452 auto o = flatbuffers::Offset<InputLayer>(end);
4453 return o;
4454 }
4455 };
4456
4457 inline flatbuffers::Offset<InputLayer> CreateInputLayer(
4458 flatbuffers::FlatBufferBuilder &_fbb,
4459 flatbuffers::Offset<armnnSerializer::BindableLayerBase> base = 0) {
4460 InputLayerBuilder builder_(_fbb);
4461 builder_.add_base(base);
4462 return builder_.Finish();
4463 }
4464
4465 struct InstanceNormalizationLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4466 typedef InstanceNormalizationLayerBuilder Builder;
4467 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4468 VT_BASE = 4,
4469 VT_DESCRIPTOR = 6
4470 };
4471 const armnnSerializer::LayerBase *base() const {
4472 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4473 }
4474 const armnnSerializer::InstanceNormalizationDescriptor *descriptor() const {
4475 return GetPointer<const armnnSerializer::InstanceNormalizationDescriptor *>(VT_DESCRIPTOR);
4476 }
4477 bool Verify(flatbuffers::Verifier &verifier) const {
4478 return VerifyTableStart(verifier) &&
4479 VerifyOffset(verifier, VT_BASE) &&
4480 verifier.VerifyTable(base()) &&
4481 VerifyOffset(verifier, VT_DESCRIPTOR) &&
4482 verifier.VerifyTable(descriptor()) &&
4483 verifier.EndTable();
4484 }
4485 };
4486
4487 struct InstanceNormalizationLayerBuilder {
4488 typedef InstanceNormalizationLayer Table;
4489 flatbuffers::FlatBufferBuilder &fbb_;
4490 flatbuffers::uoffset_t start_;
4491 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4492 fbb_.AddOffset(InstanceNormalizationLayer::VT_BASE, base);
4493 }
4494 void add_descriptor(flatbuffers::Offset<armnnSerializer::InstanceNormalizationDescriptor> descriptor) {
4495 fbb_.AddOffset(InstanceNormalizationLayer::VT_DESCRIPTOR, descriptor);
4496 }
4497 explicit InstanceNormalizationLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4498 : fbb_(_fbb) {
4499 start_ = fbb_.StartTable();
4500 }
4501 flatbuffers::Offset<InstanceNormalizationLayer> Finish() {
4502 const auto end = fbb_.EndTable(start_);
4503 auto o = flatbuffers::Offset<InstanceNormalizationLayer>(end);
4504 return o;
4505 }
4506 };
4507
4508 inline flatbuffers::Offset<InstanceNormalizationLayer> CreateInstanceNormalizationLayer(
4509 flatbuffers::FlatBufferBuilder &_fbb,
4510 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
4511 flatbuffers::Offset<armnnSerializer::InstanceNormalizationDescriptor> descriptor = 0) {
4512 InstanceNormalizationLayerBuilder builder_(_fbb);
4513 builder_.add_descriptor(descriptor);
4514 builder_.add_base(base);
4515 return builder_.Finish();
4516 }
4517
4518 struct InstanceNormalizationDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4519 typedef InstanceNormalizationDescriptorBuilder Builder;
4520 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4521 VT_GAMMA = 4,
4522 VT_BETA = 6,
4523 VT_EPS = 8,
4524 VT_DATALAYOUT = 10
4525 };
4526 float gamma() const {
4527 return GetField<float>(VT_GAMMA, 0.0f);
4528 }
4529 float beta() const {
4530 return GetField<float>(VT_BETA, 0.0f);
4531 }
4532 float eps() const {
4533 return GetField<float>(VT_EPS, 0.0f);
4534 }
4535 armnnSerializer::DataLayout dataLayout() const {
4536 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
4537 }
4538 bool Verify(flatbuffers::Verifier &verifier) const {
4539 return VerifyTableStart(verifier) &&
4540 VerifyField<float>(verifier, VT_GAMMA, 4) &&
4541 VerifyField<float>(verifier, VT_BETA, 4) &&
4542 VerifyField<float>(verifier, VT_EPS, 4) &&
4543 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
4544 verifier.EndTable();
4545 }
4546 };
4547
4548 struct InstanceNormalizationDescriptorBuilder {
4549 typedef InstanceNormalizationDescriptor Table;
4550 flatbuffers::FlatBufferBuilder &fbb_;
4551 flatbuffers::uoffset_t start_;
4552 void add_gamma(float gamma) {
4553 fbb_.AddElement<float>(InstanceNormalizationDescriptor::VT_GAMMA, gamma, 0.0f);
4554 }
4555 void add_beta(float beta) {
4556 fbb_.AddElement<float>(InstanceNormalizationDescriptor::VT_BETA, beta, 0.0f);
4557 }
4558 void add_eps(float eps) {
4559 fbb_.AddElement<float>(InstanceNormalizationDescriptor::VT_EPS, eps, 0.0f);
4560 }
4561 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
4562 fbb_.AddElement<int8_t>(InstanceNormalizationDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
4563 }
4564 explicit InstanceNormalizationDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4565 : fbb_(_fbb) {
4566 start_ = fbb_.StartTable();
4567 }
4568 flatbuffers::Offset<InstanceNormalizationDescriptor> Finish() {
4569 const auto end = fbb_.EndTable(start_);
4570 auto o = flatbuffers::Offset<InstanceNormalizationDescriptor>(end);
4571 return o;
4572 }
4573 };
4574
4575 inline flatbuffers::Offset<InstanceNormalizationDescriptor> CreateInstanceNormalizationDescriptor(
4576 flatbuffers::FlatBufferBuilder &_fbb,
4577 float gamma = 0.0f,
4578 float beta = 0.0f,
4579 float eps = 0.0f,
4580 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
4581 InstanceNormalizationDescriptorBuilder builder_(_fbb);
4582 builder_.add_eps(eps);
4583 builder_.add_beta(beta);
4584 builder_.add_gamma(gamma);
4585 builder_.add_dataLayout(dataLayout);
4586 return builder_.Finish();
4587 }
4588
4589 struct LogSoftmaxLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4590 typedef LogSoftmaxLayerBuilder Builder;
4591 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4592 VT_BASE = 4,
4593 VT_DESCRIPTOR = 6
4594 };
4595 const armnnSerializer::LayerBase *base() const {
4596 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4597 }
4598 const armnnSerializer::LogSoftmaxDescriptor *descriptor() const {
4599 return GetPointer<const armnnSerializer::LogSoftmaxDescriptor *>(VT_DESCRIPTOR);
4600 }
4601 bool Verify(flatbuffers::Verifier &verifier) const {
4602 return VerifyTableStart(verifier) &&
4603 VerifyOffset(verifier, VT_BASE) &&
4604 verifier.VerifyTable(base()) &&
4605 VerifyOffset(verifier, VT_DESCRIPTOR) &&
4606 verifier.VerifyTable(descriptor()) &&
4607 verifier.EndTable();
4608 }
4609 };
4610
4611 struct LogSoftmaxLayerBuilder {
4612 typedef LogSoftmaxLayer Table;
4613 flatbuffers::FlatBufferBuilder &fbb_;
4614 flatbuffers::uoffset_t start_;
4615 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4616 fbb_.AddOffset(LogSoftmaxLayer::VT_BASE, base);
4617 }
4618 void add_descriptor(flatbuffers::Offset<armnnSerializer::LogSoftmaxDescriptor> descriptor) {
4619 fbb_.AddOffset(LogSoftmaxLayer::VT_DESCRIPTOR, descriptor);
4620 }
4621 explicit LogSoftmaxLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4622 : fbb_(_fbb) {
4623 start_ = fbb_.StartTable();
4624 }
4625 flatbuffers::Offset<LogSoftmaxLayer> Finish() {
4626 const auto end = fbb_.EndTable(start_);
4627 auto o = flatbuffers::Offset<LogSoftmaxLayer>(end);
4628 return o;
4629 }
4630 };
4631
4632 inline flatbuffers::Offset<LogSoftmaxLayer> CreateLogSoftmaxLayer(
4633 flatbuffers::FlatBufferBuilder &_fbb,
4634 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
4635 flatbuffers::Offset<armnnSerializer::LogSoftmaxDescriptor> descriptor = 0) {
4636 LogSoftmaxLayerBuilder builder_(_fbb);
4637 builder_.add_descriptor(descriptor);
4638 builder_.add_base(base);
4639 return builder_.Finish();
4640 }
4641
4642 struct LogSoftmaxDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4643 typedef LogSoftmaxDescriptorBuilder Builder;
4644 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4645 VT_BETA = 4,
4646 VT_AXIS = 6
4647 };
4648 float beta() const {
4649 return GetField<float>(VT_BETA, 1.0f);
4650 }
4651 int32_t axis() const {
4652 return GetField<int32_t>(VT_AXIS, -1);
4653 }
4654 bool Verify(flatbuffers::Verifier &verifier) const {
4655 return VerifyTableStart(verifier) &&
4656 VerifyField<float>(verifier, VT_BETA, 4) &&
4657 VerifyField<int32_t>(verifier, VT_AXIS, 4) &&
4658 verifier.EndTable();
4659 }
4660 };
4661
4662 struct LogSoftmaxDescriptorBuilder {
4663 typedef LogSoftmaxDescriptor Table;
4664 flatbuffers::FlatBufferBuilder &fbb_;
4665 flatbuffers::uoffset_t start_;
4666 void add_beta(float beta) {
4667 fbb_.AddElement<float>(LogSoftmaxDescriptor::VT_BETA, beta, 1.0f);
4668 }
4669 void add_axis(int32_t axis) {
4670 fbb_.AddElement<int32_t>(LogSoftmaxDescriptor::VT_AXIS, axis, -1);
4671 }
4672 explicit LogSoftmaxDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4673 : fbb_(_fbb) {
4674 start_ = fbb_.StartTable();
4675 }
4676 flatbuffers::Offset<LogSoftmaxDescriptor> Finish() {
4677 const auto end = fbb_.EndTable(start_);
4678 auto o = flatbuffers::Offset<LogSoftmaxDescriptor>(end);
4679 return o;
4680 }
4681 };
4682
4683 inline flatbuffers::Offset<LogSoftmaxDescriptor> CreateLogSoftmaxDescriptor(
4684 flatbuffers::FlatBufferBuilder &_fbb,
4685 float beta = 1.0f,
4686 int32_t axis = -1) {
4687 LogSoftmaxDescriptorBuilder builder_(_fbb);
4688 builder_.add_axis(axis);
4689 builder_.add_beta(beta);
4690 return builder_.Finish();
4691 }
4692
4693 struct L2NormalizationLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4694 typedef L2NormalizationLayerBuilder Builder;
4695 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4696 VT_BASE = 4,
4697 VT_DESCRIPTOR = 6
4698 };
4699 const armnnSerializer::LayerBase *base() const {
4700 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4701 }
4702 const armnnSerializer::L2NormalizationDescriptor *descriptor() const {
4703 return GetPointer<const armnnSerializer::L2NormalizationDescriptor *>(VT_DESCRIPTOR);
4704 }
4705 bool Verify(flatbuffers::Verifier &verifier) const {
4706 return VerifyTableStart(verifier) &&
4707 VerifyOffset(verifier, VT_BASE) &&
4708 verifier.VerifyTable(base()) &&
4709 VerifyOffset(verifier, VT_DESCRIPTOR) &&
4710 verifier.VerifyTable(descriptor()) &&
4711 verifier.EndTable();
4712 }
4713 };
4714
4715 struct L2NormalizationLayerBuilder {
4716 typedef L2NormalizationLayer Table;
4717 flatbuffers::FlatBufferBuilder &fbb_;
4718 flatbuffers::uoffset_t start_;
4719 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4720 fbb_.AddOffset(L2NormalizationLayer::VT_BASE, base);
4721 }
4722 void add_descriptor(flatbuffers::Offset<armnnSerializer::L2NormalizationDescriptor> descriptor) {
4723 fbb_.AddOffset(L2NormalizationLayer::VT_DESCRIPTOR, descriptor);
4724 }
4725 explicit L2NormalizationLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4726 : fbb_(_fbb) {
4727 start_ = fbb_.StartTable();
4728 }
4729 flatbuffers::Offset<L2NormalizationLayer> Finish() {
4730 const auto end = fbb_.EndTable(start_);
4731 auto o = flatbuffers::Offset<L2NormalizationLayer>(end);
4732 return o;
4733 }
4734 };
4735
4736 inline flatbuffers::Offset<L2NormalizationLayer> CreateL2NormalizationLayer(
4737 flatbuffers::FlatBufferBuilder &_fbb,
4738 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
4739 flatbuffers::Offset<armnnSerializer::L2NormalizationDescriptor> descriptor = 0) {
4740 L2NormalizationLayerBuilder builder_(_fbb);
4741 builder_.add_descriptor(descriptor);
4742 builder_.add_base(base);
4743 return builder_.Finish();
4744 }
4745
4746 struct L2NormalizationDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4747 typedef L2NormalizationDescriptorBuilder Builder;
4748 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4749 VT_DATALAYOUT = 4,
4750 VT_EPS = 6
4751 };
4752 armnnSerializer::DataLayout dataLayout() const {
4753 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 1));
4754 }
4755 float eps() const {
4756 return GetField<float>(VT_EPS, 1e-12f);
4757 }
4758 bool Verify(flatbuffers::Verifier &verifier) const {
4759 return VerifyTableStart(verifier) &&
4760 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
4761 VerifyField<float>(verifier, VT_EPS, 4) &&
4762 verifier.EndTable();
4763 }
4764 };
4765
4766 struct L2NormalizationDescriptorBuilder {
4767 typedef L2NormalizationDescriptor Table;
4768 flatbuffers::FlatBufferBuilder &fbb_;
4769 flatbuffers::uoffset_t start_;
4770 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
4771 fbb_.AddElement<int8_t>(L2NormalizationDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 1);
4772 }
4773 void add_eps(float eps) {
4774 fbb_.AddElement<float>(L2NormalizationDescriptor::VT_EPS, eps, 1e-12f);
4775 }
4776 explicit L2NormalizationDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4777 : fbb_(_fbb) {
4778 start_ = fbb_.StartTable();
4779 }
4780 flatbuffers::Offset<L2NormalizationDescriptor> Finish() {
4781 const auto end = fbb_.EndTable(start_);
4782 auto o = flatbuffers::Offset<L2NormalizationDescriptor>(end);
4783 return o;
4784 }
4785 };
4786
4787 inline flatbuffers::Offset<L2NormalizationDescriptor> CreateL2NormalizationDescriptor(
4788 flatbuffers::FlatBufferBuilder &_fbb,
4789 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NCHW,
4790 float eps = 1e-12f) {
4791 L2NormalizationDescriptorBuilder builder_(_fbb);
4792 builder_.add_eps(eps);
4793 builder_.add_dataLayout(dataLayout);
4794 return builder_.Finish();
4795 }
4796
4797 struct LogicalBinaryDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4798 typedef LogicalBinaryDescriptorBuilder Builder;
4799 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4800 VT_OPERATION = 4
4801 };
4802 armnnSerializer::LogicalBinaryOperation operation() const {
4803 return static_cast<armnnSerializer::LogicalBinaryOperation>(GetField<int8_t>(VT_OPERATION, 0));
4804 }
4805 bool Verify(flatbuffers::Verifier &verifier) const {
4806 return VerifyTableStart(verifier) &&
4807 VerifyField<int8_t>(verifier, VT_OPERATION, 1) &&
4808 verifier.EndTable();
4809 }
4810 };
4811
4812 struct LogicalBinaryDescriptorBuilder {
4813 typedef LogicalBinaryDescriptor Table;
4814 flatbuffers::FlatBufferBuilder &fbb_;
4815 flatbuffers::uoffset_t start_;
4816 void add_operation(armnnSerializer::LogicalBinaryOperation operation) {
4817 fbb_.AddElement<int8_t>(LogicalBinaryDescriptor::VT_OPERATION, static_cast<int8_t>(operation), 0);
4818 }
4819 explicit LogicalBinaryDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4820 : fbb_(_fbb) {
4821 start_ = fbb_.StartTable();
4822 }
4823 flatbuffers::Offset<LogicalBinaryDescriptor> Finish() {
4824 const auto end = fbb_.EndTable(start_);
4825 auto o = flatbuffers::Offset<LogicalBinaryDescriptor>(end);
4826 return o;
4827 }
4828 };
4829
4830 inline flatbuffers::Offset<LogicalBinaryDescriptor> CreateLogicalBinaryDescriptor(
4831 flatbuffers::FlatBufferBuilder &_fbb,
4832 armnnSerializer::LogicalBinaryOperation operation = armnnSerializer::LogicalBinaryOperation_LogicalAnd) {
4833 LogicalBinaryDescriptorBuilder builder_(_fbb);
4834 builder_.add_operation(operation);
4835 return builder_.Finish();
4836 }
4837
4838 struct LogicalBinaryLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4839 typedef LogicalBinaryLayerBuilder Builder;
4840 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4841 VT_BASE = 4,
4842 VT_DESCRIPTOR = 6
4843 };
4844 const armnnSerializer::LayerBase *base() const {
4845 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4846 }
4847 const armnnSerializer::LogicalBinaryDescriptor *descriptor() const {
4848 return GetPointer<const armnnSerializer::LogicalBinaryDescriptor *>(VT_DESCRIPTOR);
4849 }
4850 bool Verify(flatbuffers::Verifier &verifier) const {
4851 return VerifyTableStart(verifier) &&
4852 VerifyOffset(verifier, VT_BASE) &&
4853 verifier.VerifyTable(base()) &&
4854 VerifyOffset(verifier, VT_DESCRIPTOR) &&
4855 verifier.VerifyTable(descriptor()) &&
4856 verifier.EndTable();
4857 }
4858 };
4859
4860 struct LogicalBinaryLayerBuilder {
4861 typedef LogicalBinaryLayer Table;
4862 flatbuffers::FlatBufferBuilder &fbb_;
4863 flatbuffers::uoffset_t start_;
4864 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4865 fbb_.AddOffset(LogicalBinaryLayer::VT_BASE, base);
4866 }
4867 void add_descriptor(flatbuffers::Offset<armnnSerializer::LogicalBinaryDescriptor> descriptor) {
4868 fbb_.AddOffset(LogicalBinaryLayer::VT_DESCRIPTOR, descriptor);
4869 }
4870 explicit LogicalBinaryLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4871 : fbb_(_fbb) {
4872 start_ = fbb_.StartTable();
4873 }
4874 flatbuffers::Offset<LogicalBinaryLayer> Finish() {
4875 const auto end = fbb_.EndTable(start_);
4876 auto o = flatbuffers::Offset<LogicalBinaryLayer>(end);
4877 return o;
4878 }
4879 };
4880
4881 inline flatbuffers::Offset<LogicalBinaryLayer> CreateLogicalBinaryLayer(
4882 flatbuffers::FlatBufferBuilder &_fbb,
4883 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
4884 flatbuffers::Offset<armnnSerializer::LogicalBinaryDescriptor> descriptor = 0) {
4885 LogicalBinaryLayerBuilder builder_(_fbb);
4886 builder_.add_descriptor(descriptor);
4887 builder_.add_base(base);
4888 return builder_.Finish();
4889 }
4890
4891 struct MinimumLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4892 typedef MinimumLayerBuilder Builder;
4893 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4894 VT_BASE = 4
4895 };
4896 const armnnSerializer::LayerBase *base() const {
4897 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4898 }
4899 bool Verify(flatbuffers::Verifier &verifier) const {
4900 return VerifyTableStart(verifier) &&
4901 VerifyOffset(verifier, VT_BASE) &&
4902 verifier.VerifyTable(base()) &&
4903 verifier.EndTable();
4904 }
4905 };
4906
4907 struct MinimumLayerBuilder {
4908 typedef MinimumLayer Table;
4909 flatbuffers::FlatBufferBuilder &fbb_;
4910 flatbuffers::uoffset_t start_;
4911 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4912 fbb_.AddOffset(MinimumLayer::VT_BASE, base);
4913 }
4914 explicit MinimumLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4915 : fbb_(_fbb) {
4916 start_ = fbb_.StartTable();
4917 }
4918 flatbuffers::Offset<MinimumLayer> Finish() {
4919 const auto end = fbb_.EndTable(start_);
4920 auto o = flatbuffers::Offset<MinimumLayer>(end);
4921 return o;
4922 }
4923 };
4924
4925 inline flatbuffers::Offset<MinimumLayer> CreateMinimumLayer(
4926 flatbuffers::FlatBufferBuilder &_fbb,
4927 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
4928 MinimumLayerBuilder builder_(_fbb);
4929 builder_.add_base(base);
4930 return builder_.Finish();
4931 }
4932
4933 struct MaximumLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4934 typedef MaximumLayerBuilder Builder;
4935 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4936 VT_BASE = 4
4937 };
4938 const armnnSerializer::LayerBase *base() const {
4939 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4940 }
4941 bool Verify(flatbuffers::Verifier &verifier) const {
4942 return VerifyTableStart(verifier) &&
4943 VerifyOffset(verifier, VT_BASE) &&
4944 verifier.VerifyTable(base()) &&
4945 verifier.EndTable();
4946 }
4947 };
4948
4949 struct MaximumLayerBuilder {
4950 typedef MaximumLayer Table;
4951 flatbuffers::FlatBufferBuilder &fbb_;
4952 flatbuffers::uoffset_t start_;
4953 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4954 fbb_.AddOffset(MaximumLayer::VT_BASE, base);
4955 }
4956 explicit MaximumLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4957 : fbb_(_fbb) {
4958 start_ = fbb_.StartTable();
4959 }
4960 flatbuffers::Offset<MaximumLayer> Finish() {
4961 const auto end = fbb_.EndTable(start_);
4962 auto o = flatbuffers::Offset<MaximumLayer>(end);
4963 return o;
4964 }
4965 };
4966
4967 inline flatbuffers::Offset<MaximumLayer> CreateMaximumLayer(
4968 flatbuffers::FlatBufferBuilder &_fbb,
4969 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
4970 MaximumLayerBuilder builder_(_fbb);
4971 builder_.add_base(base);
4972 return builder_.Finish();
4973 }
4974
4975 struct MultiplicationLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
4976 typedef MultiplicationLayerBuilder Builder;
4977 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
4978 VT_BASE = 4
4979 };
4980 const armnnSerializer::LayerBase *base() const {
4981 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
4982 }
4983 bool Verify(flatbuffers::Verifier &verifier) const {
4984 return VerifyTableStart(verifier) &&
4985 VerifyOffset(verifier, VT_BASE) &&
4986 verifier.VerifyTable(base()) &&
4987 verifier.EndTable();
4988 }
4989 };
4990
4991 struct MultiplicationLayerBuilder {
4992 typedef MultiplicationLayer Table;
4993 flatbuffers::FlatBufferBuilder &fbb_;
4994 flatbuffers::uoffset_t start_;
4995 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
4996 fbb_.AddOffset(MultiplicationLayer::VT_BASE, base);
4997 }
4998 explicit MultiplicationLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
4999 : fbb_(_fbb) {
5000 start_ = fbb_.StartTable();
5001 }
5002 flatbuffers::Offset<MultiplicationLayer> Finish() {
5003 const auto end = fbb_.EndTable(start_);
5004 auto o = flatbuffers::Offset<MultiplicationLayer>(end);
5005 return o;
5006 }
5007 };
5008
5009 inline flatbuffers::Offset<MultiplicationLayer> CreateMultiplicationLayer(
5010 flatbuffers::FlatBufferBuilder &_fbb,
5011 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
5012 MultiplicationLayerBuilder builder_(_fbb);
5013 builder_.add_base(base);
5014 return builder_.Finish();
5015 }
5016
5017 struct Pooling2dLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5018 typedef Pooling2dLayerBuilder Builder;
5019 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5020 VT_BASE = 4,
5021 VT_DESCRIPTOR = 6
5022 };
5023 const armnnSerializer::LayerBase *base() const {
5024 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
5025 }
5026 const armnnSerializer::Pooling2dDescriptor *descriptor() const {
5027 return GetPointer<const armnnSerializer::Pooling2dDescriptor *>(VT_DESCRIPTOR);
5028 }
5029 bool Verify(flatbuffers::Verifier &verifier) const {
5030 return VerifyTableStart(verifier) &&
5031 VerifyOffset(verifier, VT_BASE) &&
5032 verifier.VerifyTable(base()) &&
5033 VerifyOffset(verifier, VT_DESCRIPTOR) &&
5034 verifier.VerifyTable(descriptor()) &&
5035 verifier.EndTable();
5036 }
5037 };
5038
5039 struct Pooling2dLayerBuilder {
5040 typedef Pooling2dLayer Table;
5041 flatbuffers::FlatBufferBuilder &fbb_;
5042 flatbuffers::uoffset_t start_;
5043 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
5044 fbb_.AddOffset(Pooling2dLayer::VT_BASE, base);
5045 }
5046 void add_descriptor(flatbuffers::Offset<armnnSerializer::Pooling2dDescriptor> descriptor) {
5047 fbb_.AddOffset(Pooling2dLayer::VT_DESCRIPTOR, descriptor);
5048 }
5049 explicit Pooling2dLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5050 : fbb_(_fbb) {
5051 start_ = fbb_.StartTable();
5052 }
5053 flatbuffers::Offset<Pooling2dLayer> Finish() {
5054 const auto end = fbb_.EndTable(start_);
5055 auto o = flatbuffers::Offset<Pooling2dLayer>(end);
5056 return o;
5057 }
5058 };
5059
5060 inline flatbuffers::Offset<Pooling2dLayer> CreatePooling2dLayer(
5061 flatbuffers::FlatBufferBuilder &_fbb,
5062 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
5063 flatbuffers::Offset<armnnSerializer::Pooling2dDescriptor> descriptor = 0) {
5064 Pooling2dLayerBuilder builder_(_fbb);
5065 builder_.add_descriptor(descriptor);
5066 builder_.add_base(base);
5067 return builder_.Finish();
5068 }
5069
5070 struct Pooling3dLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5071 typedef Pooling3dLayerBuilder Builder;
5072 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5073 VT_BASE = 4,
5074 VT_DESCRIPTOR = 6
5075 };
5076 const armnnSerializer::LayerBase *base() const {
5077 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
5078 }
5079 const armnnSerializer::Pooling3dDescriptor *descriptor() const {
5080 return GetPointer<const armnnSerializer::Pooling3dDescriptor *>(VT_DESCRIPTOR);
5081 }
5082 bool Verify(flatbuffers::Verifier &verifier) const {
5083 return VerifyTableStart(verifier) &&
5084 VerifyOffset(verifier, VT_BASE) &&
5085 verifier.VerifyTable(base()) &&
5086 VerifyOffset(verifier, VT_DESCRIPTOR) &&
5087 verifier.VerifyTable(descriptor()) &&
5088 verifier.EndTable();
5089 }
5090 };
5091
5092 struct Pooling3dLayerBuilder {
5093 typedef Pooling3dLayer Table;
5094 flatbuffers::FlatBufferBuilder &fbb_;
5095 flatbuffers::uoffset_t start_;
5096 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
5097 fbb_.AddOffset(Pooling3dLayer::VT_BASE, base);
5098 }
5099 void add_descriptor(flatbuffers::Offset<armnnSerializer::Pooling3dDescriptor> descriptor) {
5100 fbb_.AddOffset(Pooling3dLayer::VT_DESCRIPTOR, descriptor);
5101 }
5102 explicit Pooling3dLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5103 : fbb_(_fbb) {
5104 start_ = fbb_.StartTable();
5105 }
5106 flatbuffers::Offset<Pooling3dLayer> Finish() {
5107 const auto end = fbb_.EndTable(start_);
5108 auto o = flatbuffers::Offset<Pooling3dLayer>(end);
5109 return o;
5110 }
5111 };
5112
5113 inline flatbuffers::Offset<Pooling3dLayer> CreatePooling3dLayer(
5114 flatbuffers::FlatBufferBuilder &_fbb,
5115 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
5116 flatbuffers::Offset<armnnSerializer::Pooling3dDescriptor> descriptor = 0) {
5117 Pooling3dLayerBuilder builder_(_fbb);
5118 builder_.add_descriptor(descriptor);
5119 builder_.add_base(base);
5120 return builder_.Finish();
5121 }
5122
5123 struct Pooling2dDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5124 typedef Pooling2dDescriptorBuilder Builder;
5125 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5126 VT_POOLTYPE = 4,
5127 VT_PADLEFT = 6,
5128 VT_PADRIGHT = 8,
5129 VT_PADTOP = 10,
5130 VT_PADBOTTOM = 12,
5131 VT_POOLWIDTH = 14,
5132 VT_POOLHEIGHT = 16,
5133 VT_STRIDEX = 18,
5134 VT_STRIDEY = 20,
5135 VT_OUTPUTSHAPEROUNDING = 22,
5136 VT_PADDINGMETHOD = 24,
5137 VT_DATALAYOUT = 26
5138 };
5139 armnnSerializer::PoolingAlgorithm poolType() const {
5140 return static_cast<armnnSerializer::PoolingAlgorithm>(GetField<int8_t>(VT_POOLTYPE, 0));
5141 }
5142 uint32_t padLeft() const {
5143 return GetField<uint32_t>(VT_PADLEFT, 0);
5144 }
5145 uint32_t padRight() const {
5146 return GetField<uint32_t>(VT_PADRIGHT, 0);
5147 }
5148 uint32_t padTop() const {
5149 return GetField<uint32_t>(VT_PADTOP, 0);
5150 }
5151 uint32_t padBottom() const {
5152 return GetField<uint32_t>(VT_PADBOTTOM, 0);
5153 }
5154 uint32_t poolWidth() const {
5155 return GetField<uint32_t>(VT_POOLWIDTH, 0);
5156 }
5157 uint32_t poolHeight() const {
5158 return GetField<uint32_t>(VT_POOLHEIGHT, 0);
5159 }
5160 uint32_t strideX() const {
5161 return GetField<uint32_t>(VT_STRIDEX, 0);
5162 }
5163 uint32_t strideY() const {
5164 return GetField<uint32_t>(VT_STRIDEY, 0);
5165 }
5166 armnnSerializer::OutputShapeRounding outputShapeRounding() const {
5167 return static_cast<armnnSerializer::OutputShapeRounding>(GetField<int8_t>(VT_OUTPUTSHAPEROUNDING, 0));
5168 }
5169 armnnSerializer::PaddingMethod paddingMethod() const {
5170 return static_cast<armnnSerializer::PaddingMethod>(GetField<int8_t>(VT_PADDINGMETHOD, 0));
5171 }
5172 armnnSerializer::DataLayout dataLayout() const {
5173 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
5174 }
5175 bool Verify(flatbuffers::Verifier &verifier) const {
5176 return VerifyTableStart(verifier) &&
5177 VerifyField<int8_t>(verifier, VT_POOLTYPE, 1) &&
5178 VerifyField<uint32_t>(verifier, VT_PADLEFT, 4) &&
5179 VerifyField<uint32_t>(verifier, VT_PADRIGHT, 4) &&
5180 VerifyField<uint32_t>(verifier, VT_PADTOP, 4) &&
5181 VerifyField<uint32_t>(verifier, VT_PADBOTTOM, 4) &&
5182 VerifyField<uint32_t>(verifier, VT_POOLWIDTH, 4) &&
5183 VerifyField<uint32_t>(verifier, VT_POOLHEIGHT, 4) &&
5184 VerifyField<uint32_t>(verifier, VT_STRIDEX, 4) &&
5185 VerifyField<uint32_t>(verifier, VT_STRIDEY, 4) &&
5186 VerifyField<int8_t>(verifier, VT_OUTPUTSHAPEROUNDING, 1) &&
5187 VerifyField<int8_t>(verifier, VT_PADDINGMETHOD, 1) &&
5188 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
5189 verifier.EndTable();
5190 }
5191 };
5192
5193 struct Pooling2dDescriptorBuilder {
5194 typedef Pooling2dDescriptor Table;
5195 flatbuffers::FlatBufferBuilder &fbb_;
5196 flatbuffers::uoffset_t start_;
5197 void add_poolType(armnnSerializer::PoolingAlgorithm poolType) {
5198 fbb_.AddElement<int8_t>(Pooling2dDescriptor::VT_POOLTYPE, static_cast<int8_t>(poolType), 0);
5199 }
5200 void add_padLeft(uint32_t padLeft) {
5201 fbb_.AddElement<uint32_t>(Pooling2dDescriptor::VT_PADLEFT, padLeft, 0);
5202 }
5203 void add_padRight(uint32_t padRight) {
5204 fbb_.AddElement<uint32_t>(Pooling2dDescriptor::VT_PADRIGHT, padRight, 0);
5205 }
5206 void add_padTop(uint32_t padTop) {
5207 fbb_.AddElement<uint32_t>(Pooling2dDescriptor::VT_PADTOP, padTop, 0);
5208 }
5209 void add_padBottom(uint32_t padBottom) {
5210 fbb_.AddElement<uint32_t>(Pooling2dDescriptor::VT_PADBOTTOM, padBottom, 0);
5211 }
5212 void add_poolWidth(uint32_t poolWidth) {
5213 fbb_.AddElement<uint32_t>(Pooling2dDescriptor::VT_POOLWIDTH, poolWidth, 0);
5214 }
5215 void add_poolHeight(uint32_t poolHeight) {
5216 fbb_.AddElement<uint32_t>(Pooling2dDescriptor::VT_POOLHEIGHT, poolHeight, 0);
5217 }
5218 void add_strideX(uint32_t strideX) {
5219 fbb_.AddElement<uint32_t>(Pooling2dDescriptor::VT_STRIDEX, strideX, 0);
5220 }
5221 void add_strideY(uint32_t strideY) {
5222 fbb_.AddElement<uint32_t>(Pooling2dDescriptor::VT_STRIDEY, strideY, 0);
5223 }
5224 void add_outputShapeRounding(armnnSerializer::OutputShapeRounding outputShapeRounding) {
5225 fbb_.AddElement<int8_t>(Pooling2dDescriptor::VT_OUTPUTSHAPEROUNDING, static_cast<int8_t>(outputShapeRounding), 0);
5226 }
5227 void add_paddingMethod(armnnSerializer::PaddingMethod paddingMethod) {
5228 fbb_.AddElement<int8_t>(Pooling2dDescriptor::VT_PADDINGMETHOD, static_cast<int8_t>(paddingMethod), 0);
5229 }
5230 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
5231 fbb_.AddElement<int8_t>(Pooling2dDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
5232 }
5233 explicit Pooling2dDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5234 : fbb_(_fbb) {
5235 start_ = fbb_.StartTable();
5236 }
5237 flatbuffers::Offset<Pooling2dDescriptor> Finish() {
5238 const auto end = fbb_.EndTable(start_);
5239 auto o = flatbuffers::Offset<Pooling2dDescriptor>(end);
5240 return o;
5241 }
5242 };
5243
5244 inline flatbuffers::Offset<Pooling2dDescriptor> CreatePooling2dDescriptor(
5245 flatbuffers::FlatBufferBuilder &_fbb,
5246 armnnSerializer::PoolingAlgorithm poolType = armnnSerializer::PoolingAlgorithm_Max,
5247 uint32_t padLeft = 0,
5248 uint32_t padRight = 0,
5249 uint32_t padTop = 0,
5250 uint32_t padBottom = 0,
5251 uint32_t poolWidth = 0,
5252 uint32_t poolHeight = 0,
5253 uint32_t strideX = 0,
5254 uint32_t strideY = 0,
5255 armnnSerializer::OutputShapeRounding outputShapeRounding = armnnSerializer::OutputShapeRounding_Floor,
5256 armnnSerializer::PaddingMethod paddingMethod = armnnSerializer::PaddingMethod_IgnoreValue,
5257 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
5258 Pooling2dDescriptorBuilder builder_(_fbb);
5259 builder_.add_strideY(strideY);
5260 builder_.add_strideX(strideX);
5261 builder_.add_poolHeight(poolHeight);
5262 builder_.add_poolWidth(poolWidth);
5263 builder_.add_padBottom(padBottom);
5264 builder_.add_padTop(padTop);
5265 builder_.add_padRight(padRight);
5266 builder_.add_padLeft(padLeft);
5267 builder_.add_dataLayout(dataLayout);
5268 builder_.add_paddingMethod(paddingMethod);
5269 builder_.add_outputShapeRounding(outputShapeRounding);
5270 builder_.add_poolType(poolType);
5271 return builder_.Finish();
5272 }
5273
5274 struct Pooling3dDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5275 typedef Pooling3dDescriptorBuilder Builder;
5276 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5277 VT_POOLTYPE = 4,
5278 VT_PADLEFT = 6,
5279 VT_PADRIGHT = 8,
5280 VT_PADTOP = 10,
5281 VT_PADBOTTOM = 12,
5282 VT_PADFRONT = 14,
5283 VT_PADBACK = 16,
5284 VT_POOLWIDTH = 18,
5285 VT_POOLHEIGHT = 20,
5286 VT_POOLDEPTH = 22,
5287 VT_STRIDEX = 24,
5288 VT_STRIDEY = 26,
5289 VT_STRIDEZ = 28,
5290 VT_OUTPUTSHAPEROUNDING = 30,
5291 VT_PADDINGMETHOD = 32,
5292 VT_DATALAYOUT = 34
5293 };
5294 armnnSerializer::PoolingAlgorithm poolType() const {
5295 return static_cast<armnnSerializer::PoolingAlgorithm>(GetField<int8_t>(VT_POOLTYPE, 0));
5296 }
5297 uint32_t padLeft() const {
5298 return GetField<uint32_t>(VT_PADLEFT, 0);
5299 }
5300 uint32_t padRight() const {
5301 return GetField<uint32_t>(VT_PADRIGHT, 0);
5302 }
5303 uint32_t padTop() const {
5304 return GetField<uint32_t>(VT_PADTOP, 0);
5305 }
5306 uint32_t padBottom() const {
5307 return GetField<uint32_t>(VT_PADBOTTOM, 0);
5308 }
5309 uint32_t padFront() const {
5310 return GetField<uint32_t>(VT_PADFRONT, 0);
5311 }
5312 uint32_t padBack() const {
5313 return GetField<uint32_t>(VT_PADBACK, 0);
5314 }
5315 uint32_t poolWidth() const {
5316 return GetField<uint32_t>(VT_POOLWIDTH, 0);
5317 }
5318 uint32_t poolHeight() const {
5319 return GetField<uint32_t>(VT_POOLHEIGHT, 0);
5320 }
5321 uint32_t poolDepth() const {
5322 return GetField<uint32_t>(VT_POOLDEPTH, 0);
5323 }
5324 uint32_t strideX() const {
5325 return GetField<uint32_t>(VT_STRIDEX, 0);
5326 }
5327 uint32_t strideY() const {
5328 return GetField<uint32_t>(VT_STRIDEY, 0);
5329 }
5330 uint32_t strideZ() const {
5331 return GetField<uint32_t>(VT_STRIDEZ, 0);
5332 }
5333 armnnSerializer::OutputShapeRounding outputShapeRounding() const {
5334 return static_cast<armnnSerializer::OutputShapeRounding>(GetField<int8_t>(VT_OUTPUTSHAPEROUNDING, 0));
5335 }
5336 armnnSerializer::PaddingMethod paddingMethod() const {
5337 return static_cast<armnnSerializer::PaddingMethod>(GetField<int8_t>(VT_PADDINGMETHOD, 0));
5338 }
5339 armnnSerializer::DataLayout dataLayout() const {
5340 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
5341 }
5342 bool Verify(flatbuffers::Verifier &verifier) const {
5343 return VerifyTableStart(verifier) &&
5344 VerifyField<int8_t>(verifier, VT_POOLTYPE, 1) &&
5345 VerifyField<uint32_t>(verifier, VT_PADLEFT, 4) &&
5346 VerifyField<uint32_t>(verifier, VT_PADRIGHT, 4) &&
5347 VerifyField<uint32_t>(verifier, VT_PADTOP, 4) &&
5348 VerifyField<uint32_t>(verifier, VT_PADBOTTOM, 4) &&
5349 VerifyField<uint32_t>(verifier, VT_PADFRONT, 4) &&
5350 VerifyField<uint32_t>(verifier, VT_PADBACK, 4) &&
5351 VerifyField<uint32_t>(verifier, VT_POOLWIDTH, 4) &&
5352 VerifyField<uint32_t>(verifier, VT_POOLHEIGHT, 4) &&
5353 VerifyField<uint32_t>(verifier, VT_POOLDEPTH, 4) &&
5354 VerifyField<uint32_t>(verifier, VT_STRIDEX, 4) &&
5355 VerifyField<uint32_t>(verifier, VT_STRIDEY, 4) &&
5356 VerifyField<uint32_t>(verifier, VT_STRIDEZ, 4) &&
5357 VerifyField<int8_t>(verifier, VT_OUTPUTSHAPEROUNDING, 1) &&
5358 VerifyField<int8_t>(verifier, VT_PADDINGMETHOD, 1) &&
5359 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
5360 verifier.EndTable();
5361 }
5362 };
5363
5364 struct Pooling3dDescriptorBuilder {
5365 typedef Pooling3dDescriptor Table;
5366 flatbuffers::FlatBufferBuilder &fbb_;
5367 flatbuffers::uoffset_t start_;
5368 void add_poolType(armnnSerializer::PoolingAlgorithm poolType) {
5369 fbb_.AddElement<int8_t>(Pooling3dDescriptor::VT_POOLTYPE, static_cast<int8_t>(poolType), 0);
5370 }
5371 void add_padLeft(uint32_t padLeft) {
5372 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_PADLEFT, padLeft, 0);
5373 }
5374 void add_padRight(uint32_t padRight) {
5375 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_PADRIGHT, padRight, 0);
5376 }
5377 void add_padTop(uint32_t padTop) {
5378 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_PADTOP, padTop, 0);
5379 }
5380 void add_padBottom(uint32_t padBottom) {
5381 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_PADBOTTOM, padBottom, 0);
5382 }
5383 void add_padFront(uint32_t padFront) {
5384 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_PADFRONT, padFront, 0);
5385 }
5386 void add_padBack(uint32_t padBack) {
5387 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_PADBACK, padBack, 0);
5388 }
5389 void add_poolWidth(uint32_t poolWidth) {
5390 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_POOLWIDTH, poolWidth, 0);
5391 }
5392 void add_poolHeight(uint32_t poolHeight) {
5393 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_POOLHEIGHT, poolHeight, 0);
5394 }
5395 void add_poolDepth(uint32_t poolDepth) {
5396 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_POOLDEPTH, poolDepth, 0);
5397 }
5398 void add_strideX(uint32_t strideX) {
5399 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_STRIDEX, strideX, 0);
5400 }
5401 void add_strideY(uint32_t strideY) {
5402 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_STRIDEY, strideY, 0);
5403 }
5404 void add_strideZ(uint32_t strideZ) {
5405 fbb_.AddElement<uint32_t>(Pooling3dDescriptor::VT_STRIDEZ, strideZ, 0);
5406 }
5407 void add_outputShapeRounding(armnnSerializer::OutputShapeRounding outputShapeRounding) {
5408 fbb_.AddElement<int8_t>(Pooling3dDescriptor::VT_OUTPUTSHAPEROUNDING, static_cast<int8_t>(outputShapeRounding), 0);
5409 }
5410 void add_paddingMethod(armnnSerializer::PaddingMethod paddingMethod) {
5411 fbb_.AddElement<int8_t>(Pooling3dDescriptor::VT_PADDINGMETHOD, static_cast<int8_t>(paddingMethod), 0);
5412 }
5413 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
5414 fbb_.AddElement<int8_t>(Pooling3dDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
5415 }
5416 explicit Pooling3dDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5417 : fbb_(_fbb) {
5418 start_ = fbb_.StartTable();
5419 }
5420 flatbuffers::Offset<Pooling3dDescriptor> Finish() {
5421 const auto end = fbb_.EndTable(start_);
5422 auto o = flatbuffers::Offset<Pooling3dDescriptor>(end);
5423 return o;
5424 }
5425 };
5426
5427 inline flatbuffers::Offset<Pooling3dDescriptor> CreatePooling3dDescriptor(
5428 flatbuffers::FlatBufferBuilder &_fbb,
5429 armnnSerializer::PoolingAlgorithm poolType = armnnSerializer::PoolingAlgorithm_Max,
5430 uint32_t padLeft = 0,
5431 uint32_t padRight = 0,
5432 uint32_t padTop = 0,
5433 uint32_t padBottom = 0,
5434 uint32_t padFront = 0,
5435 uint32_t padBack = 0,
5436 uint32_t poolWidth = 0,
5437 uint32_t poolHeight = 0,
5438 uint32_t poolDepth = 0,
5439 uint32_t strideX = 0,
5440 uint32_t strideY = 0,
5441 uint32_t strideZ = 0,
5442 armnnSerializer::OutputShapeRounding outputShapeRounding = armnnSerializer::OutputShapeRounding_Floor,
5443 armnnSerializer::PaddingMethod paddingMethod = armnnSerializer::PaddingMethod_IgnoreValue,
5444 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
5445 Pooling3dDescriptorBuilder builder_(_fbb);
5446 builder_.add_strideZ(strideZ);
5447 builder_.add_strideY(strideY);
5448 builder_.add_strideX(strideX);
5449 builder_.add_poolDepth(poolDepth);
5450 builder_.add_poolHeight(poolHeight);
5451 builder_.add_poolWidth(poolWidth);
5452 builder_.add_padBack(padBack);
5453 builder_.add_padFront(padFront);
5454 builder_.add_padBottom(padBottom);
5455 builder_.add_padTop(padTop);
5456 builder_.add_padRight(padRight);
5457 builder_.add_padLeft(padLeft);
5458 builder_.add_dataLayout(dataLayout);
5459 builder_.add_paddingMethod(paddingMethod);
5460 builder_.add_outputShapeRounding(outputShapeRounding);
5461 builder_.add_poolType(poolType);
5462 return builder_.Finish();
5463 }
5464
5465 struct QuantizeLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5466 typedef QuantizeLayerBuilder Builder;
5467 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5468 VT_BASE = 4
5469 };
5470 const armnnSerializer::LayerBase *base() const {
5471 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
5472 }
5473 bool Verify(flatbuffers::Verifier &verifier) const {
5474 return VerifyTableStart(verifier) &&
5475 VerifyOffset(verifier, VT_BASE) &&
5476 verifier.VerifyTable(base()) &&
5477 verifier.EndTable();
5478 }
5479 };
5480
5481 struct QuantizeLayerBuilder {
5482 typedef QuantizeLayer Table;
5483 flatbuffers::FlatBufferBuilder &fbb_;
5484 flatbuffers::uoffset_t start_;
5485 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
5486 fbb_.AddOffset(QuantizeLayer::VT_BASE, base);
5487 }
5488 explicit QuantizeLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5489 : fbb_(_fbb) {
5490 start_ = fbb_.StartTable();
5491 }
5492 flatbuffers::Offset<QuantizeLayer> Finish() {
5493 const auto end = fbb_.EndTable(start_);
5494 auto o = flatbuffers::Offset<QuantizeLayer>(end);
5495 return o;
5496 }
5497 };
5498
5499 inline flatbuffers::Offset<QuantizeLayer> CreateQuantizeLayer(
5500 flatbuffers::FlatBufferBuilder &_fbb,
5501 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
5502 QuantizeLayerBuilder builder_(_fbb);
5503 builder_.add_base(base);
5504 return builder_.Finish();
5505 }
5506
5507 struct SoftmaxLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5508 typedef SoftmaxLayerBuilder Builder;
5509 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5510 VT_BASE = 4,
5511 VT_DESCRIPTOR = 6
5512 };
5513 const armnnSerializer::LayerBase *base() const {
5514 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
5515 }
5516 const armnnSerializer::SoftmaxDescriptor *descriptor() const {
5517 return GetPointer<const armnnSerializer::SoftmaxDescriptor *>(VT_DESCRIPTOR);
5518 }
5519 bool Verify(flatbuffers::Verifier &verifier) const {
5520 return VerifyTableStart(verifier) &&
5521 VerifyOffset(verifier, VT_BASE) &&
5522 verifier.VerifyTable(base()) &&
5523 VerifyOffset(verifier, VT_DESCRIPTOR) &&
5524 verifier.VerifyTable(descriptor()) &&
5525 verifier.EndTable();
5526 }
5527 };
5528
5529 struct SoftmaxLayerBuilder {
5530 typedef SoftmaxLayer Table;
5531 flatbuffers::FlatBufferBuilder &fbb_;
5532 flatbuffers::uoffset_t start_;
5533 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
5534 fbb_.AddOffset(SoftmaxLayer::VT_BASE, base);
5535 }
5536 void add_descriptor(flatbuffers::Offset<armnnSerializer::SoftmaxDescriptor> descriptor) {
5537 fbb_.AddOffset(SoftmaxLayer::VT_DESCRIPTOR, descriptor);
5538 }
5539 explicit SoftmaxLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5540 : fbb_(_fbb) {
5541 start_ = fbb_.StartTable();
5542 }
5543 flatbuffers::Offset<SoftmaxLayer> Finish() {
5544 const auto end = fbb_.EndTable(start_);
5545 auto o = flatbuffers::Offset<SoftmaxLayer>(end);
5546 return o;
5547 }
5548 };
5549
5550 inline flatbuffers::Offset<SoftmaxLayer> CreateSoftmaxLayer(
5551 flatbuffers::FlatBufferBuilder &_fbb,
5552 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
5553 flatbuffers::Offset<armnnSerializer::SoftmaxDescriptor> descriptor = 0) {
5554 SoftmaxLayerBuilder builder_(_fbb);
5555 builder_.add_descriptor(descriptor);
5556 builder_.add_base(base);
5557 return builder_.Finish();
5558 }
5559
5560 struct SoftmaxDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5561 typedef SoftmaxDescriptorBuilder Builder;
5562 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5563 VT_BETA = 4,
5564 VT_AXIS = 6
5565 };
5566 float beta() const {
5567 return GetField<float>(VT_BETA, 0.0f);
5568 }
5569 int32_t axis() const {
5570 return GetField<int32_t>(VT_AXIS, -1);
5571 }
5572 bool Verify(flatbuffers::Verifier &verifier) const {
5573 return VerifyTableStart(verifier) &&
5574 VerifyField<float>(verifier, VT_BETA, 4) &&
5575 VerifyField<int32_t>(verifier, VT_AXIS, 4) &&
5576 verifier.EndTable();
5577 }
5578 };
5579
5580 struct SoftmaxDescriptorBuilder {
5581 typedef SoftmaxDescriptor Table;
5582 flatbuffers::FlatBufferBuilder &fbb_;
5583 flatbuffers::uoffset_t start_;
5584 void add_beta(float beta) {
5585 fbb_.AddElement<float>(SoftmaxDescriptor::VT_BETA, beta, 0.0f);
5586 }
5587 void add_axis(int32_t axis) {
5588 fbb_.AddElement<int32_t>(SoftmaxDescriptor::VT_AXIS, axis, -1);
5589 }
5590 explicit SoftmaxDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5591 : fbb_(_fbb) {
5592 start_ = fbb_.StartTable();
5593 }
5594 flatbuffers::Offset<SoftmaxDescriptor> Finish() {
5595 const auto end = fbb_.EndTable(start_);
5596 auto o = flatbuffers::Offset<SoftmaxDescriptor>(end);
5597 return o;
5598 }
5599 };
5600
5601 inline flatbuffers::Offset<SoftmaxDescriptor> CreateSoftmaxDescriptor(
5602 flatbuffers::FlatBufferBuilder &_fbb,
5603 float beta = 0.0f,
5604 int32_t axis = -1) {
5605 SoftmaxDescriptorBuilder builder_(_fbb);
5606 builder_.add_axis(axis);
5607 builder_.add_beta(beta);
5608 return builder_.Finish();
5609 }
5610
5611 struct DepthwiseConvolution2dLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5612 typedef DepthwiseConvolution2dLayerBuilder Builder;
5613 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5614 VT_BASE = 4,
5615 VT_DESCRIPTOR = 6,
5616 VT_WEIGHTS = 8,
5617 VT_BIASES = 10
5618 };
5619 const armnnSerializer::LayerBase *base() const {
5620 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
5621 }
5622 const armnnSerializer::DepthwiseConvolution2dDescriptor *descriptor() const {
5623 return GetPointer<const armnnSerializer::DepthwiseConvolution2dDescriptor *>(VT_DESCRIPTOR);
5624 }
5625 const armnnSerializer::ConstTensor *weights() const {
5626 return GetPointer<const armnnSerializer::ConstTensor *>(VT_WEIGHTS);
5627 }
5628 const armnnSerializer::ConstTensor *biases() const {
5629 return GetPointer<const armnnSerializer::ConstTensor *>(VT_BIASES);
5630 }
5631 bool Verify(flatbuffers::Verifier &verifier) const {
5632 return VerifyTableStart(verifier) &&
5633 VerifyOffset(verifier, VT_BASE) &&
5634 verifier.VerifyTable(base()) &&
5635 VerifyOffset(verifier, VT_DESCRIPTOR) &&
5636 verifier.VerifyTable(descriptor()) &&
5637 VerifyOffset(verifier, VT_WEIGHTS) &&
5638 verifier.VerifyTable(weights()) &&
5639 VerifyOffset(verifier, VT_BIASES) &&
5640 verifier.VerifyTable(biases()) &&
5641 verifier.EndTable();
5642 }
5643 };
5644
5645 struct DepthwiseConvolution2dLayerBuilder {
5646 typedef DepthwiseConvolution2dLayer Table;
5647 flatbuffers::FlatBufferBuilder &fbb_;
5648 flatbuffers::uoffset_t start_;
5649 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
5650 fbb_.AddOffset(DepthwiseConvolution2dLayer::VT_BASE, base);
5651 }
5652 void add_descriptor(flatbuffers::Offset<armnnSerializer::DepthwiseConvolution2dDescriptor> descriptor) {
5653 fbb_.AddOffset(DepthwiseConvolution2dLayer::VT_DESCRIPTOR, descriptor);
5654 }
5655 void add_weights(flatbuffers::Offset<armnnSerializer::ConstTensor> weights) {
5656 fbb_.AddOffset(DepthwiseConvolution2dLayer::VT_WEIGHTS, weights);
5657 }
5658 void add_biases(flatbuffers::Offset<armnnSerializer::ConstTensor> biases) {
5659 fbb_.AddOffset(DepthwiseConvolution2dLayer::VT_BIASES, biases);
5660 }
5661 explicit DepthwiseConvolution2dLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5662 : fbb_(_fbb) {
5663 start_ = fbb_.StartTable();
5664 }
5665 flatbuffers::Offset<DepthwiseConvolution2dLayer> Finish() {
5666 const auto end = fbb_.EndTable(start_);
5667 auto o = flatbuffers::Offset<DepthwiseConvolution2dLayer>(end);
5668 return o;
5669 }
5670 };
5671
5672 inline flatbuffers::Offset<DepthwiseConvolution2dLayer> CreateDepthwiseConvolution2dLayer(
5673 flatbuffers::FlatBufferBuilder &_fbb,
5674 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
5675 flatbuffers::Offset<armnnSerializer::DepthwiseConvolution2dDescriptor> descriptor = 0,
5676 flatbuffers::Offset<armnnSerializer::ConstTensor> weights = 0,
5677 flatbuffers::Offset<armnnSerializer::ConstTensor> biases = 0) {
5678 DepthwiseConvolution2dLayerBuilder builder_(_fbb);
5679 builder_.add_biases(biases);
5680 builder_.add_weights(weights);
5681 builder_.add_descriptor(descriptor);
5682 builder_.add_base(base);
5683 return builder_.Finish();
5684 }
5685
5686 struct DepthwiseConvolution2dDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5687 typedef DepthwiseConvolution2dDescriptorBuilder Builder;
5688 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5689 VT_PADLEFT = 4,
5690 VT_PADRIGHT = 6,
5691 VT_PADTOP = 8,
5692 VT_PADBOTTOM = 10,
5693 VT_STRIDEX = 12,
5694 VT_STRIDEY = 14,
5695 VT_DILATIONX = 16,
5696 VT_DILATIONY = 18,
5697 VT_BIASENABLED = 20,
5698 VT_DATALAYOUT = 22
5699 };
5700 uint32_t padLeft() const {
5701 return GetField<uint32_t>(VT_PADLEFT, 0);
5702 }
5703 uint32_t padRight() const {
5704 return GetField<uint32_t>(VT_PADRIGHT, 0);
5705 }
5706 uint32_t padTop() const {
5707 return GetField<uint32_t>(VT_PADTOP, 0);
5708 }
5709 uint32_t padBottom() const {
5710 return GetField<uint32_t>(VT_PADBOTTOM, 0);
5711 }
5712 uint32_t strideX() const {
5713 return GetField<uint32_t>(VT_STRIDEX, 0);
5714 }
5715 uint32_t strideY() const {
5716 return GetField<uint32_t>(VT_STRIDEY, 0);
5717 }
5718 uint32_t dilationX() const {
5719 return GetField<uint32_t>(VT_DILATIONX, 1);
5720 }
5721 uint32_t dilationY() const {
5722 return GetField<uint32_t>(VT_DILATIONY, 1);
5723 }
5724 bool biasEnabled() const {
5725 return GetField<uint8_t>(VT_BIASENABLED, 0) != 0;
5726 }
5727 armnnSerializer::DataLayout dataLayout() const {
5728 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 1));
5729 }
5730 bool Verify(flatbuffers::Verifier &verifier) const {
5731 return VerifyTableStart(verifier) &&
5732 VerifyField<uint32_t>(verifier, VT_PADLEFT, 4) &&
5733 VerifyField<uint32_t>(verifier, VT_PADRIGHT, 4) &&
5734 VerifyField<uint32_t>(verifier, VT_PADTOP, 4) &&
5735 VerifyField<uint32_t>(verifier, VT_PADBOTTOM, 4) &&
5736 VerifyField<uint32_t>(verifier, VT_STRIDEX, 4) &&
5737 VerifyField<uint32_t>(verifier, VT_STRIDEY, 4) &&
5738 VerifyField<uint32_t>(verifier, VT_DILATIONX, 4) &&
5739 VerifyField<uint32_t>(verifier, VT_DILATIONY, 4) &&
5740 VerifyField<uint8_t>(verifier, VT_BIASENABLED, 1) &&
5741 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
5742 verifier.EndTable();
5743 }
5744 };
5745
5746 struct DepthwiseConvolution2dDescriptorBuilder {
5747 typedef DepthwiseConvolution2dDescriptor Table;
5748 flatbuffers::FlatBufferBuilder &fbb_;
5749 flatbuffers::uoffset_t start_;
5750 void add_padLeft(uint32_t padLeft) {
5751 fbb_.AddElement<uint32_t>(DepthwiseConvolution2dDescriptor::VT_PADLEFT, padLeft, 0);
5752 }
5753 void add_padRight(uint32_t padRight) {
5754 fbb_.AddElement<uint32_t>(DepthwiseConvolution2dDescriptor::VT_PADRIGHT, padRight, 0);
5755 }
5756 void add_padTop(uint32_t padTop) {
5757 fbb_.AddElement<uint32_t>(DepthwiseConvolution2dDescriptor::VT_PADTOP, padTop, 0);
5758 }
5759 void add_padBottom(uint32_t padBottom) {
5760 fbb_.AddElement<uint32_t>(DepthwiseConvolution2dDescriptor::VT_PADBOTTOM, padBottom, 0);
5761 }
5762 void add_strideX(uint32_t strideX) {
5763 fbb_.AddElement<uint32_t>(DepthwiseConvolution2dDescriptor::VT_STRIDEX, strideX, 0);
5764 }
5765 void add_strideY(uint32_t strideY) {
5766 fbb_.AddElement<uint32_t>(DepthwiseConvolution2dDescriptor::VT_STRIDEY, strideY, 0);
5767 }
5768 void add_dilationX(uint32_t dilationX) {
5769 fbb_.AddElement<uint32_t>(DepthwiseConvolution2dDescriptor::VT_DILATIONX, dilationX, 1);
5770 }
5771 void add_dilationY(uint32_t dilationY) {
5772 fbb_.AddElement<uint32_t>(DepthwiseConvolution2dDescriptor::VT_DILATIONY, dilationY, 1);
5773 }
5774 void add_biasEnabled(bool biasEnabled) {
5775 fbb_.AddElement<uint8_t>(DepthwiseConvolution2dDescriptor::VT_BIASENABLED, static_cast<uint8_t>(biasEnabled), 0);
5776 }
5777 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
5778 fbb_.AddElement<int8_t>(DepthwiseConvolution2dDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 1);
5779 }
5780 explicit DepthwiseConvolution2dDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5781 : fbb_(_fbb) {
5782 start_ = fbb_.StartTable();
5783 }
5784 flatbuffers::Offset<DepthwiseConvolution2dDescriptor> Finish() {
5785 const auto end = fbb_.EndTable(start_);
5786 auto o = flatbuffers::Offset<DepthwiseConvolution2dDescriptor>(end);
5787 return o;
5788 }
5789 };
5790
5791 inline flatbuffers::Offset<DepthwiseConvolution2dDescriptor> CreateDepthwiseConvolution2dDescriptor(
5792 flatbuffers::FlatBufferBuilder &_fbb,
5793 uint32_t padLeft = 0,
5794 uint32_t padRight = 0,
5795 uint32_t padTop = 0,
5796 uint32_t padBottom = 0,
5797 uint32_t strideX = 0,
5798 uint32_t strideY = 0,
5799 uint32_t dilationX = 1,
5800 uint32_t dilationY = 1,
5801 bool biasEnabled = false,
5802 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NCHW) {
5803 DepthwiseConvolution2dDescriptorBuilder builder_(_fbb);
5804 builder_.add_dilationY(dilationY);
5805 builder_.add_dilationX(dilationX);
5806 builder_.add_strideY(strideY);
5807 builder_.add_strideX(strideX);
5808 builder_.add_padBottom(padBottom);
5809 builder_.add_padTop(padTop);
5810 builder_.add_padRight(padRight);
5811 builder_.add_padLeft(padLeft);
5812 builder_.add_dataLayout(dataLayout);
5813 builder_.add_biasEnabled(biasEnabled);
5814 return builder_.Finish();
5815 }
5816
5817 struct OutputLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5818 typedef OutputLayerBuilder Builder;
5819 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5820 VT_BASE = 4
5821 };
5822 const armnnSerializer::BindableLayerBase *base() const {
5823 return GetPointer<const armnnSerializer::BindableLayerBase *>(VT_BASE);
5824 }
5825 bool Verify(flatbuffers::Verifier &verifier) const {
5826 return VerifyTableStart(verifier) &&
5827 VerifyOffset(verifier, VT_BASE) &&
5828 verifier.VerifyTable(base()) &&
5829 verifier.EndTable();
5830 }
5831 };
5832
5833 struct OutputLayerBuilder {
5834 typedef OutputLayer Table;
5835 flatbuffers::FlatBufferBuilder &fbb_;
5836 flatbuffers::uoffset_t start_;
5837 void add_base(flatbuffers::Offset<armnnSerializer::BindableLayerBase> base) {
5838 fbb_.AddOffset(OutputLayer::VT_BASE, base);
5839 }
5840 explicit OutputLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5841 : fbb_(_fbb) {
5842 start_ = fbb_.StartTable();
5843 }
5844 flatbuffers::Offset<OutputLayer> Finish() {
5845 const auto end = fbb_.EndTable(start_);
5846 auto o = flatbuffers::Offset<OutputLayer>(end);
5847 return o;
5848 }
5849 };
5850
5851 inline flatbuffers::Offset<OutputLayer> CreateOutputLayer(
5852 flatbuffers::FlatBufferBuilder &_fbb,
5853 flatbuffers::Offset<armnnSerializer::BindableLayerBase> base = 0) {
5854 OutputLayerBuilder builder_(_fbb);
5855 builder_.add_base(base);
5856 return builder_.Finish();
5857 }
5858
5859 struct ReshapeLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5860 typedef ReshapeLayerBuilder Builder;
5861 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5862 VT_BASE = 4,
5863 VT_DESCRIPTOR = 6
5864 };
5865 const armnnSerializer::LayerBase *base() const {
5866 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
5867 }
5868 const armnnSerializer::ReshapeDescriptor *descriptor() const {
5869 return GetPointer<const armnnSerializer::ReshapeDescriptor *>(VT_DESCRIPTOR);
5870 }
5871 bool Verify(flatbuffers::Verifier &verifier) const {
5872 return VerifyTableStart(verifier) &&
5873 VerifyOffset(verifier, VT_BASE) &&
5874 verifier.VerifyTable(base()) &&
5875 VerifyOffset(verifier, VT_DESCRIPTOR) &&
5876 verifier.VerifyTable(descriptor()) &&
5877 verifier.EndTable();
5878 }
5879 };
5880
5881 struct ReshapeLayerBuilder {
5882 typedef ReshapeLayer Table;
5883 flatbuffers::FlatBufferBuilder &fbb_;
5884 flatbuffers::uoffset_t start_;
5885 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
5886 fbb_.AddOffset(ReshapeLayer::VT_BASE, base);
5887 }
5888 void add_descriptor(flatbuffers::Offset<armnnSerializer::ReshapeDescriptor> descriptor) {
5889 fbb_.AddOffset(ReshapeLayer::VT_DESCRIPTOR, descriptor);
5890 }
5891 explicit ReshapeLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5892 : fbb_(_fbb) {
5893 start_ = fbb_.StartTable();
5894 }
5895 flatbuffers::Offset<ReshapeLayer> Finish() {
5896 const auto end = fbb_.EndTable(start_);
5897 auto o = flatbuffers::Offset<ReshapeLayer>(end);
5898 return o;
5899 }
5900 };
5901
5902 inline flatbuffers::Offset<ReshapeLayer> CreateReshapeLayer(
5903 flatbuffers::FlatBufferBuilder &_fbb,
5904 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
5905 flatbuffers::Offset<armnnSerializer::ReshapeDescriptor> descriptor = 0) {
5906 ReshapeLayerBuilder builder_(_fbb);
5907 builder_.add_descriptor(descriptor);
5908 builder_.add_base(base);
5909 return builder_.Finish();
5910 }
5911
5912 struct ReshapeDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5913 typedef ReshapeDescriptorBuilder Builder;
5914 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5915 VT_TARGETSHAPE = 4
5916 };
5917 const flatbuffers::Vector<uint32_t> *targetShape() const {
5918 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_TARGETSHAPE);
5919 }
5920 bool Verify(flatbuffers::Verifier &verifier) const {
5921 return VerifyTableStart(verifier) &&
5922 VerifyOffset(verifier, VT_TARGETSHAPE) &&
5923 verifier.VerifyVector(targetShape()) &&
5924 verifier.EndTable();
5925 }
5926 };
5927
5928 struct ReshapeDescriptorBuilder {
5929 typedef ReshapeDescriptor Table;
5930 flatbuffers::FlatBufferBuilder &fbb_;
5931 flatbuffers::uoffset_t start_;
5932 void add_targetShape(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> targetShape) {
5933 fbb_.AddOffset(ReshapeDescriptor::VT_TARGETSHAPE, targetShape);
5934 }
5935 explicit ReshapeDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5936 : fbb_(_fbb) {
5937 start_ = fbb_.StartTable();
5938 }
5939 flatbuffers::Offset<ReshapeDescriptor> Finish() {
5940 const auto end = fbb_.EndTable(start_);
5941 auto o = flatbuffers::Offset<ReshapeDescriptor>(end);
5942 return o;
5943 }
5944 };
5945
5946 inline flatbuffers::Offset<ReshapeDescriptor> CreateReshapeDescriptor(
5947 flatbuffers::FlatBufferBuilder &_fbb,
5948 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> targetShape = 0) {
5949 ReshapeDescriptorBuilder builder_(_fbb);
5950 builder_.add_targetShape(targetShape);
5951 return builder_.Finish();
5952 }
5953
5954 inline flatbuffers::Offset<ReshapeDescriptor> CreateReshapeDescriptorDirect(
5955 flatbuffers::FlatBufferBuilder &_fbb,
5956 const std::vector<uint32_t> *targetShape = nullptr) {
5957 auto targetShape__ = targetShape ? _fbb.CreateVector<uint32_t>(*targetShape) : 0;
5958 return armnnSerializer::CreateReshapeDescriptor(
5959 _fbb,
5960 targetShape__);
5961 }
5962
5963 struct PermuteLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
5964 typedef PermuteLayerBuilder Builder;
5965 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
5966 VT_BASE = 4,
5967 VT_DESCRIPTOR = 6
5968 };
5969 const armnnSerializer::LayerBase *base() const {
5970 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
5971 }
5972 const armnnSerializer::PermuteDescriptor *descriptor() const {
5973 return GetPointer<const armnnSerializer::PermuteDescriptor *>(VT_DESCRIPTOR);
5974 }
5975 bool Verify(flatbuffers::Verifier &verifier) const {
5976 return VerifyTableStart(verifier) &&
5977 VerifyOffset(verifier, VT_BASE) &&
5978 verifier.VerifyTable(base()) &&
5979 VerifyOffset(verifier, VT_DESCRIPTOR) &&
5980 verifier.VerifyTable(descriptor()) &&
5981 verifier.EndTable();
5982 }
5983 };
5984
5985 struct PermuteLayerBuilder {
5986 typedef PermuteLayer Table;
5987 flatbuffers::FlatBufferBuilder &fbb_;
5988 flatbuffers::uoffset_t start_;
5989 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
5990 fbb_.AddOffset(PermuteLayer::VT_BASE, base);
5991 }
5992 void add_descriptor(flatbuffers::Offset<armnnSerializer::PermuteDescriptor> descriptor) {
5993 fbb_.AddOffset(PermuteLayer::VT_DESCRIPTOR, descriptor);
5994 }
5995 explicit PermuteLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
5996 : fbb_(_fbb) {
5997 start_ = fbb_.StartTable();
5998 }
5999 flatbuffers::Offset<PermuteLayer> Finish() {
6000 const auto end = fbb_.EndTable(start_);
6001 auto o = flatbuffers::Offset<PermuteLayer>(end);
6002 return o;
6003 }
6004 };
6005
6006 inline flatbuffers::Offset<PermuteLayer> CreatePermuteLayer(
6007 flatbuffers::FlatBufferBuilder &_fbb,
6008 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
6009 flatbuffers::Offset<armnnSerializer::PermuteDescriptor> descriptor = 0) {
6010 PermuteLayerBuilder builder_(_fbb);
6011 builder_.add_descriptor(descriptor);
6012 builder_.add_base(base);
6013 return builder_.Finish();
6014 }
6015
6016 struct PermuteDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6017 typedef PermuteDescriptorBuilder Builder;
6018 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6019 VT_DIMMAPPINGS = 4
6020 };
6021 const flatbuffers::Vector<uint32_t> *dimMappings() const {
6022 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_DIMMAPPINGS);
6023 }
6024 bool Verify(flatbuffers::Verifier &verifier) const {
6025 return VerifyTableStart(verifier) &&
6026 VerifyOffset(verifier, VT_DIMMAPPINGS) &&
6027 verifier.VerifyVector(dimMappings()) &&
6028 verifier.EndTable();
6029 }
6030 };
6031
6032 struct PermuteDescriptorBuilder {
6033 typedef PermuteDescriptor Table;
6034 flatbuffers::FlatBufferBuilder &fbb_;
6035 flatbuffers::uoffset_t start_;
6036 void add_dimMappings(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> dimMappings) {
6037 fbb_.AddOffset(PermuteDescriptor::VT_DIMMAPPINGS, dimMappings);
6038 }
6039 explicit PermuteDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6040 : fbb_(_fbb) {
6041 start_ = fbb_.StartTable();
6042 }
6043 flatbuffers::Offset<PermuteDescriptor> Finish() {
6044 const auto end = fbb_.EndTable(start_);
6045 auto o = flatbuffers::Offset<PermuteDescriptor>(end);
6046 return o;
6047 }
6048 };
6049
6050 inline flatbuffers::Offset<PermuteDescriptor> CreatePermuteDescriptor(
6051 flatbuffers::FlatBufferBuilder &_fbb,
6052 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> dimMappings = 0) {
6053 PermuteDescriptorBuilder builder_(_fbb);
6054 builder_.add_dimMappings(dimMappings);
6055 return builder_.Finish();
6056 }
6057
6058 inline flatbuffers::Offset<PermuteDescriptor> CreatePermuteDescriptorDirect(
6059 flatbuffers::FlatBufferBuilder &_fbb,
6060 const std::vector<uint32_t> *dimMappings = nullptr) {
6061 auto dimMappings__ = dimMappings ? _fbb.CreateVector<uint32_t>(*dimMappings) : 0;
6062 return armnnSerializer::CreatePermuteDescriptor(
6063 _fbb,
6064 dimMappings__);
6065 }
6066
6067 struct ShapeLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6068 typedef ShapeLayerBuilder Builder;
6069 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6070 VT_BASE = 4
6071 };
6072 const armnnSerializer::LayerBase *base() const {
6073 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6074 }
6075 bool Verify(flatbuffers::Verifier &verifier) const {
6076 return VerifyTableStart(verifier) &&
6077 VerifyOffset(verifier, VT_BASE) &&
6078 verifier.VerifyTable(base()) &&
6079 verifier.EndTable();
6080 }
6081 };
6082
6083 struct ShapeLayerBuilder {
6084 typedef ShapeLayer Table;
6085 flatbuffers::FlatBufferBuilder &fbb_;
6086 flatbuffers::uoffset_t start_;
6087 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
6088 fbb_.AddOffset(ShapeLayer::VT_BASE, base);
6089 }
6090 explicit ShapeLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6091 : fbb_(_fbb) {
6092 start_ = fbb_.StartTable();
6093 }
6094 flatbuffers::Offset<ShapeLayer> Finish() {
6095 const auto end = fbb_.EndTable(start_);
6096 auto o = flatbuffers::Offset<ShapeLayer>(end);
6097 return o;
6098 }
6099 };
6100
6101 inline flatbuffers::Offset<ShapeLayer> CreateShapeLayer(
6102 flatbuffers::FlatBufferBuilder &_fbb,
6103 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
6104 ShapeLayerBuilder builder_(_fbb);
6105 builder_.add_base(base);
6106 return builder_.Finish();
6107 }
6108
6109 struct SpaceToBatchNdLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6110 typedef SpaceToBatchNdLayerBuilder Builder;
6111 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6112 VT_BASE = 4,
6113 VT_DESCRIPTOR = 6
6114 };
6115 const armnnSerializer::LayerBase *base() const {
6116 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6117 }
6118 const armnnSerializer::SpaceToBatchNdDescriptor *descriptor() const {
6119 return GetPointer<const armnnSerializer::SpaceToBatchNdDescriptor *>(VT_DESCRIPTOR);
6120 }
6121 bool Verify(flatbuffers::Verifier &verifier) const {
6122 return VerifyTableStart(verifier) &&
6123 VerifyOffset(verifier, VT_BASE) &&
6124 verifier.VerifyTable(base()) &&
6125 VerifyOffset(verifier, VT_DESCRIPTOR) &&
6126 verifier.VerifyTable(descriptor()) &&
6127 verifier.EndTable();
6128 }
6129 };
6130
6131 struct SpaceToBatchNdLayerBuilder {
6132 typedef SpaceToBatchNdLayer Table;
6133 flatbuffers::FlatBufferBuilder &fbb_;
6134 flatbuffers::uoffset_t start_;
6135 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
6136 fbb_.AddOffset(SpaceToBatchNdLayer::VT_BASE, base);
6137 }
6138 void add_descriptor(flatbuffers::Offset<armnnSerializer::SpaceToBatchNdDescriptor> descriptor) {
6139 fbb_.AddOffset(SpaceToBatchNdLayer::VT_DESCRIPTOR, descriptor);
6140 }
6141 explicit SpaceToBatchNdLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6142 : fbb_(_fbb) {
6143 start_ = fbb_.StartTable();
6144 }
6145 flatbuffers::Offset<SpaceToBatchNdLayer> Finish() {
6146 const auto end = fbb_.EndTable(start_);
6147 auto o = flatbuffers::Offset<SpaceToBatchNdLayer>(end);
6148 return o;
6149 }
6150 };
6151
6152 inline flatbuffers::Offset<SpaceToBatchNdLayer> CreateSpaceToBatchNdLayer(
6153 flatbuffers::FlatBufferBuilder &_fbb,
6154 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
6155 flatbuffers::Offset<armnnSerializer::SpaceToBatchNdDescriptor> descriptor = 0) {
6156 SpaceToBatchNdLayerBuilder builder_(_fbb);
6157 builder_.add_descriptor(descriptor);
6158 builder_.add_base(base);
6159 return builder_.Finish();
6160 }
6161
6162 struct SpaceToBatchNdDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6163 typedef SpaceToBatchNdDescriptorBuilder Builder;
6164 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6165 VT_BLOCKSHAPE = 4,
6166 VT_PADLIST = 6,
6167 VT_DATALAYOUT = 8
6168 };
6169 const flatbuffers::Vector<uint32_t> *blockShape() const {
6170 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_BLOCKSHAPE);
6171 }
6172 const flatbuffers::Vector<uint32_t> *padList() const {
6173 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_PADLIST);
6174 }
6175 armnnSerializer::DataLayout dataLayout() const {
6176 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
6177 }
6178 bool Verify(flatbuffers::Verifier &verifier) const {
6179 return VerifyTableStart(verifier) &&
6180 VerifyOffset(verifier, VT_BLOCKSHAPE) &&
6181 verifier.VerifyVector(blockShape()) &&
6182 VerifyOffset(verifier, VT_PADLIST) &&
6183 verifier.VerifyVector(padList()) &&
6184 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
6185 verifier.EndTable();
6186 }
6187 };
6188
6189 struct SpaceToBatchNdDescriptorBuilder {
6190 typedef SpaceToBatchNdDescriptor Table;
6191 flatbuffers::FlatBufferBuilder &fbb_;
6192 flatbuffers::uoffset_t start_;
6193 void add_blockShape(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> blockShape) {
6194 fbb_.AddOffset(SpaceToBatchNdDescriptor::VT_BLOCKSHAPE, blockShape);
6195 }
6196 void add_padList(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> padList) {
6197 fbb_.AddOffset(SpaceToBatchNdDescriptor::VT_PADLIST, padList);
6198 }
6199 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
6200 fbb_.AddElement<int8_t>(SpaceToBatchNdDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
6201 }
6202 explicit SpaceToBatchNdDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6203 : fbb_(_fbb) {
6204 start_ = fbb_.StartTable();
6205 }
6206 flatbuffers::Offset<SpaceToBatchNdDescriptor> Finish() {
6207 const auto end = fbb_.EndTable(start_);
6208 auto o = flatbuffers::Offset<SpaceToBatchNdDescriptor>(end);
6209 return o;
6210 }
6211 };
6212
6213 inline flatbuffers::Offset<SpaceToBatchNdDescriptor> CreateSpaceToBatchNdDescriptor(
6214 flatbuffers::FlatBufferBuilder &_fbb,
6215 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> blockShape = 0,
6216 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> padList = 0,
6217 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
6218 SpaceToBatchNdDescriptorBuilder builder_(_fbb);
6219 builder_.add_padList(padList);
6220 builder_.add_blockShape(blockShape);
6221 builder_.add_dataLayout(dataLayout);
6222 return builder_.Finish();
6223 }
6224
6225 inline flatbuffers::Offset<SpaceToBatchNdDescriptor> CreateSpaceToBatchNdDescriptorDirect(
6226 flatbuffers::FlatBufferBuilder &_fbb,
6227 const std::vector<uint32_t> *blockShape = nullptr,
6228 const std::vector<uint32_t> *padList = nullptr,
6229 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
6230 auto blockShape__ = blockShape ? _fbb.CreateVector<uint32_t>(*blockShape) : 0;
6231 auto padList__ = padList ? _fbb.CreateVector<uint32_t>(*padList) : 0;
6232 return armnnSerializer::CreateSpaceToBatchNdDescriptor(
6233 _fbb,
6234 blockShape__,
6235 padList__,
6236 dataLayout);
6237 }
6238
6239 struct SpaceToDepthLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6240 typedef SpaceToDepthLayerBuilder Builder;
6241 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6242 VT_BASE = 4,
6243 VT_DESCRIPTOR = 6
6244 };
6245 const armnnSerializer::LayerBase *base() const {
6246 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6247 }
6248 const armnnSerializer::SpaceToDepthDescriptor *descriptor() const {
6249 return GetPointer<const armnnSerializer::SpaceToDepthDescriptor *>(VT_DESCRIPTOR);
6250 }
6251 bool Verify(flatbuffers::Verifier &verifier) const {
6252 return VerifyTableStart(verifier) &&
6253 VerifyOffset(verifier, VT_BASE) &&
6254 verifier.VerifyTable(base()) &&
6255 VerifyOffset(verifier, VT_DESCRIPTOR) &&
6256 verifier.VerifyTable(descriptor()) &&
6257 verifier.EndTable();
6258 }
6259 };
6260
6261 struct SpaceToDepthLayerBuilder {
6262 typedef SpaceToDepthLayer Table;
6263 flatbuffers::FlatBufferBuilder &fbb_;
6264 flatbuffers::uoffset_t start_;
6265 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
6266 fbb_.AddOffset(SpaceToDepthLayer::VT_BASE, base);
6267 }
6268 void add_descriptor(flatbuffers::Offset<armnnSerializer::SpaceToDepthDescriptor> descriptor) {
6269 fbb_.AddOffset(SpaceToDepthLayer::VT_DESCRIPTOR, descriptor);
6270 }
6271 explicit SpaceToDepthLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6272 : fbb_(_fbb) {
6273 start_ = fbb_.StartTable();
6274 }
6275 flatbuffers::Offset<SpaceToDepthLayer> Finish() {
6276 const auto end = fbb_.EndTable(start_);
6277 auto o = flatbuffers::Offset<SpaceToDepthLayer>(end);
6278 return o;
6279 }
6280 };
6281
6282 inline flatbuffers::Offset<SpaceToDepthLayer> CreateSpaceToDepthLayer(
6283 flatbuffers::FlatBufferBuilder &_fbb,
6284 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
6285 flatbuffers::Offset<armnnSerializer::SpaceToDepthDescriptor> descriptor = 0) {
6286 SpaceToDepthLayerBuilder builder_(_fbb);
6287 builder_.add_descriptor(descriptor);
6288 builder_.add_base(base);
6289 return builder_.Finish();
6290 }
6291
6292 struct SpaceToDepthDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6293 typedef SpaceToDepthDescriptorBuilder Builder;
6294 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6295 VT_BLOCKSIZE = 4,
6296 VT_DATALAYOUT = 6
6297 };
6298 uint32_t blockSize() const {
6299 return GetField<uint32_t>(VT_BLOCKSIZE, 0);
6300 }
6301 armnnSerializer::DataLayout dataLayout() const {
6302 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
6303 }
6304 bool Verify(flatbuffers::Verifier &verifier) const {
6305 return VerifyTableStart(verifier) &&
6306 VerifyField<uint32_t>(verifier, VT_BLOCKSIZE, 4) &&
6307 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
6308 verifier.EndTable();
6309 }
6310 };
6311
6312 struct SpaceToDepthDescriptorBuilder {
6313 typedef SpaceToDepthDescriptor Table;
6314 flatbuffers::FlatBufferBuilder &fbb_;
6315 flatbuffers::uoffset_t start_;
6316 void add_blockSize(uint32_t blockSize) {
6317 fbb_.AddElement<uint32_t>(SpaceToDepthDescriptor::VT_BLOCKSIZE, blockSize, 0);
6318 }
6319 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
6320 fbb_.AddElement<int8_t>(SpaceToDepthDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
6321 }
6322 explicit SpaceToDepthDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6323 : fbb_(_fbb) {
6324 start_ = fbb_.StartTable();
6325 }
6326 flatbuffers::Offset<SpaceToDepthDescriptor> Finish() {
6327 const auto end = fbb_.EndTable(start_);
6328 auto o = flatbuffers::Offset<SpaceToDepthDescriptor>(end);
6329 return o;
6330 }
6331 };
6332
6333 inline flatbuffers::Offset<SpaceToDepthDescriptor> CreateSpaceToDepthDescriptor(
6334 flatbuffers::FlatBufferBuilder &_fbb,
6335 uint32_t blockSize = 0,
6336 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
6337 SpaceToDepthDescriptorBuilder builder_(_fbb);
6338 builder_.add_blockSize(blockSize);
6339 builder_.add_dataLayout(dataLayout);
6340 return builder_.Finish();
6341 }
6342
6343 struct SubtractionLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6344 typedef SubtractionLayerBuilder Builder;
6345 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6346 VT_BASE = 4
6347 };
6348 const armnnSerializer::LayerBase *base() const {
6349 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6350 }
6351 bool Verify(flatbuffers::Verifier &verifier) const {
6352 return VerifyTableStart(verifier) &&
6353 VerifyOffset(verifier, VT_BASE) &&
6354 verifier.VerifyTable(base()) &&
6355 verifier.EndTable();
6356 }
6357 };
6358
6359 struct SubtractionLayerBuilder {
6360 typedef SubtractionLayer Table;
6361 flatbuffers::FlatBufferBuilder &fbb_;
6362 flatbuffers::uoffset_t start_;
6363 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
6364 fbb_.AddOffset(SubtractionLayer::VT_BASE, base);
6365 }
6366 explicit SubtractionLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6367 : fbb_(_fbb) {
6368 start_ = fbb_.StartTable();
6369 }
6370 flatbuffers::Offset<SubtractionLayer> Finish() {
6371 const auto end = fbb_.EndTable(start_);
6372 auto o = flatbuffers::Offset<SubtractionLayer>(end);
6373 return o;
6374 }
6375 };
6376
6377 inline flatbuffers::Offset<SubtractionLayer> CreateSubtractionLayer(
6378 flatbuffers::FlatBufferBuilder &_fbb,
6379 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
6380 SubtractionLayerBuilder builder_(_fbb);
6381 builder_.add_base(base);
6382 return builder_.Finish();
6383 }
6384
6385 struct BatchToSpaceNdLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6386 typedef BatchToSpaceNdLayerBuilder Builder;
6387 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6388 VT_BASE = 4,
6389 VT_DESCRIPTOR = 6
6390 };
6391 const armnnSerializer::LayerBase *base() const {
6392 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6393 }
6394 const armnnSerializer::BatchToSpaceNdDescriptor *descriptor() const {
6395 return GetPointer<const armnnSerializer::BatchToSpaceNdDescriptor *>(VT_DESCRIPTOR);
6396 }
6397 bool Verify(flatbuffers::Verifier &verifier) const {
6398 return VerifyTableStart(verifier) &&
6399 VerifyOffset(verifier, VT_BASE) &&
6400 verifier.VerifyTable(base()) &&
6401 VerifyOffset(verifier, VT_DESCRIPTOR) &&
6402 verifier.VerifyTable(descriptor()) &&
6403 verifier.EndTable();
6404 }
6405 };
6406
6407 struct BatchToSpaceNdLayerBuilder {
6408 typedef BatchToSpaceNdLayer Table;
6409 flatbuffers::FlatBufferBuilder &fbb_;
6410 flatbuffers::uoffset_t start_;
6411 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
6412 fbb_.AddOffset(BatchToSpaceNdLayer::VT_BASE, base);
6413 }
6414 void add_descriptor(flatbuffers::Offset<armnnSerializer::BatchToSpaceNdDescriptor> descriptor) {
6415 fbb_.AddOffset(BatchToSpaceNdLayer::VT_DESCRIPTOR, descriptor);
6416 }
6417 explicit BatchToSpaceNdLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6418 : fbb_(_fbb) {
6419 start_ = fbb_.StartTable();
6420 }
6421 flatbuffers::Offset<BatchToSpaceNdLayer> Finish() {
6422 const auto end = fbb_.EndTable(start_);
6423 auto o = flatbuffers::Offset<BatchToSpaceNdLayer>(end);
6424 return o;
6425 }
6426 };
6427
6428 inline flatbuffers::Offset<BatchToSpaceNdLayer> CreateBatchToSpaceNdLayer(
6429 flatbuffers::FlatBufferBuilder &_fbb,
6430 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
6431 flatbuffers::Offset<armnnSerializer::BatchToSpaceNdDescriptor> descriptor = 0) {
6432 BatchToSpaceNdLayerBuilder builder_(_fbb);
6433 builder_.add_descriptor(descriptor);
6434 builder_.add_base(base);
6435 return builder_.Finish();
6436 }
6437
6438 struct BatchToSpaceNdDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6439 typedef BatchToSpaceNdDescriptorBuilder Builder;
6440 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6441 VT_BLOCKSHAPE = 4,
6442 VT_CROPS = 6,
6443 VT_DATALAYOUT = 8
6444 };
6445 const flatbuffers::Vector<uint32_t> *blockShape() const {
6446 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_BLOCKSHAPE);
6447 }
6448 const flatbuffers::Vector<uint32_t> *crops() const {
6449 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_CROPS);
6450 }
6451 armnnSerializer::DataLayout dataLayout() const {
6452 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
6453 }
6454 bool Verify(flatbuffers::Verifier &verifier) const {
6455 return VerifyTableStart(verifier) &&
6456 VerifyOffset(verifier, VT_BLOCKSHAPE) &&
6457 verifier.VerifyVector(blockShape()) &&
6458 VerifyOffset(verifier, VT_CROPS) &&
6459 verifier.VerifyVector(crops()) &&
6460 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
6461 verifier.EndTable();
6462 }
6463 };
6464
6465 struct BatchToSpaceNdDescriptorBuilder {
6466 typedef BatchToSpaceNdDescriptor Table;
6467 flatbuffers::FlatBufferBuilder &fbb_;
6468 flatbuffers::uoffset_t start_;
6469 void add_blockShape(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> blockShape) {
6470 fbb_.AddOffset(BatchToSpaceNdDescriptor::VT_BLOCKSHAPE, blockShape);
6471 }
6472 void add_crops(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> crops) {
6473 fbb_.AddOffset(BatchToSpaceNdDescriptor::VT_CROPS, crops);
6474 }
6475 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
6476 fbb_.AddElement<int8_t>(BatchToSpaceNdDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
6477 }
6478 explicit BatchToSpaceNdDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6479 : fbb_(_fbb) {
6480 start_ = fbb_.StartTable();
6481 }
6482 flatbuffers::Offset<BatchToSpaceNdDescriptor> Finish() {
6483 const auto end = fbb_.EndTable(start_);
6484 auto o = flatbuffers::Offset<BatchToSpaceNdDescriptor>(end);
6485 return o;
6486 }
6487 };
6488
6489 inline flatbuffers::Offset<BatchToSpaceNdDescriptor> CreateBatchToSpaceNdDescriptor(
6490 flatbuffers::FlatBufferBuilder &_fbb,
6491 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> blockShape = 0,
6492 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> crops = 0,
6493 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
6494 BatchToSpaceNdDescriptorBuilder builder_(_fbb);
6495 builder_.add_crops(crops);
6496 builder_.add_blockShape(blockShape);
6497 builder_.add_dataLayout(dataLayout);
6498 return builder_.Finish();
6499 }
6500
6501 inline flatbuffers::Offset<BatchToSpaceNdDescriptor> CreateBatchToSpaceNdDescriptorDirect(
6502 flatbuffers::FlatBufferBuilder &_fbb,
6503 const std::vector<uint32_t> *blockShape = nullptr,
6504 const std::vector<uint32_t> *crops = nullptr,
6505 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
6506 auto blockShape__ = blockShape ? _fbb.CreateVector<uint32_t>(*blockShape) : 0;
6507 auto crops__ = crops ? _fbb.CreateVector<uint32_t>(*crops) : 0;
6508 return armnnSerializer::CreateBatchToSpaceNdDescriptor(
6509 _fbb,
6510 blockShape__,
6511 crops__,
6512 dataLayout);
6513 }
6514
6515 struct NormalizationLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6516 typedef NormalizationLayerBuilder Builder;
6517 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6518 VT_BASE = 4,
6519 VT_DESCRIPTOR = 6
6520 };
6521 const armnnSerializer::LayerBase *base() const {
6522 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6523 }
6524 const armnnSerializer::NormalizationDescriptor *descriptor() const {
6525 return GetPointer<const armnnSerializer::NormalizationDescriptor *>(VT_DESCRIPTOR);
6526 }
6527 bool Verify(flatbuffers::Verifier &verifier) const {
6528 return VerifyTableStart(verifier) &&
6529 VerifyOffset(verifier, VT_BASE) &&
6530 verifier.VerifyTable(base()) &&
6531 VerifyOffset(verifier, VT_DESCRIPTOR) &&
6532 verifier.VerifyTable(descriptor()) &&
6533 verifier.EndTable();
6534 }
6535 };
6536
6537 struct NormalizationLayerBuilder {
6538 typedef NormalizationLayer Table;
6539 flatbuffers::FlatBufferBuilder &fbb_;
6540 flatbuffers::uoffset_t start_;
6541 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
6542 fbb_.AddOffset(NormalizationLayer::VT_BASE, base);
6543 }
6544 void add_descriptor(flatbuffers::Offset<armnnSerializer::NormalizationDescriptor> descriptor) {
6545 fbb_.AddOffset(NormalizationLayer::VT_DESCRIPTOR, descriptor);
6546 }
6547 explicit NormalizationLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6548 : fbb_(_fbb) {
6549 start_ = fbb_.StartTable();
6550 }
6551 flatbuffers::Offset<NormalizationLayer> Finish() {
6552 const auto end = fbb_.EndTable(start_);
6553 auto o = flatbuffers::Offset<NormalizationLayer>(end);
6554 return o;
6555 }
6556 };
6557
6558 inline flatbuffers::Offset<NormalizationLayer> CreateNormalizationLayer(
6559 flatbuffers::FlatBufferBuilder &_fbb,
6560 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
6561 flatbuffers::Offset<armnnSerializer::NormalizationDescriptor> descriptor = 0) {
6562 NormalizationLayerBuilder builder_(_fbb);
6563 builder_.add_descriptor(descriptor);
6564 builder_.add_base(base);
6565 return builder_.Finish();
6566 }
6567
6568 struct NormalizationDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6569 typedef NormalizationDescriptorBuilder Builder;
6570 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6571 VT_NORMCHANNELTYPE = 4,
6572 VT_NORMMETHODTYPE = 6,
6573 VT_NORMSIZE = 8,
6574 VT_ALPHA = 10,
6575 VT_BETA = 12,
6576 VT_K = 14,
6577 VT_DATALAYOUT = 16
6578 };
6579 armnnSerializer::NormalizationAlgorithmChannel normChannelType() const {
6580 return static_cast<armnnSerializer::NormalizationAlgorithmChannel>(GetField<int8_t>(VT_NORMCHANNELTYPE, 0));
6581 }
6582 armnnSerializer::NormalizationAlgorithmMethod normMethodType() const {
6583 return static_cast<armnnSerializer::NormalizationAlgorithmMethod>(GetField<int8_t>(VT_NORMMETHODTYPE, 0));
6584 }
6585 uint32_t normSize() const {
6586 return GetField<uint32_t>(VT_NORMSIZE, 0);
6587 }
6588 float alpha() const {
6589 return GetField<float>(VT_ALPHA, 0.0f);
6590 }
6591 float beta() const {
6592 return GetField<float>(VT_BETA, 0.0f);
6593 }
6594 float k() const {
6595 return GetField<float>(VT_K, 0.0f);
6596 }
6597 armnnSerializer::DataLayout dataLayout() const {
6598 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 1));
6599 }
6600 bool Verify(flatbuffers::Verifier &verifier) const {
6601 return VerifyTableStart(verifier) &&
6602 VerifyField<int8_t>(verifier, VT_NORMCHANNELTYPE, 1) &&
6603 VerifyField<int8_t>(verifier, VT_NORMMETHODTYPE, 1) &&
6604 VerifyField<uint32_t>(verifier, VT_NORMSIZE, 4) &&
6605 VerifyField<float>(verifier, VT_ALPHA, 4) &&
6606 VerifyField<float>(verifier, VT_BETA, 4) &&
6607 VerifyField<float>(verifier, VT_K, 4) &&
6608 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
6609 verifier.EndTable();
6610 }
6611 };
6612
6613 struct NormalizationDescriptorBuilder {
6614 typedef NormalizationDescriptor Table;
6615 flatbuffers::FlatBufferBuilder &fbb_;
6616 flatbuffers::uoffset_t start_;
6617 void add_normChannelType(armnnSerializer::NormalizationAlgorithmChannel normChannelType) {
6618 fbb_.AddElement<int8_t>(NormalizationDescriptor::VT_NORMCHANNELTYPE, static_cast<int8_t>(normChannelType), 0);
6619 }
6620 void add_normMethodType(armnnSerializer::NormalizationAlgorithmMethod normMethodType) {
6621 fbb_.AddElement<int8_t>(NormalizationDescriptor::VT_NORMMETHODTYPE, static_cast<int8_t>(normMethodType), 0);
6622 }
6623 void add_normSize(uint32_t normSize) {
6624 fbb_.AddElement<uint32_t>(NormalizationDescriptor::VT_NORMSIZE, normSize, 0);
6625 }
6626 void add_alpha(float alpha) {
6627 fbb_.AddElement<float>(NormalizationDescriptor::VT_ALPHA, alpha, 0.0f);
6628 }
6629 void add_beta(float beta) {
6630 fbb_.AddElement<float>(NormalizationDescriptor::VT_BETA, beta, 0.0f);
6631 }
6632 void add_k(float k) {
6633 fbb_.AddElement<float>(NormalizationDescriptor::VT_K, k, 0.0f);
6634 }
6635 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
6636 fbb_.AddElement<int8_t>(NormalizationDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 1);
6637 }
6638 explicit NormalizationDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6639 : fbb_(_fbb) {
6640 start_ = fbb_.StartTable();
6641 }
6642 flatbuffers::Offset<NormalizationDescriptor> Finish() {
6643 const auto end = fbb_.EndTable(start_);
6644 auto o = flatbuffers::Offset<NormalizationDescriptor>(end);
6645 return o;
6646 }
6647 };
6648
6649 inline flatbuffers::Offset<NormalizationDescriptor> CreateNormalizationDescriptor(
6650 flatbuffers::FlatBufferBuilder &_fbb,
6651 armnnSerializer::NormalizationAlgorithmChannel normChannelType = armnnSerializer::NormalizationAlgorithmChannel_Across,
6652 armnnSerializer::NormalizationAlgorithmMethod normMethodType = armnnSerializer::NormalizationAlgorithmMethod_LocalBrightness,
6653 uint32_t normSize = 0,
6654 float alpha = 0.0f,
6655 float beta = 0.0f,
6656 float k = 0.0f,
6657 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NCHW) {
6658 NormalizationDescriptorBuilder builder_(_fbb);
6659 builder_.add_k(k);
6660 builder_.add_beta(beta);
6661 builder_.add_alpha(alpha);
6662 builder_.add_normSize(normSize);
6663 builder_.add_dataLayout(dataLayout);
6664 builder_.add_normMethodType(normMethodType);
6665 builder_.add_normChannelType(normChannelType);
6666 return builder_.Finish();
6667 }
6668
6669 struct MeanLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6670 typedef MeanLayerBuilder Builder;
6671 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6672 VT_BASE = 4,
6673 VT_DESCRIPTOR = 6
6674 };
6675 const armnnSerializer::LayerBase *base() const {
6676 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6677 }
6678 const armnnSerializer::MeanDescriptor *descriptor() const {
6679 return GetPointer<const armnnSerializer::MeanDescriptor *>(VT_DESCRIPTOR);
6680 }
6681 bool Verify(flatbuffers::Verifier &verifier) const {
6682 return VerifyTableStart(verifier) &&
6683 VerifyOffset(verifier, VT_BASE) &&
6684 verifier.VerifyTable(base()) &&
6685 VerifyOffset(verifier, VT_DESCRIPTOR) &&
6686 verifier.VerifyTable(descriptor()) &&
6687 verifier.EndTable();
6688 }
6689 };
6690
6691 struct MeanLayerBuilder {
6692 typedef MeanLayer Table;
6693 flatbuffers::FlatBufferBuilder &fbb_;
6694 flatbuffers::uoffset_t start_;
6695 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
6696 fbb_.AddOffset(MeanLayer::VT_BASE, base);
6697 }
6698 void add_descriptor(flatbuffers::Offset<armnnSerializer::MeanDescriptor> descriptor) {
6699 fbb_.AddOffset(MeanLayer::VT_DESCRIPTOR, descriptor);
6700 }
6701 explicit MeanLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6702 : fbb_(_fbb) {
6703 start_ = fbb_.StartTable();
6704 }
6705 flatbuffers::Offset<MeanLayer> Finish() {
6706 const auto end = fbb_.EndTable(start_);
6707 auto o = flatbuffers::Offset<MeanLayer>(end);
6708 return o;
6709 }
6710 };
6711
6712 inline flatbuffers::Offset<MeanLayer> CreateMeanLayer(
6713 flatbuffers::FlatBufferBuilder &_fbb,
6714 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
6715 flatbuffers::Offset<armnnSerializer::MeanDescriptor> descriptor = 0) {
6716 MeanLayerBuilder builder_(_fbb);
6717 builder_.add_descriptor(descriptor);
6718 builder_.add_base(base);
6719 return builder_.Finish();
6720 }
6721
6722 struct MeanDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6723 typedef MeanDescriptorBuilder Builder;
6724 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6725 VT_AXIS = 4,
6726 VT_KEEPDIMS = 6
6727 };
6728 const flatbuffers::Vector<uint32_t> *axis() const {
6729 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_AXIS);
6730 }
6731 bool keepDims() const {
6732 return GetField<uint8_t>(VT_KEEPDIMS, 0) != 0;
6733 }
6734 bool Verify(flatbuffers::Verifier &verifier) const {
6735 return VerifyTableStart(verifier) &&
6736 VerifyOffset(verifier, VT_AXIS) &&
6737 verifier.VerifyVector(axis()) &&
6738 VerifyField<uint8_t>(verifier, VT_KEEPDIMS, 1) &&
6739 verifier.EndTable();
6740 }
6741 };
6742
6743 struct MeanDescriptorBuilder {
6744 typedef MeanDescriptor Table;
6745 flatbuffers::FlatBufferBuilder &fbb_;
6746 flatbuffers::uoffset_t start_;
6747 void add_axis(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> axis) {
6748 fbb_.AddOffset(MeanDescriptor::VT_AXIS, axis);
6749 }
6750 void add_keepDims(bool keepDims) {
6751 fbb_.AddElement<uint8_t>(MeanDescriptor::VT_KEEPDIMS, static_cast<uint8_t>(keepDims), 0);
6752 }
6753 explicit MeanDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6754 : fbb_(_fbb) {
6755 start_ = fbb_.StartTable();
6756 }
6757 flatbuffers::Offset<MeanDescriptor> Finish() {
6758 const auto end = fbb_.EndTable(start_);
6759 auto o = flatbuffers::Offset<MeanDescriptor>(end);
6760 return o;
6761 }
6762 };
6763
6764 inline flatbuffers::Offset<MeanDescriptor> CreateMeanDescriptor(
6765 flatbuffers::FlatBufferBuilder &_fbb,
6766 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> axis = 0,
6767 bool keepDims = false) {
6768 MeanDescriptorBuilder builder_(_fbb);
6769 builder_.add_axis(axis);
6770 builder_.add_keepDims(keepDims);
6771 return builder_.Finish();
6772 }
6773
6774 inline flatbuffers::Offset<MeanDescriptor> CreateMeanDescriptorDirect(
6775 flatbuffers::FlatBufferBuilder &_fbb,
6776 const std::vector<uint32_t> *axis = nullptr,
6777 bool keepDims = false) {
6778 auto axis__ = axis ? _fbb.CreateVector<uint32_t>(*axis) : 0;
6779 return armnnSerializer::CreateMeanDescriptor(
6780 _fbb,
6781 axis__,
6782 keepDims);
6783 }
6784
6785 struct PadLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6786 typedef PadLayerBuilder Builder;
6787 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6788 VT_BASE = 4,
6789 VT_DESCRIPTOR = 6
6790 };
6791 const armnnSerializer::LayerBase *base() const {
6792 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6793 }
6794 const armnnSerializer::PadDescriptor *descriptor() const {
6795 return GetPointer<const armnnSerializer::PadDescriptor *>(VT_DESCRIPTOR);
6796 }
6797 bool Verify(flatbuffers::Verifier &verifier) const {
6798 return VerifyTableStart(verifier) &&
6799 VerifyOffset(verifier, VT_BASE) &&
6800 verifier.VerifyTable(base()) &&
6801 VerifyOffset(verifier, VT_DESCRIPTOR) &&
6802 verifier.VerifyTable(descriptor()) &&
6803 verifier.EndTable();
6804 }
6805 };
6806
6807 struct PadLayerBuilder {
6808 typedef PadLayer Table;
6809 flatbuffers::FlatBufferBuilder &fbb_;
6810 flatbuffers::uoffset_t start_;
6811 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
6812 fbb_.AddOffset(PadLayer::VT_BASE, base);
6813 }
6814 void add_descriptor(flatbuffers::Offset<armnnSerializer::PadDescriptor> descriptor) {
6815 fbb_.AddOffset(PadLayer::VT_DESCRIPTOR, descriptor);
6816 }
6817 explicit PadLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6818 : fbb_(_fbb) {
6819 start_ = fbb_.StartTable();
6820 }
6821 flatbuffers::Offset<PadLayer> Finish() {
6822 const auto end = fbb_.EndTable(start_);
6823 auto o = flatbuffers::Offset<PadLayer>(end);
6824 return o;
6825 }
6826 };
6827
6828 inline flatbuffers::Offset<PadLayer> CreatePadLayer(
6829 flatbuffers::FlatBufferBuilder &_fbb,
6830 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
6831 flatbuffers::Offset<armnnSerializer::PadDescriptor> descriptor = 0) {
6832 PadLayerBuilder builder_(_fbb);
6833 builder_.add_descriptor(descriptor);
6834 builder_.add_base(base);
6835 return builder_.Finish();
6836 }
6837
6838 struct PadDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6839 typedef PadDescriptorBuilder Builder;
6840 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6841 VT_PADLIST = 4,
6842 VT_PADVALUE = 6,
6843 VT_PADDINGMODE = 8
6844 };
6845 const flatbuffers::Vector<uint32_t> *padList() const {
6846 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_PADLIST);
6847 }
6848 float padValue() const {
6849 return GetField<float>(VT_PADVALUE, 0.0f);
6850 }
6851 armnnSerializer::PaddingMode paddingMode() const {
6852 return static_cast<armnnSerializer::PaddingMode>(GetField<int8_t>(VT_PADDINGMODE, 0));
6853 }
6854 bool Verify(flatbuffers::Verifier &verifier) const {
6855 return VerifyTableStart(verifier) &&
6856 VerifyOffset(verifier, VT_PADLIST) &&
6857 verifier.VerifyVector(padList()) &&
6858 VerifyField<float>(verifier, VT_PADVALUE, 4) &&
6859 VerifyField<int8_t>(verifier, VT_PADDINGMODE, 1) &&
6860 verifier.EndTable();
6861 }
6862 };
6863
6864 struct PadDescriptorBuilder {
6865 typedef PadDescriptor Table;
6866 flatbuffers::FlatBufferBuilder &fbb_;
6867 flatbuffers::uoffset_t start_;
6868 void add_padList(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> padList) {
6869 fbb_.AddOffset(PadDescriptor::VT_PADLIST, padList);
6870 }
6871 void add_padValue(float padValue) {
6872 fbb_.AddElement<float>(PadDescriptor::VT_PADVALUE, padValue, 0.0f);
6873 }
6874 void add_paddingMode(armnnSerializer::PaddingMode paddingMode) {
6875 fbb_.AddElement<int8_t>(PadDescriptor::VT_PADDINGMODE, static_cast<int8_t>(paddingMode), 0);
6876 }
6877 explicit PadDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6878 : fbb_(_fbb) {
6879 start_ = fbb_.StartTable();
6880 }
6881 flatbuffers::Offset<PadDescriptor> Finish() {
6882 const auto end = fbb_.EndTable(start_);
6883 auto o = flatbuffers::Offset<PadDescriptor>(end);
6884 return o;
6885 }
6886 };
6887
6888 inline flatbuffers::Offset<PadDescriptor> CreatePadDescriptor(
6889 flatbuffers::FlatBufferBuilder &_fbb,
6890 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> padList = 0,
6891 float padValue = 0.0f,
6892 armnnSerializer::PaddingMode paddingMode = armnnSerializer::PaddingMode_Constant) {
6893 PadDescriptorBuilder builder_(_fbb);
6894 builder_.add_padValue(padValue);
6895 builder_.add_padList(padList);
6896 builder_.add_paddingMode(paddingMode);
6897 return builder_.Finish();
6898 }
6899
6900 inline flatbuffers::Offset<PadDescriptor> CreatePadDescriptorDirect(
6901 flatbuffers::FlatBufferBuilder &_fbb,
6902 const std::vector<uint32_t> *padList = nullptr,
6903 float padValue = 0.0f,
6904 armnnSerializer::PaddingMode paddingMode = armnnSerializer::PaddingMode_Constant) {
6905 auto padList__ = padList ? _fbb.CreateVector<uint32_t>(*padList) : 0;
6906 return armnnSerializer::CreatePadDescriptor(
6907 _fbb,
6908 padList__,
6909 padValue,
6910 paddingMode);
6911 }
6912
6913 /// @deprecated Use ElementwiseUnaryLayer instead
6914 struct RsqrtLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6915 typedef RsqrtLayerBuilder Builder;
6916 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6917 VT_BASE = 4
6918 };
6919 const armnnSerializer::LayerBase *base() const {
6920 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6921 }
6922 bool Verify(flatbuffers::Verifier &verifier) const {
6923 return VerifyTableStart(verifier) &&
6924 VerifyOffset(verifier, VT_BASE) &&
6925 verifier.VerifyTable(base()) &&
6926 verifier.EndTable();
6927 }
6928 };
6929
6930 struct RsqrtLayerBuilder {
6931 typedef RsqrtLayer Table;
6932 flatbuffers::FlatBufferBuilder &fbb_;
6933 flatbuffers::uoffset_t start_;
6934 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
6935 fbb_.AddOffset(RsqrtLayer::VT_BASE, base);
6936 }
6937 explicit RsqrtLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
6938 : fbb_(_fbb) {
6939 start_ = fbb_.StartTable();
6940 }
6941 flatbuffers::Offset<RsqrtLayer> Finish() {
6942 const auto end = fbb_.EndTable(start_);
6943 auto o = flatbuffers::Offset<RsqrtLayer>(end);
6944 return o;
6945 }
6946 };
6947
6948 inline flatbuffers::Offset<RsqrtLayer> CreateRsqrtLayer(
6949 flatbuffers::FlatBufferBuilder &_fbb,
6950 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
6951 RsqrtLayerBuilder builder_(_fbb);
6952 builder_.add_base(base);
6953 return builder_.Finish();
6954 }
6955
6956 struct BatchNormalizationLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
6957 typedef BatchNormalizationLayerBuilder Builder;
6958 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
6959 VT_BASE = 4,
6960 VT_DESCRIPTOR = 6,
6961 VT_MEAN = 8,
6962 VT_VARIANCE = 10,
6963 VT_BETA = 12,
6964 VT_GAMMA = 14
6965 };
6966 const armnnSerializer::LayerBase *base() const {
6967 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
6968 }
6969 const armnnSerializer::BatchNormalizationDescriptor *descriptor() const {
6970 return GetPointer<const armnnSerializer::BatchNormalizationDescriptor *>(VT_DESCRIPTOR);
6971 }
6972 const armnnSerializer::ConstTensor *mean() const {
6973 return GetPointer<const armnnSerializer::ConstTensor *>(VT_MEAN);
6974 }
6975 const armnnSerializer::ConstTensor *variance() const {
6976 return GetPointer<const armnnSerializer::ConstTensor *>(VT_VARIANCE);
6977 }
6978 const armnnSerializer::ConstTensor *beta() const {
6979 return GetPointer<const armnnSerializer::ConstTensor *>(VT_BETA);
6980 }
6981 const armnnSerializer::ConstTensor *gamma() const {
6982 return GetPointer<const armnnSerializer::ConstTensor *>(VT_GAMMA);
6983 }
6984 bool Verify(flatbuffers::Verifier &verifier) const {
6985 return VerifyTableStart(verifier) &&
6986 VerifyOffset(verifier, VT_BASE) &&
6987 verifier.VerifyTable(base()) &&
6988 VerifyOffset(verifier, VT_DESCRIPTOR) &&
6989 verifier.VerifyTable(descriptor()) &&
6990 VerifyOffset(verifier, VT_MEAN) &&
6991 verifier.VerifyTable(mean()) &&
6992 VerifyOffset(verifier, VT_VARIANCE) &&
6993 verifier.VerifyTable(variance()) &&
6994 VerifyOffset(verifier, VT_BETA) &&
6995 verifier.VerifyTable(beta()) &&
6996 VerifyOffset(verifier, VT_GAMMA) &&
6997 verifier.VerifyTable(gamma()) &&
6998 verifier.EndTable();
6999 }
7000 };
7001
7002 struct BatchNormalizationLayerBuilder {
7003 typedef BatchNormalizationLayer Table;
7004 flatbuffers::FlatBufferBuilder &fbb_;
7005 flatbuffers::uoffset_t start_;
7006 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
7007 fbb_.AddOffset(BatchNormalizationLayer::VT_BASE, base);
7008 }
7009 void add_descriptor(flatbuffers::Offset<armnnSerializer::BatchNormalizationDescriptor> descriptor) {
7010 fbb_.AddOffset(BatchNormalizationLayer::VT_DESCRIPTOR, descriptor);
7011 }
7012 void add_mean(flatbuffers::Offset<armnnSerializer::ConstTensor> mean) {
7013 fbb_.AddOffset(BatchNormalizationLayer::VT_MEAN, mean);
7014 }
7015 void add_variance(flatbuffers::Offset<armnnSerializer::ConstTensor> variance) {
7016 fbb_.AddOffset(BatchNormalizationLayer::VT_VARIANCE, variance);
7017 }
7018 void add_beta(flatbuffers::Offset<armnnSerializer::ConstTensor> beta) {
7019 fbb_.AddOffset(BatchNormalizationLayer::VT_BETA, beta);
7020 }
7021 void add_gamma(flatbuffers::Offset<armnnSerializer::ConstTensor> gamma) {
7022 fbb_.AddOffset(BatchNormalizationLayer::VT_GAMMA, gamma);
7023 }
7024 explicit BatchNormalizationLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7025 : fbb_(_fbb) {
7026 start_ = fbb_.StartTable();
7027 }
7028 flatbuffers::Offset<BatchNormalizationLayer> Finish() {
7029 const auto end = fbb_.EndTable(start_);
7030 auto o = flatbuffers::Offset<BatchNormalizationLayer>(end);
7031 return o;
7032 }
7033 };
7034
7035 inline flatbuffers::Offset<BatchNormalizationLayer> CreateBatchNormalizationLayer(
7036 flatbuffers::FlatBufferBuilder &_fbb,
7037 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
7038 flatbuffers::Offset<armnnSerializer::BatchNormalizationDescriptor> descriptor = 0,
7039 flatbuffers::Offset<armnnSerializer::ConstTensor> mean = 0,
7040 flatbuffers::Offset<armnnSerializer::ConstTensor> variance = 0,
7041 flatbuffers::Offset<armnnSerializer::ConstTensor> beta = 0,
7042 flatbuffers::Offset<armnnSerializer::ConstTensor> gamma = 0) {
7043 BatchNormalizationLayerBuilder builder_(_fbb);
7044 builder_.add_gamma(gamma);
7045 builder_.add_beta(beta);
7046 builder_.add_variance(variance);
7047 builder_.add_mean(mean);
7048 builder_.add_descriptor(descriptor);
7049 builder_.add_base(base);
7050 return builder_.Finish();
7051 }
7052
7053 struct BatchNormalizationDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7054 typedef BatchNormalizationDescriptorBuilder Builder;
7055 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7056 VT_EPS = 4,
7057 VT_DATALAYOUT = 6
7058 };
7059 float eps() const {
7060 return GetField<float>(VT_EPS, 0.0f);
7061 }
7062 armnnSerializer::DataLayout dataLayout() const {
7063 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
7064 }
7065 bool Verify(flatbuffers::Verifier &verifier) const {
7066 return VerifyTableStart(verifier) &&
7067 VerifyField<float>(verifier, VT_EPS, 4) &&
7068 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
7069 verifier.EndTable();
7070 }
7071 };
7072
7073 struct BatchNormalizationDescriptorBuilder {
7074 typedef BatchNormalizationDescriptor Table;
7075 flatbuffers::FlatBufferBuilder &fbb_;
7076 flatbuffers::uoffset_t start_;
7077 void add_eps(float eps) {
7078 fbb_.AddElement<float>(BatchNormalizationDescriptor::VT_EPS, eps, 0.0f);
7079 }
7080 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
7081 fbb_.AddElement<int8_t>(BatchNormalizationDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
7082 }
7083 explicit BatchNormalizationDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7084 : fbb_(_fbb) {
7085 start_ = fbb_.StartTable();
7086 }
7087 flatbuffers::Offset<BatchNormalizationDescriptor> Finish() {
7088 const auto end = fbb_.EndTable(start_);
7089 auto o = flatbuffers::Offset<BatchNormalizationDescriptor>(end);
7090 return o;
7091 }
7092 };
7093
7094 inline flatbuffers::Offset<BatchNormalizationDescriptor> CreateBatchNormalizationDescriptor(
7095 flatbuffers::FlatBufferBuilder &_fbb,
7096 float eps = 0.0f,
7097 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
7098 BatchNormalizationDescriptorBuilder builder_(_fbb);
7099 builder_.add_eps(eps);
7100 builder_.add_dataLayout(dataLayout);
7101 return builder_.Finish();
7102 }
7103
7104 /// @deprecated Use ResizeLayer instead
7105 struct ResizeBilinearLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7106 typedef ResizeBilinearLayerBuilder Builder;
7107 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7108 VT_BASE = 4,
7109 VT_DESCRIPTOR = 6
7110 };
7111 const armnnSerializer::LayerBase *base() const {
7112 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
7113 }
7114 const armnnSerializer::ResizeBilinearDescriptor *descriptor() const {
7115 return GetPointer<const armnnSerializer::ResizeBilinearDescriptor *>(VT_DESCRIPTOR);
7116 }
7117 bool Verify(flatbuffers::Verifier &verifier) const {
7118 return VerifyTableStart(verifier) &&
7119 VerifyOffset(verifier, VT_BASE) &&
7120 verifier.VerifyTable(base()) &&
7121 VerifyOffset(verifier, VT_DESCRIPTOR) &&
7122 verifier.VerifyTable(descriptor()) &&
7123 verifier.EndTable();
7124 }
7125 };
7126
7127 struct ResizeBilinearLayerBuilder {
7128 typedef ResizeBilinearLayer Table;
7129 flatbuffers::FlatBufferBuilder &fbb_;
7130 flatbuffers::uoffset_t start_;
7131 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
7132 fbb_.AddOffset(ResizeBilinearLayer::VT_BASE, base);
7133 }
7134 void add_descriptor(flatbuffers::Offset<armnnSerializer::ResizeBilinearDescriptor> descriptor) {
7135 fbb_.AddOffset(ResizeBilinearLayer::VT_DESCRIPTOR, descriptor);
7136 }
7137 explicit ResizeBilinearLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7138 : fbb_(_fbb) {
7139 start_ = fbb_.StartTable();
7140 }
7141 flatbuffers::Offset<ResizeBilinearLayer> Finish() {
7142 const auto end = fbb_.EndTable(start_);
7143 auto o = flatbuffers::Offset<ResizeBilinearLayer>(end);
7144 return o;
7145 }
7146 };
7147
7148 inline flatbuffers::Offset<ResizeBilinearLayer> CreateResizeBilinearLayer(
7149 flatbuffers::FlatBufferBuilder &_fbb,
7150 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
7151 flatbuffers::Offset<armnnSerializer::ResizeBilinearDescriptor> descriptor = 0) {
7152 ResizeBilinearLayerBuilder builder_(_fbb);
7153 builder_.add_descriptor(descriptor);
7154 builder_.add_base(base);
7155 return builder_.Finish();
7156 }
7157
7158 struct ResizeBilinearDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7159 typedef ResizeBilinearDescriptorBuilder Builder;
7160 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7161 VT_TARGETWIDTH = 4,
7162 VT_TARGETHEIGHT = 6,
7163 VT_DATALAYOUT = 8,
7164 VT_ALIGNCORNERS = 10,
7165 VT_HALFPIXELCENTERS = 12
7166 };
7167 uint32_t targetWidth() const {
7168 return GetField<uint32_t>(VT_TARGETWIDTH, 0);
7169 }
7170 uint32_t targetHeight() const {
7171 return GetField<uint32_t>(VT_TARGETHEIGHT, 0);
7172 }
7173 armnnSerializer::DataLayout dataLayout() const {
7174 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
7175 }
7176 bool alignCorners() const {
7177 return GetField<uint8_t>(VT_ALIGNCORNERS, 0) != 0;
7178 }
7179 bool halfPixelCenters() const {
7180 return GetField<uint8_t>(VT_HALFPIXELCENTERS, 0) != 0;
7181 }
7182 bool Verify(flatbuffers::Verifier &verifier) const {
7183 return VerifyTableStart(verifier) &&
7184 VerifyField<uint32_t>(verifier, VT_TARGETWIDTH, 4) &&
7185 VerifyField<uint32_t>(verifier, VT_TARGETHEIGHT, 4) &&
7186 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
7187 VerifyField<uint8_t>(verifier, VT_ALIGNCORNERS, 1) &&
7188 VerifyField<uint8_t>(verifier, VT_HALFPIXELCENTERS, 1) &&
7189 verifier.EndTable();
7190 }
7191 };
7192
7193 struct ResizeBilinearDescriptorBuilder {
7194 typedef ResizeBilinearDescriptor Table;
7195 flatbuffers::FlatBufferBuilder &fbb_;
7196 flatbuffers::uoffset_t start_;
7197 void add_targetWidth(uint32_t targetWidth) {
7198 fbb_.AddElement<uint32_t>(ResizeBilinearDescriptor::VT_TARGETWIDTH, targetWidth, 0);
7199 }
7200 void add_targetHeight(uint32_t targetHeight) {
7201 fbb_.AddElement<uint32_t>(ResizeBilinearDescriptor::VT_TARGETHEIGHT, targetHeight, 0);
7202 }
7203 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
7204 fbb_.AddElement<int8_t>(ResizeBilinearDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
7205 }
7206 void add_alignCorners(bool alignCorners) {
7207 fbb_.AddElement<uint8_t>(ResizeBilinearDescriptor::VT_ALIGNCORNERS, static_cast<uint8_t>(alignCorners), 0);
7208 }
7209 void add_halfPixelCenters(bool halfPixelCenters) {
7210 fbb_.AddElement<uint8_t>(ResizeBilinearDescriptor::VT_HALFPIXELCENTERS, static_cast<uint8_t>(halfPixelCenters), 0);
7211 }
7212 explicit ResizeBilinearDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7213 : fbb_(_fbb) {
7214 start_ = fbb_.StartTable();
7215 }
7216 flatbuffers::Offset<ResizeBilinearDescriptor> Finish() {
7217 const auto end = fbb_.EndTable(start_);
7218 auto o = flatbuffers::Offset<ResizeBilinearDescriptor>(end);
7219 return o;
7220 }
7221 };
7222
7223 inline flatbuffers::Offset<ResizeBilinearDescriptor> CreateResizeBilinearDescriptor(
7224 flatbuffers::FlatBufferBuilder &_fbb,
7225 uint32_t targetWidth = 0,
7226 uint32_t targetHeight = 0,
7227 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC,
7228 bool alignCorners = false,
7229 bool halfPixelCenters = false) {
7230 ResizeBilinearDescriptorBuilder builder_(_fbb);
7231 builder_.add_targetHeight(targetHeight);
7232 builder_.add_targetWidth(targetWidth);
7233 builder_.add_halfPixelCenters(halfPixelCenters);
7234 builder_.add_alignCorners(alignCorners);
7235 builder_.add_dataLayout(dataLayout);
7236 return builder_.Finish();
7237 }
7238
7239 struct SliceLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7240 typedef SliceLayerBuilder Builder;
7241 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7242 VT_BASE = 4,
7243 VT_DESCRIPTOR = 6
7244 };
7245 const armnnSerializer::LayerBase *base() const {
7246 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
7247 }
7248 const armnnSerializer::SliceDescriptor *descriptor() const {
7249 return GetPointer<const armnnSerializer::SliceDescriptor *>(VT_DESCRIPTOR);
7250 }
7251 bool Verify(flatbuffers::Verifier &verifier) const {
7252 return VerifyTableStart(verifier) &&
7253 VerifyOffset(verifier, VT_BASE) &&
7254 verifier.VerifyTable(base()) &&
7255 VerifyOffset(verifier, VT_DESCRIPTOR) &&
7256 verifier.VerifyTable(descriptor()) &&
7257 verifier.EndTable();
7258 }
7259 };
7260
7261 struct SliceLayerBuilder {
7262 typedef SliceLayer Table;
7263 flatbuffers::FlatBufferBuilder &fbb_;
7264 flatbuffers::uoffset_t start_;
7265 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
7266 fbb_.AddOffset(SliceLayer::VT_BASE, base);
7267 }
7268 void add_descriptor(flatbuffers::Offset<armnnSerializer::SliceDescriptor> descriptor) {
7269 fbb_.AddOffset(SliceLayer::VT_DESCRIPTOR, descriptor);
7270 }
7271 explicit SliceLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7272 : fbb_(_fbb) {
7273 start_ = fbb_.StartTable();
7274 }
7275 flatbuffers::Offset<SliceLayer> Finish() {
7276 const auto end = fbb_.EndTable(start_);
7277 auto o = flatbuffers::Offset<SliceLayer>(end);
7278 return o;
7279 }
7280 };
7281
7282 inline flatbuffers::Offset<SliceLayer> CreateSliceLayer(
7283 flatbuffers::FlatBufferBuilder &_fbb,
7284 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
7285 flatbuffers::Offset<armnnSerializer::SliceDescriptor> descriptor = 0) {
7286 SliceLayerBuilder builder_(_fbb);
7287 builder_.add_descriptor(descriptor);
7288 builder_.add_base(base);
7289 return builder_.Finish();
7290 }
7291
7292 struct SliceDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7293 typedef SliceDescriptorBuilder Builder;
7294 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7295 VT_BEGIN = 4,
7296 VT_SIZE = 6
7297 };
7298 const flatbuffers::Vector<uint32_t> *begin() const {
7299 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_BEGIN);
7300 }
7301 const flatbuffers::Vector<uint32_t> *size() const {
7302 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_SIZE);
7303 }
7304 bool Verify(flatbuffers::Verifier &verifier) const {
7305 return VerifyTableStart(verifier) &&
7306 VerifyOffset(verifier, VT_BEGIN) &&
7307 verifier.VerifyVector(begin()) &&
7308 VerifyOffset(verifier, VT_SIZE) &&
7309 verifier.VerifyVector(size()) &&
7310 verifier.EndTable();
7311 }
7312 };
7313
7314 struct SliceDescriptorBuilder {
7315 typedef SliceDescriptor Table;
7316 flatbuffers::FlatBufferBuilder &fbb_;
7317 flatbuffers::uoffset_t start_;
7318 void add_begin(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> begin) {
7319 fbb_.AddOffset(SliceDescriptor::VT_BEGIN, begin);
7320 }
7321 void add_size(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> size) {
7322 fbb_.AddOffset(SliceDescriptor::VT_SIZE, size);
7323 }
7324 explicit SliceDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7325 : fbb_(_fbb) {
7326 start_ = fbb_.StartTable();
7327 }
7328 flatbuffers::Offset<SliceDescriptor> Finish() {
7329 const auto end = fbb_.EndTable(start_);
7330 auto o = flatbuffers::Offset<SliceDescriptor>(end);
7331 return o;
7332 }
7333 };
7334
7335 inline flatbuffers::Offset<SliceDescriptor> CreateSliceDescriptor(
7336 flatbuffers::FlatBufferBuilder &_fbb,
7337 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> begin = 0,
7338 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> size = 0) {
7339 SliceDescriptorBuilder builder_(_fbb);
7340 builder_.add_size(size);
7341 builder_.add_begin(begin);
7342 return builder_.Finish();
7343 }
7344
7345 inline flatbuffers::Offset<SliceDescriptor> CreateSliceDescriptorDirect(
7346 flatbuffers::FlatBufferBuilder &_fbb,
7347 const std::vector<uint32_t> *begin = nullptr,
7348 const std::vector<uint32_t> *size = nullptr) {
7349 auto begin__ = begin ? _fbb.CreateVector<uint32_t>(*begin) : 0;
7350 auto size__ = size ? _fbb.CreateVector<uint32_t>(*size) : 0;
7351 return armnnSerializer::CreateSliceDescriptor(
7352 _fbb,
7353 begin__,
7354 size__);
7355 }
7356
7357 struct StridedSliceLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7358 typedef StridedSliceLayerBuilder Builder;
7359 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7360 VT_BASE = 4,
7361 VT_DESCRIPTOR = 6
7362 };
7363 const armnnSerializer::LayerBase *base() const {
7364 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
7365 }
7366 const armnnSerializer::StridedSliceDescriptor *descriptor() const {
7367 return GetPointer<const armnnSerializer::StridedSliceDescriptor *>(VT_DESCRIPTOR);
7368 }
7369 bool Verify(flatbuffers::Verifier &verifier) const {
7370 return VerifyTableStart(verifier) &&
7371 VerifyOffset(verifier, VT_BASE) &&
7372 verifier.VerifyTable(base()) &&
7373 VerifyOffset(verifier, VT_DESCRIPTOR) &&
7374 verifier.VerifyTable(descriptor()) &&
7375 verifier.EndTable();
7376 }
7377 };
7378
7379 struct StridedSliceLayerBuilder {
7380 typedef StridedSliceLayer Table;
7381 flatbuffers::FlatBufferBuilder &fbb_;
7382 flatbuffers::uoffset_t start_;
7383 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
7384 fbb_.AddOffset(StridedSliceLayer::VT_BASE, base);
7385 }
7386 void add_descriptor(flatbuffers::Offset<armnnSerializer::StridedSliceDescriptor> descriptor) {
7387 fbb_.AddOffset(StridedSliceLayer::VT_DESCRIPTOR, descriptor);
7388 }
7389 explicit StridedSliceLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7390 : fbb_(_fbb) {
7391 start_ = fbb_.StartTable();
7392 }
7393 flatbuffers::Offset<StridedSliceLayer> Finish() {
7394 const auto end = fbb_.EndTable(start_);
7395 auto o = flatbuffers::Offset<StridedSliceLayer>(end);
7396 return o;
7397 }
7398 };
7399
7400 inline flatbuffers::Offset<StridedSliceLayer> CreateStridedSliceLayer(
7401 flatbuffers::FlatBufferBuilder &_fbb,
7402 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
7403 flatbuffers::Offset<armnnSerializer::StridedSliceDescriptor> descriptor = 0) {
7404 StridedSliceLayerBuilder builder_(_fbb);
7405 builder_.add_descriptor(descriptor);
7406 builder_.add_base(base);
7407 return builder_.Finish();
7408 }
7409
7410 struct StridedSliceDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7411 typedef StridedSliceDescriptorBuilder Builder;
7412 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7413 VT_BEGIN = 4,
7414 VT_END = 6,
7415 VT_STRIDE = 8,
7416 VT_BEGINMASK = 10,
7417 VT_ENDMASK = 12,
7418 VT_SHRINKAXISMASK = 14,
7419 VT_ELLIPSISMASK = 16,
7420 VT_NEWAXISMASK = 18,
7421 VT_DATALAYOUT = 20
7422 };
7423 const flatbuffers::Vector<int32_t> *begin() const {
7424 return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_BEGIN);
7425 }
7426 const flatbuffers::Vector<int32_t> *end() const {
7427 return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_END);
7428 }
7429 const flatbuffers::Vector<int32_t> *stride() const {
7430 return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_STRIDE);
7431 }
7432 int32_t beginMask() const {
7433 return GetField<int32_t>(VT_BEGINMASK, 0);
7434 }
7435 int32_t endMask() const {
7436 return GetField<int32_t>(VT_ENDMASK, 0);
7437 }
7438 int32_t shrinkAxisMask() const {
7439 return GetField<int32_t>(VT_SHRINKAXISMASK, 0);
7440 }
7441 int32_t ellipsisMask() const {
7442 return GetField<int32_t>(VT_ELLIPSISMASK, 0);
7443 }
7444 int32_t newAxisMask() const {
7445 return GetField<int32_t>(VT_NEWAXISMASK, 0);
7446 }
7447 armnnSerializer::DataLayout dataLayout() const {
7448 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
7449 }
7450 bool Verify(flatbuffers::Verifier &verifier) const {
7451 return VerifyTableStart(verifier) &&
7452 VerifyOffset(verifier, VT_BEGIN) &&
7453 verifier.VerifyVector(begin()) &&
7454 VerifyOffset(verifier, VT_END) &&
7455 verifier.VerifyVector(end()) &&
7456 VerifyOffset(verifier, VT_STRIDE) &&
7457 verifier.VerifyVector(stride()) &&
7458 VerifyField<int32_t>(verifier, VT_BEGINMASK, 4) &&
7459 VerifyField<int32_t>(verifier, VT_ENDMASK, 4) &&
7460 VerifyField<int32_t>(verifier, VT_SHRINKAXISMASK, 4) &&
7461 VerifyField<int32_t>(verifier, VT_ELLIPSISMASK, 4) &&
7462 VerifyField<int32_t>(verifier, VT_NEWAXISMASK, 4) &&
7463 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
7464 verifier.EndTable();
7465 }
7466 };
7467
7468 struct StridedSliceDescriptorBuilder {
7469 typedef StridedSliceDescriptor Table;
7470 flatbuffers::FlatBufferBuilder &fbb_;
7471 flatbuffers::uoffset_t start_;
7472 void add_begin(flatbuffers::Offset<flatbuffers::Vector<int32_t>> begin) {
7473 fbb_.AddOffset(StridedSliceDescriptor::VT_BEGIN, begin);
7474 }
7475 void add_end(flatbuffers::Offset<flatbuffers::Vector<int32_t>> end) {
7476 fbb_.AddOffset(StridedSliceDescriptor::VT_END, end);
7477 }
7478 void add_stride(flatbuffers::Offset<flatbuffers::Vector<int32_t>> stride) {
7479 fbb_.AddOffset(StridedSliceDescriptor::VT_STRIDE, stride);
7480 }
7481 void add_beginMask(int32_t beginMask) {
7482 fbb_.AddElement<int32_t>(StridedSliceDescriptor::VT_BEGINMASK, beginMask, 0);
7483 }
7484 void add_endMask(int32_t endMask) {
7485 fbb_.AddElement<int32_t>(StridedSliceDescriptor::VT_ENDMASK, endMask, 0);
7486 }
7487 void add_shrinkAxisMask(int32_t shrinkAxisMask) {
7488 fbb_.AddElement<int32_t>(StridedSliceDescriptor::VT_SHRINKAXISMASK, shrinkAxisMask, 0);
7489 }
7490 void add_ellipsisMask(int32_t ellipsisMask) {
7491 fbb_.AddElement<int32_t>(StridedSliceDescriptor::VT_ELLIPSISMASK, ellipsisMask, 0);
7492 }
7493 void add_newAxisMask(int32_t newAxisMask) {
7494 fbb_.AddElement<int32_t>(StridedSliceDescriptor::VT_NEWAXISMASK, newAxisMask, 0);
7495 }
7496 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
7497 fbb_.AddElement<int8_t>(StridedSliceDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
7498 }
7499 explicit StridedSliceDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7500 : fbb_(_fbb) {
7501 start_ = fbb_.StartTable();
7502 }
7503 flatbuffers::Offset<StridedSliceDescriptor> Finish() {
7504 const auto end = fbb_.EndTable(start_);
7505 auto o = flatbuffers::Offset<StridedSliceDescriptor>(end);
7506 return o;
7507 }
7508 };
7509
7510 inline flatbuffers::Offset<StridedSliceDescriptor> CreateStridedSliceDescriptor(
7511 flatbuffers::FlatBufferBuilder &_fbb,
7512 flatbuffers::Offset<flatbuffers::Vector<int32_t>> begin = 0,
7513 flatbuffers::Offset<flatbuffers::Vector<int32_t>> end = 0,
7514 flatbuffers::Offset<flatbuffers::Vector<int32_t>> stride = 0,
7515 int32_t beginMask = 0,
7516 int32_t endMask = 0,
7517 int32_t shrinkAxisMask = 0,
7518 int32_t ellipsisMask = 0,
7519 int32_t newAxisMask = 0,
7520 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
7521 StridedSliceDescriptorBuilder builder_(_fbb);
7522 builder_.add_newAxisMask(newAxisMask);
7523 builder_.add_ellipsisMask(ellipsisMask);
7524 builder_.add_shrinkAxisMask(shrinkAxisMask);
7525 builder_.add_endMask(endMask);
7526 builder_.add_beginMask(beginMask);
7527 builder_.add_stride(stride);
7528 builder_.add_end(end);
7529 builder_.add_begin(begin);
7530 builder_.add_dataLayout(dataLayout);
7531 return builder_.Finish();
7532 }
7533
7534 inline flatbuffers::Offset<StridedSliceDescriptor> CreateStridedSliceDescriptorDirect(
7535 flatbuffers::FlatBufferBuilder &_fbb,
7536 const std::vector<int32_t> *begin = nullptr,
7537 const std::vector<int32_t> *end = nullptr,
7538 const std::vector<int32_t> *stride = nullptr,
7539 int32_t beginMask = 0,
7540 int32_t endMask = 0,
7541 int32_t shrinkAxisMask = 0,
7542 int32_t ellipsisMask = 0,
7543 int32_t newAxisMask = 0,
7544 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC) {
7545 auto begin__ = begin ? _fbb.CreateVector<int32_t>(*begin) : 0;
7546 auto end__ = end ? _fbb.CreateVector<int32_t>(*end) : 0;
7547 auto stride__ = stride ? _fbb.CreateVector<int32_t>(*stride) : 0;
7548 return armnnSerializer::CreateStridedSliceDescriptor(
7549 _fbb,
7550 begin__,
7551 end__,
7552 stride__,
7553 beginMask,
7554 endMask,
7555 shrinkAxisMask,
7556 ellipsisMask,
7557 newAxisMask,
7558 dataLayout);
7559 }
7560
7561 struct ConcatLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7562 typedef ConcatLayerBuilder Builder;
7563 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7564 VT_BASE = 4,
7565 VT_DESCRIPTOR = 6
7566 };
7567 const armnnSerializer::LayerBase *base() const {
7568 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
7569 }
7570 const armnnSerializer::OriginsDescriptor *descriptor() const {
7571 return GetPointer<const armnnSerializer::OriginsDescriptor *>(VT_DESCRIPTOR);
7572 }
7573 bool Verify(flatbuffers::Verifier &verifier) const {
7574 return VerifyTableStart(verifier) &&
7575 VerifyOffset(verifier, VT_BASE) &&
7576 verifier.VerifyTable(base()) &&
7577 VerifyOffset(verifier, VT_DESCRIPTOR) &&
7578 verifier.VerifyTable(descriptor()) &&
7579 verifier.EndTable();
7580 }
7581 };
7582
7583 struct ConcatLayerBuilder {
7584 typedef ConcatLayer Table;
7585 flatbuffers::FlatBufferBuilder &fbb_;
7586 flatbuffers::uoffset_t start_;
7587 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
7588 fbb_.AddOffset(ConcatLayer::VT_BASE, base);
7589 }
7590 void add_descriptor(flatbuffers::Offset<armnnSerializer::OriginsDescriptor> descriptor) {
7591 fbb_.AddOffset(ConcatLayer::VT_DESCRIPTOR, descriptor);
7592 }
7593 explicit ConcatLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7594 : fbb_(_fbb) {
7595 start_ = fbb_.StartTable();
7596 }
7597 flatbuffers::Offset<ConcatLayer> Finish() {
7598 const auto end = fbb_.EndTable(start_);
7599 auto o = flatbuffers::Offset<ConcatLayer>(end);
7600 return o;
7601 }
7602 };
7603
7604 inline flatbuffers::Offset<ConcatLayer> CreateConcatLayer(
7605 flatbuffers::FlatBufferBuilder &_fbb,
7606 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
7607 flatbuffers::Offset<armnnSerializer::OriginsDescriptor> descriptor = 0) {
7608 ConcatLayerBuilder builder_(_fbb);
7609 builder_.add_descriptor(descriptor);
7610 builder_.add_base(base);
7611 return builder_.Finish();
7612 }
7613
7614 /// @deprecated Use ConcatLayer instead
7615 struct MergerLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7616 typedef MergerLayerBuilder Builder;
7617 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7618 VT_BASE = 4,
7619 VT_DESCRIPTOR = 6
7620 };
7621 const armnnSerializer::LayerBase *base() const {
7622 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
7623 }
7624 const armnnSerializer::OriginsDescriptor *descriptor() const {
7625 return GetPointer<const armnnSerializer::OriginsDescriptor *>(VT_DESCRIPTOR);
7626 }
7627 bool Verify(flatbuffers::Verifier &verifier) const {
7628 return VerifyTableStart(verifier) &&
7629 VerifyOffset(verifier, VT_BASE) &&
7630 verifier.VerifyTable(base()) &&
7631 VerifyOffset(verifier, VT_DESCRIPTOR) &&
7632 verifier.VerifyTable(descriptor()) &&
7633 verifier.EndTable();
7634 }
7635 };
7636
7637 struct MergerLayerBuilder {
7638 typedef MergerLayer Table;
7639 flatbuffers::FlatBufferBuilder &fbb_;
7640 flatbuffers::uoffset_t start_;
7641 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
7642 fbb_.AddOffset(MergerLayer::VT_BASE, base);
7643 }
7644 void add_descriptor(flatbuffers::Offset<armnnSerializer::OriginsDescriptor> descriptor) {
7645 fbb_.AddOffset(MergerLayer::VT_DESCRIPTOR, descriptor);
7646 }
7647 explicit MergerLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7648 : fbb_(_fbb) {
7649 start_ = fbb_.StartTable();
7650 }
7651 flatbuffers::Offset<MergerLayer> Finish() {
7652 const auto end = fbb_.EndTable(start_);
7653 auto o = flatbuffers::Offset<MergerLayer>(end);
7654 return o;
7655 }
7656 };
7657
7658 inline flatbuffers::Offset<MergerLayer> CreateMergerLayer(
7659 flatbuffers::FlatBufferBuilder &_fbb,
7660 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
7661 flatbuffers::Offset<armnnSerializer::OriginsDescriptor> descriptor = 0) {
7662 MergerLayerBuilder builder_(_fbb);
7663 builder_.add_descriptor(descriptor);
7664 builder_.add_base(base);
7665 return builder_.Finish();
7666 }
7667
7668 struct UintVector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7669 typedef UintVectorBuilder Builder;
7670 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7671 VT_DATA = 4
7672 };
7673 const flatbuffers::Vector<uint32_t> *data() const {
7674 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_DATA);
7675 }
7676 bool Verify(flatbuffers::Verifier &verifier) const {
7677 return VerifyTableStart(verifier) &&
7678 VerifyOffset(verifier, VT_DATA) &&
7679 verifier.VerifyVector(data()) &&
7680 verifier.EndTable();
7681 }
7682 };
7683
7684 struct UintVectorBuilder {
7685 typedef UintVector Table;
7686 flatbuffers::FlatBufferBuilder &fbb_;
7687 flatbuffers::uoffset_t start_;
7688 void add_data(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> data) {
7689 fbb_.AddOffset(UintVector::VT_DATA, data);
7690 }
7691 explicit UintVectorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7692 : fbb_(_fbb) {
7693 start_ = fbb_.StartTable();
7694 }
7695 flatbuffers::Offset<UintVector> Finish() {
7696 const auto end = fbb_.EndTable(start_);
7697 auto o = flatbuffers::Offset<UintVector>(end);
7698 return o;
7699 }
7700 };
7701
7702 inline flatbuffers::Offset<UintVector> CreateUintVector(
7703 flatbuffers::FlatBufferBuilder &_fbb,
7704 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> data = 0) {
7705 UintVectorBuilder builder_(_fbb);
7706 builder_.add_data(data);
7707 return builder_.Finish();
7708 }
7709
7710 inline flatbuffers::Offset<UintVector> CreateUintVectorDirect(
7711 flatbuffers::FlatBufferBuilder &_fbb,
7712 const std::vector<uint32_t> *data = nullptr) {
7713 auto data__ = data ? _fbb.CreateVector<uint32_t>(*data) : 0;
7714 return armnnSerializer::CreateUintVector(
7715 _fbb,
7716 data__);
7717 }
7718
7719 struct OriginsDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7720 typedef OriginsDescriptorBuilder Builder;
7721 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7722 VT_CONCATAXIS = 4,
7723 VT_NUMVIEWS = 6,
7724 VT_NUMDIMENSIONS = 8,
7725 VT_VIEWORIGINS = 10
7726 };
7727 uint32_t concatAxis() const {
7728 return GetField<uint32_t>(VT_CONCATAXIS, 0);
7729 }
7730 uint32_t numViews() const {
7731 return GetField<uint32_t>(VT_NUMVIEWS, 0);
7732 }
7733 uint32_t numDimensions() const {
7734 return GetField<uint32_t>(VT_NUMDIMENSIONS, 0);
7735 }
7736 const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::UintVector>> *viewOrigins() const {
7737 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::UintVector>> *>(VT_VIEWORIGINS);
7738 }
7739 bool Verify(flatbuffers::Verifier &verifier) const {
7740 return VerifyTableStart(verifier) &&
7741 VerifyField<uint32_t>(verifier, VT_CONCATAXIS, 4) &&
7742 VerifyField<uint32_t>(verifier, VT_NUMVIEWS, 4) &&
7743 VerifyField<uint32_t>(verifier, VT_NUMDIMENSIONS, 4) &&
7744 VerifyOffset(verifier, VT_VIEWORIGINS) &&
7745 verifier.VerifyVector(viewOrigins()) &&
7746 verifier.VerifyVectorOfTables(viewOrigins()) &&
7747 verifier.EndTable();
7748 }
7749 };
7750
7751 struct OriginsDescriptorBuilder {
7752 typedef OriginsDescriptor Table;
7753 flatbuffers::FlatBufferBuilder &fbb_;
7754 flatbuffers::uoffset_t start_;
7755 void add_concatAxis(uint32_t concatAxis) {
7756 fbb_.AddElement<uint32_t>(OriginsDescriptor::VT_CONCATAXIS, concatAxis, 0);
7757 }
7758 void add_numViews(uint32_t numViews) {
7759 fbb_.AddElement<uint32_t>(OriginsDescriptor::VT_NUMVIEWS, numViews, 0);
7760 }
7761 void add_numDimensions(uint32_t numDimensions) {
7762 fbb_.AddElement<uint32_t>(OriginsDescriptor::VT_NUMDIMENSIONS, numDimensions, 0);
7763 }
7764 void add_viewOrigins(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::UintVector>>> viewOrigins) {
7765 fbb_.AddOffset(OriginsDescriptor::VT_VIEWORIGINS, viewOrigins);
7766 }
7767 explicit OriginsDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7768 : fbb_(_fbb) {
7769 start_ = fbb_.StartTable();
7770 }
7771 flatbuffers::Offset<OriginsDescriptor> Finish() {
7772 const auto end = fbb_.EndTable(start_);
7773 auto o = flatbuffers::Offset<OriginsDescriptor>(end);
7774 return o;
7775 }
7776 };
7777
7778 inline flatbuffers::Offset<OriginsDescriptor> CreateOriginsDescriptor(
7779 flatbuffers::FlatBufferBuilder &_fbb,
7780 uint32_t concatAxis = 0,
7781 uint32_t numViews = 0,
7782 uint32_t numDimensions = 0,
7783 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::UintVector>>> viewOrigins = 0) {
7784 OriginsDescriptorBuilder builder_(_fbb);
7785 builder_.add_viewOrigins(viewOrigins);
7786 builder_.add_numDimensions(numDimensions);
7787 builder_.add_numViews(numViews);
7788 builder_.add_concatAxis(concatAxis);
7789 return builder_.Finish();
7790 }
7791
7792 inline flatbuffers::Offset<OriginsDescriptor> CreateOriginsDescriptorDirect(
7793 flatbuffers::FlatBufferBuilder &_fbb,
7794 uint32_t concatAxis = 0,
7795 uint32_t numViews = 0,
7796 uint32_t numDimensions = 0,
7797 const std::vector<flatbuffers::Offset<armnnSerializer::UintVector>> *viewOrigins = nullptr) {
7798 auto viewOrigins__ = viewOrigins ? _fbb.CreateVector<flatbuffers::Offset<armnnSerializer::UintVector>>(*viewOrigins) : 0;
7799 return armnnSerializer::CreateOriginsDescriptor(
7800 _fbb,
7801 concatAxis,
7802 numViews,
7803 numDimensions,
7804 viewOrigins__);
7805 }
7806
7807 struct ViewsDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7808 typedef ViewsDescriptorBuilder Builder;
7809 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7810 VT_ORIGINS = 4,
7811 VT_VIEWSIZES = 6
7812 };
7813 const armnnSerializer::OriginsDescriptor *origins() const {
7814 return GetPointer<const armnnSerializer::OriginsDescriptor *>(VT_ORIGINS);
7815 }
7816 const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::UintVector>> *viewSizes() const {
7817 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::UintVector>> *>(VT_VIEWSIZES);
7818 }
7819 bool Verify(flatbuffers::Verifier &verifier) const {
7820 return VerifyTableStart(verifier) &&
7821 VerifyOffset(verifier, VT_ORIGINS) &&
7822 verifier.VerifyTable(origins()) &&
7823 VerifyOffset(verifier, VT_VIEWSIZES) &&
7824 verifier.VerifyVector(viewSizes()) &&
7825 verifier.VerifyVectorOfTables(viewSizes()) &&
7826 verifier.EndTable();
7827 }
7828 };
7829
7830 struct ViewsDescriptorBuilder {
7831 typedef ViewsDescriptor Table;
7832 flatbuffers::FlatBufferBuilder &fbb_;
7833 flatbuffers::uoffset_t start_;
7834 void add_origins(flatbuffers::Offset<armnnSerializer::OriginsDescriptor> origins) {
7835 fbb_.AddOffset(ViewsDescriptor::VT_ORIGINS, origins);
7836 }
7837 void add_viewSizes(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::UintVector>>> viewSizes) {
7838 fbb_.AddOffset(ViewsDescriptor::VT_VIEWSIZES, viewSizes);
7839 }
7840 explicit ViewsDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7841 : fbb_(_fbb) {
7842 start_ = fbb_.StartTable();
7843 }
7844 flatbuffers::Offset<ViewsDescriptor> Finish() {
7845 const auto end = fbb_.EndTable(start_);
7846 auto o = flatbuffers::Offset<ViewsDescriptor>(end);
7847 return o;
7848 }
7849 };
7850
7851 inline flatbuffers::Offset<ViewsDescriptor> CreateViewsDescriptor(
7852 flatbuffers::FlatBufferBuilder &_fbb,
7853 flatbuffers::Offset<armnnSerializer::OriginsDescriptor> origins = 0,
7854 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::UintVector>>> viewSizes = 0) {
7855 ViewsDescriptorBuilder builder_(_fbb);
7856 builder_.add_viewSizes(viewSizes);
7857 builder_.add_origins(origins);
7858 return builder_.Finish();
7859 }
7860
7861 inline flatbuffers::Offset<ViewsDescriptor> CreateViewsDescriptorDirect(
7862 flatbuffers::FlatBufferBuilder &_fbb,
7863 flatbuffers::Offset<armnnSerializer::OriginsDescriptor> origins = 0,
7864 const std::vector<flatbuffers::Offset<armnnSerializer::UintVector>> *viewSizes = nullptr) {
7865 auto viewSizes__ = viewSizes ? _fbb.CreateVector<flatbuffers::Offset<armnnSerializer::UintVector>>(*viewSizes) : 0;
7866 return armnnSerializer::CreateViewsDescriptor(
7867 _fbb,
7868 origins,
7869 viewSizes__);
7870 }
7871
7872 struct SplitterLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7873 typedef SplitterLayerBuilder Builder;
7874 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7875 VT_BASE = 4,
7876 VT_DESCRIPTOR = 6
7877 };
7878 const armnnSerializer::LayerBase *base() const {
7879 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
7880 }
7881 const armnnSerializer::ViewsDescriptor *descriptor() const {
7882 return GetPointer<const armnnSerializer::ViewsDescriptor *>(VT_DESCRIPTOR);
7883 }
7884 bool Verify(flatbuffers::Verifier &verifier) const {
7885 return VerifyTableStart(verifier) &&
7886 VerifyOffset(verifier, VT_BASE) &&
7887 verifier.VerifyTable(base()) &&
7888 VerifyOffset(verifier, VT_DESCRIPTOR) &&
7889 verifier.VerifyTable(descriptor()) &&
7890 verifier.EndTable();
7891 }
7892 };
7893
7894 struct SplitterLayerBuilder {
7895 typedef SplitterLayer Table;
7896 flatbuffers::FlatBufferBuilder &fbb_;
7897 flatbuffers::uoffset_t start_;
7898 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
7899 fbb_.AddOffset(SplitterLayer::VT_BASE, base);
7900 }
7901 void add_descriptor(flatbuffers::Offset<armnnSerializer::ViewsDescriptor> descriptor) {
7902 fbb_.AddOffset(SplitterLayer::VT_DESCRIPTOR, descriptor);
7903 }
7904 explicit SplitterLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7905 : fbb_(_fbb) {
7906 start_ = fbb_.StartTable();
7907 }
7908 flatbuffers::Offset<SplitterLayer> Finish() {
7909 const auto end = fbb_.EndTable(start_);
7910 auto o = flatbuffers::Offset<SplitterLayer>(end);
7911 return o;
7912 }
7913 };
7914
7915 inline flatbuffers::Offset<SplitterLayer> CreateSplitterLayer(
7916 flatbuffers::FlatBufferBuilder &_fbb,
7917 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
7918 flatbuffers::Offset<armnnSerializer::ViewsDescriptor> descriptor = 0) {
7919 SplitterLayerBuilder builder_(_fbb);
7920 builder_.add_descriptor(descriptor);
7921 builder_.add_base(base);
7922 return builder_.Finish();
7923 }
7924
7925 struct DetectionPostProcessLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7926 typedef DetectionPostProcessLayerBuilder Builder;
7927 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7928 VT_BASE = 4,
7929 VT_DESCRIPTOR = 6,
7930 VT_ANCHORS = 8
7931 };
7932 const armnnSerializer::LayerBase *base() const {
7933 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
7934 }
7935 const armnnSerializer::DetectionPostProcessDescriptor *descriptor() const {
7936 return GetPointer<const armnnSerializer::DetectionPostProcessDescriptor *>(VT_DESCRIPTOR);
7937 }
7938 const armnnSerializer::ConstTensor *anchors() const {
7939 return GetPointer<const armnnSerializer::ConstTensor *>(VT_ANCHORS);
7940 }
7941 bool Verify(flatbuffers::Verifier &verifier) const {
7942 return VerifyTableStart(verifier) &&
7943 VerifyOffset(verifier, VT_BASE) &&
7944 verifier.VerifyTable(base()) &&
7945 VerifyOffset(verifier, VT_DESCRIPTOR) &&
7946 verifier.VerifyTable(descriptor()) &&
7947 VerifyOffset(verifier, VT_ANCHORS) &&
7948 verifier.VerifyTable(anchors()) &&
7949 verifier.EndTable();
7950 }
7951 };
7952
7953 struct DetectionPostProcessLayerBuilder {
7954 typedef DetectionPostProcessLayer Table;
7955 flatbuffers::FlatBufferBuilder &fbb_;
7956 flatbuffers::uoffset_t start_;
7957 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
7958 fbb_.AddOffset(DetectionPostProcessLayer::VT_BASE, base);
7959 }
7960 void add_descriptor(flatbuffers::Offset<armnnSerializer::DetectionPostProcessDescriptor> descriptor) {
7961 fbb_.AddOffset(DetectionPostProcessLayer::VT_DESCRIPTOR, descriptor);
7962 }
7963 void add_anchors(flatbuffers::Offset<armnnSerializer::ConstTensor> anchors) {
7964 fbb_.AddOffset(DetectionPostProcessLayer::VT_ANCHORS, anchors);
7965 }
7966 explicit DetectionPostProcessLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
7967 : fbb_(_fbb) {
7968 start_ = fbb_.StartTable();
7969 }
7970 flatbuffers::Offset<DetectionPostProcessLayer> Finish() {
7971 const auto end = fbb_.EndTable(start_);
7972 auto o = flatbuffers::Offset<DetectionPostProcessLayer>(end);
7973 return o;
7974 }
7975 };
7976
7977 inline flatbuffers::Offset<DetectionPostProcessLayer> CreateDetectionPostProcessLayer(
7978 flatbuffers::FlatBufferBuilder &_fbb,
7979 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
7980 flatbuffers::Offset<armnnSerializer::DetectionPostProcessDescriptor> descriptor = 0,
7981 flatbuffers::Offset<armnnSerializer::ConstTensor> anchors = 0) {
7982 DetectionPostProcessLayerBuilder builder_(_fbb);
7983 builder_.add_anchors(anchors);
7984 builder_.add_descriptor(descriptor);
7985 builder_.add_base(base);
7986 return builder_.Finish();
7987 }
7988
7989 struct DetectionPostProcessDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
7990 typedef DetectionPostProcessDescriptorBuilder Builder;
7991 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
7992 VT_MAXDETECTIONS = 4,
7993 VT_MAXCLASSESPERDETECTION = 6,
7994 VT_DETECTIONSPERCLASS = 8,
7995 VT_NMSSCORETHRESHOLD = 10,
7996 VT_NMSIOUTHRESHOLD = 12,
7997 VT_NUMCLASSES = 14,
7998 VT_USEREGULARNMS = 16,
7999 VT_SCALEX = 18,
8000 VT_SCALEY = 20,
8001 VT_SCALEW = 22,
8002 VT_SCALEH = 24
8003 };
8004 uint32_t maxDetections() const {
8005 return GetField<uint32_t>(VT_MAXDETECTIONS, 0);
8006 }
8007 uint32_t maxClassesPerDetection() const {
8008 return GetField<uint32_t>(VT_MAXCLASSESPERDETECTION, 0);
8009 }
8010 uint32_t detectionsPerClass() const {
8011 return GetField<uint32_t>(VT_DETECTIONSPERCLASS, 0);
8012 }
8013 float nmsScoreThreshold() const {
8014 return GetField<float>(VT_NMSSCORETHRESHOLD, 0.0f);
8015 }
8016 float nmsIouThreshold() const {
8017 return GetField<float>(VT_NMSIOUTHRESHOLD, 0.0f);
8018 }
8019 uint32_t numClasses() const {
8020 return GetField<uint32_t>(VT_NUMCLASSES, 0);
8021 }
8022 bool useRegularNms() const {
8023 return GetField<uint8_t>(VT_USEREGULARNMS, 0) != 0;
8024 }
8025 float scaleX() const {
8026 return GetField<float>(VT_SCALEX, 0.0f);
8027 }
8028 float scaleY() const {
8029 return GetField<float>(VT_SCALEY, 0.0f);
8030 }
8031 float scaleW() const {
8032 return GetField<float>(VT_SCALEW, 0.0f);
8033 }
8034 float scaleH() const {
8035 return GetField<float>(VT_SCALEH, 0.0f);
8036 }
8037 bool Verify(flatbuffers::Verifier &verifier) const {
8038 return VerifyTableStart(verifier) &&
8039 VerifyField<uint32_t>(verifier, VT_MAXDETECTIONS, 4) &&
8040 VerifyField<uint32_t>(verifier, VT_MAXCLASSESPERDETECTION, 4) &&
8041 VerifyField<uint32_t>(verifier, VT_DETECTIONSPERCLASS, 4) &&
8042 VerifyField<float>(verifier, VT_NMSSCORETHRESHOLD, 4) &&
8043 VerifyField<float>(verifier, VT_NMSIOUTHRESHOLD, 4) &&
8044 VerifyField<uint32_t>(verifier, VT_NUMCLASSES, 4) &&
8045 VerifyField<uint8_t>(verifier, VT_USEREGULARNMS, 1) &&
8046 VerifyField<float>(verifier, VT_SCALEX, 4) &&
8047 VerifyField<float>(verifier, VT_SCALEY, 4) &&
8048 VerifyField<float>(verifier, VT_SCALEW, 4) &&
8049 VerifyField<float>(verifier, VT_SCALEH, 4) &&
8050 verifier.EndTable();
8051 }
8052 };
8053
8054 struct DetectionPostProcessDescriptorBuilder {
8055 typedef DetectionPostProcessDescriptor Table;
8056 flatbuffers::FlatBufferBuilder &fbb_;
8057 flatbuffers::uoffset_t start_;
8058 void add_maxDetections(uint32_t maxDetections) {
8059 fbb_.AddElement<uint32_t>(DetectionPostProcessDescriptor::VT_MAXDETECTIONS, maxDetections, 0);
8060 }
8061 void add_maxClassesPerDetection(uint32_t maxClassesPerDetection) {
8062 fbb_.AddElement<uint32_t>(DetectionPostProcessDescriptor::VT_MAXCLASSESPERDETECTION, maxClassesPerDetection, 0);
8063 }
8064 void add_detectionsPerClass(uint32_t detectionsPerClass) {
8065 fbb_.AddElement<uint32_t>(DetectionPostProcessDescriptor::VT_DETECTIONSPERCLASS, detectionsPerClass, 0);
8066 }
8067 void add_nmsScoreThreshold(float nmsScoreThreshold) {
8068 fbb_.AddElement<float>(DetectionPostProcessDescriptor::VT_NMSSCORETHRESHOLD, nmsScoreThreshold, 0.0f);
8069 }
8070 void add_nmsIouThreshold(float nmsIouThreshold) {
8071 fbb_.AddElement<float>(DetectionPostProcessDescriptor::VT_NMSIOUTHRESHOLD, nmsIouThreshold, 0.0f);
8072 }
8073 void add_numClasses(uint32_t numClasses) {
8074 fbb_.AddElement<uint32_t>(DetectionPostProcessDescriptor::VT_NUMCLASSES, numClasses, 0);
8075 }
8076 void add_useRegularNms(bool useRegularNms) {
8077 fbb_.AddElement<uint8_t>(DetectionPostProcessDescriptor::VT_USEREGULARNMS, static_cast<uint8_t>(useRegularNms), 0);
8078 }
8079 void add_scaleX(float scaleX) {
8080 fbb_.AddElement<float>(DetectionPostProcessDescriptor::VT_SCALEX, scaleX, 0.0f);
8081 }
8082 void add_scaleY(float scaleY) {
8083 fbb_.AddElement<float>(DetectionPostProcessDescriptor::VT_SCALEY, scaleY, 0.0f);
8084 }
8085 void add_scaleW(float scaleW) {
8086 fbb_.AddElement<float>(DetectionPostProcessDescriptor::VT_SCALEW, scaleW, 0.0f);
8087 }
8088 void add_scaleH(float scaleH) {
8089 fbb_.AddElement<float>(DetectionPostProcessDescriptor::VT_SCALEH, scaleH, 0.0f);
8090 }
8091 explicit DetectionPostProcessDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
8092 : fbb_(_fbb) {
8093 start_ = fbb_.StartTable();
8094 }
8095 flatbuffers::Offset<DetectionPostProcessDescriptor> Finish() {
8096 const auto end = fbb_.EndTable(start_);
8097 auto o = flatbuffers::Offset<DetectionPostProcessDescriptor>(end);
8098 return o;
8099 }
8100 };
8101
8102 inline flatbuffers::Offset<DetectionPostProcessDescriptor> CreateDetectionPostProcessDescriptor(
8103 flatbuffers::FlatBufferBuilder &_fbb,
8104 uint32_t maxDetections = 0,
8105 uint32_t maxClassesPerDetection = 0,
8106 uint32_t detectionsPerClass = 0,
8107 float nmsScoreThreshold = 0.0f,
8108 float nmsIouThreshold = 0.0f,
8109 uint32_t numClasses = 0,
8110 bool useRegularNms = false,
8111 float scaleX = 0.0f,
8112 float scaleY = 0.0f,
8113 float scaleW = 0.0f,
8114 float scaleH = 0.0f) {
8115 DetectionPostProcessDescriptorBuilder builder_(_fbb);
8116 builder_.add_scaleH(scaleH);
8117 builder_.add_scaleW(scaleW);
8118 builder_.add_scaleY(scaleY);
8119 builder_.add_scaleX(scaleX);
8120 builder_.add_numClasses(numClasses);
8121 builder_.add_nmsIouThreshold(nmsIouThreshold);
8122 builder_.add_nmsScoreThreshold(nmsScoreThreshold);
8123 builder_.add_detectionsPerClass(detectionsPerClass);
8124 builder_.add_maxClassesPerDetection(maxClassesPerDetection);
8125 builder_.add_maxDetections(maxDetections);
8126 builder_.add_useRegularNms(useRegularNms);
8127 return builder_.Finish();
8128 }
8129
8130 struct LstmInputParams FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
8131 typedef LstmInputParamsBuilder Builder;
8132 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
8133 VT_INPUTTOFORGETWEIGHTS = 4,
8134 VT_INPUTTOCELLWEIGHTS = 6,
8135 VT_INPUTTOOUTPUTWEIGHTS = 8,
8136 VT_RECURRENTTOFORGETWEIGHTS = 10,
8137 VT_RECURRENTTOCELLWEIGHTS = 12,
8138 VT_RECURRENTTOOUTPUTWEIGHTS = 14,
8139 VT_FORGETGATEBIAS = 16,
8140 VT_CELLBIAS = 18,
8141 VT_OUTPUTGATEBIAS = 20,
8142 VT_INPUTTOINPUTWEIGHTS = 22,
8143 VT_RECURRENTTOINPUTWEIGHTS = 24,
8144 VT_CELLTOINPUTWEIGHTS = 26,
8145 VT_INPUTGATEBIAS = 28,
8146 VT_PROJECTIONWEIGHTS = 30,
8147 VT_PROJECTIONBIAS = 32,
8148 VT_CELLTOFORGETWEIGHTS = 34,
8149 VT_CELLTOOUTPUTWEIGHTS = 36,
8150 VT_INPUTLAYERNORMWEIGHTS = 38,
8151 VT_FORGETLAYERNORMWEIGHTS = 40,
8152 VT_CELLLAYERNORMWEIGHTS = 42,
8153 VT_OUTPUTLAYERNORMWEIGHTS = 44
8154 };
8155 const armnnSerializer::ConstTensor *inputToForgetWeights() const {
8156 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOFORGETWEIGHTS);
8157 }
8158 const armnnSerializer::ConstTensor *inputToCellWeights() const {
8159 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOCELLWEIGHTS);
8160 }
8161 const armnnSerializer::ConstTensor *inputToOutputWeights() const {
8162 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOOUTPUTWEIGHTS);
8163 }
8164 const armnnSerializer::ConstTensor *recurrentToForgetWeights() const {
8165 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOFORGETWEIGHTS);
8166 }
8167 const armnnSerializer::ConstTensor *recurrentToCellWeights() const {
8168 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOCELLWEIGHTS);
8169 }
8170 const armnnSerializer::ConstTensor *recurrentToOutputWeights() const {
8171 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOOUTPUTWEIGHTS);
8172 }
8173 const armnnSerializer::ConstTensor *forgetGateBias() const {
8174 return GetPointer<const armnnSerializer::ConstTensor *>(VT_FORGETGATEBIAS);
8175 }
8176 const armnnSerializer::ConstTensor *cellBias() const {
8177 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLBIAS);
8178 }
8179 const armnnSerializer::ConstTensor *outputGateBias() const {
8180 return GetPointer<const armnnSerializer::ConstTensor *>(VT_OUTPUTGATEBIAS);
8181 }
8182 const armnnSerializer::ConstTensor *inputToInputWeights() const {
8183 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOINPUTWEIGHTS);
8184 }
8185 const armnnSerializer::ConstTensor *recurrentToInputWeights() const {
8186 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOINPUTWEIGHTS);
8187 }
8188 const armnnSerializer::ConstTensor *cellToInputWeights() const {
8189 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLTOINPUTWEIGHTS);
8190 }
8191 const armnnSerializer::ConstTensor *inputGateBias() const {
8192 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTGATEBIAS);
8193 }
8194 const armnnSerializer::ConstTensor *projectionWeights() const {
8195 return GetPointer<const armnnSerializer::ConstTensor *>(VT_PROJECTIONWEIGHTS);
8196 }
8197 const armnnSerializer::ConstTensor *projectionBias() const {
8198 return GetPointer<const armnnSerializer::ConstTensor *>(VT_PROJECTIONBIAS);
8199 }
8200 const armnnSerializer::ConstTensor *cellToForgetWeights() const {
8201 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLTOFORGETWEIGHTS);
8202 }
8203 const armnnSerializer::ConstTensor *cellToOutputWeights() const {
8204 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLTOOUTPUTWEIGHTS);
8205 }
8206 const armnnSerializer::ConstTensor *inputLayerNormWeights() const {
8207 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTLAYERNORMWEIGHTS);
8208 }
8209 const armnnSerializer::ConstTensor *forgetLayerNormWeights() const {
8210 return GetPointer<const armnnSerializer::ConstTensor *>(VT_FORGETLAYERNORMWEIGHTS);
8211 }
8212 const armnnSerializer::ConstTensor *cellLayerNormWeights() const {
8213 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLLAYERNORMWEIGHTS);
8214 }
8215 const armnnSerializer::ConstTensor *outputLayerNormWeights() const {
8216 return GetPointer<const armnnSerializer::ConstTensor *>(VT_OUTPUTLAYERNORMWEIGHTS);
8217 }
8218 bool Verify(flatbuffers::Verifier &verifier) const {
8219 return VerifyTableStart(verifier) &&
8220 VerifyOffset(verifier, VT_INPUTTOFORGETWEIGHTS) &&
8221 verifier.VerifyTable(inputToForgetWeights()) &&
8222 VerifyOffset(verifier, VT_INPUTTOCELLWEIGHTS) &&
8223 verifier.VerifyTable(inputToCellWeights()) &&
8224 VerifyOffset(verifier, VT_INPUTTOOUTPUTWEIGHTS) &&
8225 verifier.VerifyTable(inputToOutputWeights()) &&
8226 VerifyOffset(verifier, VT_RECURRENTTOFORGETWEIGHTS) &&
8227 verifier.VerifyTable(recurrentToForgetWeights()) &&
8228 VerifyOffset(verifier, VT_RECURRENTTOCELLWEIGHTS) &&
8229 verifier.VerifyTable(recurrentToCellWeights()) &&
8230 VerifyOffset(verifier, VT_RECURRENTTOOUTPUTWEIGHTS) &&
8231 verifier.VerifyTable(recurrentToOutputWeights()) &&
8232 VerifyOffset(verifier, VT_FORGETGATEBIAS) &&
8233 verifier.VerifyTable(forgetGateBias()) &&
8234 VerifyOffset(verifier, VT_CELLBIAS) &&
8235 verifier.VerifyTable(cellBias()) &&
8236 VerifyOffset(verifier, VT_OUTPUTGATEBIAS) &&
8237 verifier.VerifyTable(outputGateBias()) &&
8238 VerifyOffset(verifier, VT_INPUTTOINPUTWEIGHTS) &&
8239 verifier.VerifyTable(inputToInputWeights()) &&
8240 VerifyOffset(verifier, VT_RECURRENTTOINPUTWEIGHTS) &&
8241 verifier.VerifyTable(recurrentToInputWeights()) &&
8242 VerifyOffset(verifier, VT_CELLTOINPUTWEIGHTS) &&
8243 verifier.VerifyTable(cellToInputWeights()) &&
8244 VerifyOffset(verifier, VT_INPUTGATEBIAS) &&
8245 verifier.VerifyTable(inputGateBias()) &&
8246 VerifyOffset(verifier, VT_PROJECTIONWEIGHTS) &&
8247 verifier.VerifyTable(projectionWeights()) &&
8248 VerifyOffset(verifier, VT_PROJECTIONBIAS) &&
8249 verifier.VerifyTable(projectionBias()) &&
8250 VerifyOffset(verifier, VT_CELLTOFORGETWEIGHTS) &&
8251 verifier.VerifyTable(cellToForgetWeights()) &&
8252 VerifyOffset(verifier, VT_CELLTOOUTPUTWEIGHTS) &&
8253 verifier.VerifyTable(cellToOutputWeights()) &&
8254 VerifyOffset(verifier, VT_INPUTLAYERNORMWEIGHTS) &&
8255 verifier.VerifyTable(inputLayerNormWeights()) &&
8256 VerifyOffset(verifier, VT_FORGETLAYERNORMWEIGHTS) &&
8257 verifier.VerifyTable(forgetLayerNormWeights()) &&
8258 VerifyOffset(verifier, VT_CELLLAYERNORMWEIGHTS) &&
8259 verifier.VerifyTable(cellLayerNormWeights()) &&
8260 VerifyOffset(verifier, VT_OUTPUTLAYERNORMWEIGHTS) &&
8261 verifier.VerifyTable(outputLayerNormWeights()) &&
8262 verifier.EndTable();
8263 }
8264 };
8265
8266 struct LstmInputParamsBuilder {
8267 typedef LstmInputParams Table;
8268 flatbuffers::FlatBufferBuilder &fbb_;
8269 flatbuffers::uoffset_t start_;
8270 void add_inputToForgetWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToForgetWeights) {
8271 fbb_.AddOffset(LstmInputParams::VT_INPUTTOFORGETWEIGHTS, inputToForgetWeights);
8272 }
8273 void add_inputToCellWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToCellWeights) {
8274 fbb_.AddOffset(LstmInputParams::VT_INPUTTOCELLWEIGHTS, inputToCellWeights);
8275 }
8276 void add_inputToOutputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToOutputWeights) {
8277 fbb_.AddOffset(LstmInputParams::VT_INPUTTOOUTPUTWEIGHTS, inputToOutputWeights);
8278 }
8279 void add_recurrentToForgetWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToForgetWeights) {
8280 fbb_.AddOffset(LstmInputParams::VT_RECURRENTTOFORGETWEIGHTS, recurrentToForgetWeights);
8281 }
8282 void add_recurrentToCellWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToCellWeights) {
8283 fbb_.AddOffset(LstmInputParams::VT_RECURRENTTOCELLWEIGHTS, recurrentToCellWeights);
8284 }
8285 void add_recurrentToOutputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToOutputWeights) {
8286 fbb_.AddOffset(LstmInputParams::VT_RECURRENTTOOUTPUTWEIGHTS, recurrentToOutputWeights);
8287 }
8288 void add_forgetGateBias(flatbuffers::Offset<armnnSerializer::ConstTensor> forgetGateBias) {
8289 fbb_.AddOffset(LstmInputParams::VT_FORGETGATEBIAS, forgetGateBias);
8290 }
8291 void add_cellBias(flatbuffers::Offset<armnnSerializer::ConstTensor> cellBias) {
8292 fbb_.AddOffset(LstmInputParams::VT_CELLBIAS, cellBias);
8293 }
8294 void add_outputGateBias(flatbuffers::Offset<armnnSerializer::ConstTensor> outputGateBias) {
8295 fbb_.AddOffset(LstmInputParams::VT_OUTPUTGATEBIAS, outputGateBias);
8296 }
8297 void add_inputToInputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToInputWeights) {
8298 fbb_.AddOffset(LstmInputParams::VT_INPUTTOINPUTWEIGHTS, inputToInputWeights);
8299 }
8300 void add_recurrentToInputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToInputWeights) {
8301 fbb_.AddOffset(LstmInputParams::VT_RECURRENTTOINPUTWEIGHTS, recurrentToInputWeights);
8302 }
8303 void add_cellToInputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> cellToInputWeights) {
8304 fbb_.AddOffset(LstmInputParams::VT_CELLTOINPUTWEIGHTS, cellToInputWeights);
8305 }
8306 void add_inputGateBias(flatbuffers::Offset<armnnSerializer::ConstTensor> inputGateBias) {
8307 fbb_.AddOffset(LstmInputParams::VT_INPUTGATEBIAS, inputGateBias);
8308 }
8309 void add_projectionWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> projectionWeights) {
8310 fbb_.AddOffset(LstmInputParams::VT_PROJECTIONWEIGHTS, projectionWeights);
8311 }
8312 void add_projectionBias(flatbuffers::Offset<armnnSerializer::ConstTensor> projectionBias) {
8313 fbb_.AddOffset(LstmInputParams::VT_PROJECTIONBIAS, projectionBias);
8314 }
8315 void add_cellToForgetWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> cellToForgetWeights) {
8316 fbb_.AddOffset(LstmInputParams::VT_CELLTOFORGETWEIGHTS, cellToForgetWeights);
8317 }
8318 void add_cellToOutputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> cellToOutputWeights) {
8319 fbb_.AddOffset(LstmInputParams::VT_CELLTOOUTPUTWEIGHTS, cellToOutputWeights);
8320 }
8321 void add_inputLayerNormWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputLayerNormWeights) {
8322 fbb_.AddOffset(LstmInputParams::VT_INPUTLAYERNORMWEIGHTS, inputLayerNormWeights);
8323 }
8324 void add_forgetLayerNormWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> forgetLayerNormWeights) {
8325 fbb_.AddOffset(LstmInputParams::VT_FORGETLAYERNORMWEIGHTS, forgetLayerNormWeights);
8326 }
8327 void add_cellLayerNormWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> cellLayerNormWeights) {
8328 fbb_.AddOffset(LstmInputParams::VT_CELLLAYERNORMWEIGHTS, cellLayerNormWeights);
8329 }
8330 void add_outputLayerNormWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> outputLayerNormWeights) {
8331 fbb_.AddOffset(LstmInputParams::VT_OUTPUTLAYERNORMWEIGHTS, outputLayerNormWeights);
8332 }
8333 explicit LstmInputParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
8334 : fbb_(_fbb) {
8335 start_ = fbb_.StartTable();
8336 }
8337 flatbuffers::Offset<LstmInputParams> Finish() {
8338 const auto end = fbb_.EndTable(start_);
8339 auto o = flatbuffers::Offset<LstmInputParams>(end);
8340 return o;
8341 }
8342 };
8343
8344 inline flatbuffers::Offset<LstmInputParams> CreateLstmInputParams(
8345 flatbuffers::FlatBufferBuilder &_fbb,
8346 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToForgetWeights = 0,
8347 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToCellWeights = 0,
8348 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToOutputWeights = 0,
8349 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToForgetWeights = 0,
8350 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToCellWeights = 0,
8351 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToOutputWeights = 0,
8352 flatbuffers::Offset<armnnSerializer::ConstTensor> forgetGateBias = 0,
8353 flatbuffers::Offset<armnnSerializer::ConstTensor> cellBias = 0,
8354 flatbuffers::Offset<armnnSerializer::ConstTensor> outputGateBias = 0,
8355 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToInputWeights = 0,
8356 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToInputWeights = 0,
8357 flatbuffers::Offset<armnnSerializer::ConstTensor> cellToInputWeights = 0,
8358 flatbuffers::Offset<armnnSerializer::ConstTensor> inputGateBias = 0,
8359 flatbuffers::Offset<armnnSerializer::ConstTensor> projectionWeights = 0,
8360 flatbuffers::Offset<armnnSerializer::ConstTensor> projectionBias = 0,
8361 flatbuffers::Offset<armnnSerializer::ConstTensor> cellToForgetWeights = 0,
8362 flatbuffers::Offset<armnnSerializer::ConstTensor> cellToOutputWeights = 0,
8363 flatbuffers::Offset<armnnSerializer::ConstTensor> inputLayerNormWeights = 0,
8364 flatbuffers::Offset<armnnSerializer::ConstTensor> forgetLayerNormWeights = 0,
8365 flatbuffers::Offset<armnnSerializer::ConstTensor> cellLayerNormWeights = 0,
8366 flatbuffers::Offset<armnnSerializer::ConstTensor> outputLayerNormWeights = 0) {
8367 LstmInputParamsBuilder builder_(_fbb);
8368 builder_.add_outputLayerNormWeights(outputLayerNormWeights);
8369 builder_.add_cellLayerNormWeights(cellLayerNormWeights);
8370 builder_.add_forgetLayerNormWeights(forgetLayerNormWeights);
8371 builder_.add_inputLayerNormWeights(inputLayerNormWeights);
8372 builder_.add_cellToOutputWeights(cellToOutputWeights);
8373 builder_.add_cellToForgetWeights(cellToForgetWeights);
8374 builder_.add_projectionBias(projectionBias);
8375 builder_.add_projectionWeights(projectionWeights);
8376 builder_.add_inputGateBias(inputGateBias);
8377 builder_.add_cellToInputWeights(cellToInputWeights);
8378 builder_.add_recurrentToInputWeights(recurrentToInputWeights);
8379 builder_.add_inputToInputWeights(inputToInputWeights);
8380 builder_.add_outputGateBias(outputGateBias);
8381 builder_.add_cellBias(cellBias);
8382 builder_.add_forgetGateBias(forgetGateBias);
8383 builder_.add_recurrentToOutputWeights(recurrentToOutputWeights);
8384 builder_.add_recurrentToCellWeights(recurrentToCellWeights);
8385 builder_.add_recurrentToForgetWeights(recurrentToForgetWeights);
8386 builder_.add_inputToOutputWeights(inputToOutputWeights);
8387 builder_.add_inputToCellWeights(inputToCellWeights);
8388 builder_.add_inputToForgetWeights(inputToForgetWeights);
8389 return builder_.Finish();
8390 }
8391
8392 struct LstmDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
8393 typedef LstmDescriptorBuilder Builder;
8394 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
8395 VT_ACTIVATIONFUNC = 4,
8396 VT_CLIPPINGTHRESCELL = 6,
8397 VT_CLIPPINGTHRESPROJ = 8,
8398 VT_CIFGENABLED = 10,
8399 VT_PEEPHOLEENABLED = 12,
8400 VT_PROJECTIONENABLED = 14,
8401 VT_LAYERNORMENABLED = 16
8402 };
8403 uint32_t activationFunc() const {
8404 return GetField<uint32_t>(VT_ACTIVATIONFUNC, 0);
8405 }
8406 float clippingThresCell() const {
8407 return GetField<float>(VT_CLIPPINGTHRESCELL, 0.0f);
8408 }
8409 float clippingThresProj() const {
8410 return GetField<float>(VT_CLIPPINGTHRESPROJ, 0.0f);
8411 }
8412 bool cifgEnabled() const {
8413 return GetField<uint8_t>(VT_CIFGENABLED, 1) != 0;
8414 }
8415 bool peepholeEnabled() const {
8416 return GetField<uint8_t>(VT_PEEPHOLEENABLED, 0) != 0;
8417 }
8418 bool projectionEnabled() const {
8419 return GetField<uint8_t>(VT_PROJECTIONENABLED, 0) != 0;
8420 }
8421 bool layerNormEnabled() const {
8422 return GetField<uint8_t>(VT_LAYERNORMENABLED, 0) != 0;
8423 }
8424 bool Verify(flatbuffers::Verifier &verifier) const {
8425 return VerifyTableStart(verifier) &&
8426 VerifyField<uint32_t>(verifier, VT_ACTIVATIONFUNC, 4) &&
8427 VerifyField<float>(verifier, VT_CLIPPINGTHRESCELL, 4) &&
8428 VerifyField<float>(verifier, VT_CLIPPINGTHRESPROJ, 4) &&
8429 VerifyField<uint8_t>(verifier, VT_CIFGENABLED, 1) &&
8430 VerifyField<uint8_t>(verifier, VT_PEEPHOLEENABLED, 1) &&
8431 VerifyField<uint8_t>(verifier, VT_PROJECTIONENABLED, 1) &&
8432 VerifyField<uint8_t>(verifier, VT_LAYERNORMENABLED, 1) &&
8433 verifier.EndTable();
8434 }
8435 };
8436
8437 struct LstmDescriptorBuilder {
8438 typedef LstmDescriptor Table;
8439 flatbuffers::FlatBufferBuilder &fbb_;
8440 flatbuffers::uoffset_t start_;
8441 void add_activationFunc(uint32_t activationFunc) {
8442 fbb_.AddElement<uint32_t>(LstmDescriptor::VT_ACTIVATIONFUNC, activationFunc, 0);
8443 }
8444 void add_clippingThresCell(float clippingThresCell) {
8445 fbb_.AddElement<float>(LstmDescriptor::VT_CLIPPINGTHRESCELL, clippingThresCell, 0.0f);
8446 }
8447 void add_clippingThresProj(float clippingThresProj) {
8448 fbb_.AddElement<float>(LstmDescriptor::VT_CLIPPINGTHRESPROJ, clippingThresProj, 0.0f);
8449 }
8450 void add_cifgEnabled(bool cifgEnabled) {
8451 fbb_.AddElement<uint8_t>(LstmDescriptor::VT_CIFGENABLED, static_cast<uint8_t>(cifgEnabled), 1);
8452 }
8453 void add_peepholeEnabled(bool peepholeEnabled) {
8454 fbb_.AddElement<uint8_t>(LstmDescriptor::VT_PEEPHOLEENABLED, static_cast<uint8_t>(peepholeEnabled), 0);
8455 }
8456 void add_projectionEnabled(bool projectionEnabled) {
8457 fbb_.AddElement<uint8_t>(LstmDescriptor::VT_PROJECTIONENABLED, static_cast<uint8_t>(projectionEnabled), 0);
8458 }
8459 void add_layerNormEnabled(bool layerNormEnabled) {
8460 fbb_.AddElement<uint8_t>(LstmDescriptor::VT_LAYERNORMENABLED, static_cast<uint8_t>(layerNormEnabled), 0);
8461 }
8462 explicit LstmDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
8463 : fbb_(_fbb) {
8464 start_ = fbb_.StartTable();
8465 }
8466 flatbuffers::Offset<LstmDescriptor> Finish() {
8467 const auto end = fbb_.EndTable(start_);
8468 auto o = flatbuffers::Offset<LstmDescriptor>(end);
8469 return o;
8470 }
8471 };
8472
8473 inline flatbuffers::Offset<LstmDescriptor> CreateLstmDescriptor(
8474 flatbuffers::FlatBufferBuilder &_fbb,
8475 uint32_t activationFunc = 0,
8476 float clippingThresCell = 0.0f,
8477 float clippingThresProj = 0.0f,
8478 bool cifgEnabled = true,
8479 bool peepholeEnabled = false,
8480 bool projectionEnabled = false,
8481 bool layerNormEnabled = false) {
8482 LstmDescriptorBuilder builder_(_fbb);
8483 builder_.add_clippingThresProj(clippingThresProj);
8484 builder_.add_clippingThresCell(clippingThresCell);
8485 builder_.add_activationFunc(activationFunc);
8486 builder_.add_layerNormEnabled(layerNormEnabled);
8487 builder_.add_projectionEnabled(projectionEnabled);
8488 builder_.add_peepholeEnabled(peepholeEnabled);
8489 builder_.add_cifgEnabled(cifgEnabled);
8490 return builder_.Finish();
8491 }
8492
8493 struct LstmLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
8494 typedef LstmLayerBuilder Builder;
8495 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
8496 VT_BASE = 4,
8497 VT_DESCRIPTOR = 6,
8498 VT_INPUTPARAMS = 8
8499 };
8500 const armnnSerializer::LayerBase *base() const {
8501 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
8502 }
8503 const armnnSerializer::LstmDescriptor *descriptor() const {
8504 return GetPointer<const armnnSerializer::LstmDescriptor *>(VT_DESCRIPTOR);
8505 }
8506 const armnnSerializer::LstmInputParams *inputParams() const {
8507 return GetPointer<const armnnSerializer::LstmInputParams *>(VT_INPUTPARAMS);
8508 }
8509 bool Verify(flatbuffers::Verifier &verifier) const {
8510 return VerifyTableStart(verifier) &&
8511 VerifyOffset(verifier, VT_BASE) &&
8512 verifier.VerifyTable(base()) &&
8513 VerifyOffset(verifier, VT_DESCRIPTOR) &&
8514 verifier.VerifyTable(descriptor()) &&
8515 VerifyOffset(verifier, VT_INPUTPARAMS) &&
8516 verifier.VerifyTable(inputParams()) &&
8517 verifier.EndTable();
8518 }
8519 };
8520
8521 struct LstmLayerBuilder {
8522 typedef LstmLayer Table;
8523 flatbuffers::FlatBufferBuilder &fbb_;
8524 flatbuffers::uoffset_t start_;
8525 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
8526 fbb_.AddOffset(LstmLayer::VT_BASE, base);
8527 }
8528 void add_descriptor(flatbuffers::Offset<armnnSerializer::LstmDescriptor> descriptor) {
8529 fbb_.AddOffset(LstmLayer::VT_DESCRIPTOR, descriptor);
8530 }
8531 void add_inputParams(flatbuffers::Offset<armnnSerializer::LstmInputParams> inputParams) {
8532 fbb_.AddOffset(LstmLayer::VT_INPUTPARAMS, inputParams);
8533 }
8534 explicit LstmLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
8535 : fbb_(_fbb) {
8536 start_ = fbb_.StartTable();
8537 }
8538 flatbuffers::Offset<LstmLayer> Finish() {
8539 const auto end = fbb_.EndTable(start_);
8540 auto o = flatbuffers::Offset<LstmLayer>(end);
8541 return o;
8542 }
8543 };
8544
8545 inline flatbuffers::Offset<LstmLayer> CreateLstmLayer(
8546 flatbuffers::FlatBufferBuilder &_fbb,
8547 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
8548 flatbuffers::Offset<armnnSerializer::LstmDescriptor> descriptor = 0,
8549 flatbuffers::Offset<armnnSerializer::LstmInputParams> inputParams = 0) {
8550 LstmLayerBuilder builder_(_fbb);
8551 builder_.add_inputParams(inputParams);
8552 builder_.add_descriptor(descriptor);
8553 builder_.add_base(base);
8554 return builder_.Finish();
8555 }
8556
8557 struct QLstmInputParams FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
8558 typedef QLstmInputParamsBuilder Builder;
8559 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
8560 VT_INPUTTOFORGETWEIGHTS = 4,
8561 VT_INPUTTOCELLWEIGHTS = 6,
8562 VT_INPUTTOOUTPUTWEIGHTS = 8,
8563 VT_RECURRENTTOFORGETWEIGHTS = 10,
8564 VT_RECURRENTTOCELLWEIGHTS = 12,
8565 VT_RECURRENTTOOUTPUTWEIGHTS = 14,
8566 VT_FORGETGATEBIAS = 16,
8567 VT_CELLBIAS = 18,
8568 VT_OUTPUTGATEBIAS = 20,
8569 VT_INPUTTOINPUTWEIGHTS = 22,
8570 VT_RECURRENTTOINPUTWEIGHTS = 24,
8571 VT_INPUTGATEBIAS = 26,
8572 VT_PROJECTIONWEIGHTS = 28,
8573 VT_PROJECTIONBIAS = 30,
8574 VT_CELLTOINPUTWEIGHTS = 32,
8575 VT_CELLTOFORGETWEIGHTS = 34,
8576 VT_CELLTOOUTPUTWEIGHTS = 36,
8577 VT_INPUTLAYERNORMWEIGHTS = 38,
8578 VT_FORGETLAYERNORMWEIGHTS = 40,
8579 VT_CELLLAYERNORMWEIGHTS = 42,
8580 VT_OUTPUTLAYERNORMWEIGHTS = 44
8581 };
8582 const armnnSerializer::ConstTensor *inputToForgetWeights() const {
8583 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOFORGETWEIGHTS);
8584 }
8585 const armnnSerializer::ConstTensor *inputToCellWeights() const {
8586 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOCELLWEIGHTS);
8587 }
8588 const armnnSerializer::ConstTensor *inputToOutputWeights() const {
8589 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOOUTPUTWEIGHTS);
8590 }
8591 const armnnSerializer::ConstTensor *recurrentToForgetWeights() const {
8592 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOFORGETWEIGHTS);
8593 }
8594 const armnnSerializer::ConstTensor *recurrentToCellWeights() const {
8595 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOCELLWEIGHTS);
8596 }
8597 const armnnSerializer::ConstTensor *recurrentToOutputWeights() const {
8598 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOOUTPUTWEIGHTS);
8599 }
8600 const armnnSerializer::ConstTensor *forgetGateBias() const {
8601 return GetPointer<const armnnSerializer::ConstTensor *>(VT_FORGETGATEBIAS);
8602 }
8603 const armnnSerializer::ConstTensor *cellBias() const {
8604 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLBIAS);
8605 }
8606 const armnnSerializer::ConstTensor *outputGateBias() const {
8607 return GetPointer<const armnnSerializer::ConstTensor *>(VT_OUTPUTGATEBIAS);
8608 }
8609 const armnnSerializer::ConstTensor *inputToInputWeights() const {
8610 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOINPUTWEIGHTS);
8611 }
8612 const armnnSerializer::ConstTensor *recurrentToInputWeights() const {
8613 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOINPUTWEIGHTS);
8614 }
8615 const armnnSerializer::ConstTensor *inputGateBias() const {
8616 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTGATEBIAS);
8617 }
8618 const armnnSerializer::ConstTensor *projectionWeights() const {
8619 return GetPointer<const armnnSerializer::ConstTensor *>(VT_PROJECTIONWEIGHTS);
8620 }
8621 const armnnSerializer::ConstTensor *projectionBias() const {
8622 return GetPointer<const armnnSerializer::ConstTensor *>(VT_PROJECTIONBIAS);
8623 }
8624 const armnnSerializer::ConstTensor *cellToInputWeights() const {
8625 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLTOINPUTWEIGHTS);
8626 }
8627 const armnnSerializer::ConstTensor *cellToForgetWeights() const {
8628 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLTOFORGETWEIGHTS);
8629 }
8630 const armnnSerializer::ConstTensor *cellToOutputWeights() const {
8631 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLTOOUTPUTWEIGHTS);
8632 }
8633 const armnnSerializer::ConstTensor *inputLayerNormWeights() const {
8634 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTLAYERNORMWEIGHTS);
8635 }
8636 const armnnSerializer::ConstTensor *forgetLayerNormWeights() const {
8637 return GetPointer<const armnnSerializer::ConstTensor *>(VT_FORGETLAYERNORMWEIGHTS);
8638 }
8639 const armnnSerializer::ConstTensor *cellLayerNormWeights() const {
8640 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLLAYERNORMWEIGHTS);
8641 }
8642 const armnnSerializer::ConstTensor *outputLayerNormWeights() const {
8643 return GetPointer<const armnnSerializer::ConstTensor *>(VT_OUTPUTLAYERNORMWEIGHTS);
8644 }
8645 bool Verify(flatbuffers::Verifier &verifier) const {
8646 return VerifyTableStart(verifier) &&
8647 VerifyOffset(verifier, VT_INPUTTOFORGETWEIGHTS) &&
8648 verifier.VerifyTable(inputToForgetWeights()) &&
8649 VerifyOffset(verifier, VT_INPUTTOCELLWEIGHTS) &&
8650 verifier.VerifyTable(inputToCellWeights()) &&
8651 VerifyOffset(verifier, VT_INPUTTOOUTPUTWEIGHTS) &&
8652 verifier.VerifyTable(inputToOutputWeights()) &&
8653 VerifyOffset(verifier, VT_RECURRENTTOFORGETWEIGHTS) &&
8654 verifier.VerifyTable(recurrentToForgetWeights()) &&
8655 VerifyOffset(verifier, VT_RECURRENTTOCELLWEIGHTS) &&
8656 verifier.VerifyTable(recurrentToCellWeights()) &&
8657 VerifyOffset(verifier, VT_RECURRENTTOOUTPUTWEIGHTS) &&
8658 verifier.VerifyTable(recurrentToOutputWeights()) &&
8659 VerifyOffset(verifier, VT_FORGETGATEBIAS) &&
8660 verifier.VerifyTable(forgetGateBias()) &&
8661 VerifyOffset(verifier, VT_CELLBIAS) &&
8662 verifier.VerifyTable(cellBias()) &&
8663 VerifyOffset(verifier, VT_OUTPUTGATEBIAS) &&
8664 verifier.VerifyTable(outputGateBias()) &&
8665 VerifyOffset(verifier, VT_INPUTTOINPUTWEIGHTS) &&
8666 verifier.VerifyTable(inputToInputWeights()) &&
8667 VerifyOffset(verifier, VT_RECURRENTTOINPUTWEIGHTS) &&
8668 verifier.VerifyTable(recurrentToInputWeights()) &&
8669 VerifyOffset(verifier, VT_INPUTGATEBIAS) &&
8670 verifier.VerifyTable(inputGateBias()) &&
8671 VerifyOffset(verifier, VT_PROJECTIONWEIGHTS) &&
8672 verifier.VerifyTable(projectionWeights()) &&
8673 VerifyOffset(verifier, VT_PROJECTIONBIAS) &&
8674 verifier.VerifyTable(projectionBias()) &&
8675 VerifyOffset(verifier, VT_CELLTOINPUTWEIGHTS) &&
8676 verifier.VerifyTable(cellToInputWeights()) &&
8677 VerifyOffset(verifier, VT_CELLTOFORGETWEIGHTS) &&
8678 verifier.VerifyTable(cellToForgetWeights()) &&
8679 VerifyOffset(verifier, VT_CELLTOOUTPUTWEIGHTS) &&
8680 verifier.VerifyTable(cellToOutputWeights()) &&
8681 VerifyOffset(verifier, VT_INPUTLAYERNORMWEIGHTS) &&
8682 verifier.VerifyTable(inputLayerNormWeights()) &&
8683 VerifyOffset(verifier, VT_FORGETLAYERNORMWEIGHTS) &&
8684 verifier.VerifyTable(forgetLayerNormWeights()) &&
8685 VerifyOffset(verifier, VT_CELLLAYERNORMWEIGHTS) &&
8686 verifier.VerifyTable(cellLayerNormWeights()) &&
8687 VerifyOffset(verifier, VT_OUTPUTLAYERNORMWEIGHTS) &&
8688 verifier.VerifyTable(outputLayerNormWeights()) &&
8689 verifier.EndTable();
8690 }
8691 };
8692
8693 struct QLstmInputParamsBuilder {
8694 typedef QLstmInputParams Table;
8695 flatbuffers::FlatBufferBuilder &fbb_;
8696 flatbuffers::uoffset_t start_;
8697 void add_inputToForgetWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToForgetWeights) {
8698 fbb_.AddOffset(QLstmInputParams::VT_INPUTTOFORGETWEIGHTS, inputToForgetWeights);
8699 }
8700 void add_inputToCellWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToCellWeights) {
8701 fbb_.AddOffset(QLstmInputParams::VT_INPUTTOCELLWEIGHTS, inputToCellWeights);
8702 }
8703 void add_inputToOutputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToOutputWeights) {
8704 fbb_.AddOffset(QLstmInputParams::VT_INPUTTOOUTPUTWEIGHTS, inputToOutputWeights);
8705 }
8706 void add_recurrentToForgetWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToForgetWeights) {
8707 fbb_.AddOffset(QLstmInputParams::VT_RECURRENTTOFORGETWEIGHTS, recurrentToForgetWeights);
8708 }
8709 void add_recurrentToCellWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToCellWeights) {
8710 fbb_.AddOffset(QLstmInputParams::VT_RECURRENTTOCELLWEIGHTS, recurrentToCellWeights);
8711 }
8712 void add_recurrentToOutputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToOutputWeights) {
8713 fbb_.AddOffset(QLstmInputParams::VT_RECURRENTTOOUTPUTWEIGHTS, recurrentToOutputWeights);
8714 }
8715 void add_forgetGateBias(flatbuffers::Offset<armnnSerializer::ConstTensor> forgetGateBias) {
8716 fbb_.AddOffset(QLstmInputParams::VT_FORGETGATEBIAS, forgetGateBias);
8717 }
8718 void add_cellBias(flatbuffers::Offset<armnnSerializer::ConstTensor> cellBias) {
8719 fbb_.AddOffset(QLstmInputParams::VT_CELLBIAS, cellBias);
8720 }
8721 void add_outputGateBias(flatbuffers::Offset<armnnSerializer::ConstTensor> outputGateBias) {
8722 fbb_.AddOffset(QLstmInputParams::VT_OUTPUTGATEBIAS, outputGateBias);
8723 }
8724 void add_inputToInputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToInputWeights) {
8725 fbb_.AddOffset(QLstmInputParams::VT_INPUTTOINPUTWEIGHTS, inputToInputWeights);
8726 }
8727 void add_recurrentToInputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToInputWeights) {
8728 fbb_.AddOffset(QLstmInputParams::VT_RECURRENTTOINPUTWEIGHTS, recurrentToInputWeights);
8729 }
8730 void add_inputGateBias(flatbuffers::Offset<armnnSerializer::ConstTensor> inputGateBias) {
8731 fbb_.AddOffset(QLstmInputParams::VT_INPUTGATEBIAS, inputGateBias);
8732 }
8733 void add_projectionWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> projectionWeights) {
8734 fbb_.AddOffset(QLstmInputParams::VT_PROJECTIONWEIGHTS, projectionWeights);
8735 }
8736 void add_projectionBias(flatbuffers::Offset<armnnSerializer::ConstTensor> projectionBias) {
8737 fbb_.AddOffset(QLstmInputParams::VT_PROJECTIONBIAS, projectionBias);
8738 }
8739 void add_cellToInputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> cellToInputWeights) {
8740 fbb_.AddOffset(QLstmInputParams::VT_CELLTOINPUTWEIGHTS, cellToInputWeights);
8741 }
8742 void add_cellToForgetWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> cellToForgetWeights) {
8743 fbb_.AddOffset(QLstmInputParams::VT_CELLTOFORGETWEIGHTS, cellToForgetWeights);
8744 }
8745 void add_cellToOutputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> cellToOutputWeights) {
8746 fbb_.AddOffset(QLstmInputParams::VT_CELLTOOUTPUTWEIGHTS, cellToOutputWeights);
8747 }
8748 void add_inputLayerNormWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputLayerNormWeights) {
8749 fbb_.AddOffset(QLstmInputParams::VT_INPUTLAYERNORMWEIGHTS, inputLayerNormWeights);
8750 }
8751 void add_forgetLayerNormWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> forgetLayerNormWeights) {
8752 fbb_.AddOffset(QLstmInputParams::VT_FORGETLAYERNORMWEIGHTS, forgetLayerNormWeights);
8753 }
8754 void add_cellLayerNormWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> cellLayerNormWeights) {
8755 fbb_.AddOffset(QLstmInputParams::VT_CELLLAYERNORMWEIGHTS, cellLayerNormWeights);
8756 }
8757 void add_outputLayerNormWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> outputLayerNormWeights) {
8758 fbb_.AddOffset(QLstmInputParams::VT_OUTPUTLAYERNORMWEIGHTS, outputLayerNormWeights);
8759 }
8760 explicit QLstmInputParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
8761 : fbb_(_fbb) {
8762 start_ = fbb_.StartTable();
8763 }
8764 flatbuffers::Offset<QLstmInputParams> Finish() {
8765 const auto end = fbb_.EndTable(start_);
8766 auto o = flatbuffers::Offset<QLstmInputParams>(end);
8767 return o;
8768 }
8769 };
8770
8771 inline flatbuffers::Offset<QLstmInputParams> CreateQLstmInputParams(
8772 flatbuffers::FlatBufferBuilder &_fbb,
8773 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToForgetWeights = 0,
8774 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToCellWeights = 0,
8775 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToOutputWeights = 0,
8776 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToForgetWeights = 0,
8777 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToCellWeights = 0,
8778 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToOutputWeights = 0,
8779 flatbuffers::Offset<armnnSerializer::ConstTensor> forgetGateBias = 0,
8780 flatbuffers::Offset<armnnSerializer::ConstTensor> cellBias = 0,
8781 flatbuffers::Offset<armnnSerializer::ConstTensor> outputGateBias = 0,
8782 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToInputWeights = 0,
8783 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToInputWeights = 0,
8784 flatbuffers::Offset<armnnSerializer::ConstTensor> inputGateBias = 0,
8785 flatbuffers::Offset<armnnSerializer::ConstTensor> projectionWeights = 0,
8786 flatbuffers::Offset<armnnSerializer::ConstTensor> projectionBias = 0,
8787 flatbuffers::Offset<armnnSerializer::ConstTensor> cellToInputWeights = 0,
8788 flatbuffers::Offset<armnnSerializer::ConstTensor> cellToForgetWeights = 0,
8789 flatbuffers::Offset<armnnSerializer::ConstTensor> cellToOutputWeights = 0,
8790 flatbuffers::Offset<armnnSerializer::ConstTensor> inputLayerNormWeights = 0,
8791 flatbuffers::Offset<armnnSerializer::ConstTensor> forgetLayerNormWeights = 0,
8792 flatbuffers::Offset<armnnSerializer::ConstTensor> cellLayerNormWeights = 0,
8793 flatbuffers::Offset<armnnSerializer::ConstTensor> outputLayerNormWeights = 0) {
8794 QLstmInputParamsBuilder builder_(_fbb);
8795 builder_.add_outputLayerNormWeights(outputLayerNormWeights);
8796 builder_.add_cellLayerNormWeights(cellLayerNormWeights);
8797 builder_.add_forgetLayerNormWeights(forgetLayerNormWeights);
8798 builder_.add_inputLayerNormWeights(inputLayerNormWeights);
8799 builder_.add_cellToOutputWeights(cellToOutputWeights);
8800 builder_.add_cellToForgetWeights(cellToForgetWeights);
8801 builder_.add_cellToInputWeights(cellToInputWeights);
8802 builder_.add_projectionBias(projectionBias);
8803 builder_.add_projectionWeights(projectionWeights);
8804 builder_.add_inputGateBias(inputGateBias);
8805 builder_.add_recurrentToInputWeights(recurrentToInputWeights);
8806 builder_.add_inputToInputWeights(inputToInputWeights);
8807 builder_.add_outputGateBias(outputGateBias);
8808 builder_.add_cellBias(cellBias);
8809 builder_.add_forgetGateBias(forgetGateBias);
8810 builder_.add_recurrentToOutputWeights(recurrentToOutputWeights);
8811 builder_.add_recurrentToCellWeights(recurrentToCellWeights);
8812 builder_.add_recurrentToForgetWeights(recurrentToForgetWeights);
8813 builder_.add_inputToOutputWeights(inputToOutputWeights);
8814 builder_.add_inputToCellWeights(inputToCellWeights);
8815 builder_.add_inputToForgetWeights(inputToForgetWeights);
8816 return builder_.Finish();
8817 }
8818
8819 struct QLstmDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
8820 typedef QLstmDescriptorBuilder Builder;
8821 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
8822 VT_CIFGENABLED = 4,
8823 VT_PEEPHOLEENABLED = 6,
8824 VT_PROJECTIONENABLED = 8,
8825 VT_LAYERNORMENABLED = 10,
8826 VT_CELLCLIP = 12,
8827 VT_PROJECTIONCLIP = 14,
8828 VT_INPUTINTERMEDIATESCALE = 16,
8829 VT_FORGETINTERMEDIATESCALE = 18,
8830 VT_CELLINTERMEDIATESCALE = 20,
8831 VT_OUTPUTINTERMEDIATESCALE = 22,
8832 VT_HIDDENSTATEZEROPOINT = 24,
8833 VT_HIDDENSTATESCALE = 26
8834 };
8835 bool cifgEnabled() const {
8836 return GetField<uint8_t>(VT_CIFGENABLED, 1) != 0;
8837 }
8838 bool peepholeEnabled() const {
8839 return GetField<uint8_t>(VT_PEEPHOLEENABLED, 0) != 0;
8840 }
8841 bool projectionEnabled() const {
8842 return GetField<uint8_t>(VT_PROJECTIONENABLED, 0) != 0;
8843 }
8844 bool layerNormEnabled() const {
8845 return GetField<uint8_t>(VT_LAYERNORMENABLED, 0) != 0;
8846 }
8847 float cellClip() const {
8848 return GetField<float>(VT_CELLCLIP, 0.0f);
8849 }
8850 float projectionClip() const {
8851 return GetField<float>(VT_PROJECTIONCLIP, 0.0f);
8852 }
8853 float inputIntermediateScale() const {
8854 return GetField<float>(VT_INPUTINTERMEDIATESCALE, 0.0f);
8855 }
8856 float forgetIntermediateScale() const {
8857 return GetField<float>(VT_FORGETINTERMEDIATESCALE, 0.0f);
8858 }
8859 float cellIntermediateScale() const {
8860 return GetField<float>(VT_CELLINTERMEDIATESCALE, 0.0f);
8861 }
8862 float outputIntermediateScale() const {
8863 return GetField<float>(VT_OUTPUTINTERMEDIATESCALE, 0.0f);
8864 }
8865 int32_t hiddenStateZeroPoint() const {
8866 return GetField<int32_t>(VT_HIDDENSTATEZEROPOINT, 0);
8867 }
8868 float hiddenStateScale() const {
8869 return GetField<float>(VT_HIDDENSTATESCALE, 0.0f);
8870 }
8871 bool Verify(flatbuffers::Verifier &verifier) const {
8872 return VerifyTableStart(verifier) &&
8873 VerifyField<uint8_t>(verifier, VT_CIFGENABLED, 1) &&
8874 VerifyField<uint8_t>(verifier, VT_PEEPHOLEENABLED, 1) &&
8875 VerifyField<uint8_t>(verifier, VT_PROJECTIONENABLED, 1) &&
8876 VerifyField<uint8_t>(verifier, VT_LAYERNORMENABLED, 1) &&
8877 VerifyField<float>(verifier, VT_CELLCLIP, 4) &&
8878 VerifyField<float>(verifier, VT_PROJECTIONCLIP, 4) &&
8879 VerifyField<float>(verifier, VT_INPUTINTERMEDIATESCALE, 4) &&
8880 VerifyField<float>(verifier, VT_FORGETINTERMEDIATESCALE, 4) &&
8881 VerifyField<float>(verifier, VT_CELLINTERMEDIATESCALE, 4) &&
8882 VerifyField<float>(verifier, VT_OUTPUTINTERMEDIATESCALE, 4) &&
8883 VerifyField<int32_t>(verifier, VT_HIDDENSTATEZEROPOINT, 4) &&
8884 VerifyField<float>(verifier, VT_HIDDENSTATESCALE, 4) &&
8885 verifier.EndTable();
8886 }
8887 };
8888
8889 struct QLstmDescriptorBuilder {
8890 typedef QLstmDescriptor Table;
8891 flatbuffers::FlatBufferBuilder &fbb_;
8892 flatbuffers::uoffset_t start_;
8893 void add_cifgEnabled(bool cifgEnabled) {
8894 fbb_.AddElement<uint8_t>(QLstmDescriptor::VT_CIFGENABLED, static_cast<uint8_t>(cifgEnabled), 1);
8895 }
8896 void add_peepholeEnabled(bool peepholeEnabled) {
8897 fbb_.AddElement<uint8_t>(QLstmDescriptor::VT_PEEPHOLEENABLED, static_cast<uint8_t>(peepholeEnabled), 0);
8898 }
8899 void add_projectionEnabled(bool projectionEnabled) {
8900 fbb_.AddElement<uint8_t>(QLstmDescriptor::VT_PROJECTIONENABLED, static_cast<uint8_t>(projectionEnabled), 0);
8901 }
8902 void add_layerNormEnabled(bool layerNormEnabled) {
8903 fbb_.AddElement<uint8_t>(QLstmDescriptor::VT_LAYERNORMENABLED, static_cast<uint8_t>(layerNormEnabled), 0);
8904 }
8905 void add_cellClip(float cellClip) {
8906 fbb_.AddElement<float>(QLstmDescriptor::VT_CELLCLIP, cellClip, 0.0f);
8907 }
8908 void add_projectionClip(float projectionClip) {
8909 fbb_.AddElement<float>(QLstmDescriptor::VT_PROJECTIONCLIP, projectionClip, 0.0f);
8910 }
8911 void add_inputIntermediateScale(float inputIntermediateScale) {
8912 fbb_.AddElement<float>(QLstmDescriptor::VT_INPUTINTERMEDIATESCALE, inputIntermediateScale, 0.0f);
8913 }
8914 void add_forgetIntermediateScale(float forgetIntermediateScale) {
8915 fbb_.AddElement<float>(QLstmDescriptor::VT_FORGETINTERMEDIATESCALE, forgetIntermediateScale, 0.0f);
8916 }
8917 void add_cellIntermediateScale(float cellIntermediateScale) {
8918 fbb_.AddElement<float>(QLstmDescriptor::VT_CELLINTERMEDIATESCALE, cellIntermediateScale, 0.0f);
8919 }
8920 void add_outputIntermediateScale(float outputIntermediateScale) {
8921 fbb_.AddElement<float>(QLstmDescriptor::VT_OUTPUTINTERMEDIATESCALE, outputIntermediateScale, 0.0f);
8922 }
8923 void add_hiddenStateZeroPoint(int32_t hiddenStateZeroPoint) {
8924 fbb_.AddElement<int32_t>(QLstmDescriptor::VT_HIDDENSTATEZEROPOINT, hiddenStateZeroPoint, 0);
8925 }
8926 void add_hiddenStateScale(float hiddenStateScale) {
8927 fbb_.AddElement<float>(QLstmDescriptor::VT_HIDDENSTATESCALE, hiddenStateScale, 0.0f);
8928 }
8929 explicit QLstmDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
8930 : fbb_(_fbb) {
8931 start_ = fbb_.StartTable();
8932 }
8933 flatbuffers::Offset<QLstmDescriptor> Finish() {
8934 const auto end = fbb_.EndTable(start_);
8935 auto o = flatbuffers::Offset<QLstmDescriptor>(end);
8936 return o;
8937 }
8938 };
8939
8940 inline flatbuffers::Offset<QLstmDescriptor> CreateQLstmDescriptor(
8941 flatbuffers::FlatBufferBuilder &_fbb,
8942 bool cifgEnabled = true,
8943 bool peepholeEnabled = false,
8944 bool projectionEnabled = false,
8945 bool layerNormEnabled = false,
8946 float cellClip = 0.0f,
8947 float projectionClip = 0.0f,
8948 float inputIntermediateScale = 0.0f,
8949 float forgetIntermediateScale = 0.0f,
8950 float cellIntermediateScale = 0.0f,
8951 float outputIntermediateScale = 0.0f,
8952 int32_t hiddenStateZeroPoint = 0,
8953 float hiddenStateScale = 0.0f) {
8954 QLstmDescriptorBuilder builder_(_fbb);
8955 builder_.add_hiddenStateScale(hiddenStateScale);
8956 builder_.add_hiddenStateZeroPoint(hiddenStateZeroPoint);
8957 builder_.add_outputIntermediateScale(outputIntermediateScale);
8958 builder_.add_cellIntermediateScale(cellIntermediateScale);
8959 builder_.add_forgetIntermediateScale(forgetIntermediateScale);
8960 builder_.add_inputIntermediateScale(inputIntermediateScale);
8961 builder_.add_projectionClip(projectionClip);
8962 builder_.add_cellClip(cellClip);
8963 builder_.add_layerNormEnabled(layerNormEnabled);
8964 builder_.add_projectionEnabled(projectionEnabled);
8965 builder_.add_peepholeEnabled(peepholeEnabled);
8966 builder_.add_cifgEnabled(cifgEnabled);
8967 return builder_.Finish();
8968 }
8969
8970 struct QLstmLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
8971 typedef QLstmLayerBuilder Builder;
8972 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
8973 VT_BASE = 4,
8974 VT_DESCRIPTOR = 6,
8975 VT_INPUTPARAMS = 8
8976 };
8977 const armnnSerializer::LayerBase *base() const {
8978 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
8979 }
8980 const armnnSerializer::QLstmDescriptor *descriptor() const {
8981 return GetPointer<const armnnSerializer::QLstmDescriptor *>(VT_DESCRIPTOR);
8982 }
8983 const armnnSerializer::QLstmInputParams *inputParams() const {
8984 return GetPointer<const armnnSerializer::QLstmInputParams *>(VT_INPUTPARAMS);
8985 }
8986 bool Verify(flatbuffers::Verifier &verifier) const {
8987 return VerifyTableStart(verifier) &&
8988 VerifyOffset(verifier, VT_BASE) &&
8989 verifier.VerifyTable(base()) &&
8990 VerifyOffset(verifier, VT_DESCRIPTOR) &&
8991 verifier.VerifyTable(descriptor()) &&
8992 VerifyOffset(verifier, VT_INPUTPARAMS) &&
8993 verifier.VerifyTable(inputParams()) &&
8994 verifier.EndTable();
8995 }
8996 };
8997
8998 struct QLstmLayerBuilder {
8999 typedef QLstmLayer Table;
9000 flatbuffers::FlatBufferBuilder &fbb_;
9001 flatbuffers::uoffset_t start_;
9002 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9003 fbb_.AddOffset(QLstmLayer::VT_BASE, base);
9004 }
9005 void add_descriptor(flatbuffers::Offset<armnnSerializer::QLstmDescriptor> descriptor) {
9006 fbb_.AddOffset(QLstmLayer::VT_DESCRIPTOR, descriptor);
9007 }
9008 void add_inputParams(flatbuffers::Offset<armnnSerializer::QLstmInputParams> inputParams) {
9009 fbb_.AddOffset(QLstmLayer::VT_INPUTPARAMS, inputParams);
9010 }
9011 explicit QLstmLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9012 : fbb_(_fbb) {
9013 start_ = fbb_.StartTable();
9014 }
9015 flatbuffers::Offset<QLstmLayer> Finish() {
9016 const auto end = fbb_.EndTable(start_);
9017 auto o = flatbuffers::Offset<QLstmLayer>(end);
9018 return o;
9019 }
9020 };
9021
9022 inline flatbuffers::Offset<QLstmLayer> CreateQLstmLayer(
9023 flatbuffers::FlatBufferBuilder &_fbb,
9024 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
9025 flatbuffers::Offset<armnnSerializer::QLstmDescriptor> descriptor = 0,
9026 flatbuffers::Offset<armnnSerializer::QLstmInputParams> inputParams = 0) {
9027 QLstmLayerBuilder builder_(_fbb);
9028 builder_.add_inputParams(inputParams);
9029 builder_.add_descriptor(descriptor);
9030 builder_.add_base(base);
9031 return builder_.Finish();
9032 }
9033
9034 struct QuantizedLstmInputParams FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9035 typedef QuantizedLstmInputParamsBuilder Builder;
9036 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9037 VT_INPUTTOINPUTWEIGHTS = 4,
9038 VT_INPUTTOFORGETWEIGHTS = 6,
9039 VT_INPUTTOCELLWEIGHTS = 8,
9040 VT_INPUTTOOUTPUTWEIGHTS = 10,
9041 VT_RECURRENTTOINPUTWEIGHTS = 12,
9042 VT_RECURRENTTOFORGETWEIGHTS = 14,
9043 VT_RECURRENTTOCELLWEIGHTS = 16,
9044 VT_RECURRENTTOOUTPUTWEIGHTS = 18,
9045 VT_INPUTGATEBIAS = 20,
9046 VT_FORGETGATEBIAS = 22,
9047 VT_CELLBIAS = 24,
9048 VT_OUTPUTGATEBIAS = 26
9049 };
9050 const armnnSerializer::ConstTensor *inputToInputWeights() const {
9051 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOINPUTWEIGHTS);
9052 }
9053 const armnnSerializer::ConstTensor *inputToForgetWeights() const {
9054 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOFORGETWEIGHTS);
9055 }
9056 const armnnSerializer::ConstTensor *inputToCellWeights() const {
9057 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOCELLWEIGHTS);
9058 }
9059 const armnnSerializer::ConstTensor *inputToOutputWeights() const {
9060 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTTOOUTPUTWEIGHTS);
9061 }
9062 const armnnSerializer::ConstTensor *recurrentToInputWeights() const {
9063 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOINPUTWEIGHTS);
9064 }
9065 const armnnSerializer::ConstTensor *recurrentToForgetWeights() const {
9066 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOFORGETWEIGHTS);
9067 }
9068 const armnnSerializer::ConstTensor *recurrentToCellWeights() const {
9069 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOCELLWEIGHTS);
9070 }
9071 const armnnSerializer::ConstTensor *recurrentToOutputWeights() const {
9072 return GetPointer<const armnnSerializer::ConstTensor *>(VT_RECURRENTTOOUTPUTWEIGHTS);
9073 }
9074 const armnnSerializer::ConstTensor *inputGateBias() const {
9075 return GetPointer<const armnnSerializer::ConstTensor *>(VT_INPUTGATEBIAS);
9076 }
9077 const armnnSerializer::ConstTensor *forgetGateBias() const {
9078 return GetPointer<const armnnSerializer::ConstTensor *>(VT_FORGETGATEBIAS);
9079 }
9080 const armnnSerializer::ConstTensor *cellBias() const {
9081 return GetPointer<const armnnSerializer::ConstTensor *>(VT_CELLBIAS);
9082 }
9083 const armnnSerializer::ConstTensor *outputGateBias() const {
9084 return GetPointer<const armnnSerializer::ConstTensor *>(VT_OUTPUTGATEBIAS);
9085 }
9086 bool Verify(flatbuffers::Verifier &verifier) const {
9087 return VerifyTableStart(verifier) &&
9088 VerifyOffset(verifier, VT_INPUTTOINPUTWEIGHTS) &&
9089 verifier.VerifyTable(inputToInputWeights()) &&
9090 VerifyOffset(verifier, VT_INPUTTOFORGETWEIGHTS) &&
9091 verifier.VerifyTable(inputToForgetWeights()) &&
9092 VerifyOffset(verifier, VT_INPUTTOCELLWEIGHTS) &&
9093 verifier.VerifyTable(inputToCellWeights()) &&
9094 VerifyOffset(verifier, VT_INPUTTOOUTPUTWEIGHTS) &&
9095 verifier.VerifyTable(inputToOutputWeights()) &&
9096 VerifyOffset(verifier, VT_RECURRENTTOINPUTWEIGHTS) &&
9097 verifier.VerifyTable(recurrentToInputWeights()) &&
9098 VerifyOffset(verifier, VT_RECURRENTTOFORGETWEIGHTS) &&
9099 verifier.VerifyTable(recurrentToForgetWeights()) &&
9100 VerifyOffset(verifier, VT_RECURRENTTOCELLWEIGHTS) &&
9101 verifier.VerifyTable(recurrentToCellWeights()) &&
9102 VerifyOffset(verifier, VT_RECURRENTTOOUTPUTWEIGHTS) &&
9103 verifier.VerifyTable(recurrentToOutputWeights()) &&
9104 VerifyOffset(verifier, VT_INPUTGATEBIAS) &&
9105 verifier.VerifyTable(inputGateBias()) &&
9106 VerifyOffset(verifier, VT_FORGETGATEBIAS) &&
9107 verifier.VerifyTable(forgetGateBias()) &&
9108 VerifyOffset(verifier, VT_CELLBIAS) &&
9109 verifier.VerifyTable(cellBias()) &&
9110 VerifyOffset(verifier, VT_OUTPUTGATEBIAS) &&
9111 verifier.VerifyTable(outputGateBias()) &&
9112 verifier.EndTable();
9113 }
9114 };
9115
9116 struct QuantizedLstmInputParamsBuilder {
9117 typedef QuantizedLstmInputParams Table;
9118 flatbuffers::FlatBufferBuilder &fbb_;
9119 flatbuffers::uoffset_t start_;
9120 void add_inputToInputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToInputWeights) {
9121 fbb_.AddOffset(QuantizedLstmInputParams::VT_INPUTTOINPUTWEIGHTS, inputToInputWeights);
9122 }
9123 void add_inputToForgetWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToForgetWeights) {
9124 fbb_.AddOffset(QuantizedLstmInputParams::VT_INPUTTOFORGETWEIGHTS, inputToForgetWeights);
9125 }
9126 void add_inputToCellWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToCellWeights) {
9127 fbb_.AddOffset(QuantizedLstmInputParams::VT_INPUTTOCELLWEIGHTS, inputToCellWeights);
9128 }
9129 void add_inputToOutputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> inputToOutputWeights) {
9130 fbb_.AddOffset(QuantizedLstmInputParams::VT_INPUTTOOUTPUTWEIGHTS, inputToOutputWeights);
9131 }
9132 void add_recurrentToInputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToInputWeights) {
9133 fbb_.AddOffset(QuantizedLstmInputParams::VT_RECURRENTTOINPUTWEIGHTS, recurrentToInputWeights);
9134 }
9135 void add_recurrentToForgetWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToForgetWeights) {
9136 fbb_.AddOffset(QuantizedLstmInputParams::VT_RECURRENTTOFORGETWEIGHTS, recurrentToForgetWeights);
9137 }
9138 void add_recurrentToCellWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToCellWeights) {
9139 fbb_.AddOffset(QuantizedLstmInputParams::VT_RECURRENTTOCELLWEIGHTS, recurrentToCellWeights);
9140 }
9141 void add_recurrentToOutputWeights(flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToOutputWeights) {
9142 fbb_.AddOffset(QuantizedLstmInputParams::VT_RECURRENTTOOUTPUTWEIGHTS, recurrentToOutputWeights);
9143 }
9144 void add_inputGateBias(flatbuffers::Offset<armnnSerializer::ConstTensor> inputGateBias) {
9145 fbb_.AddOffset(QuantizedLstmInputParams::VT_INPUTGATEBIAS, inputGateBias);
9146 }
9147 void add_forgetGateBias(flatbuffers::Offset<armnnSerializer::ConstTensor> forgetGateBias) {
9148 fbb_.AddOffset(QuantizedLstmInputParams::VT_FORGETGATEBIAS, forgetGateBias);
9149 }
9150 void add_cellBias(flatbuffers::Offset<armnnSerializer::ConstTensor> cellBias) {
9151 fbb_.AddOffset(QuantizedLstmInputParams::VT_CELLBIAS, cellBias);
9152 }
9153 void add_outputGateBias(flatbuffers::Offset<armnnSerializer::ConstTensor> outputGateBias) {
9154 fbb_.AddOffset(QuantizedLstmInputParams::VT_OUTPUTGATEBIAS, outputGateBias);
9155 }
9156 explicit QuantizedLstmInputParamsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9157 : fbb_(_fbb) {
9158 start_ = fbb_.StartTable();
9159 }
9160 flatbuffers::Offset<QuantizedLstmInputParams> Finish() {
9161 const auto end = fbb_.EndTable(start_);
9162 auto o = flatbuffers::Offset<QuantizedLstmInputParams>(end);
9163 return o;
9164 }
9165 };
9166
9167 inline flatbuffers::Offset<QuantizedLstmInputParams> CreateQuantizedLstmInputParams(
9168 flatbuffers::FlatBufferBuilder &_fbb,
9169 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToInputWeights = 0,
9170 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToForgetWeights = 0,
9171 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToCellWeights = 0,
9172 flatbuffers::Offset<armnnSerializer::ConstTensor> inputToOutputWeights = 0,
9173 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToInputWeights = 0,
9174 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToForgetWeights = 0,
9175 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToCellWeights = 0,
9176 flatbuffers::Offset<armnnSerializer::ConstTensor> recurrentToOutputWeights = 0,
9177 flatbuffers::Offset<armnnSerializer::ConstTensor> inputGateBias = 0,
9178 flatbuffers::Offset<armnnSerializer::ConstTensor> forgetGateBias = 0,
9179 flatbuffers::Offset<armnnSerializer::ConstTensor> cellBias = 0,
9180 flatbuffers::Offset<armnnSerializer::ConstTensor> outputGateBias = 0) {
9181 QuantizedLstmInputParamsBuilder builder_(_fbb);
9182 builder_.add_outputGateBias(outputGateBias);
9183 builder_.add_cellBias(cellBias);
9184 builder_.add_forgetGateBias(forgetGateBias);
9185 builder_.add_inputGateBias(inputGateBias);
9186 builder_.add_recurrentToOutputWeights(recurrentToOutputWeights);
9187 builder_.add_recurrentToCellWeights(recurrentToCellWeights);
9188 builder_.add_recurrentToForgetWeights(recurrentToForgetWeights);
9189 builder_.add_recurrentToInputWeights(recurrentToInputWeights);
9190 builder_.add_inputToOutputWeights(inputToOutputWeights);
9191 builder_.add_inputToCellWeights(inputToCellWeights);
9192 builder_.add_inputToForgetWeights(inputToForgetWeights);
9193 builder_.add_inputToInputWeights(inputToInputWeights);
9194 return builder_.Finish();
9195 }
9196
9197 struct QuantizedLstmLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9198 typedef QuantizedLstmLayerBuilder Builder;
9199 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9200 VT_BASE = 4,
9201 VT_INPUTPARAMS = 6
9202 };
9203 const armnnSerializer::LayerBase *base() const {
9204 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
9205 }
9206 const armnnSerializer::QuantizedLstmInputParams *inputParams() const {
9207 return GetPointer<const armnnSerializer::QuantizedLstmInputParams *>(VT_INPUTPARAMS);
9208 }
9209 bool Verify(flatbuffers::Verifier &verifier) const {
9210 return VerifyTableStart(verifier) &&
9211 VerifyOffset(verifier, VT_BASE) &&
9212 verifier.VerifyTable(base()) &&
9213 VerifyOffset(verifier, VT_INPUTPARAMS) &&
9214 verifier.VerifyTable(inputParams()) &&
9215 verifier.EndTable();
9216 }
9217 };
9218
9219 struct QuantizedLstmLayerBuilder {
9220 typedef QuantizedLstmLayer Table;
9221 flatbuffers::FlatBufferBuilder &fbb_;
9222 flatbuffers::uoffset_t start_;
9223 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9224 fbb_.AddOffset(QuantizedLstmLayer::VT_BASE, base);
9225 }
9226 void add_inputParams(flatbuffers::Offset<armnnSerializer::QuantizedLstmInputParams> inputParams) {
9227 fbb_.AddOffset(QuantizedLstmLayer::VT_INPUTPARAMS, inputParams);
9228 }
9229 explicit QuantizedLstmLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9230 : fbb_(_fbb) {
9231 start_ = fbb_.StartTable();
9232 }
9233 flatbuffers::Offset<QuantizedLstmLayer> Finish() {
9234 const auto end = fbb_.EndTable(start_);
9235 auto o = flatbuffers::Offset<QuantizedLstmLayer>(end);
9236 return o;
9237 }
9238 };
9239
9240 inline flatbuffers::Offset<QuantizedLstmLayer> CreateQuantizedLstmLayer(
9241 flatbuffers::FlatBufferBuilder &_fbb,
9242 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
9243 flatbuffers::Offset<armnnSerializer::QuantizedLstmInputParams> inputParams = 0) {
9244 QuantizedLstmLayerBuilder builder_(_fbb);
9245 builder_.add_inputParams(inputParams);
9246 builder_.add_base(base);
9247 return builder_.Finish();
9248 }
9249
9250 struct DequantizeLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9251 typedef DequantizeLayerBuilder Builder;
9252 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9253 VT_BASE = 4
9254 };
9255 const armnnSerializer::LayerBase *base() const {
9256 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
9257 }
9258 bool Verify(flatbuffers::Verifier &verifier) const {
9259 return VerifyTableStart(verifier) &&
9260 VerifyOffset(verifier, VT_BASE) &&
9261 verifier.VerifyTable(base()) &&
9262 verifier.EndTable();
9263 }
9264 };
9265
9266 struct DequantizeLayerBuilder {
9267 typedef DequantizeLayer Table;
9268 flatbuffers::FlatBufferBuilder &fbb_;
9269 flatbuffers::uoffset_t start_;
9270 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9271 fbb_.AddOffset(DequantizeLayer::VT_BASE, base);
9272 }
9273 explicit DequantizeLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9274 : fbb_(_fbb) {
9275 start_ = fbb_.StartTable();
9276 }
9277 flatbuffers::Offset<DequantizeLayer> Finish() {
9278 const auto end = fbb_.EndTable(start_);
9279 auto o = flatbuffers::Offset<DequantizeLayer>(end);
9280 return o;
9281 }
9282 };
9283
9284 inline flatbuffers::Offset<DequantizeLayer> CreateDequantizeLayer(
9285 flatbuffers::FlatBufferBuilder &_fbb,
9286 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
9287 DequantizeLayerBuilder builder_(_fbb);
9288 builder_.add_base(base);
9289 return builder_.Finish();
9290 }
9291
9292 struct MergeLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9293 typedef MergeLayerBuilder Builder;
9294 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9295 VT_BASE = 4
9296 };
9297 const armnnSerializer::LayerBase *base() const {
9298 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
9299 }
9300 bool Verify(flatbuffers::Verifier &verifier) const {
9301 return VerifyTableStart(verifier) &&
9302 VerifyOffset(verifier, VT_BASE) &&
9303 verifier.VerifyTable(base()) &&
9304 verifier.EndTable();
9305 }
9306 };
9307
9308 struct MergeLayerBuilder {
9309 typedef MergeLayer Table;
9310 flatbuffers::FlatBufferBuilder &fbb_;
9311 flatbuffers::uoffset_t start_;
9312 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9313 fbb_.AddOffset(MergeLayer::VT_BASE, base);
9314 }
9315 explicit MergeLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9316 : fbb_(_fbb) {
9317 start_ = fbb_.StartTable();
9318 }
9319 flatbuffers::Offset<MergeLayer> Finish() {
9320 const auto end = fbb_.EndTable(start_);
9321 auto o = flatbuffers::Offset<MergeLayer>(end);
9322 return o;
9323 }
9324 };
9325
9326 inline flatbuffers::Offset<MergeLayer> CreateMergeLayer(
9327 flatbuffers::FlatBufferBuilder &_fbb,
9328 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
9329 MergeLayerBuilder builder_(_fbb);
9330 builder_.add_base(base);
9331 return builder_.Finish();
9332 }
9333
9334 struct SwitchLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9335 typedef SwitchLayerBuilder Builder;
9336 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9337 VT_BASE = 4
9338 };
9339 const armnnSerializer::LayerBase *base() const {
9340 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
9341 }
9342 bool Verify(flatbuffers::Verifier &verifier) const {
9343 return VerifyTableStart(verifier) &&
9344 VerifyOffset(verifier, VT_BASE) &&
9345 verifier.VerifyTable(base()) &&
9346 verifier.EndTable();
9347 }
9348 };
9349
9350 struct SwitchLayerBuilder {
9351 typedef SwitchLayer Table;
9352 flatbuffers::FlatBufferBuilder &fbb_;
9353 flatbuffers::uoffset_t start_;
9354 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9355 fbb_.AddOffset(SwitchLayer::VT_BASE, base);
9356 }
9357 explicit SwitchLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9358 : fbb_(_fbb) {
9359 start_ = fbb_.StartTable();
9360 }
9361 flatbuffers::Offset<SwitchLayer> Finish() {
9362 const auto end = fbb_.EndTable(start_);
9363 auto o = flatbuffers::Offset<SwitchLayer>(end);
9364 return o;
9365 }
9366 };
9367
9368 inline flatbuffers::Offset<SwitchLayer> CreateSwitchLayer(
9369 flatbuffers::FlatBufferBuilder &_fbb,
9370 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
9371 SwitchLayerBuilder builder_(_fbb);
9372 builder_.add_base(base);
9373 return builder_.Finish();
9374 }
9375
9376 struct PreluLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9377 typedef PreluLayerBuilder Builder;
9378 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9379 VT_BASE = 4
9380 };
9381 const armnnSerializer::LayerBase *base() const {
9382 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
9383 }
9384 bool Verify(flatbuffers::Verifier &verifier) const {
9385 return VerifyTableStart(verifier) &&
9386 VerifyOffset(verifier, VT_BASE) &&
9387 verifier.VerifyTable(base()) &&
9388 verifier.EndTable();
9389 }
9390 };
9391
9392 struct PreluLayerBuilder {
9393 typedef PreluLayer Table;
9394 flatbuffers::FlatBufferBuilder &fbb_;
9395 flatbuffers::uoffset_t start_;
9396 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9397 fbb_.AddOffset(PreluLayer::VT_BASE, base);
9398 }
9399 explicit PreluLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9400 : fbb_(_fbb) {
9401 start_ = fbb_.StartTable();
9402 }
9403 flatbuffers::Offset<PreluLayer> Finish() {
9404 const auto end = fbb_.EndTable(start_);
9405 auto o = flatbuffers::Offset<PreluLayer>(end);
9406 return o;
9407 }
9408 };
9409
9410 inline flatbuffers::Offset<PreluLayer> CreatePreluLayer(
9411 flatbuffers::FlatBufferBuilder &_fbb,
9412 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
9413 PreluLayerBuilder builder_(_fbb);
9414 builder_.add_base(base);
9415 return builder_.Finish();
9416 }
9417
9418 struct TransposeConvolution2dLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9419 typedef TransposeConvolution2dLayerBuilder Builder;
9420 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9421 VT_BASE = 4,
9422 VT_DESCRIPTOR = 6,
9423 VT_WEIGHTS = 8,
9424 VT_BIASES = 10
9425 };
9426 const armnnSerializer::LayerBase *base() const {
9427 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
9428 }
9429 const armnnSerializer::TransposeConvolution2dDescriptor *descriptor() const {
9430 return GetPointer<const armnnSerializer::TransposeConvolution2dDescriptor *>(VT_DESCRIPTOR);
9431 }
9432 const armnnSerializer::ConstTensor *weights() const {
9433 return GetPointer<const armnnSerializer::ConstTensor *>(VT_WEIGHTS);
9434 }
9435 const armnnSerializer::ConstTensor *biases() const {
9436 return GetPointer<const armnnSerializer::ConstTensor *>(VT_BIASES);
9437 }
9438 bool Verify(flatbuffers::Verifier &verifier) const {
9439 return VerifyTableStart(verifier) &&
9440 VerifyOffset(verifier, VT_BASE) &&
9441 verifier.VerifyTable(base()) &&
9442 VerifyOffset(verifier, VT_DESCRIPTOR) &&
9443 verifier.VerifyTable(descriptor()) &&
9444 VerifyOffset(verifier, VT_WEIGHTS) &&
9445 verifier.VerifyTable(weights()) &&
9446 VerifyOffset(verifier, VT_BIASES) &&
9447 verifier.VerifyTable(biases()) &&
9448 verifier.EndTable();
9449 }
9450 };
9451
9452 struct TransposeConvolution2dLayerBuilder {
9453 typedef TransposeConvolution2dLayer Table;
9454 flatbuffers::FlatBufferBuilder &fbb_;
9455 flatbuffers::uoffset_t start_;
9456 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9457 fbb_.AddOffset(TransposeConvolution2dLayer::VT_BASE, base);
9458 }
9459 void add_descriptor(flatbuffers::Offset<armnnSerializer::TransposeConvolution2dDescriptor> descriptor) {
9460 fbb_.AddOffset(TransposeConvolution2dLayer::VT_DESCRIPTOR, descriptor);
9461 }
9462 void add_weights(flatbuffers::Offset<armnnSerializer::ConstTensor> weights) {
9463 fbb_.AddOffset(TransposeConvolution2dLayer::VT_WEIGHTS, weights);
9464 }
9465 void add_biases(flatbuffers::Offset<armnnSerializer::ConstTensor> biases) {
9466 fbb_.AddOffset(TransposeConvolution2dLayer::VT_BIASES, biases);
9467 }
9468 explicit TransposeConvolution2dLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9469 : fbb_(_fbb) {
9470 start_ = fbb_.StartTable();
9471 }
9472 flatbuffers::Offset<TransposeConvolution2dLayer> Finish() {
9473 const auto end = fbb_.EndTable(start_);
9474 auto o = flatbuffers::Offset<TransposeConvolution2dLayer>(end);
9475 return o;
9476 }
9477 };
9478
9479 inline flatbuffers::Offset<TransposeConvolution2dLayer> CreateTransposeConvolution2dLayer(
9480 flatbuffers::FlatBufferBuilder &_fbb,
9481 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
9482 flatbuffers::Offset<armnnSerializer::TransposeConvolution2dDescriptor> descriptor = 0,
9483 flatbuffers::Offset<armnnSerializer::ConstTensor> weights = 0,
9484 flatbuffers::Offset<armnnSerializer::ConstTensor> biases = 0) {
9485 TransposeConvolution2dLayerBuilder builder_(_fbb);
9486 builder_.add_biases(biases);
9487 builder_.add_weights(weights);
9488 builder_.add_descriptor(descriptor);
9489 builder_.add_base(base);
9490 return builder_.Finish();
9491 }
9492
9493 struct TransposeConvolution2dDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9494 typedef TransposeConvolution2dDescriptorBuilder Builder;
9495 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9496 VT_PADLEFT = 4,
9497 VT_PADRIGHT = 6,
9498 VT_PADTOP = 8,
9499 VT_PADBOTTOM = 10,
9500 VT_STRIDEX = 12,
9501 VT_STRIDEY = 14,
9502 VT_BIASENABLED = 16,
9503 VT_DATALAYOUT = 18
9504 };
9505 uint32_t padLeft() const {
9506 return GetField<uint32_t>(VT_PADLEFT, 0);
9507 }
9508 uint32_t padRight() const {
9509 return GetField<uint32_t>(VT_PADRIGHT, 0);
9510 }
9511 uint32_t padTop() const {
9512 return GetField<uint32_t>(VT_PADTOP, 0);
9513 }
9514 uint32_t padBottom() const {
9515 return GetField<uint32_t>(VT_PADBOTTOM, 0);
9516 }
9517 uint32_t strideX() const {
9518 return GetField<uint32_t>(VT_STRIDEX, 0);
9519 }
9520 uint32_t strideY() const {
9521 return GetField<uint32_t>(VT_STRIDEY, 0);
9522 }
9523 bool biasEnabled() const {
9524 return GetField<uint8_t>(VT_BIASENABLED, 0) != 0;
9525 }
9526 armnnSerializer::DataLayout dataLayout() const {
9527 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 1));
9528 }
9529 bool Verify(flatbuffers::Verifier &verifier) const {
9530 return VerifyTableStart(verifier) &&
9531 VerifyField<uint32_t>(verifier, VT_PADLEFT, 4) &&
9532 VerifyField<uint32_t>(verifier, VT_PADRIGHT, 4) &&
9533 VerifyField<uint32_t>(verifier, VT_PADTOP, 4) &&
9534 VerifyField<uint32_t>(verifier, VT_PADBOTTOM, 4) &&
9535 VerifyField<uint32_t>(verifier, VT_STRIDEX, 4) &&
9536 VerifyField<uint32_t>(verifier, VT_STRIDEY, 4) &&
9537 VerifyField<uint8_t>(verifier, VT_BIASENABLED, 1) &&
9538 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
9539 verifier.EndTable();
9540 }
9541 };
9542
9543 struct TransposeConvolution2dDescriptorBuilder {
9544 typedef TransposeConvolution2dDescriptor Table;
9545 flatbuffers::FlatBufferBuilder &fbb_;
9546 flatbuffers::uoffset_t start_;
9547 void add_padLeft(uint32_t padLeft) {
9548 fbb_.AddElement<uint32_t>(TransposeConvolution2dDescriptor::VT_PADLEFT, padLeft, 0);
9549 }
9550 void add_padRight(uint32_t padRight) {
9551 fbb_.AddElement<uint32_t>(TransposeConvolution2dDescriptor::VT_PADRIGHT, padRight, 0);
9552 }
9553 void add_padTop(uint32_t padTop) {
9554 fbb_.AddElement<uint32_t>(TransposeConvolution2dDescriptor::VT_PADTOP, padTop, 0);
9555 }
9556 void add_padBottom(uint32_t padBottom) {
9557 fbb_.AddElement<uint32_t>(TransposeConvolution2dDescriptor::VT_PADBOTTOM, padBottom, 0);
9558 }
9559 void add_strideX(uint32_t strideX) {
9560 fbb_.AddElement<uint32_t>(TransposeConvolution2dDescriptor::VT_STRIDEX, strideX, 0);
9561 }
9562 void add_strideY(uint32_t strideY) {
9563 fbb_.AddElement<uint32_t>(TransposeConvolution2dDescriptor::VT_STRIDEY, strideY, 0);
9564 }
9565 void add_biasEnabled(bool biasEnabled) {
9566 fbb_.AddElement<uint8_t>(TransposeConvolution2dDescriptor::VT_BIASENABLED, static_cast<uint8_t>(biasEnabled), 0);
9567 }
9568 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
9569 fbb_.AddElement<int8_t>(TransposeConvolution2dDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 1);
9570 }
9571 explicit TransposeConvolution2dDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9572 : fbb_(_fbb) {
9573 start_ = fbb_.StartTable();
9574 }
9575 flatbuffers::Offset<TransposeConvolution2dDescriptor> Finish() {
9576 const auto end = fbb_.EndTable(start_);
9577 auto o = flatbuffers::Offset<TransposeConvolution2dDescriptor>(end);
9578 return o;
9579 }
9580 };
9581
9582 inline flatbuffers::Offset<TransposeConvolution2dDescriptor> CreateTransposeConvolution2dDescriptor(
9583 flatbuffers::FlatBufferBuilder &_fbb,
9584 uint32_t padLeft = 0,
9585 uint32_t padRight = 0,
9586 uint32_t padTop = 0,
9587 uint32_t padBottom = 0,
9588 uint32_t strideX = 0,
9589 uint32_t strideY = 0,
9590 bool biasEnabled = false,
9591 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NCHW) {
9592 TransposeConvolution2dDescriptorBuilder builder_(_fbb);
9593 builder_.add_strideY(strideY);
9594 builder_.add_strideX(strideX);
9595 builder_.add_padBottom(padBottom);
9596 builder_.add_padTop(padTop);
9597 builder_.add_padRight(padRight);
9598 builder_.add_padLeft(padLeft);
9599 builder_.add_dataLayout(dataLayout);
9600 builder_.add_biasEnabled(biasEnabled);
9601 return builder_.Finish();
9602 }
9603
9604 struct TransposeLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9605 typedef TransposeLayerBuilder Builder;
9606 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9607 VT_BASE = 4,
9608 VT_DESCRIPTOR = 6
9609 };
9610 const armnnSerializer::LayerBase *base() const {
9611 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
9612 }
9613 const armnnSerializer::TransposeDescriptor *descriptor() const {
9614 return GetPointer<const armnnSerializer::TransposeDescriptor *>(VT_DESCRIPTOR);
9615 }
9616 bool Verify(flatbuffers::Verifier &verifier) const {
9617 return VerifyTableStart(verifier) &&
9618 VerifyOffset(verifier, VT_BASE) &&
9619 verifier.VerifyTable(base()) &&
9620 VerifyOffset(verifier, VT_DESCRIPTOR) &&
9621 verifier.VerifyTable(descriptor()) &&
9622 verifier.EndTable();
9623 }
9624 };
9625
9626 struct TransposeLayerBuilder {
9627 typedef TransposeLayer Table;
9628 flatbuffers::FlatBufferBuilder &fbb_;
9629 flatbuffers::uoffset_t start_;
9630 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9631 fbb_.AddOffset(TransposeLayer::VT_BASE, base);
9632 }
9633 void add_descriptor(flatbuffers::Offset<armnnSerializer::TransposeDescriptor> descriptor) {
9634 fbb_.AddOffset(TransposeLayer::VT_DESCRIPTOR, descriptor);
9635 }
9636 explicit TransposeLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9637 : fbb_(_fbb) {
9638 start_ = fbb_.StartTable();
9639 }
9640 flatbuffers::Offset<TransposeLayer> Finish() {
9641 const auto end = fbb_.EndTable(start_);
9642 auto o = flatbuffers::Offset<TransposeLayer>(end);
9643 return o;
9644 }
9645 };
9646
9647 inline flatbuffers::Offset<TransposeLayer> CreateTransposeLayer(
9648 flatbuffers::FlatBufferBuilder &_fbb,
9649 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
9650 flatbuffers::Offset<armnnSerializer::TransposeDescriptor> descriptor = 0) {
9651 TransposeLayerBuilder builder_(_fbb);
9652 builder_.add_descriptor(descriptor);
9653 builder_.add_base(base);
9654 return builder_.Finish();
9655 }
9656
9657 struct TransposeDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9658 typedef TransposeDescriptorBuilder Builder;
9659 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9660 VT_DIMMAPPINGS = 4
9661 };
9662 const flatbuffers::Vector<uint32_t> *dimMappings() const {
9663 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_DIMMAPPINGS);
9664 }
9665 bool Verify(flatbuffers::Verifier &verifier) const {
9666 return VerifyTableStart(verifier) &&
9667 VerifyOffset(verifier, VT_DIMMAPPINGS) &&
9668 verifier.VerifyVector(dimMappings()) &&
9669 verifier.EndTable();
9670 }
9671 };
9672
9673 struct TransposeDescriptorBuilder {
9674 typedef TransposeDescriptor Table;
9675 flatbuffers::FlatBufferBuilder &fbb_;
9676 flatbuffers::uoffset_t start_;
9677 void add_dimMappings(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> dimMappings) {
9678 fbb_.AddOffset(TransposeDescriptor::VT_DIMMAPPINGS, dimMappings);
9679 }
9680 explicit TransposeDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9681 : fbb_(_fbb) {
9682 start_ = fbb_.StartTable();
9683 }
9684 flatbuffers::Offset<TransposeDescriptor> Finish() {
9685 const auto end = fbb_.EndTable(start_);
9686 auto o = flatbuffers::Offset<TransposeDescriptor>(end);
9687 return o;
9688 }
9689 };
9690
9691 inline flatbuffers::Offset<TransposeDescriptor> CreateTransposeDescriptor(
9692 flatbuffers::FlatBufferBuilder &_fbb,
9693 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> dimMappings = 0) {
9694 TransposeDescriptorBuilder builder_(_fbb);
9695 builder_.add_dimMappings(dimMappings);
9696 return builder_.Finish();
9697 }
9698
9699 inline flatbuffers::Offset<TransposeDescriptor> CreateTransposeDescriptorDirect(
9700 flatbuffers::FlatBufferBuilder &_fbb,
9701 const std::vector<uint32_t> *dimMappings = nullptr) {
9702 auto dimMappings__ = dimMappings ? _fbb.CreateVector<uint32_t>(*dimMappings) : 0;
9703 return armnnSerializer::CreateTransposeDescriptor(
9704 _fbb,
9705 dimMappings__);
9706 }
9707
9708 struct ResizeLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9709 typedef ResizeLayerBuilder Builder;
9710 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9711 VT_BASE = 4,
9712 VT_DESCRIPTOR = 6
9713 };
9714 const armnnSerializer::LayerBase *base() const {
9715 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
9716 }
9717 const armnnSerializer::ResizeDescriptor *descriptor() const {
9718 return GetPointer<const armnnSerializer::ResizeDescriptor *>(VT_DESCRIPTOR);
9719 }
9720 bool Verify(flatbuffers::Verifier &verifier) const {
9721 return VerifyTableStart(verifier) &&
9722 VerifyOffset(verifier, VT_BASE) &&
9723 verifier.VerifyTable(base()) &&
9724 VerifyOffset(verifier, VT_DESCRIPTOR) &&
9725 verifier.VerifyTable(descriptor()) &&
9726 verifier.EndTable();
9727 }
9728 };
9729
9730 struct ResizeLayerBuilder {
9731 typedef ResizeLayer Table;
9732 flatbuffers::FlatBufferBuilder &fbb_;
9733 flatbuffers::uoffset_t start_;
9734 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9735 fbb_.AddOffset(ResizeLayer::VT_BASE, base);
9736 }
9737 void add_descriptor(flatbuffers::Offset<armnnSerializer::ResizeDescriptor> descriptor) {
9738 fbb_.AddOffset(ResizeLayer::VT_DESCRIPTOR, descriptor);
9739 }
9740 explicit ResizeLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9741 : fbb_(_fbb) {
9742 start_ = fbb_.StartTable();
9743 }
9744 flatbuffers::Offset<ResizeLayer> Finish() {
9745 const auto end = fbb_.EndTable(start_);
9746 auto o = flatbuffers::Offset<ResizeLayer>(end);
9747 return o;
9748 }
9749 };
9750
9751 inline flatbuffers::Offset<ResizeLayer> CreateResizeLayer(
9752 flatbuffers::FlatBufferBuilder &_fbb,
9753 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
9754 flatbuffers::Offset<armnnSerializer::ResizeDescriptor> descriptor = 0) {
9755 ResizeLayerBuilder builder_(_fbb);
9756 builder_.add_descriptor(descriptor);
9757 builder_.add_base(base);
9758 return builder_.Finish();
9759 }
9760
9761 struct ResizeDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9762 typedef ResizeDescriptorBuilder Builder;
9763 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9764 VT_TARGETHEIGHT = 4,
9765 VT_TARGETWIDTH = 6,
9766 VT_METHOD = 8,
9767 VT_DATALAYOUT = 10,
9768 VT_ALIGNCORNERS = 12,
9769 VT_HALFPIXELCENTERS = 14
9770 };
9771 uint32_t targetHeight() const {
9772 return GetField<uint32_t>(VT_TARGETHEIGHT, 0);
9773 }
9774 uint32_t targetWidth() const {
9775 return GetField<uint32_t>(VT_TARGETWIDTH, 0);
9776 }
9777 armnnSerializer::ResizeMethod method() const {
9778 return static_cast<armnnSerializer::ResizeMethod>(GetField<int8_t>(VT_METHOD, 0));
9779 }
9780 armnnSerializer::DataLayout dataLayout() const {
9781 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUT, 0));
9782 }
9783 bool alignCorners() const {
9784 return GetField<uint8_t>(VT_ALIGNCORNERS, 0) != 0;
9785 }
9786 bool halfPixelCenters() const {
9787 return GetField<uint8_t>(VT_HALFPIXELCENTERS, 0) != 0;
9788 }
9789 bool Verify(flatbuffers::Verifier &verifier) const {
9790 return VerifyTableStart(verifier) &&
9791 VerifyField<uint32_t>(verifier, VT_TARGETHEIGHT, 4) &&
9792 VerifyField<uint32_t>(verifier, VT_TARGETWIDTH, 4) &&
9793 VerifyField<int8_t>(verifier, VT_METHOD, 1) &&
9794 VerifyField<int8_t>(verifier, VT_DATALAYOUT, 1) &&
9795 VerifyField<uint8_t>(verifier, VT_ALIGNCORNERS, 1) &&
9796 VerifyField<uint8_t>(verifier, VT_HALFPIXELCENTERS, 1) &&
9797 verifier.EndTable();
9798 }
9799 };
9800
9801 struct ResizeDescriptorBuilder {
9802 typedef ResizeDescriptor Table;
9803 flatbuffers::FlatBufferBuilder &fbb_;
9804 flatbuffers::uoffset_t start_;
9805 void add_targetHeight(uint32_t targetHeight) {
9806 fbb_.AddElement<uint32_t>(ResizeDescriptor::VT_TARGETHEIGHT, targetHeight, 0);
9807 }
9808 void add_targetWidth(uint32_t targetWidth) {
9809 fbb_.AddElement<uint32_t>(ResizeDescriptor::VT_TARGETWIDTH, targetWidth, 0);
9810 }
9811 void add_method(armnnSerializer::ResizeMethod method) {
9812 fbb_.AddElement<int8_t>(ResizeDescriptor::VT_METHOD, static_cast<int8_t>(method), 0);
9813 }
9814 void add_dataLayout(armnnSerializer::DataLayout dataLayout) {
9815 fbb_.AddElement<int8_t>(ResizeDescriptor::VT_DATALAYOUT, static_cast<int8_t>(dataLayout), 0);
9816 }
9817 void add_alignCorners(bool alignCorners) {
9818 fbb_.AddElement<uint8_t>(ResizeDescriptor::VT_ALIGNCORNERS, static_cast<uint8_t>(alignCorners), 0);
9819 }
9820 void add_halfPixelCenters(bool halfPixelCenters) {
9821 fbb_.AddElement<uint8_t>(ResizeDescriptor::VT_HALFPIXELCENTERS, static_cast<uint8_t>(halfPixelCenters), 0);
9822 }
9823 explicit ResizeDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9824 : fbb_(_fbb) {
9825 start_ = fbb_.StartTable();
9826 }
9827 flatbuffers::Offset<ResizeDescriptor> Finish() {
9828 const auto end = fbb_.EndTable(start_);
9829 auto o = flatbuffers::Offset<ResizeDescriptor>(end);
9830 return o;
9831 }
9832 };
9833
9834 inline flatbuffers::Offset<ResizeDescriptor> CreateResizeDescriptor(
9835 flatbuffers::FlatBufferBuilder &_fbb,
9836 uint32_t targetHeight = 0,
9837 uint32_t targetWidth = 0,
9838 armnnSerializer::ResizeMethod method = armnnSerializer::ResizeMethod_NearestNeighbor,
9839 armnnSerializer::DataLayout dataLayout = armnnSerializer::DataLayout_NHWC,
9840 bool alignCorners = false,
9841 bool halfPixelCenters = false) {
9842 ResizeDescriptorBuilder builder_(_fbb);
9843 builder_.add_targetWidth(targetWidth);
9844 builder_.add_targetHeight(targetHeight);
9845 builder_.add_halfPixelCenters(halfPixelCenters);
9846 builder_.add_alignCorners(alignCorners);
9847 builder_.add_dataLayout(dataLayout);
9848 builder_.add_method(method);
9849 return builder_.Finish();
9850 }
9851
9852 struct StackLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9853 typedef StackLayerBuilder Builder;
9854 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9855 VT_BASE = 4,
9856 VT_DESCRIPTOR = 6
9857 };
9858 const armnnSerializer::LayerBase *base() const {
9859 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
9860 }
9861 const armnnSerializer::StackDescriptor *descriptor() const {
9862 return GetPointer<const armnnSerializer::StackDescriptor *>(VT_DESCRIPTOR);
9863 }
9864 bool Verify(flatbuffers::Verifier &verifier) const {
9865 return VerifyTableStart(verifier) &&
9866 VerifyOffset(verifier, VT_BASE) &&
9867 verifier.VerifyTable(base()) &&
9868 VerifyOffset(verifier, VT_DESCRIPTOR) &&
9869 verifier.VerifyTable(descriptor()) &&
9870 verifier.EndTable();
9871 }
9872 };
9873
9874 struct StackLayerBuilder {
9875 typedef StackLayer Table;
9876 flatbuffers::FlatBufferBuilder &fbb_;
9877 flatbuffers::uoffset_t start_;
9878 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
9879 fbb_.AddOffset(StackLayer::VT_BASE, base);
9880 }
9881 void add_descriptor(flatbuffers::Offset<armnnSerializer::StackDescriptor> descriptor) {
9882 fbb_.AddOffset(StackLayer::VT_DESCRIPTOR, descriptor);
9883 }
9884 explicit StackLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9885 : fbb_(_fbb) {
9886 start_ = fbb_.StartTable();
9887 }
9888 flatbuffers::Offset<StackLayer> Finish() {
9889 const auto end = fbb_.EndTable(start_);
9890 auto o = flatbuffers::Offset<StackLayer>(end);
9891 return o;
9892 }
9893 };
9894
9895 inline flatbuffers::Offset<StackLayer> CreateStackLayer(
9896 flatbuffers::FlatBufferBuilder &_fbb,
9897 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
9898 flatbuffers::Offset<armnnSerializer::StackDescriptor> descriptor = 0) {
9899 StackLayerBuilder builder_(_fbb);
9900 builder_.add_descriptor(descriptor);
9901 builder_.add_base(base);
9902 return builder_.Finish();
9903 }
9904
9905 struct StackDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9906 typedef StackDescriptorBuilder Builder;
9907 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9908 VT_AXIS = 4,
9909 VT_NUMINPUTS = 6,
9910 VT_INPUTSHAPE = 8
9911 };
9912 uint32_t axis() const {
9913 return GetField<uint32_t>(VT_AXIS, 0);
9914 }
9915 uint32_t numInputs() const {
9916 return GetField<uint32_t>(VT_NUMINPUTS, 0);
9917 }
9918 const flatbuffers::Vector<uint32_t> *inputShape() const {
9919 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_INPUTSHAPE);
9920 }
9921 bool Verify(flatbuffers::Verifier &verifier) const {
9922 return VerifyTableStart(verifier) &&
9923 VerifyField<uint32_t>(verifier, VT_AXIS, 4) &&
9924 VerifyField<uint32_t>(verifier, VT_NUMINPUTS, 4) &&
9925 VerifyOffset(verifier, VT_INPUTSHAPE) &&
9926 verifier.VerifyVector(inputShape()) &&
9927 verifier.EndTable();
9928 }
9929 };
9930
9931 struct StackDescriptorBuilder {
9932 typedef StackDescriptor Table;
9933 flatbuffers::FlatBufferBuilder &fbb_;
9934 flatbuffers::uoffset_t start_;
9935 void add_axis(uint32_t axis) {
9936 fbb_.AddElement<uint32_t>(StackDescriptor::VT_AXIS, axis, 0);
9937 }
9938 void add_numInputs(uint32_t numInputs) {
9939 fbb_.AddElement<uint32_t>(StackDescriptor::VT_NUMINPUTS, numInputs, 0);
9940 }
9941 void add_inputShape(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> inputShape) {
9942 fbb_.AddOffset(StackDescriptor::VT_INPUTSHAPE, inputShape);
9943 }
9944 explicit StackDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
9945 : fbb_(_fbb) {
9946 start_ = fbb_.StartTable();
9947 }
9948 flatbuffers::Offset<StackDescriptor> Finish() {
9949 const auto end = fbb_.EndTable(start_);
9950 auto o = flatbuffers::Offset<StackDescriptor>(end);
9951 return o;
9952 }
9953 };
9954
9955 inline flatbuffers::Offset<StackDescriptor> CreateStackDescriptor(
9956 flatbuffers::FlatBufferBuilder &_fbb,
9957 uint32_t axis = 0,
9958 uint32_t numInputs = 0,
9959 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> inputShape = 0) {
9960 StackDescriptorBuilder builder_(_fbb);
9961 builder_.add_inputShape(inputShape);
9962 builder_.add_numInputs(numInputs);
9963 builder_.add_axis(axis);
9964 return builder_.Finish();
9965 }
9966
9967 inline flatbuffers::Offset<StackDescriptor> CreateStackDescriptorDirect(
9968 flatbuffers::FlatBufferBuilder &_fbb,
9969 uint32_t axis = 0,
9970 uint32_t numInputs = 0,
9971 const std::vector<uint32_t> *inputShape = nullptr) {
9972 auto inputShape__ = inputShape ? _fbb.CreateVector<uint32_t>(*inputShape) : 0;
9973 return armnnSerializer::CreateStackDescriptor(
9974 _fbb,
9975 axis,
9976 numInputs,
9977 inputShape__);
9978 }
9979
9980 struct StandInDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
9981 typedef StandInDescriptorBuilder Builder;
9982 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
9983 VT_NUMINPUTS = 4,
9984 VT_NUMOUTPUTS = 6
9985 };
9986 uint32_t numInputs() const {
9987 return GetField<uint32_t>(VT_NUMINPUTS, 0);
9988 }
9989 uint32_t numOutputs() const {
9990 return GetField<uint32_t>(VT_NUMOUTPUTS, 0);
9991 }
9992 bool Verify(flatbuffers::Verifier &verifier) const {
9993 return VerifyTableStart(verifier) &&
9994 VerifyField<uint32_t>(verifier, VT_NUMINPUTS, 4) &&
9995 VerifyField<uint32_t>(verifier, VT_NUMOUTPUTS, 4) &&
9996 verifier.EndTable();
9997 }
9998 };
9999
10000 struct StandInDescriptorBuilder {
10001 typedef StandInDescriptor Table;
10002 flatbuffers::FlatBufferBuilder &fbb_;
10003 flatbuffers::uoffset_t start_;
10004 void add_numInputs(uint32_t numInputs) {
10005 fbb_.AddElement<uint32_t>(StandInDescriptor::VT_NUMINPUTS, numInputs, 0);
10006 }
10007 void add_numOutputs(uint32_t numOutputs) {
10008 fbb_.AddElement<uint32_t>(StandInDescriptor::VT_NUMOUTPUTS, numOutputs, 0);
10009 }
10010 explicit StandInDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
10011 : fbb_(_fbb) {
10012 start_ = fbb_.StartTable();
10013 }
10014 flatbuffers::Offset<StandInDescriptor> Finish() {
10015 const auto end = fbb_.EndTable(start_);
10016 auto o = flatbuffers::Offset<StandInDescriptor>(end);
10017 return o;
10018 }
10019 };
10020
10021 inline flatbuffers::Offset<StandInDescriptor> CreateStandInDescriptor(
10022 flatbuffers::FlatBufferBuilder &_fbb,
10023 uint32_t numInputs = 0,
10024 uint32_t numOutputs = 0) {
10025 StandInDescriptorBuilder builder_(_fbb);
10026 builder_.add_numOutputs(numOutputs);
10027 builder_.add_numInputs(numInputs);
10028 return builder_.Finish();
10029 }
10030
10031 struct StandInLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
10032 typedef StandInLayerBuilder Builder;
10033 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
10034 VT_BASE = 4,
10035 VT_DESCRIPTOR = 6
10036 };
10037 const armnnSerializer::LayerBase *base() const {
10038 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
10039 }
10040 const armnnSerializer::StandInDescriptor *descriptor() const {
10041 return GetPointer<const armnnSerializer::StandInDescriptor *>(VT_DESCRIPTOR);
10042 }
10043 bool Verify(flatbuffers::Verifier &verifier) const {
10044 return VerifyTableStart(verifier) &&
10045 VerifyOffset(verifier, VT_BASE) &&
10046 verifier.VerifyTable(base()) &&
10047 VerifyOffset(verifier, VT_DESCRIPTOR) &&
10048 verifier.VerifyTable(descriptor()) &&
10049 verifier.EndTable();
10050 }
10051 };
10052
10053 struct StandInLayerBuilder {
10054 typedef StandInLayer Table;
10055 flatbuffers::FlatBufferBuilder &fbb_;
10056 flatbuffers::uoffset_t start_;
10057 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
10058 fbb_.AddOffset(StandInLayer::VT_BASE, base);
10059 }
10060 void add_descriptor(flatbuffers::Offset<armnnSerializer::StandInDescriptor> descriptor) {
10061 fbb_.AddOffset(StandInLayer::VT_DESCRIPTOR, descriptor);
10062 }
10063 explicit StandInLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
10064 : fbb_(_fbb) {
10065 start_ = fbb_.StartTable();
10066 }
10067 flatbuffers::Offset<StandInLayer> Finish() {
10068 const auto end = fbb_.EndTable(start_);
10069 auto o = flatbuffers::Offset<StandInLayer>(end);
10070 return o;
10071 }
10072 };
10073
10074 inline flatbuffers::Offset<StandInLayer> CreateStandInLayer(
10075 flatbuffers::FlatBufferBuilder &_fbb,
10076 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
10077 flatbuffers::Offset<armnnSerializer::StandInDescriptor> descriptor = 0) {
10078 StandInLayerBuilder builder_(_fbb);
10079 builder_.add_descriptor(descriptor);
10080 builder_.add_base(base);
10081 return builder_.Finish();
10082 }
10083
10084 struct RankLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
10085 typedef RankLayerBuilder Builder;
10086 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
10087 VT_BASE = 4
10088 };
10089 const armnnSerializer::LayerBase *base() const {
10090 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
10091 }
10092 bool Verify(flatbuffers::Verifier &verifier) const {
10093 return VerifyTableStart(verifier) &&
10094 VerifyOffset(verifier, VT_BASE) &&
10095 verifier.VerifyTable(base()) &&
10096 verifier.EndTable();
10097 }
10098 };
10099
10100 struct RankLayerBuilder {
10101 typedef RankLayer Table;
10102 flatbuffers::FlatBufferBuilder &fbb_;
10103 flatbuffers::uoffset_t start_;
10104 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
10105 fbb_.AddOffset(RankLayer::VT_BASE, base);
10106 }
10107 explicit RankLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
10108 : fbb_(_fbb) {
10109 start_ = fbb_.StartTable();
10110 }
10111 flatbuffers::Offset<RankLayer> Finish() {
10112 const auto end = fbb_.EndTable(start_);
10113 auto o = flatbuffers::Offset<RankLayer>(end);
10114 return o;
10115 }
10116 };
10117
10118 inline flatbuffers::Offset<RankLayer> CreateRankLayer(
10119 flatbuffers::FlatBufferBuilder &_fbb,
10120 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0) {
10121 RankLayerBuilder builder_(_fbb);
10122 builder_.add_base(base);
10123 return builder_.Finish();
10124 }
10125
10126 struct ReduceLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
10127 typedef ReduceLayerBuilder Builder;
10128 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
10129 VT_BASE = 4,
10130 VT_DESCRIPTOR = 6
10131 };
10132 const armnnSerializer::LayerBase *base() const {
10133 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
10134 }
10135 const armnnSerializer::ReduceDescriptor *descriptor() const {
10136 return GetPointer<const armnnSerializer::ReduceDescriptor *>(VT_DESCRIPTOR);
10137 }
10138 bool Verify(flatbuffers::Verifier &verifier) const {
10139 return VerifyTableStart(verifier) &&
10140 VerifyOffset(verifier, VT_BASE) &&
10141 verifier.VerifyTable(base()) &&
10142 VerifyOffset(verifier, VT_DESCRIPTOR) &&
10143 verifier.VerifyTable(descriptor()) &&
10144 verifier.EndTable();
10145 }
10146 };
10147
10148 struct ReduceLayerBuilder {
10149 typedef ReduceLayer Table;
10150 flatbuffers::FlatBufferBuilder &fbb_;
10151 flatbuffers::uoffset_t start_;
10152 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
10153 fbb_.AddOffset(ReduceLayer::VT_BASE, base);
10154 }
10155 void add_descriptor(flatbuffers::Offset<armnnSerializer::ReduceDescriptor> descriptor) {
10156 fbb_.AddOffset(ReduceLayer::VT_DESCRIPTOR, descriptor);
10157 }
10158 explicit ReduceLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
10159 : fbb_(_fbb) {
10160 start_ = fbb_.StartTable();
10161 }
10162 flatbuffers::Offset<ReduceLayer> Finish() {
10163 const auto end = fbb_.EndTable(start_);
10164 auto o = flatbuffers::Offset<ReduceLayer>(end);
10165 return o;
10166 }
10167 };
10168
10169 inline flatbuffers::Offset<ReduceLayer> CreateReduceLayer(
10170 flatbuffers::FlatBufferBuilder &_fbb,
10171 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
10172 flatbuffers::Offset<armnnSerializer::ReduceDescriptor> descriptor = 0) {
10173 ReduceLayerBuilder builder_(_fbb);
10174 builder_.add_descriptor(descriptor);
10175 builder_.add_base(base);
10176 return builder_.Finish();
10177 }
10178
10179 struct ReduceDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
10180 typedef ReduceDescriptorBuilder Builder;
10181 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
10182 VT_KEEPDIMS = 4,
10183 VT_AXIS = 6,
10184 VT_REDUCEOPERATION = 8
10185 };
10186 bool keepDims() const {
10187 return GetField<uint8_t>(VT_KEEPDIMS, 0) != 0;
10188 }
10189 const flatbuffers::Vector<uint32_t> *axis() const {
10190 return GetPointer<const flatbuffers::Vector<uint32_t> *>(VT_AXIS);
10191 }
10192 armnnSerializer::ReduceOperation reduceOperation() const {
10193 return static_cast<armnnSerializer::ReduceOperation>(GetField<int8_t>(VT_REDUCEOPERATION, 0));
10194 }
10195 bool Verify(flatbuffers::Verifier &verifier) const {
10196 return VerifyTableStart(verifier) &&
10197 VerifyField<uint8_t>(verifier, VT_KEEPDIMS, 1) &&
10198 VerifyOffset(verifier, VT_AXIS) &&
10199 verifier.VerifyVector(axis()) &&
10200 VerifyField<int8_t>(verifier, VT_REDUCEOPERATION, 1) &&
10201 verifier.EndTable();
10202 }
10203 };
10204
10205 struct ReduceDescriptorBuilder {
10206 typedef ReduceDescriptor Table;
10207 flatbuffers::FlatBufferBuilder &fbb_;
10208 flatbuffers::uoffset_t start_;
10209 void add_keepDims(bool keepDims) {
10210 fbb_.AddElement<uint8_t>(ReduceDescriptor::VT_KEEPDIMS, static_cast<uint8_t>(keepDims), 0);
10211 }
10212 void add_axis(flatbuffers::Offset<flatbuffers::Vector<uint32_t>> axis) {
10213 fbb_.AddOffset(ReduceDescriptor::VT_AXIS, axis);
10214 }
10215 void add_reduceOperation(armnnSerializer::ReduceOperation reduceOperation) {
10216 fbb_.AddElement<int8_t>(ReduceDescriptor::VT_REDUCEOPERATION, static_cast<int8_t>(reduceOperation), 0);
10217 }
10218 explicit ReduceDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
10219 : fbb_(_fbb) {
10220 start_ = fbb_.StartTable();
10221 }
10222 flatbuffers::Offset<ReduceDescriptor> Finish() {
10223 const auto end = fbb_.EndTable(start_);
10224 auto o = flatbuffers::Offset<ReduceDescriptor>(end);
10225 return o;
10226 }
10227 };
10228
10229 inline flatbuffers::Offset<ReduceDescriptor> CreateReduceDescriptor(
10230 flatbuffers::FlatBufferBuilder &_fbb,
10231 bool keepDims = false,
10232 flatbuffers::Offset<flatbuffers::Vector<uint32_t>> axis = 0,
10233 armnnSerializer::ReduceOperation reduceOperation = armnnSerializer::ReduceOperation_Sum) {
10234 ReduceDescriptorBuilder builder_(_fbb);
10235 builder_.add_axis(axis);
10236 builder_.add_reduceOperation(reduceOperation);
10237 builder_.add_keepDims(keepDims);
10238 return builder_.Finish();
10239 }
10240
10241 inline flatbuffers::Offset<ReduceDescriptor> CreateReduceDescriptorDirect(
10242 flatbuffers::FlatBufferBuilder &_fbb,
10243 bool keepDims = false,
10244 const std::vector<uint32_t> *axis = nullptr,
10245 armnnSerializer::ReduceOperation reduceOperation = armnnSerializer::ReduceOperation_Sum) {
10246 auto axis__ = axis ? _fbb.CreateVector<uint32_t>(*axis) : 0;
10247 return armnnSerializer::CreateReduceDescriptor(
10248 _fbb,
10249 keepDims,
10250 axis__,
10251 reduceOperation);
10252 }
10253
10254 struct UnidirectionalSequenceLstmDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
10255 typedef UnidirectionalSequenceLstmDescriptorBuilder Builder;
10256 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
10257 VT_ACTIVATIONFUNC = 4,
10258 VT_CLIPPINGTHRESCELL = 6,
10259 VT_CLIPPINGTHRESPROJ = 8,
10260 VT_CIFGENABLED = 10,
10261 VT_PEEPHOLEENABLED = 12,
10262 VT_PROJECTIONENABLED = 14,
10263 VT_LAYERNORMENABLED = 16,
10264 VT_TIMEMAJOR = 18
10265 };
10266 uint32_t activationFunc() const {
10267 return GetField<uint32_t>(VT_ACTIVATIONFUNC, 0);
10268 }
10269 float clippingThresCell() const {
10270 return GetField<float>(VT_CLIPPINGTHRESCELL, 0.0f);
10271 }
10272 float clippingThresProj() const {
10273 return GetField<float>(VT_CLIPPINGTHRESPROJ, 0.0f);
10274 }
10275 bool cifgEnabled() const {
10276 return GetField<uint8_t>(VT_CIFGENABLED, 1) != 0;
10277 }
10278 bool peepholeEnabled() const {
10279 return GetField<uint8_t>(VT_PEEPHOLEENABLED, 0) != 0;
10280 }
10281 bool projectionEnabled() const {
10282 return GetField<uint8_t>(VT_PROJECTIONENABLED, 0) != 0;
10283 }
10284 bool layerNormEnabled() const {
10285 return GetField<uint8_t>(VT_LAYERNORMENABLED, 0) != 0;
10286 }
10287 bool timeMajor() const {
10288 return GetField<uint8_t>(VT_TIMEMAJOR, 0) != 0;
10289 }
10290 bool Verify(flatbuffers::Verifier &verifier) const {
10291 return VerifyTableStart(verifier) &&
10292 VerifyField<uint32_t>(verifier, VT_ACTIVATIONFUNC, 4) &&
10293 VerifyField<float>(verifier, VT_CLIPPINGTHRESCELL, 4) &&
10294 VerifyField<float>(verifier, VT_CLIPPINGTHRESPROJ, 4) &&
10295 VerifyField<uint8_t>(verifier, VT_CIFGENABLED, 1) &&
10296 VerifyField<uint8_t>(verifier, VT_PEEPHOLEENABLED, 1) &&
10297 VerifyField<uint8_t>(verifier, VT_PROJECTIONENABLED, 1) &&
10298 VerifyField<uint8_t>(verifier, VT_LAYERNORMENABLED, 1) &&
10299 VerifyField<uint8_t>(verifier, VT_TIMEMAJOR, 1) &&
10300 verifier.EndTable();
10301 }
10302 };
10303
10304 struct UnidirectionalSequenceLstmDescriptorBuilder {
10305 typedef UnidirectionalSequenceLstmDescriptor Table;
10306 flatbuffers::FlatBufferBuilder &fbb_;
10307 flatbuffers::uoffset_t start_;
10308 void add_activationFunc(uint32_t activationFunc) {
10309 fbb_.AddElement<uint32_t>(UnidirectionalSequenceLstmDescriptor::VT_ACTIVATIONFUNC, activationFunc, 0);
10310 }
10311 void add_clippingThresCell(float clippingThresCell) {
10312 fbb_.AddElement<float>(UnidirectionalSequenceLstmDescriptor::VT_CLIPPINGTHRESCELL, clippingThresCell, 0.0f);
10313 }
10314 void add_clippingThresProj(float clippingThresProj) {
10315 fbb_.AddElement<float>(UnidirectionalSequenceLstmDescriptor::VT_CLIPPINGTHRESPROJ, clippingThresProj, 0.0f);
10316 }
10317 void add_cifgEnabled(bool cifgEnabled) {
10318 fbb_.AddElement<uint8_t>(UnidirectionalSequenceLstmDescriptor::VT_CIFGENABLED, static_cast<uint8_t>(cifgEnabled), 1);
10319 }
10320 void add_peepholeEnabled(bool peepholeEnabled) {
10321 fbb_.AddElement<uint8_t>(UnidirectionalSequenceLstmDescriptor::VT_PEEPHOLEENABLED, static_cast<uint8_t>(peepholeEnabled), 0);
10322 }
10323 void add_projectionEnabled(bool projectionEnabled) {
10324 fbb_.AddElement<uint8_t>(UnidirectionalSequenceLstmDescriptor::VT_PROJECTIONENABLED, static_cast<uint8_t>(projectionEnabled), 0);
10325 }
10326 void add_layerNormEnabled(bool layerNormEnabled) {
10327 fbb_.AddElement<uint8_t>(UnidirectionalSequenceLstmDescriptor::VT_LAYERNORMENABLED, static_cast<uint8_t>(layerNormEnabled), 0);
10328 }
10329 void add_timeMajor(bool timeMajor) {
10330 fbb_.AddElement<uint8_t>(UnidirectionalSequenceLstmDescriptor::VT_TIMEMAJOR, static_cast<uint8_t>(timeMajor), 0);
10331 }
10332 explicit UnidirectionalSequenceLstmDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
10333 : fbb_(_fbb) {
10334 start_ = fbb_.StartTable();
10335 }
10336 flatbuffers::Offset<UnidirectionalSequenceLstmDescriptor> Finish() {
10337 const auto end = fbb_.EndTable(start_);
10338 auto o = flatbuffers::Offset<UnidirectionalSequenceLstmDescriptor>(end);
10339 return o;
10340 }
10341 };
10342
10343 inline flatbuffers::Offset<UnidirectionalSequenceLstmDescriptor> CreateUnidirectionalSequenceLstmDescriptor(
10344 flatbuffers::FlatBufferBuilder &_fbb,
10345 uint32_t activationFunc = 0,
10346 float clippingThresCell = 0.0f,
10347 float clippingThresProj = 0.0f,
10348 bool cifgEnabled = true,
10349 bool peepholeEnabled = false,
10350 bool projectionEnabled = false,
10351 bool layerNormEnabled = false,
10352 bool timeMajor = false) {
10353 UnidirectionalSequenceLstmDescriptorBuilder builder_(_fbb);
10354 builder_.add_clippingThresProj(clippingThresProj);
10355 builder_.add_clippingThresCell(clippingThresCell);
10356 builder_.add_activationFunc(activationFunc);
10357 builder_.add_timeMajor(timeMajor);
10358 builder_.add_layerNormEnabled(layerNormEnabled);
10359 builder_.add_projectionEnabled(projectionEnabled);
10360 builder_.add_peepholeEnabled(peepholeEnabled);
10361 builder_.add_cifgEnabled(cifgEnabled);
10362 return builder_.Finish();
10363 }
10364
10365 struct UnidirectionalSequenceLstmLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
10366 typedef UnidirectionalSequenceLstmLayerBuilder Builder;
10367 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
10368 VT_BASE = 4,
10369 VT_DESCRIPTOR = 6,
10370 VT_INPUTPARAMS = 8
10371 };
10372 const armnnSerializer::LayerBase *base() const {
10373 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
10374 }
10375 const armnnSerializer::UnidirectionalSequenceLstmDescriptor *descriptor() const {
10376 return GetPointer<const armnnSerializer::UnidirectionalSequenceLstmDescriptor *>(VT_DESCRIPTOR);
10377 }
10378 const armnnSerializer::LstmInputParams *inputParams() const {
10379 return GetPointer<const armnnSerializer::LstmInputParams *>(VT_INPUTPARAMS);
10380 }
10381 bool Verify(flatbuffers::Verifier &verifier) const {
10382 return VerifyTableStart(verifier) &&
10383 VerifyOffset(verifier, VT_BASE) &&
10384 verifier.VerifyTable(base()) &&
10385 VerifyOffset(verifier, VT_DESCRIPTOR) &&
10386 verifier.VerifyTable(descriptor()) &&
10387 VerifyOffset(verifier, VT_INPUTPARAMS) &&
10388 verifier.VerifyTable(inputParams()) &&
10389 verifier.EndTable();
10390 }
10391 };
10392
10393 struct UnidirectionalSequenceLstmLayerBuilder {
10394 typedef UnidirectionalSequenceLstmLayer Table;
10395 flatbuffers::FlatBufferBuilder &fbb_;
10396 flatbuffers::uoffset_t start_;
10397 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
10398 fbb_.AddOffset(UnidirectionalSequenceLstmLayer::VT_BASE, base);
10399 }
10400 void add_descriptor(flatbuffers::Offset<armnnSerializer::UnidirectionalSequenceLstmDescriptor> descriptor) {
10401 fbb_.AddOffset(UnidirectionalSequenceLstmLayer::VT_DESCRIPTOR, descriptor);
10402 }
10403 void add_inputParams(flatbuffers::Offset<armnnSerializer::LstmInputParams> inputParams) {
10404 fbb_.AddOffset(UnidirectionalSequenceLstmLayer::VT_INPUTPARAMS, inputParams);
10405 }
10406 explicit UnidirectionalSequenceLstmLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
10407 : fbb_(_fbb) {
10408 start_ = fbb_.StartTable();
10409 }
10410 flatbuffers::Offset<UnidirectionalSequenceLstmLayer> Finish() {
10411 const auto end = fbb_.EndTable(start_);
10412 auto o = flatbuffers::Offset<UnidirectionalSequenceLstmLayer>(end);
10413 return o;
10414 }
10415 };
10416
10417 inline flatbuffers::Offset<UnidirectionalSequenceLstmLayer> CreateUnidirectionalSequenceLstmLayer(
10418 flatbuffers::FlatBufferBuilder &_fbb,
10419 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
10420 flatbuffers::Offset<armnnSerializer::UnidirectionalSequenceLstmDescriptor> descriptor = 0,
10421 flatbuffers::Offset<armnnSerializer::LstmInputParams> inputParams = 0) {
10422 UnidirectionalSequenceLstmLayerBuilder builder_(_fbb);
10423 builder_.add_inputParams(inputParams);
10424 builder_.add_descriptor(descriptor);
10425 builder_.add_base(base);
10426 return builder_.Finish();
10427 }
10428
10429 struct BatchMatMulDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
10430 typedef BatchMatMulDescriptorBuilder Builder;
10431 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
10432 VT_TRANSPOSEX = 4,
10433 VT_TRANSPOSEY = 6,
10434 VT_ADJOINTX = 8,
10435 VT_ADJOINTY = 10,
10436 VT_DATALAYOUTX = 12,
10437 VT_DATALAYOUTY = 14
10438 };
10439 bool transposeX() const {
10440 return GetField<uint8_t>(VT_TRANSPOSEX, 0) != 0;
10441 }
10442 bool transposeY() const {
10443 return GetField<uint8_t>(VT_TRANSPOSEY, 0) != 0;
10444 }
10445 bool adjointX() const {
10446 return GetField<uint8_t>(VT_ADJOINTX, 0) != 0;
10447 }
10448 bool adjointY() const {
10449 return GetField<uint8_t>(VT_ADJOINTY, 0) != 0;
10450 }
10451 armnnSerializer::DataLayout dataLayoutX() const {
10452 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUTX, 1));
10453 }
10454 armnnSerializer::DataLayout dataLayoutY() const {
10455 return static_cast<armnnSerializer::DataLayout>(GetField<int8_t>(VT_DATALAYOUTY, 1));
10456 }
10457 bool Verify(flatbuffers::Verifier &verifier) const {
10458 return VerifyTableStart(verifier) &&
10459 VerifyField<uint8_t>(verifier, VT_TRANSPOSEX, 1) &&
10460 VerifyField<uint8_t>(verifier, VT_TRANSPOSEY, 1) &&
10461 VerifyField<uint8_t>(verifier, VT_ADJOINTX, 1) &&
10462 VerifyField<uint8_t>(verifier, VT_ADJOINTY, 1) &&
10463 VerifyField<int8_t>(verifier, VT_DATALAYOUTX, 1) &&
10464 VerifyField<int8_t>(verifier, VT_DATALAYOUTY, 1) &&
10465 verifier.EndTable();
10466 }
10467 };
10468
10469 struct BatchMatMulDescriptorBuilder {
10470 typedef BatchMatMulDescriptor Table;
10471 flatbuffers::FlatBufferBuilder &fbb_;
10472 flatbuffers::uoffset_t start_;
10473 void add_transposeX(bool transposeX) {
10474 fbb_.AddElement<uint8_t>(BatchMatMulDescriptor::VT_TRANSPOSEX, static_cast<uint8_t>(transposeX), 0);
10475 }
10476 void add_transposeY(bool transposeY) {
10477 fbb_.AddElement<uint8_t>(BatchMatMulDescriptor::VT_TRANSPOSEY, static_cast<uint8_t>(transposeY), 0);
10478 }
10479 void add_adjointX(bool adjointX) {
10480 fbb_.AddElement<uint8_t>(BatchMatMulDescriptor::VT_ADJOINTX, static_cast<uint8_t>(adjointX), 0);
10481 }
10482 void add_adjointY(bool adjointY) {
10483 fbb_.AddElement<uint8_t>(BatchMatMulDescriptor::VT_ADJOINTY, static_cast<uint8_t>(adjointY), 0);
10484 }
10485 void add_dataLayoutX(armnnSerializer::DataLayout dataLayoutX) {
10486 fbb_.AddElement<int8_t>(BatchMatMulDescriptor::VT_DATALAYOUTX, static_cast<int8_t>(dataLayoutX), 1);
10487 }
10488 void add_dataLayoutY(armnnSerializer::DataLayout dataLayoutY) {
10489 fbb_.AddElement<int8_t>(BatchMatMulDescriptor::VT_DATALAYOUTY, static_cast<int8_t>(dataLayoutY), 1);
10490 }
10491 explicit BatchMatMulDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb)
10492 : fbb_(_fbb) {
10493 start_ = fbb_.StartTable();
10494 }
10495 flatbuffers::Offset<BatchMatMulDescriptor> Finish() {
10496 const auto end = fbb_.EndTable(start_);
10497 auto o = flatbuffers::Offset<BatchMatMulDescriptor>(end);
10498 return o;
10499 }
10500 };
10501
10502 inline flatbuffers::Offset<BatchMatMulDescriptor> CreateBatchMatMulDescriptor(
10503 flatbuffers::FlatBufferBuilder &_fbb,
10504 bool transposeX = false,
10505 bool transposeY = false,
10506 bool adjointX = false,
10507 bool adjointY = false,
10508 armnnSerializer::DataLayout dataLayoutX = armnnSerializer::DataLayout_NCHW,
10509 armnnSerializer::DataLayout dataLayoutY = armnnSerializer::DataLayout_NCHW) {
10510 BatchMatMulDescriptorBuilder builder_(_fbb);
10511 builder_.add_dataLayoutY(dataLayoutY);
10512 builder_.add_dataLayoutX(dataLayoutX);
10513 builder_.add_adjointY(adjointY);
10514 builder_.add_adjointX(adjointX);
10515 builder_.add_transposeY(transposeY);
10516 builder_.add_transposeX(transposeX);
10517 return builder_.Finish();
10518 }
10519
10520 struct BatchMatMulLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
10521 typedef BatchMatMulLayerBuilder Builder;
10522 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
10523 VT_BASE = 4,
10524 VT_DESCRIPTOR = 6
10525 };
10526 const armnnSerializer::LayerBase *base() const {
10527 return GetPointer<const armnnSerializer::LayerBase *>(VT_BASE);
10528 }
10529 const armnnSerializer::BatchMatMulDescriptor *descriptor() const {
10530 return GetPointer<const armnnSerializer::BatchMatMulDescriptor *>(VT_DESCRIPTOR);
10531 }
10532 bool Verify(flatbuffers::Verifier &verifier) const {
10533 return VerifyTableStart(verifier) &&
10534 VerifyOffset(verifier, VT_BASE) &&
10535 verifier.VerifyTable(base()) &&
10536 VerifyOffset(verifier, VT_DESCRIPTOR) &&
10537 verifier.VerifyTable(descriptor()) &&
10538 verifier.EndTable();
10539 }
10540 };
10541
10542 struct BatchMatMulLayerBuilder {
10543 typedef BatchMatMulLayer Table;
10544 flatbuffers::FlatBufferBuilder &fbb_;
10545 flatbuffers::uoffset_t start_;
10546 void add_base(flatbuffers::Offset<armnnSerializer::LayerBase> base) {
10547 fbb_.AddOffset(BatchMatMulLayer::VT_BASE, base);
10548 }
10549 void add_descriptor(flatbuffers::Offset<armnnSerializer::BatchMatMulDescriptor> descriptor) {
10550 fbb_.AddOffset(BatchMatMulLayer::VT_DESCRIPTOR, descriptor);
10551 }
10552 explicit BatchMatMulLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
10553 : fbb_(_fbb) {
10554 start_ = fbb_.StartTable();
10555 }
10556 flatbuffers::Offset<BatchMatMulLayer> Finish() {
10557 const auto end = fbb_.EndTable(start_);
10558 auto o = flatbuffers::Offset<BatchMatMulLayer>(end);
10559 return o;
10560 }
10561 };
10562
10563 inline flatbuffers::Offset<BatchMatMulLayer> CreateBatchMatMulLayer(
10564 flatbuffers::FlatBufferBuilder &_fbb,
10565 flatbuffers::Offset<armnnSerializer::LayerBase> base = 0,
10566 flatbuffers::Offset<armnnSerializer::BatchMatMulDescriptor> descriptor = 0) {
10567 BatchMatMulLayerBuilder builder_(_fbb);
10568 builder_.add_descriptor(descriptor);
10569 builder_.add_base(base);
10570 return builder_.Finish();
10571 }
10572
10573 struct AnyLayer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
10574 typedef AnyLayerBuilder Builder;
10575 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
10576 VT_LAYER_TYPE = 4,
10577 VT_LAYER = 6
10578 };
10579 armnnSerializer::Layer layer_type() const {
10580 return static_cast<armnnSerializer::Layer>(GetField<uint8_t>(VT_LAYER_TYPE, 0));
10581 }
10582 const void *layer() const {
10583 return GetPointer<const void *>(VT_LAYER);
10584 }
10585 template<typename T> const T *layer_as() const;
10586 const armnnSerializer::ActivationLayer *layer_as_ActivationLayer() const {
10587 return layer_type() == armnnSerializer::Layer_ActivationLayer ? static_cast<const armnnSerializer::ActivationLayer *>(layer()) : nullptr;
10588 }
10589 const armnnSerializer::AdditionLayer *layer_as_AdditionLayer() const {
10590 return layer_type() == armnnSerializer::Layer_AdditionLayer ? static_cast<const armnnSerializer::AdditionLayer *>(layer()) : nullptr;
10591 }
10592 const armnnSerializer::BatchToSpaceNdLayer *layer_as_BatchToSpaceNdLayer() const {
10593 return layer_type() == armnnSerializer::Layer_BatchToSpaceNdLayer ? static_cast<const armnnSerializer::BatchToSpaceNdLayer *>(layer()) : nullptr;
10594 }
10595 const armnnSerializer::BatchNormalizationLayer *layer_as_BatchNormalizationLayer() const {
10596 return layer_type() == armnnSerializer::Layer_BatchNormalizationLayer ? static_cast<const armnnSerializer::BatchNormalizationLayer *>(layer()) : nullptr;
10597 }
10598 const armnnSerializer::ConstantLayer *layer_as_ConstantLayer() const {
10599 return layer_type() == armnnSerializer::Layer_ConstantLayer ? static_cast<const armnnSerializer::ConstantLayer *>(layer()) : nullptr;
10600 }
10601 const armnnSerializer::Convolution2dLayer *layer_as_Convolution2dLayer() const {
10602 return layer_type() == armnnSerializer::Layer_Convolution2dLayer ? static_cast<const armnnSerializer::Convolution2dLayer *>(layer()) : nullptr;
10603 }
10604 const armnnSerializer::DepthwiseConvolution2dLayer *layer_as_DepthwiseConvolution2dLayer() const {
10605 return layer_type() == armnnSerializer::Layer_DepthwiseConvolution2dLayer ? static_cast<const armnnSerializer::DepthwiseConvolution2dLayer *>(layer()) : nullptr;
10606 }
10607 const armnnSerializer::FullyConnectedLayer *layer_as_FullyConnectedLayer() const {
10608 return layer_type() == armnnSerializer::Layer_FullyConnectedLayer ? static_cast<const armnnSerializer::FullyConnectedLayer *>(layer()) : nullptr;
10609 }
10610 const armnnSerializer::InputLayer *layer_as_InputLayer() const {
10611 return layer_type() == armnnSerializer::Layer_InputLayer ? static_cast<const armnnSerializer::InputLayer *>(layer()) : nullptr;
10612 }
10613 const armnnSerializer::MultiplicationLayer *layer_as_MultiplicationLayer() const {
10614 return layer_type() == armnnSerializer::Layer_MultiplicationLayer ? static_cast<const armnnSerializer::MultiplicationLayer *>(layer()) : nullptr;
10615 }
10616 const armnnSerializer::OutputLayer *layer_as_OutputLayer() const {
10617 return layer_type() == armnnSerializer::Layer_OutputLayer ? static_cast<const armnnSerializer::OutputLayer *>(layer()) : nullptr;
10618 }
10619 const armnnSerializer::PermuteLayer *layer_as_PermuteLayer() const {
10620 return layer_type() == armnnSerializer::Layer_PermuteLayer ? static_cast<const armnnSerializer::PermuteLayer *>(layer()) : nullptr;
10621 }
10622 const armnnSerializer::Pooling2dLayer *layer_as_Pooling2dLayer() const {
10623 return layer_type() == armnnSerializer::Layer_Pooling2dLayer ? static_cast<const armnnSerializer::Pooling2dLayer *>(layer()) : nullptr;
10624 }
10625 const armnnSerializer::ReshapeLayer *layer_as_ReshapeLayer() const {
10626 return layer_type() == armnnSerializer::Layer_ReshapeLayer ? static_cast<const armnnSerializer::ReshapeLayer *>(layer()) : nullptr;
10627 }
10628 const armnnSerializer::SoftmaxLayer *layer_as_SoftmaxLayer() const {
10629 return layer_type() == armnnSerializer::Layer_SoftmaxLayer ? static_cast<const armnnSerializer::SoftmaxLayer *>(layer()) : nullptr;
10630 }
10631 const armnnSerializer::SpaceToBatchNdLayer *layer_as_SpaceToBatchNdLayer() const {
10632 return layer_type() == armnnSerializer::Layer_SpaceToBatchNdLayer ? static_cast<const armnnSerializer::SpaceToBatchNdLayer *>(layer()) : nullptr;
10633 }
10634 const armnnSerializer::DivisionLayer *layer_as_DivisionLayer() const {
10635 return layer_type() == armnnSerializer::Layer_DivisionLayer ? static_cast<const armnnSerializer::DivisionLayer *>(layer()) : nullptr;
10636 }
10637 const armnnSerializer::MinimumLayer *layer_as_MinimumLayer() const {
10638 return layer_type() == armnnSerializer::Layer_MinimumLayer ? static_cast<const armnnSerializer::MinimumLayer *>(layer()) : nullptr;
10639 }
10640 const armnnSerializer::EqualLayer *layer_as_EqualLayer() const {
10641 return layer_type() == armnnSerializer::Layer_EqualLayer ? static_cast<const armnnSerializer::EqualLayer *>(layer()) : nullptr;
10642 }
10643 const armnnSerializer::MaximumLayer *layer_as_MaximumLayer() const {
10644 return layer_type() == armnnSerializer::Layer_MaximumLayer ? static_cast<const armnnSerializer::MaximumLayer *>(layer()) : nullptr;
10645 }
10646 const armnnSerializer::NormalizationLayer *layer_as_NormalizationLayer() const {
10647 return layer_type() == armnnSerializer::Layer_NormalizationLayer ? static_cast<const armnnSerializer::NormalizationLayer *>(layer()) : nullptr;
10648 }
10649 const armnnSerializer::PadLayer *layer_as_PadLayer() const {
10650 return layer_type() == armnnSerializer::Layer_PadLayer ? static_cast<const armnnSerializer::PadLayer *>(layer()) : nullptr;
10651 }
10652 const armnnSerializer::RsqrtLayer *layer_as_RsqrtLayer() const {
10653 return layer_type() == armnnSerializer::Layer_RsqrtLayer ? static_cast<const armnnSerializer::RsqrtLayer *>(layer()) : nullptr;
10654 }
10655 const armnnSerializer::FloorLayer *layer_as_FloorLayer() const {
10656 return layer_type() == armnnSerializer::Layer_FloorLayer ? static_cast<const armnnSerializer::FloorLayer *>(layer()) : nullptr;
10657 }
10658 const armnnSerializer::GreaterLayer *layer_as_GreaterLayer() const {
10659 return layer_type() == armnnSerializer::Layer_GreaterLayer ? static_cast<const armnnSerializer::GreaterLayer *>(layer()) : nullptr;
10660 }
10661 const armnnSerializer::ResizeBilinearLayer *layer_as_ResizeBilinearLayer() const {
10662 return layer_type() == armnnSerializer::Layer_ResizeBilinearLayer ? static_cast<const armnnSerializer::ResizeBilinearLayer *>(layer()) : nullptr;
10663 }
10664 const armnnSerializer::SubtractionLayer *layer_as_SubtractionLayer() const {
10665 return layer_type() == armnnSerializer::Layer_SubtractionLayer ? static_cast<const armnnSerializer::SubtractionLayer *>(layer()) : nullptr;
10666 }
10667 const armnnSerializer::StridedSliceLayer *layer_as_StridedSliceLayer() const {
10668 return layer_type() == armnnSerializer::Layer_StridedSliceLayer ? static_cast<const armnnSerializer::StridedSliceLayer *>(layer()) : nullptr;
10669 }
10670 const armnnSerializer::GatherLayer *layer_as_GatherLayer() const {
10671 return layer_type() == armnnSerializer::Layer_GatherLayer ? static_cast<const armnnSerializer::GatherLayer *>(layer()) : nullptr;
10672 }
10673 const armnnSerializer::MeanLayer *layer_as_MeanLayer() const {
10674 return layer_type() == armnnSerializer::Layer_MeanLayer ? static_cast<const armnnSerializer::MeanLayer *>(layer()) : nullptr;
10675 }
10676 const armnnSerializer::MergerLayer *layer_as_MergerLayer() const {
10677 return layer_type() == armnnSerializer::Layer_MergerLayer ? static_cast<const armnnSerializer::MergerLayer *>(layer()) : nullptr;
10678 }
10679 const armnnSerializer::L2NormalizationLayer *layer_as_L2NormalizationLayer() const {
10680 return layer_type() == armnnSerializer::Layer_L2NormalizationLayer ? static_cast<const armnnSerializer::L2NormalizationLayer *>(layer()) : nullptr;
10681 }
10682 const armnnSerializer::SplitterLayer *layer_as_SplitterLayer() const {
10683 return layer_type() == armnnSerializer::Layer_SplitterLayer ? static_cast<const armnnSerializer::SplitterLayer *>(layer()) : nullptr;
10684 }
10685 const armnnSerializer::DetectionPostProcessLayer *layer_as_DetectionPostProcessLayer() const {
10686 return layer_type() == armnnSerializer::Layer_DetectionPostProcessLayer ? static_cast<const armnnSerializer::DetectionPostProcessLayer *>(layer()) : nullptr;
10687 }
10688 const armnnSerializer::LstmLayer *layer_as_LstmLayer() const {
10689 return layer_type() == armnnSerializer::Layer_LstmLayer ? static_cast<const armnnSerializer::LstmLayer *>(layer()) : nullptr;
10690 }
10691 const armnnSerializer::QuantizedLstmLayer *layer_as_QuantizedLstmLayer() const {
10692 return layer_type() == armnnSerializer::Layer_QuantizedLstmLayer ? static_cast<const armnnSerializer::QuantizedLstmLayer *>(layer()) : nullptr;
10693 }
10694 const armnnSerializer::QuantizeLayer *layer_as_QuantizeLayer() const {
10695 return layer_type() == armnnSerializer::Layer_QuantizeLayer ? static_cast<const armnnSerializer::QuantizeLayer *>(layer()) : nullptr;
10696 }
10697 const armnnSerializer::DequantizeLayer *layer_as_DequantizeLayer() const {
10698 return layer_type() == armnnSerializer::Layer_DequantizeLayer ? static_cast<const armnnSerializer::DequantizeLayer *>(layer()) : nullptr;
10699 }
10700 const armnnSerializer::MergeLayer *layer_as_MergeLayer() const {
10701 return layer_type() == armnnSerializer::Layer_MergeLayer ? static_cast<const armnnSerializer::MergeLayer *>(layer()) : nullptr;
10702 }
10703 const armnnSerializer::SwitchLayer *layer_as_SwitchLayer() const {
10704 return layer_type() == armnnSerializer::Layer_SwitchLayer ? static_cast<const armnnSerializer::SwitchLayer *>(layer()) : nullptr;
10705 }
10706 const armnnSerializer::ConcatLayer *layer_as_ConcatLayer() const {
10707 return layer_type() == armnnSerializer::Layer_ConcatLayer ? static_cast<const armnnSerializer::ConcatLayer *>(layer()) : nullptr;
10708 }
10709 const armnnSerializer::SpaceToDepthLayer *layer_as_SpaceToDepthLayer() const {
10710 return layer_type() == armnnSerializer::Layer_SpaceToDepthLayer ? static_cast<const armnnSerializer::SpaceToDepthLayer *>(layer()) : nullptr;
10711 }
10712 const armnnSerializer::PreluLayer *layer_as_PreluLayer() const {
10713 return layer_type() == armnnSerializer::Layer_PreluLayer ? static_cast<const armnnSerializer::PreluLayer *>(layer()) : nullptr;
10714 }
10715 const armnnSerializer::TransposeConvolution2dLayer *layer_as_TransposeConvolution2dLayer() const {
10716 return layer_type() == armnnSerializer::Layer_TransposeConvolution2dLayer ? static_cast<const armnnSerializer::TransposeConvolution2dLayer *>(layer()) : nullptr;
10717 }
10718 const armnnSerializer::ResizeLayer *layer_as_ResizeLayer() const {
10719 return layer_type() == armnnSerializer::Layer_ResizeLayer ? static_cast<const armnnSerializer::ResizeLayer *>(layer()) : nullptr;
10720 }
10721 const armnnSerializer::StackLayer *layer_as_StackLayer() const {
10722 return layer_type() == armnnSerializer::Layer_StackLayer ? static_cast<const armnnSerializer::StackLayer *>(layer()) : nullptr;
10723 }
10724 const armnnSerializer::AbsLayer *layer_as_AbsLayer() const {
10725 return layer_type() == armnnSerializer::Layer_AbsLayer ? static_cast<const armnnSerializer::AbsLayer *>(layer()) : nullptr;
10726 }
10727 const armnnSerializer::ArgMinMaxLayer *layer_as_ArgMinMaxLayer() const {
10728 return layer_type() == armnnSerializer::Layer_ArgMinMaxLayer ? static_cast<const armnnSerializer::ArgMinMaxLayer *>(layer()) : nullptr;
10729 }
10730 const armnnSerializer::SliceLayer *layer_as_SliceLayer() const {
10731 return layer_type() == armnnSerializer::Layer_SliceLayer ? static_cast<const armnnSerializer::SliceLayer *>(layer()) : nullptr;
10732 }
10733 const armnnSerializer::DepthToSpaceLayer *layer_as_DepthToSpaceLayer() const {
10734 return layer_type() == armnnSerializer::Layer_DepthToSpaceLayer ? static_cast<const armnnSerializer::DepthToSpaceLayer *>(layer()) : nullptr;
10735 }
10736 const armnnSerializer::InstanceNormalizationLayer *layer_as_InstanceNormalizationLayer() const {
10737 return layer_type() == armnnSerializer::Layer_InstanceNormalizationLayer ? static_cast<const armnnSerializer::InstanceNormalizationLayer *>(layer()) : nullptr;
10738 }
10739 const armnnSerializer::LogSoftmaxLayer *layer_as_LogSoftmaxLayer() const {
10740 return layer_type() == armnnSerializer::Layer_LogSoftmaxLayer ? static_cast<const armnnSerializer::LogSoftmaxLayer *>(layer()) : nullptr;
10741 }
10742 const armnnSerializer::ComparisonLayer *layer_as_ComparisonLayer() const {
10743 return layer_type() == armnnSerializer::Layer_ComparisonLayer ? static_cast<const armnnSerializer::ComparisonLayer *>(layer()) : nullptr;
10744 }
10745 const armnnSerializer::StandInLayer *layer_as_StandInLayer() const {
10746 return layer_type() == armnnSerializer::Layer_StandInLayer ? static_cast<const armnnSerializer::StandInLayer *>(layer()) : nullptr;
10747 }
10748 const armnnSerializer::ElementwiseUnaryLayer *layer_as_ElementwiseUnaryLayer() const {
10749 return layer_type() == armnnSerializer::Layer_ElementwiseUnaryLayer ? static_cast<const armnnSerializer::ElementwiseUnaryLayer *>(layer()) : nullptr;
10750 }
10751 const armnnSerializer::TransposeLayer *layer_as_TransposeLayer() const {
10752 return layer_type() == armnnSerializer::Layer_TransposeLayer ? static_cast<const armnnSerializer::TransposeLayer *>(layer()) : nullptr;
10753 }
10754 const armnnSerializer::QLstmLayer *layer_as_QLstmLayer() const {
10755 return layer_type() == armnnSerializer::Layer_QLstmLayer ? static_cast<const armnnSerializer::QLstmLayer *>(layer()) : nullptr;
10756 }
10757 const armnnSerializer::FillLayer *layer_as_FillLayer() const {
10758 return layer_type() == armnnSerializer::Layer_FillLayer ? static_cast<const armnnSerializer::FillLayer *>(layer()) : nullptr;
10759 }
10760 const armnnSerializer::RankLayer *layer_as_RankLayer() const {
10761 return layer_type() == armnnSerializer::Layer_RankLayer ? static_cast<const armnnSerializer::RankLayer *>(layer()) : nullptr;
10762 }
10763 const armnnSerializer::LogicalBinaryLayer *layer_as_LogicalBinaryLayer() const {
10764 return layer_type() == armnnSerializer::Layer_LogicalBinaryLayer ? static_cast<const armnnSerializer::LogicalBinaryLayer *>(layer()) : nullptr;
10765 }
10766 const armnnSerializer::ReduceLayer *layer_as_ReduceLayer() const {
10767 return layer_type() == armnnSerializer::Layer_ReduceLayer ? static_cast<const armnnSerializer::ReduceLayer *>(layer()) : nullptr;
10768 }
10769 const armnnSerializer::CastLayer *layer_as_CastLayer() const {
10770 return layer_type() == armnnSerializer::Layer_CastLayer ? static_cast<const armnnSerializer::CastLayer *>(layer()) : nullptr;
10771 }
10772 const armnnSerializer::ShapeLayer *layer_as_ShapeLayer() const {
10773 return layer_type() == armnnSerializer::Layer_ShapeLayer ? static_cast<const armnnSerializer::ShapeLayer *>(layer()) : nullptr;
10774 }
10775 const armnnSerializer::UnidirectionalSequenceLstmLayer *layer_as_UnidirectionalSequenceLstmLayer() const {
10776 return layer_type() == armnnSerializer::Layer_UnidirectionalSequenceLstmLayer ? static_cast<const armnnSerializer::UnidirectionalSequenceLstmLayer *>(layer()) : nullptr;
10777 }
10778 const armnnSerializer::ChannelShuffleLayer *layer_as_ChannelShuffleLayer() const {
10779 return layer_type() == armnnSerializer::Layer_ChannelShuffleLayer ? static_cast<const armnnSerializer::ChannelShuffleLayer *>(layer()) : nullptr;
10780 }
10781 const armnnSerializer::Convolution3dLayer *layer_as_Convolution3dLayer() const {
10782 return layer_type() == armnnSerializer::Layer_Convolution3dLayer ? static_cast<const armnnSerializer::Convolution3dLayer *>(layer()) : nullptr;
10783 }
10784 const armnnSerializer::Pooling3dLayer *layer_as_Pooling3dLayer() const {
10785 return layer_type() == armnnSerializer::Layer_Pooling3dLayer ? static_cast<const armnnSerializer::Pooling3dLayer *>(layer()) : nullptr;
10786 }
10787 const armnnSerializer::GatherNdLayer *layer_as_GatherNdLayer() const {
10788 return layer_type() == armnnSerializer::Layer_GatherNdLayer ? static_cast<const armnnSerializer::GatherNdLayer *>(layer()) : nullptr;
10789 }
10790 const armnnSerializer::BatchMatMulLayer *layer_as_BatchMatMulLayer() const {
10791 return layer_type() == armnnSerializer::Layer_BatchMatMulLayer ? static_cast<const armnnSerializer::BatchMatMulLayer *>(layer()) : nullptr;
10792 }
10793 const armnnSerializer::ElementwiseBinaryLayer *layer_as_ElementwiseBinaryLayer() const {
10794 return layer_type() == armnnSerializer::Layer_ElementwiseBinaryLayer ? static_cast<const armnnSerializer::ElementwiseBinaryLayer *>(layer()) : nullptr;
10795 }
10796 bool Verify(flatbuffers::Verifier &verifier) const {
10797 return VerifyTableStart(verifier) &&
10798 VerifyField<uint8_t>(verifier, VT_LAYER_TYPE, 1) &&
10799 VerifyOffset(verifier, VT_LAYER) &&
10800 VerifyLayer(verifier, layer(), layer_type()) &&
10801 verifier.EndTable();
10802 }
10803 };
10804
10805 template<> inline const armnnSerializer::ActivationLayer *AnyLayer::layer_as<armnnSerializer::ActivationLayer>() const {
10806 return layer_as_ActivationLayer();
10807 }
10808
10809 template<> inline const armnnSerializer::AdditionLayer *AnyLayer::layer_as<armnnSerializer::AdditionLayer>() const {
10810 return layer_as_AdditionLayer();
10811 }
10812
10813 template<> inline const armnnSerializer::BatchToSpaceNdLayer *AnyLayer::layer_as<armnnSerializer::BatchToSpaceNdLayer>() const {
10814 return layer_as_BatchToSpaceNdLayer();
10815 }
10816
10817 template<> inline const armnnSerializer::BatchNormalizationLayer *AnyLayer::layer_as<armnnSerializer::BatchNormalizationLayer>() const {
10818 return layer_as_BatchNormalizationLayer();
10819 }
10820
10821 template<> inline const armnnSerializer::ConstantLayer *AnyLayer::layer_as<armnnSerializer::ConstantLayer>() const {
10822 return layer_as_ConstantLayer();
10823 }
10824
10825 template<> inline const armnnSerializer::Convolution2dLayer *AnyLayer::layer_as<armnnSerializer::Convolution2dLayer>() const {
10826 return layer_as_Convolution2dLayer();
10827 }
10828
10829 template<> inline const armnnSerializer::DepthwiseConvolution2dLayer *AnyLayer::layer_as<armnnSerializer::DepthwiseConvolution2dLayer>() const {
10830 return layer_as_DepthwiseConvolution2dLayer();
10831 }
10832
10833 template<> inline const armnnSerializer::FullyConnectedLayer *AnyLayer::layer_as<armnnSerializer::FullyConnectedLayer>() const {
10834 return layer_as_FullyConnectedLayer();
10835 }
10836
10837 template<> inline const armnnSerializer::InputLayer *AnyLayer::layer_as<armnnSerializer::InputLayer>() const {
10838 return layer_as_InputLayer();
10839 }
10840
10841 template<> inline const armnnSerializer::MultiplicationLayer *AnyLayer::layer_as<armnnSerializer::MultiplicationLayer>() const {
10842 return layer_as_MultiplicationLayer();
10843 }
10844
10845 template<> inline const armnnSerializer::OutputLayer *AnyLayer::layer_as<armnnSerializer::OutputLayer>() const {
10846 return layer_as_OutputLayer();
10847 }
10848
10849 template<> inline const armnnSerializer::PermuteLayer *AnyLayer::layer_as<armnnSerializer::PermuteLayer>() const {
10850 return layer_as_PermuteLayer();
10851 }
10852
10853 template<> inline const armnnSerializer::Pooling2dLayer *AnyLayer::layer_as<armnnSerializer::Pooling2dLayer>() const {
10854 return layer_as_Pooling2dLayer();
10855 }
10856
10857 template<> inline const armnnSerializer::ReshapeLayer *AnyLayer::layer_as<armnnSerializer::ReshapeLayer>() const {
10858 return layer_as_ReshapeLayer();
10859 }
10860
10861 template<> inline const armnnSerializer::SoftmaxLayer *AnyLayer::layer_as<armnnSerializer::SoftmaxLayer>() const {
10862 return layer_as_SoftmaxLayer();
10863 }
10864
10865 template<> inline const armnnSerializer::SpaceToBatchNdLayer *AnyLayer::layer_as<armnnSerializer::SpaceToBatchNdLayer>() const {
10866 return layer_as_SpaceToBatchNdLayer();
10867 }
10868
10869 template<> inline const armnnSerializer::DivisionLayer *AnyLayer::layer_as<armnnSerializer::DivisionLayer>() const {
10870 return layer_as_DivisionLayer();
10871 }
10872
10873 template<> inline const armnnSerializer::MinimumLayer *AnyLayer::layer_as<armnnSerializer::MinimumLayer>() const {
10874 return layer_as_MinimumLayer();
10875 }
10876
10877 template<> inline const armnnSerializer::EqualLayer *AnyLayer::layer_as<armnnSerializer::EqualLayer>() const {
10878 return layer_as_EqualLayer();
10879 }
10880
10881 template<> inline const armnnSerializer::MaximumLayer *AnyLayer::layer_as<armnnSerializer::MaximumLayer>() const {
10882 return layer_as_MaximumLayer();
10883 }
10884
10885 template<> inline const armnnSerializer::NormalizationLayer *AnyLayer::layer_as<armnnSerializer::NormalizationLayer>() const {
10886 return layer_as_NormalizationLayer();
10887 }
10888
10889 template<> inline const armnnSerializer::PadLayer *AnyLayer::layer_as<armnnSerializer::PadLayer>() const {
10890 return layer_as_PadLayer();
10891 }
10892
10893 template<> inline const armnnSerializer::RsqrtLayer *AnyLayer::layer_as<armnnSerializer::RsqrtLayer>() const {
10894 return layer_as_RsqrtLayer();
10895 }
10896
10897 template<> inline const armnnSerializer::FloorLayer *AnyLayer::layer_as<armnnSerializer::FloorLayer>() const {
10898 return layer_as_FloorLayer();
10899 }
10900
10901 template<> inline const armnnSerializer::GreaterLayer *AnyLayer::layer_as<armnnSerializer::GreaterLayer>() const {
10902 return layer_as_GreaterLayer();
10903 }
10904
10905 template<> inline const armnnSerializer::ResizeBilinearLayer *AnyLayer::layer_as<armnnSerializer::ResizeBilinearLayer>() const {
10906 return layer_as_ResizeBilinearLayer();
10907 }
10908
10909 template<> inline const armnnSerializer::SubtractionLayer *AnyLayer::layer_as<armnnSerializer::SubtractionLayer>() const {
10910 return layer_as_SubtractionLayer();
10911 }
10912
10913 template<> inline const armnnSerializer::StridedSliceLayer *AnyLayer::layer_as<armnnSerializer::StridedSliceLayer>() const {
10914 return layer_as_StridedSliceLayer();
10915 }
10916
10917 template<> inline const armnnSerializer::GatherLayer *AnyLayer::layer_as<armnnSerializer::GatherLayer>() const {
10918 return layer_as_GatherLayer();
10919 }
10920
10921 template<> inline const armnnSerializer::MeanLayer *AnyLayer::layer_as<armnnSerializer::MeanLayer>() const {
10922 return layer_as_MeanLayer();
10923 }
10924
10925 template<> inline const armnnSerializer::MergerLayer *AnyLayer::layer_as<armnnSerializer::MergerLayer>() const {
10926 return layer_as_MergerLayer();
10927 }
10928
10929 template<> inline const armnnSerializer::L2NormalizationLayer *AnyLayer::layer_as<armnnSerializer::L2NormalizationLayer>() const {
10930 return layer_as_L2NormalizationLayer();
10931 }
10932
10933 template<> inline const armnnSerializer::SplitterLayer *AnyLayer::layer_as<armnnSerializer::SplitterLayer>() const {
10934 return layer_as_SplitterLayer();
10935 }
10936
10937 template<> inline const armnnSerializer::DetectionPostProcessLayer *AnyLayer::layer_as<armnnSerializer::DetectionPostProcessLayer>() const {
10938 return layer_as_DetectionPostProcessLayer();
10939 }
10940
10941 template<> inline const armnnSerializer::LstmLayer *AnyLayer::layer_as<armnnSerializer::LstmLayer>() const {
10942 return layer_as_LstmLayer();
10943 }
10944
10945 template<> inline const armnnSerializer::QuantizedLstmLayer *AnyLayer::layer_as<armnnSerializer::QuantizedLstmLayer>() const {
10946 return layer_as_QuantizedLstmLayer();
10947 }
10948
10949 template<> inline const armnnSerializer::QuantizeLayer *AnyLayer::layer_as<armnnSerializer::QuantizeLayer>() const {
10950 return layer_as_QuantizeLayer();
10951 }
10952
10953 template<> inline const armnnSerializer::DequantizeLayer *AnyLayer::layer_as<armnnSerializer::DequantizeLayer>() const {
10954 return layer_as_DequantizeLayer();
10955 }
10956
10957 template<> inline const armnnSerializer::MergeLayer *AnyLayer::layer_as<armnnSerializer::MergeLayer>() const {
10958 return layer_as_MergeLayer();
10959 }
10960
10961 template<> inline const armnnSerializer::SwitchLayer *AnyLayer::layer_as<armnnSerializer::SwitchLayer>() const {
10962 return layer_as_SwitchLayer();
10963 }
10964
10965 template<> inline const armnnSerializer::ConcatLayer *AnyLayer::layer_as<armnnSerializer::ConcatLayer>() const {
10966 return layer_as_ConcatLayer();
10967 }
10968
10969 template<> inline const armnnSerializer::SpaceToDepthLayer *AnyLayer::layer_as<armnnSerializer::SpaceToDepthLayer>() const {
10970 return layer_as_SpaceToDepthLayer();
10971 }
10972
10973 template<> inline const armnnSerializer::PreluLayer *AnyLayer::layer_as<armnnSerializer::PreluLayer>() const {
10974 return layer_as_PreluLayer();
10975 }
10976
10977 template<> inline const armnnSerializer::TransposeConvolution2dLayer *AnyLayer::layer_as<armnnSerializer::TransposeConvolution2dLayer>() const {
10978 return layer_as_TransposeConvolution2dLayer();
10979 }
10980
10981 template<> inline const armnnSerializer::ResizeLayer *AnyLayer::layer_as<armnnSerializer::ResizeLayer>() const {
10982 return layer_as_ResizeLayer();
10983 }
10984
10985 template<> inline const armnnSerializer::StackLayer *AnyLayer::layer_as<armnnSerializer::StackLayer>() const {
10986 return layer_as_StackLayer();
10987 }
10988
10989 template<> inline const armnnSerializer::AbsLayer *AnyLayer::layer_as<armnnSerializer::AbsLayer>() const {
10990 return layer_as_AbsLayer();
10991 }
10992
10993 template<> inline const armnnSerializer::ArgMinMaxLayer *AnyLayer::layer_as<armnnSerializer::ArgMinMaxLayer>() const {
10994 return layer_as_ArgMinMaxLayer();
10995 }
10996
10997 template<> inline const armnnSerializer::SliceLayer *AnyLayer::layer_as<armnnSerializer::SliceLayer>() const {
10998 return layer_as_SliceLayer();
10999 }
11000
11001 template<> inline const armnnSerializer::DepthToSpaceLayer *AnyLayer::layer_as<armnnSerializer::DepthToSpaceLayer>() const {
11002 return layer_as_DepthToSpaceLayer();
11003 }
11004
11005 template<> inline const armnnSerializer::InstanceNormalizationLayer *AnyLayer::layer_as<armnnSerializer::InstanceNormalizationLayer>() const {
11006 return layer_as_InstanceNormalizationLayer();
11007 }
11008
11009 template<> inline const armnnSerializer::LogSoftmaxLayer *AnyLayer::layer_as<armnnSerializer::LogSoftmaxLayer>() const {
11010 return layer_as_LogSoftmaxLayer();
11011 }
11012
11013 template<> inline const armnnSerializer::ComparisonLayer *AnyLayer::layer_as<armnnSerializer::ComparisonLayer>() const {
11014 return layer_as_ComparisonLayer();
11015 }
11016
11017 template<> inline const armnnSerializer::StandInLayer *AnyLayer::layer_as<armnnSerializer::StandInLayer>() const {
11018 return layer_as_StandInLayer();
11019 }
11020
11021 template<> inline const armnnSerializer::ElementwiseUnaryLayer *AnyLayer::layer_as<armnnSerializer::ElementwiseUnaryLayer>() const {
11022 return layer_as_ElementwiseUnaryLayer();
11023 }
11024
11025 template<> inline const armnnSerializer::TransposeLayer *AnyLayer::layer_as<armnnSerializer::TransposeLayer>() const {
11026 return layer_as_TransposeLayer();
11027 }
11028
11029 template<> inline const armnnSerializer::QLstmLayer *AnyLayer::layer_as<armnnSerializer::QLstmLayer>() const {
11030 return layer_as_QLstmLayer();
11031 }
11032
11033 template<> inline const armnnSerializer::FillLayer *AnyLayer::layer_as<armnnSerializer::FillLayer>() const {
11034 return layer_as_FillLayer();
11035 }
11036
11037 template<> inline const armnnSerializer::RankLayer *AnyLayer::layer_as<armnnSerializer::RankLayer>() const {
11038 return layer_as_RankLayer();
11039 }
11040
11041 template<> inline const armnnSerializer::LogicalBinaryLayer *AnyLayer::layer_as<armnnSerializer::LogicalBinaryLayer>() const {
11042 return layer_as_LogicalBinaryLayer();
11043 }
11044
11045 template<> inline const armnnSerializer::ReduceLayer *AnyLayer::layer_as<armnnSerializer::ReduceLayer>() const {
11046 return layer_as_ReduceLayer();
11047 }
11048
11049 template<> inline const armnnSerializer::CastLayer *AnyLayer::layer_as<armnnSerializer::CastLayer>() const {
11050 return layer_as_CastLayer();
11051 }
11052
11053 template<> inline const armnnSerializer::ShapeLayer *AnyLayer::layer_as<armnnSerializer::ShapeLayer>() const {
11054 return layer_as_ShapeLayer();
11055 }
11056
11057 template<> inline const armnnSerializer::UnidirectionalSequenceLstmLayer *AnyLayer::layer_as<armnnSerializer::UnidirectionalSequenceLstmLayer>() const {
11058 return layer_as_UnidirectionalSequenceLstmLayer();
11059 }
11060
11061 template<> inline const armnnSerializer::ChannelShuffleLayer *AnyLayer::layer_as<armnnSerializer::ChannelShuffleLayer>() const {
11062 return layer_as_ChannelShuffleLayer();
11063 }
11064
11065 template<> inline const armnnSerializer::Convolution3dLayer *AnyLayer::layer_as<armnnSerializer::Convolution3dLayer>() const {
11066 return layer_as_Convolution3dLayer();
11067 }
11068
11069 template<> inline const armnnSerializer::Pooling3dLayer *AnyLayer::layer_as<armnnSerializer::Pooling3dLayer>() const {
11070 return layer_as_Pooling3dLayer();
11071 }
11072
11073 template<> inline const armnnSerializer::GatherNdLayer *AnyLayer::layer_as<armnnSerializer::GatherNdLayer>() const {
11074 return layer_as_GatherNdLayer();
11075 }
11076
11077 template<> inline const armnnSerializer::BatchMatMulLayer *AnyLayer::layer_as<armnnSerializer::BatchMatMulLayer>() const {
11078 return layer_as_BatchMatMulLayer();
11079 }
11080
11081 template<> inline const armnnSerializer::ElementwiseBinaryLayer *AnyLayer::layer_as<armnnSerializer::ElementwiseBinaryLayer>() const {
11082 return layer_as_ElementwiseBinaryLayer();
11083 }
11084
11085 struct AnyLayerBuilder {
11086 typedef AnyLayer Table;
11087 flatbuffers::FlatBufferBuilder &fbb_;
11088 flatbuffers::uoffset_t start_;
11089 void add_layer_type(armnnSerializer::Layer layer_type) {
11090 fbb_.AddElement<uint8_t>(AnyLayer::VT_LAYER_TYPE, static_cast<uint8_t>(layer_type), 0);
11091 }
11092 void add_layer(flatbuffers::Offset<void> layer) {
11093 fbb_.AddOffset(AnyLayer::VT_LAYER, layer);
11094 }
11095 explicit AnyLayerBuilder(flatbuffers::FlatBufferBuilder &_fbb)
11096 : fbb_(_fbb) {
11097 start_ = fbb_.StartTable();
11098 }
11099 flatbuffers::Offset<AnyLayer> Finish() {
11100 const auto end = fbb_.EndTable(start_);
11101 auto o = flatbuffers::Offset<AnyLayer>(end);
11102 return o;
11103 }
11104 };
11105
11106 inline flatbuffers::Offset<AnyLayer> CreateAnyLayer(
11107 flatbuffers::FlatBufferBuilder &_fbb,
11108 armnnSerializer::Layer layer_type = armnnSerializer::Layer_NONE,
11109 flatbuffers::Offset<void> layer = 0) {
11110 AnyLayerBuilder builder_(_fbb);
11111 builder_.add_layer(layer);
11112 builder_.add_layer_type(layer_type);
11113 return builder_.Finish();
11114 }
11115
11116 struct FeatureCompatibilityVersions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
11117 typedef FeatureCompatibilityVersionsBuilder Builder;
11118 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
11119 VT_BINDINGIDSSCHEME = 4,
11120 VT_WEIGHTSLAYOUTSCHEME = 6,
11121 VT_CONSTANTTENSORSASINPUTS = 8
11122 };
11123 uint32_t bindingIdsScheme() const {
11124 return GetField<uint32_t>(VT_BINDINGIDSSCHEME, 0);
11125 }
11126 uint32_t weightsLayoutScheme() const {
11127 return GetField<uint32_t>(VT_WEIGHTSLAYOUTSCHEME, 0);
11128 }
11129 uint32_t constantTensorsAsInputs() const {
11130 return GetField<uint32_t>(VT_CONSTANTTENSORSASINPUTS, 0);
11131 }
11132 bool Verify(flatbuffers::Verifier &verifier) const {
11133 return VerifyTableStart(verifier) &&
11134 VerifyField<uint32_t>(verifier, VT_BINDINGIDSSCHEME, 4) &&
11135 VerifyField<uint32_t>(verifier, VT_WEIGHTSLAYOUTSCHEME, 4) &&
11136 VerifyField<uint32_t>(verifier, VT_CONSTANTTENSORSASINPUTS, 4) &&
11137 verifier.EndTable();
11138 }
11139 };
11140
11141 struct FeatureCompatibilityVersionsBuilder {
11142 typedef FeatureCompatibilityVersions Table;
11143 flatbuffers::FlatBufferBuilder &fbb_;
11144 flatbuffers::uoffset_t start_;
11145 void add_bindingIdsScheme(uint32_t bindingIdsScheme) {
11146 fbb_.AddElement<uint32_t>(FeatureCompatibilityVersions::VT_BINDINGIDSSCHEME, bindingIdsScheme, 0);
11147 }
11148 void add_weightsLayoutScheme(uint32_t weightsLayoutScheme) {
11149 fbb_.AddElement<uint32_t>(FeatureCompatibilityVersions::VT_WEIGHTSLAYOUTSCHEME, weightsLayoutScheme, 0);
11150 }
11151 void add_constantTensorsAsInputs(uint32_t constantTensorsAsInputs) {
11152 fbb_.AddElement<uint32_t>(FeatureCompatibilityVersions::VT_CONSTANTTENSORSASINPUTS, constantTensorsAsInputs, 0);
11153 }
11154 explicit FeatureCompatibilityVersionsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
11155 : fbb_(_fbb) {
11156 start_ = fbb_.StartTable();
11157 }
11158 flatbuffers::Offset<FeatureCompatibilityVersions> Finish() {
11159 const auto end = fbb_.EndTable(start_);
11160 auto o = flatbuffers::Offset<FeatureCompatibilityVersions>(end);
11161 return o;
11162 }
11163 };
11164
11165 inline flatbuffers::Offset<FeatureCompatibilityVersions> CreateFeatureCompatibilityVersions(
11166 flatbuffers::FlatBufferBuilder &_fbb,
11167 uint32_t bindingIdsScheme = 0,
11168 uint32_t weightsLayoutScheme = 0,
11169 uint32_t constantTensorsAsInputs = 0) {
11170 FeatureCompatibilityVersionsBuilder builder_(_fbb);
11171 builder_.add_constantTensorsAsInputs(constantTensorsAsInputs);
11172 builder_.add_weightsLayoutScheme(weightsLayoutScheme);
11173 builder_.add_bindingIdsScheme(bindingIdsScheme);
11174 return builder_.Finish();
11175 }
11176
11177 struct SerializedGraph FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
11178 typedef SerializedGraphBuilder Builder;
11179 enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
11180 VT_LAYERS = 4,
11181 VT_INPUTIDS = 6,
11182 VT_OUTPUTIDS = 8,
11183 VT_FEATUREVERSIONS = 10
11184 };
11185 const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::AnyLayer>> *layers() const {
11186 return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::AnyLayer>> *>(VT_LAYERS);
11187 }
11188 const flatbuffers::Vector<int32_t> *inputIds() const {
11189 return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_INPUTIDS);
11190 }
11191 const flatbuffers::Vector<int32_t> *outputIds() const {
11192 return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_OUTPUTIDS);
11193 }
11194 const armnnSerializer::FeatureCompatibilityVersions *featureVersions() const {
11195 return GetPointer<const armnnSerializer::FeatureCompatibilityVersions *>(VT_FEATUREVERSIONS);
11196 }
11197 bool Verify(flatbuffers::Verifier &verifier) const {
11198 return VerifyTableStart(verifier) &&
11199 VerifyOffset(verifier, VT_LAYERS) &&
11200 verifier.VerifyVector(layers()) &&
11201 verifier.VerifyVectorOfTables(layers()) &&
11202 VerifyOffset(verifier, VT_INPUTIDS) &&
11203 verifier.VerifyVector(inputIds()) &&
11204 VerifyOffset(verifier, VT_OUTPUTIDS) &&
11205 verifier.VerifyVector(outputIds()) &&
11206 VerifyOffset(verifier, VT_FEATUREVERSIONS) &&
11207 verifier.VerifyTable(featureVersions()) &&
11208 verifier.EndTable();
11209 }
11210 };
11211
11212 struct SerializedGraphBuilder {
11213 typedef SerializedGraph Table;
11214 flatbuffers::FlatBufferBuilder &fbb_;
11215 flatbuffers::uoffset_t start_;
11216 void add_layers(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::AnyLayer>>> layers) {
11217 fbb_.AddOffset(SerializedGraph::VT_LAYERS, layers);
11218 }
11219 void add_inputIds(flatbuffers::Offset<flatbuffers::Vector<int32_t>> inputIds) {
11220 fbb_.AddOffset(SerializedGraph::VT_INPUTIDS, inputIds);
11221 }
11222 void add_outputIds(flatbuffers::Offset<flatbuffers::Vector<int32_t>> outputIds) {
11223 fbb_.AddOffset(SerializedGraph::VT_OUTPUTIDS, outputIds);
11224 }
11225 void add_featureVersions(flatbuffers::Offset<armnnSerializer::FeatureCompatibilityVersions> featureVersions) {
11226 fbb_.AddOffset(SerializedGraph::VT_FEATUREVERSIONS, featureVersions);
11227 }
11228 explicit SerializedGraphBuilder(flatbuffers::FlatBufferBuilder &_fbb)
11229 : fbb_(_fbb) {
11230 start_ = fbb_.StartTable();
11231 }
11232 flatbuffers::Offset<SerializedGraph> Finish() {
11233 const auto end = fbb_.EndTable(start_);
11234 auto o = flatbuffers::Offset<SerializedGraph>(end);
11235 return o;
11236 }
11237 };
11238
11239 inline flatbuffers::Offset<SerializedGraph> CreateSerializedGraph(
11240 flatbuffers::FlatBufferBuilder &_fbb,
11241 flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<armnnSerializer::AnyLayer>>> layers = 0,
11242 flatbuffers::Offset<flatbuffers::Vector<int32_t>> inputIds = 0,
11243 flatbuffers::Offset<flatbuffers::Vector<int32_t>> outputIds = 0,
11244 flatbuffers::Offset<armnnSerializer::FeatureCompatibilityVersions> featureVersions = 0) {
11245 SerializedGraphBuilder builder_(_fbb);
11246 builder_.add_featureVersions(featureVersions);
11247 builder_.add_outputIds(outputIds);
11248 builder_.add_inputIds(inputIds);
11249 builder_.add_layers(layers);
11250 return builder_.Finish();
11251 }
11252
11253 inline flatbuffers::Offset<SerializedGraph> CreateSerializedGraphDirect(
11254 flatbuffers::FlatBufferBuilder &_fbb,
11255 const std::vector<flatbuffers::Offset<armnnSerializer::AnyLayer>> *layers = nullptr,
11256 const std::vector<int32_t> *inputIds = nullptr,
11257 const std::vector<int32_t> *outputIds = nullptr,
11258 flatbuffers::Offset<armnnSerializer::FeatureCompatibilityVersions> featureVersions = 0) {
11259 auto layers__ = layers ? _fbb.CreateVector<flatbuffers::Offset<armnnSerializer::AnyLayer>>(*layers) : 0;
11260 auto inputIds__ = inputIds ? _fbb.CreateVector<int32_t>(*inputIds) : 0;
11261 auto outputIds__ = outputIds ? _fbb.CreateVector<int32_t>(*outputIds) : 0;
11262 return armnnSerializer::CreateSerializedGraph(
11263 _fbb,
11264 layers__,
11265 inputIds__,
11266 outputIds__,
11267 featureVersions);
11268 }
11269
11270 inline bool VerifyConstTensorData(flatbuffers::Verifier &verifier, const void *obj, ConstTensorData type) {
11271 switch (type) {
11272 case ConstTensorData_NONE: {
11273 return true;
11274 }
11275 case ConstTensorData_ByteData: {
11276 auto ptr = reinterpret_cast<const armnnSerializer::ByteData *>(obj);
11277 return verifier.VerifyTable(ptr);
11278 }
11279 case ConstTensorData_ShortData: {
11280 auto ptr = reinterpret_cast<const armnnSerializer::ShortData *>(obj);
11281 return verifier.VerifyTable(ptr);
11282 }
11283 case ConstTensorData_IntData: {
11284 auto ptr = reinterpret_cast<const armnnSerializer::IntData *>(obj);
11285 return verifier.VerifyTable(ptr);
11286 }
11287 case ConstTensorData_LongData: {
11288 auto ptr = reinterpret_cast<const armnnSerializer::LongData *>(obj);
11289 return verifier.VerifyTable(ptr);
11290 }
11291 default: return true;
11292 }
11293 }
11294
11295 inline bool VerifyConstTensorDataVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) {
11296 if (!values || !types) return !values && !types;
11297 if (values->size() != types->size()) return false;
11298 for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
11299 if (!VerifyConstTensorData(
11300 verifier, values->Get(i), types->GetEnum<ConstTensorData>(i))) {
11301 return false;
11302 }
11303 }
11304 return true;
11305 }
11306
11307 inline bool VerifyLayer(flatbuffers::Verifier &verifier, const void *obj, Layer type) {
11308 switch (type) {
11309 case Layer_NONE: {
11310 return true;
11311 }
11312 case Layer_ActivationLayer: {
11313 auto ptr = reinterpret_cast<const armnnSerializer::ActivationLayer *>(obj);
11314 return verifier.VerifyTable(ptr);
11315 }
11316 case Layer_AdditionLayer: {
11317 auto ptr = reinterpret_cast<const armnnSerializer::AdditionLayer *>(obj);
11318 return verifier.VerifyTable(ptr);
11319 }
11320 case Layer_BatchToSpaceNdLayer: {
11321 auto ptr = reinterpret_cast<const armnnSerializer::BatchToSpaceNdLayer *>(obj);
11322 return verifier.VerifyTable(ptr);
11323 }
11324 case Layer_BatchNormalizationLayer: {
11325 auto ptr = reinterpret_cast<const armnnSerializer::BatchNormalizationLayer *>(obj);
11326 return verifier.VerifyTable(ptr);
11327 }
11328 case Layer_ConstantLayer: {
11329 auto ptr = reinterpret_cast<const armnnSerializer::ConstantLayer *>(obj);
11330 return verifier.VerifyTable(ptr);
11331 }
11332 case Layer_Convolution2dLayer: {
11333 auto ptr = reinterpret_cast<const armnnSerializer::Convolution2dLayer *>(obj);
11334 return verifier.VerifyTable(ptr);
11335 }
11336 case Layer_DepthwiseConvolution2dLayer: {
11337 auto ptr = reinterpret_cast<const armnnSerializer::DepthwiseConvolution2dLayer *>(obj);
11338 return verifier.VerifyTable(ptr);
11339 }
11340 case Layer_FullyConnectedLayer: {
11341 auto ptr = reinterpret_cast<const armnnSerializer::FullyConnectedLayer *>(obj);
11342 return verifier.VerifyTable(ptr);
11343 }
11344 case Layer_InputLayer: {
11345 auto ptr = reinterpret_cast<const armnnSerializer::InputLayer *>(obj);
11346 return verifier.VerifyTable(ptr);
11347 }
11348 case Layer_MultiplicationLayer: {
11349 auto ptr = reinterpret_cast<const armnnSerializer::MultiplicationLayer *>(obj);
11350 return verifier.VerifyTable(ptr);
11351 }
11352 case Layer_OutputLayer: {
11353 auto ptr = reinterpret_cast<const armnnSerializer::OutputLayer *>(obj);
11354 return verifier.VerifyTable(ptr);
11355 }
11356 case Layer_PermuteLayer: {
11357 auto ptr = reinterpret_cast<const armnnSerializer::PermuteLayer *>(obj);
11358 return verifier.VerifyTable(ptr);
11359 }
11360 case Layer_Pooling2dLayer: {
11361 auto ptr = reinterpret_cast<const armnnSerializer::Pooling2dLayer *>(obj);
11362 return verifier.VerifyTable(ptr);
11363 }
11364 case Layer_ReshapeLayer: {
11365 auto ptr = reinterpret_cast<const armnnSerializer::ReshapeLayer *>(obj);
11366 return verifier.VerifyTable(ptr);
11367 }
11368 case Layer_SoftmaxLayer: {
11369 auto ptr = reinterpret_cast<const armnnSerializer::SoftmaxLayer *>(obj);
11370 return verifier.VerifyTable(ptr);
11371 }
11372 case Layer_SpaceToBatchNdLayer: {
11373 auto ptr = reinterpret_cast<const armnnSerializer::SpaceToBatchNdLayer *>(obj);
11374 return verifier.VerifyTable(ptr);
11375 }
11376 case Layer_DivisionLayer: {
11377 auto ptr = reinterpret_cast<const armnnSerializer::DivisionLayer *>(obj);
11378 return verifier.VerifyTable(ptr);
11379 }
11380 case Layer_MinimumLayer: {
11381 auto ptr = reinterpret_cast<const armnnSerializer::MinimumLayer *>(obj);
11382 return verifier.VerifyTable(ptr);
11383 }
11384 case Layer_EqualLayer: {
11385 auto ptr = reinterpret_cast<const armnnSerializer::EqualLayer *>(obj);
11386 return verifier.VerifyTable(ptr);
11387 }
11388 case Layer_MaximumLayer: {
11389 auto ptr = reinterpret_cast<const armnnSerializer::MaximumLayer *>(obj);
11390 return verifier.VerifyTable(ptr);
11391 }
11392 case Layer_NormalizationLayer: {
11393 auto ptr = reinterpret_cast<const armnnSerializer::NormalizationLayer *>(obj);
11394 return verifier.VerifyTable(ptr);
11395 }
11396 case Layer_PadLayer: {
11397 auto ptr = reinterpret_cast<const armnnSerializer::PadLayer *>(obj);
11398 return verifier.VerifyTable(ptr);
11399 }
11400 case Layer_RsqrtLayer: {
11401 auto ptr = reinterpret_cast<const armnnSerializer::RsqrtLayer *>(obj);
11402 return verifier.VerifyTable(ptr);
11403 }
11404 case Layer_FloorLayer: {
11405 auto ptr = reinterpret_cast<const armnnSerializer::FloorLayer *>(obj);
11406 return verifier.VerifyTable(ptr);
11407 }
11408 case Layer_GreaterLayer: {
11409 auto ptr = reinterpret_cast<const armnnSerializer::GreaterLayer *>(obj);
11410 return verifier.VerifyTable(ptr);
11411 }
11412 case Layer_ResizeBilinearLayer: {
11413 auto ptr = reinterpret_cast<const armnnSerializer::ResizeBilinearLayer *>(obj);
11414 return verifier.VerifyTable(ptr);
11415 }
11416 case Layer_SubtractionLayer: {
11417 auto ptr = reinterpret_cast<const armnnSerializer::SubtractionLayer *>(obj);
11418 return verifier.VerifyTable(ptr);
11419 }
11420 case Layer_StridedSliceLayer: {
11421 auto ptr = reinterpret_cast<const armnnSerializer::StridedSliceLayer *>(obj);
11422 return verifier.VerifyTable(ptr);
11423 }
11424 case Layer_GatherLayer: {
11425 auto ptr = reinterpret_cast<const armnnSerializer::GatherLayer *>(obj);
11426 return verifier.VerifyTable(ptr);
11427 }
11428 case Layer_MeanLayer: {
11429 auto ptr = reinterpret_cast<const armnnSerializer::MeanLayer *>(obj);
11430 return verifier.VerifyTable(ptr);
11431 }
11432 case Layer_MergerLayer: {
11433 auto ptr = reinterpret_cast<const armnnSerializer::MergerLayer *>(obj);
11434 return verifier.VerifyTable(ptr);
11435 }
11436 case Layer_L2NormalizationLayer: {
11437 auto ptr = reinterpret_cast<const armnnSerializer::L2NormalizationLayer *>(obj);
11438 return verifier.VerifyTable(ptr);
11439 }
11440 case Layer_SplitterLayer: {
11441 auto ptr = reinterpret_cast<const armnnSerializer::SplitterLayer *>(obj);
11442 return verifier.VerifyTable(ptr);
11443 }
11444 case Layer_DetectionPostProcessLayer: {
11445 auto ptr = reinterpret_cast<const armnnSerializer::DetectionPostProcessLayer *>(obj);
11446 return verifier.VerifyTable(ptr);
11447 }
11448 case Layer_LstmLayer: {
11449 auto ptr = reinterpret_cast<const armnnSerializer::LstmLayer *>(obj);
11450 return verifier.VerifyTable(ptr);
11451 }
11452 case Layer_QuantizedLstmLayer: {
11453 auto ptr = reinterpret_cast<const armnnSerializer::QuantizedLstmLayer *>(obj);
11454 return verifier.VerifyTable(ptr);
11455 }
11456 case Layer_QuantizeLayer: {
11457 auto ptr = reinterpret_cast<const armnnSerializer::QuantizeLayer *>(obj);
11458 return verifier.VerifyTable(ptr);
11459 }
11460 case Layer_DequantizeLayer: {
11461 auto ptr = reinterpret_cast<const armnnSerializer::DequantizeLayer *>(obj);
11462 return verifier.VerifyTable(ptr);
11463 }
11464 case Layer_MergeLayer: {
11465 auto ptr = reinterpret_cast<const armnnSerializer::MergeLayer *>(obj);
11466 return verifier.VerifyTable(ptr);
11467 }
11468 case Layer_SwitchLayer: {
11469 auto ptr = reinterpret_cast<const armnnSerializer::SwitchLayer *>(obj);
11470 return verifier.VerifyTable(ptr);
11471 }
11472 case Layer_ConcatLayer: {
11473 auto ptr = reinterpret_cast<const armnnSerializer::ConcatLayer *>(obj);
11474 return verifier.VerifyTable(ptr);
11475 }
11476 case Layer_SpaceToDepthLayer: {
11477 auto ptr = reinterpret_cast<const armnnSerializer::SpaceToDepthLayer *>(obj);
11478 return verifier.VerifyTable(ptr);
11479 }
11480 case Layer_PreluLayer: {
11481 auto ptr = reinterpret_cast<const armnnSerializer::PreluLayer *>(obj);
11482 return verifier.VerifyTable(ptr);
11483 }
11484 case Layer_TransposeConvolution2dLayer: {
11485 auto ptr = reinterpret_cast<const armnnSerializer::TransposeConvolution2dLayer *>(obj);
11486 return verifier.VerifyTable(ptr);
11487 }
11488 case Layer_ResizeLayer: {
11489 auto ptr = reinterpret_cast<const armnnSerializer::ResizeLayer *>(obj);
11490 return verifier.VerifyTable(ptr);
11491 }
11492 case Layer_StackLayer: {
11493 auto ptr = reinterpret_cast<const armnnSerializer::StackLayer *>(obj);
11494 return verifier.VerifyTable(ptr);
11495 }
11496 case Layer_AbsLayer: {
11497 auto ptr = reinterpret_cast<const armnnSerializer::AbsLayer *>(obj);
11498 return verifier.VerifyTable(ptr);
11499 }
11500 case Layer_ArgMinMaxLayer: {
11501 auto ptr = reinterpret_cast<const armnnSerializer::ArgMinMaxLayer *>(obj);
11502 return verifier.VerifyTable(ptr);
11503 }
11504 case Layer_SliceLayer: {
11505 auto ptr = reinterpret_cast<const armnnSerializer::SliceLayer *>(obj);
11506 return verifier.VerifyTable(ptr);
11507 }
11508 case Layer_DepthToSpaceLayer: {
11509 auto ptr = reinterpret_cast<const armnnSerializer::DepthToSpaceLayer *>(obj);
11510 return verifier.VerifyTable(ptr);
11511 }
11512 case Layer_InstanceNormalizationLayer: {
11513 auto ptr = reinterpret_cast<const armnnSerializer::InstanceNormalizationLayer *>(obj);
11514 return verifier.VerifyTable(ptr);
11515 }
11516 case Layer_LogSoftmaxLayer: {
11517 auto ptr = reinterpret_cast<const armnnSerializer::LogSoftmaxLayer *>(obj);
11518 return verifier.VerifyTable(ptr);
11519 }
11520 case Layer_ComparisonLayer: {
11521 auto ptr = reinterpret_cast<const armnnSerializer::ComparisonLayer *>(obj);
11522 return verifier.VerifyTable(ptr);
11523 }
11524 case Layer_StandInLayer: {
11525 auto ptr = reinterpret_cast<const armnnSerializer::StandInLayer *>(obj);
11526 return verifier.VerifyTable(ptr);
11527 }
11528 case Layer_ElementwiseUnaryLayer: {
11529 auto ptr = reinterpret_cast<const armnnSerializer::ElementwiseUnaryLayer *>(obj);
11530 return verifier.VerifyTable(ptr);
11531 }
11532 case Layer_TransposeLayer: {
11533 auto ptr = reinterpret_cast<const armnnSerializer::TransposeLayer *>(obj);
11534 return verifier.VerifyTable(ptr);
11535 }
11536 case Layer_QLstmLayer: {
11537 auto ptr = reinterpret_cast<const armnnSerializer::QLstmLayer *>(obj);
11538 return verifier.VerifyTable(ptr);
11539 }
11540 case Layer_FillLayer: {
11541 auto ptr = reinterpret_cast<const armnnSerializer::FillLayer *>(obj);
11542 return verifier.VerifyTable(ptr);
11543 }
11544 case Layer_RankLayer: {
11545 auto ptr = reinterpret_cast<const armnnSerializer::RankLayer *>(obj);
11546 return verifier.VerifyTable(ptr);
11547 }
11548 case Layer_LogicalBinaryLayer: {
11549 auto ptr = reinterpret_cast<const armnnSerializer::LogicalBinaryLayer *>(obj);
11550 return verifier.VerifyTable(ptr);
11551 }
11552 case Layer_ReduceLayer: {
11553 auto ptr = reinterpret_cast<const armnnSerializer::ReduceLayer *>(obj);
11554 return verifier.VerifyTable(ptr);
11555 }
11556 case Layer_CastLayer: {
11557 auto ptr = reinterpret_cast<const armnnSerializer::CastLayer *>(obj);
11558 return verifier.VerifyTable(ptr);
11559 }
11560 case Layer_ShapeLayer: {
11561 auto ptr = reinterpret_cast<const armnnSerializer::ShapeLayer *>(obj);
11562 return verifier.VerifyTable(ptr);
11563 }
11564 case Layer_UnidirectionalSequenceLstmLayer: {
11565 auto ptr = reinterpret_cast<const armnnSerializer::UnidirectionalSequenceLstmLayer *>(obj);
11566 return verifier.VerifyTable(ptr);
11567 }
11568 case Layer_ChannelShuffleLayer: {
11569 auto ptr = reinterpret_cast<const armnnSerializer::ChannelShuffleLayer *>(obj);
11570 return verifier.VerifyTable(ptr);
11571 }
11572 case Layer_Convolution3dLayer: {
11573 auto ptr = reinterpret_cast<const armnnSerializer::Convolution3dLayer *>(obj);
11574 return verifier.VerifyTable(ptr);
11575 }
11576 case Layer_Pooling3dLayer: {
11577 auto ptr = reinterpret_cast<const armnnSerializer::Pooling3dLayer *>(obj);
11578 return verifier.VerifyTable(ptr);
11579 }
11580 case Layer_GatherNdLayer: {
11581 auto ptr = reinterpret_cast<const armnnSerializer::GatherNdLayer *>(obj);
11582 return verifier.VerifyTable(ptr);
11583 }
11584 case Layer_BatchMatMulLayer: {
11585 auto ptr = reinterpret_cast<const armnnSerializer::BatchMatMulLayer *>(obj);
11586 return verifier.VerifyTable(ptr);
11587 }
11588 case Layer_ElementwiseBinaryLayer: {
11589 auto ptr = reinterpret_cast<const armnnSerializer::ElementwiseBinaryLayer *>(obj);
11590 return verifier.VerifyTable(ptr);
11591 }
11592 default: return true;
11593 }
11594 }
11595
11596 inline bool VerifyLayerVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types) {
11597 if (!values || !types) return !values && !types;
11598 if (values->size() != types->size()) return false;
11599 for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) {
11600 if (!VerifyLayer(
11601 verifier, values->Get(i), types->GetEnum<Layer>(i))) {
11602 return false;
11603 }
11604 }
11605 return true;
11606 }
11607
11608 inline const armnnSerializer::SerializedGraph *GetSerializedGraph(const void *buf) {
11609 return flatbuffers::GetRoot<armnnSerializer::SerializedGraph>(buf);
11610 }
11611
11612 inline const armnnSerializer::SerializedGraph *GetSizePrefixedSerializedGraph(const void *buf) {
11613 return flatbuffers::GetSizePrefixedRoot<armnnSerializer::SerializedGraph>(buf);
11614 }
11615
11616 inline const char *SerializedGraphIdentifier() {
11617 return "ARMN";
11618 }
11619
11620 inline bool SerializedGraphBufferHasIdentifier(const void *buf) {
11621 return flatbuffers::BufferHasIdentifier(
11622 buf, SerializedGraphIdentifier());
11623 }
11624
11625 inline bool SizePrefixedSerializedGraphBufferHasIdentifier(const void *buf) {
11626 return flatbuffers::BufferHasIdentifier(
11627 buf, SerializedGraphIdentifier(), true);
11628 }
11629
11630 inline bool VerifySerializedGraphBuffer(
11631 flatbuffers::Verifier &verifier) {
11632 return verifier.VerifyBuffer<armnnSerializer::SerializedGraph>(SerializedGraphIdentifier());
11633 }
11634
11635 inline bool VerifySizePrefixedSerializedGraphBuffer(
11636 flatbuffers::Verifier &verifier) {
11637 return verifier.VerifySizePrefixedBuffer<armnnSerializer::SerializedGraph>(SerializedGraphIdentifier());
11638 }
11639
11640 inline const char *SerializedGraphExtension() {
11641 return "armnn";
11642 }
11643
11644 inline void FinishSerializedGraphBuffer(
11645 flatbuffers::FlatBufferBuilder &fbb,
11646 flatbuffers::Offset<armnnSerializer::SerializedGraph> root) {
11647 fbb.Finish(root, SerializedGraphIdentifier());
11648 }
11649
11650 inline void FinishSizePrefixedSerializedGraphBuffer(
11651 flatbuffers::FlatBufferBuilder &fbb,
11652 flatbuffers::Offset<armnnSerializer::SerializedGraph> root) {
11653 fbb.FinishSizePrefixed(root, SerializedGraphIdentifier());
11654 }
11655
11656 } // namespace armnnSerializer
11657
11658 #endif // FLATBUFFERS_GENERATED_ARMNNSCHEMA_ARMNNSERIALIZER_H_
11659