Debian Codegraph @

third-party/simde/arm/neon/ceqz.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 * 2020 Sean Maher <[email protected]> (Copyright owned by Google, LLC)
26 */
27
28 #if !defined(SIMDE_ARM_NEON_CEQZ_H)
29 #define SIMDE_ARM_NEON_CEQZ_H
30
31 #include "ceq.h"
32 #include "dup_n.h"
33 #include "types.h"
34 #include "reinterpret.h"
35
36 HEDLEY_DIAGNOSTIC_PUSH
37 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
38 SIMDE_BEGIN_DECLS_
39
40 SIMDE_FUNCTION_ATTRIBUTES
41 simde_uint16x4_t
42 simde_vceqz_f16(simde_float16x4_t a) {
43 #if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && defined(SIMDE_ARM_NEON_FP16)
44 return vceqz_f16(a);
45 #else
46 return simde_vceq_f16(a, simde_vdup_n_f16(SIMDE_FLOAT16_VALUE(0.0)));
47 #endif
48 }
49 #if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
50 #undef vceqz_f16
51 #define vceqz_f16(a) simde_vceqz_f16((a))
52 #endif
53
54 SIMDE_FUNCTION_ATTRIBUTES
55 simde_uint32x2_t
56 simde_vceqz_f32(simde_float32x2_t a) {
57 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
58 return vceqz_f32(a);
59 #else
60 return simde_vceq_f32(a, simde_vdup_n_f32(0.0f));
61 #endif
62 }
63 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
64 #undef vceqz_f32
65 #define vceqz_f32(a) simde_vceqz_f32((a))
66 #endif
67
68 SIMDE_FUNCTION_ATTRIBUTES
69 simde_uint64x1_t
70 simde_vceqz_f64(simde_float64x1_t a) {
71 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
72 return vceqz_f64(a);
73 #else
74 return simde_vceq_f64(a, simde_vdup_n_f64(0.0));
75 #endif
76 }
77 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
78 #undef vceqz_f64
79 #define vceqz_f64(a) simde_vceqz_f64((a))
80 #endif
81
82 SIMDE_FUNCTION_ATTRIBUTES
83 simde_uint8x8_t
84 simde_vceqz_s8(simde_int8x8_t a) {
85 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
86 return vceqz_s8(a);
87 #else
88 return simde_vceq_s8(a, simde_vdup_n_s8(0));
89 #endif
90 }
91 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
92 #undef vceqz_s8
93 #define vceqz_s8(a) simde_vceqz_s8((a))
94 #endif
95
96 SIMDE_FUNCTION_ATTRIBUTES
97 simde_uint16x4_t
98 simde_vceqz_s16(simde_int16x4_t a) {
99 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
100 return vceqz_s16(a);
101 #else
102 return simde_vceq_s16(a, simde_vdup_n_s16(0));
103 #endif
104 }
105 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
106 #undef vceqz_s16
107 #define vceqz_s16(a) simde_vceqz_s16((a))
108 #endif
109
110 SIMDE_FUNCTION_ATTRIBUTES
111 simde_uint32x2_t
112 simde_vceqz_s32(simde_int32x2_t a) {
113 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
114 return vceqz_s32(a);
115 #else
116 return simde_vceq_s32(a, simde_vdup_n_s32(0));
117 #endif
118 }
119 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
120 #undef vceqz_s32
121 #define vceqz_s32(a) simde_vceqz_s32((a))
122 #endif
123
124 SIMDE_FUNCTION_ATTRIBUTES
125 simde_uint64x1_t
126 simde_vceqz_s64(simde_int64x1_t a) {
127 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
128 return vceqz_s64(a);
129 #else
130 return simde_vceq_s64(a, simde_vdup_n_s64(0));
131 #endif
132 }
133 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
134 #undef vceqz_s64
135 #define vceqz_s64(a) simde_vceqz_s64((a))
136 #endif
137
138 SIMDE_FUNCTION_ATTRIBUTES
139 simde_uint8x8_t
140 simde_vceqz_u8(simde_uint8x8_t a) {
141 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
142 return vceqz_u8(a);
143 #else
144 return simde_vceq_u8(a, simde_vdup_n_u8(0));
145 #endif
146 }
147 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
148 #undef vceqz_u8
149 #define vceqz_u8(a) simde_vceqz_u8((a))
150 #endif
151
152 SIMDE_FUNCTION_ATTRIBUTES
153 simde_uint16x4_t
154 simde_vceqz_u16(simde_uint16x4_t a) {
155 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
156 return vceqz_u16(a);
157 #else
158 return simde_vceq_u16(a, simde_vdup_n_u16(0));
159 #endif
160 }
161 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
162 #undef vceqz_u16
163 #define vceqz_u16(a) simde_vceqz_u16((a))
164 #endif
165
166 SIMDE_FUNCTION_ATTRIBUTES
167 simde_uint32x2_t
168 simde_vceqz_u32(simde_uint32x2_t a) {
169 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
170 return vceqz_u32(a);
171 #else
172 return simde_vceq_u32(a, simde_vdup_n_u32(0));
173 #endif
174 }
175 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
176 #undef vceqz_u32
177 #define vceqz_u32(a) simde_vceqz_u32((a))
178 #endif
179
180 SIMDE_FUNCTION_ATTRIBUTES
181 simde_uint64x1_t
182 simde_vceqz_u64(simde_uint64x1_t a) {
183 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
184 return vceqz_u64(a);
185 #else
186 return simde_vceq_u64(a, simde_vdup_n_u64(0));
187 #endif
188 }
189 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
190 #undef vceqz_u64
191 #define vceqz_u64(a) simde_vceqz_u64((a))
192 #endif
193
194 SIMDE_FUNCTION_ATTRIBUTES
195 simde_uint16x8_t
196 simde_vceqzq_f16(simde_float16x8_t a) {
197 #if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && defined(SIMDE_ARM_NEON_FP16)
198 return vceqzq_f16(a);
199 #else
200 return simde_vceqq_f16(a, simde_vdupq_n_f16(SIMDE_FLOAT16_VALUE(0.0)));
201 #endif
202 }
203 #if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
204 #undef vceqzq_f16
205 #define vceqzq_f16(a) simde_vceqzq_f16((a))
206 #endif
207
208 SIMDE_FUNCTION_ATTRIBUTES
209 simde_uint32x4_t
210 simde_vceqzq_f32(simde_float32x4_t a) {
211 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
212 return vceqzq_f32(a);
213 #else
214 return simde_vceqq_f32(a, simde_vdupq_n_f32(0));
215 #endif
216 }
217 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
218 #undef vceqzq_f32
219 #define vceqzq_f32(a) simde_vceqzq_f32((a))
220 #endif
221
222 SIMDE_FUNCTION_ATTRIBUTES
223 simde_uint64x2_t
224 simde_vceqzq_f64(simde_float64x2_t a) {
225 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
226 return vceqzq_f64(a);
227 #else
228 return simde_vceqq_f64(a, simde_vdupq_n_f64(0));
229 #endif
230 }
231 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
232 #undef vceqzq_f64
233 #define vceqzq_f64(a) simde_vceqzq_f64((a))
234 #endif
235
236 SIMDE_FUNCTION_ATTRIBUTES
237 simde_uint8x16_t
238 simde_vceqzq_s8(simde_int8x16_t a) {
239 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
240 return vceqzq_s8(a);
241 #else
242 return simde_vceqq_s8(a, simde_vdupq_n_s8(0));
243 #endif
244 }
245 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
246 #undef vceqzq_s8
247 #define vceqzq_s8(a) simde_vceqzq_s8((a))
248 #endif
249
250 SIMDE_FUNCTION_ATTRIBUTES
251 simde_uint16x8_t
252 simde_vceqzq_s16(simde_int16x8_t a) {
253 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
254 return vceqzq_s16(a);
255 #else
256 return simde_vceqq_s16(a, simde_vdupq_n_s16(0));
257 #endif
258 }
259 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
260 #undef vceqzq_s16
261 #define vceqzq_s16(a) simde_vceqzq_s16((a))
262 #endif
263
264 SIMDE_FUNCTION_ATTRIBUTES
265 simde_uint32x4_t
266 simde_vceqzq_s32(simde_int32x4_t a) {
267 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
268 return vceqzq_s32(a);
269 #else
270 return simde_vceqq_s32(a, simde_vdupq_n_s32(0));
271 #endif
272 }
273 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
274 #undef vceqzq_s32
275 #define vceqzq_s32(a) simde_vceqzq_s32((a))
276 #endif
277
278 SIMDE_FUNCTION_ATTRIBUTES
279 simde_uint64x2_t
280 simde_vceqzq_s64(simde_int64x2_t a) {
281 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
282 return vceqzq_s64(a);
283 #else
284 return simde_vceqq_s64(a, simde_vdupq_n_s64(0));
285 #endif
286 }
287 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
288 #undef vceqzq_s64
289 #define vceqzq_s64(a) simde_vceqzq_s64((a))
290 #endif
291
292 SIMDE_FUNCTION_ATTRIBUTES
293 simde_uint8x16_t
294 simde_vceqzq_u8(simde_uint8x16_t a) {
295 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
296 return vceqzq_u8(a);
297 #else
298 return simde_vceqq_u8(a, simde_vdupq_n_u8(0));
299 #endif
300 }
301 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
302 #undef vceqzq_u8
303 #define vceqzq_u8(a) simde_vceqzq_u8((a))
304 #endif
305
306 SIMDE_FUNCTION_ATTRIBUTES
307 simde_uint16x8_t
308 simde_vceqzq_u16(simde_uint16x8_t a) {
309 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
310 return vceqzq_u16(a);
311 #else
312 return simde_vceqq_u16(a, simde_vdupq_n_u16(0));
313 #endif
314 }
315 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
316 #undef vceqzq_u16
317 #define vceqzq_u16(a) simde_vceqzq_u16((a))
318 #endif
319
320 SIMDE_FUNCTION_ATTRIBUTES
321 simde_uint32x4_t
322 simde_vceqzq_u32(simde_uint32x4_t a) {
323 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
324 return vceqzq_u32(a);
325 #else
326 return simde_vceqq_u32(a, simde_vdupq_n_u32(0));
327 #endif
328 }
329 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
330 #undef vceqzq_u32
331 #define vceqzq_u32(a) simde_vceqzq_u32((a))
332 #endif
333
334 SIMDE_FUNCTION_ATTRIBUTES
335 simde_uint64x2_t
336 simde_vceqzq_u64(simde_uint64x2_t a) {
337 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
338 return vceqzq_u64(a);
339 #else
340 return simde_vceqq_u64(a, simde_vdupq_n_u64(0));
341 #endif
342 }
343 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
344 #undef vceqzq_u64
345 #define vceqzq_u64(a) simde_vceqzq_u64((a))
346 #endif
347
348 SIMDE_FUNCTION_ATTRIBUTES
349 uint64_t
350 simde_vceqzd_s64(int64_t a) {
351 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
352 return HEDLEY_STATIC_CAST(uint64_t, vceqzd_s64(a));
353 #else
354 return simde_vceqd_s64(a, INT64_C(0));
355 #endif
356 }
357 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
358 #undef vceqzd_s64
359 #define vceqzd_s64(a) simde_vceqzd_s64((a))
360 #endif
361
362 SIMDE_FUNCTION_ATTRIBUTES
363 uint64_t
364 simde_vceqzd_u64(uint64_t a) {
365 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
366 return vceqzd_u64(a);
367 #else
368 return simde_vceqd_u64(a, UINT64_C(0));
369 #endif
370 }
371 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
372 #undef vceqzd_u64
373 #define vceqzd_u64(a) simde_vceqzd_u64((a))
374 #endif
375
376 SIMDE_FUNCTION_ATTRIBUTES
377 uint16_t
378 simde_vceqzh_f16(simde_float16 a) {
379 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE) && defined(SIMDE_ARM_NEON_FP16)
380 return vceqzh_f16(a);
381 #else
382 return simde_vceqh_f16(a, SIMDE_FLOAT16_VALUE(0.0));
383 #endif
384 }
385 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
386 #undef vceqzh_f16
387 #define vceqzh_f16(a) simde_vceqzh_f16((a))
388 #endif
389
390 SIMDE_FUNCTION_ATTRIBUTES
391 uint32_t
392 simde_vceqzs_f32(simde_float32_t a) {
393 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
394 return vceqzs_f32(a);
395 #else
396 return simde_vceqs_f32(a, SIMDE_FLOAT32_C(0.0));
397 #endif
398 }
399 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
400 #undef vceqzs_f32
401 #define vceqzs_f32(a) simde_vceqzs_f32((a))
402 #endif
403
404 SIMDE_FUNCTION_ATTRIBUTES
405 uint64_t
406 simde_vceqzd_f64(simde_float64_t a) {
407 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
408 return vceqzd_f64(a);
409 #else
410 return simde_vceqd_f64(a, SIMDE_FLOAT64_C(0.0));
411 #endif
412 }
413 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
414 #undef vceqzd_f64
415 #define vceqzd_f64(a) simde_vceqzd_f64((a))
416 #endif
417
418 SIMDE_END_DECLS_
419 HEDLEY_DIAGNOSTIC_POP
420
421 #endif /* !defined(SIMDE_ARM_NEON_CEQZ_H) */