_mm_cvtps_pi16
Classification
Header File
Synopsis
_mm_cvtps_pi16(__m128 a);
Description
Convert packed single-precision (32-bit) floating-point elements in "a" to packed 16-bit integers, and store the results in "dst". Note: this intrinsic will generate 0x7FFF, rather than 0x8000, for input values between 0x7FFF and 0x7FFFFFFF.
Operation
FOR j := 0 to 3
i := 16*j
k := 32*j
IF a[k+31:k] >= FP32(0x7FFF) && a[k+31:k] <= FP32(0x7FFFFFFF)
dst[i+15:i] := 0x7FFF
ELSE
dst[i+15:i] := Convert_FP32_To_Int16(a[k+31:k])
FI
ENDFOR