|
Zephyr API Documentation 4.3.0-rc1
A Scalable Open Source RTOS
|
Computes the dot product of two vectors. More...
Functions | |
| 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_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_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_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. | |
| void | zdsp_dot_prod_f16 (const float16_t *src_a, const float16_t *src_b, uint32_t block_size, float16_t *result) |
| Dot product of floating-point vectors. | |
Computes the dot product of two vectors.
The vectors are multiplied element-by-element and then summed.
sum = src_a[0]*src_b[0] + src_a[1]*src_b[1] + ... + src_a[block_size-1]*src_b[block_size-1]
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
| void zdsp_dot_prod_f16 | ( | const float16_t * | src_a, |
| const float16_t * | src_b, | ||
| uint32_t | block_size, | ||
| float16_t * | result ) |
#include <zephyr/dsp/basicmath_f16.h>
Dot product of floating-point vectors.
| [in] | src_a | points to the first input vector |
| [in] | src_b | points to the second input vector |
| [in] | block_size | number of samples in each vector |
| [out] | result | output result returned here |
| 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 ) |
#include <zephyr/dsp/basicmath.h>
Dot product of floating-point vectors.
| [in] | src_a | points to the first input vector |
| [in] | src_b | points to the second input vector |
| [in] | block_size | number of samples in each vector |
| [out] | result | output result returned here |
| 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 ) |
#include <zephyr/dsp/basicmath.h>
Dot product of Q15 vectors.
| [in] | src_a | points to the first input vector |
| [in] | src_b | points to the second input vector |
| [in] | block_size | number of samples in each vector |
| [out] | result | output result returned here |
| 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 ) |
#include <zephyr/dsp/basicmath.h>
Dot product of Q31 vectors.
| [in] | src_a | points to the first input vector |
| [in] | src_b | points to the second input vector |
| [in] | block_size | number of samples in each vector |
| [out] | result | output result returned here |
| 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 ) |
#include <zephyr/dsp/basicmath.h>
Dot product of Q7 vectors.
| [in] | src_a | points to the first input vector |
| [in] | src_b | points to the second input vector |
| [in] | block_size | number of samples in each vector |
| [out] | result | output result returned here |