Debian Codegraph @

third-party/simde/arm/neon/qrshrn_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_QRSHRN_N_H)
28 #define SIMDE_ARM_NEON_QRSHRN_N_H
29
30 #include "types.h"
31 #include "rshr_n.h"
32 #include "qmovn.h"
33
34 HEDLEY_DIAGNOSTIC_PUSH
35 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
36 SIMDE_BEGIN_DECLS_
37
38 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
39 #define simde_vqrshrns_n_s32(a, n) vqrshrns_n_s32(a, n)
40 #else
41 #define simde_vqrshrns_n_s32(a, n) simde_vqmovns_s32(simde_x_vrshrs_n_s32(a, n))
42 #endif
43 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
44 #undef vqrshrns_n_s32
45 #define vqrshrns_n_s32(a, n) simde_vqrshrns_n_s32(a, n)
46 #endif
47
48 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
49 #define simde_vqrshrns_n_u32(a, n) vqrshrns_n_u32(a, n)
50 #else
51 #define simde_vqrshrns_n_u32(a, n) simde_vqmovns_u32(simde_x_vrshrs_n_u32(a, n))
52 #endif
53 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
54 #undef vqrshrns_n_u32
55 #define vqrshrns_n_u32(a, n) simde_vqrshrns_n_u32(a, n)
56 #endif
57
58 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
59 #define simde_vqrshrnd_n_s64(a, n) vqrshrnd_n_s64(a, n)
60 #else
61 #define simde_vqrshrnd_n_s64(a, n) simde_vqmovnd_s64(simde_vrshrd_n_s64(a, n))
62 #endif
63 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
64 #undef vqrshrnd_n_s64
65 #define vqrshrnd_n_s64(a, n) simde_vqrshrnd_n_s64(a, n)
66 #endif
67
68 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
69 #define simde_vqrshrnd_n_u64(a, n) vqrshrnd_n_u64(a, n)
70 #else
71 #define simde_vqrshrnd_n_u64(a, n) simde_vqmovnd_u64(simde_vrshrd_n_u64(a, n))
72 #endif
73 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
74 #undef vqrshrnd_n_u64
75 #define vqrshrnd_n_u64(a, n) simde_vqrshrnd_n_u64(a, n)
76 #endif
77
78 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
79 #define simde_vqrshrn_n_s16(a, n) vqrshrn_n_s16((a), (n))
80 #else
81 #define simde_vqrshrn_n_s16(a, n) simde_vqmovn_s16(simde_vrshrq_n_s16(a, n))
82 #endif
83 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
84 #undef vqrshrn_n_s16
85 #define vqrshrn_n_s16(a, n) simde_vqrshrn_n_s16((a), (n))
86 #endif
87
88 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
89 #define simde_vqrshrn_n_s32(a, n) vqrshrn_n_s32((a), (n))
90 #else
91 #define simde_vqrshrn_n_s32(a, n) simde_vqmovn_s32(simde_vrshrq_n_s32(a, n))
92 #endif
93 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
94 #undef vqrshrn_n_s32
95 #define vqrshrn_n_s32(a, n) simde_vqrshrn_n_s32((a), (n))
96 #endif
97
98 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
99 #define simde_vqrshrn_n_s64(a, n) vqrshrn_n_s64((a), (n))
100 #else
101 #define simde_vqrshrn_n_s64(a, n) simde_vqmovn_s64(simde_vrshrq_n_s64(a, n))
102 #endif
103 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
104 #undef vqrshrn_n_s64
105 #define vqrshrn_n_s64(a, n) simde_vqrshrn_n_s64((a), (n))
106 #endif
107
108 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
109 #define simde_vqrshrn_n_u16(a, n) vqrshrn_n_u16((a), (n))
110 #else
111 #define simde_vqrshrn_n_u16(a, n) simde_vqmovn_u16(simde_vrshrq_n_u16(a, n))
112 #endif
113 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
114 #undef vqrshrn_n_u16
115 #define vqrshrn_n_u16(a, n) simde_vqrshrn_n_u16((a), (n))
116 #endif
117
118 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
119 #define simde_vqrshrn_n_u32(a, n) vqrshrn_n_u32((a), (n))
120 #else
121 #define simde_vqrshrn_n_u32(a, n) simde_vqmovn_u32(simde_vrshrq_n_u32(a, n))
122 #endif
123 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
124 #undef vqrshrn_n_u32
125 #define vqrshrn_n_u32(a, n) simde_vqrshrn_n_u32((a), (n))
126 #endif
127
128 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
129 #define simde_vqrshrn_n_u64(a, n) vqrshrn_n_u64((a), (n))
130 #else
131 #define simde_vqrshrn_n_u64(a, n) simde_vqmovn_u64(simde_vrshrq_n_u64(a, n))
132 #endif
133 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
134 #undef vqrshrn_n_u64
135 #define vqrshrn_n_u64(a, n) simde_vqrshrn_n_u64((a), (n))
136 #endif
137
138
139 SIMDE_END_DECLS_
140 HEDLEY_DIAGNOSTIC_POP
141
142 #endif /* !defined(SIMDE_ARM_NEON_QRSHRN_N_H) */