@img/sharp-libvips-dev 1.0.1 → 1.0.3
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 +1 -2
- package/include/aom/aom_decoder.h +1 -1
- package/include/aom/aom_encoder.h +7 -1
- package/include/aom/aom_image.h +24 -12
- package/include/aom/aom_integer.h +3 -3
- package/include/aom/aomcx.h +15 -0
- package/include/aom/aomdx.h +5 -2
- package/include/archive.h +7 -5
- package/include/archive_entry.h +5 -3
- package/include/cgif.h +3 -0
- package/include/expat.h +21 -10
- package/include/expat_config.h +11 -5
- package/include/ffi.h +12 -25
- package/include/freetype2/freetype/config/ftoption.h +2 -2
- package/include/fribidi/fribidi-config.h +2 -2
- package/include/fribidi/fribidi-unicode-version.h +3 -3
- package/include/gio-unix-2.0/gio/gfiledescriptorbased.h +3 -2
- package/include/glib-2.0/gio/gappinfo.h +40 -25
- package/include/glib-2.0/gio/gapplication.h +6 -0
- package/include/glib-2.0/gio/gasyncresult.h +1 -1
- package/include/glib-2.0/gio/gconverter.h +5 -0
- package/include/glib-2.0/gio/gdbusintrospection.h +1 -1
- package/include/glib-2.0/gio/gfile.h +16 -0
- package/include/glib-2.0/gio/gio-visibility.h +34 -0
- package/include/glib-2.0/gio/giotypes.h +0 -1
- package/include/glib-2.0/gio/gsettings.h +8 -0
- package/include/glib-2.0/gio/gvfs.h +2 -2
- package/include/glib-2.0/girepository/gi-visibility.h +34 -0
- package/include/glib-2.0/girepository/giarginfo.h +23 -6
- package/include/glib-2.0/girepository/gibaseinfo.h +44 -18
- package/include/glib-2.0/girepository/gicallableinfo.h +26 -16
- package/include/glib-2.0/girepository/gicallbackinfo.h +17 -2
- package/include/glib-2.0/girepository/giconstantinfo.h +19 -4
- package/include/glib-2.0/girepository/gienuminfo.h +20 -21
- package/include/glib-2.0/girepository/gifieldinfo.h +22 -7
- package/include/glib-2.0/girepository/giflagsinfo.h +60 -0
- package/include/glib-2.0/girepository/gifunctioninfo.h +22 -7
- package/include/glib-2.0/girepository/giinterfaceinfo.h +33 -18
- package/include/glib-2.0/girepository/giobjectinfo.h +41 -26
- package/include/glib-2.0/girepository/gipropertyinfo.h +18 -3
- package/include/glib-2.0/girepository/giregisteredtypeinfo.h +22 -11
- package/include/glib-2.0/girepository/girepository-autocleanups.h +56 -0
- package/include/glib-2.0/girepository/girepository.h +53 -62
- package/include/glib-2.0/girepository/girffi.h +8 -7
- package/include/glib-2.0/girepository/gisignalinfo.h +18 -3
- package/include/glib-2.0/girepository/gistructinfo.h +26 -11
- package/include/glib-2.0/girepository/gitypeinfo.h +29 -16
- package/include/glib-2.0/girepository/gitypelib.h +9 -13
- package/include/glib-2.0/girepository/gitypes.h +52 -104
- package/include/glib-2.0/girepository/giunioninfo.h +28 -12
- package/include/glib-2.0/girepository/giunresolvedinfo.h +17 -2
- package/include/glib-2.0/girepository/givalueinfo.h +65 -0
- package/include/glib-2.0/girepository/givfuncinfo.h +23 -8
- package/include/glib-2.0/glib/deprecated/gthread.h +9 -5
- package/include/glib-2.0/glib/gbitlock.h +31 -0
- package/include/glib-2.0/glib/gbookmarkfile.h +1 -1
- package/include/glib-2.0/glib/giochannel.h +2 -2
- package/include/glib-2.0/glib/glib-visibility.h +34 -0
- package/include/glib-2.0/glib/gmacros.h +12 -5
- package/include/glib-2.0/glib/gmain.h +93 -7
- package/include/glib-2.0/glib/gmessages.h +8 -0
- package/include/glib-2.0/glib/gqsort.h +8 -1
- package/include/glib-2.0/glib/gslice.h +2 -0
- package/include/glib-2.0/glib/gstrfuncs.h +24 -30
- package/include/glib-2.0/glib/gstrvbuilder.h +3 -0
- package/include/glib-2.0/glib/gthread.h +191 -3
- package/include/glib-2.0/glib/gunicode.h +1 -1
- package/include/glib-2.0/glib/gversionmacros.h +9 -0
- package/include/glib-2.0/glib-unix.h +7 -1
- package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
- package/include/glib-2.0/gobject/genums.h +6 -6
- package/include/glib-2.0/gobject/glib-types.h +11 -0
- package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
- package/include/glib-2.0/gobject/gsignal.h +16 -6
- package/include/glib-2.0/gobject/gtype.h +6 -6
- package/include/harfbuzz/hb-buffer.h +6 -0
- package/include/harfbuzz/hb-common.h +6 -9
- package/include/harfbuzz/hb-cplusplus.hh +8 -11
- package/include/harfbuzz/hb-subset.h +17 -4
- package/include/harfbuzz/hb-version.h +3 -3
- package/include/hwy/abort.h +28 -0
- package/include/hwy/aligned_allocator.h +218 -6
- package/include/hwy/base.h +1935 -512
- package/include/hwy/cache_control.h +24 -6
- package/include/hwy/detect_compiler_arch.h +105 -10
- package/include/hwy/detect_targets.h +146 -37
- package/include/hwy/foreach_target.h +36 -1
- package/include/hwy/highway.h +222 -50
- package/include/hwy/ops/arm_neon-inl.h +2055 -894
- package/include/hwy/ops/arm_sve-inl.h +1476 -348
- package/include/hwy/ops/emu128-inl.h +711 -623
- package/include/hwy/ops/generic_ops-inl.h +4431 -2157
- package/include/hwy/ops/inside-inl.h +691 -0
- package/include/hwy/ops/ppc_vsx-inl.h +2186 -673
- package/include/hwy/ops/rvv-inl.h +1556 -536
- package/include/hwy/ops/scalar-inl.h +353 -233
- package/include/hwy/ops/set_macros-inl.h +171 -23
- package/include/hwy/ops/shared-inl.h +198 -56
- package/include/hwy/ops/wasm_128-inl.h +283 -244
- package/include/hwy/ops/x86_128-inl.h +3673 -1357
- package/include/hwy/ops/x86_256-inl.h +1737 -663
- package/include/hwy/ops/x86_512-inl.h +1697 -500
- 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 +40 -32
- package/include/hwy/timer-inl.h +3 -3
- package/include/hwy/timer.h +16 -1
- package/include/libheif/heif.h +170 -15
- package/include/libheif/heif_items.h +237 -0
- package/include/libheif/heif_properties.h +38 -2
- package/include/libheif/heif_regions.h +1 -1
- 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 +8 -3
- package/include/librsvg-2.0/librsvg/rsvg-cairo.h +1 -1
- package/include/librsvg-2.0/librsvg/rsvg-features.h +3 -4
- package/include/librsvg-2.0/librsvg/rsvg-pixbuf.h +235 -0
- package/include/librsvg-2.0/librsvg/rsvg-version.h +3 -3
- package/include/librsvg-2.0/librsvg/rsvg.h +55 -176
- package/include/libxml2/libxml/HTMLparser.h +12 -19
- package/include/libxml2/libxml/c14n.h +1 -12
- package/include/libxml2/libxml/debugXML.h +1 -1
- package/include/libxml2/libxml/encoding.h +9 -0
- package/include/libxml2/libxml/entities.h +12 -1
- package/include/libxml2/libxml/hash.h +19 -0
- package/include/libxml2/libxml/list.h +2 -2
- package/include/libxml2/libxml/nanohttp.h +17 -0
- package/include/libxml2/libxml/parser.h +73 -58
- package/include/libxml2/libxml/parserInternals.h +9 -1
- package/include/libxml2/libxml/pattern.h +6 -0
- package/include/libxml2/libxml/tree.h +32 -12
- package/include/libxml2/libxml/uri.h +11 -0
- package/include/libxml2/libxml/valid.h +29 -2
- package/include/libxml2/libxml/xinclude.h +7 -0
- package/include/libxml2/libxml/xmlIO.h +21 -5
- package/include/libxml2/libxml/xmlerror.h +14 -0
- package/include/libxml2/libxml/xmlexports.h +111 -15
- package/include/libxml2/libxml/xmlmemory.h +8 -45
- package/include/libxml2/libxml/xmlreader.h +2 -0
- package/include/libxml2/libxml/xmlsave.h +5 -0
- package/include/libxml2/libxml/xmlunicode.h +165 -1
- package/include/libxml2/libxml/xmlversion.h +15 -179
- package/include/libxml2/libxml/xmlwriter.h +1 -0
- package/include/libxml2/libxml/xpath.h +4 -0
- package/include/pango-1.0/pango/pango-features.h +2 -2
- package/include/pango-1.0/pango/pango-fontmap.h +7 -0
- package/include/pango-1.0/pango/pango-item.h +4 -2
- package/include/pango-1.0/pango/pango-version-macros.h +25 -0
- package/include/pango-1.0/pango/pangofc-font.h +2 -1
- package/include/pixman-1/pixman-version.h +2 -2
- package/include/png.h +32 -29
- package/include/pngconf.h +2 -2
- package/include/pnglibconf.h +8 -3
- package/include/vips/connection.h +9 -3
- package/include/vips/util.h +1 -11
- package/include/vips/version.h +4 -4
- package/include/webp/decode.h +58 -56
- package/include/webp/demux.h +25 -21
- package/include/webp/encode.h +44 -39
- package/include/webp/mux.h +76 -15
- package/include/webp/mux_types.h +2 -1
- package/include/webp/sharpyuv/sharpyuv.h +77 -8
- package/include/webp/types.h +29 -8
- package/include/zconf.h +1 -1
- package/include/zlib.h +12 -12
- package/package.json +1 -1
- package/versions.json +18 -19
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
#endif
|
|
27
27
|
|
|
28
28
|
#include "hwy/detect_compiler_arch.h"
|
|
29
|
+
#include "hwy/detect_targets.h"
|
|
29
30
|
|
|
30
31
|
// Separate header because foreach_target.h re-enables its include guard.
|
|
31
32
|
#include "hwy/ops/set_macros-inl.h"
|
|
@@ -38,7 +39,9 @@
|
|
|
38
39
|
|
|
39
40
|
// We are covered by the highway.h include guard, but generic_ops-inl.h
|
|
40
41
|
// includes this again #if HWY_IDE.
|
|
41
|
-
|
|
42
|
+
// clang-format off
|
|
43
|
+
#if defined(HIGHWAY_HWY_OPS_SHARED_TOGGLE) == defined(HWY_TARGET_TOGGLE) // NOLINT
|
|
44
|
+
// clang-format on
|
|
42
45
|
#ifdef HIGHWAY_HWY_OPS_SHARED_TOGGLE
|
|
43
46
|
#undef HIGHWAY_HWY_OPS_SHARED_TOGGLE
|
|
44
47
|
#else
|
|
@@ -59,6 +62,10 @@ namespace HWY_NAMESPACE {
|
|
|
59
62
|
// We therefore pass by const& only on GCC and (Windows or aarch64). This alias
|
|
60
63
|
// must be used for all vector/mask parameters of functions marked HWY_NOINLINE,
|
|
61
64
|
// and possibly also other functions that are not inlined.
|
|
65
|
+
//
|
|
66
|
+
// Even better is to avoid passing vector arguments to non-inlined functions,
|
|
67
|
+
// because the SVE and RISC-V ABIs are still works in progress and may lead to
|
|
68
|
+
// incorrect codegen.
|
|
62
69
|
#if HWY_COMPILER_GCC_ACTUAL && (HWY_OS_WIN || HWY_ARCH_ARM_A64)
|
|
63
70
|
template <class V>
|
|
64
71
|
using VecArg = const V&;
|
|
@@ -69,27 +76,75 @@ using VecArg = V;
|
|
|
69
76
|
|
|
70
77
|
namespace detail {
|
|
71
78
|
|
|
72
|
-
// Primary template: default is no change for all but f16.
|
|
73
79
|
template <typename T>
|
|
74
80
|
struct NativeLaneTypeT {
|
|
75
81
|
using type = T;
|
|
76
82
|
};
|
|
77
|
-
|
|
78
83
|
template <>
|
|
79
84
|
struct NativeLaneTypeT<hwy::float16_t> {
|
|
80
|
-
|
|
85
|
+
#if HWY_HAVE_SCALAR_F16_TYPE
|
|
86
|
+
using type = hwy::float16_t::Native;
|
|
87
|
+
#else
|
|
88
|
+
using type = uint16_t;
|
|
89
|
+
#endif
|
|
81
90
|
};
|
|
82
|
-
|
|
83
91
|
template <>
|
|
84
92
|
struct NativeLaneTypeT<hwy::bfloat16_t> {
|
|
85
|
-
|
|
93
|
+
#if HWY_HAVE_SCALAR_BF16_TYPE
|
|
94
|
+
using type = hwy::bfloat16_t::Native;
|
|
95
|
+
#else
|
|
96
|
+
using type = uint16_t;
|
|
97
|
+
#endif
|
|
86
98
|
};
|
|
87
99
|
|
|
88
|
-
//
|
|
89
|
-
//
|
|
100
|
+
// The type expected by intrinsics for the given Highway lane type T. This
|
|
101
|
+
// usually matches T, but differs for our wrapper types [b]float16_t. Use this
|
|
102
|
+
// only when defining intrinsic wrappers, and NOT for casting, which is UB.
|
|
90
103
|
template <typename T>
|
|
91
104
|
using NativeLaneType = typename NativeLaneTypeT<T>::type;
|
|
92
105
|
|
|
106
|
+
// Returns the same pointer after changing type to NativeLaneType. Use this only
|
|
107
|
+
// for wrapper functions that call intrinsics (e.g. load/store) where some of
|
|
108
|
+
// the overloads expect _Float16* or __bf16* arguments. For non-special floats,
|
|
109
|
+
// this returns the same pointer and type.
|
|
110
|
+
//
|
|
111
|
+
// This makes use of the fact that a wrapper struct is pointer-interconvertible
|
|
112
|
+
// with its first member (a union), thus also with the union members. Do NOT
|
|
113
|
+
// call both this and U16LanePointer on the same object - they access different
|
|
114
|
+
// union members, and this is not guaranteed to be safe.
|
|
115
|
+
template <typename T, HWY_IF_NOT_SPECIAL_FLOAT(T)>
|
|
116
|
+
HWY_INLINE T* NativeLanePointer(T* p) {
|
|
117
|
+
return p;
|
|
118
|
+
}
|
|
119
|
+
template <typename T, typename NT = NativeLaneType<RemoveConst<T>>,
|
|
120
|
+
HWY_IF_F16(T)>
|
|
121
|
+
HWY_INLINE constexpr If<IsConst<T>(), const NT*, NT*> NativeLanePointer(T* p) {
|
|
122
|
+
#if HWY_HAVE_SCALAR_F16_TYPE
|
|
123
|
+
return &p->native;
|
|
124
|
+
#else
|
|
125
|
+
return &p->bits;
|
|
126
|
+
#endif
|
|
127
|
+
}
|
|
128
|
+
template <typename T, typename NT = NativeLaneType<RemoveConst<T>>,
|
|
129
|
+
HWY_IF_BF16(T)>
|
|
130
|
+
HWY_INLINE constexpr If<IsConst<T>(), const NT*, NT*> NativeLanePointer(T* p) {
|
|
131
|
+
#if HWY_HAVE_SCALAR_BF16_TYPE
|
|
132
|
+
return &p->native;
|
|
133
|
+
#else
|
|
134
|
+
return &p->bits;
|
|
135
|
+
#endif
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Returns a pointer to the u16 member of our [b]float16_t wrapper structs.
|
|
139
|
+
// Use this in Highway targets that lack __bf16 intrinsics; for storing to
|
|
140
|
+
// memory, we BitCast vectors to u16 and write to the pointer returned here.
|
|
141
|
+
// Do NOT call both this and U16LanePointer on the same object - they access
|
|
142
|
+
// different union members, and this is not guaranteed to be safe.
|
|
143
|
+
template <typename T, HWY_IF_SPECIAL_FLOAT(T)>
|
|
144
|
+
HWY_INLINE If<IsConst<T>(), const uint16_t*, uint16_t*> U16LanePointer(T* p) {
|
|
145
|
+
return &p->bits;
|
|
146
|
+
}
|
|
147
|
+
|
|
93
148
|
// Returns N * 2^pow2. N is the number of lanes in a full vector and pow2 the
|
|
94
149
|
// desired fraction or multiple of it, see Simd<>. `pow2` is most often in
|
|
95
150
|
// [-3, 3] but can also be lower for user-specified fractions.
|
|
@@ -151,6 +206,13 @@ struct Simd {
|
|
|
151
206
|
|
|
152
207
|
private:
|
|
153
208
|
static_assert(sizeof(Lane) <= 8, "Lanes are up to 64-bit");
|
|
209
|
+
static_assert(IsSame<Lane, RemoveCvRef<Lane>>(),
|
|
210
|
+
"Lane must not be a reference type, const-qualified type, or "
|
|
211
|
+
"volatile-qualified type");
|
|
212
|
+
static_assert(IsIntegerLaneType<Lane>() || IsFloat<Lane>() ||
|
|
213
|
+
IsSpecialFloat<Lane>(),
|
|
214
|
+
"IsIntegerLaneType<T>(), IsFloat<T>(), or IsSpecialFloat<T>() "
|
|
215
|
+
"must be true");
|
|
154
216
|
// 20 bits are sufficient for any HWY_MAX_BYTES. This is the 'normal' value of
|
|
155
217
|
// N when kFrac == 0, otherwise it is one (see FracN).
|
|
156
218
|
static constexpr size_t kWhole = N & 0xFFFFF;
|
|
@@ -185,11 +247,14 @@ struct Simd {
|
|
|
185
247
|
// macro required by MSVC.
|
|
186
248
|
static constexpr size_t kPrivateLanes =
|
|
187
249
|
HWY_MAX(size_t{1}, detail::ScaleByPower(kWhole, kPow2 - kFrac));
|
|
250
|
+
// Do not use this directly - only 'public' so it is visible from the accessor
|
|
251
|
+
// macro required by MSVC.
|
|
252
|
+
static constexpr int kPrivatePow2 = kPow2;
|
|
188
253
|
|
|
189
254
|
constexpr size_t MaxLanes() const { return kPrivateLanes; }
|
|
190
255
|
constexpr size_t MaxBytes() const { return kPrivateLanes * sizeof(Lane); }
|
|
191
256
|
constexpr size_t MaxBlocks() const { return (MaxBytes() + 15) / 16; }
|
|
192
|
-
// For SFINAE
|
|
257
|
+
// For SFINAE (HWY_IF_POW2_GT_D).
|
|
193
258
|
constexpr int Pow2() const { return kPow2; }
|
|
194
259
|
|
|
195
260
|
// ------------------------------ Changing lane type or count
|
|
@@ -371,6 +436,10 @@ using TFromD = typename D::T;
|
|
|
371
436
|
// MSVC workaround: use static constant directly instead of a function.
|
|
372
437
|
#define HWY_MAX_LANES_D(D) D::kPrivateLanes
|
|
373
438
|
|
|
439
|
+
// Same as D().Pow2(), but this is too complex for SFINAE with MSVC, so we use a
|
|
440
|
+
// static constant directly.
|
|
441
|
+
#define HWY_POW2_D(D) D::kPrivatePow2
|
|
442
|
+
|
|
374
443
|
// Non-macro form of HWY_MAX_LANES_D in case that is preferable. WARNING: the
|
|
375
444
|
// macro form may be required for MSVC, which has limitations on deducing
|
|
376
445
|
// arguments.
|
|
@@ -411,6 +480,13 @@ using RepartitionToWide = Repartition<MakeWide<TFromD<D>>, D>;
|
|
|
411
480
|
template <class D>
|
|
412
481
|
using RepartitionToNarrow = Repartition<MakeNarrow<TFromD<D>>, D>;
|
|
413
482
|
|
|
483
|
+
// Shorthand for applying RepartitionToWide twice (for 8/16-bit types).
|
|
484
|
+
template <class D>
|
|
485
|
+
using RepartitionToWideX2 = RepartitionToWide<RepartitionToWide<D>>;
|
|
486
|
+
// Shorthand for applying RepartitionToWide three times (for 8-bit types).
|
|
487
|
+
template <class D>
|
|
488
|
+
using RepartitionToWideX3 = RepartitionToWide<RepartitionToWideX2<D>>;
|
|
489
|
+
|
|
414
490
|
// Tag for the same lane type as D, but half the lanes.
|
|
415
491
|
template <class D>
|
|
416
492
|
using Half = typename D::Half;
|
|
@@ -447,85 +523,151 @@ using BlockDFromD =
|
|
|
447
523
|
Simd<TFromD<D>, HWY_MIN(16 / sizeof(TFromD<D>), HWY_MAX_LANES_D(D)), 0>;
|
|
448
524
|
#endif
|
|
449
525
|
|
|
526
|
+
// Returns whether `ptr` is a multiple of `Lanes(d)` elements.
|
|
527
|
+
template <class D, typename T>
|
|
528
|
+
HWY_API bool IsAligned(D d, T* ptr) {
|
|
529
|
+
const size_t N = Lanes(d);
|
|
530
|
+
return reinterpret_cast<uintptr_t>(ptr) % (N * sizeof(T)) == 0;
|
|
531
|
+
}
|
|
532
|
+
|
|
450
533
|
// ------------------------------ Choosing overloads (SFINAE)
|
|
451
534
|
|
|
452
535
|
// 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
|
|
455
|
-
|
|
456
|
-
#define
|
|
457
|
-
#define
|
|
458
|
-
#define
|
|
459
|
-
#define
|
|
460
|
-
#define
|
|
461
|
-
|
|
536
|
+
#define HWY_IF_UNSIGNED_D(D) HWY_IF_UNSIGNED(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
537
|
+
#define HWY_IF_NOT_UNSIGNED_D(D) \
|
|
538
|
+
HWY_IF_NOT_UNSIGNED(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
539
|
+
#define HWY_IF_SIGNED_D(D) HWY_IF_SIGNED(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
540
|
+
#define HWY_IF_FLOAT_D(D) HWY_IF_FLOAT(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
541
|
+
#define HWY_IF_NOT_FLOAT_D(D) HWY_IF_NOT_FLOAT(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
542
|
+
#define HWY_IF_FLOAT3264_D(D) HWY_IF_FLOAT3264(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
543
|
+
#define HWY_IF_NOT_FLOAT3264_D(D) \
|
|
544
|
+
HWY_IF_NOT_FLOAT3264(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
545
|
+
#define HWY_IF_SPECIAL_FLOAT_D(D) \
|
|
546
|
+
HWY_IF_SPECIAL_FLOAT(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
547
|
+
#define HWY_IF_NOT_SPECIAL_FLOAT_D(D) \
|
|
548
|
+
HWY_IF_NOT_SPECIAL_FLOAT(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
549
|
+
#define HWY_IF_FLOAT_OR_SPECIAL_D(D) \
|
|
550
|
+
HWY_IF_FLOAT_OR_SPECIAL(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
462
551
|
#define HWY_IF_NOT_FLOAT_NOR_SPECIAL_D(D) \
|
|
463
|
-
HWY_IF_NOT_FLOAT_NOR_SPECIAL(TFromD<D>)
|
|
552
|
+
HWY_IF_NOT_FLOAT_NOR_SPECIAL(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
464
553
|
|
|
465
|
-
#define HWY_IF_T_SIZE_D(D, bytes)
|
|
466
|
-
|
|
554
|
+
#define HWY_IF_T_SIZE_D(D, bytes) \
|
|
555
|
+
HWY_IF_T_SIZE(hwy::HWY_NAMESPACE::TFromD<D>, bytes)
|
|
556
|
+
#define HWY_IF_NOT_T_SIZE_D(D, bytes) \
|
|
557
|
+
HWY_IF_NOT_T_SIZE(hwy::HWY_NAMESPACE::TFromD<D>, bytes)
|
|
467
558
|
#define HWY_IF_T_SIZE_ONE_OF_D(D, bit_array) \
|
|
468
|
-
HWY_IF_T_SIZE_ONE_OF(TFromD<D>, bit_array)
|
|
559
|
+
HWY_IF_T_SIZE_ONE_OF(hwy::HWY_NAMESPACE::TFromD<D>, bit_array)
|
|
560
|
+
#define HWY_IF_T_SIZE_LE_D(D, bytes) \
|
|
561
|
+
HWY_IF_T_SIZE_LE(hwy::HWY_NAMESPACE::TFromD<D>, bytes)
|
|
562
|
+
#define HWY_IF_T_SIZE_GT_D(D, bytes) \
|
|
563
|
+
HWY_IF_T_SIZE_GT(hwy::HWY_NAMESPACE::TFromD<D>, bytes)
|
|
469
564
|
|
|
470
565
|
#define HWY_IF_LANES_D(D, lanes) HWY_IF_LANES(HWY_MAX_LANES_D(D), lanes)
|
|
471
566
|
#define HWY_IF_LANES_LE_D(D, lanes) HWY_IF_LANES_LE(HWY_MAX_LANES_D(D), lanes)
|
|
472
567
|
#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
|
-
|
|
568
|
+
#define HWY_IF_LANES_PER_BLOCK_D(D, lanes) \
|
|
569
|
+
HWY_IF_LANES_PER_BLOCK(hwy::HWY_NAMESPACE::TFromD<D>, HWY_MAX_LANES_D(D), \
|
|
570
|
+
lanes)
|
|
571
|
+
|
|
572
|
+
#if HWY_COMPILER_MSVC
|
|
573
|
+
#define HWY_IF_POW2_LE_D(D, pow2) \
|
|
574
|
+
hwy::EnableIf<HWY_POW2_D(D) <= pow2>* = nullptr
|
|
575
|
+
#define HWY_IF_POW2_GT_D(D, pow2) \
|
|
576
|
+
hwy::EnableIf<(HWY_POW2_D(D) > pow2)>* = nullptr
|
|
577
|
+
#else
|
|
477
578
|
#define HWY_IF_POW2_LE_D(D, pow2) hwy::EnableIf<D().Pow2() <= pow2>* = nullptr
|
|
478
579
|
#define HWY_IF_POW2_GT_D(D, pow2) hwy::EnableIf<(D().Pow2() > pow2)>* = nullptr
|
|
580
|
+
#endif // HWY_COMPILER_MSVC
|
|
479
581
|
|
|
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::
|
|
582
|
+
#define HWY_IF_U8_D(D) HWY_IF_U8(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
583
|
+
#define HWY_IF_U16_D(D) HWY_IF_U16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
584
|
+
#define HWY_IF_U32_D(D) HWY_IF_U32(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
585
|
+
#define HWY_IF_U64_D(D) HWY_IF_U64(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
484
586
|
|
|
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::
|
|
587
|
+
#define HWY_IF_I8_D(D) HWY_IF_I8(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
588
|
+
#define HWY_IF_I16_D(D) HWY_IF_I16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
589
|
+
#define HWY_IF_I32_D(D) HWY_IF_I32(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
590
|
+
#define HWY_IF_I64_D(D) HWY_IF_I64(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
489
591
|
|
|
490
592
|
// Use instead of HWY_IF_T_SIZE_D to avoid ambiguity with float16_t/float/double
|
|
491
593
|
// overloads.
|
|
492
|
-
#define
|
|
493
|
-
#define
|
|
494
|
-
#define
|
|
594
|
+
#define HWY_IF_UI8_D(D) HWY_IF_UI8(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
595
|
+
#define HWY_IF_UI16_D(D) HWY_IF_UI16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
596
|
+
#define HWY_IF_UI32_D(D) HWY_IF_UI32(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
597
|
+
#define HWY_IF_UI64_D(D) HWY_IF_UI64(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
495
598
|
|
|
496
|
-
#define HWY_IF_BF16_D(D) HWY_IF_BF16(TFromD<D>)
|
|
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
|
|
599
|
+
#define HWY_IF_BF16_D(D) HWY_IF_BF16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
600
|
+
#define HWY_IF_NOT_BF16_D(D) HWY_IF_NOT_BF16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
500
601
|
|
|
602
|
+
#define HWY_IF_F16_D(D) HWY_IF_F16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
603
|
+
#define HWY_IF_NOT_F16_D(D) HWY_IF_NOT_F16(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
604
|
+
|
|
605
|
+
#define HWY_IF_F32_D(D) HWY_IF_F32(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
606
|
+
#define HWY_IF_F64_D(D) HWY_IF_F64(hwy::HWY_NAMESPACE::TFromD<D>)
|
|
607
|
+
|
|
608
|
+
#define HWY_V_SIZE_D(D) \
|
|
609
|
+
(HWY_MAX_LANES_D(D) * sizeof(hwy::HWY_NAMESPACE::TFromD<D>))
|
|
501
610
|
#define HWY_IF_V_SIZE_D(D, bytes) \
|
|
502
|
-
HWY_IF_V_SIZE(TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
611
|
+
HWY_IF_V_SIZE(hwy::HWY_NAMESPACE::TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
503
612
|
#define HWY_IF_V_SIZE_LE_D(D, bytes) \
|
|
504
|
-
HWY_IF_V_SIZE_LE(TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
613
|
+
HWY_IF_V_SIZE_LE(hwy::HWY_NAMESPACE::TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
505
614
|
#define HWY_IF_V_SIZE_GT_D(D, bytes) \
|
|
506
|
-
HWY_IF_V_SIZE_GT(TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
615
|
+
HWY_IF_V_SIZE_GT(hwy::HWY_NAMESPACE::TFromD<D>, HWY_MAX_LANES_D(D), bytes)
|
|
507
616
|
|
|
508
617
|
// 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
|
|
511
|
-
|
|
512
|
-
#define
|
|
513
|
-
#define
|
|
618
|
+
#define HWY_IF_UNSIGNED_V(V) HWY_IF_UNSIGNED(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
619
|
+
#define HWY_IF_NOT_UNSIGNED_V(V) \
|
|
620
|
+
HWY_IF_NOT_UNSIGNED(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
621
|
+
#define HWY_IF_SIGNED_V(V) HWY_IF_SIGNED(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
622
|
+
#define HWY_IF_FLOAT_V(V) HWY_IF_FLOAT(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
623
|
+
#define HWY_IF_NOT_FLOAT_V(V) HWY_IF_NOT_FLOAT(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
624
|
+
#define HWY_IF_SPECIAL_FLOAT_V(V) \
|
|
625
|
+
HWY_IF_SPECIAL_FLOAT(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
514
626
|
#define HWY_IF_NOT_FLOAT_NOR_SPECIAL_V(V) \
|
|
515
|
-
HWY_IF_NOT_FLOAT_NOR_SPECIAL(TFromV<V>)
|
|
627
|
+
HWY_IF_NOT_FLOAT_NOR_SPECIAL(hwy::HWY_NAMESPACE::TFromV<V>)
|
|
516
628
|
|
|
517
|
-
#define HWY_IF_T_SIZE_V(V, bytes)
|
|
518
|
-
|
|
629
|
+
#define HWY_IF_T_SIZE_V(V, bytes) \
|
|
630
|
+
HWY_IF_T_SIZE(hwy::HWY_NAMESPACE::TFromV<V>, bytes)
|
|
631
|
+
#define HWY_IF_NOT_T_SIZE_V(V, bytes) \
|
|
632
|
+
HWY_IF_NOT_T_SIZE(hwy::HWY_NAMESPACE::TFromV<V>, bytes)
|
|
519
633
|
#define HWY_IF_T_SIZE_ONE_OF_V(V, bit_array) \
|
|
520
|
-
HWY_IF_T_SIZE_ONE_OF(TFromV<V>, bit_array)
|
|
634
|
+
HWY_IF_T_SIZE_ONE_OF(hwy::HWY_NAMESPACE::TFromV<V>, bit_array)
|
|
521
635
|
|
|
522
636
|
#define HWY_MAX_LANES_V(V) HWY_MAX_LANES_D(DFromV<V>)
|
|
523
637
|
#define HWY_IF_V_SIZE_V(V, bytes) \
|
|
524
|
-
HWY_IF_V_SIZE(TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
638
|
+
HWY_IF_V_SIZE(hwy::HWY_NAMESPACE::TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
525
639
|
#define HWY_IF_V_SIZE_LE_V(V, bytes) \
|
|
526
|
-
HWY_IF_V_SIZE_LE(TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
640
|
+
HWY_IF_V_SIZE_LE(hwy::HWY_NAMESPACE::TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
527
641
|
#define HWY_IF_V_SIZE_GT_V(V, bytes) \
|
|
528
|
-
HWY_IF_V_SIZE_GT(TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
642
|
+
HWY_IF_V_SIZE_GT(hwy::HWY_NAMESPACE::TFromV<V>, HWY_MAX_LANES_V(V), bytes)
|
|
643
|
+
|
|
644
|
+
// Use in implementations of ReduceSum etc. to avoid conflicts with the N=1 and
|
|
645
|
+
// N=4 8-bit specializations in generic_ops-inl.
|
|
646
|
+
#undef HWY_IF_REDUCE_D
|
|
647
|
+
#define HWY_IF_REDUCE_D(D) \
|
|
648
|
+
hwy::EnableIf<HWY_MAX_LANES_D(D) != 1 && \
|
|
649
|
+
(HWY_MAX_LANES_D(D) != 4 || \
|
|
650
|
+
sizeof(hwy::HWY_NAMESPACE::TFromD<D>) != 1)>* = nullptr
|
|
651
|
+
|
|
652
|
+
#undef HWY_IF_SUM_OF_LANES_D
|
|
653
|
+
#define HWY_IF_SUM_OF_LANES_D(D) HWY_IF_LANES_GT_D(D, 1)
|
|
654
|
+
|
|
655
|
+
#undef HWY_IF_MINMAX_OF_LANES_D
|
|
656
|
+
#define HWY_IF_MINMAX_OF_LANES_D(D) HWY_IF_LANES_GT_D(D, 1)
|
|
657
|
+
|
|
658
|
+
#undef HWY_IF_ADDSUB_V
|
|
659
|
+
#define HWY_IF_ADDSUB_V(V) HWY_IF_LANES_GT_D(DFromV<V>, 1)
|
|
660
|
+
|
|
661
|
+
#undef HWY_IF_MULADDSUB_V
|
|
662
|
+
#define HWY_IF_MULADDSUB_V(V) HWY_IF_LANES_GT_D(DFromV<V>, 1)
|
|
663
|
+
|
|
664
|
+
// HWY_IF_U2I_DEMOTE_FROM_LANE_SIZE_V is used to disable the default
|
|
665
|
+
// implementation of unsigned to signed DemoteTo/ReorderDemote2To in
|
|
666
|
+
// generic_ops-inl.h for at least some of the unsigned to signed demotions on
|
|
667
|
+
// SCALAR/EMU128/SSE2/SSSE3/SSE4/AVX2/SVE/SVE2
|
|
668
|
+
|
|
669
|
+
#undef HWY_IF_U2I_DEMOTE_FROM_LANE_SIZE_V
|
|
670
|
+
#define HWY_IF_U2I_DEMOTE_FROM_LANE_SIZE_V(V) void* = nullptr
|
|
529
671
|
|
|
530
672
|
// Old names (deprecated)
|
|
531
673
|
#define HWY_IF_LANE_SIZE_D(D, bytes) HWY_IF_T_SIZE_D(D, bytes)
|