The half-precision floating-point type can be used.
The half-precision floating-point type has the following features.
The sign is one bit, the exponent is five bits, and the mantissa is 10 bits (11 bits when a hidden bit is included). |
The only supported operations are assignment between __fp16 type values, type conversion from __fp16 to float, and type conversion from float to __fp16. Other operations are to be performed after data has been converted into the float type, and the result will have the same type as that for when performing the same operation for the float type. Similarly, type conversion from __fp16 to double is to be performed after data has been converted into the float type. |
Denormal numbers are not supported for type conversion from float to __fp16, and they will be flushed to normal numbers in accordance with the rounding mode. |
This type cannot be specified as the parameter type or return type of a function. To pass a value of the __fp16 type between functions, pass it by casting it to another type (e.g. float), by using a pointer, or by using a structure argument that has a member of the __fp16 type. |
If the called function does not have a parameter typeNote, the value will be passed after the type is converted into float by default argument promotion and then further converted into double. |
This applies when there is no prototype declaration or parameter string, or there are a variable number of arguments. |
If this type is specified for an argument, the value is passed after being converted into the parameter type. If there is no parameter type, the value will be passed after the type is converted into float by default argument promotion and then converted into double. |
This type can be specified for a structure member, union member, or array element. This type cannot be specified for a bit field member. |