FAST RTS ARM TMU API
Module: MATHLIB API / FAST RTS TMU API
Structures
Name |
|
|---|---|
union |
FASTRTS_TMU_FloatUInt32 |
Functions
Name |
|
|---|---|
__STATIC_FORCEINLINE float |
sinf_tmu(float x) |
__STATIC_FORCEINLINE float |
cosf_tmu(float x) |
__STATIC_FORCEINLINE float |
atanf_tmu(float x) |
__STATIC_FORCEINLINE float |
atan2f_tmu(float y, float x) |
__STATIC_FORCEINLINE float |
acosf_tmu(float x) |
__STATIC_FORCEINLINE float |
asinf_tmu(float x) |
__STATIC_FORCEINLINE float |
expf_tmu(float x) |
__STATIC_FORCEINLINE float |
logf_tmu(float x) |
__STATIC_FORCEINLINE float |
sqrtf_tmu(float x) |
__STATIC_FORCEINLINE float |
divf_tmu(float y, float x) |
__STATIC_FORCEINLINE uint32_t |
FASTRTS_TMU_clearFlags(uint32_t flags) |
__STATIC_FORCEINLINE uint32_t |
FASTRTS_TMU_setFlags(uint32_t flags) |
__STATIC_FORCEINLINE uint32_t |
FASTRTS_TMU_getFlags(void ) |
Defines
Name |
|
|---|---|
FASTRTS_TMU_FLAGS_LUF |
|
FASTRTS_TMU_FLAGS_LVF |
|
sinf |
|
cosf |
|
asinf |
|
acosf |
|
atanf(x) |
|
atan2f |
|
expf |
|
logf |
|
sqrtf |
Detailed Description
Note: TMU is only supported on some TI devices having ARM M33 which have TMU enabled via CDE extention
ARM TMU CDE intrinsic redefinitions of standard math library (math.h) functions, include fastrts_tmu.h (top-level) rather than including this file directly.
Functions Documentation
function sinf_tmu
__STATIC_FORCEINLINE float sinf_tmu(
float x
)
sinf operation
function cosf_tmu
__STATIC_FORCEINLINE float cosf_tmu(
float x
)
cosf operation
function atanf_tmu
__STATIC_FORCEINLINE float atanf_tmu(
float x
)
atanf operation
Note: x must be in the range [-1, 1]
function atan2f_tmu
__STATIC_FORCEINLINE float atan2f_tmu(
float y,
float x
)
atan2f operation using ATANPUF32 with manual quadrant handling
Uses TMU ATANPUF32 with manual quadrant correction.
function acosf_tmu
__STATIC_FORCEINLINE float acosf_tmu(
float x
)
acosf operation
function asinf_tmu
__STATIC_FORCEINLINE float asinf_tmu(
float x
)
asinf operation
function expf_tmu
__STATIC_FORCEINLINE float expf_tmu(
float x
)
expf operation
function logf_tmu
__STATIC_FORCEINLINE float logf_tmu(
float x
)
logf operation
function sqrtf_tmu
__STATIC_FORCEINLINE float sqrtf_tmu(
float x
)
sqrtf operation
function divf_tmu
__STATIC_FORCEINLINE float divf_tmu(
float y,
float x
)
divf operation (not a standard math.h function; TMU hardware divide)
function FASTRTS_TMU_clearFlags
__STATIC_FORCEINLINE uint32_t FASTRTS_TMU_clearFlags(
uint32_t flags
)
Clear LUF and LVF flags.
Parameters:
flags Bit mask of FASTRTS_TMU_FLAGS_LUF, FASTRTS_TMU_FLAGS_LVF
Return: new flags value
function FASTRTS_TMU_setFlags
__STATIC_FORCEINLINE uint32_t FASTRTS_TMU_setFlags(
uint32_t flags
)
Sets LUF and LVF flags.
Parameters:
flags Bit mask of FASTRTS_TMU_FLAGS_LUF, FASTRTS_TMU_FLAGS_LVF
Return: new flags value
function FASTRTS_TMU_getFlags
__STATIC_FORCEINLINE uint32_t FASTRTS_TMU_getFlags(
void
)
Return current LUF and LVF flag value.
Macros Documentation
define FASTRTS_TMU_FLAGS_LUF
#define FASTRTS_TMU_FLAGS_LUF ((uint32_t)0x00000001U)
TMU LUF (Look-Up Underflow) flag bit.
define FASTRTS_TMU_FLAGS_LVF
#define FASTRTS_TMU_FLAGS_LVF ((uint32_t)0x00000002U)
TMU LVF (Look-up oVerflow Flag) flag bit.
define sinf
#define sinf sinf_tmu
sinf - remapped RTS functions to TMU CDE intrinsics
define cosf
#define cosf cosf_tmu
cosf - remapped RTS functions to TMU CDE intrinsics
define asinf
#define asinf asinf_tmu
asinf - remapped RTS functions to TMU CDE intrinsics
define acosf
#define acosf acosf_tmu
acosf - remapped RTS functions to TMU CDE intrinsics
define atanf
#define atanf(
x
)
atan2f_tmu((x), 1.0f)
atanf - remapped RTS functions to TMU CDE intrinsics, implemented via atan2f_tmu(x, 1.0f)
Note: For better performance, prefer calling atanf_tmu() directly instead of this macro when the input is known to be in the range [-1, 1]; outside that range its result is not valid.
define atan2f
#define atan2f atan2f_tmu
atan2f - remapped RTS functions to TMU CDE intrinsics
define expf
#define expf expf_tmu
expf - remapped RTS functions to TMU CDE intrinsics
define logf
#define logf logf_tmu
logf - remapped RTS functions to TMU CDE intrinsics
define sqrtf
#define sqrtf sqrtf_tmu
sqrtf - remapped RTS functions to TMU CDE intrinsics