IVGCVSW-3722 Add front end support for ArgMinMax
[platform/upstream/armnn.git] / src / armnn / LayersFwd.hpp
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6
7 #include "InternalTypes.hpp"
8
9 #include "layers/AbsLayer.hpp"
10 #include "layers/ActivationLayer.hpp"
11 #include "layers/AdditionLayer.hpp"
12 #include "layers/ArgMinMaxLayer.hpp"
13 #include "layers/BatchNormalizationLayer.hpp"
14 #include "layers/BatchToSpaceNdLayer.hpp"
15 #include "layers/ConcatLayer.hpp"
16 #include "layers/ConstantLayer.hpp"
17 #include "layers/ConvertFp16ToFp32Layer.hpp"
18 #include "layers/ConvertFp32ToFp16Layer.hpp"
19 #include "layers/Convolution2dLayer.hpp"
20 #include "layers/DebugLayer.hpp"
21 #include "layers/DepthwiseConvolution2dLayer.hpp"
22 #include "layers/DequantizeLayer.hpp"
23 #include "layers/DetectionPostProcessLayer.hpp"
24 #include "layers/DivisionLayer.hpp"
25 #include "layers/EqualLayer.hpp"
26 #include "layers/FakeQuantizationLayer.hpp"
27 #include "layers/FloorLayer.hpp"
28 #include "layers/FullyConnectedLayer.hpp"
29 #include "layers/GatherLayer.hpp"
30 #include "layers/GreaterLayer.hpp"
31 #include "layers/InputLayer.hpp"
32 #include "layers/L2NormalizationLayer.hpp"
33 #include "layers/LstmLayer.hpp"
34 #include "layers/MaximumLayer.hpp"
35 #include "layers/MeanLayer.hpp"
36 #include "layers/MemCopyLayer.hpp"
37 #include "layers/MemImportLayer.hpp"
38 #include "layers/MergeLayer.hpp"
39 #include "layers/MinimumLayer.hpp"
40 #include "layers/MultiplicationLayer.hpp"
41 #include "layers/NormalizationLayer.hpp"
42 #include "layers/OutputLayer.hpp"
43 #include "layers/PadLayer.hpp"
44 #include "layers/PermuteLayer.hpp"
45 #include "layers/Pooling2dLayer.hpp"
46 #include "layers/PreCompiledLayer.hpp"
47 #include "layers/PreluLayer.hpp"
48 #include "layers/QuantizeLayer.hpp"
49 #include "layers/QuantizedLstmLayer.hpp"
50 #include "layers/ReshapeLayer.hpp"
51 #include "layers/ResizeLayer.hpp"
52 #include "layers/RsqrtLayer.hpp"
53 #include "layers/SoftmaxLayer.hpp"
54 #include "layers/SpaceToBatchNdLayer.hpp"
55 #include "layers/SpaceToDepthLayer.hpp"
56 #include "layers/SplitterLayer.hpp"
57 #include "layers/StackLayer.hpp"
58 #include "layers/StridedSliceLayer.hpp"
59 #include "layers/SubtractionLayer.hpp"
60 #include "layers/SwitchLayer.hpp"
61 #include "layers/TransposeConvolution2dLayer.hpp"
62
63 namespace armnn
64 {
65
66 template <LayerType Type>
67 struct LayerTypeOfImpl;
68
69 template <LayerType Type>
70 using LayerTypeOf = typename LayerTypeOfImpl<Type>::Type;
71
72 template <typename T>
73 constexpr LayerType LayerEnumOf(const T* = nullptr);
74
75 #define DECLARE_LAYER_IMPL(_, LayerName)                     \
76     class LayerName##Layer;                                  \
77     template <>                                              \
78     struct LayerTypeOfImpl<LayerType::_##LayerName>          \
79     {                                                        \
80         using Type = LayerName##Layer;                       \
81     };                                                       \
82     template <>                                              \
83     constexpr LayerType LayerEnumOf(const LayerName##Layer*) \
84     {                                                        \
85         return LayerType::_##LayerName;                      \
86     }
87
88 #define DECLARE_LAYER(LayerName) DECLARE_LAYER_IMPL(, LayerName)
89
90 DECLARE_LAYER(Abs)
91 DECLARE_LAYER(Activation)
92 DECLARE_LAYER(Addition)
93 DECLARE_LAYER(ArgMinMax)
94 DECLARE_LAYER(BatchNormalization)
95 DECLARE_LAYER(BatchToSpaceNd)
96 DECLARE_LAYER(Concat)
97 DECLARE_LAYER(Constant)
98 DECLARE_LAYER(ConvertFp16ToFp32)
99 DECLARE_LAYER(ConvertFp32ToFp16)
100 DECLARE_LAYER(Convolution2d)
101 DECLARE_LAYER(Debug)
102 DECLARE_LAYER(DepthwiseConvolution2d)
103 DECLARE_LAYER(Dequantize)
104 DECLARE_LAYER(DetectionPostProcess)
105 DECLARE_LAYER(Division)
106 DECLARE_LAYER(Equal)
107 DECLARE_LAYER(FakeQuantization)
108 DECLARE_LAYER(Floor)
109 DECLARE_LAYER(FullyConnected)
110 DECLARE_LAYER(Gather)
111 DECLARE_LAYER(Greater)
112 DECLARE_LAYER(Input)
113 DECLARE_LAYER(L2Normalization)
114 DECLARE_LAYER(Lstm)
115 DECLARE_LAYER(Maximum)
116 DECLARE_LAYER(Mean)
117 DECLARE_LAYER(MemCopy)
118 DECLARE_LAYER(MemImport)
119 DECLARE_LAYER(Merge)
120 DECLARE_LAYER(Minimum)
121 DECLARE_LAYER(Multiplication)
122 DECLARE_LAYER(Normalization)
123 DECLARE_LAYER(Output)
124 DECLARE_LAYER(Pad)
125 DECLARE_LAYER(Permute)
126 DECLARE_LAYER(Pooling2d)
127 DECLARE_LAYER(PreCompiled)
128 DECLARE_LAYER(Prelu)
129 DECLARE_LAYER(Quantize)
130 DECLARE_LAYER(QuantizedLstm)
131 DECLARE_LAYER(Reshape)
132 DECLARE_LAYER(Resize)
133 DECLARE_LAYER(Rsqrt)
134 DECLARE_LAYER(Softmax)
135 DECLARE_LAYER(SpaceToBatchNd)
136 DECLARE_LAYER(SpaceToDepth)
137 DECLARE_LAYER(Splitter)
138 DECLARE_LAYER(Stack)
139 DECLARE_LAYER(StridedSlice)
140 DECLARE_LAYER(Subtraction)
141 DECLARE_LAYER(Switch)
142 DECLARE_LAYER(TransposeConvolution2d)
143
144 }