_mm_scalef_ph
Classification
AVX-512, Miscellaneous, CPUID Test: AVX512_FP16
Header File
immintrin.h
Instruction
VSCALEFPH xmm, xmm, xmm
Synopsis
 _mm_scalef_ph(__m128h a, __m128h 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 7
	dst.fp16[i] := ScaleFP16(a.fp16[i], b.fp16[i])
ENDFOR
dst[MAX:128] := 0