Go to the source code of this file.
|
| int | gcd (int a, int b) |
| static int | ceil_divide (int a, int b) |
| static void | cross_product_s16 (int32_t *px, int32_t *py, int32_t *pz, int16_t a, int16_t b, int16_t c, int16_t d, int16_t e, int16_t f) |
| | Cross product function.
|
| int | find_equal_int16 (int16_t idx[], int16_t vec[], int n, int vec_length, int max_results) |
| int16_t | find_min_int16 (int16_t vec[], int vec_length) |
| int32_t | find_max_abs_int32 (int32_t vec[], int vec_length) |
| int | norm_int32 (int32_t val) |
| uint32_t | crc32 (uint32_t base, const void *data, uint32_t bytes) |
◆ ABS
Value: ({ \
__typeof__(a) __a = (a); \
__a < 0 ? -__a : __a; \
})
◆ INT_MAX_FOR_NUMBER_OF_BITS
| #define INT_MAX_FOR_NUMBER_OF_BITS |
( |
| N | ) |
|
Value:((int64_t)((1ULL << ((N) - 1)) - 1))
◆ INT_MIN_FOR_NUMBER_OF_BITS
| #define INT_MIN_FOR_NUMBER_OF_BITS |
( |
| N | ) |
|
Value:((int64_t)(-((1ULL << ((N) - 1)) - 1) - 1))
◆ MAX
◆ merge_16b16b
| #define merge_16b16b |
( |
| high, |
|
|
| low ) |
Value: (((uint32_t)(high) << 16) | \
((low) & 0xFFFF))
◆ merge_4b4b
| #define merge_4b4b |
( |
| high, |
|
|
| low ) |
Value: (((uint8_t)(high) << 4) | \
((low) & 0xF))
◆ MIN
◆ RECIPROCAL_SPEED_OF_SOUND_Q31
| #define RECIPROCAL_SPEED_OF_SOUND_Q31 6260885 /* Q1.31 */ |
◆ ROUND_DOWN
| #define ROUND_DOWN |
( |
| size, |
|
|
| alignment ) |
Value: ({ \
__typeof__(size) __size = (size); \
__typeof__(alignment) __alignment = (alignment); \
__size - (__size % __alignment); \
})
◆ ROUND_UP
| #define ROUND_UP |
( |
| size, |
|
|
| alignment ) |
Value: ({ \
__typeof__(size) __size = (size); \
__typeof__(alignment) __alignment = (alignment); \
((__size + __alignment - 1) / __alignment) * __alignment; \
})
◆ SGN
Value: ({ \
__typeof__(a) __a = (a); \
__a < 0 ? -1 : \
__a > 0 ? 1 : 0; \
})
◆ SPEED_OF_SOUND
| #define SPEED_OF_SOUND 343 |
◆ USE_SOF_GCD
◆ ceil_divide()
| int ceil_divide |
( |
int | a, |
|
|
int | b ) |
|
inlinestatic |
◆ crc32()
| uint32_t crc32 |
( |
uint32_t | base, |
|
|
const void * | data, |
|
|
uint32_t | bytes ) |
◆ cross_product_s16()
| void cross_product_s16 |
( |
int32_t * | px, |
|
|
int32_t * | py, |
|
|
int32_t * | pz, |
|
|
int16_t | a, |
|
|
int16_t | b, |
|
|
int16_t | c, |
|
|
int16_t | d, |
|
|
int16_t | e, |
|
|
int16_t | f ) |
|
inlinestatic |
Cross product function.
Calculate cross product for vectors AB(a, b, c) and AC(d, e, f), where A, B, and C are points of a triangle in 3D space. Cross product is used in computational geometry. Cross product AB x AC is (b * f - c * e, c * d - a * f, a * e - b * d)
- Parameters
-
| [out] | px | x-axis component of cross product vector |
| [out] | py | y-axis component of cross product vector |
| [out] | pz | z-axis component of cross product vector |
| [in] | a | x-axis component of vector AB |
| [in] | b | y-axis component of vector AB |
| [in] | c | z-axis component of vector AB |
| [in] | d | x-axis component of vector AC |
| [in] | e | y-axis component of vector AC |
| [in] | f | z-axis component of vector AC |
◆ find_equal_int16()
| int find_equal_int16 |
( |
int16_t | idx[], |
|
|
int16_t | vec[], |
|
|
int | n, |
|
|
int | vec_length, |
|
|
int | max_results ) |
◆ find_max_abs_int32()
| int32_t find_max_abs_int32 |
( |
int32_t | vec[], |
|
|
int | vec_length ) |
◆ find_min_int16()
| int16_t find_min_int16 |
( |
int16_t | vec[], |
|
|
int | vec_length ) |
◆ gcd()
◆ norm_int32()
| int norm_int32 |
( |
int32_t | val | ) |
|