Converts the float type to the half type, and supports multiple rounding modes.
- RINT rounding mode: round half to even
- ROUND rounding mode: round half up
- FLOOR rounding mode: round toward negative infinity
- CEIL rounding mode: round toward positive infinity
- TRUNC rounding mode: round toward zero
- ODD rounding mode: round to nearest odd
Based on the magnitude of the input data, the operation is divided into non-saturation mode and saturation mode.
- Non-saturation mode:
- When the input data exceeds the maximum or minimum value of the output type, the corresponding signed inf value of the output type is returned.
- When the input data is +/-inf, +/-inf is returned.
- When the input data is nan, nan is returned.
- Saturation mode:
- When the input data exceeds the maximum or minimum value of the output type, the corresponding maximum or minimum value of the output type is returned.
- When the input data is +/-inf, the corresponding maximum or minimum value of the output type is returned.
- When the input data is nan, 0 is returned.
Since the bit-width ratio of the source operand type to the destination operand type is 2:1, when writing data, the data of one VL size needs to be divided into two parts, and index 0 or index 1 is selected according to different interfaces.
[object Object]
For detailed descriptions of vector data registers and mask registers, see .
None
PIPE_V
None
[object Object]