CMSIS-DSP  
CMSIS DSP Software Library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

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

__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.
__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.