Debian Codegraph @

third-party/simde/arm/neon/aba.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 * 2020 Evan Nemerson <[email protected]>
25 */
26
27 #if !defined(SIMDE_ARM_NEON_ABA_H)
28 #define SIMDE_ARM_NEON_ABA_H
29
30 #include "abd.h"
31 #include "add.h"
32
33 HEDLEY_DIAGNOSTIC_PUSH
34 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
35 SIMDE_BEGIN_DECLS_
36
37 SIMDE_FUNCTION_ATTRIBUTES
38 simde_int8x8_t
39 simde_vaba_s8(simde_int8x8_t a, simde_int8x8_t b, simde_int8x8_t c) {
40 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
41 return vaba_s8(a, b, c);
42 #else
43 return simde_vadd_s8(simde_vabd_s8(b, c), a);
44 #endif
45 }
46 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
47 #undef vaba_s8
48 #define vaba_s8(a, b, c) simde_vaba_s8((a), (b), (c))
49 #endif
50
51 SIMDE_FUNCTION_ATTRIBUTES
52 simde_int16x4_t
53 simde_vaba_s16(simde_int16x4_t a, simde_int16x4_t b, simde_int16x4_t c) {
54 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
55 return vaba_s16(a, b, c);
56 #else
57 return simde_vadd_s16(simde_vabd_s16(b, c), a);
58 #endif
59 }
60 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
61 #undef vaba_s16
62 #define vaba_s16(a, b, c) simde_vaba_s16((a), (b), (c))
63 #endif
64
65 SIMDE_FUNCTION_ATTRIBUTES
66 simde_int32x2_t
67 simde_vaba_s32(simde_int32x2_t a, simde_int32x2_t b, simde_int32x2_t c) {
68 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
69 return vaba_s32(a, b, c);
70 #else
71 return simde_vadd_s32(simde_vabd_s32(b, c), a);
72 #endif
73 }
74 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
75 #undef vaba_s32
76 #define vaba_s32(a, b, c) simde_vaba_s32((a), (b), (c))
77 #endif
78
79 SIMDE_FUNCTION_ATTRIBUTES
80 simde_uint8x8_t
81 simde_vaba_u8(simde_uint8x8_t a, simde_uint8x8_t b, simde_uint8x8_t c) {
82 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
83 return vaba_u8(a, b, c);
84 #else
85 return simde_vadd_u8(simde_vabd_u8(b, c), a);
86 #endif
87 }
88 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
89 #undef vaba_u8
90 #define vaba_u8(a, b, c) simde_vaba_u8((a), (b), (c))
91 #endif
92
93 SIMDE_FUNCTION_ATTRIBUTES
94 simde_uint16x4_t
95 simde_vaba_u16(simde_uint16x4_t a, simde_uint16x4_t b, simde_uint16x4_t c) {
96 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
97 return vaba_u16(a, b, c);
98 #else
99 return simde_vadd_u16(simde_vabd_u16(b, c), a);
100 #endif
101 }
102 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
103 #undef vaba_u16
104 #define vaba_u16(a, b, c) simde_vaba_u16((a), (b), (c))
105 #endif
106
107 SIMDE_FUNCTION_ATTRIBUTES
108 simde_uint32x2_t
109 simde_vaba_u32(simde_uint32x2_t a, simde_uint32x2_t b, simde_uint32x2_t c) {
110 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
111 return vaba_u32(a, b, c);
112 #else
113 return simde_vadd_u32(simde_vabd_u32(b, c), a);
114 #endif
115 }
116 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
117 #undef vaba_u32
118 #define vaba_u32(a, b, c) simde_vaba_u32((a), (b), (c))
119 #endif
120
121 SIMDE_FUNCTION_ATTRIBUTES
122 simde_int8x16_t
123 simde_vabaq_s8(simde_int8x16_t a, simde_int8x16_t b, simde_int8x16_t c) {
124 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
125 return vabaq_s8(a, b, c);
126 #else
127 return simde_vaddq_s8(simde_vabdq_s8(b, c), a);
128 #endif
129 }
130 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
131 #undef vabaq_s8
132 #define vabaq_s8(a, b, c) simde_vabaq_s8((a), (b), (c))
133 #endif
134
135 SIMDE_FUNCTION_ATTRIBUTES
136 simde_int16x8_t
137 simde_vabaq_s16(simde_int16x8_t a, simde_int16x8_t b, simde_int16x8_t c) {
138 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
139 return vabaq_s16(a, b, c);
140 #else
141 return simde_vaddq_s16(simde_vabdq_s16(b, c), a);
142 #endif
143 }
144 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
145 #undef vabaq_s16
146 #define vabaq_s16(a, b, c) simde_vabaq_s16((a), (b), (c))
147 #endif
148
149 SIMDE_FUNCTION_ATTRIBUTES
150 simde_int32x4_t
151 simde_vabaq_s32(simde_int32x4_t a, simde_int32x4_t b, simde_int32x4_t c) {
152 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
153 return vabaq_s32(a, b, c);
154 #else
155 return simde_vaddq_s32(simde_vabdq_s32(b, c), a);
156 #endif
157 }
158 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
159 #undef vabaq_s32
160 #define vabaq_s32(a, b, c) simde_vabaq_s32((a), (b), (c))
161 #endif
162
163 SIMDE_FUNCTION_ATTRIBUTES
164 simde_uint8x16_t
165 simde_vabaq_u8(simde_uint8x16_t a, simde_uint8x16_t b, simde_uint8x16_t c) {
166 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
167 return vabaq_u8(a, b, c);
168 #else
169 return simde_vaddq_u8(simde_vabdq_u8(b, c), a);
170 #endif
171 }
172 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
173 #undef vabaq_u8
174 #define vabaq_u8(a, b, c) simde_vabaq_u8((a), (b), (c))
175 #endif
176
177 SIMDE_FUNCTION_ATTRIBUTES
178 simde_uint16x8_t
179 simde_vabaq_u16(simde_uint16x8_t a, simde_uint16x8_t b, simde_uint16x8_t c) {
180 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
181 return vabaq_u16(a, b, c);
182 #else
183 return simde_vaddq_u16(simde_vabdq_u16(b, c), a);
184 #endif
185 }
186 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
187 #undef vabaq_u16
188 #define vabaq_u16(a, b, c) simde_vabaq_u16((a), (b), (c))
189 #endif
190
191 SIMDE_FUNCTION_ATTRIBUTES
192 simde_uint32x4_t
193 simde_vabaq_u32(simde_uint32x4_t a, simde_uint32x4_t b, simde_uint32x4_t c) {
194 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
195 return vabaq_u32(a, b, c);
196 #else
197 return simde_vaddq_u32(simde_vabdq_u32(b, c), a);
198 #endif
199 }
200 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
201 #undef vabaq_u32
202 #define vabaq_u32(a, b, c) simde_vabaq_u32((a), (b), (c))
203 #endif
204
205 SIMDE_END_DECLS_
206 HEDLEY_DIAGNOSTIC_POP
207
208 #endif /* !defined(SIMDE_ARM_NEON_ABA_H) */