24 #ifndef ARM_COMPUTE_WRAPPER_GET_LANE_H
25 #define ARM_COMPUTE_WRAPPER_GET_LANE_H
33 #define VGETLANE_IMPL_8(stype, vtype, postfix) \
34 inline stype vgetlane(const vtype vector, const unsigned int lane) \
39 return vget_lane_##postfix(vector, 0); \
41 return vget_lane_##postfix(vector, 1); \
43 return vget_lane_##postfix(vector, 2); \
45 return vget_lane_##postfix(vector, 3); \
47 return vget_lane_##postfix(vector, 4); \
49 return vget_lane_##postfix(vector, 5); \
51 return vget_lane_##postfix(vector, 6); \
53 return vget_lane_##postfix(vector, 7); \
55 ARM_COMPUTE_ERROR("Invalid lane"); \
59 #define VGETLANE_IMPL_4(stype, vtype, postfix) \
60 inline stype vgetlane(const vtype vector, const unsigned int lane) \
65 return vget_lane_##postfix(vector, 0); \
67 return vget_lane_##postfix(vector, 1); \
69 return vget_lane_##postfix(vector, 2); \
71 return vget_lane_##postfix(vector, 3); \
73 ARM_COMPUTE_ERROR("Invalid lane"); \
77 #define VGETLANE_IMPL_2(stype, vtype, postfix) \
78 inline stype vgetlane(const vtype vector, const unsigned int lane) \
83 return vget_lane_##postfix(vector, 0); \
85 return vget_lane_##postfix(vector, 1); \
87 ARM_COMPUTE_ERROR("Invalid lane"); \
98 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
100 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
102 #define VGETQLANE_IMPL_16(stype, vtype, postfix) \
103 inline stype vgetlane(const vtype vector, const unsigned int lane) \
108 return vgetq_lane_##postfix(vector, 0); \
110 return vgetq_lane_##postfix(vector, 1); \
112 return vgetq_lane_##postfix(vector, 2); \
114 return vgetq_lane_##postfix(vector, 3); \
116 return vgetq_lane_##postfix(vector, 4); \
118 return vgetq_lane_##postfix(vector, 5); \
120 return vgetq_lane_##postfix(vector, 6); \
122 return vgetq_lane_##postfix(vector, 7); \
124 return vgetq_lane_##postfix(vector, 8); \
126 return vgetq_lane_##postfix(vector, 9); \
128 return vgetq_lane_##postfix(vector, 10); \
130 return vgetq_lane_##postfix(vector, 11); \
132 return vgetq_lane_##postfix(vector, 12); \
134 return vgetq_lane_##postfix(vector, 13); \
136 return vgetq_lane_##postfix(vector, 14); \
138 return vgetq_lane_##postfix(vector, 15); \
140 ARM_COMPUTE_ERROR("Invalid lane"); \
144 #define VGETQLANE_IMPL_8(stype, vtype, postfix) \
145 inline stype vgetlane(const vtype vector, const unsigned int lane) \
150 return vgetq_lane_##postfix(vector, 0); \
152 return vgetq_lane_##postfix(vector, 1); \
154 return vgetq_lane_##postfix(vector, 2); \
156 return vgetq_lane_##postfix(vector, 3); \
158 return vgetq_lane_##postfix(vector, 4); \
160 return vgetq_lane_##postfix(vector, 5); \
162 return vgetq_lane_##postfix(vector, 6); \
164 return vgetq_lane_##postfix(vector, 7); \
166 ARM_COMPUTE_ERROR("Invalid lane"); \
170 #define VGETQLANE_IMPL_4(stype, vtype, postfix) \
171 inline stype vgetlane(const vtype vector, const unsigned int lane) \
176 return vgetq_lane_##postfix(vector, 0); \
178 return vgetq_lane_##postfix(vector, 1); \
180 return vgetq_lane_##postfix(vector, 2); \
182 return vgetq_lane_##postfix(vector, 3); \
184 ARM_COMPUTE_ERROR("Invalid lane"); \
188 #define VGETQLANE_IMPL_2(stype, vtype, postfix) \
189 inline stype vgetlane(const vtype vector, const unsigned int lane) \
194 return vgetq_lane_##postfix(vector, 0); \
196 return vgetq_lane_##postfix(vector, 1); \
198 ARM_COMPUTE_ERROR("Invalid lane"); \
210 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
212 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
214 #undef VGETLANE_IMPL_8
215 #undef VGETLANE_IMPL_4
216 #undef VGETLANE_IMPL_2
218 #undef VGETQLANE_IMPL_16
219 #undef VGETQLANE_IMPL_8
220 #undef VGETQLANE_IMPL_4