Name Description Size
arm_neon-inl.h 347066
arm_sve-inl.h 224026
emu128-inl.h tag 88528
generic_ops-inl.h .h. #if HWY_IDE && !defined(HWY_HIGHWAY_INCLUDED) #include "hwy/detect_targets.h" #include "hwy/ops/emu128-inl.h" #endif // HWY_IDE // Relies on the external include guard in highway.h. HWY_BEFORE_NAMESPACE(); namespace hwy { namespace HWY_NAMESPACE { // The lane type of a vector type, e.g. float for Vec<ScalableTag<float>>. template <class V> using LaneType = decltype(GetLane(V())); // Vector type, e.g. Vec128<float> for CappedTag<float, 4>. Useful as the return // type of functions that do not take a vector argument, or as an argument type // if the function only has a template argument for D, or for explicit type // names instead of auto. This may be a built-in type. template <class D> using Vec = decltype(Zero(D())); // Mask type. Useful as the return type of functions that do not take a mask // argument, or as an argument type if the function only has a template argument // for D, or for explicit type names instead of auto. template <class D> using Mask = decltype(MaskFromVec(Zero(D()))); // Returns the closest value to v within [lo, hi]. template <class V> HWY_API V Clamp(const V v, const V lo, const V hi) { return Min(Max(lo, v), hi); } // CombineShiftRightBytes (and -Lanes) are not available for the scalar target, // and RVV has its own implementation of -Lanes. #if HWY_TARGET != HWY_SCALAR && HWY_TARGET != HWY_RVV template <size_t kLanes, class D> HWY_API VFromD<D> CombineShiftRightLanes(D d, VFromD<D> hi, VFromD<D> lo) { constexpr size_t kBytes = kLanes * sizeof(TFromD<D>); static_assert(kBytes < 16, "Shift count is per-block"); return CombineShiftRightBytes<kBytes>(d, hi, lo); } #endif // Returns lanes with the most significant bit set and all other bits zero. template <class D> HWY_API Vec<D> SignBit(D d) { const RebindToUnsigned<decltype(d)> du; return BitCast(d, Set(du, SignMask<TFromD<D>>())); } // Returns quiet NaN. template <class D> HWY_API Vec<D> NaN(D d) { const RebindToSigned<D> di; // LimitsMax sets all exponent and mantissa bits to 1. The exponent plus // mantissa MSB (to indicate quiet) would be sufficient. return BitCast(d, Set(di, LimitsMax<TFromD<decltype(di)>>())); } // Returns positive infinity. template <class D> HWY_API Vec<D> Inf(D d) { const RebindToUnsigned<D> du; using T = TFromD<D>; using TU = TFromD<decltype(du)>; const TU max_x2 = static_cast<TU>(MaxExponentTimes2<T>()); return BitCast(d, Set(du, max_x2 >> 1)); } // ------------------------------ ZeroExtendResizeBitCast // The implementation of detail::ZeroExtendResizeBitCast for the HWY_EMU128 // target is in emu128-inl.h, and the implementation of // detail::ZeroExtendResizeBitCast for the HWY_SCALAR target is in scalar-inl.h #if HWY_TARGET != HWY_EMU128 && HWY_TARGET != HWY_SCALAR namespace detail { #if HWY_HAVE_SCALABLE template <size_t kFromVectSize, size_t kToVectSize, class DTo, class DFrom> HWY_INLINE VFromD<DTo> ZeroExtendResizeBitCast( hwy::SizeTag<kFromVectSize> /* from_size_tag 256294
ppc_vsx-inl.h 260547
rvv-inl.h tag 242550
scalar-inl.h tag 64716
set_macros-inl.h 17850
shared-inl.h 27105
tuple-inl.h that lack native tuple types, after // they define VFromD and before they use the tuples e.g. for LoadInterleaved2. // Assumes we are already in the HWY_NAMESPACE and under an include guard. // If viewing this header standalone, define VFromD to avoid IDE warnings. // This is normally set by set_macros-inl.h before this header is included. #if !defined(HWY_NAMESPACE) #include "hwy/base.h" template <class D> using VFromD = int; #endif // On SVE, Vec2..4 are aliases to built-in types. template <class D> struct Vec2 { VFromD<D> v0; VFromD<D> v1; }; template <class D> struct Vec3 { VFromD<D> v0; VFromD<D> v1; VFromD<D> v2; }; template <class D> struct Vec4 { VFromD<D> v0; VFromD<D> v1; VFromD<D> v2; VFromD<D> v3; }; // D arg is unused but allows deducing D. template <class D> HWY_API Vec2<D> Create2(D /* tag 3397
wasm_128-inl.h tag 230868
wasm_256-inl.h 79946
x86_128-inl.h 457535
x86_256-inl.h 309828
x86_512-inl.h 288498