1 /* SPDX-License-Identifier: MIT
2  *
3  * Permission is hereby granted, free of charge, to any person
4  * obtaining a copy of this software and associated documentation
5  * files (the "Software"), to deal in the Software without
6  * restriction, including without limitation the rights to use, copy,
7  * modify, merge, publish, distribute, sublicense, and/or sell copies
8  * of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be
12  * included in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21  * SOFTWARE.
22  *
23  * Copyright:
24  *   2020      Evan Nemerson <evan@nemerson.com>
25  *   2020      Sean Maher <seanptmaher@gmail.com>
26  */
27 
28 #if !defined(SIMDE_ARM_NEON_GET_LANE_H)
29 #define SIMDE_ARM_NEON_GET_LANE_H
30 
31 #include "types.h"
32 
33 HEDLEY_DIAGNOSTIC_PUSH
34 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
35 SIMDE_BEGIN_DECLS_
36 
37 SIMDE_FUNCTION_ATTRIBUTES
38 simde_float32_t
simde_vget_lane_f32(simde_float32x2_t v,const int lane)39 simde_vget_lane_f32(simde_float32x2_t v, const int lane)
40     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 1) {
41   simde_float32_t r;
42 
43   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
44     SIMDE_CONSTIFY_2_(vget_lane_f32, r, (HEDLEY_UNREACHABLE(), SIMDE_FLOAT32_C(0.0)), lane, v);
45   #else
46     simde_float32x2_private v_ = simde_float32x2_to_private(v);
47 
48     r = v_.values[lane];
49   #endif
50 
51   return r;
52 }
53 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
54   #undef vget_lane_f32
55   #define vget_lane_f32(v, lane) simde_vget_lane_f32((v), (lane))
56 #endif
57 
58 SIMDE_FUNCTION_ATTRIBUTES
59 simde_float64_t
simde_vget_lane_f64(simde_float64x1_t v,const int lane)60 simde_vget_lane_f64(simde_float64x1_t v, const int lane)
61     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 0) {
62   simde_float64_t r;
63 
64   #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
65     (void) lane;
66     return vget_lane_f64(v, 0);
67   #else
68     simde_float64x1_private v_ = simde_float64x1_to_private(v);
69 
70     r = v_.values[lane];
71   #endif
72 
73   return r;
74 }
75 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
76   #undef vget_lane_f64
77   #define vget_lane_f64(v, lane) simde_vget_lane_f64((v), (lane))
78 #endif
79 
80 SIMDE_FUNCTION_ATTRIBUTES
81 int8_t
simde_vget_lane_s8(simde_int8x8_t v,const int lane)82 simde_vget_lane_s8(simde_int8x8_t v, const int lane)
83     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 7) {
84   int8_t r;
85 
86   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
87     SIMDE_CONSTIFY_8_(vget_lane_s8, r, (HEDLEY_UNREACHABLE(), INT8_C(0)), lane, v);
88   #else
89     simde_int8x8_private v_ = simde_int8x8_to_private(v);
90 
91     r = v_.values[lane];
92   #endif
93 
94   return r;
95 }
96 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
97   #undef vget_lane_s8
98   #define vget_lane_s8(v, lane) simde_vget_lane_s8((v), (lane))
99 #endif
100 
101 SIMDE_FUNCTION_ATTRIBUTES
102 int16_t
simde_vget_lane_s16(simde_int16x4_t v,const int lane)103 simde_vget_lane_s16(simde_int16x4_t v, const int lane)
104     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 3) {
105   int16_t r;
106 
107   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
108     SIMDE_CONSTIFY_4_(vget_lane_s16, r, (HEDLEY_UNREACHABLE(), INT16_C(0)), lane, v);
109   #else
110     simde_int16x4_private v_ = simde_int16x4_to_private(v);
111 
112     r = v_.values[lane];
113   #endif
114 
115   return r;
116 }
117 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
118   #undef vget_lane_s16
119   #define vget_lane_s16(v, lane) simde_vget_lane_s16((v), (lane))
120 #endif
121 
122 SIMDE_FUNCTION_ATTRIBUTES
123 int32_t
simde_vget_lane_s32(simde_int32x2_t v,const int lane)124 simde_vget_lane_s32(simde_int32x2_t v, const int lane)
125     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 1) {
126   int32_t r;
127 
128   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
129     SIMDE_CONSTIFY_2_(vget_lane_s32, r, (HEDLEY_UNREACHABLE(), INT32_C(0)), lane, v);
130   #else
131     simde_int32x2_private v_ = simde_int32x2_to_private(v);
132 
133     r = v_.values[lane];
134   #endif
135 
136   return r;
137 }
138 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
139   #undef vget_lane_s32
140   #define vget_lane_s32(v, lane) simde_vget_lane_s32((v), (lane))
141 #endif
142 
143 SIMDE_FUNCTION_ATTRIBUTES
144 int64_t
simde_vget_lane_s64(simde_int64x1_t v,const int lane)145 simde_vget_lane_s64(simde_int64x1_t v, const int lane)
146     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 0) {
147   int64_t r;
148 
149   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
150     (void) lane;
151     return vget_lane_s64(v, 0);
152   #else
153     simde_int64x1_private v_ = simde_int64x1_to_private(v);
154 
155     r = v_.values[lane];
156   #endif
157 
158   return r;
159 }
160 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
161   #undef vget_lane_s64
162   #define vget_lane_s64(v, lane) simde_vget_lane_s64((v), (lane))
163 #endif
164 
165 SIMDE_FUNCTION_ATTRIBUTES
166 uint8_t
simde_vget_lane_u8(simde_uint8x8_t v,const int lane)167 simde_vget_lane_u8(simde_uint8x8_t v, const int lane)
168     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 7) {
169   uint8_t r;
170 
171   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
172     SIMDE_CONSTIFY_8_(vget_lane_u8, r, (HEDLEY_UNREACHABLE(), UINT8_C(0)), lane, v);
173   #else
174     simde_uint8x8_private v_ = simde_uint8x8_to_private(v);
175 
176     r = v_.values[lane];
177   #endif
178 
179   return r;
180 }
181 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
182   #undef vget_lane_u8
183   #define vget_lane_u8(v, lane) simde_vget_lane_u8((v), (lane))
184 #endif
185 
186 SIMDE_FUNCTION_ATTRIBUTES
187 uint16_t
simde_vget_lane_u16(simde_uint16x4_t v,const int lane)188 simde_vget_lane_u16(simde_uint16x4_t v, const int lane)
189     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 3) {
190   uint16_t r;
191 
192   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
193     SIMDE_CONSTIFY_4_(vget_lane_u16, r, (HEDLEY_UNREACHABLE(), UINT16_C(0)), lane, v);
194   #else
195     simde_uint16x4_private v_ = simde_uint16x4_to_private(v);
196 
197     r = v_.values[lane];
198   #endif
199 
200   return r;
201 }
202 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
203   #undef vget_lane_u16
204   #define vget_lane_u16(v, lane) simde_vget_lane_u16((v), (lane))
205 #endif
206 
207 SIMDE_FUNCTION_ATTRIBUTES
208 uint32_t
simde_vget_lane_u32(simde_uint32x2_t v,const int lane)209 simde_vget_lane_u32(simde_uint32x2_t v, const int lane)
210     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 1) {
211   uint32_t r;
212 
213   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
214     SIMDE_CONSTIFY_2_(vget_lane_u32, r, (HEDLEY_UNREACHABLE(), UINT32_C(0)), lane, v);
215   #else
216     simde_uint32x2_private v_ = simde_uint32x2_to_private(v);
217 
218     r = v_.values[lane];
219   #endif
220 
221   return r;
222 }
223 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
224   #undef vget_lane_u32
225   #define vget_lane_u32(v, lane) simde_vget_lane_u32((v), (lane))
226 #endif
227 
228 SIMDE_FUNCTION_ATTRIBUTES
229 uint64_t
simde_vget_lane_u64(simde_uint64x1_t v,const int lane)230 simde_vget_lane_u64(simde_uint64x1_t v, const int lane)
231     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 0) {
232   uint64_t r;
233 
234   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
235     (void) lane;
236     return vget_lane_u64(v, 0);
237   #else
238     simde_uint64x1_private v_ = simde_uint64x1_to_private(v);
239 
240     r = v_.values[lane];
241   #endif
242 
243   return r;
244 }
245 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
246   #undef vget_lane_u64
247   #define vget_lane_u64(v, lane) simde_vget_lane_u64((v), (lane))
248 #endif
249 
250 SIMDE_FUNCTION_ATTRIBUTES
251 simde_float32_t
simde_vgetq_lane_f32(simde_float32x4_t v,const int lane)252 simde_vgetq_lane_f32(simde_float32x4_t v, const int lane)
253     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 3) {
254   simde_float32_t r;
255 
256   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
257     SIMDE_CONSTIFY_4_(vgetq_lane_f32, r, (HEDLEY_UNREACHABLE(), SIMDE_FLOAT32_C(0.0)), lane, v);
258   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
259     SIMDE_CONSTIFY_4_(wasm_f32x4_extract_lane, r, (HEDLEY_UNREACHABLE(), SIMDE_FLOAT32_C(0.0)), lane, v);
260   #else
261     simde_float32x4_private v_ = simde_float32x4_to_private(v);
262 
263     r = v_.values[lane];
264   #endif
265 
266   return r;
267 }
268 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
269   #undef vgetq_lane_f32
270   #define vgetq_lane_f32(v, lane) simde_vgetq_lane_f32((v), (lane))
271 #endif
272 
273 SIMDE_FUNCTION_ATTRIBUTES
274 simde_float64_t
simde_vgetq_lane_f64(simde_float64x2_t v,const int lane)275 simde_vgetq_lane_f64(simde_float64x2_t v, const int lane)
276     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 1) {
277   simde_float64_t r;
278 
279   #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
280     SIMDE_CONSTIFY_2_(vgetq_lane_f64, r, (HEDLEY_UNREACHABLE(), SIMDE_FLOAT64_C(0.0)), lane, v);
281   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
282     SIMDE_CONSTIFY_2_(wasm_f64x2_extract_lane, r, (HEDLEY_UNREACHABLE(), SIMDE_FLOAT64_C(0.0)), lane, v);
283   #else
284     simde_float64x2_private v_ = simde_float64x2_to_private(v);
285 
286     r = v_.values[lane];
287   #endif
288 
289   return r;
290 }
291 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
292   #undef vgetq_lane_f64
293   #define vgetq_lane_f64(v, lane) simde_vgetq_lane_f64((v), (lane))
294 #endif
295 
296 SIMDE_FUNCTION_ATTRIBUTES
297 int8_t
simde_vgetq_lane_s8(simde_int8x16_t v,const int lane)298 simde_vgetq_lane_s8(simde_int8x16_t v, const int lane)
299     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 15) {
300   int8_t r;
301 
302   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
303     SIMDE_CONSTIFY_16_(vgetq_lane_s8, r, (HEDLEY_UNREACHABLE(), INT8_C(0)), lane, v);
304   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
305     int r_;
306     SIMDE_CONSTIFY_16_(wasm_i8x16_extract_lane, r_, (HEDLEY_UNREACHABLE(), INT8_C(0)), lane, v);
307     r = HEDLEY_STATIC_CAST(int8_t, r_);
308   #else
309     simde_int8x16_private v_ = simde_int8x16_to_private(v);
310 
311     r = v_.values[lane];
312   #endif
313 
314   return r;
315 }
316 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
317   #undef vgetq_lane_s8
318   #define vgetq_lane_s8(v, lane) simde_vgetq_lane_s8((v), (lane))
319 #endif
320 
321 SIMDE_FUNCTION_ATTRIBUTES
322 int16_t
simde_vgetq_lane_s16(simde_int16x8_t v,const int lane)323 simde_vgetq_lane_s16(simde_int16x8_t v, const int lane)
324     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 7) {
325   int16_t r;
326 
327   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
328     SIMDE_CONSTIFY_8_(vgetq_lane_s16, r, (HEDLEY_UNREACHABLE(), INT16_C(0)), lane, v);
329   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
330     int r_;
331     SIMDE_CONSTIFY_8_(wasm_i16x8_extract_lane, r_, (HEDLEY_UNREACHABLE(), INT16_C(0)), lane, v);
332     r = HEDLEY_STATIC_CAST(int16_t, r_);
333   #else
334     simde_int16x8_private v_ = simde_int16x8_to_private(v);
335 
336     r = v_.values[lane];
337   #endif
338 
339   return r;
340 }
341 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
342   #undef vgetq_lane_s16
343   #define vgetq_lane_s16(v, lane) simde_vgetq_lane_s16((v), (lane))
344 #endif
345 
346 SIMDE_FUNCTION_ATTRIBUTES
347 int32_t
simde_vgetq_lane_s32(simde_int32x4_t v,const int lane)348 simde_vgetq_lane_s32(simde_int32x4_t v, const int lane)
349     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 3) {
350   int32_t r;
351 
352   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
353     SIMDE_CONSTIFY_4_(vgetq_lane_s32, r, (HEDLEY_UNREACHABLE(), INT32_C(0)), lane, v);
354   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
355     int r_;
356     SIMDE_CONSTIFY_4_(wasm_i32x4_extract_lane, r_, (HEDLEY_UNREACHABLE(), INT32_C(0)), lane, v);
357     r = HEDLEY_STATIC_CAST(int32_t, r_);
358   #else
359     simde_int32x4_private v_ = simde_int32x4_to_private(v);
360 
361     r = v_.values[lane];
362   #endif
363 
364   return r;
365 }
366 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
367   #undef vgetq_lane_s32
368   #define vgetq_lane_s32(v, lane) simde_vgetq_lane_s32((v), (lane))
369 #endif
370 
371 SIMDE_FUNCTION_ATTRIBUTES
372 int64_t
simde_vgetq_lane_s64(simde_int64x2_t v,const int lane)373 simde_vgetq_lane_s64(simde_int64x2_t v, const int lane)
374     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 1) {
375   int64_t r;
376 
377   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
378     SIMDE_CONSTIFY_2_(vgetq_lane_s64, r, (HEDLEY_UNREACHABLE(), INT64_C(0)), lane, v);
379   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
380     long long r_;
381     SIMDE_CONSTIFY_2_(wasm_i64x2_extract_lane, r_, (HEDLEY_UNREACHABLE(), INT64_C(0)), lane, v);
382     r = HEDLEY_STATIC_CAST(int64_t, r_);
383   #else
384     simde_int64x2_private v_ = simde_int64x2_to_private(v);
385 
386     r = v_.values[lane];
387   #endif
388 
389   return r;
390 }
391 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
392   #undef vgetq_lane_s64
393   #define vgetq_lane_s64(v, lane) simde_vgetq_lane_s64((v), (lane))
394 #endif
395 
396 SIMDE_FUNCTION_ATTRIBUTES
397 uint8_t
simde_vgetq_lane_u8(simde_uint8x16_t v,const int lane)398 simde_vgetq_lane_u8(simde_uint8x16_t v, const int lane)
399     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 15) {
400   uint8_t r;
401 
402   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
403     SIMDE_CONSTIFY_16_(vgetq_lane_u8, r, (HEDLEY_UNREACHABLE(), UINT8_C(0)), lane, v);
404   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
405     int r_;
406     SIMDE_CONSTIFY_16_(wasm_i8x16_extract_lane, r_, (HEDLEY_UNREACHABLE(), UINT8_C(0)), lane, v);
407     r = HEDLEY_STATIC_CAST(uint8_t, r_);
408   #else
409     simde_uint8x16_private v_ = simde_uint8x16_to_private(v);
410 
411     r = v_.values[lane];
412   #endif
413 
414   return r;
415 }
416 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
417   #undef vgetq_lane_u8
418   #define vgetq_lane_u8(v, lane) simde_vgetq_lane_u8((v), (lane))
419 #endif
420 
421 SIMDE_FUNCTION_ATTRIBUTES
422 uint16_t
simde_vgetq_lane_u16(simde_uint16x8_t v,const int lane)423 simde_vgetq_lane_u16(simde_uint16x8_t v, const int lane)
424     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 7) {
425   uint16_t r;
426 
427   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
428     SIMDE_CONSTIFY_8_(vgetq_lane_u16, r, (HEDLEY_UNREACHABLE(), UINT16_C(0)), lane, v);
429   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
430     int r_;
431     SIMDE_CONSTIFY_8_(wasm_i16x8_extract_lane, r_, (HEDLEY_UNREACHABLE(), UINT16_C(0)), lane, v);
432     r = HEDLEY_STATIC_CAST(uint16_t, r_);
433   #else
434     simde_uint16x8_private v_ = simde_uint16x8_to_private(v);
435 
436     r = v_.values[lane];
437   #endif
438 
439   return r;
440 }
441 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
442   #undef vgetq_lane_u16
443   #define vgetq_lane_u16(v, lane) simde_vgetq_lane_u16((v), (lane))
444 #endif
445 
446 SIMDE_FUNCTION_ATTRIBUTES
447 uint32_t
simde_vgetq_lane_u32(simde_uint32x4_t v,const int lane)448 simde_vgetq_lane_u32(simde_uint32x4_t v, const int lane)
449     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 3) {
450   uint32_t r;
451 
452   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
453     SIMDE_CONSTIFY_4_(vgetq_lane_u32, r, (HEDLEY_UNREACHABLE(), UINT32_C(0)), lane, v);
454   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
455     int r_;
456     SIMDE_CONSTIFY_4_(wasm_i32x4_extract_lane, r_, (HEDLEY_UNREACHABLE(), UINT32_C(0)), lane, v);
457     r = HEDLEY_STATIC_CAST(uint32_t, r_);
458   #else
459     simde_uint32x4_private v_ = simde_uint32x4_to_private(v);
460 
461     r = v_.values[lane];
462   #endif
463 
464   return r;
465 }
466 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
467   #undef vgetq_lane_u32
468   #define vgetq_lane_u32(v, lane) simde_vgetq_lane_u32((v), (lane))
469 #endif
470 
471 SIMDE_FUNCTION_ATTRIBUTES
472 uint64_t
simde_vgetq_lane_u64(simde_uint64x2_t v,const int lane)473 simde_vgetq_lane_u64(simde_uint64x2_t v, const int lane)
474     SIMDE_REQUIRE_CONSTANT_RANGE(lane, 0, 1) {
475   uint64_t r;
476 
477   #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
478     SIMDE_CONSTIFY_2_(vgetq_lane_u64, r, (HEDLEY_UNREACHABLE(), UINT64_C(0)), lane, v);
479   #elif defined(SIMDE_WASM_SIMD128_NATIVE)
480     long long r_;
481     SIMDE_CONSTIFY_2_(wasm_i64x2_extract_lane, r_, (HEDLEY_UNREACHABLE(), UINT64_C(0)), lane, v);
482     r = HEDLEY_STATIC_CAST(uint64_t, r_);
483   #else
484     simde_uint64x2_private v_ = simde_uint64x2_to_private(v);
485 
486     r = v_.values[lane];
487   #endif
488 
489   return r;
490 }
491 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
492   #undef vgetq_lane_u64
493   #define vgetq_lane_u64(v, lane) simde_vgetq_lane_u64((v), (lane))
494 #endif
495 
496 SIMDE_END_DECLS_
497 HEDLEY_DIAGNOSTIC_POP
498 
499 #endif /* !defined(SIMDE_ARM_NEON_GET_LANE_H) */
500