minimap2 0.2.24.3 → 0.2.24.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/ext/minimap2/lib/simde/CONTRIBUTING.md +114 -0
  3. data/ext/minimap2/lib/simde/COPYING +20 -0
  4. data/ext/minimap2/lib/simde/README.md +333 -0
  5. data/ext/minimap2/lib/simde/amalgamate.py +58 -0
  6. data/ext/minimap2/lib/simde/meson.build +33 -0
  7. data/ext/minimap2/lib/simde/netlify.toml +20 -0
  8. data/ext/minimap2/lib/simde/simde/arm/neon/float32x2.h +140 -0
  9. data/ext/minimap2/lib/simde/simde/arm/neon/float32x4.h +137 -0
  10. data/ext/minimap2/lib/simde/simde/arm/neon/float64x1.h +142 -0
  11. data/ext/minimap2/lib/simde/simde/arm/neon/float64x2.h +145 -0
  12. data/ext/minimap2/lib/simde/simde/arm/neon/int16x4.h +140 -0
  13. data/ext/minimap2/lib/simde/simde/arm/neon/int16x8.h +145 -0
  14. data/ext/minimap2/lib/simde/simde/arm/neon/int32x2.h +140 -0
  15. data/ext/minimap2/lib/simde/simde/arm/neon/int32x4.h +143 -0
  16. data/ext/minimap2/lib/simde/simde/arm/neon/int64x1.h +137 -0
  17. data/ext/minimap2/lib/simde/simde/arm/neon/int64x2.h +141 -0
  18. data/ext/minimap2/lib/simde/simde/arm/neon/int8x16.h +147 -0
  19. data/ext/minimap2/lib/simde/simde/arm/neon/int8x8.h +141 -0
  20. data/ext/minimap2/lib/simde/simde/arm/neon/uint16x4.h +134 -0
  21. data/ext/minimap2/lib/simde/simde/arm/neon/uint16x8.h +138 -0
  22. data/ext/minimap2/lib/simde/simde/arm/neon/uint32x2.h +134 -0
  23. data/ext/minimap2/lib/simde/simde/arm/neon/uint32x4.h +137 -0
  24. data/ext/minimap2/lib/simde/simde/arm/neon/uint64x1.h +131 -0
  25. data/ext/minimap2/lib/simde/simde/arm/neon/uint64x2.h +135 -0
  26. data/ext/minimap2/lib/simde/simde/arm/neon/uint8x16.h +141 -0
  27. data/ext/minimap2/lib/simde/simde/arm/neon/uint8x8.h +135 -0
  28. data/ext/minimap2/lib/simde/simde/arm/neon.h +97 -0
  29. data/ext/minimap2/lib/simde/simde/check.h +267 -0
  30. data/ext/minimap2/lib/simde/simde/debug-trap.h +83 -0
  31. data/ext/minimap2/lib/simde/simde/hedley.h +1899 -0
  32. data/ext/minimap2/lib/simde/simde/simde-arch.h +445 -0
  33. data/ext/minimap2/lib/simde/simde/simde-common.h +697 -0
  34. data/ext/minimap2/lib/simde/simde/x86/avx.h +5385 -0
  35. data/ext/minimap2/lib/simde/simde/x86/avx2.h +2402 -0
  36. data/ext/minimap2/lib/simde/simde/x86/avx512bw.h +391 -0
  37. data/ext/minimap2/lib/simde/simde/x86/avx512f.h +3389 -0
  38. data/ext/minimap2/lib/simde/simde/x86/avx512vl.h +112 -0
  39. data/ext/minimap2/lib/simde/simde/x86/fma.h +659 -0
  40. data/ext/minimap2/lib/simde/simde/x86/mmx.h +2210 -0
  41. data/ext/minimap2/lib/simde/simde/x86/sse.h +3696 -0
  42. data/ext/minimap2/lib/simde/simde/x86/sse2.h +5991 -0
  43. data/ext/minimap2/lib/simde/simde/x86/sse3.h +343 -0
  44. data/ext/minimap2/lib/simde/simde/x86/sse4.1.h +1783 -0
  45. data/ext/minimap2/lib/simde/simde/x86/sse4.2.h +105 -0
  46. data/ext/minimap2/lib/simde/simde/x86/ssse3.h +1053 -0
  47. data/ext/minimap2/lib/simde/simde/x86/svml.h +543 -0
  48. data/ext/minimap2/lib/simde/test/CMakeLists.txt +166 -0
  49. data/ext/minimap2/lib/simde/test/arm/meson.build +4 -0
  50. data/ext/minimap2/lib/simde/test/arm/neon/meson.build +23 -0
  51. data/ext/minimap2/lib/simde/test/arm/neon/skel.c +871 -0
  52. data/ext/minimap2/lib/simde/test/arm/neon/test-neon-internal.h +134 -0
  53. data/ext/minimap2/lib/simde/test/arm/neon/test-neon.c +39 -0
  54. data/ext/minimap2/lib/simde/test/arm/neon/test-neon.h +10 -0
  55. data/ext/minimap2/lib/simde/test/arm/neon/vadd.c +1260 -0
  56. data/ext/minimap2/lib/simde/test/arm/neon/vdup_n.c +873 -0
  57. data/ext/minimap2/lib/simde/test/arm/neon/vmul.c +1084 -0
  58. data/ext/minimap2/lib/simde/test/arm/neon/vsub.c +1260 -0
  59. data/ext/minimap2/lib/simde/test/arm/test-arm-internal.h +18 -0
  60. data/ext/minimap2/lib/simde/test/arm/test-arm.c +20 -0
  61. data/ext/minimap2/lib/simde/test/arm/test-arm.h +8 -0
  62. data/ext/minimap2/lib/simde/test/cmake/AddCompilerFlags.cmake +171 -0
  63. data/ext/minimap2/lib/simde/test/cmake/ExtraWarningFlags.cmake +68 -0
  64. data/ext/minimap2/lib/simde/test/meson.build +64 -0
  65. data/ext/minimap2/lib/simde/test/munit/COPYING +21 -0
  66. data/ext/minimap2/lib/simde/test/munit/Makefile +55 -0
  67. data/ext/minimap2/lib/simde/test/munit/README.md +54 -0
  68. data/ext/minimap2/lib/simde/test/munit/example.c +351 -0
  69. data/ext/minimap2/lib/simde/test/munit/meson.build +37 -0
  70. data/ext/minimap2/lib/simde/test/munit/munit.c +2055 -0
  71. data/ext/minimap2/lib/simde/test/munit/munit.h +535 -0
  72. data/ext/minimap2/lib/simde/test/run-tests.c +20 -0
  73. data/ext/minimap2/lib/simde/test/run-tests.h +260 -0
  74. data/ext/minimap2/lib/simde/test/x86/avx.c +13752 -0
  75. data/ext/minimap2/lib/simde/test/x86/avx2.c +9977 -0
  76. data/ext/minimap2/lib/simde/test/x86/avx512bw.c +2664 -0
  77. data/ext/minimap2/lib/simde/test/x86/avx512f.c +10416 -0
  78. data/ext/minimap2/lib/simde/test/x86/avx512vl.c +210 -0
  79. data/ext/minimap2/lib/simde/test/x86/fma.c +2557 -0
  80. data/ext/minimap2/lib/simde/test/x86/meson.build +33 -0
  81. data/ext/minimap2/lib/simde/test/x86/mmx.c +2878 -0
  82. data/ext/minimap2/lib/simde/test/x86/skel.c +2984 -0
  83. data/ext/minimap2/lib/simde/test/x86/sse.c +5121 -0
  84. data/ext/minimap2/lib/simde/test/x86/sse2.c +9860 -0
  85. data/ext/minimap2/lib/simde/test/x86/sse3.c +486 -0
  86. data/ext/minimap2/lib/simde/test/x86/sse4.1.c +3446 -0
  87. data/ext/minimap2/lib/simde/test/x86/sse4.2.c +101 -0
  88. data/ext/minimap2/lib/simde/test/x86/ssse3.c +2084 -0
  89. data/ext/minimap2/lib/simde/test/x86/svml.c +1545 -0
  90. data/ext/minimap2/lib/simde/test/x86/test-avx.h +16 -0
  91. data/ext/minimap2/lib/simde/test/x86/test-avx512.h +25 -0
  92. data/ext/minimap2/lib/simde/test/x86/test-mmx.h +13 -0
  93. data/ext/minimap2/lib/simde/test/x86/test-sse.h +13 -0
  94. data/ext/minimap2/lib/simde/test/x86/test-sse2.h +13 -0
  95. data/ext/minimap2/lib/simde/test/x86/test-x86-internal.h +196 -0
  96. data/ext/minimap2/lib/simde/test/x86/test-x86.c +48 -0
  97. data/ext/minimap2/lib/simde/test/x86/test-x86.h +8 -0
  98. data/lib/minimap2/aligner.rb +2 -2
  99. data/lib/minimap2/ffi/constants.rb +3 -0
  100. data/lib/minimap2/version.rb +1 -1
  101. metadata +99 -3
@@ -0,0 +1,871 @@
1
+ /* Copyright (c) 2019 Evan Nemerson <evan@nemerson.com>
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
+
24
+ #include <test/arm/arm-internal.h>
25
+ #include <simde/arm/neon.h>
26
+
27
+ static MunitResult
28
+ test_simde_xxx_s8(const MunitParameter params[], void* data) {
29
+ (void) params;
30
+ (void) data;
31
+
32
+ const struct {
33
+ simde_int8x8_t a;
34
+ simde_int8x8_t b;
35
+ simde_int8x8_t r;
36
+ } test_vec[8] = {
37
+
38
+ };
39
+
40
+ printf("\n");
41
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
42
+ simde_int8x8_t a, b, r;
43
+
44
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
45
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
46
+
47
+ r = simde_xxx_s8(a, b);
48
+
49
+ printf(" { simde_x_vload_s8(INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
50
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 ")),\n",
51
+ a.i8[0], a.i8[1], a.i8[2], a.i8[3], a.i8[4], a.i8[5], a.i8[6], a.i8[7]);
52
+ printf(" simde_x_vload_s8(INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
53
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 ")),\n",
54
+ b.i8[0], b.i8[1], b.i8[2], b.i8[3], b.i8[4], b.i8[5], b.i8[6], b.i8[7]);
55
+ printf(" simde_x_vload_s8(INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
56
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 ")) },\n",
57
+ r.i8[0], r.i8[1], r.i8[2], r.i8[3], r.i8[4], r.i8[5], r.i8[6], r.i8[7]);
58
+ }
59
+ return MUNIT_FAIL;
60
+
61
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
62
+ simde_int8x8_t r = simde_xxx_s8(test_vec[i].a, test_vec[i].b);
63
+ simde_neon_assert_int8x8(r, ==, test_vec[i].r);
64
+ }
65
+
66
+ return MUNIT_OK;
67
+ }
68
+
69
+ static MunitResult
70
+ test_simde_xxx_s16(const MunitParameter params[], void* data) {
71
+ (void) params;
72
+ (void) data;
73
+
74
+ const struct {
75
+ simde_int16x4_t a;
76
+ simde_int16x4_t b;
77
+ simde_int16x4_t r;
78
+ } test_vec[8] = {
79
+
80
+ };
81
+
82
+ printf("\n");
83
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
84
+ simde_int16x4_t a, b, r;
85
+
86
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
87
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
88
+
89
+ r = simde_xxx_s16(a, b);
90
+
91
+ printf(" { simde_x_vload_s16(INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 ")),\n",
92
+ a.i16[0], a.i16[1], a.i16[2], a.i16[3]);
93
+ printf(" simde_x_vload_s16(INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 ")),\n",
94
+ b.i16[0], b.i16[1], b.i16[2], b.i16[3]);
95
+ printf(" simde_x_vload_s16(INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 ")) },\n",
96
+ r.i16[0], r.i16[1], r.i16[2], r.i16[3]);
97
+ }
98
+ return MUNIT_FAIL;
99
+
100
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
101
+ simde_int16x4_t r = simde_xxx_s16(test_vec[i].a, test_vec[i].b);
102
+ simde_neon_assert_int16x4(r, ==, test_vec[i].r);
103
+ }
104
+
105
+ return MUNIT_OK;
106
+ }
107
+
108
+ static MunitResult
109
+ test_simde_xxx_s32(const MunitParameter params[], void* data) {
110
+ (void) params;
111
+ (void) data;
112
+
113
+ const struct {
114
+ simde_int32x2_t a;
115
+ simde_int32x2_t b;
116
+ simde_int32x2_t r;
117
+ } test_vec[8] = {
118
+
119
+ };
120
+
121
+ printf("\n");
122
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
123
+ simde_int32x2_t a, b, r;
124
+
125
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
126
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
127
+
128
+ r = simde_xxx_s32(a, b);
129
+
130
+ printf(" { simde_x_vload_s32(INT32_C(%11" PRId32 "), INT32_C(%11" PRId32 ")),\n",
131
+ a.i32[0], a.i32[1]);
132
+ printf(" simde_x_vload_s32(INT32_C(%11" PRId32 "), INT32_C(%11" PRId32 ")),\n",
133
+ b.i32[0], b.i32[1]);
134
+ printf(" simde_x_vload_s32(INT32_C(%11" PRId32 "), INT32_C(%11" PRId32 ")) },\n",
135
+ r.i32[0], r.i32[1]);
136
+ }
137
+ return MUNIT_FAIL;
138
+
139
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
140
+ simde_int32x2_t r = simde_xxx_s32(test_vec[i].a, test_vec[i].b);
141
+ simde_neon_assert_int32x2(r, ==, test_vec[i].r);
142
+ }
143
+
144
+ return MUNIT_OK;
145
+ }
146
+
147
+ static MunitResult
148
+ test_simde_xxx_s64(const MunitParameter params[], void* data) {
149
+ (void) params;
150
+ (void) data;
151
+
152
+ const struct {
153
+ simde_int64x1_t a;
154
+ simde_int64x1_t b;
155
+ simde_int64x1_t r;
156
+ } test_vec[8] = {
157
+
158
+ };
159
+
160
+ printf("\n");
161
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
162
+ simde_int64x1_t a, b, r;
163
+
164
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
165
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
166
+
167
+ r = simde_xxx_s64(a, b);
168
+
169
+ printf(" { simde_x_vload_s64(INT64_C(%20" PRId64 ")),\n", a.i64[0]);
170
+ printf(" simde_x_vload_s64(INT64_C(%20" PRId64 ")),\n", b.i64[0]);
171
+ printf(" simde_x_vload_s64(INT64_C(%20" PRId64 ")) },\n", r.i64[0]);
172
+ }
173
+ return MUNIT_FAIL;
174
+
175
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
176
+ simde_int64x1_t r = simde_xxx_s64(test_vec[i].a, test_vec[i].b);
177
+ simde_neon_assert_int64x1(r, ==, test_vec[i].r);
178
+ }
179
+
180
+ return MUNIT_OK;
181
+ }
182
+
183
+ static MunitResult
184
+ test_simde_xxx_u8(const MunitParameter params[], void* data) {
185
+ (void) params;
186
+ (void) data;
187
+
188
+ const struct {
189
+ simde_uint8x8_t a;
190
+ simde_uint8x8_t b;
191
+ simde_uint8x8_t r;
192
+ } test_vec[8] = {
193
+
194
+ };
195
+
196
+ printf("\n");
197
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
198
+ simde_uint8x8_t a, b, r;
199
+
200
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
201
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
202
+
203
+ r = simde_xxx_u8(a, b);
204
+
205
+ printf(" { simde_x_vload_u8(UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
206
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 ")),\n",
207
+ a.u8[0], a.u8[1], a.u8[2], a.u8[3], a.u8[4], a.u8[5], a.u8[6], a.u8[7]);
208
+ printf(" simde_x_vload_u8(UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
209
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 ")),\n",
210
+ b.u8[0], b.u8[1], b.u8[2], b.u8[3], b.u8[4], b.u8[5], b.u8[6], b.u8[7]);
211
+ printf(" simde_x_vload_u8(UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
212
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 ")) },\n",
213
+ r.u8[0], r.u8[1], r.u8[2], r.u8[3], r.u8[4], r.u8[5], r.u8[6], r.u8[7]);
214
+ }
215
+ return MUNIT_FAIL;
216
+
217
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
218
+ simde_uint8x8_t r = simde_xxx_u8(test_vec[i].a, test_vec[i].b);
219
+ simde_neon_assert_uint8x8(r, ==, test_vec[i].r);
220
+ }
221
+
222
+ return MUNIT_OK;
223
+ }
224
+
225
+ static MunitResult
226
+ test_simde_xxx_u16(const MunitParameter params[], void* data) {
227
+ (void) params;
228
+ (void) data;
229
+
230
+ const struct {
231
+ simde_uint16x4_t a;
232
+ simde_uint16x4_t b;
233
+ simde_uint16x4_t r;
234
+ } test_vec[8] = {
235
+
236
+ };
237
+
238
+ printf("\n");
239
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
240
+ simde_uint16x4_t a, b, r;
241
+
242
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
243
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
244
+
245
+ r = simde_xxx_u16(a, b);
246
+
247
+ printf(" { simde_x_vload_u16(UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 ")),\n",
248
+ a.u16[0], a.u16[1], a.u16[2], a.u16[3]);
249
+ printf(" simde_x_vload_u16(UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 ")),\n",
250
+ b.u16[0], b.u16[1], b.u16[2], b.u16[3]);
251
+ printf(" simde_x_vload_u16(UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 ")) },\n",
252
+ r.u16[0], r.u16[1], r.u16[2], r.u16[3]);
253
+ }
254
+ return MUNIT_FAIL;
255
+
256
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
257
+ simde_uint16x4_t r = simde_xxx_u16(test_vec[i].a, test_vec[i].b);
258
+ simde_neon_assert_uint16x4(r, ==, test_vec[i].r);
259
+ }
260
+
261
+ return MUNIT_OK;
262
+ }
263
+
264
+ static MunitResult
265
+ test_simde_xxx_u32(const MunitParameter params[], void* data) {
266
+ (void) params;
267
+ (void) data;
268
+
269
+ const struct {
270
+ simde_uint32x2_t a;
271
+ simde_uint32x2_t b;
272
+ simde_uint32x2_t r;
273
+ } test_vec[8] = {
274
+
275
+ };
276
+
277
+ printf("\n");
278
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
279
+ simde_uint32x2_t a, b, r;
280
+
281
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
282
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
283
+
284
+ r = simde_xxx_u32(a, b);
285
+
286
+ printf(" { simde_x_vload_u32(UINT32_C(%10" PRIu32 "), UINT32_C(%10" PRIu32 ")),\n",
287
+ a.u32[0], a.u32[1]);
288
+ printf(" simde_x_vload_u32(UINT32_C(%10" PRIu32 "), UINT32_C(%10" PRIu32 ")),\n",
289
+ b.u32[0], b.u32[1]);
290
+ printf(" simde_x_vload_u32(UINT32_C(%10" PRIu32 "), UINT32_C(%10" PRIu32 ")) },\n",
291
+ r.u32[0], r.u32[1]);
292
+ }
293
+ return MUNIT_FAIL;
294
+
295
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
296
+ simde_uint32x2_t r = simde_xxx_u32(test_vec[i].a, test_vec[i].b);
297
+ simde_neon_assert_uint32x2(r, ==, test_vec[i].r);
298
+ }
299
+
300
+ return MUNIT_OK;
301
+ }
302
+
303
+ static MunitResult
304
+ test_simde_xxx_u64(const MunitParameter params[], void* data) {
305
+ (void) params;
306
+ (void) data;
307
+
308
+ const struct {
309
+ simde_uint64x1_t a;
310
+ simde_uint64x1_t b;
311
+ simde_uint64x1_t r;
312
+ } test_vec[8] = {
313
+
314
+ };
315
+
316
+ printf("\n");
317
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
318
+ simde_uint64x1_t a, b, r;
319
+
320
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
321
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
322
+
323
+ r = simde_xxx_u64(a, b);
324
+
325
+ printf(" { simde_x_vload_u64(UINT64_C(%19" PRIu64 ")),\n", a.u64[0]);
326
+ printf(" simde_x_vload_u64(UINT64_C(%19" PRIu64 ")),\n", b.u64[0]);
327
+ printf(" simde_x_vload_u64(UINT64_C(%19" PRIu64 ")) },\n", r.u64[0]);
328
+ }
329
+ return MUNIT_FAIL;
330
+
331
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
332
+ simde_uint64x1_t r = simde_xxx_u64(test_vec[i].a, test_vec[i].b);
333
+ simde_neon_assert_uint64x1(r, ==, test_vec[i].r);
334
+ }
335
+
336
+ return MUNIT_OK;
337
+ }
338
+
339
+ static MunitResult
340
+ test_simde_xxx_f32(const MunitParameter params[], void* data) {
341
+ (void) params;
342
+ (void) data;
343
+
344
+ const struct {
345
+ simde_float32x2_t a;
346
+ simde_float32x2_t b;
347
+ simde_float32x2_t r;
348
+ } test_vec[8] = {
349
+
350
+ };
351
+
352
+ printf("\n");
353
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
354
+ simde_float32x2_t a, b, r;
355
+
356
+ a = simde_neon_random_float32x2();
357
+ b = simde_neon_random_float32x2();
358
+
359
+ r = simde_xxx_f32(a, b);
360
+
361
+ printf(" { simde_x_vload_f32(SIMDE_FLOAT32_C(%*.2f), SIMDE_FLOAT32_C(%*.2f)),\n",
362
+ 8, a.f32[0], 8, a.f32[1]);
363
+ printf(" simde_x_vload_f32(SIMDE_FLOAT32_C(%*.2f), SIMDE_FLOAT32_C(%*.2f)),\n",
364
+ 8, b.f32[0], 8, b.f32[1]);
365
+ printf(" simde_x_vload_f32(SIMDE_FLOAT32_C(%*.2f), SIMDE_FLOAT32_C(%*.2f)) },\n",
366
+ 8, r.f32[0], 8, r.f32[1]);
367
+ }
368
+ return MUNIT_FAIL;
369
+
370
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
371
+ simde_float32x2_t r = simde_xxx_f32(test_vec[i].a, test_vec[i].b);
372
+ simde_neon_assert_float32x2_equal(r, test_vec[i].r, 1);
373
+ }
374
+
375
+ return MUNIT_OK;
376
+ }
377
+
378
+ static MunitResult
379
+ test_simde_xxx_f64(const MunitParameter params[], void* data) {
380
+ (void) params;
381
+ (void) data;
382
+
383
+ const struct {
384
+ simde_float64x1_t a;
385
+ simde_float64x1_t b;
386
+ simde_float64x1_t r;
387
+ } test_vec[8] = {
388
+
389
+ };
390
+
391
+ printf("\n");
392
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
393
+ simde_float64x1_t a, b, r;
394
+
395
+ a = simde_neon_random_float64x1();
396
+ b = simde_neon_random_float64x1();
397
+
398
+ r = simde_xxx_f64(a, b);
399
+
400
+ printf(" { simde_x_vload_f64(SIMDE_FLOAT64_C(%*.2f)),\n", 8, a.f64[0]);
401
+ printf(" simde_x_vload_f64(SIMDE_FLOAT64_C(%*.2f)),\n", 8, b.f64[0]);
402
+ printf(" simde_x_vload_f64(SIMDE_FLOAT64_C(%*.2f)) },\n", 8, r.f64[0]);
403
+ }
404
+ return MUNIT_FAIL;
405
+
406
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
407
+ simde_float64x1_t r = simde_xxx_f64(test_vec[i].a, test_vec[i].b);
408
+ simde_neon_assert_float64x1_equal(r, test_vec[i].r, 1);
409
+ }
410
+
411
+ return MUNIT_OK;
412
+ }
413
+
414
+ static MunitResult
415
+ test_simde_xxxq_s8(const MunitParameter params[], void* data) {
416
+ (void) params;
417
+ (void) data;
418
+
419
+ const struct {
420
+ simde_int8x16_t a;
421
+ simde_int8x16_t b;
422
+ simde_int8x16_t r;
423
+ } test_vec[8] = {
424
+
425
+ };
426
+
427
+ printf("\n");
428
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
429
+ simde_int8x16_t a, b, r;
430
+
431
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
432
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
433
+
434
+ r = simde_xxxq_s8(a, b);
435
+
436
+ printf(" { simde_x_vloadq_s8(INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
437
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
438
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
439
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 ")),\n",
440
+ a.i8[ 0], a.i8[ 1], a.i8[ 2], a.i8[ 3], a.i8[ 4], a.i8[ 5], a.i8[ 6], a.i8[ 7],
441
+ a.i8[ 8], a.i8[ 9], a.i8[10], a.i8[11], a.i8[12], a.i8[13], a.i8[14], a.i8[15]);
442
+ printf(" simde_x_vloadq_s8(INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
443
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
444
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
445
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 ")),\n",
446
+ b.i8[ 0], b.i8[ 1], b.i8[ 2], b.i8[ 3], b.i8[ 4], b.i8[ 5], b.i8[ 6], b.i8[ 7],
447
+ b.i8[ 8], b.i8[ 9], b.i8[10], b.i8[11], b.i8[12], b.i8[13], b.i8[14], b.i8[15]);
448
+ printf(" simde_x_vloadq_s8(INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
449
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
450
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "),\n"
451
+ " INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 "), INT8_C(%4" PRId8 ")) },\n",
452
+ r.i8[ 0], r.i8[ 1], r.i8[ 2], r.i8[ 3], r.i8[ 4], r.i8[ 5], r.i8[ 6], r.i8[ 7],
453
+ r.i8[ 8], r.i8[ 9], r.i8[10], r.i8[11], r.i8[12], r.i8[13], r.i8[14], r.i8[15]);
454
+ }
455
+ return MUNIT_FAIL;
456
+
457
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
458
+ simde_int8x16_t r = simde_xxxq_s8(test_vec[i].a, test_vec[i].b);
459
+ simde_neon_assert_int8x16(r, ==, test_vec[i].r);
460
+ }
461
+
462
+ return MUNIT_OK;
463
+ }
464
+
465
+ static MunitResult
466
+ test_simde_xxxq_s16(const MunitParameter params[], void* data) {
467
+ (void) params;
468
+ (void) data;
469
+
470
+ const struct {
471
+ simde_int16x8_t a;
472
+ simde_int16x8_t b;
473
+ simde_int16x8_t r;
474
+ } test_vec[8] = {
475
+
476
+ };
477
+
478
+ printf("\n");
479
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
480
+ simde_int16x8_t a, b, r;
481
+
482
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
483
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
484
+
485
+ r = simde_xxxq_s16(a, b);
486
+
487
+ printf(" { simde_x_vloadq_s16(INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "),\n"
488
+ " INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 ")),\n",
489
+ a.i16[0], a.i16[1], a.i16[2], a.i16[3], a.i16[4], a.i16[5], a.i16[6], a.i16[7]);
490
+ printf(" simde_x_vloadq_s16(INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "),\n"
491
+ " INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 ")),\n",
492
+ b.i16[0], b.i16[1], b.i16[2], b.i16[3], b.i16[4], b.i16[5], b.i16[6], b.i16[7]);
493
+ printf(" simde_x_vloadq_s16(INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "),\n"
494
+ " INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 "), INT16_C(%6" PRId16 ")) },\n",
495
+ r.i16[0], r.i16[1], r.i16[2], r.i16[3], r.i16[4], r.i16[5], r.i16[6], r.i16[7]);
496
+ }
497
+ return MUNIT_FAIL;
498
+
499
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
500
+ simde_int16x8_t r = simde_xxxq_s16(test_vec[i].a, test_vec[i].b);
501
+ simde_neon_assert_int16x8(r, ==, test_vec[i].r);
502
+ }
503
+
504
+ return MUNIT_OK;
505
+ }
506
+
507
+ static MunitResult
508
+ test_simde_xxxq_s32(const MunitParameter params[], void* data) {
509
+ (void) params;
510
+ (void) data;
511
+
512
+ const struct {
513
+ simde_int32x4_t a;
514
+ simde_int32x4_t b;
515
+ simde_int32x4_t r;
516
+ } test_vec[8] = {
517
+
518
+ };
519
+
520
+ printf("\n");
521
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
522
+ simde_int32x4_t a, b, r;
523
+
524
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
525
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
526
+
527
+ r = simde_xxxq_s32(a, b);
528
+
529
+ printf(" { simde_x_vloadq_s32(INT32_C(%11" PRId32 "), INT32_C(%11" PRId32 "),\n"
530
+ " INT32_C(%11" PRId32 "), INT32_C(%11" PRId32 ")),\n",
531
+ a.i32[0], a.i32[1], a.i32[2], a.i32[3]);
532
+ printf(" simde_x_vloadq_s32(INT32_C(%11" PRId32 "), INT32_C(%11" PRId32 "),\n"
533
+ " INT32_C(%11" PRId32 "), INT32_C(%11" PRId32 ")),\n",
534
+ b.i32[0], b.i32[1], b.i32[2], b.i32[3]);
535
+ printf(" simde_x_vloadq_s32(INT32_C(%11" PRId32 "), INT32_C(%11" PRId32 "),\n"
536
+ " INT32_C(%11" PRId32 "), INT32_C(%11" PRId32 ")) },\n",
537
+ r.i32[0], r.i32[1], r.i32[2], r.i32[3]);
538
+ }
539
+ return MUNIT_FAIL;
540
+
541
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
542
+ simde_int32x4_t r = simde_xxxq_s32(test_vec[i].a, test_vec[i].b);
543
+ simde_neon_assert_int32x4(r, ==, test_vec[i].r);
544
+ }
545
+
546
+ return MUNIT_OK;
547
+ }
548
+
549
+ static MunitResult
550
+ test_simde_xxxq_s64(const MunitParameter params[], void* data) {
551
+ (void) params;
552
+ (void) data;
553
+
554
+ const struct {
555
+ simde_int64x2_t a;
556
+ simde_int64x2_t b;
557
+ simde_int64x2_t r;
558
+ } test_vec[8] = {
559
+
560
+ };
561
+
562
+ printf("\n");
563
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
564
+ simde_int64x2_t a, b, r;
565
+
566
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
567
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
568
+
569
+ r = simde_xxxq_s64(a, b);
570
+
571
+ printf(" { simde_x_vloadq_s64(INT64_C(%21" PRId64 "), INT64_C(%21" PRId64 ")),\n", a.i64[0], a.i64[1]);
572
+ printf(" simde_x_vloadq_s64(INT64_C(%21" PRId64 "), INT64_C(%21" PRId64 ")),\n", b.i64[0], b.i64[1]);
573
+ printf(" simde_x_vloadq_s64(INT64_C(%21" PRId64 "), INT64_C(%21" PRId64 ")) },\n", r.i64[0], r.i64[1]);
574
+ }
575
+ return MUNIT_FAIL;
576
+
577
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
578
+ simde_int64x2_t r = simde_xxxq_s64(test_vec[i].a, test_vec[i].b);
579
+ simde_neon_assert_int64x2(r, ==, test_vec[i].r);
580
+ }
581
+
582
+ return MUNIT_OK;
583
+ }
584
+
585
+ static MunitResult
586
+ test_simde_xxxq_u8(const MunitParameter params[], void* data) {
587
+ (void) params;
588
+ (void) data;
589
+
590
+ const struct {
591
+ simde_uint8x16_t a;
592
+ simde_uint8x16_t b;
593
+ simde_uint8x16_t r;
594
+ } test_vec[8] = {
595
+
596
+ };
597
+
598
+ printf("\n");
599
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
600
+ simde_uint8x16_t a, b, r;
601
+
602
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
603
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
604
+
605
+ r = simde_xxxq_u8(a, b);
606
+
607
+ printf(" { simde_x_vloadq_u8(UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
608
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
609
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
610
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 ") ),\n",
611
+ a.u8[0], a.u8[1], a.u8[ 2], a.u8[ 3], a.u8[ 4], a.u8[ 5], a.u8[ 6], a.u8[ 7],
612
+ a.u8[8], a.u8[9], a.u8[10], a.u8[11], a.u8[12], a.u8[13], a.u8[14], a.u8[15]);
613
+ printf(" simde_x_vloadq_u8(UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
614
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
615
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
616
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 ") ),\n",
617
+ b.u8[0], b.u8[1], b.u8[ 2], b.u8[ 3], b.u8[ 4], b.u8[ 5], b.u8[ 6], b.u8[ 7],
618
+ b.u8[8], b.u8[9], b.u8[10], b.u8[11], b.u8[12], b.u8[13], b.u8[14], b.u8[15]);
619
+ printf(" simde_x_vloadq_u8(UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
620
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
621
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "),\n"
622
+ " UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 "), UINT8_C(%3" PRIu8 ") ) },\n",
623
+ r.u8[0], r.u8[1], r.u8[ 2], r.u8[ 3], r.u8[ 4], r.u8[ 5], r.u8[ 6], r.u8[ 7],
624
+ r.u8[8], r.u8[9], r.u8[10], r.u8[11], r.u8[12], r.u8[13], r.u8[14], r.u8[15]);
625
+ }
626
+ return MUNIT_FAIL;
627
+
628
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
629
+ simde_uint8x16_t r = simde_xxxq_u8(test_vec[i].a, test_vec[i].b);
630
+ simde_neon_assert_uint8x16(r, ==, test_vec[i].r);
631
+ }
632
+
633
+ return MUNIT_OK;
634
+ }
635
+
636
+ static MunitResult
637
+ test_simde_xxxq_u16(const MunitParameter params[], void* data) {
638
+ (void) params;
639
+ (void) data;
640
+
641
+ const struct {
642
+ simde_uint16x8_t a;
643
+ simde_uint16x8_t b;
644
+ simde_uint16x8_t r;
645
+ } test_vec[8] = {
646
+
647
+ };
648
+
649
+ printf("\n");
650
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
651
+ simde_uint16x8_t a, b, r;
652
+
653
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
654
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
655
+
656
+ r = simde_xxxq_u16(a, b);
657
+
658
+ printf(" { simde_x_vloadq_u16(UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "),\n"
659
+ " UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 ")),\n",
660
+ a.u16[0], a.u16[1], a.u16[2], a.u16[3], a.u16[4], a.u16[5], a.u16[6], a.u16[7]);
661
+ printf(" simde_x_vloadq_u16(UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "),\n"
662
+ " UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 ")),\n",
663
+ b.u16[0], b.u16[1], b.u16[2], b.u16[3], b.u16[4], b.u16[5], b.u16[6], b.u16[7]);
664
+ printf(" simde_x_vloadq_u16(UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "),\n"
665
+ " UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 "), UINT16_C(%5" PRIu16 ")) },\n",
666
+ r.u16[0], r.u16[1], r.u16[2], r.u16[3], r.u16[4], r.u16[5], r.u16[6], r.u16[7]);
667
+ }
668
+ return MUNIT_FAIL;
669
+
670
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
671
+ simde_uint16x8_t r = simde_xxxq_u16(test_vec[i].a, test_vec[i].b);
672
+ simde_neon_assert_uint16x8(r, ==, test_vec[i].r);
673
+ }
674
+
675
+ return MUNIT_OK;
676
+ }
677
+
678
+ static MunitResult
679
+ test_simde_xxxq_u32(const MunitParameter params[], void* data) {
680
+ (void) params;
681
+ (void) data;
682
+
683
+ const struct {
684
+ simde_uint32x4_t a;
685
+ simde_uint32x4_t b;
686
+ simde_uint32x4_t r;
687
+ } test_vec[8] = {
688
+
689
+ };
690
+
691
+ printf("\n");
692
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
693
+ simde_uint32x4_t a, b, r;
694
+
695
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
696
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
697
+
698
+ r = simde_xxxq_u32(a, b);
699
+
700
+ printf(" { simde_x_vloadq_u32(UINT32_C(%10" PRIu32 "), UINT32_C(%10" PRIu32 "),\n"
701
+ " UINT32_C(%10" PRIu32 "), UINT32_C(%10" PRIu32 ")),\n",
702
+ a.u32[0], a.u32[1], a.u32[2], a.u32[3]);
703
+ printf(" simde_x_vloadq_u32(UINT32_C(%10" PRIu32 "), UINT32_C(%10" PRIu32 "),\n"
704
+ " UINT32_C(%10" PRIu32 "), UINT32_C(%10" PRIu32 ")),\n",
705
+ b.u32[0], b.u32[1], b.u32[2], b.u32[3]);
706
+ printf(" simde_x_vloadq_u32(UINT32_C(%10" PRIu32 "), UINT32_C(%10" PRIu32 "),\n"
707
+ " UINT32_C(%10" PRIu32 "), UINT32_C(%10" PRIu32 ")) },\n",
708
+ r.u32[0], r.u32[1], r.u32[2], r.u32[3]);
709
+ }
710
+ return MUNIT_FAIL;
711
+
712
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
713
+ simde_uint32x4_t r = simde_xxxq_u32(test_vec[i].a, test_vec[i].b);
714
+ simde_neon_assert_uint32x4(r, ==, test_vec[i].r);
715
+ }
716
+
717
+ return MUNIT_OK;
718
+ }
719
+
720
+ static MunitResult
721
+ test_simde_xxxq_u64(const MunitParameter params[], void* data) {
722
+ (void) params;
723
+ (void) data;
724
+
725
+ const struct {
726
+ simde_uint64x2_t a;
727
+ simde_uint64x2_t b;
728
+ simde_uint64x2_t r;
729
+ } test_vec[8] = {
730
+
731
+ };
732
+
733
+ printf("\n");
734
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
735
+ simde_uint64x2_t a, b, r;
736
+
737
+ munit_rand_memory(sizeof(a), (uint8_t*) &a);
738
+ munit_rand_memory(sizeof(b), (uint8_t*) &b);
739
+
740
+ r = simde_xxxq_u64(a, b);
741
+
742
+ printf(" { simde_x_vloadq_u64(UINT64_C(%19" PRIu64 "), UINT64_C(%19" PRIu64 ")),\n",
743
+ a.u64[0], a.u64[1]);
744
+ printf(" simde_x_vloadq_u64(UINT64_C(%19" PRIu64 "), UINT64_C(%19" PRIu64 ")),\n",
745
+ b.u64[0], b.u64[1]);
746
+ printf(" simde_x_vloadq_u64(UINT64_C(%19" PRIu64 "), UINT64_C(%19" PRIu64 ")) },\n",
747
+ r.u64[0], r.u64[1]);
748
+ }
749
+ return MUNIT_FAIL;
750
+
751
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
752
+ simde_uint64x2_t r = simde_xxxq_u64(test_vec[i].a, test_vec[i].b);
753
+ simde_neon_assert_uint64x2(r, ==, test_vec[i].r);
754
+ }
755
+
756
+ return MUNIT_OK;
757
+ }
758
+
759
+ static MunitResult
760
+ test_simde_xxxq_f32(const MunitParameter params[], void* data) {
761
+ (void) params;
762
+ (void) data;
763
+
764
+ const struct {
765
+ simde_float32x4_t a;
766
+ simde_float32x4_t b;
767
+ simde_float32x4_t r;
768
+ } test_vec[8] = {
769
+
770
+ };
771
+
772
+ printf("\n");
773
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
774
+ simde_float32x4_t a, b, r;
775
+
776
+ a = simde_neon_random_float32x4();
777
+ b = simde_neon_random_float32x4();
778
+
779
+ r = simde_xxxq_f32(a, b);
780
+
781
+ printf(" { simde_x_vloadq_f32(SIMDE_FLOAT32_C(%*.2f), SIMDE_FLOAT32_C(%*.2f),\n"
782
+ " SIMDE_FLOAT32_C(%*.2f), SIMDE_FLOAT32_C(%*.2f)),\n",
783
+ 8, a.f32[0], 8, a.f32[1], 8, a.f32[2], 8, a.f32[3]);
784
+ printf(" simde_x_vloadq_f32(SIMDE_FLOAT32_C(%*.2f), SIMDE_FLOAT32_C(%*.2f),\n"
785
+ " SIMDE_FLOAT32_C(%*.2f), SIMDE_FLOAT32_C(%*.2f)),\n",
786
+ 8, b.f32[0], 8, b.f32[1], 8, b.f32[2], 8, b.f32[3]);
787
+ printf(" simde_x_vloadq_f32(SIMDE_FLOAT32_C(%*.2f), SIMDE_FLOAT32_C(%*.2f),\n"
788
+ " SIMDE_FLOAT32_C(%*.2f), SIMDE_FLOAT32_C(%*.2f)) },\n",
789
+ 8, r.f32[0], 8, r.f32[1], 8, r.f32[2], 8, r.f32[3]);
790
+ }
791
+ return MUNIT_FAIL;
792
+
793
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
794
+ simde_float32x4_t r = simde_xxxq_f32(test_vec[i].a, test_vec[i].b);
795
+ simde_neon_assert_float32x4_equal(r, test_vec[i].r, 1);
796
+ }
797
+
798
+ return MUNIT_OK;
799
+ }
800
+
801
+ static MunitResult
802
+ test_simde_xxxq_f64(const MunitParameter params[], void* data) {
803
+ (void) params;
804
+ (void) data;
805
+
806
+ const struct {
807
+ simde_float64x2_t a;
808
+ simde_float64x2_t b;
809
+ simde_float64x2_t r;
810
+ } test_vec[8] = {
811
+
812
+ };
813
+
814
+ printf("\n");
815
+ for (size_t i = 0 ; i < (sizeof(test_vec) / (sizeof(test_vec[0]))) ; i++) {
816
+ simde_float64x2_t a, b, r;
817
+
818
+ a = simde_neon_random_float64x2();
819
+ b = simde_neon_random_float64x2();
820
+
821
+ r = simde_xxxq_f64(a, b);
822
+
823
+ printf(" { simde_x_vloadq_f64(SIMDE_FLOAT64_C(%*.2f), SIMDE_FLOAT64_C(%*.2f)),\n",
824
+ 8, a.f64[0], 8, a.f64[1]);
825
+ printf(" simde_x_vloadq_f64(SIMDE_FLOAT64_C(%*.2f), SIMDE_FLOAT64_C(%*.2f)),\n",
826
+ 8, b.f64[0], 8, b.f64[1]);
827
+ printf(" simde_x_vloadq_f64(SIMDE_FLOAT64_C(%*.2f), SIMDE_FLOAT64_C(%*.2f)) },\n",
828
+ 8, r.f64[0], 8, r.f64[1]);
829
+ }
830
+ return MUNIT_FAIL;
831
+
832
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
833
+ simde_float64x2_t r = simde_xxxq_f64(test_vec[i].a, test_vec[i].b);
834
+ simde_neon_assert_float64x2_equal(r, test_vec[i].r, 1);
835
+ }
836
+
837
+ return MUNIT_OK;
838
+ }
839
+
840
+ static MunitTest xxx_tests[] = {
841
+ TEST_FUNC2(xxx, s8),
842
+ TEST_FUNC2(xxx, s16),
843
+ TEST_FUNC2(xxx, s32),
844
+ TEST_FUNC2(xxx, s64),
845
+ TEST_FUNC2(xxx, u8),
846
+ TEST_FUNC2(xxx, u16),
847
+ TEST_FUNC2(xxx, u32),
848
+ TEST_FUNC2(xxx, u64),
849
+ TEST_FUNC2(xxx, f32),
850
+ TEST_FUNC2(xxx, f64),
851
+ TEST_FUNC3(xxx, q, s8),
852
+ TEST_FUNC3(xxx, q, s16),
853
+ TEST_FUNC3(xxx, q, s32),
854
+ TEST_FUNC3(xxx, q, s64),
855
+ TEST_FUNC3(xxx, q, u8),
856
+ TEST_FUNC3(xxx, q, u16),
857
+ TEST_FUNC3(xxx, q, u32),
858
+ TEST_FUNC3(xxx, q, u64),
859
+ TEST_FUNC3(xxx, q, f32),
860
+ TEST_FUNC3(xxx, q, f64),
861
+
862
+ { NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL }
863
+ };
864
+
865
+ MunitSuite NEON_TEST_SUITE(xxx) = {
866
+ (char*) "/xxx",
867
+ xxx_tests,
868
+ NULL,
869
+ 1,
870
+ MUNIT_SUITE_OPTION_NONE
871
+ };