MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / float16_to_float

Function float16_to_float

Source/astcenc_vecmathlib_neon_4.h:921–930  ·  view source on GitHub ↗

* @brief Return a float value for a float16 vector. */

Source from the content-addressed store, hash-verified

919 * @brief Return a float value for a float16 vector.
920 */
921ASTCENC_SIMD_INLINE vfloat4 float16_to_float(vint4 a)
922{
923 // Convert each 32-bit float pattern to a 16-bit pattern
924 uint32x4_t u32 = vreinterpretq_u32_s32(a.m);
925 uint16x4_t u16 = vmovn_u32(u32);
926 float16x4_t f16 = vreinterpret_f16_u16(u16);
927
928 // Generate float16 value
929 return vfloat4(vcvt_f32_f16(f16));
930}
931
932/**
933 * @brief Return a float value for a float16 scalar.

Callers

nothing calls this directly

Calls 1

vfloat4Class · 0.70

Tested by

no test coverage detected