minimap2 0.2.25.1 → 0.2.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -0
  3. data/ext/Rakefile +2 -2
  4. data/ext/minimap2/NEWS.md +9 -0
  5. data/ext/minimap2/README.md +2 -2
  6. data/ext/minimap2/cookbook.md +2 -2
  7. data/ext/minimap2/minimap.h +1 -1
  8. data/ext/minimap2/minimap2.1 +1 -1
  9. data/ext/minimap2/misc/paftools.js +1 -1
  10. data/ext/minimap2/python/mappy.pyx +1 -1
  11. data/ext/minimap2/setup.py +22 -32
  12. data/lib/minimap2/version.rb +1 -1
  13. metadata +1 -97
  14. data/ext/minimap2/lib/simde/CONTRIBUTING.md +0 -114
  15. data/ext/minimap2/lib/simde/COPYING +0 -20
  16. data/ext/minimap2/lib/simde/README.md +0 -333
  17. data/ext/minimap2/lib/simde/amalgamate.py +0 -58
  18. data/ext/minimap2/lib/simde/meson.build +0 -33
  19. data/ext/minimap2/lib/simde/netlify.toml +0 -20
  20. data/ext/minimap2/lib/simde/simde/arm/neon/float32x2.h +0 -140
  21. data/ext/minimap2/lib/simde/simde/arm/neon/float32x4.h +0 -137
  22. data/ext/minimap2/lib/simde/simde/arm/neon/float64x1.h +0 -142
  23. data/ext/minimap2/lib/simde/simde/arm/neon/float64x2.h +0 -145
  24. data/ext/minimap2/lib/simde/simde/arm/neon/int16x4.h +0 -140
  25. data/ext/minimap2/lib/simde/simde/arm/neon/int16x8.h +0 -145
  26. data/ext/minimap2/lib/simde/simde/arm/neon/int32x2.h +0 -140
  27. data/ext/minimap2/lib/simde/simde/arm/neon/int32x4.h +0 -143
  28. data/ext/minimap2/lib/simde/simde/arm/neon/int64x1.h +0 -137
  29. data/ext/minimap2/lib/simde/simde/arm/neon/int64x2.h +0 -141
  30. data/ext/minimap2/lib/simde/simde/arm/neon/int8x16.h +0 -147
  31. data/ext/minimap2/lib/simde/simde/arm/neon/int8x8.h +0 -141
  32. data/ext/minimap2/lib/simde/simde/arm/neon/uint16x4.h +0 -134
  33. data/ext/minimap2/lib/simde/simde/arm/neon/uint16x8.h +0 -138
  34. data/ext/minimap2/lib/simde/simde/arm/neon/uint32x2.h +0 -134
  35. data/ext/minimap2/lib/simde/simde/arm/neon/uint32x4.h +0 -137
  36. data/ext/minimap2/lib/simde/simde/arm/neon/uint64x1.h +0 -131
  37. data/ext/minimap2/lib/simde/simde/arm/neon/uint64x2.h +0 -135
  38. data/ext/minimap2/lib/simde/simde/arm/neon/uint8x16.h +0 -141
  39. data/ext/minimap2/lib/simde/simde/arm/neon/uint8x8.h +0 -135
  40. data/ext/minimap2/lib/simde/simde/arm/neon.h +0 -97
  41. data/ext/minimap2/lib/simde/simde/check.h +0 -267
  42. data/ext/minimap2/lib/simde/simde/debug-trap.h +0 -83
  43. data/ext/minimap2/lib/simde/simde/hedley.h +0 -1899
  44. data/ext/minimap2/lib/simde/simde/simde-arch.h +0 -445
  45. data/ext/minimap2/lib/simde/simde/simde-common.h +0 -697
  46. data/ext/minimap2/lib/simde/simde/x86/avx.h +0 -5385
  47. data/ext/minimap2/lib/simde/simde/x86/avx2.h +0 -2402
  48. data/ext/minimap2/lib/simde/simde/x86/avx512bw.h +0 -391
  49. data/ext/minimap2/lib/simde/simde/x86/avx512f.h +0 -3389
  50. data/ext/minimap2/lib/simde/simde/x86/avx512vl.h +0 -112
  51. data/ext/minimap2/lib/simde/simde/x86/fma.h +0 -659
  52. data/ext/minimap2/lib/simde/simde/x86/mmx.h +0 -2210
  53. data/ext/minimap2/lib/simde/simde/x86/sse.h +0 -3696
  54. data/ext/minimap2/lib/simde/simde/x86/sse2.h +0 -5991
  55. data/ext/minimap2/lib/simde/simde/x86/sse3.h +0 -343
  56. data/ext/minimap2/lib/simde/simde/x86/sse4.1.h +0 -1783
  57. data/ext/minimap2/lib/simde/simde/x86/sse4.2.h +0 -105
  58. data/ext/minimap2/lib/simde/simde/x86/ssse3.h +0 -1053
  59. data/ext/minimap2/lib/simde/simde/x86/svml.h +0 -543
  60. data/ext/minimap2/lib/simde/test/CMakeLists.txt +0 -166
  61. data/ext/minimap2/lib/simde/test/arm/meson.build +0 -4
  62. data/ext/minimap2/lib/simde/test/arm/neon/meson.build +0 -23
  63. data/ext/minimap2/lib/simde/test/arm/neon/skel.c +0 -871
  64. data/ext/minimap2/lib/simde/test/arm/neon/test-neon-internal.h +0 -134
  65. data/ext/minimap2/lib/simde/test/arm/neon/test-neon.c +0 -39
  66. data/ext/minimap2/lib/simde/test/arm/neon/test-neon.h +0 -10
  67. data/ext/minimap2/lib/simde/test/arm/neon/vadd.c +0 -1260
  68. data/ext/minimap2/lib/simde/test/arm/neon/vdup_n.c +0 -873
  69. data/ext/minimap2/lib/simde/test/arm/neon/vmul.c +0 -1084
  70. data/ext/minimap2/lib/simde/test/arm/neon/vsub.c +0 -1260
  71. data/ext/minimap2/lib/simde/test/arm/test-arm-internal.h +0 -18
  72. data/ext/minimap2/lib/simde/test/arm/test-arm.c +0 -20
  73. data/ext/minimap2/lib/simde/test/arm/test-arm.h +0 -8
  74. data/ext/minimap2/lib/simde/test/cmake/AddCompilerFlags.cmake +0 -171
  75. data/ext/minimap2/lib/simde/test/cmake/ExtraWarningFlags.cmake +0 -68
  76. data/ext/minimap2/lib/simde/test/meson.build +0 -64
  77. data/ext/minimap2/lib/simde/test/munit/COPYING +0 -21
  78. data/ext/minimap2/lib/simde/test/munit/Makefile +0 -55
  79. data/ext/minimap2/lib/simde/test/munit/README.md +0 -54
  80. data/ext/minimap2/lib/simde/test/munit/example.c +0 -351
  81. data/ext/minimap2/lib/simde/test/munit/meson.build +0 -37
  82. data/ext/minimap2/lib/simde/test/munit/munit.c +0 -2055
  83. data/ext/minimap2/lib/simde/test/munit/munit.h +0 -535
  84. data/ext/minimap2/lib/simde/test/run-tests.c +0 -20
  85. data/ext/minimap2/lib/simde/test/run-tests.h +0 -260
  86. data/ext/minimap2/lib/simde/test/x86/avx.c +0 -13752
  87. data/ext/minimap2/lib/simde/test/x86/avx2.c +0 -9977
  88. data/ext/minimap2/lib/simde/test/x86/avx512bw.c +0 -2664
  89. data/ext/minimap2/lib/simde/test/x86/avx512f.c +0 -10416
  90. data/ext/minimap2/lib/simde/test/x86/avx512vl.c +0 -210
  91. data/ext/minimap2/lib/simde/test/x86/fma.c +0 -2557
  92. data/ext/minimap2/lib/simde/test/x86/meson.build +0 -33
  93. data/ext/minimap2/lib/simde/test/x86/mmx.c +0 -2878
  94. data/ext/minimap2/lib/simde/test/x86/skel.c +0 -2984
  95. data/ext/minimap2/lib/simde/test/x86/sse.c +0 -5121
  96. data/ext/minimap2/lib/simde/test/x86/sse2.c +0 -9860
  97. data/ext/minimap2/lib/simde/test/x86/sse3.c +0 -486
  98. data/ext/minimap2/lib/simde/test/x86/sse4.1.c +0 -3446
  99. data/ext/minimap2/lib/simde/test/x86/sse4.2.c +0 -101
  100. data/ext/minimap2/lib/simde/test/x86/ssse3.c +0 -2084
  101. data/ext/minimap2/lib/simde/test/x86/svml.c +0 -1545
  102. data/ext/minimap2/lib/simde/test/x86/test-avx.h +0 -16
  103. data/ext/minimap2/lib/simde/test/x86/test-avx512.h +0 -25
  104. data/ext/minimap2/lib/simde/test/x86/test-mmx.h +0 -13
  105. data/ext/minimap2/lib/simde/test/x86/test-sse.h +0 -13
  106. data/ext/minimap2/lib/simde/test/x86/test-sse2.h +0 -13
  107. data/ext/minimap2/lib/simde/test/x86/test-x86-internal.h +0 -196
  108. data/ext/minimap2/lib/simde/test/x86/test-x86.c +0 -48
  109. data/ext/minimap2/lib/simde/test/x86/test-x86.h +0 -8
@@ -1,391 +0,0 @@
1
- /* Permission is hereby granted, free of charge, to any person
2
- * obtaining a copy of this software and associated documentation
3
- * files (the "Software"), to deal in the Software without
4
- * restriction, including without limitation the rights to use, copy,
5
- * modify, merge, publish, distribute, sublicense, and/or sell copies
6
- * of the Software, and to permit persons to whom the Software is
7
- * furnished to do so, subject to the following conditions:
8
- *
9
- * The above copyright notice and this permission notice shall be
10
- * included in all copies or substantial portions of the Software.
11
- *
12
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
16
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
17
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- * SOFTWARE.
20
- *
21
- * Copyright:
22
- * 2020 Evan Nemerson <evan@nemerson.com>
23
- */
24
-
25
- #if !defined(SIMDE__AVX512BW_H)
26
- # if !defined(SIMDE__AVX512BW_H)
27
- # define SIMDE__AVX512BW_H
28
- # endif
29
- # include "avx512f.h"
30
-
31
- HEDLEY_DIAGNOSTIC_PUSH
32
- SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
33
-
34
- # if defined(SIMDE_AVX512BW_NATIVE)
35
- # undef SIMDE_AVX512BW_NATIVE
36
- # endif
37
- # if defined(SIMDE_ARCH_X86_AVX512BW) && !defined(SIMDE_AVX512BW_NO_NATIVE) && !defined(SIMDE_NO_NATIVE)
38
- # define SIMDE_AVX512BW_NATIVE
39
- # elif defined(SIMDE_ARCH_ARM_NEON) && !defined(SIMDE_AVX512BW_NO_NEON) && !defined(SIMDE_NO_NEON)
40
- # define SIMDE_AVX512BW_NEON
41
- # elif defined(SIMDE_ARCH_POWER_ALTIVEC)
42
- # define SIMDE_AVX512BW_POWER_ALTIVEC
43
- # endif
44
-
45
- # if defined(SIMDE_AVX512BW_NATIVE)
46
- # include <immintrin.h>
47
- # endif
48
-
49
- # if defined(SIMDE_AVX512BW_POWER_ALTIVEC)
50
- # include <altivec.h>
51
- # endif
52
-
53
- #if !defined(SIMDE_AVX512BW_NATIVE) && defined(SIMDE_ENABLE_NATIVE_ALIASES)
54
- #define SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES
55
- #endif
56
-
57
- SIMDE__BEGIN_DECLS
58
-
59
- SIMDE__FUNCTION_ATTRIBUTES
60
- simde__m512i
61
- simde_mm512_add_epi8 (simde__m512i a, simde__m512i b) {
62
- #if defined(SIMDE_AVX512BW_NATIVE)
63
- return _mm512_add_epi8(a, b);
64
- #else
65
- simde__m512i_private
66
- r_,
67
- a_ = simde__m512i_to_private(a),
68
- b_ = simde__m512i_to_private(b);
69
-
70
- #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
71
- r_.i8 = a_.i8 + b_.i8;
72
- #else
73
- SIMDE__VECTORIZE
74
- for (size_t i = 0 ; i < (sizeof(r_.m256i) / sizeof(r_.m256i[0])) ; i++) {
75
- r_.m256i[i] = simde_mm256_add_epi8(a_.m256i[i], b_.m256i[i]);
76
- }
77
- #endif
78
-
79
- return simde__m512i_from_private(r_);
80
- #endif
81
- }
82
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
83
- # define _mm512_add_epi8(a, b) simde_mm512_add_epi8(a, b)
84
- #endif
85
-
86
- SIMDE__FUNCTION_ATTRIBUTES
87
- simde__m512i
88
- simde_mm512_add_epi16 (simde__m512i a, simde__m512i b) {
89
- #if defined(SIMDE_AVX512BW_NATIVE)
90
- return _mm512_add_epi16(a, b);
91
- #else
92
- simde__m512i_private
93
- r_,
94
- a_ = simde__m512i_to_private(a),
95
- b_ = simde__m512i_to_private(b);
96
-
97
- #if defined(SIMDE_VECTOR_SUBSCRIPT_OPS)
98
- r_.i16 = a_.i16 + b_.i16;
99
- #else
100
- SIMDE__VECTORIZE
101
- for (size_t i = 0 ; i < (sizeof(r_.m256i) / sizeof(r_.m256i[0])) ; i++) {
102
- r_.m256i[i] = simde_mm256_add_epi16(a_.m256i[i], b_.m256i[i]);
103
- }
104
- #endif
105
-
106
- return simde__m512i_from_private(r_);
107
- #endif
108
- }
109
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
110
- # define _mm512_add_epi16(a, b) simde_mm512_add_epi16(a, b)
111
- #endif
112
-
113
- SIMDE__FUNCTION_ATTRIBUTES
114
- simde__m512i
115
- simde_mm512_adds_epi8 (simde__m512i a, simde__m512i b) {
116
- #if defined(SIMDE_AVX512BW_NATIVE)
117
- return _mm512_adds_epi8(a, b);
118
- #else
119
- simde__m512i_private
120
- r_,
121
- a_ = simde__m512i_to_private(a),
122
- b_ = simde__m512i_to_private(b);
123
-
124
- #if !defined(HEDLEY_INTEL_VERSION)
125
- SIMDE__VECTORIZE
126
- for (size_t i = 0 ; i < (sizeof(r_.m256i) / sizeof(r_.m256i[0])) ; i++) {
127
- r_.m256i[i] = simde_mm256_adds_epi8(a_.m256i[i], b_.m256i[i]);
128
- }
129
- #else
130
- SIMDE__VECTORIZE
131
- for (size_t i = 0 ; i < (sizeof(r_.i8) / sizeof(r_.i8[0])) ; i++) {
132
- const int16_t tmp =
133
- HEDLEY_STATIC_CAST(int16_t, a_.i8[i]) +
134
- HEDLEY_STATIC_CAST(int16_t, b_.i8[i]);
135
- r_.i8[i] = HEDLEY_STATIC_CAST(int8_t, ((tmp < INT8_MAX) ? ((tmp > INT8_MIN) ? tmp : INT8_MIN) : INT8_MAX));
136
- }
137
- #endif
138
-
139
- return simde__m512i_from_private(r_);
140
- #endif
141
- }
142
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
143
- # define _mm512_adds_epi8(a, b) simde_mm512_adds_epi8(a, b)
144
- #endif
145
-
146
- SIMDE__FUNCTION_ATTRIBUTES
147
- simde__m512i
148
- simde_mm512_adds_epi16 (simde__m512i a, simde__m512i b) {
149
- #if defined(SIMDE_AVX512BW_NATIVE)
150
- return _mm512_adds_epi16(a, b);
151
- #else
152
- simde__m512i_private
153
- r_,
154
- a_ = simde__m512i_to_private(a),
155
- b_ = simde__m512i_to_private(b);
156
-
157
- #if !defined(HEDLEY_INTEL_VERSION)
158
- SIMDE__VECTORIZE
159
- for (size_t i = 0 ; i < (sizeof(r_.m256i) / sizeof(r_.m256i[0])) ; i++) {
160
- r_.m256i[i] = simde_mm256_adds_epi16(a_.m256i[i], b_.m256i[i]);
161
- }
162
- #else
163
- SIMDE__VECTORIZE
164
- for (size_t i = 0 ; i < (sizeof(r_.i16) / sizeof(r_.i16[0])) ; i++) {
165
- const int32_t tmp =
166
- HEDLEY_STATIC_CAST(int32_t, a_.i16[i]) +
167
- HEDLEY_STATIC_CAST(int32_t, b_.i16[i]);
168
- r_.i16[i] = HEDLEY_STATIC_CAST(int32_t, ((tmp < INT16_MAX) ? ((tmp > INT16_MIN) ? tmp : INT16_MIN) : INT16_MAX));
169
- }
170
- #endif
171
-
172
- return simde__m512i_from_private(r_);
173
- #endif
174
- }
175
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
176
- # define _mm512_adds_epi16(a, b) simde_mm512_adds_epi16(a, b)
177
- #endif
178
-
179
- SIMDE__FUNCTION_ATTRIBUTES
180
- simde__m512i
181
- simde_mm512_adds_epu8 (simde__m512i a, simde__m512i b) {
182
- #if defined(SIMDE_AVX512BW_NATIVE)
183
- return _mm512_adds_epu8(a, b);
184
- #else
185
- simde__m512i_private
186
- r_,
187
- a_ = simde__m512i_to_private(a),
188
- b_ = simde__m512i_to_private(b);
189
-
190
- #if !defined(HEDLEY_INTEL_VERSION)
191
- SIMDE__VECTORIZE
192
- for (size_t i = 0 ; i < (sizeof(r_.m128i) / sizeof(r_.m128i[0])) ; i++) {
193
- r_.m128i[i] = simde_mm_adds_epu8(a_.m128i[i], b_.m128i[i]);
194
- }
195
- #else
196
- SIMDE__VECTORIZE
197
- for (size_t i = 0 ; i < (sizeof(r_.u8) / sizeof(r_.u8[0])) ; i++) {
198
- r_.u8[i] = ((UINT8_MAX - a_.u8[i]) > b_.u8[i]) ? (a_.u8[i] + b_.u8[i]) : UINT8_MAX;
199
- }
200
- #endif
201
-
202
- return simde__m512i_from_private(r_);
203
- #endif
204
- }
205
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
206
- # define _mm512_adds_epu8(a, b) simde_mm512_adds_epu8(a, b)
207
- #endif
208
-
209
- SIMDE__FUNCTION_ATTRIBUTES
210
- simde__m512i
211
- simde_mm512_adds_epu16 (simde__m512i a, simde__m512i b) {
212
- #if defined(SIMDE_AVX512BW_NATIVE)
213
- return _mm512_adds_epu16(a, b);
214
- #else
215
- simde__m512i_private
216
- r_,
217
- a_ = simde__m512i_to_private(a),
218
- b_ = simde__m512i_to_private(b);
219
-
220
- #if !defined(HEDLEY_INTEL_VERSION)
221
- SIMDE__VECTORIZE
222
- for (size_t i = 0 ; i < (sizeof(r_.m256i) / sizeof(r_.m256i[0])) ; i++) {
223
- r_.m256i[i] = simde_mm256_adds_epu16(a_.m256i[i], b_.m256i[i]);
224
- }
225
- #else
226
- SIMDE__VECTORIZE
227
- for (size_t i = 0 ; i < (sizeof(r_.u16) / sizeof(r_.u16[0])) ; i++) {
228
- r_.u16[i] = ((UINT16_MAX - a_.u16[i]) > b_.u16[i]) ? (a_.u16[i] + b_.u16[i]) : UINT16_MAX;
229
- }
230
- #endif
231
-
232
- return simde__m512i_from_private(r_);
233
- #endif
234
- }
235
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
236
- # define _mm512_adds_epu16(a, b) simde_mm512_adds_epu16(a, b)
237
- #endif
238
-
239
- SIMDE__FUNCTION_ATTRIBUTES
240
- simde__m512i
241
- simde_mm512_shuffle_epi8 (simde__m512i a, simde__m512i b) {
242
- #if defined(SIMDE_AVX512BW_NATIVE)
243
- return _mm512_shuffle_epi8(a, b);
244
- #else
245
- simde__m512i_private
246
- r_,
247
- a_ = simde__m512i_to_private(a),
248
- b_ = simde__m512i_to_private(b);
249
-
250
- #if defined(SIMDE_ARCH_X86_AVX2)
251
- r_.m256i[0] = simde_mm256_shuffle_epi8(a_.m256i[0], b_.m256i[0]);
252
- r_.m256i[1] = simde_mm256_shuffle_epi8(a_.m256i[1], b_.m256i[1]);
253
- #elif defined(SIMDE_ARCH_X86_SSSE3)
254
- r_.m128i[0] = simde_mm_shuffle_epi8(a_.m128i[0], b_.m128i[0]);
255
- r_.m128i[1] = simde_mm_shuffle_epi8(a_.m128i[1], b_.m128i[1]);
256
- r_.m128i[2] = simde_mm_shuffle_epi8(a_.m128i[2], b_.m128i[2]);
257
- r_.m128i[3] = simde_mm_shuffle_epi8(a_.m128i[3], b_.m128i[3]);
258
- #else
259
- SIMDE__VECTORIZE
260
- for (size_t i = 0 ; i < (sizeof(r_.u8) / sizeof(r_.u8[0])) ; i++) {
261
- r_.u8[i] = (b_.u8[i] & 0x80) ? 0 : a_.u8[(b_.u8[i] & 0x0f) + (i & 0x30)];
262
- }
263
- #endif
264
-
265
- return simde__m512i_from_private(r_);
266
- #endif
267
- }
268
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
269
- # define _mm512_shuffle_epi8(a, b) simde_mm512_shuffle_epi8(a, b)
270
- #endif
271
-
272
-
273
- SIMDE__FUNCTION_ATTRIBUTES
274
- simde__mmask64
275
- simde_mm512_cmpeq_epi8_mask (simde__m512i a, simde__m512i b) {
276
- #if defined(SIMDE_AVX512BW_NATIVE)
277
- return _mm512_cmpeq_epi8_mask(a, b);
278
- #else
279
- simde__m512i_private
280
- a_ = simde__m512i_to_private(a),
281
- b_ = simde__m512i_to_private(b);
282
-
283
- #if defined(SIMDE_ARCH_X86_AVX2)
284
- simde__mmask64 r_;
285
-
286
- // The second cast is absolutely necessary otherwise if the sign bit is set it will be sign extended to 64 bits
287
- r_ = (uint32_t) simde_mm256_movemask_epi8(simde_mm256_cmpeq_epi8(a_.m256i[1], b_.m256i[1]));
288
- r_ = (r_ << 32) | (uint32_t) simde_mm256_movemask_epi8(simde_mm256_cmpeq_epi8(a_.m256i[0], b_.m256i[0]));
289
- #elif defined(SIMDE_ARCH_X86_SSE2)
290
- simde__mmask64 r_;
291
-
292
- r_ = simde_mm_movemask_epi8(simde_mm_cmpeq_epi8(a_.m128i[3], b_.m128i[3]));
293
- r_ = (r_ << 16) | simde_mm_movemask_epi8(simde_mm_cmpeq_epi8(a_.m128i[2], b_.m128i[2]));
294
- r_ = (r_ << 16) | simde_mm_movemask_epi8(simde_mm_cmpeq_epi8(a_.m128i[1], b_.m128i[1]));
295
- r_ = (r_ << 16) | simde_mm_movemask_epi8(simde_mm_cmpeq_epi8(a_.m128i[0], b_.m128i[0]));
296
- #else
297
- simde__mmask64 r_ = 0;
298
-
299
- for (size_t i = 0 ; i < (sizeof(a_.u8) / sizeof(a_.u8[0])) ; i++) {
300
- r_ |= (a_.u8[i] == b_.u8[i]) ? (1ULL << i) : 0;
301
- }
302
- #endif
303
-
304
- return r_;
305
- #endif
306
- }
307
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
308
- # define _mm512_cmpeq_epi8_mask(a, b) simde_mm512_cmpeq_epi8_mask(a, b)
309
- #endif
310
-
311
- SIMDE__FUNCTION_ATTRIBUTES
312
- simde__m256i
313
- simde_mm512_cvtepi16_epi8 (simde__m512i a) {
314
- #if defined(SIMDE_AVX512BW_NATIVE)
315
- return _mm512_cvtepi16_epi8(a);
316
- #else
317
- simde__m256i_private r_;
318
- simde__m512i_private a_ = simde__m512i_to_private(a);
319
-
320
- #if defined(SIMDE__CONVERT_VECTOR)
321
- SIMDE__CONVERT_VECTOR(r_.i8, a_.i16);
322
- #else
323
- SIMDE__VECTORIZE
324
- for (size_t i = 0 ; i < (sizeof(r_.i8) / sizeof(r_.i8[0])) ; i++) {
325
- r_.i8[i] = HEDLEY_STATIC_CAST(int8_t, a_.i16[i]);
326
- }
327
- #endif
328
-
329
- return simde__m256i_from_private(r_);
330
- #endif
331
- }
332
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
333
- # define _mm512_cvtepi16_epi8(a) simde_mm512_cvtepi16_epi8(a)
334
- #endif
335
-
336
- SIMDE__FUNCTION_ATTRIBUTES
337
- simde__m512i
338
- simde_mm512_cvtepi8_epi16 (simde__m256i a) {
339
- #if defined(SIMDE_AVX512BW_NATIVE)
340
- return _mm512_cvtepi8_epi16(a);
341
- #else
342
- simde__m512i_private r_;
343
- simde__m256i_private a_ = simde__m256i_to_private(a);
344
-
345
- #if defined(SIMDE__CONVERT_VECTOR)
346
- SIMDE__CONVERT_VECTOR(r_.i16, a_.i8);
347
- #else
348
- SIMDE__VECTORIZE
349
- for (size_t i = 0 ; i < (sizeof(r_.i16) / sizeof(r_.i16[0])) ; i++) {
350
- r_.i16[i] = a_.i8[i];
351
- }
352
- #endif
353
-
354
- return simde__m512i_from_private(r_);
355
- #endif
356
- }
357
- #if defined(SIMDE_AVX512BW_ENABLE_NATIVE_ALIASES)
358
- # define _mm512_cvtepi8_epi16(a) simde_mm512_cvtepi8_epi16(a)
359
- #endif
360
-
361
- SIMDE__FUNCTION_ATTRIBUTES
362
- simde__m256i
363
- simde_mm512_cvtsepi16_epi8 (simde__m512i a) {
364
- #if defined(SIMDE_AVX512VL_NATIVE) && defined(SIMDE_AVX512BW_NATIVE)
365
- return _mm512_cvtsepi16_epi8(a);
366
- #else
367
- simde__m256i_private r_;
368
- simde__m512i_private a_ = simde__m512i_to_private(a);
369
-
370
- SIMDE__VECTORIZE
371
- for (size_t i = 0 ; i < (sizeof(r_.i8) / sizeof(r_.i8[0])) ; i++) {
372
- r_.i8[i] =
373
- (a_.i16[i] < INT8_MIN)
374
- ? (INT8_MIN)
375
- : ((a_.i16[i] > INT8_MAX)
376
- ? (INT8_MAX)
377
- : HEDLEY_STATIC_CAST(int8_t, a_.i16[i]));
378
- }
379
-
380
- return simde__m256i_from_private(r_);
381
- #endif
382
- }
383
- #if defined(SIMDE_AVX512VL_ENABLE_NATIVE_ALIASES)
384
- #define _mm512_cvtsepi16_epi8(a) simde_mm512_cvtsepi16_epi8(a)
385
- #endif
386
-
387
- SIMDE__END_DECLS
388
-
389
- HEDLEY_DIAGNOSTIC_POP
390
-
391
- #endif /* !defined(SIMDE__AVX512BW_H) */