@img/sharp-libvips-dev 1.0.0 → 1.0.2
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/include/aom/aom_encoder.h +3 -3
- package/include/aom/aomcx.h +17 -8
- package/include/expat.h +21 -10
- package/include/expat_config.h +11 -5
- package/include/ffi.h +12 -25
- package/include/fontconfig/fontconfig.h +5 -3
- package/include/freetype2/freetype/config/ftoption.h +1 -1
- package/include/gio-unix-2.0/gio/gfiledescriptorbased.h +3 -7
- package/include/gio-unix-2.0/gio/gunixinputstream.h +0 -5
- package/include/gio-unix-2.0/gio/gunixoutputstream.h +0 -5
- package/include/glib-2.0/gio/gappinfo.h +0 -7
- package/include/glib-2.0/gio/gapplication.h +6 -0
- package/include/glib-2.0/gio/gapplicationcommandline.h +12 -1
- package/include/glib-2.0/gio/gasyncinitable.h +0 -7
- package/include/glib-2.0/gio/gasyncresult.h +0 -6
- package/include/glib-2.0/gio/gbufferedinputstream.h +0 -5
- package/include/glib-2.0/gio/gbufferedoutputstream.h +0 -5
- package/include/glib-2.0/gio/gbytesicon.h +0 -5
- package/include/glib-2.0/gio/gcancellable.h +0 -5
- package/include/glib-2.0/gio/gconverter.h +0 -7
- package/include/glib-2.0/gio/gconverterinputstream.h +0 -6
- package/include/glib-2.0/gio/gconverteroutputstream.h +0 -6
- package/include/glib-2.0/gio/gdatagrambased.h +0 -7
- package/include/glib-2.0/gio/gdatainputstream.h +0 -6
- package/include/glib-2.0/gio/gdataoutputstream.h +0 -6
- package/include/glib-2.0/gio/gdbusinterface.h +0 -8
- package/include/glib-2.0/gio/gdbusinterfaceskeleton.h +0 -8
- package/include/glib-2.0/gio/gdbusmessage.h +2 -1
- package/include/glib-2.0/gio/gdbusobjectmanagerclient.h +0 -8
- package/include/glib-2.0/gio/gdbusobjectmanagerserver.h +0 -8
- package/include/glib-2.0/gio/gdbusobjectproxy.h +0 -8
- package/include/glib-2.0/gio/gdbusobjectskeleton.h +0 -8
- package/include/glib-2.0/gio/gdbusproxy.h +0 -8
- package/include/glib-2.0/gio/gdebugcontroller.h +0 -8
- package/include/glib-2.0/gio/gdebugcontrollerdbus.h +0 -7
- package/include/glib-2.0/gio/gdtlsserverconnection.h +0 -8
- package/include/glib-2.0/gio/gemblem.h +0 -5
- package/include/glib-2.0/gio/gemblemedicon.h +0 -5
- package/include/glib-2.0/gio/gfile.h +0 -10
- package/include/glib-2.0/gio/gfileenumerator.h +0 -5
- package/include/glib-2.0/gio/gfileicon.h +0 -5
- package/include/glib-2.0/gio/gfileinfo.h +0 -5
- package/include/glib-2.0/gio/gfileinputstream.h +0 -8
- package/include/glib-2.0/gio/gfileiostream.h +0 -8
- package/include/glib-2.0/gio/gfilemonitor.h +0 -5
- package/include/glib-2.0/gio/gfilenamecompleter.h +0 -5
- package/include/glib-2.0/gio/gfileoutputstream.h +0 -8
- package/include/glib-2.0/gio/gfilterinputstream.h +0 -5
- package/include/glib-2.0/gio/gfilteroutputstream.h +0 -5
- package/include/glib-2.0/gio/gicon.h +0 -5
- package/include/glib-2.0/gio/ginitable.h +0 -7
- package/include/glib-2.0/gio/ginputstream.h +0 -5
- package/include/glib-2.0/gio/gio-autocleanups.h +4 -0
- package/include/glib-2.0/gio/gio-visibility.h +34 -0
- package/include/glib-2.0/gio/gioenums.h +6 -1
- package/include/glib-2.0/gio/giomodule.h +0 -5
- package/include/glib-2.0/gio/giostream.h +0 -5
- package/include/glib-2.0/gio/giotypes.h +5 -108
- package/include/glib-2.0/gio/gloadableicon.h +0 -6
- package/include/glib-2.0/gio/gmemoryinputstream.h +0 -5
- package/include/glib-2.0/gio/gmemoryoutputstream.h +0 -5
- package/include/glib-2.0/gio/gmountoperation.h +0 -6
- package/include/glib-2.0/gio/gnetworking.h +4 -0
- package/include/glib-2.0/gio/goutputstream.h +0 -9
- package/include/glib-2.0/gio/gpollableinputstream.h +0 -7
- package/include/glib-2.0/gio/gpollableoutputstream.h +0 -7
- package/include/glib-2.0/gio/gproxy.h +0 -7
- package/include/glib-2.0/gio/gproxyaddressenumerator.h +0 -8
- package/include/glib-2.0/gio/gseekable.h +0 -5
- package/include/glib-2.0/gio/gsettingsbackend.h +0 -5
- package/include/glib-2.0/gio/gsimpleactiongroup.h +0 -7
- package/include/glib-2.0/gio/gsimpleasyncresult.h +0 -5
- package/include/glib-2.0/gio/gsimpleproxyresolver.h +0 -5
- package/include/glib-2.0/gio/gsocket.h +13 -0
- package/include/glib-2.0/gio/gsocketaddressenumerator.h +0 -6
- package/include/glib-2.0/gio/gsocketconnectable.h +0 -5
- package/include/glib-2.0/gio/gtask.h +12 -0
- package/include/glib-2.0/gio/gthemedicon.h +0 -5
- package/include/glib-2.0/gio/gtlsserverconnection.h +0 -8
- package/include/glib-2.0/gio/gunixcredentialsmessage.h +0 -8
- package/include/glib-2.0/gio/gvfs.h +0 -5
- package/include/glib-2.0/gio/gvolume.h +2 -2
- package/include/glib-2.0/gio/gvolumemonitor.h +0 -5
- package/include/glib-2.0/girepository/gi-visibility.h +986 -0
- package/include/glib-2.0/girepository/giarginfo.h +100 -0
- package/include/glib-2.0/girepository/gibaseinfo.h +129 -0
- package/include/glib-2.0/girepository/gicallableinfo.h +119 -0
- package/include/glib-2.0/girepository/gicallbackinfo.h +60 -0
- package/include/glib-2.0/girepository/giconstantinfo.h +72 -0
- package/include/glib-2.0/girepository/gienuminfo.h +82 -0
- package/include/glib-2.0/girepository/gifieldinfo.h +84 -0
- package/include/glib-2.0/girepository/giflagsinfo.h +60 -0
- package/include/glib-2.0/girepository/gifunctioninfo.h +117 -0
- package/include/glib-2.0/girepository/giinterfaceinfo.h +120 -0
- package/include/glib-2.0/girepository/giobjectinfo.h +230 -0
- package/include/glib-2.0/girepository/gipropertyinfo.h +77 -0
- package/include/glib-2.0/girepository/giregisteredtypeinfo.h +75 -0
- package/include/glib-2.0/girepository/girepository-autocleanups.h +56 -0
- package/include/glib-2.0/girepository/girepository.h +247 -0
- package/include/glib-2.0/girepository/girffi.h +129 -0
- package/include/glib-2.0/girepository/gisignalinfo.h +72 -0
- package/include/glib-2.0/girepository/gistructinfo.h +102 -0
- package/include/glib-2.0/girepository/gitypeinfo.h +144 -0
- package/include/glib-2.0/girepository/gitypelib.h +61 -0
- package/include/glib-2.0/girepository/gitypes.h +421 -0
- package/include/glib-2.0/girepository/giunioninfo.h +105 -0
- package/include/glib-2.0/girepository/giunresolvedinfo.h +60 -0
- package/include/glib-2.0/girepository/givalueinfo.h +65 -0
- package/include/glib-2.0/girepository/givfuncinfo.h +88 -0
- package/include/glib-2.0/glib/deprecated/gcompletion.h +1 -1
- package/include/glib-2.0/glib/deprecated/grel.h +0 -23
- package/include/glib-2.0/glib/deprecated/gthread.h +10 -6
- package/include/glib-2.0/glib/gatomic.h +20 -20
- package/include/glib-2.0/glib/gbitlock.h +31 -0
- package/include/glib-2.0/glib/gbookmarkfile.h +39 -1
- package/include/glib-2.0/glib/gchecksum.h +0 -10
- package/include/glib-2.0/glib/gdate.h +0 -9
- package/include/glib-2.0/glib/gdatetime.h +33 -1
- package/include/glib-2.0/glib/gdir.h +5 -0
- package/include/glib-2.0/glib/ghmac.h +0 -9
- package/include/glib-2.0/glib/glib-autocleanups.h +4 -0
- package/include/glib-2.0/glib/glib-visibility.h +34 -0
- package/include/glib-2.0/glib/gmacros.h +1 -0
- package/include/glib-2.0/glib/gmessages.h +11 -0
- package/include/glib-2.0/glib/gpathbuf.h +0 -7
- package/include/glib-2.0/glib/gslice.h +2 -0
- package/include/glib-2.0/glib/gstdio.h +1 -1
- package/include/glib-2.0/glib/gstrfuncs.h +24 -18
- package/include/glib-2.0/glib/gstrvbuilder.h +4 -8
- package/include/glib-2.0/glib/gtestutils.h +5 -0
- package/include/glib-2.0/glib/gthread.h +216 -3
- package/include/glib-2.0/glib/gunicode.h +12 -2
- package/include/glib-2.0/glib/gvarianttype.h +1 -10
- package/include/glib-2.0/glib/gversionmacros.h +9 -0
- package/include/glib-2.0/glib/gwin32.h +4 -4
- package/include/glib-2.0/glib-unix.h +214 -0
- package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
- package/include/glib-2.0/gobject/gbinding.h +0 -8
- package/include/glib-2.0/gobject/gbindinggroup.h +0 -8
- package/include/glib-2.0/gobject/gclosure.h +1 -9
- package/include/glib-2.0/gobject/genums.h +6 -6
- package/include/glib-2.0/gobject/glib-types.h +44 -0
- package/include/glib-2.0/gobject/gobject-autocleanups.h +4 -0
- package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
- package/include/glib-2.0/gobject/gobject.h +1 -16
- package/include/glib-2.0/gobject/gparam.h +3 -12
- package/include/glib-2.0/gobject/gsignal.h +16 -6
- package/include/glib-2.0/gobject/gsignalgroup.h +0 -8
- package/include/glib-2.0/gobject/gtype.h +53 -20
- package/include/glib-2.0/gobject/gtypemodule.h +0 -7
- package/include/glib-2.0/gobject/gtypeplugin.h +0 -6
- package/include/glib-2.0/gobject/gvaluearray.h +0 -7
- package/include/glib-2.0/gobject/gvaluecollector.h +1 -11
- package/include/glib-2.0/gobject/gvaluetypes.h +2 -0
- package/include/hwy/aligned_allocator.h +171 -6
- package/include/hwy/base.h +1765 -543
- package/include/hwy/cache_control.h +24 -6
- package/include/hwy/detect_compiler_arch.h +23 -2
- package/include/hwy/detect_targets.h +56 -13
- package/include/hwy/foreach_target.h +24 -0
- package/include/hwy/highway.h +20 -3
- package/include/hwy/ops/arm_neon-inl.h +1086 -667
- package/include/hwy/ops/arm_sve-inl.h +1091 -235
- package/include/hwy/ops/emu128-inl.h +271 -196
- package/include/hwy/ops/generic_ops-inl.h +2270 -399
- package/include/hwy/ops/ppc_vsx-inl.h +1786 -563
- package/include/hwy/ops/rvv-inl.h +1043 -311
- package/include/hwy/ops/scalar-inl.h +189 -159
- package/include/hwy/ops/set_macros-inl.h +66 -6
- package/include/hwy/ops/shared-inl.h +175 -56
- package/include/hwy/ops/wasm_128-inl.h +153 -136
- package/include/hwy/ops/x86_128-inl.h +1647 -646
- package/include/hwy/ops/x86_256-inl.h +1003 -370
- package/include/hwy/ops/x86_512-inl.h +948 -353
- package/include/hwy/per_target.h +4 -0
- package/include/hwy/profiler.h +648 -0
- package/include/hwy/robust_statistics.h +2 -2
- package/include/hwy/targets.h +18 -11
- package/include/hwy/timer.h +11 -0
- package/include/lcms2.h +46 -7
- package/include/lcms2_plugin.h +4 -4
- package/include/libheif/heif_version.h +2 -2
- package/include/libpng16/png.h +32 -29
- package/include/libpng16/pngconf.h +2 -2
- package/include/libpng16/pnglibconf.h +7 -2
- package/include/librsvg-2.0/librsvg/rsvg-version.h +2 -2
- package/include/libxml2/libxml/HTMLparser.h +23 -0
- package/include/libxml2/libxml/SAX.h +0 -2
- package/include/libxml2/libxml/SAX2.h +0 -2
- package/include/libxml2/libxml/c14n.h +0 -2
- package/include/libxml2/libxml/dict.h +1 -0
- package/include/libxml2/libxml/encoding.h +16 -14
- package/include/libxml2/libxml/entities.h +4 -0
- package/include/libxml2/libxml/globals.h +15 -503
- package/include/libxml2/libxml/hash.h +57 -61
- package/include/libxml2/libxml/nanoftp.h +2 -2
- package/include/libxml2/libxml/parser.h +137 -18
- package/include/libxml2/libxml/parserInternals.h +1 -0
- package/include/libxml2/libxml/relaxng.h +2 -1
- package/include/libxml2/libxml/schemasInternals.h +1 -0
- package/include/libxml2/libxml/schematron.h +1 -0
- package/include/libxml2/libxml/threads.h +4 -11
- package/include/libxml2/libxml/tree.h +68 -20
- package/include/libxml2/libxml/uri.h +2 -1
- package/include/libxml2/libxml/valid.h +2 -0
- package/include/libxml2/libxml/xmlIO.h +65 -13
- package/include/libxml2/libxml/xmlerror.h +37 -8
- package/include/libxml2/libxml/xmlmemory.h +37 -40
- package/include/libxml2/libxml/xmlreader.h +6 -0
- package/include/libxml2/libxml/xmlregexp.h +2 -9
- package/include/libxml2/libxml/xmlsave.h +9 -0
- package/include/libxml2/libxml/xmlschemas.h +3 -0
- package/include/libxml2/libxml/xmlversion.h +28 -43
- package/include/libxml2/libxml/xpath.h +1 -1
- package/include/libxml2/libxml/xpathInternals.h +2 -1
- package/include/libxml2/libxml/xpointer.h +5 -4
- package/include/pango-1.0/pango/pango-features.h +3 -3
- package/include/pango-1.0/pango/pango-fontmap.h +7 -0
- package/include/pixman-1/pixman-version.h +3 -3
- package/include/pixman-1/pixman.h +9 -2
- package/include/png.h +32 -29
- package/include/pngconf.h +2 -2
- package/include/pnglibconf.h +7 -2
- package/include/vips/connection.h +9 -3
- package/include/vips/util.h +0 -9
- package/include/vips/version.h +4 -4
- package/include/zconf.h +3 -0
- package/include/zlib.h +3 -3
- package/package.json +1 -1
- package/versions.json +15 -15
|
@@ -131,9 +131,21 @@
|
|
|
131
131
|
#if HWY_COMPILER_CLANG
|
|
132
132
|
#define HWY_TARGET_STR_PPC10 HWY_TARGET_STR_PPC9 ",power10-vector"
|
|
133
133
|
#else
|
|
134
|
-
#
|
|
134
|
+
// See #1707 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102059#c35.
|
|
135
|
+
// When the baseline is PPC 8 or 9, inlining functions such as PreventElision
|
|
136
|
+
// into PPC10 code fails because PPC10 defaults to no-htm and is thus worse than
|
|
137
|
+
// the baseline, which has htm. We cannot have pragma target on functions
|
|
138
|
+
// outside HWY_NAMESPACE such as those in base.h. It would be possible for users
|
|
139
|
+
// to set -mno-htm globally, but we can also work around this at the library
|
|
140
|
+
// level by claiming that PPC10 still has HTM, thus avoiding the mismatch. This
|
|
141
|
+
// seems to be safe because HTM uses builtins rather than modifying codegen, see
|
|
142
|
+
// https://gcc.gnu.org/legacy-ml/gcc-patches/2013-07/msg00167.html.
|
|
143
|
+
#define HWY_TARGET_STR_PPC10 HWY_TARGET_STR_PPC9 ",cpu=power10,htm"
|
|
135
144
|
#endif
|
|
136
145
|
|
|
146
|
+
#define HWY_TARGET_STR_Z14 "arch=z14"
|
|
147
|
+
#define HWY_TARGET_STR_Z15 "arch=z15"
|
|
148
|
+
|
|
137
149
|
// Before include guard so we redefine HWY_TARGET_STR on each include,
|
|
138
150
|
// governed by the current HWY_TARGET.
|
|
139
151
|
|
|
@@ -233,7 +245,10 @@
|
|
|
233
245
|
|
|
234
246
|
#define HWY_HAVE_SCALABLE 0
|
|
235
247
|
#define HWY_HAVE_INTEGER64 1
|
|
236
|
-
#if
|
|
248
|
+
#if HWY_TARGET == HWY_AVX3_SPR && HWY_COMPILER_GCC_ACTUAL && \
|
|
249
|
+
HWY_HAVE_SCALAR_F16_TYPE
|
|
250
|
+
// TODO: enable F16 for AVX3_SPR target with Clang once compilation issues are
|
|
251
|
+
// fixed
|
|
237
252
|
#define HWY_HAVE_FLOAT16 1
|
|
238
253
|
#else
|
|
239
254
|
#define HWY_HAVE_FLOAT16 0
|
|
@@ -306,6 +321,37 @@
|
|
|
306
321
|
#error "Logic error"
|
|
307
322
|
#endif // HWY_TARGET == HWY_PPC10
|
|
308
323
|
|
|
324
|
+
//-----------------------------------------------------------------------------
|
|
325
|
+
// Z14, Z15
|
|
326
|
+
#elif HWY_TARGET == HWY_Z14 || HWY_TARGET == HWY_Z15
|
|
327
|
+
|
|
328
|
+
#define HWY_ALIGN alignas(16)
|
|
329
|
+
#define HWY_MAX_BYTES 16
|
|
330
|
+
#define HWY_LANES(T) (16 / sizeof(T))
|
|
331
|
+
|
|
332
|
+
#define HWY_HAVE_SCALABLE 0
|
|
333
|
+
#define HWY_HAVE_INTEGER64 1
|
|
334
|
+
#define HWY_HAVE_FLOAT16 0
|
|
335
|
+
#define HWY_HAVE_FLOAT64 1
|
|
336
|
+
#define HWY_MEM_OPS_MIGHT_FAULT 1
|
|
337
|
+
#define HWY_NATIVE_FMA 1
|
|
338
|
+
#define HWY_CAP_GE256 0
|
|
339
|
+
#define HWY_CAP_GE512 0
|
|
340
|
+
|
|
341
|
+
#if HWY_TARGET == HWY_Z14
|
|
342
|
+
|
|
343
|
+
#define HWY_NAMESPACE N_Z14
|
|
344
|
+
#define HWY_TARGET_STR HWY_TARGET_STR_Z14
|
|
345
|
+
|
|
346
|
+
#elif HWY_TARGET == HWY_Z15
|
|
347
|
+
|
|
348
|
+
#define HWY_NAMESPACE N_Z15
|
|
349
|
+
#define HWY_TARGET_STR HWY_TARGET_STR_Z15
|
|
350
|
+
|
|
351
|
+
#else
|
|
352
|
+
#error "Logic error"
|
|
353
|
+
#endif // HWY_TARGET == HWY_Z15
|
|
354
|
+
|
|
309
355
|
//-----------------------------------------------------------------------------
|
|
310
356
|
// NEON
|
|
311
357
|
#elif HWY_TARGET == HWY_NEON || HWY_TARGET == HWY_NEON_WITHOUT_AES
|
|
@@ -382,7 +428,7 @@
|
|
|
382
428
|
#define HWY_LANES(T) ((HWY_MAX_BYTES) / sizeof(T))
|
|
383
429
|
|
|
384
430
|
#define HWY_HAVE_INTEGER64 1
|
|
385
|
-
#define HWY_HAVE_FLOAT16
|
|
431
|
+
#define HWY_HAVE_FLOAT16 1
|
|
386
432
|
#define HWY_HAVE_FLOAT64 1
|
|
387
433
|
#define HWY_MEM_OPS_MIGHT_FAULT 0
|
|
388
434
|
#define HWY_NATIVE_FMA 1
|
|
@@ -410,11 +456,17 @@
|
|
|
410
456
|
// Can use pragmas instead of -march compiler flag
|
|
411
457
|
#if HWY_HAVE_RUNTIME_DISPATCH
|
|
412
458
|
#if HWY_TARGET == HWY_SVE2 || HWY_TARGET == HWY_SVE2_128
|
|
459
|
+
// Static dispatch with -march=armv8-a+sve2+aes, or no baseline, hence dynamic
|
|
460
|
+
// dispatch, which checks for AES support at runtime.
|
|
461
|
+
#if defined(__ARM_FEATURE_SVE2_AES) || (HWY_BASELINE_SVE2 == 0)
|
|
413
462
|
#define HWY_TARGET_STR "+sve2-aes"
|
|
414
|
-
#else
|
|
463
|
+
#else // SVE2 without AES
|
|
464
|
+
#define HWY_TARGET_STR "+sve2"
|
|
465
|
+
#endif
|
|
466
|
+
#else // not SVE2 target
|
|
415
467
|
#define HWY_TARGET_STR "+sve"
|
|
416
468
|
#endif
|
|
417
|
-
#else
|
|
469
|
+
#else // !HWY_HAVE_RUNTIME_DISPATCH
|
|
418
470
|
// HWY_TARGET_STR remains undefined
|
|
419
471
|
#endif
|
|
420
472
|
|
|
@@ -483,7 +535,7 @@
|
|
|
483
535
|
#define HWY_CAP_GE256 0
|
|
484
536
|
#define HWY_CAP_GE512 0
|
|
485
537
|
|
|
486
|
-
#if
|
|
538
|
+
#if HWY_RVV_HAVE_F16_VEC
|
|
487
539
|
#define HWY_HAVE_FLOAT16 1
|
|
488
540
|
#else
|
|
489
541
|
#define HWY_HAVE_FLOAT16 0
|
|
@@ -540,6 +592,14 @@
|
|
|
540
592
|
#pragma message("HWY_TARGET does not match any known target")
|
|
541
593
|
#endif // HWY_TARGET
|
|
542
594
|
|
|
595
|
+
//-----------------------------------------------------------------------------
|
|
596
|
+
|
|
597
|
+
// Sanity check: if we have f16 vector support, then base.h should also be
|
|
598
|
+
// using a built-in type for f16 scalars.
|
|
599
|
+
#if HWY_HAVE_FLOAT16 && !HWY_HAVE_SCALAR_F16_TYPE
|
|
600
|
+
#error "Logic error: f16 vectors but no scalars"
|
|
601
|
+
#endif
|
|
602
|
+
|
|
543
603
|
// Override this to 1 in asan/msan builds, which will still fault.
|
|
544
604
|
#if HWY_IS_ASAN || HWY_IS_MSAN
|
|
545
605
|
#undef HWY_MEM_OPS_MIGHT_FAULT
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
|
|
39
39
|
// We are covered by the highway.h include guard, but generic_ops-inl.h
|
|
40
40
|
// includes this again #if HWY_IDE.
|
|
41
|
-
|
|
41
|
+
// clang-format off
|
|
42
|
+
#if defined(HIGHWAY_HWY_OPS_SHARED_TOGGLE) == defined(HWY_TARGET_TOGGLE) // NOLINT
|
|
43
|
+
// clang-format on
|
|
42
44
|
#ifdef HIGHWAY_HWY_OPS_SHARED_TOGGLE
|
|
43
45
|
#undef HIGHWAY_HWY_OPS_SHARED_TOGGLE
|
|
44
46
|
#else
|
|
@@ -69,27 +71,75 @@ using VecArg = V;
|
|
|
69
71
|
|
|
70
72
|
namespace detail {
|
|
71
73
|
|
|
72
|
-
// Primary template: default is no change for all but f16.
|
|
73
74
|
template <typename T>
|
|
74
75
|
struct NativeLaneTypeT {
|
|
75
76
|
using type = T;
|
|
76
77
|
};
|
|
77
|
-
|
|
78
78
|
template <>
|
|
79
79
|
struct NativeLaneTypeT<hwy::float16_t> {
|
|
80
|
-
|
|
80
|
+
#if HWY_HAVE_SCALAR_F16_TYPE
|
|
81
|
+
using type = hwy::float16_t::Native;
|
|
82
|
+
#else
|
|
83
|
+
using type = uint16_t;
|
|
84
|
+
#endif
|
|
81
85
|
};
|
|
82
|
-
|
|
83
86
|
template <>
|
|
84
87
|
struct NativeLaneTypeT<hwy::bfloat16_t> {
|
|
85
|
-
|
|
88
|
+
#if HWY_HAVE_SCALAR_BF16_TYPE
|
|
89
|
+
using type = hwy::bfloat16_t::Native;
|
|
90
|
+
#else
|
|
91
|
+
using type = uint16_t;
|
|
92
|
+
#endif
|
|
86
93
|
};
|
|
87
94
|
|
|
88
|
-
//
|
|
89
|
-
//
|
|
95
|
+
// The type expected by intrinsics for the given Highway lane type T. This
|
|
96
|
+
// usually matches T, but differs for our wrapper types [b]float16_t. Use this
|
|
97
|
+
// only when defining intrinsic wrappers, and NOT for casting, which is UB.
|
|
90
98
|
template <typename T>
|
|
91
99
|
using NativeLaneType = typename NativeLaneTypeT<T>::type;
|
|
92
100
|
|
|
101
|
+
// Returns the same pointer after changing type to NativeLaneType. Use this only
|
|
102
|
+
// for wrapper functions that call intrinsics (e.g. load/store) where some of
|
|
103
|
+
// the overloads expect _Float16* or __bf16* arguments. For non-special floats,
|
|
104
|
+
// this returns the same pointer and type.
|
|
105
|
+
//
|
|
106
|
+
// This makes use of the fact that a wrapper struct is pointer-interconvertible
|
|
107
|
+
// with its first member (a union), thus also with the union members. Do NOT
|
|
108
|
+
// call both this and U16LanePointer on the same object - they access different
|
|
109
|
+
// union members, and this is not guaranteed to be safe.
|
|
110
|
+
template <typename T, HWY_IF_NOT_SPECIAL_FLOAT(T)>
|
|
111
|
+
HWY_INLINE T* NativeLanePointer(T* p) {
|
|
112
|
+
return p;
|
|
113
|
+
}
|
|
114
|
+
template <typename T, typename NT = NativeLaneType<RemoveConst<T>>,
|
|
115
|
+
HWY_IF_F16(T)>
|
|
116
|
+
HWY_INLINE constexpr If<IsConst<T>(), const NT*, NT*> NativeLanePointer(T* p) {
|
|
117
|
+
#if HWY_HAVE_SCALAR_F16_TYPE
|
|
118
|
+
return &p->native;
|
|
119
|
+
#else
|
|
120
|
+
return &p->bits;
|
|
121
|
+
#endif
|
|
122
|
+
}
|
|
123
|
+
template <typename T, typename NT = NativeLaneType<RemoveConst<T>>,
|
|
124
|
+
HWY_IF_BF16(T)>
|
|
125
|
+
HWY_INLINE constexpr If<IsConst<T>(), const NT*, NT*> NativeLanePointer(T* p) {
|
|
126
|
+
#if HWY_HAVE_SCALAR_BF16_TYPE
|
|
127
|
+
return &p->native;
|
|
128
|
+
#else
|
|
129
|
+
return &p->bits;
|
|
130
|
+
#endif
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// Returns a pointer to the u16 member of our [b]float16_t wrapper structs.
|
|
134
|
+
// Use this in Highway targets that lack __bf16 intrinsics; for storing to
|
|
135
|
+
// memory, we BitCast vectors to u16 and write to the pointer returned here.
|
|
136
|
+
// Do NOT call both this and U16LanePointer on the same object - they access
|
|
137
|
+
// different union members, and this is not guaranteed to be safe.
|
|
138
|
+
template <typename T, HWY_IF_SPECIAL_FLOAT(T)>
|
|
139
|
+
HWY_INLINE If<IsConst<T>(), const uint16_t*, uint16_t*> U16LanePointer(T* p) {
|
|
140
|
+
return &p->bits;
|
|
141
|
+
}
|
|
142
|
+
|
|
93
143
|
// Returns N * 2^pow2. N is the number of lanes in a full vector and pow2 the
|
|
94
144
|
// desired fraction or multiple of it, see Simd<>. `pow2` is most often in
|
|
95
145
|
// [-3, 3] but can also be lower for user-specified fractions.
|
|
@@ -151,6 +201,13 @@ struct Simd {
|
|
|
151
201
|
|
|
152
202
|
private:
|
|
153
203
|
static_assert(sizeof(Lane) <= 8, "Lanes are up to 64-bit");
|
|
204
|
+
static_assert(IsSame<Lane, RemoveCvRef<Lane>>(),
|
|
205
|
+
"Lane must not be a reference type, const-qualified type, or "
|
|
206
|
+
"volatile-qualified type");
|
|
207
|
+
static_assert(IsIntegerLaneType<Lane>() || IsFloat<Lane>() ||
|
|
208
|
+
IsSpecialFloat<Lane>(),
|
|
209
|
+
"IsIntegerLaneType<T>(), IsFloat<T>(), or IsSpecialFloat<T>() "
|
|
210
|
+
"must be true");
|
|
154
211
|
// 20 bits are sufficient for any HWY_MAX_BYTES. This is the 'normal' value of
|
|
155
212
|
// N when kFrac == 0, otherwise it is one (see FracN).
|
|
156
213
|
static constexpr size_t kWhole = N & 0xFFFFF;
|
|
@@ -185,11 +242,14 @@ struct Simd {
|
|
|
185
242
|
// macro required by MSVC.
|
|
186
243
|
static constexpr size_t kPrivateLanes =
|
|
187
244
|
HWY_MAX(size_t{1}, detail::ScaleByPower(kWhole, kPow2 - kFrac));
|
|
245
|
+
// Do not use this directly - only 'public' so it is visible from the accessor
|
|
246
|
+
// macro required by MSVC.
|
|
247
|
+
static constexpr int kPrivatePow2 = kPow2;
|
|
188
248
|
|
|
189
249
|
constexpr size_t MaxLanes() const { return kPrivateLanes; }
|
|
190
250
|
constexpr size_t MaxBytes() const { return kPrivateLanes * sizeof(Lane); }
|
|
191
251
|
constexpr size_t MaxBlocks() const { return (MaxBytes() + 15) / 16; }
|
|
192
|
-
// For SFINAE
|
|
252
|
+
// For SFINAE (HWY_IF_POW2_GT_D).
|
|
193
253
|
constexpr int Pow2() const { return kPow2; }
|
|
194
254
|
|
|
195
255
|
// ------------------------------ Changing lane type or count
|
|
@@ -371,6 +431,10 @@ using TFromD = typename D::T;
|
|
|
371
431
|
// MSVC workaround: use static constant directly instead of a function.
|
|
372
432
|
#define HWY_MAX_LANES_D(D) D::kPrivateLanes
|
|
373
433
|
|
|
434
|
+
// Same as D().Pow2(), but this is too complex for SFINAE with MSVC, so we use a
|
|
435
|
+
// static constant directly.
|
|
436
|
+
#define HWY_POW2_D(D) D::kPrivatePow2
|
|
437
|
+
|
|
374
438
|
// Non-macro form of HWY_MAX_LANES_D in case that is preferable. WARNING: the
|
|
375
439
|
// macro form may be required for MSVC, which has limitations on deducing
|
|
376
440
|
// arguments.
|
|
@@ -411,6 +475,13 @@ using RepartitionToWide = Repartition<MakeWide<TFromD<D>>, D>;
|
|
|
411
475
|
template <class D>
|
|
412
476
|
using RepartitionToNarrow = Repartition<MakeNarrow<TFromD<D>>, D>;
|
|
413
477
|
|
|
478
|
+
// Shorthand for applying RepartitionToWide twice (for 8/16-bit types).
|
|
479
|
+
template <class D>
|
|
480
|
+
using RepartitionToWideX2 = RepartitionToWide<RepartitionToWide<D>>;
|
|
481
|
+
// Shorthand for applying RepartitionToWide three times (for 8-bit types).
|
|
482
|
+
template <class D>
|
|
483
|
+
using RepartitionToWideX3 = RepartitionToWide<RepartitionToWideX2<D>>;
|
|
484
|
+
|
|
414
485
|
// Tag for the same lane type as D, but half the lanes.
|
|
415
486
|
template <class D>
|
|
416
487
|
using Half = typename D::Half;
|
|
@@ -447,85 +518,133 @@ using BlockDFromD =
|
|
|
447
518
|
Simd<TFromD<D>, HWY_MIN(16 / sizeof(TFromD<D>), HWY_MAX_LANES_D(D)), 0>;
|
|
448
519
|
#endif
|
|
449
520
|
|
|
521
|
+
// Returns whether `ptr` is a multiple of `Lanes(d)` elements.
|
|
522
|
+
template <class D, typename T>
|
|
523
|
+
HWY_API bool IsAligned(D d, T* ptr) {
|
|
524
|
+
const size_t N = Lanes(d);
|
|
525
|
+
return reinterpret_cast<uintptr_t>(ptr) % (N * sizeof(T)) == 0;
|
|
526
|
+
}
|
|
527
|
+
|
|
450
528
|
// ------------------------------ Choosing overloads (SFINAE)
|
|
451
529
|
|
|
452
530
|
// Same as base.h macros but with a Simd<T, N, kPow2> argument instead of T.
|
|
453
|
-
#define HWY_IF_UNSIGNED_D(D) HWY_IF_UNSIGNED(TFromD<D>)
|
|
454
|
-
#define HWY_IF_SIGNED_D(D) HWY_IF_SIGNED(TFromD<D>)
|
|
455
|
-
#define HWY_IF_FLOAT_D(D) HWY_IF_FLOAT(TFromD<D>)
|
|
456
|
-
#define HWY_IF_NOT_FLOAT_D(D) HWY_IF_NOT_FLOAT(TFromD<D>)
|
|
457
|
-
#define HWY_IF_FLOAT3264_D(D) HWY_IF_FLOAT3264(TFromD<D>)
|
|
458
|
-
#define HWY_IF_NOT_FLOAT3264_D(D)
|
|
459
|
-
|
|
460
|
-
#define
|
|
461
|
-
|
|
531
|
+
#define HWY_IF_UNSIGNED_D(D) HWY_IF_UNSIGNED(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
532
|
+
#define HWY_IF_SIGNED_D(D) HWY_IF_SIGNED(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
533
|
+
#define HWY_IF_FLOAT_D(D) HWY_IF_FLOAT(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
534
|
+
#define HWY_IF_NOT_FLOAT_D(D) HWY_IF_NOT_FLOAT(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
535
|
+
#define HWY_IF_FLOAT3264_D(D) HWY_IF_FLOAT3264(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
536
|
+
#define HWY_IF_NOT_FLOAT3264_D(D) \
|
|
537
|
+
HWY_IF_NOT_FLOAT3264(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
538
|
+
#define HWY_IF_SPECIAL_FLOAT_D(D) \
|
|
539
|
+
HWY_IF_SPECIAL_FLOAT(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
540
|
+
#define HWY_IF_NOT_SPECIAL_FLOAT_D(D) \
|
|
541
|
+
HWY_IF_NOT_SPECIAL_FLOAT(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
542
|
+
#define HWY_IF_FLOAT_OR_SPECIAL_D(D) \
|
|
543
|
+
HWY_IF_FLOAT_OR_SPECIAL(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
462
544
|
#define HWY_IF_NOT_FLOAT_NOR_SPECIAL_D(D) \
|
|
463
|
-
HWY_IF_NOT_FLOAT_NOR_SPECIAL(TFromD<D>)
|
|
545
|
+
HWY_IF_NOT_FLOAT_NOR_SPECIAL(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
464
546
|
|
|
465
|
-
#define HWY_IF_T_SIZE_D(D, bytes)
|
|
466
|
-
|
|
547
|
+
#define HWY_IF_T_SIZE_D(D, bytes) \
|
|
548
|
+
HWY_IF_T_SIZE(hwy::HWY_NAMESPACE::TFromD<D>, bytes)
|
|
549
|
+
#define HWY_IF_NOT_T_SIZE_D(D, bytes) \
|
|
550
|
+
HWY_IF_NOT_T_SIZE(hwy::HWY_NAMESPACE::TFromD<D>, bytes)
|
|
467
551
|
#define HWY_IF_T_SIZE_ONE_OF_D(D, bit_array) \
|
|
468
|
-
HWY_IF_T_SIZE_ONE_OF(TFromD<D>, bit_array)
|
|
552
|
+
HWY_IF_T_SIZE_ONE_OF(hwy::HWY_NAMESPACE::TFromD<D>, bit_array)
|
|
553
|
+
#define HWY_IF_T_SIZE_LE_D(D, bytes) \
|
|
554
|
+
HWY_IF_T_SIZE_LE(hwy::HWY_NAMESPACE::TFromD<D>, bytes)
|
|
555
|
+
#define HWY_IF_T_SIZE_GT_D(D, bytes) \
|
|
556
|
+
HWY_IF_T_SIZE_GT(hwy::HWY_NAMESPACE::TFromD<D>, bytes)
|
|
469
557
|
|
|
470
558
|
#define HWY_IF_LANES_D(D, lanes) HWY_IF_LANES(HWY_MAX_LANES_D(D), lanes)
|
|
471
559
|
#define HWY_IF_LANES_LE_D(D, lanes) HWY_IF_LANES_LE(HWY_MAX_LANES_D(D), lanes)
|
|
472
560
|
#define HWY_IF_LANES_GT_D(D, lanes) HWY_IF_LANES_GT(HWY_MAX_LANES_D(D), lanes)
|
|
473
|
-
#define HWY_IF_LANES_PER_BLOCK_D(D, lanes)
|
|
474
|
-
HWY_IF_LANES_PER_BLOCK(
|
|
475
|
-
|
|
476
|
-
|
|
561
|
+
#define HWY_IF_LANES_PER_BLOCK_D(D, lanes) \
|
|
562
|
+
HWY_IF_LANES_PER_BLOCK(hwy::HWY_NAMESPACE::TFromD<D>, HWY_MAX_LANES_D(D), \
|
|
563
|
+
lanes)
|
|
564
|
+
|
|
565
|
+
#if HWY_COMPILER_MSVC
|
|
566
|
+
#define HWY_IF_POW2_LE_D(D, pow2) \
|
|
567
|
+
hwy::EnableIf<HWY_POW2_D(D) <= pow2>* = nullptr
|
|
568
|
+
#define HWY_IF_POW2_GT_D(D, pow2) \
|
|
569
|
+
hwy::EnableIf<(HWY_POW2_D(D) > pow2)>* = nullptr
|
|
570
|
+
#else
|
|
477
571
|
#define HWY_IF_POW2_LE_D(D, pow2) hwy::EnableIf<D().Pow2() <= pow2>* = nullptr
|
|
478
572
|
#define HWY_IF_POW2_GT_D(D, pow2) hwy::EnableIf<(D().Pow2() > pow2)>* = nullptr
|
|
573
|
+
#endif // HWY_COMPILER_MSVC
|
|
479
574
|
|
|
480
|
-
#define HWY_IF_U8_D(D) hwy::
|
|
481
|
-
#define HWY_IF_U16_D(D) hwy::
|
|
482
|
-
#define HWY_IF_U32_D(D) hwy::
|
|
483
|
-
#define HWY_IF_U64_D(D) hwy::
|
|
575
|
+
#define HWY_IF_U8_D(D) HWY_IF_U8(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
576
|
+
#define HWY_IF_U16_D(D) HWY_IF_U16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
577
|
+
#define HWY_IF_U32_D(D) HWY_IF_U32(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
578
|
+
#define HWY_IF_U64_D(D) HWY_IF_U64(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
484
579
|
|
|
485
|
-
#define HWY_IF_I8_D(D) hwy::
|
|
486
|
-
#define HWY_IF_I16_D(D) hwy::
|
|
487
|
-
#define HWY_IF_I32_D(D) hwy::
|
|
488
|
-
#define HWY_IF_I64_D(D) hwy::
|
|
580
|
+
#define HWY_IF_I8_D(D) HWY_IF_I8(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
581
|
+
#define HWY_IF_I16_D(D) HWY_IF_I16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
582
|
+
#define HWY_IF_I32_D(D) HWY_IF_I32(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
583
|
+
#define HWY_IF_I64_D(D) HWY_IF_I64(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
489
584
|
|
|
490
585
|
// Use instead of HWY_IF_T_SIZE_D to avoid ambiguity with float16_t/float/double
|
|
491
586
|
// overloads.
|
|
492
|
-
#define
|
|
493
|
-
#define
|
|
494
|
-
#define
|
|
587
|
+
#define HWY_IF_UI8_D(D) HWY_IF_UI8(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
588
|
+
#define HWY_IF_UI16_D(D) HWY_IF_UI16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
589
|
+
#define HWY_IF_UI32_D(D) HWY_IF_UI32(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
590
|
+
#define HWY_IF_UI64_D(D) HWY_IF_UI64(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
591
|
+
|
|
592
|
+
#define HWY_IF_BF16_D(D) HWY_IF_BF16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
593
|
+
#define HWY_IF_NOT_BF16_D(D) HWY_IF_NOT_BF16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
495
594
|
|
|
496
|
-
#define
|
|
497
|
-
#define
|
|
498
|
-
#define HWY_IF_F32_D(D) hwy::EnableIf<IsSame<TFromD<D>, float>()>* = nullptr
|
|
499
|
-
#define HWY_IF_F64_D(D) hwy::EnableIf<IsSame<TFromD<D>, double>()>* = nullptr
|
|
595
|
+
#define HWY_IF_F16_D(D) HWY_IF_F16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
596
|
+
#define HWY_IF_NOT_F16_D(D) HWY_IF_NOT_F16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
500
597
|
|
|
598
|
+
#define HWY_IF_F32_D(D) HWY_IF_F32(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
599
|
+
#define HWY_IF_F64_D(D) HWY_IF_F64(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
600
|
+
|
|
601
|
+
#define HWY_V_SIZE_D(D) \
|
|
602
|
+
(HWY_MAX_LANES_D(D) * sizeof(hwy::HWY_NAMESPACE::TFromD<D>))
|
|
501
603
|
#define HWY_IF_V_SIZE_D(D, bytes) \
|
|
502
|
-
HWY_IF_V_SIZE(TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
604
|
+
HWY_IF_V_SIZE(hwy::HWY_NAMESPACE::TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
503
605
|
#define HWY_IF_V_SIZE_LE_D(D, bytes) \
|
|
504
|
-
HWY_IF_V_SIZE_LE(TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
606
|
+
HWY_IF_V_SIZE_LE(hwy::HWY_NAMESPACE::TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
505
607
|
#define HWY_IF_V_SIZE_GT_D(D, bytes) \
|
|
506
|
-
HWY_IF_V_SIZE_GT(TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
608
|
+
HWY_IF_V_SIZE_GT(hwy::HWY_NAMESPACE::TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
507
609
|
|
|
508
610
|
// Same, but with a vector argument. ops/*-inl.h define their own TFromV.
|
|
509
|
-
#define HWY_IF_UNSIGNED_V(V) HWY_IF_UNSIGNED(TFromV<V>)
|
|
510
|
-
#define HWY_IF_SIGNED_V(V) HWY_IF_SIGNED(TFromV<V>)
|
|
511
|
-
#define HWY_IF_FLOAT_V(V) HWY_IF_FLOAT(TFromV<V>)
|
|
512
|
-
#define HWY_IF_NOT_FLOAT_V(V) HWY_IF_NOT_FLOAT(TFromV<V>)
|
|
513
|
-
#define HWY_IF_SPECIAL_FLOAT_V(V)
|
|
611
|
+
#define HWY_IF_UNSIGNED_V(V) HWY_IF_UNSIGNED(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
612
|
+
#define HWY_IF_SIGNED_V(V) HWY_IF_SIGNED(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
613
|
+
#define HWY_IF_FLOAT_V(V) HWY_IF_FLOAT(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
614
|
+
#define HWY_IF_NOT_FLOAT_V(V) HWY_IF_NOT_FLOAT(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
615
|
+
#define HWY_IF_SPECIAL_FLOAT_V(V) \
|
|
616
|
+
HWY_IF_SPECIAL_FLOAT(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
514
617
|
#define HWY_IF_NOT_FLOAT_NOR_SPECIAL_V(V) \
|
|
515
|
-
HWY_IF_NOT_FLOAT_NOR_SPECIAL(TFromV<V>)
|
|
618
|
+
HWY_IF_NOT_FLOAT_NOR_SPECIAL(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
516
619
|
|
|
517
|
-
#define HWY_IF_T_SIZE_V(V, bytes)
|
|
518
|
-
|
|
620
|
+
#define HWY_IF_T_SIZE_V(V, bytes) \
|
|
621
|
+
HWY_IF_T_SIZE(hwy::HWY_NAMESPACE::TFromV<V>, bytes)
|
|
622
|
+
#define HWY_IF_NOT_T_SIZE_V(V, bytes) \
|
|
623
|
+
HWY_IF_NOT_T_SIZE(hwy::HWY_NAMESPACE::TFromV<V>, bytes)
|
|
519
624
|
#define HWY_IF_T_SIZE_ONE_OF_V(V, bit_array) \
|
|
520
|
-
HWY_IF_T_SIZE_ONE_OF(TFromV<V>, bit_array)
|
|
625
|
+
HWY_IF_T_SIZE_ONE_OF(hwy::HWY_NAMESPACE::TFromV<V>, bit_array)
|
|
521
626
|
|
|
522
627
|
#define HWY_MAX_LANES_V(V) HWY_MAX_LANES_D(DFromV<V>)
|
|
523
628
|
#define HWY_IF_V_SIZE_V(V, bytes) \
|
|
524
|
-
HWY_IF_V_SIZE(TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
629
|
+
HWY_IF_V_SIZE(hwy::HWY_NAMESPACE::TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
525
630
|
#define HWY_IF_V_SIZE_LE_V(V, bytes) \
|
|
526
|
-
HWY_IF_V_SIZE_LE(TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
631
|
+
HWY_IF_V_SIZE_LE(hwy::HWY_NAMESPACE::TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
527
632
|
#define HWY_IF_V_SIZE_GT_V(V, bytes) \
|
|
528
|
-
HWY_IF_V_SIZE_GT(TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
633
|
+
HWY_IF_V_SIZE_GT(hwy::HWY_NAMESPACE::TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
634
|
+
|
|
635
|
+
// Use in implementations of ReduceSum etc. to avoid conflicts with the N=1 and
|
|
636
|
+
// N=4 8-bit specializations in generic_ops-inl.
|
|
637
|
+
#undef HWY_IF_REDUCE_D
|
|
638
|
+
#define HWY_IF_REDUCE_D(D) \
|
|
639
|
+
hwy::EnableIf<HWY_MAX_LANES_D(D) != 1 && \
|
|
640
|
+
(HWY_MAX_LANES_D(D) != 4 || \
|
|
641
|
+
sizeof(hwy::HWY_NAMESPACE::TFromD<D>) != 1)>* = nullptr
|
|
642
|
+
|
|
643
|
+
#undef HWY_IF_SUM_OF_LANES_D
|
|
644
|
+
#define HWY_IF_SUM_OF_LANES_D(D) HWY_IF_LANES_GT_D(D, 1)
|
|
645
|
+
|
|
646
|
+
#undef HWY_IF_MINMAX_OF_LANES_D
|
|
647
|
+
#define HWY_IF_MINMAX_OF_LANES_D(D) HWY_IF_LANES_GT_D(D, 1)
|
|
529
648
|
|
|
530
649
|
// Old names (deprecated)
|
|
531
650
|
#define HWY_IF_LANE_SIZE_D(D, bytes) HWY_IF_T_SIZE_D(D, bytes)
|