Debian Codegraph @

third-party/simde/arm/neon/ceq.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_CEQ_H)
28 #define SIMDE_ARM_NEON_CEQ_H
29
30 #include "types.h"
31
32 HEDLEY_DIAGNOSTIC_PUSH
33 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
34 SIMDE_BEGIN_DECLS_
35
36 SIMDE_FUNCTION_ATTRIBUTES
37 uint16_t
38 simde_vceqh_f16(simde_float16_t a, simde_float16_t b) {
39 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE) && defined(SIMDE_ARM_NEON_FP16)
40 return vceqh_f16(a, b);
41 #else
42 return (simde_float16_to_float32(a) == simde_float16_to_float32(b)) ? UINT16_MAX : UINT16_C(0);
43 #endif
44 }
45 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
46 #undef vceqh_f16
47 #define vceqh_f16(a, b) simde_vceqh_f16((a), (b))
48 #endif
49
50 SIMDE_FUNCTION_ATTRIBUTES
51 uint32_t
52 simde_vceqs_f32(simde_float32_t a, simde_float32_t b) {
53 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
54 return vceqs_f32(a, b);
55 #else
56 return (a == b) ? ~UINT32_C(0) : UINT32_C(0);
57 #endif
58 }
59 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
60 #undef vceqs_f32
61 #define vceqs_f32(a, b) simde_vceqs_f32((a), (b))
62 #endif
63
64 SIMDE_FUNCTION_ATTRIBUTES
65 uint64_t
66 simde_vceqd_f64(simde_float64_t a, simde_float64_t b) {
67 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
68 return vceqd_f64(a, b);
69 #else
70 return (a == b) ? ~UINT64_C(0) : UINT64_C(0);
71 #endif
72 }
73 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
74 #undef vceqd_f64
75 #define vceqd_f64(a, b) simde_vceqd_f64((a), (b))
76 #endif
77
78 SIMDE_FUNCTION_ATTRIBUTES
79 uint64_t
80 simde_vceqd_s64(int64_t a, int64_t b) {
81 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
82 return HEDLEY_STATIC_CAST(uint64_t, vceqd_s64(a, b));
83 #else
84 return (a == b) ? ~UINT64_C(0) : UINT64_C(0);
85 #endif
86 }
87 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
88 #undef vceqd_s64
89 #define vceqd_s64(a, b) simde_vceqd_s64((a), (b))
90 #endif
91
92 SIMDE_FUNCTION_ATTRIBUTES
93 uint64_t
94 simde_vceqd_u64(uint64_t a, uint64_t b) {
95 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
96 return vceqd_u64(a, b);
97 #else
98 return (a == b) ? ~UINT64_C(0) : UINT64_C(0);
99 #endif
100 }
101 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
102 #undef vceqd_u64
103 #define vceqd_u64(a, b) simde_vceqd_u64((a), (b))
104 #endif
105
106 SIMDE_FUNCTION_ATTRIBUTES
107 simde_uint16x4_t
108 simde_vceq_f16(simde_float16x4_t a, simde_float16x4_t b) {
109 #if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && defined(SIMDE_ARM_NEON_FP16)
110 return vceq_f16(a, b);
111 #else
112 simde_uint16x4_private r_;
113 simde_float16x4_private
114 a_ = simde_float16x4_to_private(a),
115 b_ = simde_float16x4_to_private(b);
116
117 SIMDE_VECTORIZE
118 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
119 r_.values[i] = simde_vceqh_f16(a_.values[i], b_.values[i]);
120 }
121 return simde_uint16x4_from_private(r_);
122 #endif
123 }
124 #if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
125 #undef vceq_f16
126 #define vceq_f16(a, b) simde_vceq_f16((a), (b))
127 #endif
128
129 SIMDE_FUNCTION_ATTRIBUTES
130 simde_uint32x2_t
131 simde_vceq_f32(simde_float32x2_t a, simde_float32x2_t b) {
132 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
133 return vceq_f32(a, b);
134 #else
135 simde_uint32x2_private r_;
136 simde_float32x2_private
137 a_ = simde_float32x2_to_private(a),
138 b_ = simde_float32x2_to_private(b);
139
140 #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS) && !defined(SIMDE_BUG_GCC_100762)
141 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
142 #else
143 SIMDE_VECTORIZE
144 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
145 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT32_C(0) : UINT32_C(0);
146 }
147 #endif
148
149 return simde_uint32x2_from_private(r_);
150 #endif
151 }
152 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
153 #undef vceq_f32
154 #define vceq_f32(a, b) simde_vceq_f32((a), (b))
155 #endif
156
157 SIMDE_FUNCTION_ATTRIBUTES
158 simde_uint64x1_t
159 simde_vceq_f64(simde_float64x1_t a, simde_float64x1_t b) {
160 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
161 return vceq_f64(a, b);
162 #else
163 simde_uint64x1_private r_;
164 simde_float64x1_private
165 a_ = simde_float64x1_to_private(a),
166 b_ = simde_float64x1_to_private(b);
167
168 #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
169 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
170 #else
171 SIMDE_VECTORIZE
172 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
173 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT64_C(0) : UINT64_C(0);
174 }
175 #endif
176
177 return simde_uint64x1_from_private(r_);
178 #endif
179 }
180 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
181 #undef vceq_f64
182 #define vceq_f64(a, b) simde_vceq_f64((a), (b))
183 #endif
184
185 SIMDE_FUNCTION_ATTRIBUTES
186 simde_uint8x8_t
187 simde_vceq_s8(simde_int8x8_t a, simde_int8x8_t b) {
188 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
189 return vceq_s8(a, b);
190 #else
191 simde_uint8x8_private r_;
192 simde_int8x8_private
193 a_ = simde_int8x8_to_private(a),
194 b_ = simde_int8x8_to_private(b);
195
196 #if defined(SIMDE_X86_MMX_NATIVE)
197 r_.m64 = _mm_cmpeq_pi8(a_.m64, b_.m64);
198 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS) && !defined(SIMDE_BUG_GCC_100762)
199 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
200 #else
201 SIMDE_VECTORIZE
202 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
203 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT8_C(0) : UINT8_C(0);
204 }
205 #endif
206
207 return simde_uint8x8_from_private(r_);
208 #endif
209 }
210 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
211 #undef vceq_s8
212 #define vceq_s8(a, b) simde_vceq_s8((a), (b))
213 #endif
214
215 SIMDE_FUNCTION_ATTRIBUTES
216 simde_uint16x4_t
217 simde_vceq_s16(simde_int16x4_t a, simde_int16x4_t b) {
218 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
219 return vceq_s16(a, b);
220 #else
221 simde_uint16x4_private r_;
222 simde_int16x4_private
223 a_ = simde_int16x4_to_private(a),
224 b_ = simde_int16x4_to_private(b);
225
226 #if defined(SIMDE_X86_MMX_NATIVE)
227 r_.m64 = _mm_cmpeq_pi16(a_.m64, b_.m64);
228 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS) && !defined(SIMDE_BUG_GCC_100762)
229 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
230 #else
231 SIMDE_VECTORIZE
232 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
233 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT16_C(0) : UINT16_C(0);
234 }
235 #endif
236
237 return simde_uint16x4_from_private(r_);
238 #endif
239 }
240 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
241 #undef vceq_s16
242 #define vceq_s16(a, b) simde_vceq_s16((a), (b))
243 #endif
244
245 SIMDE_FUNCTION_ATTRIBUTES
246 simde_uint32x2_t
247 simde_vceq_s32(simde_int32x2_t a, simde_int32x2_t b) {
248 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
249 return vceq_s32(a, b);
250 #else
251 simde_uint32x2_private r_;
252 simde_int32x2_private
253 a_ = simde_int32x2_to_private(a),
254 b_ = simde_int32x2_to_private(b);
255
256 #if defined(SIMDE_X86_MMX_NATIVE)
257 r_.m64 = _mm_cmpeq_pi32(a_.m64, b_.m64);
258 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS) && !defined(SIMDE_BUG_GCC_100762)
259 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
260 #else
261 SIMDE_VECTORIZE
262 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
263 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT32_C(0) : UINT32_C(0);
264 }
265 #endif
266
267 return simde_uint32x2_from_private(r_);
268 #endif
269 }
270 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
271 #undef vceq_s32
272 #define vceq_s32(a, b) simde_vceq_s32((a), (b))
273 #endif
274
275 SIMDE_FUNCTION_ATTRIBUTES
276 simde_uint64x1_t
277 simde_vceq_s64(simde_int64x1_t a, simde_int64x1_t b) {
278 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
279 return vceq_s64(a, b);
280 #else
281 simde_uint64x1_private r_;
282 simde_int64x1_private
283 a_ = simde_int64x1_to_private(a),
284 b_ = simde_int64x1_to_private(b);
285
286 #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
287 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
288 #else
289 SIMDE_VECTORIZE
290 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
291 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT64_C(0) : UINT64_C(0);
292 }
293 #endif
294
295 return simde_uint64x1_from_private(r_);
296 #endif
297 }
298 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
299 #undef vceq_s64
300 #define vceq_s64(a, b) simde_vceq_s64((a), (b))
301 #endif
302
303 SIMDE_FUNCTION_ATTRIBUTES
304 simde_uint8x8_t
305 simde_vceq_u8(simde_uint8x8_t a, simde_uint8x8_t b) {
306 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
307 return vceq_u8(a, b);
308 #else
309 simde_uint8x8_private r_;
310 simde_uint8x8_private
311 a_ = simde_uint8x8_to_private(a),
312 b_ = simde_uint8x8_to_private(b);
313
314 #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS) && !defined(SIMDE_BUG_GCC_100762)
315 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
316 #else
317 SIMDE_VECTORIZE
318 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
319 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT8_C(0) : UINT8_C(0);
320 }
321 #endif
322
323 return simde_uint8x8_from_private(r_);
324 #endif
325 }
326 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
327 #undef vceq_u8
328 #define vceq_u8(a, b) simde_vceq_u8((a), (b))
329 #endif
330
331 SIMDE_FUNCTION_ATTRIBUTES
332 simde_uint16x4_t
333 simde_vceq_u16(simde_uint16x4_t a, simde_uint16x4_t b) {
334 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
335 return vceq_u16(a, b);
336 #else
337 simde_uint16x4_private r_;
338 simde_uint16x4_private
339 a_ = simde_uint16x4_to_private(a),
340 b_ = simde_uint16x4_to_private(b);
341
342 #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS) && !defined(SIMDE_BUG_GCC_100762)
343 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
344 #else
345 SIMDE_VECTORIZE
346 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
347 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT16_C(0) : UINT16_C(0);
348 }
349 #endif
350
351 return simde_uint16x4_from_private(r_);
352 #endif
353 }
354 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
355 #undef vceq_u16
356 #define vceq_u16(a, b) simde_vceq_u16((a), (b))
357 #endif
358
359 SIMDE_FUNCTION_ATTRIBUTES
360 simde_uint32x2_t
361 simde_vceq_u32(simde_uint32x2_t a, simde_uint32x2_t b) {
362 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
363 return vceq_u32(a, b);
364 #else
365 simde_uint32x2_private r_;
366 simde_uint32x2_private
367 a_ = simde_uint32x2_to_private(a),
368 b_ = simde_uint32x2_to_private(b);
369
370 #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS) && !defined(SIMDE_BUG_GCC_100762)
371 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
372 #else
373 SIMDE_VECTORIZE
374 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
375 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT32_C(0) : UINT32_C(0);
376 }
377 #endif
378
379 return simde_uint32x2_from_private(r_);
380 #endif
381 }
382 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
383 #undef vceq_u32
384 #define vceq_u32(a, b) simde_vceq_u32((a), (b))
385 #endif
386
387 SIMDE_FUNCTION_ATTRIBUTES
388 simde_uint64x1_t
389 simde_vceq_u64(simde_uint64x1_t a, simde_uint64x1_t b) {
390 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
391 return vceq_u64(a, b);
392 #else
393 simde_uint64x1_private r_;
394 simde_uint64x1_private
395 a_ = simde_uint64x1_to_private(a),
396 b_ = simde_uint64x1_to_private(b);
397
398 #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
399 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
400 #else
401 SIMDE_VECTORIZE
402 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
403 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT64_C(0) : UINT64_C(0);
404 }
405 #endif
406
407 return simde_uint64x1_from_private(r_);
408 #endif
409 }
410 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
411 #undef vceq_u64
412 #define vceq_u64(a, b) simde_vceq_u64((a), (b))
413 #endif
414
415 SIMDE_FUNCTION_ATTRIBUTES
416 simde_uint16x8_t
417 simde_vceqq_f16(simde_float16x8_t a, simde_float16x8_t b) {
418 #if defined(SIMDE_ARM_NEON_A32V8_NATIVE) && defined(SIMDE_ARM_NEON_FP16)
419 return vceqq_f16(a, b);
420 #else
421 simde_uint16x8_private r_;
422 simde_float16x8_private
423 a_ = simde_float16x8_to_private(a),
424 b_ = simde_float16x8_to_private(b);
425
426 SIMDE_VECTORIZE
427 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
428 r_.values[i] = simde_vceqh_f16(a_.values[i], b_.values[i]);
429 }
430
431 return simde_uint16x8_from_private(r_);
432 #endif
433 }
434 #if defined(SIMDE_ARM_NEON_A32V8_ENABLE_NATIVE_ALIASES)
435 #undef vceqq_f16
436 #define vceqq_f16(a, b) simde_vceqq_f16((a), (b))
437 #endif
438
439 SIMDE_FUNCTION_ATTRIBUTES
440 simde_uint32x4_t
441 simde_vceqq_f32(simde_float32x4_t a, simde_float32x4_t b) {
442 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
443 return vceqq_f32(a, b);
444 #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
445 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned int), vec_cmpeq(a, b));
446 #else
447 simde_uint32x4_private r_;
448 simde_float32x4_private
449 a_ = simde_float32x4_to_private(a),
450 b_ = simde_float32x4_to_private(b);
451
452 #if defined(SIMDE_X86_SSE2_NATIVE)
453 r_.m128i = _mm_castps_si128(_mm_cmpeq_ps(a_.m128, b_.m128));
454 #elif defined(SIMDE_WASM_SIMD128_NATIVE)
455 r_.v128 = wasm_f32x4_eq(a_.v128, b_.v128);
456 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
457 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
458 #else
459 SIMDE_VECTORIZE
460 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
461 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT32_C(0) : UINT32_C(0);
462 }
463 #endif
464
465 return simde_uint32x4_from_private(r_);
466 #endif
467 }
468 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
469 #undef vceqq_f32
470 #define vceqq_f32(a, b) simde_vceqq_f32((a), (b))
471 #endif
472
473 SIMDE_FUNCTION_ATTRIBUTES
474 simde_uint64x2_t
475 simde_vceqq_f64(simde_float64x2_t a, simde_float64x2_t b) {
476 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
477 return vceqq_f64(a, b);
478 #elif defined(SIMDE_POWER_ALTIVEC_P7_NATIVE)
479 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned long long), vec_cmpeq(a, b));
480 #else
481 simde_uint64x2_private r_;
482 simde_float64x2_private
483 a_ = simde_float64x2_to_private(a),
484 b_ = simde_float64x2_to_private(b);
485
486 #if defined(SIMDE_X86_SSE2_NATIVE)
487 r_.m128i = _mm_castpd_si128(_mm_cmpeq_pd(a_.m128d, b_.m128d));
488 #elif defined(SIMDE_WASM_SIMD128_NATIVE)
489 r_.v128 = wasm_f64x2_eq(a_.v128, b_.v128);
490 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
491 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
492 #else
493 SIMDE_VECTORIZE
494 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
495 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT64_C(0) : UINT64_C(0);
496 }
497 #endif
498
499 return simde_uint64x2_from_private(r_);
500 #endif
501 }
502 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
503 #undef vceqq_f64
504 #define vceqq_f64(a, b) simde_vceqq_f64((a), (b))
505 #endif
506
507 SIMDE_FUNCTION_ATTRIBUTES
508 simde_uint8x16_t
509 simde_vceqq_s8(simde_int8x16_t a, simde_int8x16_t b) {
510 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
511 return vceqq_s8(a, b);
512 #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
513 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned char), vec_cmpeq(a, b));
514 #else
515 simde_uint8x16_private r_;
516 simde_int8x16_private
517 a_ = simde_int8x16_to_private(a),
518 b_ = simde_int8x16_to_private(b);
519
520 #if defined(SIMDE_X86_SSE2_NATIVE)
521 r_.m128i = _mm_cmpeq_epi8(a_.m128i, b_.m128i);
522 #elif defined(SIMDE_WASM_SIMD128_NATIVE)
523 r_.v128 = wasm_i8x16_eq(a_.v128, b_.v128);
524 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
525 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
526 #else
527 SIMDE_VECTORIZE
528 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
529 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT8_C(0) : UINT8_C(0);
530 }
531 #endif
532
533 return simde_uint8x16_from_private(r_);
534 #endif
535 }
536 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
537 #undef vceqq_s8
538 #define vceqq_s8(a, b) simde_vceqq_s8((a), (b))
539 #endif
540
541 SIMDE_FUNCTION_ATTRIBUTES
542 simde_uint16x8_t
543 simde_vceqq_s16(simde_int16x8_t a, simde_int16x8_t b) {
544 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
545 return vceqq_s16(a, b);
546 #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
547 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned short), vec_cmpeq(a, b));
548 #else
549 simde_uint16x8_private r_;
550 simde_int16x8_private
551 a_ = simde_int16x8_to_private(a),
552 b_ = simde_int16x8_to_private(b);
553
554 #if defined(SIMDE_X86_SSE2_NATIVE)
555 r_.m128i = _mm_cmpeq_epi16(a_.m128i, b_.m128i);
556 #elif defined(SIMDE_WASM_SIMD128_NATIVE)
557 r_.v128 = wasm_i16x8_eq(a_.v128, b_.v128);
558 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
559 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
560 #else
561 SIMDE_VECTORIZE
562 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
563 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT16_C(0) : UINT16_C(0);
564 }
565 #endif
566
567 return simde_uint16x8_from_private(r_);
568 #endif
569 }
570 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
571 #undef vceqq_s16
572 #define vceqq_s16(a, b) simde_vceqq_s16((a), (b))
573 #endif
574
575 SIMDE_FUNCTION_ATTRIBUTES
576 simde_uint32x4_t
577 simde_vceqq_s32(simde_int32x4_t a, simde_int32x4_t b) {
578 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
579 return vceqq_s32(a, b);
580 #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
581 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned int), vec_cmpeq(a, b));
582 #else
583 simde_uint32x4_private r_;
584 simde_int32x4_private
585 a_ = simde_int32x4_to_private(a),
586 b_ = simde_int32x4_to_private(b);
587
588 #if defined(SIMDE_X86_SSE2_NATIVE)
589 r_.m128i = _mm_cmpeq_epi32(a_.m128i, b_.m128i);
590 #elif defined(SIMDE_WASM_SIMD128_NATIVE)
591 r_.v128 = wasm_i32x4_eq(a_.v128, b_.v128);
592 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
593 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
594 #else
595 SIMDE_VECTORIZE
596 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
597 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT32_C(0) : UINT32_C(0);
598 }
599 #endif
600
601 return simde_uint32x4_from_private(r_);
602 #endif
603 }
604 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
605 #undef vceqq_s32
606 #define vceqq_s32(a, b) simde_vceqq_s32((a), (b))
607 #endif
608
609 SIMDE_FUNCTION_ATTRIBUTES
610 simde_uint64x2_t
611 simde_vceqq_s64(simde_int64x2_t a, simde_int64x2_t b) {
612 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
613 return vceqq_s64(a, b);
614 #elif defined(SIMDE_POWER_ALTIVEC_P8_NATIVE)
615 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned long long), vec_cmpeq(a, b));
616 #else
617 simde_uint64x2_private r_;
618 simde_int64x2_private
619 a_ = simde_int64x2_to_private(a),
620 b_ = simde_int64x2_to_private(b);
621
622 #if defined(SIMDE_X86_SSE4_1_NATIVE)
623 r_.m128i = _mm_cmpeq_epi64(a_.m128i, b_.m128i);
624 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
625 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
626 #else
627 SIMDE_VECTORIZE
628 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
629 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT64_C(0) : UINT64_C(0);
630 }
631 #endif
632
633 return simde_uint64x2_from_private(r_);
634 #endif
635 }
636 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
637 #undef vceqq_s64
638 #define vceqq_s64(a, b) simde_vceqq_s64((a), (b))
639 #endif
640
641 SIMDE_FUNCTION_ATTRIBUTES
642 simde_uint8x16_t
643 simde_vceqq_u8(simde_uint8x16_t a, simde_uint8x16_t b) {
644 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
645 return vceqq_u8(a, b);
646 #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
647 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned char), vec_cmpeq(a, b));
648 #else
649 simde_uint8x16_private r_;
650 simde_uint8x16_private
651 a_ = simde_uint8x16_to_private(a),
652 b_ = simde_uint8x16_to_private(b);
653
654 #if defined(SIMDE_X86_SSE2_NATIVE)
655 r_.m128i = _mm_cmpeq_epi8(a_.m128i, b_.m128i);
656 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
657 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
658 #else
659 SIMDE_VECTORIZE
660 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
661 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT8_C(0) : UINT8_C(0);
662 }
663 #endif
664
665 return simde_uint8x16_from_private(r_);
666 #endif
667 }
668 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
669 #undef vceqq_u8
670 #define vceqq_u8(a, b) simde_vceqq_u8((a), (b))
671 #endif
672
673 SIMDE_FUNCTION_ATTRIBUTES
674 simde_uint16x8_t
675 simde_vceqq_u16(simde_uint16x8_t a, simde_uint16x8_t b) {
676 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
677 return vceqq_u16(a, b);
678 #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
679 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned short), vec_cmpeq(a, b));
680 #else
681 simde_uint16x8_private r_;
682 simde_uint16x8_private
683 a_ = simde_uint16x8_to_private(a),
684 b_ = simde_uint16x8_to_private(b);
685
686 #if defined(SIMDE_X86_SSE2_NATIVE)
687 r_.m128i = _mm_cmpeq_epi16(a_.m128i, b_.m128i);
688 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
689 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
690 #else
691 SIMDE_VECTORIZE
692 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
693 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT16_C(0) : UINT16_C(0);
694 }
695 #endif
696
697 return simde_uint16x8_from_private(r_);
698 #endif
699 }
700 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
701 #undef vceqq_u16
702 #define vceqq_u16(a, b) simde_vceqq_u16((a), (b))
703 #endif
704
705 SIMDE_FUNCTION_ATTRIBUTES
706 simde_uint32x4_t
707 simde_vceqq_u32(simde_uint32x4_t a, simde_uint32x4_t b) {
708 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
709 return vceqq_u32(a, b);
710 #elif defined(SIMDE_POWER_ALTIVEC_P6_NATIVE)
711 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned int), vec_cmpeq(a, b));
712 #else
713 simde_uint32x4_private r_;
714 simde_uint32x4_private
715 a_ = simde_uint32x4_to_private(a),
716 b_ = simde_uint32x4_to_private(b);
717
718 #if defined(SIMDE_X86_SSE2_NATIVE)
719 r_.m128i = _mm_cmpeq_epi32(a_.m128i, b_.m128i);
720 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
721 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
722 #else
723 SIMDE_VECTORIZE
724 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
725 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT32_C(0) : UINT32_C(0);
726 }
727 #endif
728
729 return simde_uint32x4_from_private(r_);
730 #endif
731 }
732 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
733 #undef vceqq_u32
734 #define vceqq_u32(a, b) simde_vceqq_u32((a), (b))
735 #endif
736
737 SIMDE_FUNCTION_ATTRIBUTES
738 simde_uint64x2_t
739 simde_vceqq_u64(simde_uint64x2_t a, simde_uint64x2_t b) {
740 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
741 return vceqq_u64(a, b);
742 #elif defined(SIMDE_POWER_ALTIVEC_P8_NATIVE)
743 return HEDLEY_REINTERPRET_CAST(SIMDE_POWER_ALTIVEC_VECTOR(unsigned long long), vec_cmpeq(a, b));
744 #else
745 simde_uint64x2_private r_;
746 simde_uint64x2_private
747 a_ = simde_uint64x2_to_private(a),
748 b_ = simde_uint64x2_to_private(b);
749
750 #if defined(SIMDE_X86_SSE4_1_NATIVE)
751 r_.m128i = _mm_cmpeq_epi64(a_.m128i, b_.m128i);
752 #elif defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
753 r_.values = HEDLEY_REINTERPRET_CAST(__typeof__(r_.values), a_.values == b_.values);
754 #else
755 SIMDE_VECTORIZE
756 for (size_t i = 0 ; i < (sizeof(r_.values) / sizeof(r_.values[0])) ; i++) {
757 r_.values[i] = (a_.values[i] == b_.values[i]) ? ~UINT64_C(0) : UINT64_C(0);
758 }
759 #endif
760
761 return simde_uint64x2_from_private(r_);
762 #endif
763 }
764 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
765 #undef vceqq_u64
766 #define vceqq_u64(a, b) simde_vceqq_u64((a), (b))
767 #endif
768
769 SIMDE_END_DECLS_
770 HEDLEY_DIAGNOSTIC_POP
771
772 #endif /* !defined(SIMDE_ARM_NEON_CEQ_H) */