@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
|
@@ -92,6 +92,9 @@ class Vec128 {
|
|
|
92
92
|
HWY_INLINE Vec128& operator-=(const Vec128 other) {
|
|
93
93
|
return *this = (*this - other);
|
|
94
94
|
}
|
|
95
|
+
HWY_INLINE Vec128& operator%=(const Vec128 other) {
|
|
96
|
+
return *this = (*this % other);
|
|
97
|
+
}
|
|
95
98
|
HWY_INLINE Vec128& operator&=(const Vec128 other) {
|
|
96
99
|
return *this = (*this & other);
|
|
97
100
|
}
|
|
@@ -213,25 +216,29 @@ template <class D, HWY_IF_V_SIZE_LE_D(D, 16), HWY_IF_T_SIZE_D(D, 1)>
|
|
|
213
216
|
HWY_API VFromD<D> Set(D /* tag */, TFromD<D> t) {
|
|
214
217
|
return VFromD<D>{wasm_i8x16_splat(static_cast<int8_t>(t))};
|
|
215
218
|
}
|
|
216
|
-
template <class D, HWY_IF_V_SIZE_LE_D(D, 16),
|
|
219
|
+
template <class D, HWY_IF_V_SIZE_LE_D(D, 16), HWY_IF_UI16_D(D)>
|
|
217
220
|
HWY_API VFromD<D> Set(D /* tag */, TFromD<D> t) {
|
|
218
221
|
return VFromD<D>{wasm_i16x8_splat(static_cast<int16_t>(t))};
|
|
219
222
|
}
|
|
220
|
-
template <class D, HWY_IF_V_SIZE_LE_D(D, 16),
|
|
223
|
+
template <class D, HWY_IF_V_SIZE_LE_D(D, 16), HWY_IF_UI32_D(D)>
|
|
221
224
|
HWY_API VFromD<D> Set(D /* tag */, TFromD<D> t) {
|
|
222
225
|
return VFromD<D>{wasm_i32x4_splat(static_cast<int32_t>(t))};
|
|
223
226
|
}
|
|
224
|
-
template <class D, HWY_IF_V_SIZE_LE_D(D, 16),
|
|
227
|
+
template <class D, HWY_IF_V_SIZE_LE_D(D, 16), HWY_IF_UI64_D(D)>
|
|
225
228
|
HWY_API VFromD<D> Set(D /* tag */, TFromD<D> t) {
|
|
226
229
|
return VFromD<D>{wasm_i64x2_splat(static_cast<int64_t>(t))};
|
|
227
230
|
}
|
|
228
231
|
|
|
232
|
+
template <class D, HWY_IF_V_SIZE_LE_D(D, 16), HWY_IF_SPECIAL_FLOAT_D(D)>
|
|
233
|
+
HWY_API VFromD<D> Set(D /* tag */, TFromD<D> t) {
|
|
234
|
+
return VFromD<D>{wasm_i16x8_splat(BitCastScalar<int16_t>(t))};
|
|
235
|
+
}
|
|
229
236
|
template <class D, HWY_IF_V_SIZE_LE_D(D, 16), HWY_IF_F32_D(D)>
|
|
230
|
-
HWY_API VFromD<D> Set(D /* tag */,
|
|
237
|
+
HWY_API VFromD<D> Set(D /* tag */, TFromD<D> t) {
|
|
231
238
|
return VFromD<D>{wasm_f32x4_splat(t)};
|
|
232
239
|
}
|
|
233
240
|
template <class D, HWY_IF_V_SIZE_LE_D(D, 16), HWY_IF_F64_D(D)>
|
|
234
|
-
HWY_API VFromD<D> Set(D /* tag */,
|
|
241
|
+
HWY_API VFromD<D> Set(D /* tag */, TFromD<D> t) {
|
|
235
242
|
return VFromD<D>{wasm_f64x2_splat(t)};
|
|
236
243
|
}
|
|
237
244
|
|
|
@@ -251,12 +258,99 @@ template <class D, typename T = TFromD<D>, typename T2>
|
|
|
251
258
|
HWY_API VFromD<D> Iota(D d, const T2 first) {
|
|
252
259
|
HWY_ALIGN T lanes[MaxLanes(d)];
|
|
253
260
|
for (size_t i = 0; i < MaxLanes(d); ++i) {
|
|
254
|
-
lanes[i] =
|
|
255
|
-
AddWithWraparound(hwy::IsFloatTag<T>(), static_cast<T>(first), i);
|
|
261
|
+
lanes[i] = AddWithWraparound(static_cast<T>(first), i);
|
|
256
262
|
}
|
|
257
263
|
return Load(d, lanes);
|
|
258
264
|
}
|
|
259
265
|
|
|
266
|
+
// ------------------------------ Dup128VecFromValues
|
|
267
|
+
template <class D, HWY_IF_I8_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
268
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1,
|
|
269
|
+
TFromD<D> t2, TFromD<D> t3, TFromD<D> t4,
|
|
270
|
+
TFromD<D> t5, TFromD<D> t6, TFromD<D> t7,
|
|
271
|
+
TFromD<D> t8, TFromD<D> t9, TFromD<D> t10,
|
|
272
|
+
TFromD<D> t11, TFromD<D> t12,
|
|
273
|
+
TFromD<D> t13, TFromD<D> t14,
|
|
274
|
+
TFromD<D> t15) {
|
|
275
|
+
return VFromD<D>{wasm_i8x16_make(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10,
|
|
276
|
+
t11, t12, t13, t14, t15)};
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
template <class D, HWY_IF_U8_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
280
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1,
|
|
281
|
+
TFromD<D> t2, TFromD<D> t3, TFromD<D> t4,
|
|
282
|
+
TFromD<D> t5, TFromD<D> t6, TFromD<D> t7,
|
|
283
|
+
TFromD<D> t8, TFromD<D> t9, TFromD<D> t10,
|
|
284
|
+
TFromD<D> t11, TFromD<D> t12,
|
|
285
|
+
TFromD<D> t13, TFromD<D> t14,
|
|
286
|
+
TFromD<D> t15) {
|
|
287
|
+
return VFromD<D>{wasm_u8x16_make(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10,
|
|
288
|
+
t11, t12, t13, t14, t15)};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
template <class D, HWY_IF_I16_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
292
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1,
|
|
293
|
+
TFromD<D> t2, TFromD<D> t3, TFromD<D> t4,
|
|
294
|
+
TFromD<D> t5, TFromD<D> t6,
|
|
295
|
+
TFromD<D> t7) {
|
|
296
|
+
return VFromD<D>{wasm_i16x8_make(t0, t1, t2, t3, t4, t5, t6, t7)};
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
template <class D, HWY_IF_U16_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
300
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1,
|
|
301
|
+
TFromD<D> t2, TFromD<D> t3, TFromD<D> t4,
|
|
302
|
+
TFromD<D> t5, TFromD<D> t6,
|
|
303
|
+
TFromD<D> t7) {
|
|
304
|
+
return VFromD<D>{wasm_u16x8_make(t0, t1, t2, t3, t4, t5, t6, t7)};
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
template <class D, HWY_IF_SPECIAL_FLOAT_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
308
|
+
HWY_API VFromD<D> Dup128VecFromValues(D d, TFromD<D> t0, TFromD<D> t1,
|
|
309
|
+
TFromD<D> t2, TFromD<D> t3, TFromD<D> t4,
|
|
310
|
+
TFromD<D> t5, TFromD<D> t6,
|
|
311
|
+
TFromD<D> t7) {
|
|
312
|
+
const RebindToSigned<decltype(d)> di;
|
|
313
|
+
return BitCast(d,
|
|
314
|
+
Dup128VecFromValues(
|
|
315
|
+
di, BitCastScalar<int16_t>(t0), BitCastScalar<int16_t>(t1),
|
|
316
|
+
BitCastScalar<int16_t>(t2), BitCastScalar<int16_t>(t3),
|
|
317
|
+
BitCastScalar<int16_t>(t4), BitCastScalar<int16_t>(t5),
|
|
318
|
+
BitCastScalar<int16_t>(t6), BitCastScalar<int16_t>(t7)));
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
template <class D, HWY_IF_I32_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
322
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1,
|
|
323
|
+
TFromD<D> t2, TFromD<D> t3) {
|
|
324
|
+
return VFromD<D>{wasm_i32x4_make(t0, t1, t2, t3)};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
template <class D, HWY_IF_U32_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
328
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1,
|
|
329
|
+
TFromD<D> t2, TFromD<D> t3) {
|
|
330
|
+
return VFromD<D>{wasm_u32x4_make(t0, t1, t2, t3)};
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
template <class D, HWY_IF_F32_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
334
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1,
|
|
335
|
+
TFromD<D> t2, TFromD<D> t3) {
|
|
336
|
+
return VFromD<D>{wasm_f32x4_make(t0, t1, t2, t3)};
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
template <class D, HWY_IF_I64_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
340
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1) {
|
|
341
|
+
return VFromD<D>{wasm_i64x2_make(t0, t1)};
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
template <class D, HWY_IF_U64_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
345
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1) {
|
|
346
|
+
return VFromD<D>{wasm_u64x2_make(t0, t1)};
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
template <class D, HWY_IF_F64_D(D), HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
350
|
+
HWY_API VFromD<D> Dup128VecFromValues(D /*d*/, TFromD<D> t0, TFromD<D> t1) {
|
|
351
|
+
return VFromD<D>{wasm_f64x2_make(t0, t1)};
|
|
352
|
+
}
|
|
353
|
+
|
|
260
354
|
// ================================================== ARITHMETIC
|
|
261
355
|
|
|
262
356
|
// ------------------------------ Addition
|
|
@@ -977,25 +1071,25 @@ HWY_API Vec128<T, N> AbsDiff(const Vec128<T, N> a, const Vec128<T, N> b) {
|
|
|
977
1071
|
|
|
978
1072
|
// ------------------------------ Floating-point multiply-add variants
|
|
979
1073
|
|
|
980
|
-
template <typename T, size_t N>
|
|
1074
|
+
template <typename T, size_t N, HWY_IF_FLOAT(T)>
|
|
981
1075
|
HWY_API Vec128<T, N> MulAdd(Vec128<T, N> mul, Vec128<T, N> x,
|
|
982
1076
|
Vec128<T, N> add) {
|
|
983
1077
|
return mul * x + add;
|
|
984
1078
|
}
|
|
985
1079
|
|
|
986
|
-
template <typename T, size_t N>
|
|
1080
|
+
template <typename T, size_t N, HWY_IF_FLOAT(T)>
|
|
987
1081
|
HWY_API Vec128<T, N> NegMulAdd(Vec128<T, N> mul, Vec128<T, N> x,
|
|
988
1082
|
Vec128<T, N> add) {
|
|
989
1083
|
return add - mul * x;
|
|
990
1084
|
}
|
|
991
1085
|
|
|
992
|
-
template <typename T, size_t N>
|
|
1086
|
+
template <typename T, size_t N, HWY_IF_FLOAT(T)>
|
|
993
1087
|
HWY_API Vec128<T, N> MulSub(Vec128<T, N> mul, Vec128<T, N> x,
|
|
994
1088
|
Vec128<T, N> sub) {
|
|
995
1089
|
return mul * x - sub;
|
|
996
1090
|
}
|
|
997
1091
|
|
|
998
|
-
template <typename T, size_t N>
|
|
1092
|
+
template <typename T, size_t N, HWY_IF_FLOAT(T)>
|
|
999
1093
|
HWY_API Vec128<T, N> NegMulSub(Vec128<T, N> mul, Vec128<T, N> x,
|
|
1000
1094
|
Vec128<T, N> sub) {
|
|
1001
1095
|
return Neg(mul) * x - sub;
|
|
@@ -1071,10 +1165,10 @@ HWY_API Mask128<T, N> IsNaN(const Vec128<T, N> v) {
|
|
|
1071
1165
|
template <typename T, size_t N, HWY_IF_FLOAT(T)>
|
|
1072
1166
|
HWY_API Mask128<T, N> IsInf(const Vec128<T, N> v) {
|
|
1073
1167
|
const DFromV<decltype(v)> d;
|
|
1074
|
-
const
|
|
1075
|
-
const VFromD<decltype(
|
|
1168
|
+
const RebindToUnsigned<decltype(d)> du;
|
|
1169
|
+
const VFromD<decltype(du)> vu = BitCast(du, v);
|
|
1076
1170
|
// 'Shift left' to clear the sign bit, check for exponent=max and mantissa=0.
|
|
1077
|
-
return RebindMask(d, Eq(Add(
|
|
1171
|
+
return RebindMask(d, Eq(Add(vu, vu), Set(du, hwy::MaxExponentTimes2<T>())));
|
|
1078
1172
|
}
|
|
1079
1173
|
|
|
1080
1174
|
// Returns whether normal/subnormal/zero.
|
|
@@ -1815,9 +1909,7 @@ template <size_t kLane, typename T, size_t N, HWY_IF_T_SIZE(T, 2),
|
|
|
1815
1909
|
HWY_IF_NOT_SPECIAL_FLOAT(T)>
|
|
1816
1910
|
HWY_INLINE T ExtractLane(const Vec128<T, N> v) {
|
|
1817
1911
|
const int16_t lane = wasm_i16x8_extract_lane(v.raw, kLane);
|
|
1818
|
-
T
|
|
1819
|
-
CopySameSize(&lane, &ret); // for float16_t
|
|
1820
|
-
return ret;
|
|
1912
|
+
return static_cast<T>(lane);
|
|
1821
1913
|
}
|
|
1822
1914
|
template <size_t kLane, typename T, size_t N, HWY_IF_T_SIZE(T, 2),
|
|
1823
1915
|
HWY_IF_SPECIAL_FLOAT(T)>
|
|
@@ -1826,10 +1918,7 @@ HWY_INLINE T ExtractLane(const Vec128<T, N> v) {
|
|
|
1826
1918
|
const RebindToUnsigned<decltype(d)> du;
|
|
1827
1919
|
|
|
1828
1920
|
const uint16_t bits = ExtractLane<kLane>(BitCast(du, v));
|
|
1829
|
-
|
|
1830
|
-
T ret;
|
|
1831
|
-
CopySameSize(&bits, &ret);
|
|
1832
|
-
return ret;
|
|
1921
|
+
return BitCastScalar<T>(bits);
|
|
1833
1922
|
}
|
|
1834
1923
|
template <size_t kLane, typename T, size_t N, HWY_IF_T_SIZE(T, 4)>
|
|
1835
1924
|
HWY_INLINE T ExtractLane(const Vec128<T, N> v) {
|
|
@@ -2038,7 +2127,7 @@ template <size_t kLane, typename T, size_t N, HWY_IF_T_SIZE(T, 2)>
|
|
|
2038
2127
|
HWY_INLINE Vec128<T, N> InsertLane(const Vec128<T, N> v, T t) {
|
|
2039
2128
|
static_assert(kLane < N, "Lane index out of bounds");
|
|
2040
2129
|
return Vec128<T, N>{
|
|
2041
|
-
wasm_i16x8_replace_lane(v.raw, kLane,
|
|
2130
|
+
wasm_i16x8_replace_lane(v.raw, kLane, BitCastScalar<int16_t>(t))};
|
|
2042
2131
|
}
|
|
2043
2132
|
|
|
2044
2133
|
template <size_t kLane, typename T, size_t N, HWY_IF_T_SIZE(T, 4)>
|
|
@@ -3002,6 +3091,13 @@ HWY_API Vec128<double, N> InterleaveLower(Vec128<double, N> a,
|
|
|
3002
3091
|
return Vec128<double, N>{wasm_i64x2_shuffle(a.raw, b.raw, 0, 2)};
|
|
3003
3092
|
}
|
|
3004
3093
|
|
|
3094
|
+
template <class T, size_t N, HWY_IF_T_SIZE(T, 2), HWY_IF_SPECIAL_FLOAT(T)>
|
|
3095
|
+
HWY_API Vec128<T, N> InterleaveLower(Vec128<T, N> a, Vec128<T, N> b) {
|
|
3096
|
+
const DFromV<decltype(a)> d;
|
|
3097
|
+
const RebindToUnsigned<decltype(d)> du;
|
|
3098
|
+
return BitCast(d, InterleaveLower(BitCast(du, a), BitCast(du, b)));
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3005
3101
|
// Additional overload for the optional tag (all vector lengths).
|
|
3006
3102
|
template <class D>
|
|
3007
3103
|
HWY_API VFromD<D> InterleaveLower(D /* tag */, VFromD<D> a, VFromD<D> b) {
|
|
@@ -4675,6 +4771,31 @@ HWY_API Vec128<uint64_t, N / 8> SumsOf8(const Vec128<uint8_t, N> v) {
|
|
|
4675
4771
|
return And(BitCast(du64, sxx_xx_xx_F8_xx_xx_xx_70), Set(du64, 0xFFFF));
|
|
4676
4772
|
}
|
|
4677
4773
|
|
|
4774
|
+
template <size_t N>
|
|
4775
|
+
HWY_API Vec128<int64_t, N / 8> SumsOf8(const Vec128<int8_t, N> v) {
|
|
4776
|
+
const DFromV<decltype(v)> di8;
|
|
4777
|
+
const RepartitionToWide<decltype(di8)> di16;
|
|
4778
|
+
const RepartitionToWide<decltype(di16)> di32;
|
|
4779
|
+
const RepartitionToWide<decltype(di32)> di64;
|
|
4780
|
+
const RebindToUnsigned<decltype(di32)> du32;
|
|
4781
|
+
const RebindToUnsigned<decltype(di64)> du64;
|
|
4782
|
+
using VI16 = VFromD<decltype(di16)>;
|
|
4783
|
+
|
|
4784
|
+
const VI16 vFDB97531 = ShiftRight<8>(BitCast(di16, v));
|
|
4785
|
+
const VI16 vECA86420 = ShiftRight<8>(ShiftLeft<8>(BitCast(di16, v)));
|
|
4786
|
+
const VI16 sFE_DC_BA_98_76_54_32_10 = Add(vFDB97531, vECA86420);
|
|
4787
|
+
|
|
4788
|
+
const VI16 sDC_zz_98_zz_54_zz_10_zz =
|
|
4789
|
+
BitCast(di16, ShiftLeft<16>(BitCast(du32, sFE_DC_BA_98_76_54_32_10)));
|
|
4790
|
+
const VI16 sFC_xx_B8_xx_74_xx_30_xx =
|
|
4791
|
+
Add(sFE_DC_BA_98_76_54_32_10, sDC_zz_98_zz_54_zz_10_zz);
|
|
4792
|
+
const VI16 sB8_xx_zz_zz_30_xx_zz_zz =
|
|
4793
|
+
BitCast(di16, ShiftLeft<32>(BitCast(du64, sFC_xx_B8_xx_74_xx_30_xx)));
|
|
4794
|
+
const VI16 sF8_xx_xx_xx_70_xx_xx_xx =
|
|
4795
|
+
Add(sFC_xx_B8_xx_74_xx_30_xx, sB8_xx_zz_zz_30_xx_zz_zz);
|
|
4796
|
+
return ShiftRight<48>(BitCast(di64, sF8_xx_xx_xx_70_xx_xx_xx));
|
|
4797
|
+
}
|
|
4798
|
+
|
|
4678
4799
|
// ------------------------------ LoadMaskBits (TestBit)
|
|
4679
4800
|
|
|
4680
4801
|
namespace detail {
|
|
@@ -4729,6 +4850,15 @@ HWY_API MFromD<D> LoadMaskBits(D d, const uint8_t* HWY_RESTRICT bits) {
|
|
|
4729
4850
|
return detail::LoadMaskBits(d, mask_bits);
|
|
4730
4851
|
}
|
|
4731
4852
|
|
|
4853
|
+
// ------------------------------ Dup128MaskFromMaskBits
|
|
4854
|
+
|
|
4855
|
+
template <class D, HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
4856
|
+
HWY_API MFromD<D> Dup128MaskFromMaskBits(D d, unsigned mask_bits) {
|
|
4857
|
+
constexpr size_t kN = MaxLanes(d);
|
|
4858
|
+
if (kN < 8) mask_bits &= (1u << kN) - 1;
|
|
4859
|
+
return detail::LoadMaskBits(d, mask_bits);
|
|
4860
|
+
}
|
|
4861
|
+
|
|
4732
4862
|
// ------------------------------ Mask
|
|
4733
4863
|
|
|
4734
4864
|
namespace detail {
|
|
@@ -5711,120 +5841,7 @@ HWY_API Vec128<float, N> RearrangeToOddPlusEven(const Vec128<float, N> sum0,
|
|
|
5711
5841
|
|
|
5712
5842
|
// ------------------------------ Reductions
|
|
5713
5843
|
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
// N=1: no-op
|
|
5717
|
-
template <typename T>
|
|
5718
|
-
HWY_INLINE Vec128<T, 1> SumOfLanes(Vec128<T, 1> v) {
|
|
5719
|
-
return v;
|
|
5720
|
-
}
|
|
5721
|
-
template <typename T>
|
|
5722
|
-
HWY_INLINE Vec128<T, 1> MinOfLanes(Vec128<T, 1> v) {
|
|
5723
|
-
return v;
|
|
5724
|
-
}
|
|
5725
|
-
template <typename T>
|
|
5726
|
-
HWY_INLINE Vec128<T, 1> MaxOfLanes(Vec128<T, 1> v) {
|
|
5727
|
-
return v;
|
|
5728
|
-
}
|
|
5729
|
-
|
|
5730
|
-
// N=2
|
|
5731
|
-
template <typename T>
|
|
5732
|
-
HWY_INLINE Vec128<T, 2> SumOfLanes(Vec128<T, 2> v10) {
|
|
5733
|
-
const DFromV<decltype(v10)> d;
|
|
5734
|
-
return Add(v10, Reverse2(d, v10));
|
|
5735
|
-
}
|
|
5736
|
-
template <typename T>
|
|
5737
|
-
HWY_INLINE Vec128<T, 2> MinOfLanes(Vec128<T, 2> v10) {
|
|
5738
|
-
const DFromV<decltype(v10)> d;
|
|
5739
|
-
return Min(v10, Reverse2(d, v10));
|
|
5740
|
-
}
|
|
5741
|
-
template <typename T>
|
|
5742
|
-
HWY_INLINE Vec128<T, 2> MaxOfLanes(Vec128<T, 2> v10) {
|
|
5743
|
-
const DFromV<decltype(v10)> d;
|
|
5744
|
-
return Max(v10, Reverse2(d, v10));
|
|
5745
|
-
}
|
|
5746
|
-
|
|
5747
|
-
// N=4 (only 16/32-bit, else >128-bit)
|
|
5748
|
-
template <typename T, HWY_IF_T_SIZE_ONE_OF(T, (1 << 2) | (1 << 4))>
|
|
5749
|
-
HWY_INLINE Vec128<T, 4> SumOfLanes(Vec128<T, 4> v3210) {
|
|
5750
|
-
using V = decltype(v3210);
|
|
5751
|
-
const DFromV<V> d;
|
|
5752
|
-
const V v0123 = Reverse4(d, v3210);
|
|
5753
|
-
const V v03_12_12_03 = Add(v3210, v0123);
|
|
5754
|
-
const V v12_03_03_12 = Reverse2(d, v03_12_12_03);
|
|
5755
|
-
return Add(v03_12_12_03, v12_03_03_12);
|
|
5756
|
-
}
|
|
5757
|
-
template <typename T, HWY_IF_T_SIZE_ONE_OF(T, (1 << 2) | (1 << 4))>
|
|
5758
|
-
HWY_INLINE Vec128<T, 4> MinOfLanes(Vec128<T, 4> v3210) {
|
|
5759
|
-
using V = decltype(v3210);
|
|
5760
|
-
const DFromV<V> d;
|
|
5761
|
-
const V v0123 = Reverse4(d, v3210);
|
|
5762
|
-
const V v03_12_12_03 = Min(v3210, v0123);
|
|
5763
|
-
const V v12_03_03_12 = Reverse2(d, v03_12_12_03);
|
|
5764
|
-
return Min(v03_12_12_03, v12_03_03_12);
|
|
5765
|
-
}
|
|
5766
|
-
template <typename T, HWY_IF_T_SIZE_ONE_OF(T, (1 << 2) | (1 << 4))>
|
|
5767
|
-
HWY_INLINE Vec128<T, 4> MaxOfLanes(Vec128<T, 4> v3210) {
|
|
5768
|
-
using V = decltype(v3210);
|
|
5769
|
-
const DFromV<V> d;
|
|
5770
|
-
const V v0123 = Reverse4(d, v3210);
|
|
5771
|
-
const V v03_12_12_03 = Max(v3210, v0123);
|
|
5772
|
-
const V v12_03_03_12 = Reverse2(d, v03_12_12_03);
|
|
5773
|
-
return Max(v03_12_12_03, v12_03_03_12);
|
|
5774
|
-
}
|
|
5775
|
-
|
|
5776
|
-
// N=8 (only 16-bit, else >128-bit)
|
|
5777
|
-
template <typename T, HWY_IF_T_SIZE(T, 2)>
|
|
5778
|
-
HWY_INLINE Vec128<T, 8> SumOfLanes(Vec128<T, 8> v76543210) {
|
|
5779
|
-
using V = decltype(v76543210);
|
|
5780
|
-
const DFromV<V> d;
|
|
5781
|
-
// The upper half is reversed from the lower half; omit for brevity.
|
|
5782
|
-
const V v34_25_16_07 = Add(v76543210, Reverse8(d, v76543210));
|
|
5783
|
-
const V v0347_1625_1625_0347 = Add(v34_25_16_07, Reverse4(d, v34_25_16_07));
|
|
5784
|
-
return Add(v0347_1625_1625_0347, Reverse2(d, v0347_1625_1625_0347));
|
|
5785
|
-
}
|
|
5786
|
-
template <typename T, HWY_IF_T_SIZE_ONE_OF(T, (1 << 2) | (1 << 4))>
|
|
5787
|
-
HWY_INLINE Vec128<T, 8> MinOfLanes(Vec128<T, 8> v76543210) {
|
|
5788
|
-
using V = decltype(v76543210);
|
|
5789
|
-
const DFromV<V> d;
|
|
5790
|
-
// The upper half is reversed from the lower half; omit for brevity.
|
|
5791
|
-
const V v34_25_16_07 = Min(v76543210, Reverse8(d, v76543210));
|
|
5792
|
-
const V v0347_1625_1625_0347 = Min(v34_25_16_07, Reverse4(d, v34_25_16_07));
|
|
5793
|
-
return Min(v0347_1625_1625_0347, Reverse2(d, v0347_1625_1625_0347));
|
|
5794
|
-
}
|
|
5795
|
-
template <typename T, HWY_IF_T_SIZE_ONE_OF(T, (1 << 2) | (1 << 4))>
|
|
5796
|
-
HWY_INLINE Vec128<T, 8> MaxOfLanes(Vec128<T, 8> v76543210) {
|
|
5797
|
-
using V = decltype(v76543210);
|
|
5798
|
-
const DFromV<V> d;
|
|
5799
|
-
// The upper half is reversed from the lower half; omit for brevity.
|
|
5800
|
-
const V v34_25_16_07 = Max(v76543210, Reverse8(d, v76543210));
|
|
5801
|
-
const V v0347_1625_1625_0347 = Max(v34_25_16_07, Reverse4(d, v34_25_16_07));
|
|
5802
|
-
return Max(v0347_1625_1625_0347, Reverse2(d, v0347_1625_1625_0347));
|
|
5803
|
-
}
|
|
5804
|
-
|
|
5805
|
-
template <typename T, size_t N, HWY_IF_NOT_T_SIZE(T, 1)>
|
|
5806
|
-
HWY_INLINE T ReduceSum(Vec128<T, N> v) {
|
|
5807
|
-
return GetLane(SumOfLanes(v));
|
|
5808
|
-
}
|
|
5809
|
-
|
|
5810
|
-
} // namespace detail
|
|
5811
|
-
|
|
5812
|
-
template <class D, HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
5813
|
-
HWY_API VFromD<D> SumOfLanes(D /* tag */, VFromD<D> v) {
|
|
5814
|
-
return detail::SumOfLanes(v);
|
|
5815
|
-
}
|
|
5816
|
-
template <class D, HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
5817
|
-
HWY_API TFromD<D> ReduceSum(D /* tag */, VFromD<D> v) {
|
|
5818
|
-
return detail::ReduceSum(v);
|
|
5819
|
-
}
|
|
5820
|
-
template <class D, HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
5821
|
-
HWY_API VFromD<D> MinOfLanes(D /* tag */, VFromD<D> v) {
|
|
5822
|
-
return detail::MinOfLanes(v);
|
|
5823
|
-
}
|
|
5824
|
-
template <class D, HWY_IF_V_SIZE_LE_D(D, 16)>
|
|
5825
|
-
HWY_API VFromD<D> MaxOfLanes(D /* tag */, VFromD<D> v) {
|
|
5826
|
-
return detail::MaxOfLanes(v);
|
|
5827
|
-
}
|
|
5844
|
+
// Nothing native, generic_ops-inl defines SumOfLanes and ReduceSum.
|
|
5828
5845
|
|
|
5829
5846
|
// ------------------------------ Lt128
|
|
5830
5847
|
|