11#ifndef INCLUDE_ZEPHYR_DSP_BASICMATH_H_
12#define INCLUDE_ZEPHYR_DSP_BASICMATH_H_
Public APIs for DSP basicmath for 16 bit floating point.
Public APIs for Digital Signal Processing (DSP) math.
#define DSP_DATA
Definition dsp.h:23
#define DSP_FUNC_SCOPE
Definition dsp.h:17
DSP_FUNC_SCOPE void zdsp_abs_f32(const DSP_DATA float32_t *src, DSP_DATA float32_t *dst, uint32_t block_size)
Floating-point vector absolute value.
DSP_FUNC_SCOPE void zdsp_abs_q15(const DSP_DATA q15_t *src, DSP_DATA q15_t *dst, uint32_t block_size)
Q15 vector absolute value.
DSP_FUNC_SCOPE void zdsp_abs_q31(const DSP_DATA q31_t *src, DSP_DATA q31_t *dst, uint32_t block_size)
Q31 vector absolute value.
DSP_FUNC_SCOPE void zdsp_abs_q7(const DSP_DATA q7_t *src, DSP_DATA q7_t *dst, uint32_t block_size)
Q7 vector absolute value.
DSP_FUNC_SCOPE void zdsp_add_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b, DSP_DATA float32_t *dst, uint32_t block_size)
Floating-point vector addition.
DSP_FUNC_SCOPE void zdsp_add_q7(const DSP_DATA q7_t *src_a, const DSP_DATA q7_t *src_b, DSP_DATA q7_t *dst, uint32_t block_size)
Q7 vector addition.
DSP_FUNC_SCOPE void zdsp_add_q15(const DSP_DATA q15_t *src_a, const DSP_DATA q15_t *src_b, DSP_DATA q15_t *dst, uint32_t block_size)
Q15 vector addition.
DSP_FUNC_SCOPE void zdsp_add_q31(const DSP_DATA q31_t *src_a, const DSP_DATA q31_t *src_b, DSP_DATA q31_t *dst, uint32_t block_size)
Q31 vector addition.
DSP_FUNC_SCOPE void zdsp_and_u8(const DSP_DATA uint8_t *src_a, const DSP_DATA uint8_t *src_b, DSP_DATA uint8_t *dst, uint32_t block_size)
Compute the logical bitwise AND of two fixed-point vectors.
DSP_FUNC_SCOPE void zdsp_and_u16(const DSP_DATA uint16_t *src_a, const DSP_DATA uint16_t *src_b, DSP_DATA uint16_t *dst, uint32_t block_size)
Compute the logical bitwise AND of two fixed-point vectors.
DSP_FUNC_SCOPE void zdsp_and_u32(const DSP_DATA uint32_t *src_a, const DSP_DATA uint32_t *src_b, DSP_DATA uint32_t *dst, uint32_t block_size)
Compute the logical bitwise AND of two fixed-point vectors.
DSP_FUNC_SCOPE void zdsp_clip_f32(const DSP_DATA float32_t *src, DSP_DATA float32_t *dst, float32_t low, float32_t high, uint32_t num_samples)
Elementwise floating-point clipping.
DSP_FUNC_SCOPE void zdsp_clip_q7(const DSP_DATA q7_t *src, DSP_DATA q7_t *dst, q7_t low, q7_t high, uint32_t num_samples)
Elementwise fixed-point clipping.
DSP_FUNC_SCOPE void zdsp_clip_q15(const DSP_DATA q15_t *src, DSP_DATA q15_t *dst, q15_t low, q15_t high, uint32_t num_samples)
Elementwise fixed-point clipping.
DSP_FUNC_SCOPE void zdsp_clip_q31(const DSP_DATA q31_t *src, DSP_DATA q31_t *dst, q31_t low, q31_t high, uint32_t num_samples)
Elementwise fixed-point clipping.
DSP_FUNC_SCOPE void zdsp_dot_prod_q31(const DSP_DATA q31_t *src_a, const DSP_DATA q31_t *src_b, uint32_t block_size, DSP_DATA q63_t *result)
Dot product of Q31 vectors.
DSP_FUNC_SCOPE void zdsp_dot_prod_q15(const DSP_DATA q15_t *src_a, const DSP_DATA q15_t *src_b, uint32_t block_size, DSP_DATA q63_t *result)
Dot product of Q15 vectors.
DSP_FUNC_SCOPE void zdsp_dot_prod_q7(const DSP_DATA q7_t *src_a, const DSP_DATA q7_t *src_b, uint32_t block_size, DSP_DATA q31_t *result)
Dot product of Q7 vectors.
DSP_FUNC_SCOPE void zdsp_dot_prod_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b, uint32_t block_size, DSP_DATA float32_t *result)
Dot product of floating-point vectors.
DSP_FUNC_SCOPE void zdsp_mult_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b, DSP_DATA float32_t *dst, uint32_t block_size)
Floating-point vector multiplication.
DSP_FUNC_SCOPE void zdsp_mult_q15(const DSP_DATA q15_t *src_a, const DSP_DATA q15_t *src_b, DSP_DATA q15_t *dst, uint32_t block_size)
Q15 vector multiplication.
DSP_FUNC_SCOPE void zdsp_mult_q31(const DSP_DATA q31_t *src_a, const DSP_DATA q31_t *src_b, DSP_DATA q31_t *dst, uint32_t block_size)
Q31 vector multiplication.
DSP_FUNC_SCOPE void zdsp_mult_q7(const DSP_DATA q7_t *src_a, const DSP_DATA q7_t *src_b, DSP_DATA q7_t *dst, uint32_t block_size)
Q7 vector multiplication.
DSP_FUNC_SCOPE void zdsp_negate_f32(const DSP_DATA float32_t *src, DSP_DATA float32_t *dst, uint32_t block_size)
Negates the elements of a floating-point vector.
DSP_FUNC_SCOPE void zdsp_negate_q7(const DSP_DATA q7_t *src, DSP_DATA q7_t *dst, uint32_t block_size)
Negates the elements of a Q7 vector.
DSP_FUNC_SCOPE void zdsp_negate_q15(const DSP_DATA q15_t *src, DSP_DATA q15_t *dst, uint32_t block_size)
Negates the elements of a Q15 vector.
DSP_FUNC_SCOPE void zdsp_negate_q31(const DSP_DATA q31_t *src, DSP_DATA q31_t *dst, uint32_t block_size)
Negates the elements of a Q31 vector.
DSP_FUNC_SCOPE void zdsp_not_u16(const DSP_DATA uint16_t *src, DSP_DATA uint16_t *dst, uint32_t block_size)
Compute the logical bitwise NOT of a fixed-point vector.
DSP_FUNC_SCOPE void zdsp_not_u32(const DSP_DATA uint32_t *src, DSP_DATA uint32_t *dst, uint32_t block_size)
Compute the logical bitwise NOT of a fixed-point vector.
DSP_FUNC_SCOPE void zdsp_not_u8(const DSP_DATA uint8_t *src, DSP_DATA uint8_t *dst, uint32_t block_size)
Compute the logical bitwise NOT of a fixed-point vector.
DSP_FUNC_SCOPE void zdsp_offset_q31(const DSP_DATA q31_t *src, q31_t offset, DSP_DATA q31_t *dst, uint32_t block_size)
Adds a constant offset to a Q31 vector.
DSP_FUNC_SCOPE void zdsp_offset_f32(const DSP_DATA float32_t *src, float32_t offset, DSP_DATA float32_t *dst, uint32_t block_size)
Adds a constant offset to a floating-point vector.
DSP_FUNC_SCOPE void zdsp_offset_q15(const DSP_DATA q15_t *src, q15_t offset, DSP_DATA q15_t *dst, uint32_t block_size)
Adds a constant offset to a Q15 vector.
DSP_FUNC_SCOPE void zdsp_offset_q7(const DSP_DATA q7_t *src, q7_t offset, DSP_DATA q7_t *dst, uint32_t block_size)
Adds a constant offset to a Q7 vector.
DSP_FUNC_SCOPE void zdsp_or_u32(const DSP_DATA uint32_t *src_a, const DSP_DATA uint32_t *src_b, DSP_DATA uint32_t *dst, uint32_t block_size)
Compute the logical bitwise OR of two fixed-point vectors.
DSP_FUNC_SCOPE void zdsp_or_u8(const DSP_DATA uint8_t *src_a, const DSP_DATA uint8_t *src_b, DSP_DATA uint8_t *dst, uint32_t block_size)
Compute the logical bitwise OR of two fixed-point vectors.
DSP_FUNC_SCOPE void zdsp_or_u16(const DSP_DATA uint16_t *src_a, const DSP_DATA uint16_t *src_b, DSP_DATA uint16_t *dst, uint32_t block_size)
Compute the logical bitwise OR of two fixed-point vectors.
DSP_FUNC_SCOPE void zdsp_scale_q31(const DSP_DATA q31_t *src, q31_t scale_fract, int8_t shift, DSP_DATA q31_t *dst, uint32_t block_size)
Multiplies a Q31 vector by a scalar.
DSP_FUNC_SCOPE void zdsp_scale_q7(const DSP_DATA q7_t *src, q7_t scale_fract, int8_t shift, DSP_DATA q7_t *dst, uint32_t block_size)
Multiplies a Q7 vector by a scalar.
DSP_FUNC_SCOPE void zdsp_scale_f32(const DSP_DATA float32_t *src, float32_t scale, DSP_DATA float32_t *dst, uint32_t block_size)
Multiplies a floating-point vector by a scalar.
DSP_FUNC_SCOPE void zdsp_scale_q15(const DSP_DATA q15_t *src, q15_t scale_fract, int8_t shift, DSP_DATA q15_t *dst, uint32_t block_size)
Multiplies a Q15 vector by a scalar.
DSP_FUNC_SCOPE void zdsp_shift_q15(const DSP_DATA q15_t *src, int8_t shift_bits, DSP_DATA q15_t *dst, uint32_t block_size)
Shifts the elements of a Q15 vector a specified number of bits.
DSP_FUNC_SCOPE void zdsp_shift_q31(const DSP_DATA q31_t *src, int8_t shift_bits, DSP_DATA q31_t *dst, uint32_t block_size)
Shifts the elements of a Q31 vector a specified number of bits.
DSP_FUNC_SCOPE void zdsp_shift_q7(const DSP_DATA q7_t *src, int8_t shift_bits, DSP_DATA q7_t *dst, uint32_t block_size)
Shifts the elements of a Q7 vector a specified number of bits.
DSP_FUNC_SCOPE void zdsp_sub_q15(const DSP_DATA q15_t *src_a, const DSP_DATA q15_t *src_b, DSP_DATA q15_t *dst, uint32_t block_size)
Q15 vector subtraction.
DSP_FUNC_SCOPE void zdsp_sub_q7(const DSP_DATA q7_t *src_a, const DSP_DATA q7_t *src_b, DSP_DATA q7_t *dst, uint32_t block_size)
Q7 vector subtraction.
DSP_FUNC_SCOPE void zdsp_sub_q31(const DSP_DATA q31_t *src_a, const DSP_DATA q31_t *src_b, DSP_DATA q31_t *dst, uint32_t block_size)
Q31 vector subtraction.
DSP_FUNC_SCOPE void zdsp_sub_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b, DSP_DATA float32_t *dst, uint32_t block_size)
Floating-point vector subtraction.
DSP_FUNC_SCOPE void zdsp_xor_u32(const DSP_DATA uint32_t *src_a, const DSP_DATA uint32_t *src_b, DSP_DATA uint32_t *dst, uint32_t block_size)
Compute the logical bitwise XOR of two fixed-point vectors.
DSP_FUNC_SCOPE void zdsp_xor_u16(const DSP_DATA uint16_t *src_a, const DSP_DATA uint16_t *src_b, DSP_DATA uint16_t *dst, uint32_t block_size)
Compute the logical bitwise XOR of two fixed-point vectors.
DSP_FUNC_SCOPE void zdsp_xor_u8(const DSP_DATA uint8_t *src_a, const DSP_DATA uint8_t *src_b, DSP_DATA uint8_t *dst, uint32_t block_size)
Compute the logical bitwise XOR of two fixed-point vectors.
float float32_t
32-bit floating-point type definition.
Definition types.h:55
int16_t q15_t
16-bit fractional data type in 1.15 format.
Definition types.h:29
int64_t q63_t
64-bit fractional data type in 1.63 format.
Definition types.h:41
int8_t q7_t
8-bit fractional data type in 1.7 format.
Definition types.h:23
int32_t q31_t
32-bit fractional data type in 1.31 format.
Definition types.h:35
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT8_TYPE__ int8_t
Definition stdint.h:72