CMSIS-DSP  
CMSIS DSP Software Library

Functions

__STATIC_INLINE int16_t arm_typecast_s16_f16 (float16_t x)
 Interpret a f16 as an s16 value. More...
 
__STATIC_INLINE float16_t arm_typecast_f16_s16 (int16_t x)
 Interpret an s16 as an f16 value. More...
 

Description

Function Documentation

◆ arm_typecast_f16_s16()

__STATIC_INLINE float16_t arm_typecast_f16_s16 ( int16_t  x)
Parameters
[in]xinput value.
Returns
return value.
Description
It is a typecast. No conversion of the int to float is done. The memcpy will be optimized out by the compiler. memcpy is used to prevent type punning issues. With gcc, -fno-builtins MUST not be used or the memcpy will not be optimized out.

◆ arm_typecast_s16_f16()

__STATIC_INLINE int16_t arm_typecast_s16_f16 ( float16_t  x)
Parameters
[in]xinput value.
Returns
return value.
Description
It is a typecast. No conversion of the float to int is done. The memcpy will be optimized out by the compiler. memcpy is used to prevent type punning issues. With gcc, -fno-builtins MUST not be used or the memcpy will not be optimized out.