|
XCORE SDK
XCORE Software Development Kit
|
Macros | |
| #define | MAX(A, B) (((A) >= (B))? (A) : (B)) |
Takes the greater of arguments A and B, preferring A on equality. More... | |
| #define | MIN(A, B) (((A) <= (B))? (A) : (B)) |
Takes the lesser of arguments A and B, preferring A on equality. More... | |
| #define | CLS_S16(X) (cls(X) - 16) |
Count leading sign bits of an int16_t. More... | |
| #define | CLS_S32(X) (cls(X)) |
Count leading sign bits of an int32_t. More... | |
| #define | CLS_S64(X) |
Count leading sign bits of an int64_t. More... | |
| #define | CLS_C16(X) (MIN(CLS_S16((X).re), CLS_S16((X).im))) |
Count leading sign bits of a complex_s16_t. More... | |
| #define | CLS_C32(X) (MIN(CLS_S32(((int32_t)(X).re)), CLS_S32(((int32_t)(X).im)))) |
Count leading sign bits of a complex_s32_t. More... | |
| #define | HR_S64(X) (CLS_S64(X)-1) |
Get the headroom of an int64_t. More... | |
| #define | HR_S32(X) (CLS_S32(X)-1) |
Get the headroom of an int32_t. More... | |
| #define | HR_S16(X) (CLS_S16(((int16_t)X))-1) |
Get the headroom of an int16_t. More... | |
| #define | HR_C32(X) (CLS_C32(X)-1) |
Get the headroom of a complex_s32_t. More... | |
| #define | HR_C16(X) (CLS_C16(X)-1) |
Get the headroom of a complex_s16_t. More... | |
Count leading sign bits of a complex_s16_t.
The number of leading sign bits for a complex integer is defined as the minimum of the number of leading sign bits for its real part and for its imaginary part.
| [in] | X | Input |
X Count leading sign bits of a complex_s32_t.
The number of leading sign bits for a complex integer is defined as the minimum of the number of leading sign bits for its real part and for its imaginary part.
| [in] | X | Input |
X | #define CLS_S16 | ( | X | ) | (cls(X) - 16) |
Count leading sign bits of an int16_t.
| [in] | X | Input |
X | #define CLS_S32 | ( | X | ) | (cls(X)) |
Count leading sign bits of an int32_t.
| [in] | X | Input |
X | #define CLS_S64 | ( | X | ) |
Count leading sign bits of an int64_t.
| [in] | X | Input |
X | #define HR_C16 | ( | X | ) | (CLS_C16(X)-1) |
Get the headroom of a complex_s16_t.
The headroom of a complex N-bit integer is the minimum of the headroom of each of its N-bit real and imaginary parts.
| [in] | X | Input |
X | #define HR_C32 | ( | X | ) | (CLS_C32(X)-1) |
Get the headroom of a complex_s32_t.
The headroom of a complex N-bit integer is the minimum of the headroom of each of its N-bit real and imaginary parts.
| [in] | X | Input |
X | #define HR_S16 | ( | X | ) | (CLS_S16(((int16_t)X))-1) |
Get the headroom of an int16_t.
| [in] | X | Input |
X | #define HR_S32 | ( | X | ) | (CLS_S32(X)-1) |
Get the headroom of an int32_t.
| [in] | X | Input |
X | #define HR_S64 | ( | X | ) | (CLS_S64(X)-1) |
Get the headroom of an int64_t.
| [in] | X | Input |
X | #define MAX | ( | A, | |
| B | |||
| ) | (((A) >= (B))? (A) : (B)) |
Takes the greater of arguments A and B, preferring A on equality.
| [in] | A | First input |
| [in] | B | Second input |
| #define MIN | ( | A, | |
| B | |||
| ) | (((A) <= (B))? (A) : (B)) |
Takes the lesser of arguments A and B, preferring A on equality.
| [in] | A | First input |
| [in] | B | Second input |