minimap2 0.2.25.0 → 0.2.25.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/ext/minimap2/Makefile +6 -2
  4. data/ext/minimap2/NEWS.md +38 -0
  5. data/ext/minimap2/README.md +9 -3
  6. data/ext/minimap2/align.c +5 -3
  7. data/ext/minimap2/cookbook.md +2 -2
  8. data/ext/minimap2/format.c +7 -4
  9. data/ext/minimap2/kalloc.c +20 -1
  10. data/ext/minimap2/kalloc.h +13 -2
  11. data/ext/minimap2/ksw2.h +1 -0
  12. data/ext/minimap2/ksw2_extd2_sse.c +1 -1
  13. data/ext/minimap2/ksw2_exts2_sse.c +79 -40
  14. data/ext/minimap2/ksw2_extz2_sse.c +1 -1
  15. data/ext/minimap2/lchain.c +15 -16
  16. data/ext/minimap2/lib/simde/CONTRIBUTING.md +114 -0
  17. data/ext/minimap2/lib/simde/COPYING +20 -0
  18. data/ext/minimap2/lib/simde/README.md +333 -0
  19. data/ext/minimap2/lib/simde/amalgamate.py +58 -0
  20. data/ext/minimap2/lib/simde/meson.build +33 -0
  21. data/ext/minimap2/lib/simde/netlify.toml +20 -0
  22. data/ext/minimap2/lib/simde/simde/arm/neon/float32x2.h +140 -0
  23. data/ext/minimap2/lib/simde/simde/arm/neon/float32x4.h +137 -0
  24. data/ext/minimap2/lib/simde/simde/arm/neon/float64x1.h +142 -0
  25. data/ext/minimap2/lib/simde/simde/arm/neon/float64x2.h +145 -0
  26. data/ext/minimap2/lib/simde/simde/arm/neon/int16x4.h +140 -0
  27. data/ext/minimap2/lib/simde/simde/arm/neon/int16x8.h +145 -0
  28. data/ext/minimap2/lib/simde/simde/arm/neon/int32x2.h +140 -0
  29. data/ext/minimap2/lib/simde/simde/arm/neon/int32x4.h +143 -0
  30. data/ext/minimap2/lib/simde/simde/arm/neon/int64x1.h +137 -0
  31. data/ext/minimap2/lib/simde/simde/arm/neon/int64x2.h +141 -0
  32. data/ext/minimap2/lib/simde/simde/arm/neon/int8x16.h +147 -0
  33. data/ext/minimap2/lib/simde/simde/arm/neon/int8x8.h +141 -0
  34. data/ext/minimap2/lib/simde/simde/arm/neon/uint16x4.h +134 -0
  35. data/ext/minimap2/lib/simde/simde/arm/neon/uint16x8.h +138 -0
  36. data/ext/minimap2/lib/simde/simde/arm/neon/uint32x2.h +134 -0
  37. data/ext/minimap2/lib/simde/simde/arm/neon/uint32x4.h +137 -0
  38. data/ext/minimap2/lib/simde/simde/arm/neon/uint64x1.h +131 -0
  39. data/ext/minimap2/lib/simde/simde/arm/neon/uint64x2.h +135 -0
  40. data/ext/minimap2/lib/simde/simde/arm/neon/uint8x16.h +141 -0
  41. data/ext/minimap2/lib/simde/simde/arm/neon/uint8x8.h +135 -0
  42. data/ext/minimap2/lib/simde/simde/arm/neon.h +97 -0
  43. data/ext/minimap2/lib/simde/simde/check.h +267 -0
  44. data/ext/minimap2/lib/simde/simde/debug-trap.h +83 -0
  45. data/ext/minimap2/lib/simde/simde/hedley.h +1899 -0
  46. data/ext/minimap2/lib/simde/simde/simde-arch.h +445 -0
  47. data/ext/minimap2/lib/simde/simde/simde-common.h +697 -0
  48. data/ext/minimap2/lib/simde/simde/x86/avx.h +5385 -0
  49. data/ext/minimap2/lib/simde/simde/x86/avx2.h +2402 -0
  50. data/ext/minimap2/lib/simde/simde/x86/avx512bw.h +391 -0
  51. data/ext/minimap2/lib/simde/simde/x86/avx512f.h +3389 -0
  52. data/ext/minimap2/lib/simde/simde/x86/avx512vl.h +112 -0
  53. data/ext/minimap2/lib/simde/simde/x86/fma.h +659 -0
  54. data/ext/minimap2/lib/simde/simde/x86/mmx.h +2210 -0
  55. data/ext/minimap2/lib/simde/simde/x86/sse.h +3696 -0
  56. data/ext/minimap2/lib/simde/simde/x86/sse2.h +5991 -0
  57. data/ext/minimap2/lib/simde/simde/x86/sse3.h +343 -0
  58. data/ext/minimap2/lib/simde/simde/x86/sse4.1.h +1783 -0
  59. data/ext/minimap2/lib/simde/simde/x86/sse4.2.h +105 -0
  60. data/ext/minimap2/lib/simde/simde/x86/ssse3.h +1053 -0
  61. data/ext/minimap2/lib/simde/simde/x86/svml.h +543 -0
  62. data/ext/minimap2/lib/simde/test/CMakeLists.txt +166 -0
  63. data/ext/minimap2/lib/simde/test/arm/meson.build +4 -0
  64. data/ext/minimap2/lib/simde/test/arm/neon/meson.build +23 -0
  65. data/ext/minimap2/lib/simde/test/arm/neon/skel.c +871 -0
  66. data/ext/minimap2/lib/simde/test/arm/neon/test-neon-internal.h +134 -0
  67. data/ext/minimap2/lib/simde/test/arm/neon/test-neon.c +39 -0
  68. data/ext/minimap2/lib/simde/test/arm/neon/test-neon.h +10 -0
  69. data/ext/minimap2/lib/simde/test/arm/neon/vadd.c +1260 -0
  70. data/ext/minimap2/lib/simde/test/arm/neon/vdup_n.c +873 -0
  71. data/ext/minimap2/lib/simde/test/arm/neon/vmul.c +1084 -0
  72. data/ext/minimap2/lib/simde/test/arm/neon/vsub.c +1260 -0
  73. data/ext/minimap2/lib/simde/test/arm/test-arm-internal.h +18 -0
  74. data/ext/minimap2/lib/simde/test/arm/test-arm.c +20 -0
  75. data/ext/minimap2/lib/simde/test/arm/test-arm.h +8 -0
  76. data/ext/minimap2/lib/simde/test/cmake/AddCompilerFlags.cmake +171 -0
  77. data/ext/minimap2/lib/simde/test/cmake/ExtraWarningFlags.cmake +68 -0
  78. data/ext/minimap2/lib/simde/test/meson.build +64 -0
  79. data/ext/minimap2/lib/simde/test/munit/COPYING +21 -0
  80. data/ext/minimap2/lib/simde/test/munit/Makefile +55 -0
  81. data/ext/minimap2/lib/simde/test/munit/README.md +54 -0
  82. data/ext/minimap2/lib/simde/test/munit/example.c +351 -0
  83. data/ext/minimap2/lib/simde/test/munit/meson.build +37 -0
  84. data/ext/minimap2/lib/simde/test/munit/munit.c +2055 -0
  85. data/ext/minimap2/lib/simde/test/munit/munit.h +535 -0
  86. data/ext/minimap2/lib/simde/test/run-tests.c +20 -0
  87. data/ext/minimap2/lib/simde/test/run-tests.h +260 -0
  88. data/ext/minimap2/lib/simde/test/x86/avx.c +13752 -0
  89. data/ext/minimap2/lib/simde/test/x86/avx2.c +9977 -0
  90. data/ext/minimap2/lib/simde/test/x86/avx512bw.c +2664 -0
  91. data/ext/minimap2/lib/simde/test/x86/avx512f.c +10416 -0
  92. data/ext/minimap2/lib/simde/test/x86/avx512vl.c +210 -0
  93. data/ext/minimap2/lib/simde/test/x86/fma.c +2557 -0
  94. data/ext/minimap2/lib/simde/test/x86/meson.build +33 -0
  95. data/ext/minimap2/lib/simde/test/x86/mmx.c +2878 -0
  96. data/ext/minimap2/lib/simde/test/x86/skel.c +2984 -0
  97. data/ext/minimap2/lib/simde/test/x86/sse.c +5121 -0
  98. data/ext/minimap2/lib/simde/test/x86/sse2.c +9860 -0
  99. data/ext/minimap2/lib/simde/test/x86/sse3.c +486 -0
  100. data/ext/minimap2/lib/simde/test/x86/sse4.1.c +3446 -0
  101. data/ext/minimap2/lib/simde/test/x86/sse4.2.c +101 -0
  102. data/ext/minimap2/lib/simde/test/x86/ssse3.c +2084 -0
  103. data/ext/minimap2/lib/simde/test/x86/svml.c +1545 -0
  104. data/ext/minimap2/lib/simde/test/x86/test-avx.h +16 -0
  105. data/ext/minimap2/lib/simde/test/x86/test-avx512.h +25 -0
  106. data/ext/minimap2/lib/simde/test/x86/test-mmx.h +13 -0
  107. data/ext/minimap2/lib/simde/test/x86/test-sse.h +13 -0
  108. data/ext/minimap2/lib/simde/test/x86/test-sse2.h +13 -0
  109. data/ext/minimap2/lib/simde/test/x86/test-x86-internal.h +196 -0
  110. data/ext/minimap2/lib/simde/test/x86/test-x86.c +48 -0
  111. data/ext/minimap2/lib/simde/test/x86/test-x86.h +8 -0
  112. data/ext/minimap2/main.c +13 -6
  113. data/ext/minimap2/map.c +0 -5
  114. data/ext/minimap2/minimap.h +40 -31
  115. data/ext/minimap2/minimap2.1 +19 -5
  116. data/ext/minimap2/misc/paftools.js +545 -24
  117. data/ext/minimap2/options.c +1 -1
  118. data/ext/minimap2/pyproject.toml +2 -0
  119. data/ext/minimap2/python/mappy.pyx +3 -1
  120. data/ext/minimap2/seed.c +1 -1
  121. data/ext/minimap2/setup.py +32 -22
  122. data/lib/minimap2/version.rb +1 -1
  123. metadata +100 -3
@@ -0,0 +1,1260 @@
1
+ /* Copyright (c) 2018-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
+ #define SIMDE_TESTS_CURRENT_NEON_OP add
25
+ #include <test/arm/neon/test-neon-internal.h>
26
+ #include <simde/arm/neon.h>
27
+
28
+ #if defined(SIMDE_NEON_NATIVE) || defined(SIMDE_NO_NATIVE) || defined(SIMDE_ALWAYS_BUILD_NATIVE_TESTS)
29
+
30
+ static MunitResult
31
+ test_simde_vadd_s8(const MunitParameter params[], void* data) {
32
+ (void) params;
33
+ (void) data;
34
+
35
+ const struct {
36
+ simde_int8x8_t a;
37
+ simde_int8x8_t b;
38
+ simde_int8x8_t r;
39
+ } test_vec[8] = {
40
+ { simde_x_vload_s8(INT8_C( -43), INT8_C( -27), INT8_C( 114), INT8_C( -95),
41
+ INT8_C( -80), INT8_C( -5), INT8_C( 84), INT8_C( 122)),
42
+ simde_x_vload_s8(INT8_C( 6), INT8_C( 12), INT8_C( -61), INT8_C( 101),
43
+ INT8_C( 120), INT8_C( -62), INT8_C( 81), INT8_C( -57)),
44
+ simde_x_vload_s8(INT8_C( -37), INT8_C( -15), INT8_C( 53), INT8_C( 6),
45
+ INT8_C( 40), INT8_C( -67), INT8_C( -91), INT8_C( 65)) },
46
+ { simde_x_vload_s8(INT8_C( -91), INT8_C( -1), INT8_C( 121), INT8_C( 113),
47
+ INT8_C( 96), INT8_C( 24), INT8_C( 122), INT8_C( 73)),
48
+ simde_x_vload_s8(INT8_C( -55), INT8_C( 88), INT8_C( 21), INT8_C( 70),
49
+ INT8_C( 35), INT8_C( 40), INT8_C( 32), INT8_C( 28)),
50
+ simde_x_vload_s8(INT8_C( 110), INT8_C( 87), INT8_C(-114), INT8_C( -73),
51
+ INT8_C(-125), INT8_C( 64), INT8_C(-102), INT8_C( 101)) },
52
+ { simde_x_vload_s8(INT8_C( -55), INT8_C( -59), INT8_C( -17), INT8_C( 34),
53
+ INT8_C( 94), INT8_C( 4), INT8_C( 40), INT8_C( -89)),
54
+ simde_x_vload_s8(INT8_C( 73), INT8_C( 102), INT8_C( 14), INT8_C( 89),
55
+ INT8_C( 24), INT8_C( -86), INT8_C( 109), INT8_C( 103)),
56
+ simde_x_vload_s8(INT8_C( 18), INT8_C( 43), INT8_C( -3), INT8_C( 123),
57
+ INT8_C( 118), INT8_C( -82), INT8_C(-107), INT8_C( 14)) },
58
+ { simde_x_vload_s8(INT8_C( -18), INT8_C( -34), INT8_C( 42), INT8_C(-127),
59
+ INT8_C( 88), INT8_C( 15), INT8_C( -8), INT8_C( -16)),
60
+ simde_x_vload_s8(INT8_C(-110), INT8_C( 39), INT8_C( 65), INT8_C( 80),
61
+ INT8_C(-127), INT8_C( 92), INT8_C( -63), INT8_C(-109)),
62
+ simde_x_vload_s8(INT8_C(-128), INT8_C( 5), INT8_C( 107), INT8_C( -47),
63
+ INT8_C( -39), INT8_C( 107), INT8_C( -71), INT8_C(-125)) },
64
+ { simde_x_vload_s8(INT8_C( 54), INT8_C( 38), INT8_C( -64), INT8_C( -18),
65
+ INT8_C( -51), INT8_C( 46), INT8_C( 19), INT8_C( -51)),
66
+ simde_x_vload_s8(INT8_C(-110), INT8_C( 27), INT8_C(-120), INT8_C( -92),
67
+ INT8_C( -33), INT8_C( 46), INT8_C( -85), INT8_C( -28)),
68
+ simde_x_vload_s8(INT8_C( -56), INT8_C( 65), INT8_C( 72), INT8_C(-110),
69
+ INT8_C( -84), INT8_C( 92), INT8_C( -66), INT8_C( -79)) },
70
+ { simde_x_vload_s8(INT8_C( -42), INT8_C( -16), INT8_C(-101), INT8_C(-127),
71
+ INT8_C(-121), INT8_C( -61), INT8_C( -10), INT8_C( -6)),
72
+ simde_x_vload_s8(INT8_C( 120), INT8_C( 6), INT8_C( -8), INT8_C( -68),
73
+ INT8_C( -10), INT8_C( 70), INT8_C( -5), INT8_C(-113)),
74
+ simde_x_vload_s8(INT8_C( 78), INT8_C( -10), INT8_C(-109), INT8_C( 61),
75
+ INT8_C( 125), INT8_C( 9), INT8_C( -15), INT8_C(-119)) },
76
+ { simde_x_vload_s8(INT8_C( 77), INT8_C( 105), INT8_C( 92), INT8_C( -63),
77
+ INT8_C( -30), INT8_C( -46), INT8_C(-122), INT8_C( 115)),
78
+ simde_x_vload_s8(INT8_C( -65), INT8_C( 75), INT8_C( 11), INT8_C( -2),
79
+ INT8_C( 78), INT8_C( 116), INT8_C( 7), INT8_C( -14)),
80
+ simde_x_vload_s8(INT8_C( 12), INT8_C( -76), INT8_C( 103), INT8_C( -65),
81
+ INT8_C( 48), INT8_C( 70), INT8_C(-115), INT8_C( 101)) },
82
+ { simde_x_vload_s8(INT8_C( 12), INT8_C( -46), INT8_C( 94), INT8_C( 7),
83
+ INT8_C( 6), INT8_C( 96), INT8_C(-120), INT8_C( -98)),
84
+ simde_x_vload_s8(INT8_C( -15), INT8_C( -24), INT8_C( -94), INT8_C( 72),
85
+ INT8_C( 79), INT8_C( 36), INT8_C( 121), INT8_C( -55)),
86
+ simde_x_vload_s8(INT8_C( -3), INT8_C( -70), INT8_C( 0), INT8_C( 79),
87
+ INT8_C( 85), INT8_C(-124), INT8_C( 1), INT8_C( 103)) }
88
+ };
89
+
90
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
91
+ simde_int8x8_t r = simde_vadd_s8(test_vec[i].a, test_vec[i].b);
92
+ simde_neon_assert_int8x8(r, ==, test_vec[i].r);
93
+ }
94
+
95
+ return MUNIT_OK;
96
+ }
97
+
98
+ static MunitResult
99
+ test_simde_vadd_s16(const MunitParameter params[], void* data) {
100
+ (void) params;
101
+ (void) data;
102
+
103
+ const struct {
104
+ simde_int16x4_t a;
105
+ simde_int16x4_t b;
106
+ simde_int16x4_t r;
107
+ } test_vec[8] = {
108
+ { simde_x_vload_s16(INT16_C( -6699), INT16_C(-24206), INT16_C( -1104), INT16_C( 31316)),
109
+ simde_x_vload_s16(INT16_C( 3078), INT16_C( 26051), INT16_C(-15752), INT16_C(-14511)),
110
+ simde_x_vload_s16(INT16_C( -3621), INT16_C( 1845), INT16_C(-16856), INT16_C( 16805)) },
111
+ { simde_x_vload_s16(INT16_C( -91), INT16_C( 29049), INT16_C( 6240), INT16_C( 18810)),
112
+ simde_x_vload_s16(INT16_C( 22729), INT16_C( 17941), INT16_C( 10275), INT16_C( 7200)),
113
+ simde_x_vload_s16(INT16_C( 22638), INT16_C(-18546), INT16_C( 16515), INT16_C( 26010)) },
114
+ { simde_x_vload_s16(INT16_C(-14903), INT16_C( 8943), INT16_C( 1118), INT16_C(-22744)),
115
+ simde_x_vload_s16(INT16_C( 26185), INT16_C( 22798), INT16_C(-21992), INT16_C( 26477)),
116
+ simde_x_vload_s16(INT16_C( 11282), INT16_C( 31741), INT16_C(-20874), INT16_C( 3733)) },
117
+ { simde_x_vload_s16(INT16_C( -8466), INT16_C(-32470), INT16_C( 3928), INT16_C( -3848)),
118
+ simde_x_vload_s16(INT16_C( 10130), INT16_C( 20545), INT16_C( 23681), INT16_C(-27711)),
119
+ simde_x_vload_s16(INT16_C( 1664), INT16_C(-11925), INT16_C( 27609), INT16_C(-31559)) },
120
+ { simde_x_vload_s16(INT16_C( 9782), INT16_C( -4416), INT16_C( 11981), INT16_C(-13037)),
121
+ simde_x_vload_s16(INT16_C( 7058), INT16_C(-23416), INT16_C( 11999), INT16_C( -6997)),
122
+ simde_x_vload_s16(INT16_C( 16840), INT16_C(-27832), INT16_C( 23980), INT16_C(-20034)) },
123
+ { simde_x_vload_s16(INT16_C( -3882), INT16_C(-32357), INT16_C(-15481), INT16_C( -1290)),
124
+ simde_x_vload_s16(INT16_C( 1656), INT16_C(-17160), INT16_C( 18166), INT16_C(-28677)),
125
+ simde_x_vload_s16(INT16_C( -2226), INT16_C( 16019), INT16_C( 2685), INT16_C(-29967)) },
126
+ { simde_x_vload_s16(INT16_C( 26957), INT16_C(-16036), INT16_C(-11550), INT16_C( 29574)),
127
+ simde_x_vload_s16(INT16_C( 19391), INT16_C( -501), INT16_C( 29774), INT16_C( -3577)),
128
+ simde_x_vload_s16(INT16_C(-19188), INT16_C(-16537), INT16_C( 18224), INT16_C( 25997)) },
129
+ { simde_x_vload_s16(INT16_C(-11764), INT16_C( 1886), INT16_C( 24582), INT16_C(-24952)),
130
+ simde_x_vload_s16(INT16_C( -5903), INT16_C( 18594), INT16_C( 9295), INT16_C(-13959)),
131
+ simde_x_vload_s16(INT16_C(-17667), INT16_C( 20480), INT16_C(-31659), INT16_C( 26625)) }
132
+ };
133
+
134
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
135
+ simde_int16x4_t r = simde_vadd_s16(test_vec[i].a, test_vec[i].b);
136
+ simde_neon_assert_int16x4(r, ==, test_vec[i].r);
137
+ }
138
+
139
+ return MUNIT_OK;
140
+ }
141
+
142
+ static MunitResult
143
+ test_simde_vadd_s32(const MunitParameter params[], void* data) {
144
+ (void) params;
145
+ (void) data;
146
+
147
+ const struct {
148
+ simde_int32x2_t a;
149
+ simde_int32x2_t b;
150
+ simde_int32x2_t r;
151
+ } test_vec[8] = {
152
+ { simde_x_vload_s32(INT32_C(-1586305579), INT32_C( 2052389808)),
153
+ simde_x_vload_s32(INT32_C( 1707281414), INT32_C( -950943112)),
154
+ simde_x_vload_s32(INT32_C( 120975835), INT32_C( 1101446696)) },
155
+ { simde_x_vload_s32(INT32_C( 1903820709), INT32_C( 1232738400)),
156
+ simde_x_vload_s32(INT32_C( 1175804105), INT32_C( 471869475)),
157
+ simde_x_vload_s32(INT32_C(-1215342482), INT32_C( 1704607875)) },
158
+ { simde_x_vload_s32(INT32_C( 586139081), INT32_C(-1490549666)),
159
+ simde_x_vload_s32(INT32_C( 1494115913), INT32_C( 1735240216)),
160
+ simde_x_vload_s32(INT32_C( 2080254994), INT32_C( 244690550)) },
161
+ { simde_x_vload_s32(INT32_C(-2127896850), INT32_C( -252178600)),
162
+ simde_x_vload_s32(INT32_C( 1346447250), INT32_C(-1816044415)),
163
+ simde_x_vload_s32(INT32_C( -781449600), INT32_C(-2068223015)) },
164
+ { simde_x_vload_s32(INT32_C( -289397194), INT32_C( -854380851)),
165
+ simde_x_vload_s32(INT32_C(-1534583918), INT32_C( -458543393)),
166
+ simde_x_vload_s32(INT32_C(-1823981112), INT32_C(-1312924244)) },
167
+ { simde_x_vload_s32(INT32_C(-2120486698), INT32_C( -84491385)),
168
+ simde_x_vload_s32(INT32_C(-1124596104), INT32_C(-1879357706)),
169
+ simde_x_vload_s32(INT32_C( 1049884494), INT32_C(-1963849091)) },
170
+ { simde_x_vload_s32(INT32_C(-1050908339), INT32_C( 1938215650)),
171
+ simde_x_vload_s32(INT32_C( -32814145), INT32_C( -234392498)),
172
+ simde_x_vload_s32(INT32_C(-1083722484), INT32_C( 1703823152)) },
173
+ { simde_x_vload_s32(INT32_C( 123654668), INT32_C(-1635229690)),
174
+ simde_x_vload_s32(INT32_C( 1218636017), INT32_C( -914807729)),
175
+ simde_x_vload_s32(INT32_C( 1342290685), INT32_C( 1744929877)) }
176
+ };
177
+
178
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
179
+ simde_int32x2_t r = simde_vadd_s32(test_vec[i].a, test_vec[i].b);
180
+ simde_neon_assert_int32x2(r, ==, test_vec[i].r);
181
+ }
182
+
183
+ return MUNIT_OK;
184
+ }
185
+
186
+ static MunitResult
187
+ test_simde_vadd_s64(const MunitParameter params[], void* data) {
188
+ (void) params;
189
+ (void) data;
190
+
191
+ const struct {
192
+ simde_int64x1_t a;
193
+ simde_int64x1_t b;
194
+ simde_int64x1_t r;
195
+ } test_vec[8] = {
196
+ { simde_x_vload_s64(INT64_C( 8814947106712380885)),
197
+ simde_x_vload_s64(INT64_C(-4084269564689183738)),
198
+ simde_x_vload_s64(INT64_C( 4730677542023197147)) },
199
+ { simde_x_vload_s64(INT64_C( 5294571114427187109)),
200
+ simde_x_vload_s64(INT64_C( 2026663964281493705)),
201
+ simde_x_vload_s64(INT64_C( 7321235078708680814)) },
202
+ { simde_x_vload_s64(INT64_C(-6401862067947584055)),
203
+ simde_x_vload_s64(INT64_C( 7452799979918091849)),
204
+ simde_x_vload_s64(INT64_C( 1050937911970507794)) },
205
+ { simde_x_vload_s64(INT64_C(-1083098837583995154)),
206
+ simde_x_vload_s64(INT64_C(-7799851369162004590)),
207
+ simde_x_vload_s64(INT64_C(-8882950206745999744)) },
208
+ { simde_x_vload_s64(INT64_C(-3669537809368078794)),
209
+ simde_x_vload_s64(INT64_C(-1969428873971491950)),
210
+ simde_x_vload_s64(INT64_C(-5638966683339570744)) },
211
+ { simde_x_vload_s64(INT64_C( -362887733194264362)),
212
+ simde_x_vload_s64(INT64_C(-8071779881585211784)),
213
+ simde_x_vload_s64(INT64_C(-8434667614779476146)) },
214
+ { simde_x_vload_s64(INT64_C( 8324572832589441357)),
215
+ simde_x_vload_s64(INT64_C(-1006708109075592257)),
216
+ simde_x_vload_s64(INT64_C( 7317864723513849100)) },
217
+ { simde_x_vload_s64(INT64_C(-7023258039874563572)),
218
+ simde_x_vload_s64(INT64_C(-3929069276964394767)),
219
+ simde_x_vload_s64(INT64_C( 7494416756870593277)) }
220
+ };
221
+
222
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
223
+ simde_int64x1_t r = simde_vadd_s64(test_vec[i].a, test_vec[i].b);
224
+ simde_neon_assert_int64x1(r, ==, test_vec[i].r);
225
+ }
226
+
227
+ return MUNIT_OK;
228
+ }
229
+
230
+ static MunitResult
231
+ test_simde_vadd_u8(const MunitParameter params[], void* data) {
232
+ (void) params;
233
+ (void) data;
234
+
235
+ const struct {
236
+ simde_uint8x8_t a;
237
+ simde_uint8x8_t b;
238
+ simde_uint8x8_t r;
239
+ } test_vec[8] = {
240
+ { simde_x_vload_u8(UINT8_C(185), UINT8_C(152), UINT8_C(111), UINT8_C(192),
241
+ UINT8_C( 44), UINT8_C( 4), UINT8_C(146), UINT8_C( 3)),
242
+ simde_x_vload_u8(UINT8_C( 93), UINT8_C(234), UINT8_C(190), UINT8_C(171),
243
+ UINT8_C(128), UINT8_C( 70), UINT8_C( 74), UINT8_C(208)),
244
+ simde_x_vload_u8(UINT8_C( 22), UINT8_C(130), UINT8_C( 45), UINT8_C(107),
245
+ UINT8_C(172), UINT8_C( 74), UINT8_C(220), UINT8_C(211)) },
246
+ { simde_x_vload_u8(UINT8_C(103), UINT8_C(234), UINT8_C(135), UINT8_C(173),
247
+ UINT8_C( 44), UINT8_C(235), UINT8_C(155), UINT8_C(167)),
248
+ simde_x_vload_u8(UINT8_C( 22), UINT8_C( 62), UINT8_C( 8), UINT8_C(119),
249
+ UINT8_C( 34), UINT8_C(254), UINT8_C( 15), UINT8_C( 2)),
250
+ simde_x_vload_u8(UINT8_C(125), UINT8_C( 40), UINT8_C(143), UINT8_C( 36),
251
+ UINT8_C( 78), UINT8_C(233), UINT8_C(170), UINT8_C(169)) },
252
+ { simde_x_vload_u8(UINT8_C(220), UINT8_C( 81), UINT8_C(125), UINT8_C(185),
253
+ UINT8_C( 37), UINT8_C(250), UINT8_C(253), UINT8_C( 58)),
254
+ simde_x_vload_u8(UINT8_C(192), UINT8_C(128), UINT8_C(150), UINT8_C(240),
255
+ UINT8_C( 19), UINT8_C(220), UINT8_C( 38), UINT8_C(251)),
256
+ simde_x_vload_u8(UINT8_C(156), UINT8_C(209), UINT8_C( 19), UINT8_C(169),
257
+ UINT8_C( 56), UINT8_C(214), UINT8_C( 35), UINT8_C( 53)) },
258
+ { simde_x_vload_u8(UINT8_C( 15), UINT8_C( 9), UINT8_C(207), UINT8_C(252),
259
+ UINT8_C( 60), UINT8_C(109), UINT8_C(233), UINT8_C( 92)),
260
+ simde_x_vload_u8(UINT8_C( 85), UINT8_C(151), UINT8_C(198), UINT8_C(100),
261
+ UINT8_C( 48), UINT8_C( 65), UINT8_C(192), UINT8_C(194)),
262
+ simde_x_vload_u8(UINT8_C(100), UINT8_C(160), UINT8_C(149), UINT8_C( 96),
263
+ UINT8_C(108), UINT8_C(174), UINT8_C(169), UINT8_C( 30)) },
264
+ { simde_x_vload_u8(UINT8_C( 72), UINT8_C(234), UINT8_C(163), UINT8_C( 48),
265
+ UINT8_C( 0), UINT8_C( 65), UINT8_C(140), UINT8_C(131)),
266
+ simde_x_vload_u8(UINT8_C( 71), UINT8_C( 13), UINT8_C(157), UINT8_C(236),
267
+ UINT8_C(180), UINT8_C(139), UINT8_C(204), UINT8_C( 25)),
268
+ simde_x_vload_u8(UINT8_C(143), UINT8_C(247), UINT8_C( 64), UINT8_C( 28),
269
+ UINT8_C(180), UINT8_C(204), UINT8_C( 88), UINT8_C(156)) },
270
+ { simde_x_vload_u8(UINT8_C( 44), UINT8_C(197), UINT8_C( 43), UINT8_C(200),
271
+ UINT8_C(195), UINT8_C(185), UINT8_C( 14), UINT8_C( 97)),
272
+ simde_x_vload_u8(UINT8_C(223), UINT8_C(246), UINT8_C(129), UINT8_C(240),
273
+ UINT8_C(147), UINT8_C( 17), UINT8_C( 38), UINT8_C( 40)),
274
+ simde_x_vload_u8(UINT8_C( 11), UINT8_C(187), UINT8_C(172), UINT8_C(184),
275
+ UINT8_C( 86), UINT8_C(202), UINT8_C( 52), UINT8_C(137)) },
276
+ { simde_x_vload_u8(UINT8_C(247), UINT8_C( 58), UINT8_C( 56), UINT8_C(135),
277
+ UINT8_C(202), UINT8_C( 44), UINT8_C( 87), UINT8_C(202)),
278
+ simde_x_vload_u8(UINT8_C(129), UINT8_C( 30), UINT8_C( 48), UINT8_C(194),
279
+ UINT8_C( 89), UINT8_C(122), UINT8_C(115), UINT8_C(161)),
280
+ simde_x_vload_u8(UINT8_C(120), UINT8_C( 88), UINT8_C(104), UINT8_C( 73),
281
+ UINT8_C( 35), UINT8_C(166), UINT8_C(202), UINT8_C(107)) },
282
+ { simde_x_vload_u8(UINT8_C(179), UINT8_C( 3), UINT8_C(235), UINT8_C(114),
283
+ UINT8_C(108), UINT8_C(170), UINT8_C(174), UINT8_C(140)),
284
+ simde_x_vload_u8(UINT8_C(166), UINT8_C(255), UINT8_C(112), UINT8_C(161),
285
+ UINT8_C( 0), UINT8_C(151), UINT8_C( 43), UINT8_C(160)),
286
+ simde_x_vload_u8(UINT8_C( 89), UINT8_C( 2), UINT8_C( 91), UINT8_C( 19),
287
+ UINT8_C(108), UINT8_C( 65), UINT8_C(217), UINT8_C( 44)) }
288
+ };
289
+
290
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
291
+ simde_uint8x8_t r = simde_vadd_u8(test_vec[i].a, test_vec[i].b);
292
+ simde_neon_assert_uint8x8(r, ==, test_vec[i].r);
293
+ }
294
+
295
+ return MUNIT_OK;
296
+ }
297
+
298
+ static MunitResult
299
+ test_simde_vadd_u16(const MunitParameter params[], void* data) {
300
+ (void) params;
301
+ (void) data;
302
+
303
+ const struct {
304
+ simde_uint16x4_t a;
305
+ simde_uint16x4_t b;
306
+ simde_uint16x4_t r;
307
+ } test_vec[8] = {
308
+ { simde_x_vload_u16(UINT16_C(39097), UINT16_C(49263), UINT16_C( 1068), UINT16_C( 914)),
309
+ simde_x_vload_u16(UINT16_C(59997), UINT16_C(43966), UINT16_C(18048), UINT16_C(53322)),
310
+ simde_x_vload_u16(UINT16_C(33558), UINT16_C(27693), UINT16_C(19116), UINT16_C(54236)) },
311
+ { simde_x_vload_u16(UINT16_C(60007), UINT16_C(44423), UINT16_C(60204), UINT16_C(42907)),
312
+ simde_x_vload_u16(UINT16_C(15894), UINT16_C(30472), UINT16_C(65058), UINT16_C( 527)),
313
+ simde_x_vload_u16(UINT16_C(10365), UINT16_C( 9359), UINT16_C(59726), UINT16_C(43434)) },
314
+ { simde_x_vload_u16(UINT16_C(20956), UINT16_C(47485), UINT16_C(64037), UINT16_C(15101)),
315
+ simde_x_vload_u16(UINT16_C(32960), UINT16_C(61590), UINT16_C(56339), UINT16_C(64294)),
316
+ simde_x_vload_u16(UINT16_C(53916), UINT16_C(43539), UINT16_C(54840), UINT16_C(13859)) },
317
+ { simde_x_vload_u16(UINT16_C( 2319), UINT16_C(64719), UINT16_C(27964), UINT16_C(23785)),
318
+ simde_x_vload_u16(UINT16_C(38741), UINT16_C(25798), UINT16_C(16688), UINT16_C(49856)),
319
+ simde_x_vload_u16(UINT16_C(41060), UINT16_C(24981), UINT16_C(44652), UINT16_C( 8105)) },
320
+ { simde_x_vload_u16(UINT16_C(59976), UINT16_C(12451), UINT16_C(16640), UINT16_C(33676)),
321
+ simde_x_vload_u16(UINT16_C( 3399), UINT16_C(60573), UINT16_C(35764), UINT16_C( 6604)),
322
+ simde_x_vload_u16(UINT16_C(63375), UINT16_C( 7488), UINT16_C(52404), UINT16_C(40280)) },
323
+ { simde_x_vload_u16(UINT16_C(50476), UINT16_C(51243), UINT16_C(47555), UINT16_C(24846)),
324
+ simde_x_vload_u16(UINT16_C(63199), UINT16_C(61569), UINT16_C( 4499), UINT16_C(10278)),
325
+ simde_x_vload_u16(UINT16_C(48139), UINT16_C(47276), UINT16_C(52054), UINT16_C(35124)) },
326
+ { simde_x_vload_u16(UINT16_C(15095), UINT16_C(34616), UINT16_C(11466), UINT16_C(51799)),
327
+ simde_x_vload_u16(UINT16_C( 7809), UINT16_C(49712), UINT16_C(31321), UINT16_C(41331)),
328
+ simde_x_vload_u16(UINT16_C(22904), UINT16_C(18792), UINT16_C(42787), UINT16_C(27594)) },
329
+ { simde_x_vload_u16(UINT16_C( 947), UINT16_C(29419), UINT16_C(43628), UINT16_C(36014)),
330
+ simde_x_vload_u16(UINT16_C(65446), UINT16_C(41328), UINT16_C(38656), UINT16_C(41003)),
331
+ simde_x_vload_u16(UINT16_C( 857), UINT16_C( 5211), UINT16_C(16748), UINT16_C(11481)) }
332
+ };
333
+
334
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
335
+ simde_uint16x4_t r = simde_vadd_u16(test_vec[i].a, test_vec[i].b);
336
+ simde_neon_assert_uint16x4(r, ==, test_vec[i].r);
337
+ }
338
+
339
+ return MUNIT_OK;
340
+ }
341
+
342
+ static MunitResult
343
+ test_simde_vadd_u32(const MunitParameter params[], void* data) {
344
+ (void) params;
345
+ (void) data;
346
+
347
+ const struct {
348
+ simde_uint32x2_t a;
349
+ simde_uint32x2_t b;
350
+ simde_uint32x2_t r;
351
+ } test_vec[8] = {
352
+ { simde_x_vload_u32(UINT32_C(3228539065), UINT32_C( 59900972)),
353
+ simde_x_vload_u32(UINT32_C(2881415773), UINT32_C(3494528640)),
354
+ simde_x_vload_u32(UINT32_C(1814987542), UINT32_C(3554429612)) },
355
+ { simde_x_vload_u32(UINT32_C(2911365735), UINT32_C(2812013356)),
356
+ simde_x_vload_u32(UINT32_C(1997028886), UINT32_C( 34602530)),
357
+ simde_x_vload_u32(UINT32_C( 613427325), UINT32_C(2846615886)) },
358
+ { simde_x_vload_u32(UINT32_C(3111997916), UINT32_C( 989723173)),
359
+ simde_x_vload_u32(UINT32_C(4036395200), UINT32_C(4213627923)),
360
+ simde_x_vload_u32(UINT32_C(2853425820), UINT32_C( 908383800)) },
361
+ { simde_x_vload_u32(UINT32_C(4241426703), UINT32_C(1558801724)),
362
+ simde_x_vload_u32(UINT32_C(1690736469), UINT32_C(3267379504)),
363
+ simde_x_vload_u32(UINT32_C(1637195876), UINT32_C( 531213932)) },
364
+ { simde_x_vload_u32(UINT32_C( 816048712), UINT32_C(2207006976)),
365
+ simde_x_vload_u32(UINT32_C(3969715527), UINT32_C( 432835508)),
366
+ simde_x_vload_u32(UINT32_C( 490796943), UINT32_C(2639842484)) },
367
+ { simde_x_vload_u32(UINT32_C(3358311724), UINT32_C(1628355011)),
368
+ simde_x_vload_u32(UINT32_C(4035049183), UINT32_C( 673583507)),
369
+ simde_x_vload_u32(UINT32_C(3098393611), UINT32_C(2301938518)) },
370
+ { simde_x_vload_u32(UINT32_C(2268609271), UINT32_C(3394710730)),
371
+ simde_x_vload_u32(UINT32_C(3257933441), UINT32_C(2708699737)),
372
+ simde_x_vload_u32(UINT32_C(1231575416), UINT32_C(1808443171)) },
373
+ { simde_x_vload_u32(UINT32_C(1928004531), UINT32_C(2360257132)),
374
+ simde_x_vload_u32(UINT32_C(2708537254), UINT32_C(2687211264)),
375
+ simde_x_vload_u32(UINT32_C( 341574489), UINT32_C( 752501100)) }
376
+ };
377
+
378
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
379
+ simde_uint32x2_t r = simde_vadd_u32(test_vec[i].a, test_vec[i].b);
380
+ simde_neon_assert_uint32x2(r, ==, test_vec[i].r);
381
+ }
382
+
383
+ return MUNIT_OK;
384
+ }
385
+
386
+ static MunitResult
387
+ test_simde_vadd_u64(const MunitParameter params[], void* data) {
388
+ (void) params;
389
+ (void) data;
390
+
391
+ const struct {
392
+ simde_uint64x1_t a;
393
+ simde_uint64x1_t b;
394
+ simde_uint64x1_t r;
395
+ } test_vec[8] = {
396
+ { simde_x_vload_u64(UINT64_C(2988365797476798144)),
397
+ simde_x_vload_u64(UINT64_C(14536346859563613917)),
398
+ simde_x_vload_u64(UINT64_C(17524712657040412061)) },
399
+ { simde_x_vload_u64(UINT64_C(5678633365736443338)),
400
+ simde_x_vload_u64(UINT64_C(4940129491139631581)),
401
+ simde_x_vload_u64(UINT64_C(10618762856876074919)) },
402
+ { simde_x_vload_u64(UINT64_C( 29909639398620333)),
403
+ simde_x_vload_u64(UINT64_C(8546208132393020897)),
404
+ simde_x_vload_u64(UINT64_C(8576117771791641230)) },
405
+ { simde_x_vload_u64(UINT64_C(9321457332119617943)),
406
+ simde_x_vload_u64(UINT64_C(18128308684460165007)),
407
+ simde_x_vload_u64(UINT64_C(9003021942870231334)) },
408
+ { simde_x_vload_u64(UINT64_C(8923015922424851036)),
409
+ simde_x_vload_u64(UINT64_C(3997597374735367052)),
410
+ simde_x_vload_u64(UINT64_C(12920613297160218088)) },
411
+ { simde_x_vload_u64(UINT64_C(4178088500218833773)),
412
+ simde_x_vload_u64(UINT64_C(17782660096017580449)),
413
+ simde_x_vload_u64(UINT64_C(3514004522526862606)) },
414
+ { simde_x_vload_u64(UINT64_C(11558839574564786513)),
415
+ simde_x_vload_u64(UINT64_C(14330555088518900538)),
416
+ simde_x_vload_u64(UINT64_C(7442650589374135435)) },
417
+ { simde_x_vload_u64(UINT64_C(4522764093253119630)),
418
+ simde_x_vload_u64(UINT64_C(15810665949067353962)),
419
+ simde_x_vload_u64(UINT64_C(1886685968610921976)) }
420
+ };
421
+
422
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
423
+ simde_uint64x1_t r = simde_vadd_u64(test_vec[i].a, test_vec[i].b);
424
+ simde_neon_assert_uint64x1(r, ==, test_vec[i].r);
425
+ }
426
+
427
+ return MUNIT_OK;
428
+ }
429
+
430
+ static MunitResult
431
+ test_simde_vadd_f32(const MunitParameter params[], void* data) {
432
+ (void) params;
433
+ (void) data;
434
+
435
+ const struct {
436
+ simde_float32x2_t a;
437
+ simde_float32x2_t b;
438
+ simde_float32x2_t r;
439
+ } test_vec[8] = {
440
+ { simde_x_vload_f32(SIMDE_FLOAT32_C( -834.90), SIMDE_FLOAT32_C( 684.58)),
441
+ simde_x_vload_f32(SIMDE_FLOAT32_C( -781.01), SIMDE_FLOAT32_C( 417.00)),
442
+ simde_x_vload_f32(SIMDE_FLOAT32_C(-1615.91), SIMDE_FLOAT32_C( 1101.58)) },
443
+ { simde_x_vload_f32(SIMDE_FLOAT32_C( -723.37), SIMDE_FLOAT32_C( 743.19)),
444
+ simde_x_vload_f32(SIMDE_FLOAT32_C( -5.84), SIMDE_FLOAT32_C( 244.51)),
445
+ simde_x_vload_f32(SIMDE_FLOAT32_C( -729.21), SIMDE_FLOAT32_C( 987.70)) },
446
+ { simde_x_vload_f32(SIMDE_FLOAT32_C( 604.56), SIMDE_FLOAT32_C( 504.88)),
447
+ simde_x_vload_f32(SIMDE_FLOAT32_C( 347.99), SIMDE_FLOAT32_C( -637.93)),
448
+ simde_x_vload_f32(SIMDE_FLOAT32_C( 952.55), SIMDE_FLOAT32_C( -133.05)) },
449
+ { simde_x_vload_f32(SIMDE_FLOAT32_C( -410.97), SIMDE_FLOAT32_C( -536.76)),
450
+ simde_x_vload_f32(SIMDE_FLOAT32_C( 364.65), SIMDE_FLOAT32_C( 953.49)),
451
+ simde_x_vload_f32(SIMDE_FLOAT32_C( -46.32), SIMDE_FLOAT32_C( 416.73)) },
452
+ { simde_x_vload_f32(SIMDE_FLOAT32_C( -705.16), SIMDE_FLOAT32_C( -740.50)),
453
+ simde_x_vload_f32(SIMDE_FLOAT32_C( -539.36), SIMDE_FLOAT32_C( 287.38)),
454
+ simde_x_vload_f32(SIMDE_FLOAT32_C(-1244.52), SIMDE_FLOAT32_C( -453.12)) },
455
+ { simde_x_vload_f32(SIMDE_FLOAT32_C( -693.05), SIMDE_FLOAT32_C( 261.81)),
456
+ simde_x_vload_f32(SIMDE_FLOAT32_C( -149.85), SIMDE_FLOAT32_C( 15.54)),
457
+ simde_x_vload_f32(SIMDE_FLOAT32_C( -842.90), SIMDE_FLOAT32_C( 277.35)) },
458
+ { simde_x_vload_f32(SIMDE_FLOAT32_C( 190.69), SIMDE_FLOAT32_C( 179.84)),
459
+ simde_x_vload_f32(SIMDE_FLOAT32_C( 846.94), SIMDE_FLOAT32_C( 141.87)),
460
+ simde_x_vload_f32(SIMDE_FLOAT32_C( 1037.63), SIMDE_FLOAT32_C( 321.71)) },
461
+ { simde_x_vload_f32(SIMDE_FLOAT32_C( -309.61), SIMDE_FLOAT32_C( -413.80)),
462
+ simde_x_vload_f32(SIMDE_FLOAT32_C( 924.34), SIMDE_FLOAT32_C( -825.49)),
463
+ simde_x_vload_f32(SIMDE_FLOAT32_C( 614.73), SIMDE_FLOAT32_C(-1239.29)) }
464
+ };
465
+
466
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
467
+ simde_float32x2_t r = simde_vadd_f32(test_vec[i].a, test_vec[i].b);
468
+ simde_neon_assert_float32x2_equal(r, test_vec[i].r, 1);
469
+ }
470
+
471
+ return MUNIT_OK;
472
+ }
473
+
474
+ static MunitResult
475
+ test_simde_vadd_f64(const MunitParameter params[], void* data) {
476
+ (void) params;
477
+ (void) data;
478
+
479
+ const struct {
480
+ simde_float64x1_t a;
481
+ simde_float64x1_t b;
482
+ simde_float64x1_t r;
483
+ } test_vec[8] = {
484
+ { simde_x_vload_f64(SIMDE_FLOAT64_C( -834.90)),
485
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 684.58)),
486
+ simde_x_vload_f64(SIMDE_FLOAT64_C( -150.32)) },
487
+ { simde_x_vload_f64(SIMDE_FLOAT64_C( -781.01)),
488
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 417.00)),
489
+ simde_x_vload_f64(SIMDE_FLOAT64_C( -364.01)) },
490
+ { simde_x_vload_f64(SIMDE_FLOAT64_C( -723.37)),
491
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 743.19)),
492
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 19.82)) },
493
+ { simde_x_vload_f64(SIMDE_FLOAT64_C( -5.84)),
494
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 244.51)),
495
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 238.67)) },
496
+ { simde_x_vload_f64(SIMDE_FLOAT64_C( 604.56)),
497
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 504.88)),
498
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 1109.44)) },
499
+ { simde_x_vload_f64(SIMDE_FLOAT64_C( 347.99)),
500
+ simde_x_vload_f64(SIMDE_FLOAT64_C( -637.93)),
501
+ simde_x_vload_f64(SIMDE_FLOAT64_C( -289.94)) },
502
+ { simde_x_vload_f64(SIMDE_FLOAT64_C( -410.97)),
503
+ simde_x_vload_f64(SIMDE_FLOAT64_C( -536.76)),
504
+ simde_x_vload_f64(SIMDE_FLOAT64_C( -947.73)) },
505
+ { simde_x_vload_f64(SIMDE_FLOAT64_C( 364.65)),
506
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 953.49)),
507
+ simde_x_vload_f64(SIMDE_FLOAT64_C( 1318.14)) }
508
+ };
509
+
510
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
511
+ simde_float64x1_t r = simde_vadd_f64(test_vec[i].a, test_vec[i].b);
512
+ simde_neon_assert_float64x1_equal(r, test_vec[i].r, 1);
513
+ }
514
+
515
+ return MUNIT_OK;
516
+ }
517
+
518
+ static MunitResult
519
+ test_simde_vaddq_s8(const MunitParameter params[], void* data) {
520
+ (void) params;
521
+ (void) data;
522
+
523
+ const struct {
524
+ simde_int8x16_t a;
525
+ simde_int8x16_t b;
526
+ simde_int8x16_t r;
527
+ } test_vec[8] = {
528
+ { simde_x_vloadq_s8(INT8_C( 53), INT8_C( 15), INT8_C( -70), INT8_C( 118),
529
+ INT8_C( -6), INT8_C( -39), INT8_C( -36), INT8_C( 27),
530
+ INT8_C( 1), INT8_C( 43), INT8_C( 75), INT8_C( -90),
531
+ INT8_C(-125), INT8_C(-112), INT8_C( 64), INT8_C( -44)),
532
+ simde_x_vloadq_s8(INT8_C( -32), INT8_C( -57), INT8_C( 5), INT8_C( 114),
533
+ INT8_C( -78), INT8_C( 24), INT8_C( 115), INT8_C( 9),
534
+ INT8_C( 50), INT8_C(-122), INT8_C( 38), INT8_C( 39),
535
+ INT8_C( 82), INT8_C( 11), INT8_C( 39), INT8_C( 85)),
536
+ simde_x_vloadq_s8(INT8_C( 21), INT8_C( -42), INT8_C( -65), INT8_C( -24),
537
+ INT8_C( -84), INT8_C( -15), INT8_C( 79), INT8_C( 36),
538
+ INT8_C( 51), INT8_C( -79), INT8_C( 113), INT8_C( -51),
539
+ INT8_C( -43), INT8_C(-101), INT8_C( 103), INT8_C( 41)) },
540
+ { simde_x_vloadq_s8(INT8_C( 26), INT8_C( 34), INT8_C( -69), INT8_C( 50),
541
+ INT8_C( -20), INT8_C( 105), INT8_C( 74), INT8_C( 96),
542
+ INT8_C( 80), INT8_C(-106), INT8_C( 105), INT8_C( 50),
543
+ INT8_C( -86), INT8_C( 106), INT8_C( 4), INT8_C( 54)),
544
+ simde_x_vloadq_s8(INT8_C( 37), INT8_C( -63), INT8_C( -54), INT8_C( 84),
545
+ INT8_C( 123), INT8_C( 44), INT8_C( 65), INT8_C( -23),
546
+ INT8_C( 109), INT8_C( -83), INT8_C( 8), INT8_C( 112),
547
+ INT8_C( 122), INT8_C( -89), INT8_C(-126), INT8_C( 111)),
548
+ simde_x_vloadq_s8(INT8_C( 63), INT8_C( -29), INT8_C(-123), INT8_C(-122),
549
+ INT8_C( 103), INT8_C(-107), INT8_C(-117), INT8_C( 73),
550
+ INT8_C( -67), INT8_C( 67), INT8_C( 113), INT8_C( -94),
551
+ INT8_C( 36), INT8_C( 17), INT8_C(-122), INT8_C( -91)) },
552
+ { simde_x_vloadq_s8(INT8_C( 70), INT8_C( 44), INT8_C(-119), INT8_C( 109),
553
+ INT8_C( 43), INT8_C( -72), INT8_C( -50), INT8_C( 23),
554
+ INT8_C( 99), INT8_C( 79), INT8_C( -34), INT8_C( 42),
555
+ INT8_C( 17), INT8_C( 6), INT8_C( 107), INT8_C( -47)),
556
+ simde_x_vloadq_s8(INT8_C(-104), INT8_C( -54), INT8_C( 81), INT8_C( -59),
557
+ INT8_C( 7), INT8_C( 72), INT8_C( 109), INT8_C( 54),
558
+ INT8_C( 65), INT8_C( 40), INT8_C( -74), INT8_C( 54),
559
+ INT8_C( 49), INT8_C( -36), INT8_C( 4), INT8_C( 70)),
560
+ simde_x_vloadq_s8(INT8_C( -34), INT8_C( -10), INT8_C( -38), INT8_C( 50),
561
+ INT8_C( 50), INT8_C( 0), INT8_C( 59), INT8_C( 77),
562
+ INT8_C( -92), INT8_C( 119), INT8_C(-108), INT8_C( 96),
563
+ INT8_C( 66), INT8_C( -30), INT8_C( 111), INT8_C( 23)) },
564
+ { simde_x_vloadq_s8(INT8_C( 84), INT8_C( 50), INT8_C( -1), INT8_C( 124),
565
+ INT8_C( -16), INT8_C( 60), INT8_C( 71), INT8_C( 96),
566
+ INT8_C( 88), INT8_C( 55), INT8_C( -28), INT8_C(-102),
567
+ INT8_C(-110), INT8_C( 98), INT8_C(-122), INT8_C( -47)),
568
+ simde_x_vloadq_s8(INT8_C( -32), INT8_C( 44), INT8_C( -49), INT8_C( 34),
569
+ INT8_C( 41), INT8_C( 91), INT8_C( -87), INT8_C( 18),
570
+ INT8_C( 67), INT8_C( -69), INT8_C( -17), INT8_C( 15),
571
+ INT8_C( -51), INT8_C(-117), INT8_C(-122), INT8_C( 81)),
572
+ simde_x_vloadq_s8(INT8_C( 52), INT8_C( 94), INT8_C( -50), INT8_C( -98),
573
+ INT8_C( 25), INT8_C(-105), INT8_C( -16), INT8_C( 114),
574
+ INT8_C(-101), INT8_C( -14), INT8_C( -45), INT8_C( -87),
575
+ INT8_C( 95), INT8_C( -19), INT8_C( 12), INT8_C( 34)) },
576
+ { simde_x_vloadq_s8(INT8_C(-101), INT8_C(-111), INT8_C( -83), INT8_C( -75),
577
+ INT8_C(-114), INT8_C( 70), INT8_C(-116), INT8_C( -78),
578
+ INT8_C( 99), INT8_C( 72), INT8_C( -50), INT8_C( -21),
579
+ INT8_C( 21), INT8_C( 114), INT8_C( -80), INT8_C( -56)),
580
+ simde_x_vloadq_s8(INT8_C(-127), INT8_C( -98), INT8_C( -63), INT8_C(-121),
581
+ INT8_C( -91), INT8_C( 97), INT8_C( 75), INT8_C( 47),
582
+ INT8_C( -20), INT8_C( -87), INT8_C( 55), INT8_C( 127),
583
+ INT8_C( -46), INT8_C( 79), INT8_C( 66), INT8_C( -94)),
584
+ simde_x_vloadq_s8(INT8_C( 28), INT8_C( 47), INT8_C( 110), INT8_C( 60),
585
+ INT8_C( 51), INT8_C( -89), INT8_C( -41), INT8_C( -31),
586
+ INT8_C( 79), INT8_C( -15), INT8_C( 5), INT8_C( 106),
587
+ INT8_C( -25), INT8_C( -63), INT8_C( -14), INT8_C( 106)) },
588
+ { simde_x_vloadq_s8(INT8_C( 118), INT8_C( 124), INT8_C( 52), INT8_C( 99),
589
+ INT8_C(-111), INT8_C( -18), INT8_C( -39), INT8_C( 66),
590
+ INT8_C( 89), INT8_C( 66), INT8_C( -38), INT8_C( -40),
591
+ INT8_C( -16), INT8_C( -47), INT8_C( 79), INT8_C( 123)),
592
+ simde_x_vloadq_s8(INT8_C(-100), INT8_C( 50), INT8_C( -86), INT8_C( 68),
593
+ INT8_C(-114), INT8_C( 55), INT8_C( -89), INT8_C(-125),
594
+ INT8_C( 24), INT8_C(-108), INT8_C( -96), INT8_C( 79),
595
+ INT8_C( -73), INT8_C( -30), INT8_C( 20), INT8_C( 8)),
596
+ simde_x_vloadq_s8(INT8_C( 18), INT8_C( -82), INT8_C( -34), INT8_C( -89),
597
+ INT8_C( 31), INT8_C( 37), INT8_C(-128), INT8_C( -59),
598
+ INT8_C( 113), INT8_C( -42), INT8_C( 122), INT8_C( 39),
599
+ INT8_C( -89), INT8_C( -77), INT8_C( 99), INT8_C(-125)) },
600
+ { simde_x_vloadq_s8(INT8_C( 109), INT8_C( -88), INT8_C( 118), INT8_C( 45),
601
+ INT8_C( -31), INT8_C( -50), INT8_C( 46), INT8_C( 10),
602
+ INT8_C( -66), INT8_C( 77), INT8_C( -14), INT8_C( 46),
603
+ INT8_C( 14), INT8_C( -8), INT8_C( 49), INT8_C( 81)),
604
+ simde_x_vloadq_s8(INT8_C( 45), INT8_C( -99), INT8_C( -3), INT8_C( 63),
605
+ INT8_C( -31), INT8_C( -61), INT8_C( -34), INT8_C( -95),
606
+ INT8_C( 24), INT8_C( 6), INT8_C(-122), INT8_C( -15),
607
+ INT8_C( 80), INT8_C(-105), INT8_C( 91), INT8_C( -78)),
608
+ simde_x_vloadq_s8(INT8_C(-102), INT8_C( 69), INT8_C( 115), INT8_C( 108),
609
+ INT8_C( -62), INT8_C(-111), INT8_C( 12), INT8_C( -85),
610
+ INT8_C( -42), INT8_C( 83), INT8_C( 120), INT8_C( 31),
611
+ INT8_C( 94), INT8_C(-113), INT8_C(-116), INT8_C( 3)) },
612
+ { simde_x_vloadq_s8(INT8_C(-127), INT8_C( -39), INT8_C( -66), INT8_C(-127),
613
+ INT8_C( 120), INT8_C( -61), INT8_C( -4), INT8_C( -67),
614
+ INT8_C( 101), INT8_C( -46), INT8_C( -28), INT8_C( -35),
615
+ INT8_C( 73), INT8_C( -80), INT8_C( -70), INT8_C( 33)),
616
+ simde_x_vloadq_s8(INT8_C(-120), INT8_C( 119), INT8_C( 102), INT8_C( -58),
617
+ INT8_C( -14), INT8_C( -11), INT8_C( -39), INT8_C( 65),
618
+ INT8_C( -62), INT8_C( -79), INT8_C( -52), INT8_C( 112),
619
+ INT8_C(-104), INT8_C( -95), INT8_C( 77), INT8_C( -82)),
620
+ simde_x_vloadq_s8(INT8_C( 9), INT8_C( 80), INT8_C( 36), INT8_C( 71),
621
+ INT8_C( 106), INT8_C( -72), INT8_C( -43), INT8_C( -2),
622
+ INT8_C( 39), INT8_C(-125), INT8_C( -80), INT8_C( 77),
623
+ INT8_C( -31), INT8_C( 81), INT8_C( 7), INT8_C( -49)) }
624
+ };
625
+
626
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
627
+ simde_int8x16_t r = simde_vaddq_s8(test_vec[i].a, test_vec[i].b);
628
+ simde_neon_assert_int8x16(r, ==, test_vec[i].r);
629
+ }
630
+
631
+ return MUNIT_OK;
632
+ }
633
+
634
+ static MunitResult
635
+ test_simde_vaddq_s16(const MunitParameter params[], void* data) {
636
+ (void) params;
637
+ (void) data;
638
+
639
+ const struct {
640
+ simde_int16x8_t a;
641
+ simde_int16x8_t b;
642
+ simde_int16x8_t r;
643
+ } test_vec[8] = {
644
+ { simde_x_vloadq_s16(INT16_C( 3893), INT16_C( 30394), INT16_C( -9734), INT16_C( 7132),
645
+ INT16_C( 11009), INT16_C(-22965), INT16_C(-28541), INT16_C(-11200)),
646
+ simde_x_vloadq_s16(INT16_C(-14368), INT16_C( 29189), INT16_C( 6322), INT16_C( 2419),
647
+ INT16_C(-31182), INT16_C( 10022), INT16_C( 2898), INT16_C( 21799)),
648
+ simde_x_vloadq_s16(INT16_C(-10475), INT16_C( -5953), INT16_C( -3412), INT16_C( 9551),
649
+ INT16_C(-20173), INT16_C(-12943), INT16_C(-25643), INT16_C( 10599)) },
650
+ { simde_x_vloadq_s16(INT16_C( 8730), INT16_C( 12987), INT16_C( 27116), INT16_C( 24650),
651
+ INT16_C(-27056), INT16_C( 12905), INT16_C( 27306), INT16_C( 13828)),
652
+ simde_x_vloadq_s16(INT16_C(-16091), INT16_C( 21706), INT16_C( 11387), INT16_C( -5823),
653
+ INT16_C(-21139), INT16_C( 28680), INT16_C(-22662), INT16_C( 28546)),
654
+ simde_x_vloadq_s16(INT16_C( -7361), INT16_C(-30843), INT16_C(-27033), INT16_C( 18827),
655
+ INT16_C( 17341), INT16_C(-23951), INT16_C( 4644), INT16_C(-23162)) },
656
+ { simde_x_vloadq_s16(INT16_C( 11334), INT16_C( 28041), INT16_C(-18389), INT16_C( 6094),
657
+ INT16_C( 20323), INT16_C( 10974), INT16_C( 1553), INT16_C(-11925)),
658
+ simde_x_vloadq_s16(INT16_C(-13672), INT16_C(-15023), INT16_C( 18439), INT16_C( 13933),
659
+ INT16_C( 10305), INT16_C( 14006), INT16_C( -9167), INT16_C( 17924)),
660
+ simde_x_vloadq_s16(INT16_C( -2338), INT16_C( 13018), INT16_C( 50), INT16_C( 20027),
661
+ INT16_C( 30628), INT16_C( 24980), INT16_C( -7614), INT16_C( 5999)) },
662
+ { simde_x_vloadq_s16(INT16_C( 12884), INT16_C( 31999), INT16_C( 15600), INT16_C( 24647),
663
+ INT16_C( 14168), INT16_C(-25884), INT16_C( 25234), INT16_C(-11898)),
664
+ simde_x_vloadq_s16(INT16_C( 11488), INT16_C( 8911), INT16_C( 23337), INT16_C( 4777),
665
+ INT16_C(-17597), INT16_C( 4079), INT16_C(-29747), INT16_C( 20870)),
666
+ simde_x_vloadq_s16(INT16_C( 24372), INT16_C(-24626), INT16_C(-26599), INT16_C( 29424),
667
+ INT16_C( -3429), INT16_C(-21805), INT16_C( -4513), INT16_C( 8972)) },
668
+ { simde_x_vloadq_s16(INT16_C(-28261), INT16_C(-19027), INT16_C( 18062), INT16_C(-19828),
669
+ INT16_C( 18531), INT16_C( -5170), INT16_C( 29205), INT16_C(-14160)),
670
+ simde_x_vloadq_s16(INT16_C(-24959), INT16_C(-30783), INT16_C( 24997), INT16_C( 12107),
671
+ INT16_C(-22036), INT16_C( 32567), INT16_C( 20434), INT16_C(-23998)),
672
+ simde_x_vloadq_s16(INT16_C( 12316), INT16_C( 15726), INT16_C(-22477), INT16_C( -7721),
673
+ INT16_C( -3505), INT16_C( 27397), INT16_C(-15897), INT16_C( 27378)) },
674
+ { simde_x_vloadq_s16(INT16_C( 31862), INT16_C( 25396), INT16_C( -4463), INT16_C( 17113),
675
+ INT16_C( 16985), INT16_C(-10022), INT16_C(-11792), INT16_C( 31567)),
676
+ simde_x_vloadq_s16(INT16_C( 12956), INT16_C( 17578), INT16_C( 14222), INT16_C(-31833),
677
+ INT16_C(-27624), INT16_C( 20384), INT16_C( -7497), INT16_C( 2068)),
678
+ simde_x_vloadq_s16(INT16_C(-20718), INT16_C(-22562), INT16_C( 9759), INT16_C(-14720),
679
+ INT16_C(-10639), INT16_C( 10362), INT16_C(-19289), INT16_C(-31901)) },
680
+ { simde_x_vloadq_s16(INT16_C(-22419), INT16_C( 11638), INT16_C(-12575), INT16_C( 2606),
681
+ INT16_C( 19902), INT16_C( 12018), INT16_C( -2034), INT16_C( 20785)),
682
+ simde_x_vloadq_s16(INT16_C(-25299), INT16_C( 16381), INT16_C(-15391), INT16_C(-24098),
683
+ INT16_C( 1560), INT16_C( -3706), INT16_C(-26800), INT16_C(-19877)),
684
+ simde_x_vloadq_s16(INT16_C( 17818), INT16_C( 28019), INT16_C(-27966), INT16_C(-21492),
685
+ INT16_C( 21462), INT16_C( 8312), INT16_C(-28834), INT16_C( 908)) },
686
+ { simde_x_vloadq_s16(INT16_C( -9855), INT16_C(-32322), INT16_C(-15496), INT16_C(-16900),
687
+ INT16_C(-11675), INT16_C( -8732), INT16_C(-20407), INT16_C( 8634)),
688
+ simde_x_vloadq_s16(INT16_C( 30600), INT16_C(-14746), INT16_C( -2574), INT16_C( 16857),
689
+ INT16_C(-20030), INT16_C( 28876), INT16_C(-24168), INT16_C(-20915)),
690
+ simde_x_vloadq_s16(INT16_C( 20745), INT16_C( 18468), INT16_C(-18070), INT16_C( -43),
691
+ INT16_C(-31705), INT16_C( 20144), INT16_C( 20961), INT16_C(-12281)) }
692
+ };
693
+
694
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
695
+ simde_int16x8_t r = simde_vaddq_s16(test_vec[i].a, test_vec[i].b);
696
+ simde_neon_assert_int16x8(r, ==, test_vec[i].r);
697
+ }
698
+
699
+ return MUNIT_OK;
700
+ }
701
+
702
+ static MunitResult
703
+ test_simde_vaddq_s32(const MunitParameter params[], void* data) {
704
+ (void) params;
705
+ (void) data;
706
+
707
+ const struct {
708
+ simde_int32x4_t a;
709
+ simde_int32x4_t b;
710
+ simde_int32x4_t r;
711
+ } test_vec[8] = {
712
+ { simde_x_vloadq_s32(INT32_C( 1991905077), INT32_C( 467458554),
713
+ INT32_C(-1505023231), INT32_C( -733966205)),
714
+ simde_x_vloadq_s32(INT32_C( 1912981472), INT32_C( 158537906),
715
+ INT32_C( 656836146), INT32_C( 1428622162)),
716
+ simde_x_vloadq_s32(INT32_C( -390080747), INT32_C( 625996460),
717
+ INT32_C( -848187085), INT32_C( 694655957)) },
718
+ { simde_x_vloadq_s32(INT32_C( 851124762), INT32_C( 1615489516),
719
+ INT32_C( 845780560), INT32_C( 906259114)),
720
+ simde_x_vloadq_s32(INT32_C( 1422573861), INT32_C( -381604741),
721
+ INT32_C( 1879616877), INT32_C( 1870833530)),
722
+ simde_x_vloadq_s32(INT32_C(-2021268673), INT32_C( 1233884775),
723
+ INT32_C(-1569569859), INT32_C(-1517874652)) },
724
+ { simde_x_vloadq_s32(INT32_C( 1837706310), INT32_C( 399423531),
725
+ INT32_C( 719212387), INT32_C( -781515247)),
726
+ simde_x_vloadq_s32(INT32_C( -984495464), INT32_C( 913131527),
727
+ INT32_C( 917907521), INT32_C( 1174723633)),
728
+ simde_x_vloadq_s32(INT32_C( 853210846), INT32_C( 1312555058),
729
+ INT32_C( 1637119908), INT32_C( 393208386)) },
730
+ { simde_x_vloadq_s32(INT32_C( 2097099348), INT32_C( 1615281392),
731
+ INT32_C(-1696319656), INT32_C( -779722094)),
732
+ simde_x_vloadq_s32(INT32_C( 584002784), INT32_C( 313088809),
733
+ INT32_C( 267369283), INT32_C( 1367772109)),
734
+ simde_x_vloadq_s32(INT32_C(-1613865164), INT32_C( 1928370201),
735
+ INT32_C(-1428950373), INT32_C( 588050015)) },
736
+ { simde_x_vloadq_s32(INT32_C(-1246916197), INT32_C(-1299429746),
737
+ INT32_C( -338802589), INT32_C( -927960555)),
738
+ simde_x_vloadq_s32(INT32_C(-2017354111), INT32_C( 793469349),
739
+ INT32_C( 2134354412), INT32_C(-1572712494)),
740
+ simde_x_vloadq_s32(INT32_C( 1030696988), INT32_C( -505960397),
741
+ INT32_C( 1795551823), INT32_C( 1794294247)) },
742
+ { simde_x_vloadq_s32(INT32_C( 1664384118), INT32_C( 1121578641),
743
+ INT32_C( -656784807), INT32_C( 2068828656)),
744
+ simde_x_vloadq_s32(INT32_C( 1152004764), INT32_C(-2086193266),
745
+ INT32_C( 1335923736), INT32_C( 135586487)),
746
+ simde_x_vloadq_s32(INT32_C(-1478578414), INT32_C( -964614625),
747
+ INT32_C( 679138929), INT32_C(-2090552153)) },
748
+ { simde_x_vloadq_s32(INT32_C( 762751085), INT32_C( 170839777),
749
+ INT32_C( 787631550), INT32_C( 1362229262)),
750
+ simde_x_vloadq_s32(INT32_C( 1073585453), INT32_C(-1579236383),
751
+ INT32_C( -242874856), INT32_C(-1302620336)),
752
+ simde_x_vloadq_s32(INT32_C( 1836336538), INT32_C(-1408396606),
753
+ INT32_C( 544756694), INT32_C( 59608926)) },
754
+ { simde_x_vloadq_s32(INT32_C(-2118198911), INT32_C(-1107508360),
755
+ INT32_C( -572206491), INT32_C( 565882953)),
756
+ simde_x_vloadq_s32(INT32_C( -966363256), INT32_C( 1104803314),
757
+ INT32_C( 1892463042), INT32_C(-1370644072)),
758
+ simde_x_vloadq_s32(INT32_C( 1210405129), INT32_C( -2705046),
759
+ INT32_C( 1320256551), INT32_C( -804761119)) }
760
+ };
761
+
762
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
763
+ simde_int32x4_t r = simde_vaddq_s32(test_vec[i].a, test_vec[i].b);
764
+ simde_neon_assert_int32x4(r, ==, test_vec[i].r);
765
+ }
766
+
767
+ return MUNIT_OK;
768
+ }
769
+
770
+ static MunitResult
771
+ test_simde_vaddq_s64(const MunitParameter params[], void* data) {
772
+ (void) params;
773
+ (void) data;
774
+
775
+ const struct {
776
+ simde_int64x2_t a;
777
+ simde_int64x2_t b;
778
+ simde_int64x2_t r;
779
+ } test_vec[8] = {
780
+ { simde_x_vloadq_s64(INT64_C( 2007719203657355061), INT64_C(-3152360844054287615)),
781
+ simde_x_vloadq_s64(INT64_C( 680915123359303648), INT64_C( 6135885464787650098)),
782
+ simde_x_vloadq_s64(INT64_C( 2688634327016658709), INT64_C( 2983524620733362483)) },
783
+ { simde_x_vloadq_s64(INT64_C( 6938474639101993498), INT64_C( 3892353257177716304)),
784
+ simde_x_vloadq_s64(INT64_C(-1638979881170976475), INT64_C( 8035168829489851757)),
785
+ simde_x_vloadq_s64(INT64_C( 5299494757931017023), INT64_C(-6519221987041983555)) },
786
+ { simde_x_vloadq_s64(INT64_C( 1715511004735548486), INT64_C(-3356582426471149725)),
787
+ simde_x_vloadq_s64(INT64_C( 3921870048722012824), INT64_C( 5045399586491213889)),
788
+ simde_x_vloadq_s64(INT64_C( 5637381053457561310), INT64_C( 1688817160020064164)) },
789
+ { simde_x_vloadq_s64(INT64_C( 6937580754574455380), INT64_C(-3348880891099990184)),
790
+ simde_x_vloadq_s64(INT64_C( 1344706195982593248), INT64_C( 5874536476803316547)),
791
+ simde_x_vloadq_s64(INT64_C( 8282286950557048628), INT64_C( 2525655585703326363)) },
792
+ { simde_x_vloadq_s64(INT64_C(-5581008259471535717), INT64_C(-3985560231746844573)),
793
+ simde_x_vloadq_s64(INT64_C( 3407924906611023489), INT64_C(-6754748725606241812)),
794
+ simde_x_vloadq_s64(INT64_C(-2173083352860512228), INT64_C( 7706435116356465231)) },
795
+ { simde_x_vloadq_s64(INT64_C( 4817143584651508854), INT64_C( 8885551422185816665)),
796
+ simde_x_vloadq_s64(INT64_C(-8960131849453423972), INT64_C( 582339528780452888)),
797
+ simde_x_vloadq_s64(INT64_C(-4142988264801915118), INT64_C(-8978853122743282063)) },
798
+ { simde_x_vloadq_s64(INT64_C( 733751255833684077), INT64_C( 5850730130731847102)),
799
+ simde_x_vloadq_s64(INT64_C(-6782768616564744915), INT64_C(-5594711738172439016)),
800
+ simde_x_vloadq_s64(INT64_C(-6049017360731060838), INT64_C( 256018392559408086)) },
801
+ { simde_x_vloadq_s64(INT64_C(-4756712184069826175), INT64_C( 2430448780221665893)),
802
+ simde_x_vloadq_s64(INT64_C( 4745094105471022984), INT64_C(-5886871461803806270)),
803
+ simde_x_vloadq_s64(INT64_C( -11618078598803191), INT64_C(-3456422681582140377)) }
804
+ };
805
+
806
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
807
+ simde_int64x2_t r = simde_vaddq_s64(test_vec[i].a, test_vec[i].b);
808
+ simde_neon_assert_int64x2(r, ==, test_vec[i].r);
809
+ }
810
+
811
+ return MUNIT_OK;
812
+ }
813
+
814
+ static MunitResult
815
+ test_simde_vaddq_u8(const MunitParameter params[], void* data) {
816
+ (void) params;
817
+ (void) data;
818
+
819
+ const struct {
820
+ simde_uint8x16_t a;
821
+ simde_uint8x16_t b;
822
+ simde_uint8x16_t r;
823
+ } test_vec[8] = {
824
+ { simde_x_vloadq_u8(UINT8_C(188), UINT8_C(134), UINT8_C(105), UINT8_C( 90),
825
+ UINT8_C(115), UINT8_C(172), UINT8_C(103), UINT8_C(215),
826
+ UINT8_C(200), UINT8_C(171), UINT8_C( 67), UINT8_C(161),
827
+ UINT8_C( 68), UINT8_C(102), UINT8_C(160), UINT8_C(233) ),
828
+ simde_x_vloadq_u8(UINT8_C(215), UINT8_C(208), UINT8_C(191), UINT8_C(234),
829
+ UINT8_C(107), UINT8_C( 16), UINT8_C( 41), UINT8_C(230),
830
+ UINT8_C( 93), UINT8_C( 33), UINT8_C(223), UINT8_C( 56),
831
+ UINT8_C(182), UINT8_C( 57), UINT8_C(117), UINT8_C( 38) ),
832
+ simde_x_vloadq_u8(UINT8_C(147), UINT8_C( 86), UINT8_C( 40), UINT8_C( 68),
833
+ UINT8_C(222), UINT8_C(188), UINT8_C(144), UINT8_C(189),
834
+ UINT8_C( 37), UINT8_C(204), UINT8_C( 34), UINT8_C(217),
835
+ UINT8_C(250), UINT8_C(159), UINT8_C( 21), UINT8_C( 15) ) },
836
+ { simde_x_vloadq_u8(UINT8_C(198), UINT8_C(168), UINT8_C(114), UINT8_C( 45),
837
+ UINT8_C(120), UINT8_C(180), UINT8_C( 46), UINT8_C( 20),
838
+ UINT8_C(125), UINT8_C( 64), UINT8_C( 36), UINT8_C( 25),
839
+ UINT8_C(221), UINT8_C(171), UINT8_C(152), UINT8_C(120) ),
840
+ simde_x_vloadq_u8(UINT8_C( 37), UINT8_C(188), UINT8_C(155), UINT8_C(230),
841
+ UINT8_C(255), UINT8_C(100), UINT8_C( 3), UINT8_C(214),
842
+ UINT8_C(123), UINT8_C( 17), UINT8_C(183), UINT8_C( 75),
843
+ UINT8_C(106), UINT8_C(102), UINT8_C( 69), UINT8_C(134) ),
844
+ simde_x_vloadq_u8(UINT8_C(235), UINT8_C(100), UINT8_C( 13), UINT8_C( 19),
845
+ UINT8_C(119), UINT8_C( 24), UINT8_C( 49), UINT8_C(234),
846
+ UINT8_C(248), UINT8_C( 81), UINT8_C(219), UINT8_C(100),
847
+ UINT8_C( 71), UINT8_C( 17), UINT8_C(221), UINT8_C(254) ) },
848
+ { simde_x_vloadq_u8(UINT8_C(203), UINT8_C( 75), UINT8_C(210), UINT8_C( 5),
849
+ UINT8_C(239), UINT8_C( 95), UINT8_C(251), UINT8_C(240),
850
+ UINT8_C( 1), UINT8_C(157), UINT8_C( 93), UINT8_C(211),
851
+ UINT8_C(236), UINT8_C(109), UINT8_C( 75), UINT8_C( 85) ),
852
+ simde_x_vloadq_u8(UINT8_C(115), UINT8_C(242), UINT8_C(240), UINT8_C(231),
853
+ UINT8_C(232), UINT8_C(167), UINT8_C( 68), UINT8_C( 79),
854
+ UINT8_C( 95), UINT8_C( 41), UINT8_C(241), UINT8_C(144),
855
+ UINT8_C( 21), UINT8_C(128), UINT8_C( 89), UINT8_C( 16) ),
856
+ simde_x_vloadq_u8(UINT8_C( 62), UINT8_C( 61), UINT8_C(194), UINT8_C(236),
857
+ UINT8_C(215), UINT8_C( 6), UINT8_C( 63), UINT8_C( 63),
858
+ UINT8_C( 96), UINT8_C(198), UINT8_C( 78), UINT8_C( 99),
859
+ UINT8_C( 1), UINT8_C(237), UINT8_C(164), UINT8_C(101) ) },
860
+ { simde_x_vloadq_u8(UINT8_C(176), UINT8_C(187), UINT8_C(107), UINT8_C(155),
861
+ UINT8_C(122), UINT8_C(141), UINT8_C(127), UINT8_C(242),
862
+ UINT8_C( 59), UINT8_C(181), UINT8_C(146), UINT8_C(252),
863
+ UINT8_C(172), UINT8_C( 95), UINT8_C( 88), UINT8_C( 48) ),
864
+ simde_x_vloadq_u8(UINT8_C(105), UINT8_C( 84), UINT8_C(163), UINT8_C(145),
865
+ UINT8_C(133), UINT8_C(115), UINT8_C(225), UINT8_C( 43),
866
+ UINT8_C(212), UINT8_C(112), UINT8_C(170), UINT8_C( 19),
867
+ UINT8_C(133), UINT8_C(161), UINT8_C(235), UINT8_C(253) ),
868
+ simde_x_vloadq_u8(UINT8_C( 25), UINT8_C( 15), UINT8_C( 14), UINT8_C( 44),
869
+ UINT8_C(255), UINT8_C( 0), UINT8_C( 96), UINT8_C( 29),
870
+ UINT8_C( 15), UINT8_C( 37), UINT8_C( 60), UINT8_C( 15),
871
+ UINT8_C( 49), UINT8_C( 0), UINT8_C( 67), UINT8_C( 45) ) },
872
+ { simde_x_vloadq_u8(UINT8_C(238), UINT8_C(106), UINT8_C(129), UINT8_C(132),
873
+ UINT8_C( 7), UINT8_C(152), UINT8_C(167), UINT8_C(234),
874
+ UINT8_C(158), UINT8_C(133), UINT8_C( 68), UINT8_C(180),
875
+ UINT8_C(125), UINT8_C( 17), UINT8_C(206), UINT8_C(186) ),
876
+ simde_x_vloadq_u8(UINT8_C(161), UINT8_C(220), UINT8_C(149), UINT8_C(249),
877
+ UINT8_C(170), UINT8_C( 70), UINT8_C( 71), UINT8_C( 54),
878
+ UINT8_C(232), UINT8_C( 3), UINT8_C( 72), UINT8_C( 65),
879
+ UINT8_C(114), UINT8_C(112), UINT8_C( 73), UINT8_C( 15) ),
880
+ simde_x_vloadq_u8(UINT8_C(143), UINT8_C( 70), UINT8_C( 22), UINT8_C(125),
881
+ UINT8_C(177), UINT8_C(222), UINT8_C(238), UINT8_C( 32),
882
+ UINT8_C(134), UINT8_C(136), UINT8_C(140), UINT8_C(245),
883
+ UINT8_C(239), UINT8_C(129), UINT8_C( 23), UINT8_C(201) ) },
884
+ { simde_x_vloadq_u8(UINT8_C(156), UINT8_C(226), UINT8_C( 97), UINT8_C( 45),
885
+ UINT8_C( 7), UINT8_C(134), UINT8_C(235), UINT8_C(106),
886
+ UINT8_C(246), UINT8_C(150), UINT8_C(135), UINT8_C( 95),
887
+ UINT8_C(128), UINT8_C(230), UINT8_C(172), UINT8_C(203) ),
888
+ simde_x_vloadq_u8(UINT8_C(254), UINT8_C(229), UINT8_C(234), UINT8_C(241),
889
+ UINT8_C(236), UINT8_C( 62), UINT8_C(147), UINT8_C(177),
890
+ UINT8_C(177), UINT8_C( 83), UINT8_C(242), UINT8_C(236),
891
+ UINT8_C(123), UINT8_C(171), UINT8_C( 54), UINT8_C( 98) ),
892
+ simde_x_vloadq_u8(UINT8_C(154), UINT8_C(199), UINT8_C( 75), UINT8_C( 30),
893
+ UINT8_C(243), UINT8_C(196), UINT8_C(126), UINT8_C( 27),
894
+ UINT8_C(167), UINT8_C(233), UINT8_C(121), UINT8_C( 75),
895
+ UINT8_C(251), UINT8_C(145), UINT8_C(226), UINT8_C( 45) ) },
896
+ { simde_x_vloadq_u8(UINT8_C( 27), UINT8_C( 14), UINT8_C(184), UINT8_C( 98),
897
+ UINT8_C( 92), UINT8_C( 40), UINT8_C( 14), UINT8_C( 7),
898
+ UINT8_C(176), UINT8_C(200), UINT8_C(126), UINT8_C( 52),
899
+ UINT8_C( 25), UINT8_C( 86), UINT8_C(143), UINT8_C( 77) ),
900
+ simde_x_vloadq_u8(UINT8_C(194), UINT8_C(191), UINT8_C(200), UINT8_C(143),
901
+ UINT8_C(154), UINT8_C( 17), UINT8_C(211), UINT8_C(182),
902
+ UINT8_C( 98), UINT8_C( 96), UINT8_C( 74), UINT8_C( 94),
903
+ UINT8_C(129), UINT8_C(230), UINT8_C( 74), UINT8_C( 44) ),
904
+ simde_x_vloadq_u8(UINT8_C(221), UINT8_C(205), UINT8_C(128), UINT8_C(241),
905
+ UINT8_C(246), UINT8_C( 57), UINT8_C(225), UINT8_C(189),
906
+ UINT8_C( 18), UINT8_C( 40), UINT8_C(200), UINT8_C(146),
907
+ UINT8_C(154), UINT8_C( 60), UINT8_C(217), UINT8_C(121) ) },
908
+ { simde_x_vloadq_u8(UINT8_C(245), UINT8_C(128), UINT8_C( 89), UINT8_C(249),
909
+ UINT8_C( 36), UINT8_C(187), UINT8_C( 8), UINT8_C(163),
910
+ UINT8_C(199), UINT8_C( 13), UINT8_C(157), UINT8_C(178),
911
+ UINT8_C(255), UINT8_C(174), UINT8_C(203), UINT8_C( 42) ),
912
+ simde_x_vloadq_u8(UINT8_C(223), UINT8_C(107), UINT8_C(115), UINT8_C( 5),
913
+ UINT8_C(230), UINT8_C(157), UINT8_C( 37), UINT8_C( 60),
914
+ UINT8_C(169), UINT8_C(159), UINT8_C(132), UINT8_C( 0),
915
+ UINT8_C(112), UINT8_C(190), UINT8_C(249), UINT8_C(226) ),
916
+ simde_x_vloadq_u8(UINT8_C(212), UINT8_C(235), UINT8_C(204), UINT8_C(254),
917
+ UINT8_C( 10), UINT8_C( 88), UINT8_C( 45), UINT8_C(223),
918
+ UINT8_C(112), UINT8_C(172), UINT8_C( 33), UINT8_C(178),
919
+ UINT8_C(111), UINT8_C(108), UINT8_C(196), UINT8_C( 12) ) }
920
+ };
921
+
922
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
923
+ simde_uint8x16_t r = simde_vaddq_u8(test_vec[i].a, test_vec[i].b);
924
+ simde_neon_assert_uint8x16(r, ==, test_vec[i].r);
925
+ }
926
+
927
+ return MUNIT_OK;
928
+ }
929
+
930
+ static MunitResult
931
+ test_simde_vaddq_u16(const MunitParameter params[], void* data) {
932
+ (void) params;
933
+ (void) data;
934
+
935
+ const struct {
936
+ simde_uint16x8_t a;
937
+ simde_uint16x8_t b;
938
+ simde_uint16x8_t r;
939
+ } test_vec[8] = {
940
+ { simde_x_vloadq_u16(UINT16_C(34492), UINT16_C(23145), UINT16_C(44147), UINT16_C(55143),
941
+ UINT16_C(43976), UINT16_C(41283), UINT16_C(26180), UINT16_C(59808)),
942
+ simde_x_vloadq_u16(UINT16_C(53463), UINT16_C(60095), UINT16_C( 4203), UINT16_C(58921),
943
+ UINT16_C( 8541), UINT16_C(14559), UINT16_C(14774), UINT16_C( 9845)),
944
+ simde_x_vloadq_u16(UINT16_C(22419), UINT16_C(17704), UINT16_C(48350), UINT16_C(48528),
945
+ UINT16_C(52517), UINT16_C(55842), UINT16_C(40954), UINT16_C( 4117)) },
946
+ { simde_x_vloadq_u16(UINT16_C(43206), UINT16_C(11634), UINT16_C(46200), UINT16_C( 5166),
947
+ UINT16_C(16509), UINT16_C( 6436), UINT16_C(43997), UINT16_C(30872)),
948
+ simde_x_vloadq_u16(UINT16_C(48165), UINT16_C(59035), UINT16_C(25855), UINT16_C(54787),
949
+ UINT16_C( 4475), UINT16_C(19383), UINT16_C(26218), UINT16_C(34373)),
950
+ simde_x_vloadq_u16(UINT16_C(25835), UINT16_C( 5133), UINT16_C( 6519), UINT16_C(59953),
951
+ UINT16_C(20984), UINT16_C(25819), UINT16_C( 4679), UINT16_C(65245)) },
952
+ { simde_x_vloadq_u16(UINT16_C(19403), UINT16_C( 1490), UINT16_C(24559), UINT16_C(61691),
953
+ UINT16_C(40193), UINT16_C(54109), UINT16_C(28140), UINT16_C(21835)),
954
+ simde_x_vloadq_u16(UINT16_C(62067), UINT16_C(59376), UINT16_C(42984), UINT16_C(20292),
955
+ UINT16_C(10591), UINT16_C(37105), UINT16_C(32789), UINT16_C( 4185)),
956
+ simde_x_vloadq_u16(UINT16_C(15934), UINT16_C(60866), UINT16_C( 2007), UINT16_C(16447),
957
+ UINT16_C(50784), UINT16_C(25678), UINT16_C(60929), UINT16_C(26020)) },
958
+ { simde_x_vloadq_u16(UINT16_C(48048), UINT16_C(39787), UINT16_C(36218), UINT16_C(62079),
959
+ UINT16_C(46395), UINT16_C(64658), UINT16_C(24492), UINT16_C(12376)),
960
+ simde_x_vloadq_u16(UINT16_C(21609), UINT16_C(37283), UINT16_C(29573), UINT16_C(11233),
961
+ UINT16_C(28884), UINT16_C( 5034), UINT16_C(41349), UINT16_C(65003)),
962
+ simde_x_vloadq_u16(UINT16_C( 4121), UINT16_C(11534), UINT16_C( 255), UINT16_C( 7776),
963
+ UINT16_C( 9743), UINT16_C( 4156), UINT16_C( 305), UINT16_C(11843)) },
964
+ { simde_x_vloadq_u16(UINT16_C(27374), UINT16_C(33921), UINT16_C(38919), UINT16_C(60071),
965
+ UINT16_C(34206), UINT16_C(46148), UINT16_C( 4477), UINT16_C(47822)),
966
+ simde_x_vloadq_u16(UINT16_C(56481), UINT16_C(63893), UINT16_C(18090), UINT16_C(13895),
967
+ UINT16_C( 1000), UINT16_C(16712), UINT16_C(28786), UINT16_C( 3913)),
968
+ simde_x_vloadq_u16(UINT16_C(18319), UINT16_C(32278), UINT16_C(57009), UINT16_C( 8430),
969
+ UINT16_C(35206), UINT16_C(62860), UINT16_C(33263), UINT16_C(51735)) },
970
+ { simde_x_vloadq_u16(UINT16_C(58012), UINT16_C(11617), UINT16_C(34311), UINT16_C(27371),
971
+ UINT16_C(38646), UINT16_C(24455), UINT16_C(59008), UINT16_C(52140)),
972
+ simde_x_vloadq_u16(UINT16_C(58878), UINT16_C(61930), UINT16_C(16108), UINT16_C(45459),
973
+ UINT16_C(21425), UINT16_C(60658), UINT16_C(43899), UINT16_C(25142)),
974
+ simde_x_vloadq_u16(UINT16_C(51354), UINT16_C( 8011), UINT16_C(50419), UINT16_C( 7294),
975
+ UINT16_C(60071), UINT16_C(19577), UINT16_C(37371), UINT16_C(11746)) },
976
+ { simde_x_vloadq_u16(UINT16_C( 3611), UINT16_C(25272), UINT16_C(10332), UINT16_C( 1806),
977
+ UINT16_C(51376), UINT16_C(13438), UINT16_C(22041), UINT16_C(19855)),
978
+ simde_x_vloadq_u16(UINT16_C(49090), UINT16_C(36808), UINT16_C( 4506), UINT16_C(46803),
979
+ UINT16_C(24674), UINT16_C(24138), UINT16_C(59009), UINT16_C(11338)),
980
+ simde_x_vloadq_u16(UINT16_C(52701), UINT16_C(62080), UINT16_C(14838), UINT16_C(48609),
981
+ UINT16_C(10514), UINT16_C(37576), UINT16_C(15514), UINT16_C(31193)) },
982
+ { simde_x_vloadq_u16(UINT16_C(33013), UINT16_C(63833), UINT16_C(47908), UINT16_C(41736),
983
+ UINT16_C( 3527), UINT16_C(45725), UINT16_C(44799), UINT16_C(10955)),
984
+ simde_x_vloadq_u16(UINT16_C(27615), UINT16_C( 1395), UINT16_C(40422), UINT16_C(15397),
985
+ UINT16_C(40873), UINT16_C( 132), UINT16_C(48752), UINT16_C(58105)),
986
+ simde_x_vloadq_u16(UINT16_C(60628), UINT16_C(65228), UINT16_C(22794), UINT16_C(57133),
987
+ UINT16_C(44400), UINT16_C(45857), UINT16_C(28015), UINT16_C( 3524)) }
988
+ };
989
+
990
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
991
+ simde_uint16x8_t r = simde_vaddq_u16(test_vec[i].a, test_vec[i].b);
992
+ simde_neon_assert_uint16x8(r, ==, test_vec[i].r);
993
+ }
994
+
995
+ return MUNIT_OK;
996
+ }
997
+
998
+ static MunitResult
999
+ test_simde_vaddq_u32(const MunitParameter params[], void* data) {
1000
+ (void) params;
1001
+ (void) data;
1002
+
1003
+ const struct {
1004
+ simde_uint32x4_t a;
1005
+ simde_uint32x4_t b;
1006
+ simde_uint32x4_t r;
1007
+ } test_vec[8] = {
1008
+ { simde_x_vloadq_u32(UINT32_C(1516865212), UINT32_C(3613895795),
1009
+ UINT32_C(2705566664), UINT32_C(3919603268)),
1010
+ simde_x_vloadq_u32(UINT32_C(3938439383), UINT32_C(3861450859),
1011
+ UINT32_C( 954147165), UINT32_C( 645216694)),
1012
+ simde_x_vloadq_u32(UINT32_C(1160337299), UINT32_C(3180379358),
1013
+ UINT32_C(3659713829), UINT32_C( 269852666)) },
1014
+ { simde_x_vloadq_u32(UINT32_C( 762489030), UINT32_C( 338605176),
1015
+ UINT32_C( 421806205), UINT32_C(2023271389)),
1016
+ simde_x_vloadq_u32(UINT32_C(3868965925), UINT32_C(3590546687),
1017
+ UINT32_C(1270288763), UINT32_C(2252695146)),
1018
+ simde_x_vloadq_u32(UINT32_C( 336487659), UINT32_C(3929151863),
1019
+ UINT32_C(1692094968), UINT32_C(4275966535)) },
1020
+ { simde_x_vloadq_u32(UINT32_C( 97668043), UINT32_C(4043005935),
1021
+ UINT32_C(3546127617), UINT32_C(1431006700)),
1022
+ simde_x_vloadq_u32(UINT32_C(3891327603), UINT32_C(1329899496),
1023
+ UINT32_C(2431723871), UINT32_C( 274300949)),
1024
+ simde_x_vloadq_u32(UINT32_C(3988995646), UINT32_C(1077938135),
1025
+ UINT32_C(1682884192), UINT32_C(1705307649)) },
1026
+ { simde_x_vloadq_u32(UINT32_C(2607528880), UINT32_C(4068445562),
1027
+ UINT32_C(4237473083), UINT32_C( 811098028)),
1028
+ simde_x_vloadq_u32(UINT32_C(2443400297), UINT32_C( 736195461),
1029
+ UINT32_C( 329937108), UINT32_C(4260077957)),
1030
+ simde_x_vloadq_u32(UINT32_C( 755961881), UINT32_C( 509673727),
1031
+ UINT32_C( 272442895), UINT32_C( 776208689)) },
1032
+ { simde_x_vloadq_u32(UINT32_C(2223074030), UINT32_C(3936851975),
1033
+ UINT32_C(3024389534), UINT32_C(3134067069)),
1034
+ simde_x_vloadq_u32(UINT32_C(4187348129), UINT32_C( 910640810),
1035
+ UINT32_C(1095238632), UINT32_C( 256471154)),
1036
+ simde_x_vloadq_u32(UINT32_C(2115454863), UINT32_C( 552525489),
1037
+ UINT32_C(4119628166), UINT32_C(3390538223)) },
1038
+ { simde_x_vloadq_u32(UINT32_C( 761389724), UINT32_C(1793820167),
1039
+ UINT32_C(1602721526), UINT32_C(3417106048)),
1040
+ simde_x_vloadq_u32(UINT32_C(4058703358), UINT32_C(2979217132),
1041
+ UINT32_C(3975304113), UINT32_C(1647750011)),
1042
+ simde_x_vloadq_u32(UINT32_C( 525125786), UINT32_C( 478070003),
1043
+ UINT32_C(1283058343), UINT32_C( 769888763)) },
1044
+ { simde_x_vloadq_u32(UINT32_C(1656229403), UINT32_C( 118368348),
1045
+ UINT32_C( 880724144), UINT32_C(1301239321)),
1046
+ simde_x_vloadq_u32(UINT32_C(2412298178), UINT32_C(3067285914),
1047
+ UINT32_C(1581932642), UINT32_C( 743106177)),
1048
+ simde_x_vloadq_u32(UINT32_C(4068527581), UINT32_C(3185654262),
1049
+ UINT32_C(2462656786), UINT32_C(2044345498)) },
1050
+ { simde_x_vloadq_u32(UINT32_C(4183392501), UINT32_C(2735258404),
1051
+ UINT32_C(2996637127), UINT32_C( 717991679)),
1052
+ simde_x_vloadq_u32(UINT32_C( 91450335), UINT32_C(1009098214),
1053
+ UINT32_C( 8691625), UINT32_C(3808018032)),
1054
+ simde_x_vloadq_u32(UINT32_C(4274842836), UINT32_C(3744356618),
1055
+ UINT32_C(3005328752), UINT32_C( 231042415)) }
1056
+ };
1057
+
1058
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
1059
+ simde_uint32x4_t r = simde_vaddq_u32(test_vec[i].a, test_vec[i].b);
1060
+ simde_neon_assert_uint32x4(r, ==, test_vec[i].r);
1061
+ }
1062
+
1063
+ return MUNIT_OK;
1064
+ }
1065
+
1066
+ static MunitResult
1067
+ test_simde_vaddq_u64(const MunitParameter params[], void* data) {
1068
+ (void) params;
1069
+ (void) data;
1070
+
1071
+ const struct {
1072
+ simde_uint64x2_t a;
1073
+ simde_uint64x2_t b;
1074
+ simde_uint64x2_t r;
1075
+ } test_vec[8] = {
1076
+ { simde_x_vloadq_u64(UINT64_C(15521564252193785532), UINT64_C(16834567852060289992)),
1077
+ simde_x_vloadq_u64(UINT64_C(16584805158454546647), UINT64_C(2771184600517386589)),
1078
+ simde_x_vloadq_u64(UINT64_C(13659625336938780563), UINT64_C(1159008378868124965)) },
1079
+ { simde_x_vloadq_u64(UINT64_C(1454298157938813126), UINT64_C(8689884447109300349)),
1080
+ simde_x_vloadq_u64(UINT64_C(15421280599295114277), UINT64_C(9675251981198233979)),
1081
+ simde_x_vloadq_u64(UINT64_C(16875578757233927403), UINT64_C(18365136428307534328)) },
1082
+ { simde_x_vloadq_u64(UINT64_C(17364578268456569803), UINT64_C(6146126980403010817)),
1083
+ simde_x_vloadq_u64(UINT64_C(5711874846178210419), UINT64_C(1178113607648487775)),
1084
+ simde_x_vloadq_u64(UINT64_C(4629709040925228606), UINT64_C(7324240588051498592)) },
1085
+ { simde_x_vloadq_u64(UINT64_C(17473840636953869232), UINT64_C(3483639508347565371)),
1086
+ simde_x_vloadq_u64(UINT64_C(3161935430902043753), UINT64_C(18296895504055431380)),
1087
+ simde_x_vloadq_u64(UINT64_C(2189031994146361369), UINT64_C(3333790938693445135)) },
1088
+ { simde_x_vloadq_u64(UINT64_C(16908650484041083630), UINT64_C(13460715567849964958)),
1089
+ simde_x_vloadq_u64(UINT64_C(3911172501540297889), UINT64_C(1101535219892618216)),
1090
+ simde_x_vloadq_u64(UINT64_C(2373078911871829903), UINT64_C(14562250787742583174)) },
1091
+ { simde_x_vloadq_u64(UINT64_C(7704398952931648156), UINT64_C(14676358724726527734)),
1092
+ simde_x_vloadq_u64(UINT64_C(12795640153681618430), UINT64_C(7077032413203944369)),
1093
+ simde_x_vloadq_u64(UINT64_C(2053295032903714970), UINT64_C(3306647064220920487)) },
1094
+ { simde_x_vloadq_u64(UINT64_C( 508388185197776411), UINT64_C(5588780328844970160)),
1095
+ simde_x_vloadq_u64(UINT64_C(13173892690523766722), UINT64_C(3191616729252520034)),
1096
+ simde_x_vloadq_u64(UINT64_C(13682280875721543133), UINT64_C(8780397058097490194)) },
1097
+ { simde_x_vloadq_u64(UINT64_C(11747845395472548085), UINT64_C(3083750783101767111)),
1098
+ simde_x_vloadq_u64(UINT64_C(4334043827673459679), UINT64_C(16355312910026973097)),
1099
+ simde_x_vloadq_u64(UINT64_C(16081889223146007764), UINT64_C( 992319619419188592)) }
1100
+ };
1101
+
1102
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
1103
+ simde_uint64x2_t r = simde_vaddq_u64(test_vec[i].a, test_vec[i].b);
1104
+ simde_neon_assert_uint64x2(r, ==, test_vec[i].r);
1105
+ }
1106
+
1107
+ return MUNIT_OK;
1108
+ }
1109
+
1110
+ static MunitResult
1111
+ test_simde_vaddq_f32(const MunitParameter params[], void* data) {
1112
+ (void) params;
1113
+ (void) data;
1114
+
1115
+ const struct {
1116
+ simde_float32x4_t a;
1117
+ simde_float32x4_t b;
1118
+ simde_float32x4_t r;
1119
+ } test_vec[8] = {
1120
+ { simde_x_vloadq_f32(SIMDE_FLOAT32_C( -919.97), SIMDE_FLOAT32_C( 785.15),
1121
+ SIMDE_FLOAT32_C( -611.53), SIMDE_FLOAT32_C( -602.10)),
1122
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( -924.97), SIMDE_FLOAT32_C( -727.27),
1123
+ SIMDE_FLOAT32_C( -752.32), SIMDE_FLOAT32_C( -767.11)),
1124
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C(-1844.94), SIMDE_FLOAT32_C( 57.88),
1125
+ SIMDE_FLOAT32_C(-1363.85), SIMDE_FLOAT32_C(-1369.21)) },
1126
+ { simde_x_vloadq_f32(SIMDE_FLOAT32_C( -14.93), SIMDE_FLOAT32_C( 608.03),
1127
+ SIMDE_FLOAT32_C( -789.79), SIMDE_FLOAT32_C( 68.13)),
1128
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( -858.58), SIMDE_FLOAT32_C( -414.28),
1129
+ SIMDE_FLOAT32_C( 897.52), SIMDE_FLOAT32_C( 872.30)),
1130
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( -873.51), SIMDE_FLOAT32_C( 193.75),
1131
+ SIMDE_FLOAT32_C( 107.73), SIMDE_FLOAT32_C( 940.43)) },
1132
+ { simde_x_vloadq_f32(SIMDE_FLOAT32_C( -263.95), SIMDE_FLOAT32_C( 795.10),
1133
+ SIMDE_FLOAT32_C( 545.87), SIMDE_FLOAT32_C( 506.17)),
1134
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 946.10), SIMDE_FLOAT32_C( 516.44),
1135
+ SIMDE_FLOAT32_C( -681.35), SIMDE_FLOAT32_C( -180.00)),
1136
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 682.15), SIMDE_FLOAT32_C( 1311.54),
1137
+ SIMDE_FLOAT32_C( -135.48), SIMDE_FLOAT32_C( 326.17)) },
1138
+ { simde_x_vloadq_f32(SIMDE_FLOAT32_C( 547.94), SIMDE_FLOAT32_C( -151.93),
1139
+ SIMDE_FLOAT32_C( 865.78), SIMDE_FLOAT32_C( -390.75)),
1140
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( -476.37), SIMDE_FLOAT32_C( 990.69),
1141
+ SIMDE_FLOAT32_C( 890.86), SIMDE_FLOAT32_C( 555.02)),
1142
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 71.57), SIMDE_FLOAT32_C( 838.76),
1143
+ SIMDE_FLOAT32_C( 1756.64), SIMDE_FLOAT32_C( 164.27)) },
1144
+ { simde_x_vloadq_f32(SIMDE_FLOAT32_C( -126.52), SIMDE_FLOAT32_C( 983.51),
1145
+ SIMDE_FLOAT32_C( 833.14), SIMDE_FLOAT32_C( 459.96)),
1146
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 322.14), SIMDE_FLOAT32_C( 954.88),
1147
+ SIMDE_FLOAT32_C( -247.30), SIMDE_FLOAT32_C( 346.82)),
1148
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 195.62), SIMDE_FLOAT32_C( 1938.39),
1149
+ SIMDE_FLOAT32_C( 585.84), SIMDE_FLOAT32_C( 806.78)) },
1150
+ { simde_x_vloadq_f32(SIMDE_FLOAT32_C( -553.63), SIMDE_FLOAT32_C( -968.44),
1151
+ SIMDE_FLOAT32_C( -255.74), SIMDE_FLOAT32_C( -226.64)),
1152
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 118.57), SIMDE_FLOAT32_C( 901.85),
1153
+ SIMDE_FLOAT32_C( 842.68), SIMDE_FLOAT32_C( 16.95)),
1154
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( -435.06), SIMDE_FLOAT32_C( -66.59),
1155
+ SIMDE_FLOAT32_C( 586.94), SIMDE_FLOAT32_C( -209.69)) },
1156
+ { simde_x_vloadq_f32(SIMDE_FLOAT32_C( -941.60), SIMDE_FLOAT32_C( 301.41),
1157
+ SIMDE_FLOAT32_C( -661.60), SIMDE_FLOAT32_C( 559.21)),
1158
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 991.39), SIMDE_FLOAT32_C( 876.21),
1159
+ SIMDE_FLOAT32_C( -643.72), SIMDE_FLOAT32_C( 222.34)),
1160
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 49.79), SIMDE_FLOAT32_C( 1177.62),
1161
+ SIMDE_FLOAT32_C(-1305.32), SIMDE_FLOAT32_C( 781.55)) },
1162
+ { simde_x_vloadq_f32(SIMDE_FLOAT32_C( -511.28), SIMDE_FLOAT32_C( 578.71),
1163
+ SIMDE_FLOAT32_C( -174.25), SIMDE_FLOAT32_C( -799.18)),
1164
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 576.28), SIMDE_FLOAT32_C( 681.28),
1165
+ SIMDE_FLOAT32_C( -327.62), SIMDE_FLOAT32_C( 30.52)),
1166
+ simde_x_vloadq_f32(SIMDE_FLOAT32_C( 65.00), SIMDE_FLOAT32_C( 1259.99),
1167
+ SIMDE_FLOAT32_C( -501.87), SIMDE_FLOAT32_C( -768.66)) }
1168
+ };
1169
+
1170
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
1171
+ simde_float32x4_t r = simde_vaddq_f32(test_vec[i].a, test_vec[i].b);
1172
+ simde_neon_assert_float32x4_equal(r, test_vec[i].r, 1);
1173
+ }
1174
+
1175
+ return MUNIT_OK;
1176
+ }
1177
+
1178
+ static MunitResult
1179
+ test_simde_vaddq_f64(const MunitParameter params[], void* data) {
1180
+ (void) params;
1181
+ (void) data;
1182
+
1183
+ const struct {
1184
+ simde_float64x2_t a;
1185
+ simde_float64x2_t b;
1186
+ simde_float64x2_t r;
1187
+ } test_vec[8] = {
1188
+ { simde_x_vloadq_f64(SIMDE_FLOAT64_C( -919.97), SIMDE_FLOAT64_C( 785.15)),
1189
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( -611.53), SIMDE_FLOAT64_C( -602.10)),
1190
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C(-1531.50), SIMDE_FLOAT64_C( 183.05)) },
1191
+ { simde_x_vloadq_f64(SIMDE_FLOAT64_C( -924.97), SIMDE_FLOAT64_C( -727.27)),
1192
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( -752.32), SIMDE_FLOAT64_C( -767.11)),
1193
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C(-1677.29), SIMDE_FLOAT64_C(-1494.38)) },
1194
+ { simde_x_vloadq_f64(SIMDE_FLOAT64_C( -14.93), SIMDE_FLOAT64_C( 608.03)),
1195
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( -789.79), SIMDE_FLOAT64_C( 68.13)),
1196
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( -804.72), SIMDE_FLOAT64_C( 676.16)) },
1197
+ { simde_x_vloadq_f64(SIMDE_FLOAT64_C( -858.58), SIMDE_FLOAT64_C( -414.28)),
1198
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( 897.52), SIMDE_FLOAT64_C( 872.30)),
1199
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( 38.94), SIMDE_FLOAT64_C( 458.02)) },
1200
+ { simde_x_vloadq_f64(SIMDE_FLOAT64_C( -263.95), SIMDE_FLOAT64_C( 795.10)),
1201
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( 545.87), SIMDE_FLOAT64_C( 506.17)),
1202
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( 281.92), SIMDE_FLOAT64_C( 1301.27)) },
1203
+ { simde_x_vloadq_f64(SIMDE_FLOAT64_C( 946.10), SIMDE_FLOAT64_C( 516.44)),
1204
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( -681.35), SIMDE_FLOAT64_C( -180.00)),
1205
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( 264.75), SIMDE_FLOAT64_C( 336.44)) },
1206
+ { simde_x_vloadq_f64(SIMDE_FLOAT64_C( 547.94), SIMDE_FLOAT64_C( -151.93)),
1207
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( 865.78), SIMDE_FLOAT64_C( -390.75)),
1208
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( 1413.72), SIMDE_FLOAT64_C( -542.68)) },
1209
+ { simde_x_vloadq_f64(SIMDE_FLOAT64_C( -476.37), SIMDE_FLOAT64_C( 990.69)),
1210
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( 890.86), SIMDE_FLOAT64_C( 555.02)),
1211
+ simde_x_vloadq_f64(SIMDE_FLOAT64_C( 414.49), SIMDE_FLOAT64_C( 1545.71)) }
1212
+ };
1213
+
1214
+ for (size_t i = 0 ; i < (sizeof(test_vec) / sizeof(test_vec[0])); i++) {
1215
+ simde_float64x2_t r = simde_vaddq_f64(test_vec[i].a, test_vec[i].b);
1216
+ simde_neon_assert_float64x2_equal(r, test_vec[i].r, 1);
1217
+ }
1218
+
1219
+ return MUNIT_OK;
1220
+ }
1221
+
1222
+ #endif /* defined(SIMDE_NEON_NATIVE) || defined(SIMDE_NO_NATIVE) || defined(SIMDE_ALWAYS_BUILD_NATIVE_TESTS) */
1223
+
1224
+ HEDLEY_DIAGNOSTIC_PUSH
1225
+ HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL
1226
+
1227
+ static MunitTest test_suite_tests[] = {
1228
+ #if defined(SIMDE_NEON_NATIVE) || defined(SIMDE_NO_NATIVE) || defined(SIMDE_ALWAYS_BUILD_NATIVE_TESTS)
1229
+ SIMDE_TESTS_NEON_DEFINE_TEST(s8),
1230
+ SIMDE_TESTS_NEON_DEFINE_TEST(s16),
1231
+ SIMDE_TESTS_NEON_DEFINE_TEST(s32),
1232
+ SIMDE_TESTS_NEON_DEFINE_TEST(s64),
1233
+ SIMDE_TESTS_NEON_DEFINE_TEST(u8),
1234
+ SIMDE_TESTS_NEON_DEFINE_TEST(u16),
1235
+ SIMDE_TESTS_NEON_DEFINE_TEST(u32),
1236
+ SIMDE_TESTS_NEON_DEFINE_TEST(u64),
1237
+ SIMDE_TESTS_NEON_DEFINE_TEST(f32),
1238
+ SIMDE_TESTS_NEON_DEFINE_TEST(f64),
1239
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, s8),
1240
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, s16),
1241
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, s32),
1242
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, s64),
1243
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, u8),
1244
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, u16),
1245
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, u32),
1246
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, u64),
1247
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, f32),
1248
+ SIMDE_TESTS_NEON_DEFINE_TEST_FULL(q, f64),
1249
+ #endif /* defined(SIMDE_NEON_NATIVE) || defined(SIMDE_NO_NATIVE) || defined(SIMDE_ALWAYS_BUILD_NATIVE_TESTS) */
1250
+
1251
+ { NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL }
1252
+ };
1253
+
1254
+ HEDLEY_C_DECL MunitSuite* SIMDE_TESTS_GENERATE_SYMBOL(SIMDE_TESTS_CURRENT_NEON_OP)(void) {
1255
+ static MunitSuite suite = { (char*) "/v" HEDLEY_STRINGIFY(SIMDE_TESTS_CURRENT_NEON_OP), test_suite_tests, NULL, 1, MUNIT_SUITE_OPTION_NONE };
1256
+
1257
+ return &suite;
1258
+ }
1259
+
1260
+ HEDLEY_DIAGNOSTIC_POP