Intrinsics for Converting Half Floats
There are four intrinsics for converting half-floats to 32-bit floats and 32-bit floats to half-floats. The prototypes for these half-float conversion intrinsics are in the
To use these intrinsics, include the
immintrin.hfile as follows:
This intrinsic takes a half-float value,
x, and converts it to a 32-bit float value, which is returned.
This intrinsic takes a 32-bit float value,
x, and converts it to a half-float value, which is returned.
This intrinsic takes four packed half-float values and converts them to four 32-bit float values, which are returned. The upper 64-bits of
xare ignored. The lower 64-bits are taken as four 16-bit float values for conversion.
This intrinsic takes four packed 32-bit float values and converts them to four half-float values, which are returned. The upper 64-bits in the returned result are all zeros. The lower 64-bits contain the four packed 16-bit float values.