This option enables the use of half-precision floating-point
numbers as an optional extension to the VFPv3 architecture. If a
format is not specified, use of the __fp16 data
type is faulted by the compiler.
Syntax
--fp16_format=format
where format is
one of:
alternative
An alternative to ieee that provides
additional range, but has no NaN or infinity values.
ieee
Half-precision
binary floating-point format defined by IEEE 754r, a revision to the
IEEE 754 standard.
none
This
is the default setting. It is equivalent to not specifying a format
and means that the compiler faults use of the __fp16 data
type.
Restrictions
The following restrictions apply when you use the __fp16 data
type:
When used in a C or C++ expression,
an __fp16 type is promoted to single precision. Subsequent
promotion to double precision can occur if required by one of the
operands.
A single precision value can be converted to __fp16.
A double precision value is converted to single precision and then
to __fp16, that could involve double rounding.
This reflects the lack of direct double-to-16-bit conversion in
the ARM architecture.
When using fpmode=fast, no floating-point
exceptions are raised when converting to and from half-precision
floating-point format.
Function formal arguments cannot be of type __fp16.
However, pointers to variables of type __fp16 can
be used as function formal argument types.
__fp16 values can be passed as
actual function arguments. In this case, they are converted to single-precision
values.
__fp16 cannot be specified as
the return type of a function. However, a pointer to an __fp16 type
can be used as a return type.
An __fp16 value is converted
to a single-precision or double-precision value when used as a return
value for a function that returns a float or double.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.