no_std_compat::arch::x86

Function _mm_mask_getmant_sh

Source
pub unsafe fn _mm_mask_getmant_sh<const NORM: i32, const SIGN: i32>(
    src: __m128h,
    k: u8,
    a: __m128h,
    b: __m128h,
) -> __m128h
🔬This is a nightly-only experimental API. (stdarch_x86_avx512_f16)
Available on x86 only.
Expand description

Normalize the mantissas of the lower half-precision (16-bit) floating-point element in b, store the result in the lower element of dst using writemask k (the element is copied from src when mask bit 0 is not set), and copy the upper 7 packed elements from a to the upper elements of dst. This intrinsic essentially calculates ±(2^k)*|x.significand|, where k depends on the interval range defined by norm and the sign depends on sign and the source sign.

The mantissa is normalized to the interval specified by interv, which can take the following values:

_MM_MANT_NORM_1_2     // interval [1, 2)
_MM_MANT_NORM_p5_2    // interval [0.5, 2)
_MM_MANT_NORM_p5_1    // interval [0.5, 1)
_MM_MANT_NORM_p75_1p5 // interval [0.75, 1.5)

The sign is determined by sc which can take the following values:

_MM_MANT_SIGN_src     // sign = sign(src)
_MM_MANT_SIGN_zero    // sign = 0
_MM_MANT_SIGN_nan     // dst = NaN if sign(src) = 1

Intel’s documentation