E.V.E
v2023.02.15
Loading...
Searching...
No Matches
eve::float16_t Struct Reference

IEEE 754 binary16 floating-point type. More...

#include <eve/arch/float16.hpp>

Detailed Description

Header file

#include <eve/wide.hpp>

Where the compiler provides a native half-precision type, eve::float16_t is an alias for _Float16 and arithmetic runs on whatever the hardware offers. Everywhere else it is a type holding the 16 bits and converting to and from float around each operation: the results agree, the speed does not.

Either way it can be the element type of an eve::wide. How much the target actually supports is reported by eve::_::supports_fp16_native_type, ..._scalar_ops, ..._vector_ops and ..._vector_conversion.

Note
Conversions to other arithmetic types are explicit, so a float16_t never widens silently inside an expression.