_mm512_scalef_ph
Classification
AVX-512, Miscellaneous, CPUID Test: AVX512_FP16
Header File
Instruction
VSCALEFPH zmm, zmm, zmm
Synopsis
_mm512_scalef_ph(__m512h a, __m512h b);
Description
Scale the packed half-precision (16-bit) floating-point elements in "a" using values from "b", and store the results in "dst".
Operation
DEFINE ScaleFP16(src1, src2) {
denormal1 := (a.exp == 0) and (a.fraction != 0)
denormal2 := (b.exp == 0) and (b.fraction != 0)
tmp1 := src1
tmp2 := src2
IF MXCSR.DAZ
IF denormal1
tmp1 := 0
FI
IF denormal2
tmp2 := 0
FI
FI
RETURN tmp1 * POW(2.0, FLOOR(tmp2))
}
FOR i := 0 to 15
dst.fp16[i] := ScaleFP16(a.fp16[i], b.fp16[i])
ENDFOR
dst[MAX:256] := 0