Debian Codegraph @

third-party/simde/arm/neon/qdmulh_lane.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 Evan Nemerson <[email protected]>
25 * 2021 Zhi An Ng <[email protected]> (Copyright owned by Google, LLC)
26 */
27
28 #if !defined(SIMDE_ARM_NEON_QDMULH_LANE_H)
29 #define SIMDE_ARM_NEON_QDMULH_LANE_H
30
31 #include "types.h"
32
33 #include "qdmulh_n.h"
34 #include "get_lane.h"
35
36 HEDLEY_DIAGNOSTIC_PUSH
37 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
38 SIMDE_BEGIN_DECLS_
39
40 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
41 #define simde_vqdmulh_lane_s16(a, v, lane) vqdmulh_lane_s16((a), (v), (lane))
42 #else
43 #define simde_vqdmulh_lane_s16(a, v, lane) \
44 simde_vqdmulh_n_s16((a), simde_vget_lane_s16((v), (lane)))
45 #endif
46 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
47 #undef vqdmulh_lane_s16
48 #define vqdmulh_lane_s16(a, v, lane) simde_vqdmulh_lane_s16((a), (v), (lane))
49 #endif
50
51 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
52 #define simde_vqdmulh_lane_s32(a, v, lane) vqdmulh_lane_s32((a), (v), (lane))
53 #else
54 #define simde_vqdmulh_lane_s32(a, v, lane) \
55 simde_vqdmulh_n_s32((a), simde_vget_lane_s32((v), (lane)))
56 #endif
57 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
58 #undef vqdmulh_lane_s32
59 #define vqdmulh_lane_s32(a, v, lane) simde_vqdmulh_lane_s32((a), (v), (lane))
60 #endif
61
62 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
63 #define simde_vqdmulhq_lane_s16(a, v, lane) vqdmulhq_lane_s16((a), (v), (lane))
64 #else
65 #define simde_vqdmulhq_lane_s16(a, v, lane) \
66 simde_vqdmulhq_n_s16((a), simde_vget_lane_s16((v), (lane)))
67 #endif
68 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
69 #undef vqdmulhq_lane_s16
70 #define vqdmulhq_lane_s16(a, v, lane) simde_vqdmulhq_lane_s16((a), (v), (lane))
71 #endif
72
73 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
74 #define simde_vqdmulhq_lane_s32(a, v, lane) vqdmulhq_lane_s32((a), (v), (lane))
75 #else
76 #define simde_vqdmulhq_lane_s32(a, v, lane) \
77 simde_vqdmulhq_n_s32((a), simde_vget_lane_s32((v), (lane)))
78 #endif
79 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
80 #undef vqdmulhq_lane_s32
81 #define vqdmulhq_lane_s32(a, v, lane) simde_vqdmulhq_lane_s32((a), (v), (lane))
82 #endif
83
84 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
85 #define simde_vqdmulh_laneq_s16(a, v, lane) vqdmulh_laneq_s16((a), (v), (lane))
86 #else
87 #define simde_vqdmulh_laneq_s16(a, v, lane) \
88 simde_vqdmulh_n_s16((a), simde_vgetq_lane_s16((v), (lane)))
89 #endif
90 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
91 #undef vqdmulh_laneq_s16
92 #define vqdmulh_laneq_s16(a, v, lane) simde_vqdmulh_laneq_s16((a), (v), (lane))
93 #endif
94
95 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
96 #define simde_vqdmulh_laneq_s32(a, v, lane) vqdmulh_laneq_s32((a), (v), (lane))
97 #else
98 #define simde_vqdmulh_laneq_s32(a, v, lane) \
99 simde_vqdmulh_n_s32((a), simde_vgetq_lane_s32((v), (lane)))
100 #endif
101 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
102 #undef vqdmulh_laneq_s32
103 #define vqdmulh_laneq_s32(a, v, lane) simde_vqdmulh_laneq_s32((a), (v), (lane))
104 #endif
105
106 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
107 #define simde_vqdmulhq_laneq_s16(a, v, lane) vqdmulhq_laneq_s16((a), (v), (lane))
108 #else
109 #define simde_vqdmulhq_laneq_s16(a, v, lane) \
110 simde_vqdmulhq_n_s16((a), simde_vgetq_lane_s16((v), (lane)))
111 #endif
112 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
113 #undef vqdmulhq_laneq_s16
114 #define vqdmulhq_laneq_s16(a, v, lane) simde_vqdmulhq_laneq_s16((a), (v), (lane))
115 #endif
116
117 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
118 #define simde_vqdmulhq_laneq_s32(a, v, lane) vqdmulhq_laneq_s32((a), (v), (lane))
119 #else
120 #define simde_vqdmulhq_laneq_s32(a, v, lane) \
121 simde_vqdmulhq_n_s32((a), simde_vgetq_lane_s32((v), (lane)))
122 #endif
123 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
124 #undef vqdmulhq_laneq_s32
125 #define vqdmulhq_laneq_s32(a, v, lane) simde_vqdmulhq_laneq_s32((a), (v), (lane))
126 #endif
127
128 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
129 #if defined(__clang__) && !SIMDE_DETECT_CLANG_VERSION_CHECK(11,0,0)
130 #define simde_vqdmulhs_lane_s32(a, v, lane) \
131 SIMDE_DISABLE_DIAGNOSTIC_EXPR_(SIMDE_DIAGNOSTIC_DISABLE_VECTOR_CONVERSION_, vqdmulhs_lane_s32((a), (v), (lane)))
132 #else
133 #define simde_vqdmulhs_lane_s32(a, v, lane) vqdmulhs_lane_s32(a, v, lane)
134 #endif
135 #else
136 #define simde_vqdmulhs_lane_s32(a, v, lane) \
137 simde_vqdmulhs_s32((a), simde_vget_lane_s32((v), (lane)))
138 #endif
139 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
140 #undef vqdmulhs_lane_s32
141 #define vqdmulhs_lane_s32(a, v, lane) simde_vqdmulhs_lane_s32((a), (v), (lane))
142 #endif
143
144 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
145 #if defined(__clang__) && !SIMDE_DETECT_CLANG_VERSION_CHECK(11,0,0)
146 #define simde_vqdmulhs_laneq_s32(a, v, lane) \
147 SIMDE_DISABLE_DIAGNOSTIC_EXPR_(SIMDE_DIAGNOSTIC_DISABLE_VECTOR_CONVERSION_, vqdmulhs_laneq_s32((a), (v), (lane)))
148 #else
149 #define simde_vqdmulhs_laneq_s32(a, v, lane) vqdmulhs_laneq_s32(a, v, lane)
150 #endif
151 #else
152 #define simde_vqdmulhs_laneq_s32(a, v, lane) \
153 simde_vqdmulhs_s32((a), simde_vgetq_lane_s32((v), (lane)))
154 #endif
155 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
156 #undef vqdmulhs_laneq_s32
157 #define vqdmulhs_laneq_s32(a, v, lane) simde_vqdmulhs_laneq_s32((a), (v), (lane))
158 #endif
159
160 SIMDE_END_DECLS_
161 HEDLEY_DIAGNOSTIC_POP
162
163 #endif /* !defined(SIMDE_ARM_NEON_QDMULH_LANE_H) */