Debian Codegraph @

third-party/simde/arm/neon/qshrn_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 * 2021 Evan Nemerson <[email protected]>
26 */
27
28 #if !defined(SIMDE_ARM_NEON_QSHRN_N_H)
29 #define SIMDE_ARM_NEON_QSHRN_N_H
30
31 #include "types.h"
32 #include "shr_n.h"
33 #include "qmovn.h"
34
35 HEDLEY_DIAGNOSTIC_PUSH
36 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
37 SIMDE_BEGIN_DECLS_
38
39 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
40 #define simde_vqshrns_n_s32(a, n) vqshrns_n_s32(a, n)
41 #else
42 #define simde_vqshrns_n_s32(a, n) simde_vqmovns_s32(simde_x_vshrs_n_s32(a, n))
43 #endif
44 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
45 #undef vqshrns_n_s32
46 #define vqshrns_n_s32(a, n) simde_vqshrns_n_s32(a, n)
47 #endif
48
49 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
50 #define simde_vqshrns_n_u32(a, n) vqshrns_n_u32(a, n)
51 #else
52 #define simde_vqshrns_n_u32(a, n) simde_vqmovns_u32(simde_x_vshrs_n_u32(a, n))
53 #endif
54 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
55 #undef vqshrns_n_u32
56 #define vqshrns_n_u32(a, n) simde_vqshrns_n_u32(a, n)
57 #endif
58
59 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
60 #define simde_vqshrnd_n_s64(a, n) vqshrnd_n_s64(a, n)
61 #else
62 #define simde_vqshrnd_n_s64(a, n) simde_vqmovnd_s64(simde_vshrd_n_s64(a, n))
63 #endif
64 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
65 #undef vqshrnd_n_s64
66 #define vqshrnd_n_s64(a, n) simde_vqshrnd_n_s64(a, n)
67 #endif
68
69 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
70 #define simde_vqshrnd_n_u64(a, n) vqshrnd_n_u64(a, n)
71 #else
72 #define simde_vqshrnd_n_u64(a, n) simde_vqmovnd_u64(simde_vshrd_n_u64(a, n))
73 #endif
74 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
75 #undef vqshrnd_n_u64
76 #define vqshrnd_n_u64(a, n) simde_vqshrnd_n_u64(a, n)
77 #endif
78
79 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
80 #define simde_vqshrn_n_s16(a, n) vqshrn_n_s16((a), (n))
81 #else
82 #define simde_vqshrn_n_s16(a, n) simde_vqmovn_s16(simde_vshrq_n_s16(a, n))
83 #endif
84 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
85 #undef vqshrn_n_s16
86 #define vqshrn_n_s16(a, n) simde_vqshrn_n_s16((a), (n))
87 #endif
88
89 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
90 #define simde_vqshrn_n_s32(a, n) vqshrn_n_s32((a), (n))
91 #else
92 #define simde_vqshrn_n_s32(a, n) simde_vqmovn_s32(simde_vshrq_n_s32(a, n))
93 #endif
94 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
95 #undef vqshrn_n_s32
96 #define vqshrn_n_s32(a, n) simde_vqshrn_n_s32((a), (n))
97 #endif
98
99 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
100 #define simde_vqshrn_n_s64(a, n) vqshrn_n_s64((a), (n))
101 #else
102 #define simde_vqshrn_n_s64(a, n) simde_vqmovn_s64(simde_vshrq_n_s64(a, n))
103 #endif
104 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
105 #undef vqshrn_n_s64
106 #define vqshrn_n_s64(a, n) simde_vqshrn_n_s64((a), (n))
107 #endif
108
109 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
110 #define simde_vqshrn_n_u16(a, n) vqshrn_n_u16((a), (n))
111 #else
112 #define simde_vqshrn_n_u16(a, n) simde_vqmovn_u16(simde_vshrq_n_u16(a, n))
113 #endif
114 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
115 #undef vqshrn_n_u16
116 #define vqshrn_n_u16(a, n) simde_vqshrn_n_u16((a), (n))
117 #endif
118
119 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
120 #define simde_vqshrn_n_u32(a, n) vqshrn_n_u32((a), (n))
121 #else
122 #define simde_vqshrn_n_u32(a, n) simde_vqmovn_u32(simde_vshrq_n_u32(a, n))
123 #endif
124 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
125 #undef vqshrn_n_u32
126 #define vqshrn_n_u32(a, n) simde_vqshrn_n_u32((a), (n))
127 #endif
128
129 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
130 #define simde_vqshrn_n_u64(a, n) vqshrn_n_u64((a), (n))
131 #else
132 #define simde_vqshrn_n_u64(a, n) simde_vqmovn_u64(simde_vshrq_n_u64(a, n))
133 #endif
134 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
135 #undef vqshrn_n_u64
136 #define vqshrn_n_u64(a, n) simde_vqshrn_n_u64((a), (n))
137 #endif
138
139
140 SIMDE_END_DECLS_
141 HEDLEY_DIAGNOSTIC_POP
142
143 #endif /* !defined(SIMDE_ARM_NEON_QSHRN_N_H) */