This option supports half-precision (16-bit) floating point type '
__fp16'.
The options for
format are:
ieee
Use IEEE 754-2008 format. This format has mantissa of 11 bits and exponent of 3 bits. This format can represent normalized values from 2^-14 to 65504.
alternative
Use ARM alternative format. This does not support infinities and NAN's. The range is 2^-14 to 131008.
Some restrictions on
__fp16 use:
- __fp16 is storage type only. In case of arithmetic operations,
__fp16 values are converted to float.
- __fp16 cannot be used as formal argument type. However, pointer to variable of the type __fp16 can be used as formal argument.
- __fp16 cannot be used as function return type. Pointer to variable of the type
__fp16 can be returned.
- __fp16 values can be passed as arguments. In such case, the values are converted to float.
- __fp16 values can be returned from functions. In such case, values are converted to float.
- __fp16 can be used with both models of floating-point.