Functions | |
| static float32_t | hpm_dsp_max_f32 (const float32_t *src, uint32_t size, uint32_t *index) |
| Maximum value of the floating-potint vector. More... | |
| static float32_t | hpm_dsp_max_val_f32 (const float32_t *src, uint32_t size) |
| static q15_t | hpm_dsp_max_q15 (const q15_t *src, uint32_t size, uint32_t *index) |
| Maximum value of the q15 vector. More... | |
| static q31_t | hpm_dsp_max_q31 (const q31_t *src, uint32_t size, uint32_t *index) |
| Maximum value of the q31 vector. More... | |
| static q7_t | hpm_dsp_max_q7 (const q7_t *src, uint32_t size, uint32_t *index) |
| Maximum value of the q7 vector. More... | |
| static uint8_t | hpm_dsp_max_u8 (const uint8_t *src, uint32_t size, uint32_t *index) |
| Max value of the u8 vector. More... | |
| static float32_t | hpm_dsp_min_f32 (const float32_t *src, uint32_t size, uint32_t *index) |
| Minimum value of the floating-potint vector. More... | |
| static q15_t | hpm_dsp_min_q15 (const q15_t *src, uint32_t size, uint32_t *index) |
| Minimum value of the q15 vector. More... | |
| static q31_t | hpm_dsp_min_q31 (const q31_t *src, uint32_t size, uint32_t *index) |
| Minimum value of the q31 vector. More... | |
| static q7_t | hpm_dsp_min_q7 (const q7_t *src, uint32_t size, uint32_t *index) |
| Minimum value of the q7 vector. More... | |
| static uint8_t | hpm_dsp_min_u8 (const uint8_t *src, uint32_t size, uint32_t *index) |
| Minimum value of the u8 vector. More... | |
| static float32_t | hpm_dsp_mean_f32 (const float32_t *src, uint32_t size) |
| Mean value of the floating-potint vector. More... | |
| static q15_t | hpm_dsp_mean_q15 (const q15_t *src, uint32_t size) |
| Mean value of the q15 vector. More... | |
| static q31_t | hpm_dsp_mean_q31 (const q31_t *src, uint32_t size) |
| Mean value of the q31 vector. More... | |
| static q7_t | hpm_dsp_mean_q7 (const q7_t *src, uint32_t size) |
| Mean value of the q7 vector. More... | |
| static uint8_t | hpm_dsp_mean_u8 (const uint8_t *src, uint32_t size) |
| Mean value of the u8 vector. More... | |
| static float32_t | hpm_dsp_pwr_f32 (const float32_t *src, uint32_t size) |
| Sum of the squares of the floating-potint vector. More... | |
| static q63_t | hpm_dsp_pwr_q15 (const q15_t *src, uint32_t size) |
| Sum of the squares of the q15 vector. More... | |
| static q63_t | hpm_dsp_pwr_q31 (const q31_t *src, uint32_t size) |
| Sum of the squares of the q31 vector. More... | |
| static q31_t | hpm_dsp_pwr_q7 (const q7_t *src, uint32_t size) |
| Sum of the squares of the q7 vector. More... | |
| static float32_t | hpm_dsp_rms_f32 (const float32_t *src, uint32_t size) |
| RMS of the floating-potint vector. More... | |
| static q15_t | hpm_dsp_rms_q15 (const q15_t *src, uint32_t size) |
| RMS of the q15 vector. More... | |
| static q31_t | hpm_dsp_rms_q31 (const q31_t *src, uint32_t size) |
| RMS of the q31 vector. More... | |
| static float32_t | hpm_dsp_std_f32 (const float32_t *src, uint32_t size) |
| Standard deviation of the floating-potint vector. More... | |
| static q15_t | hpm_dsp_std_q15 (const q15_t *src, uint32_t size) |
| Standard deviation of the q15 vector. More... | |
| static q31_t | hpm_dsp_std_q31 (const q31_t *src, uint32_t size) |
| Standard deviation of the q31 vector. More... | |
| static q15_t | hpm_dsp_std_u8 (const uint8_t *src, uint32_t size) |
| Standard deviation of the u8 vector. More... | |
| static float32_t | hpm_dsp_var_f32 (const float32_t *src, uint32_t size) |
| Variance of the floating-potint vector. More... | |
| static q31_t | hpm_dsp_var_q15 (const q15_t *src, uint32_t size) |
| Variance of the q15 vector. More... | |
| static q63_t | hpm_dsp_var_q31 (const q31_t *src, uint32_t size) |
| Variance of the q31 vector. More... | |
| static float32_t | hpm_dsp_entropy_f32 (const float32_t *src, uint32_t size) |
| Entropy of the floating-potint vector. More... | |
| static float32_t | hpm_dsp_relative_entropy_f32 (const float32_t *src1, const float32_t *src2, uint32_t size) |
| Relative Entropy of the floating-potint vector. More... | |
| static float32_t | hpm_dsp_lse_f32 (const float32_t *src, uint32_t size) |
| Log-Sum-Exp of the floating-potint vector. More... | |
| static float32_t | hpm_dsp_lse_dprod_f32 (const float32_t *src1, const float32_t *src2, uint32_t size, float32_t *buffer) |
| Dot product with Log-Sum-Exp of the floating-potint vector. More... | |
| static uint32_t | hpm_dsp_gaussian_naive_bayes_est_f32 (const riscv_dsp_gaussian_naivebayes_f32_t *instance, const float32_t *src, float32_t *buf) |
| Naive Gaussian Bayesian Estimator. More... | |
| static float32_t | hpm_dsp_absmax_f32 (const float32_t *src, uint32_t size, uint32_t *index) |
| Maximum absolute value of the floating-potint vector. More... | |
| static q15_t | hpm_dsp_absmax_q15 (const q15_t *src, uint32_t size, uint32_t *index) |
| Maximum absolute value of the q15 vector. More... | |
| static q31_t | hpm_dsp_absmax_q31 (const q31_t *src, uint32_t size, uint32_t *index) |
| Maximum absolute value of the q31 vector. More... | |
| static q7_t | hpm_dsp_absmax_q7 (const q7_t *src, uint32_t size, uint32_t *index) |
| Maximum absolute value of the q7 vector. More... | |
| static float32_t | hpm_dsp_absmin_f32 (const float32_t *src, uint32_t size, uint32_t *index) |
| Minimum absolute value of the floating-potint vector. More... | |
| static q31_t | hpm_dsp_absmin_q31 (const q31_t *src, uint32_t size, uint32_t *index) |
| Minimum absolute value of the q31 vector. More... | |
| static q15_t | hpm_dsp_absmin_q15 (const q15_t *src, uint32_t size, uint32_t *index) |
| Minimum absolute value of the q15 vector. More... | |
| static q7_t | hpm_dsp_absmin_q7 (const q7_t *src, uint32_t size, uint32_t *index) |
| Minimum absolute value of the q7 vector. More... | |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Maximum absolute value of the floating-potint vector.
| [in] | src | pointer of the input vector |
| [in] | size | number of elements in a vector |
| [out] | index | index of the maximum value |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Maximum absolute value of the q15 vector.
| [in] | src | pointer of the input vector |
| [in] | size | number of elements in a vector |
| [out] | index | index of the maximum value |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Maximum absolute value of the q31 vector.
| [in] | src | pointer of the input vector |
| [in] | size | number of elements in a vector |
| [out] | index | index of the maximum value |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Maximum absolute value of the q7 vector.
| [in] | src | pointer of the input vector |
| [in] | size | number of elements in a vector |
| [out] | index | index of the maximum value |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Minimum absolute value of the floating-potint vector.
| [in] | src | pointer of the input vector |
| [in] | size | number of elements in a vector |
| [out] | index | index of the maximum value |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Minimum absolute value of the q15 vector.
| [in] | src | pointer of the input vector |
| [in] | size | number of elements in a vector |
| [out] | index | index of the maximum value |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Minimum absolute value of the q31 vector.
| [in] | src | pointer of the input vector |
| [in] | size | number of elements in a vector |
| [out] | index | index of the maximum value |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Minimum absolute value of the q7 vector.
| [in] | src | pointer of the input vector |
| [in] | size | number of elements in a vector |
| [out] | index | index of the maximum value |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Entropy of the floating-potint vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
E = -sum (P .* log2 (P))
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Naive Gaussian Bayesian Estimator.
| [in] | *instance | points to a naive bayes instance |
| [in] | *src | points to the elements of the input vector. |
| [in] | *buf | points to a buffer of length numofclass /numberOfClasses |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Dot product with Log-Sum-Exp of the floating-potint vector.
| [in] | *src1 | points to the first input vector. |
| [in] | *src2 | points to the second input vector. |
| [in] | size | size of the vectors. |
| [in] | *buffer | points to temporary buffer. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Log-Sum-Exp of the floating-potint vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Maximum value of the floating-potint vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the maximum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Maximum value of the q15 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the maximum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Maximum value of the q31 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the maximum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Maximum value of the q7 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the maximum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Max value of the u8 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the maximum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Mean value of the floating-potint vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Mean value of the q15 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.15 format input is accumulated in a 32-bit accumulator in 17.15 format and then truncated to yield a result of 1.15 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Mean value of the q31 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.31 format input is accumulated in a 64-bit accumulator in 33.31 format and then truncated to yield a result of 1.31 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Mean value of the q7 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.7 format input is accumulated in a 32-bit accumulator in 25.7 format and then truncated to yield a result of 1.7 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Mean value of the u8 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
The 8-bit format input is accumulated in a 32-bit accumulator and then truncated to yield a result of 8-bit format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Minimum value of the floating-potint vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the minimum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Minimum value of the q15 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the minimum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Minimum value of the q31 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the minimum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Minimum value of the q7 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the minimum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Minimum value of the u8 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
| [out] | *index | index of the minimum value. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Sum of the squares of the floating-potint vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Sum of the squares of the q15 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.15 format input is multiplied yields a 2.30 format, and then added without saturation to a 64-bit accumulator in 34.30 format. Finally, the return result is in 34.30 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Sum of the squares of the q31 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.31 format input is multiplied yields a 2.62 format and this result is truncated to 2.48 format by discarding the lower 14 bits. The 2.48 result is then added without saturation to a 64-bit accumulator in 16.48 format. Finally, the return result is in 16.48 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Sum of the squares of the q7 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.7 format input is multiplied yields a 2.14 format, and then added without saturation to a 32-bit accumulator in 18.14 format. Finally, the return result is in 18.14 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Relative Entropy of the floating-potint vector.
| [in] | *src1 | points to the first input vector. |
| [in] | *src2 | points to the second input vector. |
| [in] | size | size of the vectors. |
Relative Entropy also called KullbackLeibler divergence: D(A || B) = A * ln(A / B);
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
RMS of the floating-potint vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
RMS of the q15 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.15 format input is multiplied yields a 2.30 format, and then added without saturation to a 64-bit accumulator in 34.30 format. Finally, the added output is truncated to 34.15 format by discarding the lower 15 bits, and then saturated to yield a result in 1.15 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
RMS of the q31 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.31 format input is multiplied yields a 2.62 format. In order to avoid overflows, the input signal must be scaled down by log2(size) bits, Finally, the 2.62 accumulator is right shifted by 31 bits to yield a 1.31 format value.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Standard deviation of the floating-potint vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Standard deviation of the q15 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.15 format input is multiplied yields a 2.30 format, and then added without saturation to a 64-bit accumulator in 34.30 format. Finally, the added output is truncated to 34.15 format by discarding the lower 15 bits, and then saturated to yield a result in 1.15 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Standard deviation of the q31 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.31 format input is multiplied yields a 2.62 format. In order to avoid overflows, the input signal must be scaled down by log2(size) bits, Finally, the 2.62 accumulator is right shifted by 31 bits to yield a 1.31 format value.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Standard deviation of the u8 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes: The 8-bit format input is multiplied yields a 16-bit format, and then added saturation to a 32-bit accumulator in 16.16 format. Finally, the added output is truncated to 34.15 format by discarding the lower 1 bits, and then saturated to yield a result in 1.15 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Variance of the floating-potint vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Variance of the q15 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.15 format input is multiplied yields a 2.30 format, and then added without saturation to a 64-bit accumulator in 34.30 format. Finally, the added output is truncated to 34.15 format by discarding the lower 15 bits, and then saturated to yield a result in 1.15 format.
|
inlinestatic |
#include <middleware/hpm_math/hpm_math.h>
Variance of the q31 vector.
| [in] | *src | points to the input vector. |
| [in] | size | size of the vectors. |
Function notes:
The 1.31 format input is multiplied yields a 2.62 format. In order to avoid overflows, the input signal must be scaled down by log2(size) bits, Finally, the 2.62 accumulator is right shifted by 31 bits to yield a 1.31 format value.