@revizly/sharp-libvips-dev 1.0.31 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -15
- package/include/aom/aom_codec.h +1 -1
- package/include/aom/aom_decoder.h +4 -0
- package/include/aom/aom_encoder.h +19 -8
- package/include/aom/aom_ext_ratectrl.h +664 -0
- package/include/aom/aom_image.h +93 -30
- package/include/aom/aom_tpl.h +99 -0
- package/include/aom/aomcx.h +89 -16
- package/include/aom/aomdx.h +12 -0
- package/include/expat.h +14 -2
- package/include/expat_config.h +6 -3
- package/include/expat_external.h +3 -2
- package/include/glib-2.0/glib/gvarianttype.h +16 -16
- package/include/glib-2.0/glib/gversionmacros.h +13 -0
- package/include/harfbuzz/hb-cplusplus.hh +9 -1
- package/include/harfbuzz/hb-draw.h +52 -0
- package/include/harfbuzz/hb-paint.h +209 -2
- package/include/harfbuzz/hb-version.h +2 -2
- package/include/hwy/aligned_allocator.h +44 -2
- package/include/hwy/auto_tune.h +22 -6
- package/include/hwy/base.h +60 -90
- package/include/hwy/bit_set.h +410 -0
- package/include/hwy/cache_control.h +3 -2
- package/include/hwy/detect_compiler_arch.h +134 -14
- package/include/hwy/detect_targets.h +82 -36
- package/include/hwy/highway.h +15 -0
- package/include/hwy/nanobenchmark.h +12 -3
- package/include/hwy/ops/arm_neon-inl.h +96 -25
- package/include/hwy/ops/arm_sve-inl.h +250 -95
- package/include/hwy/ops/emu128-inl.h +12 -7
- package/include/hwy/ops/generic_ops-inl.h +271 -131
- package/include/hwy/ops/loongarch_lasx-inl.h +31 -9
- package/include/hwy/ops/loongarch_lsx-inl.h +33 -12
- package/include/hwy/ops/ppc_vsx-inl.h +99 -19
- package/include/hwy/ops/rvv-inl.h +239 -130
- package/include/hwy/ops/scalar-inl.h +22 -7
- package/include/hwy/ops/set_macros-inl.h +158 -107
- package/include/hwy/ops/wasm_128-inl.h +13 -22
- package/include/hwy/ops/x86_128-inl.h +223 -120
- package/include/hwy/ops/x86_256-inl.h +70 -134
- package/include/hwy/ops/x86_512-inl.h +130 -134
- package/include/hwy/print-inl.h +2 -0
- package/include/hwy/profiler.h +355 -264
- package/include/hwy/robust_statistics.h +3 -1
- package/include/hwy/timer.h +44 -0
- package/include/lcms2.h +34 -4
- package/include/libexif/exif-utils.h +1 -1
- package/include/libheif/heif_context.h +13 -0
- package/include/libheif/heif_decoding.h +7 -0
- package/include/libheif/heif_sequences.h +12 -2
- package/include/libheif/heif_uncompressed.h +22 -10
- package/include/libheif/heif_uncompressed_types.h +27 -27
- package/include/libpng16/png.h +7 -7
- package/include/libpng16/pngconf.h +1 -1
- package/include/libpng16/pnglibconf.h +1 -1
- package/include/librsvg-2.0/librsvg/rsvg-version.h +2 -2
- package/include/libxml2/libxml/xmlversion.h +4 -4
- package/include/png.h +7 -7
- package/include/pngconf.h +1 -1
- package/include/pnglibconf.h +1 -1
- package/include/tiffconf.h +9 -10
- package/include/tiffio.h +10 -9
- package/include/tiffvers.h +1 -1
- package/include/ultrahdr_api.h +5 -11
- package/package.json +1 -1
- package/versions.json +13 -13
- package/include/librsvg-2.0/librsvg/rsvg-pixbuf.h +0 -235
|
@@ -253,13 +253,6 @@ HWY_API Vec1<T> operator^(const Vec1<T> a, const Vec1<T> b) {
|
|
|
253
253
|
return Xor(a, b);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
// ------------------------------ Xor3
|
|
257
|
-
|
|
258
|
-
template <typename T>
|
|
259
|
-
HWY_API Vec1<T> Xor3(Vec1<T> x1, Vec1<T> x2, Vec1<T> x3) {
|
|
260
|
-
return Xor(x1, Xor(x2, x3));
|
|
261
|
-
}
|
|
262
|
-
|
|
263
256
|
// ------------------------------ Or3
|
|
264
257
|
|
|
265
258
|
template <typename T>
|
|
@@ -310,6 +303,17 @@ HWY_API Mask1<T> FirstN(D /*tag*/, size_t n) {
|
|
|
310
303
|
return Mask1<T>::FromBool(n != 0);
|
|
311
304
|
}
|
|
312
305
|
|
|
306
|
+
#ifdef HWY_NATIVE_SET_MASK
|
|
307
|
+
#undef HWY_NATIVE_SET_MASK
|
|
308
|
+
#else
|
|
309
|
+
#define HWY_NATIVE_SET_MASK
|
|
310
|
+
#endif
|
|
311
|
+
|
|
312
|
+
template <class D>
|
|
313
|
+
HWY_API MFromD<D> SetMask(D /*d*/, bool val) {
|
|
314
|
+
return MFromD<D>::FromBool(val);
|
|
315
|
+
}
|
|
316
|
+
|
|
313
317
|
// ------------------------------ IfVecThenElse
|
|
314
318
|
template <typename T>
|
|
315
319
|
HWY_API Vec1<T> IfVecThenElse(Vec1<T> mask, Vec1<T> yes, Vec1<T> no) {
|
|
@@ -1673,6 +1677,17 @@ HWY_API V InterleaveOddBlocks(D, V a, V /*b*/) {
|
|
|
1673
1677
|
return a;
|
|
1674
1678
|
}
|
|
1675
1679
|
|
|
1680
|
+
// ------------------------------ InterleaveLowerBlocks
|
|
1681
|
+
template <class D, class V = VFromD<D>>
|
|
1682
|
+
HWY_API V InterleaveLowerBlocks(D, V a, V /*b*/) {
|
|
1683
|
+
return a;
|
|
1684
|
+
}
|
|
1685
|
+
// ------------------------------ InterleaveUpperBlocks
|
|
1686
|
+
template <class D, class V = VFromD<D>>
|
|
1687
|
+
HWY_API V InterleaveUpperBlocks(D, V a, V /*b*/) {
|
|
1688
|
+
return a;
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1676
1691
|
// ------------------------------ TableLookupLanes
|
|
1677
1692
|
|
|
1678
1693
|
// Returned by SetTableIndices for use by TableLookupLanes.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Copyright 2020 Google LLC
|
|
2
|
-
// Copyright 2024 Arm Limited and/or its affiliates
|
|
2
|
+
// Copyright 2024-2025 Arm Limited and/or its affiliates
|
|
3
|
+
// <open-source-office@arm.com>
|
|
3
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
5
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
5
6
|
//
|
|
@@ -34,18 +35,39 @@
|
|
|
34
35
|
#undef HWY_NAMESPACE
|
|
35
36
|
#undef HWY_ALIGN
|
|
36
37
|
#undef HWY_MAX_BYTES
|
|
37
|
-
#undef
|
|
38
|
+
#undef HWY_MIN_BYTES
|
|
38
39
|
|
|
39
40
|
#undef HWY_HAVE_SCALABLE
|
|
40
41
|
#undef HWY_HAVE_TUPLE
|
|
42
|
+
#undef HWY_REGISTERS
|
|
41
43
|
#undef HWY_HAVE_INTEGER64
|
|
42
44
|
#undef HWY_HAVE_FLOAT16
|
|
43
45
|
#undef HWY_HAVE_FLOAT64
|
|
44
46
|
#undef HWY_MEM_OPS_MIGHT_FAULT
|
|
45
47
|
#undef HWY_NATIVE_FMA
|
|
46
48
|
#undef HWY_NATIVE_DOT_BF16
|
|
47
|
-
#undef
|
|
48
|
-
#undef
|
|
49
|
+
#undef HWY_NATIVE_MASK
|
|
50
|
+
#undef HWY_NATIVE_INTERLEAVE_WHOLE
|
|
51
|
+
|
|
52
|
+
#ifndef HWY_CAP_GE256
|
|
53
|
+
#define HWY_CAP_GE256 (HWY_MIN_BYTES >= 32)
|
|
54
|
+
#endif
|
|
55
|
+
#ifndef HWY_CAP_GE512
|
|
56
|
+
#define HWY_CAP_GE512 (HWY_MIN_BYTES >= 64)
|
|
57
|
+
#endif
|
|
58
|
+
|
|
59
|
+
// Almost all targets (except RVV and SCALAR) use this definition.
|
|
60
|
+
#undef HWY_LANES
|
|
61
|
+
#define HWY_LANES(T) (HWY_MAX_BYTES / sizeof(T))
|
|
62
|
+
|
|
63
|
+
// If 1, both __bf16 and a limited set of *_bf16 SVE intrinsics are available:
|
|
64
|
+
// create/get/set/dup, ld/st, sel, rev, trn, uzp, zip.
|
|
65
|
+
// Consulted below, hence define here rather than in arm_sve-inl.h.
|
|
66
|
+
#if HWY_ARM_HAVE_SCALAR_BF16_TYPE && defined(__ARM_FEATURE_SVE_BF16)
|
|
67
|
+
#define HWY_SVE_HAVE_BF16_FEATURE 1
|
|
68
|
+
#else
|
|
69
|
+
#define HWY_SVE_HAVE_BF16_FEATURE 0
|
|
70
|
+
#endif
|
|
49
71
|
|
|
50
72
|
#undef HWY_TARGET_IS_SVE
|
|
51
73
|
#if HWY_TARGET & HWY_ALL_SVE
|
|
@@ -84,6 +106,13 @@
|
|
|
84
106
|
#define HWY_HAVE_TUPLE 1
|
|
85
107
|
#endif
|
|
86
108
|
|
|
109
|
+
// Target-specific number of architectural vector registers available.
|
|
110
|
+
#if !HWY_ARCH_X86 || (HWY_TARGET <= HWY_AVX3)
|
|
111
|
+
#define HWY_REGISTERS 32
|
|
112
|
+
#else
|
|
113
|
+
#define HWY_REGISTERS 16
|
|
114
|
+
#endif
|
|
115
|
+
|
|
87
116
|
// For internal use (clamping/validating N for Simd<>)
|
|
88
117
|
#undef HWY_MAX_N
|
|
89
118
|
#if HWY_TARGET == HWY_SCALAR
|
|
@@ -141,57 +170,65 @@
|
|
|
141
170
|
#define HWY_TARGET_STR_AVX2 \
|
|
142
171
|
HWY_TARGET_STR_SSE4 ",avx,avx2" HWY_TARGET_STR_BMI2_FMA HWY_TARGET_STR_F16C
|
|
143
172
|
|
|
144
|
-
#
|
|
145
|
-
|
|
173
|
+
#ifndef HWY_HAVE_EVEX512 // allow override
|
|
174
|
+
// evex512 has been removed from clang 22, see
|
|
175
|
+
// https://github.com/llvm/llvm-project/pull/157034
|
|
176
|
+
#if (1400 <= HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1600) || \
|
|
177
|
+
(1800 <= HWY_COMPILER_CLANG && HWY_COMPILER_CLANG < 2200)
|
|
178
|
+
#define HWY_HAVE_EVEX512 1
|
|
179
|
+
#else
|
|
180
|
+
#define HWY_HAVE_EVEX512 0
|
|
181
|
+
#endif
|
|
182
|
+
#endif
|
|
183
|
+
|
|
184
|
+
#if (HWY_HAVE_EVEX512 == 1)
|
|
146
185
|
#define HWY_TARGET_STR_AVX3_VL512 ",evex512"
|
|
147
186
|
#else
|
|
148
187
|
#define HWY_TARGET_STR_AVX3_VL512
|
|
149
188
|
#endif
|
|
150
189
|
|
|
151
|
-
#define
|
|
152
|
-
HWY_TARGET_STR_AVX2
|
|
190
|
+
#define HWY_TARGET_STR_AVX3 \
|
|
191
|
+
HWY_TARGET_STR_AVX2 \
|
|
153
192
|
",avx512f,avx512cd,avx512vl,avx512dq,avx512bw" HWY_TARGET_STR_AVX3_VL512
|
|
154
193
|
|
|
155
|
-
#define
|
|
156
|
-
|
|
157
|
-
#define HWY_TARGET_STR_AVX3_DL_256 \
|
|
158
|
-
HWY_TARGET_STR_AVX3_256 \
|
|
194
|
+
#define HWY_TARGET_STR_AVX3_DL \
|
|
195
|
+
HWY_TARGET_STR_AVX3 \
|
|
159
196
|
",vpclmulqdq,avx512vbmi,avx512vbmi2,vaes,avx512vnni,avx512bitalg," \
|
|
160
197
|
"avx512vpopcntdq,gfni"
|
|
161
198
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
//
|
|
166
|
-
#if
|
|
199
|
+
// Opt-out for compilers that do not properly support avx512bf16.
|
|
200
|
+
#ifndef HWY_AVX3_ENABLE_AVX512BF16 // allow override
|
|
201
|
+
// Default is to disable if the DISABLE macro is defined, or if old compiler.
|
|
202
|
+
// clang-cl 21.1.4 reportedly works; feel free to define this to 1 there.
|
|
203
|
+
#if defined(HWY_AVX3_DISABLE_AVX512BF16) || \
|
|
167
204
|
(HWY_COMPILER_CLANGCL || \
|
|
168
205
|
(HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1000) || \
|
|
169
206
|
(HWY_COMPILER_CLANG && HWY_COMPILER_CLANG < 900))
|
|
170
|
-
#define
|
|
207
|
+
#define HWY_AVX3_ENABLE_AVX512BF16 0
|
|
208
|
+
#else
|
|
209
|
+
#define HWY_AVX3_ENABLE_AVX512BF16 1
|
|
171
210
|
#endif
|
|
211
|
+
#endif // HWY_AVX3_ENABLE_AVX512BF16
|
|
172
212
|
|
|
173
|
-
#if
|
|
174
|
-
#define
|
|
213
|
+
#if HWY_AVX3_ENABLE_AVX512BF16
|
|
214
|
+
#define HWY_TARGET_STR_AVX3_ZEN4 HWY_TARGET_STR_AVX3_DL ",avx512bf16"
|
|
175
215
|
#else
|
|
176
|
-
#define
|
|
216
|
+
#define HWY_TARGET_STR_AVX3_ZEN4 HWY_TARGET_STR_AVX3_DL
|
|
177
217
|
#endif
|
|
178
218
|
|
|
179
|
-
#define HWY_TARGET_STR_AVX3_ZEN4 \
|
|
180
|
-
HWY_TARGET_STR_AVX3_ZEN4_256 HWY_TARGET_STR_AVX3_VL512
|
|
181
|
-
|
|
182
219
|
#if HWY_COMPILER_GCC_ACTUAL >= 1200 || HWY_COMPILER_CLANG >= 1400
|
|
183
|
-
#define
|
|
220
|
+
#define HWY_TARGET_STR_AVX3_SPR HWY_TARGET_STR_AVX3_ZEN4 ",avx512fp16"
|
|
184
221
|
#else
|
|
185
|
-
#define
|
|
222
|
+
#define HWY_TARGET_STR_AVX3_SPR HWY_TARGET_STR_AVX3_ZEN4
|
|
186
223
|
#endif
|
|
187
224
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
#if HWY_COMPILER_GCC_ACTUAL >= 1500
|
|
192
|
-
#define HWY_TARGET_STR_AVX10_2 HWY_TARGET_STR_AVX3_SPR ",avx10.2"
|
|
193
|
-
#elif HWY_COMPILER_CLANG >= 2000
|
|
225
|
+
// Support for avx10.2-512 was removed between clang 22 and 23 without a
|
|
226
|
+
// feature test macro.
|
|
227
|
+
#if HWY_COMPILER_CLANG >= 2200 && HWY_HAVE_EVEX512
|
|
194
228
|
#define HWY_TARGET_STR_AVX10_2 HWY_TARGET_STR_AVX3_SPR ",avx10.2-512"
|
|
229
|
+
// Recent compilers drop the -512 suffix because 512 bits are always available.
|
|
230
|
+
#elif HWY_COMPILER_GCC_ACTUAL >= 1500 || HWY_COMPILER_CLANG >= 2200
|
|
231
|
+
#define HWY_TARGET_STR_AVX10_2 HWY_TARGET_STR_AVX3_SPR ",avx10.2"
|
|
195
232
|
#else
|
|
196
233
|
#define HWY_TARGET_STR_AVX10_2 HWY_TARGET_STR_AVX3_SPR
|
|
197
234
|
#endif
|
|
@@ -234,7 +271,7 @@
|
|
|
234
271
|
#define HWY_NAMESPACE N_SSE2
|
|
235
272
|
#define HWY_ALIGN alignas(16)
|
|
236
273
|
#define HWY_MAX_BYTES 16
|
|
237
|
-
#define
|
|
274
|
+
#define HWY_MIN_BYTES 16
|
|
238
275
|
|
|
239
276
|
#define HWY_HAVE_SCALABLE 0
|
|
240
277
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -243,8 +280,7 @@
|
|
|
243
280
|
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
244
281
|
#define HWY_NATIVE_FMA 0
|
|
245
282
|
#define HWY_NATIVE_DOT_BF16 0
|
|
246
|
-
#define
|
|
247
|
-
#define HWY_CAP_GE512 0
|
|
283
|
+
#define HWY_NATIVE_MASK 0 // a few actually are
|
|
248
284
|
|
|
249
285
|
#define HWY_TARGET_STR HWY_TARGET_STR_SSE2
|
|
250
286
|
//-----------------------------------------------------------------------------
|
|
@@ -254,7 +290,7 @@
|
|
|
254
290
|
#define HWY_NAMESPACE N_SSSE3
|
|
255
291
|
#define HWY_ALIGN alignas(16)
|
|
256
292
|
#define HWY_MAX_BYTES 16
|
|
257
|
-
#define
|
|
293
|
+
#define HWY_MIN_BYTES 16
|
|
258
294
|
|
|
259
295
|
#define HWY_HAVE_SCALABLE 0
|
|
260
296
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -263,8 +299,7 @@
|
|
|
263
299
|
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
264
300
|
#define HWY_NATIVE_FMA 0
|
|
265
301
|
#define HWY_NATIVE_DOT_BF16 0
|
|
266
|
-
#define
|
|
267
|
-
#define HWY_CAP_GE512 0
|
|
302
|
+
#define HWY_NATIVE_MASK 0 // a few actually are
|
|
268
303
|
|
|
269
304
|
#define HWY_TARGET_STR HWY_TARGET_STR_SSSE3
|
|
270
305
|
|
|
@@ -275,7 +310,7 @@
|
|
|
275
310
|
#define HWY_NAMESPACE N_SSE4
|
|
276
311
|
#define HWY_ALIGN alignas(16)
|
|
277
312
|
#define HWY_MAX_BYTES 16
|
|
278
|
-
#define
|
|
313
|
+
#define HWY_MIN_BYTES 16
|
|
279
314
|
|
|
280
315
|
#define HWY_HAVE_SCALABLE 0
|
|
281
316
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -284,8 +319,7 @@
|
|
|
284
319
|
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
285
320
|
#define HWY_NATIVE_FMA 0
|
|
286
321
|
#define HWY_NATIVE_DOT_BF16 0
|
|
287
|
-
#define
|
|
288
|
-
#define HWY_CAP_GE512 0
|
|
322
|
+
#define HWY_NATIVE_MASK 0 // a few actually are
|
|
289
323
|
|
|
290
324
|
#define HWY_TARGET_STR HWY_TARGET_STR_SSE4
|
|
291
325
|
|
|
@@ -296,7 +330,7 @@
|
|
|
296
330
|
#define HWY_NAMESPACE N_AVX2
|
|
297
331
|
#define HWY_ALIGN alignas(32)
|
|
298
332
|
#define HWY_MAX_BYTES 32
|
|
299
|
-
#define
|
|
333
|
+
#define HWY_MIN_BYTES 32
|
|
300
334
|
|
|
301
335
|
#define HWY_HAVE_SCALABLE 0
|
|
302
336
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -310,26 +344,22 @@
|
|
|
310
344
|
#define HWY_NATIVE_FMA 1
|
|
311
345
|
#endif
|
|
312
346
|
#define HWY_NATIVE_DOT_BF16 0
|
|
313
|
-
|
|
314
|
-
#define HWY_CAP_GE256 1
|
|
315
|
-
#define HWY_CAP_GE512 0
|
|
347
|
+
#define HWY_NATIVE_MASK 0 // a few actually are
|
|
316
348
|
|
|
317
349
|
#define HWY_TARGET_STR HWY_TARGET_STR_AVX2
|
|
318
350
|
|
|
319
351
|
//-----------------------------------------------------------------------------
|
|
320
|
-
// AVX3[_DL]/AVX10
|
|
321
|
-
#elif HWY_TARGET
|
|
322
|
-
HWY_TARGET == HWY_AVX3_ZEN4 || HWY_TARGET == HWY_AVX3_SPR || \
|
|
323
|
-
HWY_TARGET == HWY_AVX10_2
|
|
352
|
+
// AVX3[_DL/ZEN4/SPR]/AVX10
|
|
353
|
+
#elif HWY_TARGET <= HWY_AVX3
|
|
324
354
|
|
|
325
355
|
#define HWY_ALIGN alignas(64)
|
|
326
356
|
#define HWY_MAX_BYTES 64
|
|
327
|
-
#define
|
|
357
|
+
#define HWY_MIN_BYTES 64
|
|
328
358
|
|
|
329
359
|
#define HWY_HAVE_SCALABLE 0
|
|
330
360
|
#define HWY_HAVE_INTEGER64 1
|
|
331
361
|
#if HWY_TARGET <= HWY_AVX3_SPR && \
|
|
332
|
-
(HWY_COMPILER_GCC_ACTUAL || HWY_COMPILER_CLANG >=
|
|
362
|
+
(HWY_COMPILER_GCC_ACTUAL || HWY_COMPILER_CLANG >= 2200) && \
|
|
333
363
|
HWY_HAVE_SCALAR_F16_TYPE
|
|
334
364
|
#define HWY_HAVE_FLOAT16 1
|
|
335
365
|
#else
|
|
@@ -338,18 +368,12 @@
|
|
|
338
368
|
#define HWY_HAVE_FLOAT64 1
|
|
339
369
|
#define HWY_MEM_OPS_MIGHT_FAULT 0
|
|
340
370
|
#define HWY_NATIVE_FMA 1
|
|
341
|
-
#if (HWY_TARGET <= HWY_AVX3_ZEN4) &&
|
|
371
|
+
#if (HWY_TARGET <= HWY_AVX3_ZEN4) && HWY_AVX3_ENABLE_AVX512BF16
|
|
342
372
|
#define HWY_NATIVE_DOT_BF16 1
|
|
343
373
|
#else
|
|
344
374
|
#define HWY_NATIVE_DOT_BF16 0
|
|
345
375
|
#endif
|
|
346
|
-
#define
|
|
347
|
-
|
|
348
|
-
#if HWY_MAX_BYTES >= 64
|
|
349
|
-
#define HWY_CAP_GE512 1
|
|
350
|
-
#else
|
|
351
|
-
#define HWY_CAP_GE512 0
|
|
352
|
-
#endif
|
|
376
|
+
#define HWY_NATIVE_MASK 1
|
|
353
377
|
|
|
354
378
|
#if HWY_TARGET == HWY_AVX3
|
|
355
379
|
|
|
@@ -386,7 +410,7 @@
|
|
|
386
410
|
|
|
387
411
|
#define HWY_ALIGN alignas(16)
|
|
388
412
|
#define HWY_MAX_BYTES 16
|
|
389
|
-
#define
|
|
413
|
+
#define HWY_MIN_BYTES 16
|
|
390
414
|
|
|
391
415
|
#define HWY_HAVE_SCALABLE 0
|
|
392
416
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -395,8 +419,7 @@
|
|
|
395
419
|
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
396
420
|
#define HWY_NATIVE_FMA 1
|
|
397
421
|
#define HWY_NATIVE_DOT_BF16 0
|
|
398
|
-
#define
|
|
399
|
-
#define HWY_CAP_GE512 0
|
|
422
|
+
#define HWY_NATIVE_MASK 0
|
|
400
423
|
|
|
401
424
|
#if HWY_TARGET == HWY_PPC8
|
|
402
425
|
|
|
@@ -423,7 +446,7 @@
|
|
|
423
446
|
|
|
424
447
|
#define HWY_ALIGN alignas(16)
|
|
425
448
|
#define HWY_MAX_BYTES 16
|
|
426
|
-
#define
|
|
449
|
+
#define HWY_MIN_BYTES 16
|
|
427
450
|
|
|
428
451
|
#define HWY_HAVE_SCALABLE 0
|
|
429
452
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -432,8 +455,7 @@
|
|
|
432
455
|
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
433
456
|
#define HWY_NATIVE_FMA 1
|
|
434
457
|
#define HWY_NATIVE_DOT_BF16 0
|
|
435
|
-
#define
|
|
436
|
-
#define HWY_CAP_GE512 0
|
|
458
|
+
#define HWY_NATIVE_MASK 0
|
|
437
459
|
|
|
438
460
|
#if HWY_TARGET == HWY_Z14
|
|
439
461
|
|
|
@@ -478,7 +500,7 @@
|
|
|
478
500
|
|
|
479
501
|
#define HWY_ALIGN alignas(16)
|
|
480
502
|
#define HWY_MAX_BYTES 16
|
|
481
|
-
#define
|
|
503
|
+
#define HWY_MIN_BYTES 16
|
|
482
504
|
|
|
483
505
|
#define HWY_HAVE_SCALABLE 0
|
|
484
506
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -508,8 +530,7 @@
|
|
|
508
530
|
#define HWY_NATIVE_DOT_BF16 0
|
|
509
531
|
#endif
|
|
510
532
|
|
|
511
|
-
#define
|
|
512
|
-
#define HWY_CAP_GE512 0
|
|
533
|
+
#define HWY_NATIVE_MASK 0
|
|
513
534
|
|
|
514
535
|
#if HWY_TARGET == HWY_NEON_WITHOUT_AES
|
|
515
536
|
#define HWY_NAMESPACE N_NEON_WITHOUT_AES
|
|
@@ -553,6 +574,14 @@
|
|
|
553
574
|
#define HWY_TARGET_STR_FP16 "+fp16"
|
|
554
575
|
#endif
|
|
555
576
|
|
|
577
|
+
#if HWY_OS_APPLE
|
|
578
|
+
// Enable i8mm for the NEON_BF16 target if compiling for macOS, iOS, or iPadOS
|
|
579
|
+
// as all Apple Silicon CPU's that support BF16 have support for I8MM.
|
|
580
|
+
#define HWY_TARGET_STR_NEON_BF16_EXTRA "+i8mm"
|
|
581
|
+
#else
|
|
582
|
+
#define HWY_TARGET_STR_NEON_BF16_EXTRA ""
|
|
583
|
+
#endif
|
|
584
|
+
|
|
556
585
|
#if HWY_TARGET == HWY_NEON_WITHOUT_AES
|
|
557
586
|
#if HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1400
|
|
558
587
|
// Prevents inadvertent use of SVE by GCC 13.4 and earlier, see #2689.
|
|
@@ -563,7 +592,9 @@
|
|
|
563
592
|
#elif HWY_TARGET == HWY_NEON
|
|
564
593
|
#define HWY_TARGET_STR HWY_TARGET_STR_NEON
|
|
565
594
|
#elif HWY_TARGET == HWY_NEON_BF16
|
|
566
|
-
#define HWY_TARGET_STR
|
|
595
|
+
#define HWY_TARGET_STR \
|
|
596
|
+
HWY_TARGET_STR_FP16 \
|
|
597
|
+
"+bf16+dotprod" HWY_TARGET_STR_NEON_BF16_EXTRA HWY_TARGET_STR_NEON
|
|
567
598
|
#else
|
|
568
599
|
#error "Logic error, missing case"
|
|
569
600
|
#endif // HWY_TARGET
|
|
@@ -580,51 +611,65 @@
|
|
|
580
611
|
// SVE only requires lane alignment, not natural alignment of the entire vector.
|
|
581
612
|
#define HWY_ALIGN alignas(8)
|
|
582
613
|
|
|
583
|
-
// Value ensures MaxLanes() is the tightest possible upper bound to reduce
|
|
584
|
-
// overallocation.
|
|
585
|
-
#define HWY_LANES(T) ((HWY_MAX_BYTES) / sizeof(T))
|
|
586
|
-
|
|
587
614
|
#define HWY_HAVE_INTEGER64 1
|
|
588
615
|
#define HWY_HAVE_FLOAT16 1
|
|
589
616
|
#define HWY_HAVE_FLOAT64 1
|
|
590
617
|
#define HWY_MEM_OPS_MIGHT_FAULT 0
|
|
591
618
|
#define HWY_NATIVE_FMA 1
|
|
592
|
-
#if HWY_SVE_HAVE_BF16_FEATURE
|
|
619
|
+
#if HWY_SVE_HAVE_BF16_FEATURE || HWY_TARGET == HWY_SVE2_128
|
|
593
620
|
#define HWY_NATIVE_DOT_BF16 1
|
|
594
621
|
#else
|
|
595
622
|
#define HWY_NATIVE_DOT_BF16 0
|
|
596
623
|
#endif
|
|
597
|
-
#define
|
|
598
|
-
#define HWY_CAP_GE512 0
|
|
624
|
+
#define HWY_NATIVE_MASK 1
|
|
599
625
|
|
|
600
626
|
#if HWY_TARGET == HWY_SVE2
|
|
601
627
|
#define HWY_NAMESPACE N_SVE2
|
|
602
628
|
#define HWY_MAX_BYTES 256
|
|
629
|
+
#define HWY_MIN_BYTES 16
|
|
603
630
|
#define HWY_HAVE_SCALABLE 1
|
|
604
631
|
#elif HWY_TARGET == HWY_SVE_256
|
|
605
632
|
#define HWY_NAMESPACE N_SVE_256
|
|
606
633
|
#define HWY_MAX_BYTES 32
|
|
634
|
+
#define HWY_MIN_BYTES 32
|
|
607
635
|
#define HWY_HAVE_SCALABLE 0
|
|
608
636
|
#elif HWY_TARGET == HWY_SVE2_128
|
|
609
637
|
#define HWY_NAMESPACE N_SVE2_128
|
|
610
638
|
#define HWY_MAX_BYTES 16
|
|
639
|
+
#define HWY_MIN_BYTES 16
|
|
611
640
|
#define HWY_HAVE_SCALABLE 0
|
|
612
641
|
#else
|
|
613
642
|
#define HWY_NAMESPACE N_SVE
|
|
614
643
|
#define HWY_MAX_BYTES 256
|
|
644
|
+
#define HWY_MIN_BYTES 16
|
|
615
645
|
#define HWY_HAVE_SCALABLE 1
|
|
616
646
|
#endif
|
|
617
647
|
|
|
618
|
-
//
|
|
619
|
-
|
|
620
|
-
|
|
648
|
+
// Note: -march strings are delimited by + and GCC actually requires + before
|
|
649
|
+
// each pragma target, which are also comma-separated.
|
|
650
|
+
|
|
651
|
+
#undef HWY_TARGET_STR_SVE2_AES
|
|
621
652
|
// Static dispatch with -march=armv8-a+sve2+aes, or no baseline, hence dynamic
|
|
622
653
|
// dispatch, which checks for AES support at runtime.
|
|
623
654
|
#if defined(__ARM_FEATURE_SVE2_AES) || (HWY_BASELINE_SVE2 == 0)
|
|
624
|
-
#define
|
|
655
|
+
#define HWY_TARGET_STR_SVE2_AES ",+sve2-aes"
|
|
625
656
|
#else // SVE2 without AES
|
|
626
|
-
#define
|
|
657
|
+
#define HWY_TARGET_STR_SVE2_AES ""
|
|
627
658
|
#endif
|
|
659
|
+
|
|
660
|
+
#undef HWY_TARGET_STR_SVE2_128
|
|
661
|
+
// SVE2_128 implies/requires I8MM and BF16, see #2973.
|
|
662
|
+
#if HWY_TARGET == HWY_SVE2_128
|
|
663
|
+
#define HWY_TARGET_STR_SVE2_128 ",+i8mm,+bf16"
|
|
664
|
+
#else
|
|
665
|
+
#define HWY_TARGET_STR_SVE2_128 ""
|
|
666
|
+
#endif
|
|
667
|
+
|
|
668
|
+
// Can use pragmas instead of -march compiler flag
|
|
669
|
+
#if HWY_HAVE_RUNTIME_DISPATCH
|
|
670
|
+
#if HWY_TARGET == HWY_SVE2 || HWY_TARGET == HWY_SVE2_128
|
|
671
|
+
#define HWY_TARGET_STR \
|
|
672
|
+
"+sve,+sve2" HWY_TARGET_STR_SVE2_AES HWY_TARGET_STR_SVE2_128
|
|
628
673
|
#else // not SVE2 target
|
|
629
674
|
#define HWY_TARGET_STR "+sve"
|
|
630
675
|
#endif
|
|
@@ -638,7 +683,7 @@
|
|
|
638
683
|
|
|
639
684
|
#define HWY_ALIGN alignas(16)
|
|
640
685
|
#define HWY_MAX_BYTES 16
|
|
641
|
-
#define
|
|
686
|
+
#define HWY_MIN_BYTES 16
|
|
642
687
|
|
|
643
688
|
#define HWY_HAVE_SCALABLE 0
|
|
644
689
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -647,8 +692,7 @@
|
|
|
647
692
|
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
648
693
|
#define HWY_NATIVE_FMA 0
|
|
649
694
|
#define HWY_NATIVE_DOT_BF16 0
|
|
650
|
-
#define
|
|
651
|
-
#define HWY_CAP_GE512 0
|
|
695
|
+
#define HWY_NATIVE_MASK 0
|
|
652
696
|
|
|
653
697
|
#define HWY_NAMESPACE N_WASM
|
|
654
698
|
|
|
@@ -660,7 +704,7 @@
|
|
|
660
704
|
|
|
661
705
|
#define HWY_ALIGN alignas(32)
|
|
662
706
|
#define HWY_MAX_BYTES 32
|
|
663
|
-
#define
|
|
707
|
+
#define HWY_MIN_BYTES 32
|
|
664
708
|
|
|
665
709
|
#define HWY_HAVE_SCALABLE 0
|
|
666
710
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -669,8 +713,7 @@
|
|
|
669
713
|
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
670
714
|
#define HWY_NATIVE_FMA 0
|
|
671
715
|
#define HWY_NATIVE_DOT_BF16 0
|
|
672
|
-
#define
|
|
673
|
-
#define HWY_CAP_GE512 0
|
|
716
|
+
#define HWY_NATIVE_MASK 0
|
|
674
717
|
|
|
675
718
|
#define HWY_NAMESPACE N_WASM_EMU256
|
|
676
719
|
|
|
@@ -686,9 +729,11 @@
|
|
|
686
729
|
|
|
687
730
|
// The spec requires VLEN <= 2^16 bits, so the limit is 2^16 bytes (LMUL=8).
|
|
688
731
|
#define HWY_MAX_BYTES 65536
|
|
732
|
+
#define HWY_MIN_BYTES 16
|
|
689
733
|
|
|
690
734
|
// = HWY_MAX_BYTES divided by max LMUL=8 because MaxLanes includes the actual
|
|
691
735
|
// LMUL. This is the tightest possible upper bound.
|
|
736
|
+
#undef HWY_LANES
|
|
692
737
|
#define HWY_LANES(T) (8192 / sizeof(T))
|
|
693
738
|
|
|
694
739
|
#define HWY_HAVE_SCALABLE 1
|
|
@@ -697,8 +742,7 @@
|
|
|
697
742
|
#define HWY_MEM_OPS_MIGHT_FAULT 0
|
|
698
743
|
#define HWY_NATIVE_FMA 1
|
|
699
744
|
#define HWY_NATIVE_DOT_BF16 0
|
|
700
|
-
#define
|
|
701
|
-
#define HWY_CAP_GE512 0
|
|
745
|
+
#define HWY_NATIVE_MASK 1
|
|
702
746
|
|
|
703
747
|
#if HWY_RVV_HAVE_F16_VEC
|
|
704
748
|
#define HWY_HAVE_FLOAT16 1
|
|
@@ -722,12 +766,18 @@
|
|
|
722
766
|
#if HWY_TARGET == HWY_LSX
|
|
723
767
|
#define HWY_ALIGN alignas(16)
|
|
724
768
|
#define HWY_MAX_BYTES 16
|
|
769
|
+
#define HWY_MIN_BYTES 16
|
|
770
|
+
#ifndef __loongarch_sx
|
|
771
|
+
#define HWY_TARGET_STR "lsx"
|
|
772
|
+
#endif
|
|
725
773
|
#else
|
|
726
774
|
#define HWY_ALIGN alignas(32)
|
|
727
775
|
#define HWY_MAX_BYTES 32
|
|
776
|
+
#define HWY_MIN_BYTES 32
|
|
777
|
+
#ifndef __loongarch_asx
|
|
778
|
+
#define HWY_TARGET_STR "lsx,lasx"
|
|
779
|
+
#endif
|
|
728
780
|
#endif
|
|
729
|
-
|
|
730
|
-
#define HWY_LANES(T) (HWY_MAX_BYTES / sizeof(T))
|
|
731
781
|
|
|
732
782
|
#define HWY_HAVE_SCALABLE 0
|
|
733
783
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -736,14 +786,7 @@
|
|
|
736
786
|
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
737
787
|
#define HWY_NATIVE_FMA 1
|
|
738
788
|
#define HWY_NATIVE_DOT_BF16 0
|
|
739
|
-
|
|
740
|
-
#if HWY_TARGET == HWY_LSX
|
|
741
|
-
#define HWY_CAP_GE256 0
|
|
742
|
-
#else
|
|
743
|
-
#define HWY_CAP_GE256 1
|
|
744
|
-
#endif
|
|
745
|
-
|
|
746
|
-
#define HWY_CAP_GE512 0
|
|
789
|
+
#define HWY_NATIVE_MASK 0
|
|
747
790
|
|
|
748
791
|
#if HWY_TARGET == HWY_LSX
|
|
749
792
|
#define HWY_NAMESPACE N_LSX
|
|
@@ -759,7 +802,7 @@
|
|
|
759
802
|
|
|
760
803
|
#define HWY_ALIGN alignas(16)
|
|
761
804
|
#define HWY_MAX_BYTES 16
|
|
762
|
-
#define
|
|
805
|
+
#define HWY_MIN_BYTES 16
|
|
763
806
|
|
|
764
807
|
#define HWY_HAVE_SCALABLE 0
|
|
765
808
|
#define HWY_HAVE_INTEGER64 1
|
|
@@ -768,8 +811,7 @@
|
|
|
768
811
|
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
769
812
|
#define HWY_NATIVE_FMA 0
|
|
770
813
|
#define HWY_NATIVE_DOT_BF16 0
|
|
771
|
-
#define
|
|
772
|
-
#define HWY_CAP_GE512 0
|
|
814
|
+
#define HWY_NATIVE_MASK 0
|
|
773
815
|
|
|
774
816
|
#define HWY_NAMESPACE N_EMU128
|
|
775
817
|
|
|
@@ -781,6 +823,8 @@
|
|
|
781
823
|
|
|
782
824
|
#define HWY_ALIGN
|
|
783
825
|
#define HWY_MAX_BYTES 8
|
|
826
|
+
#define HWY_MIN_BYTES 8
|
|
827
|
+
#undef HWY_LANES
|
|
784
828
|
#define HWY_LANES(T) 1
|
|
785
829
|
|
|
786
830
|
#define HWY_HAVE_SCALABLE 0
|
|
@@ -790,8 +834,7 @@
|
|
|
790
834
|
#define HWY_MEM_OPS_MIGHT_FAULT 0
|
|
791
835
|
#define HWY_NATIVE_FMA 0
|
|
792
836
|
#define HWY_NATIVE_DOT_BF16 0
|
|
793
|
-
#define
|
|
794
|
-
#define HWY_CAP_GE512 0
|
|
837
|
+
#define HWY_NATIVE_MASK 0
|
|
795
838
|
|
|
796
839
|
#define HWY_NAMESPACE N_SCALAR
|
|
797
840
|
|
|
@@ -817,7 +860,7 @@
|
|
|
817
860
|
|
|
818
861
|
// Clang <9 requires this be invoked at file scope, before any namespace.
|
|
819
862
|
#undef HWY_BEFORE_NAMESPACE
|
|
820
|
-
#if defined(HWY_TARGET_STR)
|
|
863
|
+
#if defined(HWY_TARGET_STR) && !defined(HWY_DISABLE_ATTR)
|
|
821
864
|
#define HWY_BEFORE_NAMESPACE() \
|
|
822
865
|
HWY_PUSH_ATTRIBUTES(HWY_TARGET_STR) \
|
|
823
866
|
static_assert(true, "For requiring trailing semicolon")
|
|
@@ -829,7 +872,7 @@
|
|
|
829
872
|
|
|
830
873
|
// Clang <9 requires any namespaces be closed before this macro.
|
|
831
874
|
#undef HWY_AFTER_NAMESPACE
|
|
832
|
-
#if defined(HWY_TARGET_STR)
|
|
875
|
+
#if defined(HWY_TARGET_STR) && !defined(HWY_DISABLE_ATTR)
|
|
833
876
|
#define HWY_AFTER_NAMESPACE() \
|
|
834
877
|
HWY_POP_ATTRIBUTES \
|
|
835
878
|
static_assert(true, "For requiring trailing semicolon")
|
|
@@ -840,8 +883,16 @@
|
|
|
840
883
|
#endif
|
|
841
884
|
|
|
842
885
|
#undef HWY_ATTR
|
|
843
|
-
#if defined(HWY_TARGET_STR) && HWY_HAS_ATTRIBUTE(target)
|
|
886
|
+
#if defined(HWY_TARGET_STR) && HWY_HAS_ATTRIBUTE(target) && \
|
|
887
|
+
!defined(HWY_DISABLE_ATTR)
|
|
844
888
|
#define HWY_ATTR __attribute__((target(HWY_TARGET_STR)))
|
|
845
889
|
#else
|
|
846
890
|
#define HWY_ATTR
|
|
847
891
|
#endif
|
|
892
|
+
|
|
893
|
+
#if (HWY_MAX_BYTES <= 16) || HWY_TARGET_IS_SVE || (HWY_TARGET == HWY_RVV) || \
|
|
894
|
+
(HWY_TARGET == HWY_WASM_EMU256)
|
|
895
|
+
#define HWY_NATIVE_INTERLEAVE_WHOLE 1
|
|
896
|
+
#else
|
|
897
|
+
#define HWY_NATIVE_INTERLEAVE_WHOLE 0
|
|
898
|
+
#endif
|
|
@@ -1573,13 +1573,6 @@ HWY_API Vec128<T, N> Xor(Vec128<T, N> a, Vec128<T, N> b) {
|
|
|
1573
1573
|
return Vec128<T, N>{wasm_v128_xor(a.raw, b.raw)};
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
-
// ------------------------------ Xor3
|
|
1577
|
-
|
|
1578
|
-
template <typename T, size_t N>
|
|
1579
|
-
HWY_API Vec128<T, N> Xor3(Vec128<T, N> x1, Vec128<T, N> x2, Vec128<T, N> x3) {
|
|
1580
|
-
return Xor(x1, Xor(x2, x3));
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
1576
|
// ------------------------------ Or3
|
|
1584
1577
|
|
|
1585
1578
|
template <typename T, size_t N>
|
|
@@ -3943,6 +3936,17 @@ HWY_API V InterleaveOddBlocks(D, V a, V /*b*/) {
|
|
|
3943
3936
|
return a;
|
|
3944
3937
|
}
|
|
3945
3938
|
|
|
3939
|
+
// ------------------------------ InterleaveLowerBlocks
|
|
3940
|
+
template <class D, class V = VFromD<D>, HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
3941
|
+
HWY_API V InterleaveLowerBlocks(D, V a, V /*b*/) {
|
|
3942
|
+
return a;
|
|
3943
|
+
}
|
|
3944
|
+
// ------------------------------ InterleaveUpperBlocks
|
|
3945
|
+
template <class D, class V = VFromD<D>, HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
3946
|
+
HWY_API V InterleaveUpperBlocks(D, V a, V /*b*/) {
|
|
3947
|
+
return a;
|
|
3948
|
+
}
|
|
3949
|
+
|
|
3946
3950
|
// ------------------------------ ReverseBlocks
|
|
3947
3951
|
template <class D>
|
|
3948
3952
|
HWY_API VFromD<D> ReverseBlocks(D /* tag */, VFromD<D> v) {
|
|
@@ -5888,24 +5892,11 @@ HWY_API VFromD<D32> ReorderWidenMulAccumulate(D32 d32, V16 a, V16 b,
|
|
|
5888
5892
|
}
|
|
5889
5893
|
|
|
5890
5894
|
// ------------------------------ RearrangeToOddPlusEven
|
|
5891
|
-
template <
|
|
5892
|
-
HWY_API
|
|
5893
|
-
const Vec128<int32_t, N> sum0, const Vec128<int32_t, N> /*sum1*/) {
|
|
5895
|
+
template <class VW, HWY_IF_NOT_FLOAT_V(VW)>
|
|
5896
|
+
HWY_API VW RearrangeToOddPlusEven(const VW sum0, const VW) {
|
|
5894
5897
|
return sum0; // invariant already holds
|
|
5895
5898
|
}
|
|
5896
5899
|
|
|
5897
|
-
template <size_t N>
|
|
5898
|
-
HWY_API Vec128<uint32_t, N> RearrangeToOddPlusEven(
|
|
5899
|
-
const Vec128<uint32_t, N> sum0, const Vec128<uint32_t, N> /*sum1*/) {
|
|
5900
|
-
return sum0; // invariant already holds
|
|
5901
|
-
}
|
|
5902
|
-
|
|
5903
|
-
template <size_t N>
|
|
5904
|
-
HWY_API Vec128<float, N> RearrangeToOddPlusEven(const Vec128<float, N> sum0,
|
|
5905
|
-
const Vec128<float, N> sum1) {
|
|
5906
|
-
return Add(sum0, sum1);
|
|
5907
|
-
}
|
|
5908
|
-
|
|
5909
5900
|
// ------------------------------ Reductions
|
|
5910
5901
|
|
|
5911
5902
|
// Nothing native, generic_ops-inl defines SumOfLanes and ReduceSum.
|