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