CMSIS-DSP  
CMSIS DSP Software Library
utils.h File Reference

Macros

#define INDEX_MASK   0x0000003F
 Macros required for reciprocal calculation in Normalized LMS. More...
 
#define MIN(x, y)   ((x) < (y) ? (x) : (y))
 
#define MAX(x, y)   ((x) > (y) ? (x) : (y))
 
#define SQ(x)   ((x) * (x))
 
#define ROUND_UP(N, S)   ((((N) + (S) - 1) / (S)) * (S))
 

Functions

uint32_t arm_recip_q31 (q31_t in, q31_t *dst, const q31_t *pRecipTable)
 Function to Calculates 1/in (reciprocal) value of Q31 Data type. It should not be used with negative values. More...
 
uint32_t arm_recip_q15 (q15_t in, q15_t *dst, const q15_t *pRecipTable)
 Function to Calculates 1/in (reciprocal) value of Q15 Data type. It should not be used with negative values. More...
 
__STATIC_INLINE void arm_norm_64_to_32u (uint64_t in, int32_t *normalized, int32_t *norm)
 64-bit to 32-bit unsigned normalization More...
 
__STATIC_INLINE int32_t arm_div_int64_to_int32 (int64_t num, int32_t den)
 

Macro Definition Documentation

◆ INDEX_MASK

#define INDEX_MASK   0x0000003F

◆ MAX

#define MAX (   x,
 
)    ((x) > (y) ? (x) : (y))

◆ MIN

#define MIN (   x,
 
)    ((x) < (y) ? (x) : (y))

◆ ROUND_UP

#define ROUND_UP (   N,
 
)    ((((N) + (S) - 1) / (S)) * (S))

◆ SQ

#define SQ (   x)    ((x) * (x))

Function Documentation

◆ arm_div_int64_to_int32()

__STATIC_INLINE int32_t arm_div_int64_to_int32 ( int64_t  num,
int32_t  den 
)

◆ arm_norm_64_to_32u()

__STATIC_INLINE void arm_norm_64_to_32u ( uint64_t  in,
int32_t *  normalized,
int32_t *  norm 
)
Parameters
[in]inis input unsigned long long value
[out]normalizedis the 32-bit normalized value
[out]normis norm scale

◆ arm_recip_q15()

uint32_t arm_recip_q15 ( q15_t  in,
q15_t dst,
const q15_t pRecipTable 
)

◆ arm_recip_q31()

uint32_t arm_recip_q31 ( q31_t  in,
q31_t dst,
const q31_t pRecipTable 
)