Debian Codegraph @

third-party/simde/arm/neon/rshrn_n.h

raw
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 * 2021 Zhi An Ng <[email protected]> (Copyright owned by Google, LLC)
25 */
26
27 #if !defined(SIMDE_ARM_NEON_RSHRN_N_H)
28 #define SIMDE_ARM_NEON_RSHRN_N_H
29
30 #include "rshr_n.h"
31 #include "movn.h"
32 #include "types.h"
33
34 HEDLEY_DIAGNOSTIC_PUSH
35 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
36 SIMDE_BEGIN_DECLS_
37
38 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
39 #define simde_vrshrn_n_s16(a, n) vrshrn_n_s16((a), (n))
40 #else
41 #define simde_vrshrn_n_s16(a, n) simde_vmovn_s16(simde_vrshrq_n_s16(a, n))
42 #endif
43 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
44 #undef vrshrn_n_s16
45 #define vrshrn_n_s16(a, n) simde_vrshrn_n_s16((a), (n))
46 #endif
47
48 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
49 #define simde_vrshrn_n_s32(a, n) vrshrn_n_s32((a), (n))
50 #else
51 #define simde_vrshrn_n_s32(a, n) simde_vmovn_s32(simde_vrshrq_n_s32(a, n))
52 #endif
53 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
54 #undef vrshrn_n_s32
55 #define vrshrn_n_s32(a, n) simde_vrshrn_n_s32((a), (n))
56 #endif
57
58 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
59 #define simde_vrshrn_n_s64(a, n) vrshrn_n_s64((a), (n))
60 #else
61 #define simde_vrshrn_n_s64(a, n) simde_vmovn_s64(simde_vrshrq_n_s64(a, n))
62 #endif
63 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
64 #undef vrshrn_n_s64
65 #define vrshrn_n_s64(a, n) simde_vrshrn_n_s64((a), (n))
66 #endif
67
68 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
69 #define simde_vrshrn_n_u16(a, n) vrshrn_n_u16((a), (n))
70 #else
71 #define simde_vrshrn_n_u16(a, n) simde_vmovn_u16(simde_vrshrq_n_u16(a, n))
72 #endif
73 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
74 #undef vrshrn_n_u16
75 #define vrshrn_n_u16(a, n) simde_vrshrn_n_u16((a), (n))
76 #endif
77
78 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
79 #define simde_vrshrn_n_u32(a, n) vrshrn_n_u32((a), (n))
80 #else
81 #define simde_vrshrn_n_u32(a, n) simde_vmovn_u32(simde_vrshrq_n_u32(a, n))
82 #endif
83 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
84 #undef vrshrn_n_u32
85 #define vrshrn_n_u32(a, n) simde_vrshrn_n_u32((a), (n))
86 #endif
87
88 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
89 #define simde_vrshrn_n_u64(a, n) vrshrn_n_u64((a), (n))
90 #else
91 #define simde_vrshrn_n_u64(a, n) simde_vmovn_u64(simde_vrshrq_n_u64(a, n))
92 #endif
93 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
94 #undef vrshrn_n_u64
95 #define vrshrn_n_u64(a, n) simde_vrshrn_n_u64((a), (n))
96 #endif
97
98 SIMDE_END_DECLS_
99 HEDLEY_DIAGNOSTIC_POP
100
101 #endif /* !defined(SIMDE_ARM_NEON_RSHRN_N_H) */