diff --git a/latest b/latest index 4d9d07e2..2171feba 120000 --- a/latest +++ b/latest @@ -1 +1 @@ -v1.16.0 \ No newline at end of file +v1.16.1 \ No newline at end of file diff --git a/v1.16.1/Biquad.gif b/v1.16.1/Biquad.gif new file mode 100644 index 00000000..d6c51705 Binary files /dev/null and b/v1.16.1/Biquad.gif differ diff --git a/v1.16.1/BiquadCascade.gif b/v1.16.1/BiquadCascade.gif new file mode 100644 index 00000000..6a229796 Binary files /dev/null and b/v1.16.1/BiquadCascade.gif differ diff --git a/v1.16.1/BiquadDF2Transposed.gif b/v1.16.1/BiquadDF2Transposed.gif new file mode 100644 index 00000000..266781b4 Binary files /dev/null and b/v1.16.1/BiquadDF2Transposed.gif differ diff --git a/v1.16.1/BiquadPostshift.gif b/v1.16.1/BiquadPostshift.gif new file mode 100644 index 00000000..f177f0cd Binary files /dev/null and b/v1.16.1/BiquadPostshift.gif differ diff --git a/v1.16.1/Convolution.gif b/v1.16.1/Convolution.gif new file mode 100644 index 00000000..31f27d17 Binary files /dev/null and b/v1.16.1/Convolution.gif differ diff --git a/v1.16.1/DCT4.gif b/v1.16.1/DCT4.gif new file mode 100644 index 00000000..0960fadc Binary files /dev/null and b/v1.16.1/DCT4.gif differ diff --git a/v1.16.1/DSP_2basic_8hpp.html b/v1.16.1/DSP_2basic_8hpp.html new file mode 100644 index 00000000..424ec622 --- /dev/null +++ b/v1.16.1/DSP_2basic_8hpp.html @@ -0,0 +1,150 @@ + + + +
+ + + ++Data Structures | |
struct | Q15DSPVector |
Representation of a vector when DSP extension supported. More... | |
struct | vector_traits< Q15, DSP, typename std::enable_if< true >::type > |
Vector description for Q15 with DSP extensions. More... | |
+Namespaces | |
namespace | inner |
+Functions | |
Q15DSPVector | vconst (Q15 val) |
Vector const. | |
Q< 33, 30 > | vreduce (const Q< 33, 30 > sum) |
Reduce accumulation value. | |
+Namespaces | |
namespace | inner |
+Functions | |
template<typename T , typename DST , typename std::enable_if< has_vector_inst< DST >() &&IsVector< DST >::value &&SameElementType< DST, T >::value, bool >::type = true> | |
void | _Fill (DST &v, const T val, const vector_length_t l, const Helium *=nullptr) |
Fill evaluator for Helium. | |
template<typename T , typename DST , typename std::enable_if< has_vector_inst< DST >() &&must_use_matrix_idx< DST >() &&SameElementType< DST, T >::value, bool >::type = true> | |
void | _Fill2D (DST &v, const T val, const vector_length_t rows, const vector_length_t cols, const Helium *=nullptr) |
Fill2D evaluator for Helium. | |
template<typename DA , typename DB , typename std::enable_if< has_vector_inst< DA >() &&vector_idx_pair< DA, DB >(), bool >::type = true> | |
void | eval (DA &v, const DB &other, const vector_length_t l, const Helium *=nullptr) |
Eval function for Helium. | |
template<typename DA , typename DB , typename std::enable_if< has_vector_inst< DA >() &&must_use_matrix_idx_pair< DA, DB >(), bool >::type = true> | |
void | eval2D (DA &v, const DB &other, const vector_length_t rows, const vector_length_t cols, const Helium *=nullptr) |
Eval2D function for Helium. | |
template<class TupType , size_t... I> | |
void | printt (const TupType &_tup, std::index_sequence< I... >) |
Print tuple for debug. | |
template<class... T> | |
void | printt (const std::tuple< T... > &_tup) |
Print tuple. | |
template<typename DA , typename DB , typename std::enable_if< has_vector_inst< DA >() &&vector_idx_pair< DA, DB >(), bool >::type = true> | |
DotResult< DA > | _dot (const DA &a, const DB &b, const vector_length_t l, const Helium *=nullptr) |
Dor product for Helium. | |
template<typename DA , typename DB , typename std::enable_if< has_vector_inst< DA >() &&vector_idx_pair< DA, DB >(), bool >::type = true> | |
void | _swap (DA &&a, DB &&b, const vector_length_t l, const Helium *=nullptr) |
Swap operator for Helium. | |
+Data Structures | |
struct | vector_traits< float, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > |
Vector datatype for Helium. More... | |
struct | vctpq< float > |
vctpq for this datatype More... | |
struct | vload1_gen_stride< S > |
Load with generalized stride (gather load) More... | |
struct | vload1_gen_stride< 0, 1, 2, 3 > |
Load with generalized stride specialized for <0,1,2,3> More... | |
struct | vload1_gen_stride_z< S > |
Load with generalized stride (gather load) and tail predicate. More... | |
struct | vload1_gen_stride_z< 0, 1, 2, 3 > |
Load with generalized stride (gather load) and tail predicate specialized for <0,1,2,3> More... | |
struct | vstore1_gen_stride< S > |
Generalized store with strides. More... | |
struct | vstore1_gen_stride< 0, 1, 2, 3 > |
Generalized store with stride (Specialized for <0,1,2,3>) More... | |
struct | vstore1_gen_stride_z< S > |
Store with generalized strides and tail predicate. More... | |
struct | vstore1_gen_stride_z< 0, 1, 2, 3 > |
Scatter store with tail predicate (specialized for <0,1,2,3>) More... | |
+Namespaces | |
namespace | inner |
+Functions | |
float32x4_t | vconst (const float v) |
Vector constant. | |
float32x4_t | vconst_tail (const float v, const mve_pred16_t p0) |
Vector constant with tail. | |
float32x4_t | vneg (const float32x4_t a) |
Vector negate. | |
float32x4_t | vneg (const float32x4_t a, const mve_pred16_t p0) |
Vector negate with tail. | |
float32x4_t | vadd (const float32x4_t a, const float32x4_t b) |
Vector + Vector. | |
float32x4_t | vadd (const float32x4_t a, const float b) |
Vector + Scalar. | |
float32x4_t | vadd (const float a, const float32x4_t b) |
Scalar + Vector. | |
float32x4_t | vadd (const float32x4_t a, const float32x4_t b, const mve_pred16_t p0) |
Vector + Vector with tail. | |
float32x4_t | vadd (const float32x4_t a, const float b, const mve_pred16_t p0) |
Vector + scalar with tail. | |
float32x4_t | vadd (const float a, const float32x4_t b, const mve_pred16_t p0) |
Scalar + vector with tail predicate. | |
float32x4_t | vsub (const float32x4_t a, const float32x4_t b) |
Vector - Vector. | |
float32x4_t | vsub (const float32x4_t a, const float b) |
Vector - Scalar. | |
float32x4_t | vsub (const float a, const float32x4_t b) |
Scalar - Vector. | |
float32x4_t | vsub (const float32x4_t a, const float32x4_t b, const mve_pred16_t p0) |
Vector - Vector with predicate. | |
float32x4_t | vsub (const float32x4_t a, const float b, const mve_pred16_t p0) |
Vector - Scalar with predicate. | |
float32x4_t | vsub (const float a, const float32x4_t b, const mve_pred16_t p0) |
Scalar - Vector with predicate. | |
float32x4_t | vmul (const float32x4_t a, const float32x4_t b) |
Vector * Vector. | |
float32x4_t | vmul (const float32x4_t a, const float b) |
Vector * Scalar. | |
float32x4_t | vmul (const float a, const float32x4_t b) |
Scalar * Vector. | |
float32x4_t | vmul (const float32x4_t a, const float32x4_t b, const mve_pred16_t p0) |
Vector * Vector with predicate. | |
float32x4_t | vmul (const float32x4_t a, const float b, const mve_pred16_t p0) |
Vector * Scalar with predicate. | |
float32x4_t | vmul (const float a, const float32x4_t b, const mve_pred16_t p0) |
Scalar * Vector with predicate. | |
float32x4_t | vmacc (const float32x4_t acc, const float32x4_t a, const float32x4_t b) |
Multiply accumulate (Vector * Vector) | |
float32x4_t | vmacc (const float32x4_t acc, const float32x4_t a, const float_t b) |
Multiply accumulate (Vector * Scalar) | |
float32x4_t | vmacc (const float32x4_t acc, const float32x4_t a, const float32x4_t b, const mve_pred16_t p0) |
Multiply accumulate with predicate (Vector * Vector) | |
float | vreduce (const float32x4_t in) |
Vector reduce. | |
template<int S, typename std::enable_if< S==1, bool >::type = true> | |
float32x4_t | vload1 (const float32_t *p) |
Vector load with stride. | |
float32x4_t | vload1 (const float32_t *p, const index_t stride) |
Vector load with dynamic stride. | |
template<int S, typename std::enable_if< S==1, bool >::type = true> | |
float32x4_t | vload1_z (const float32_t *p, const std::size_t nb, const mve_pred16_t p0) |
Vector load with stride and predicate. | |
float32x4_t | vload1_z (const float32_t *p, const index_t stride, const std::size_t nb, const mve_pred16_t p0) |
Vector load with dynamic stride and loop predication. | |
template<int S, typename std::enable_if< S==1, bool >::type = true> | |
void | vstore1 (float32_t *p, const float32x4_t val) |
Store with stride. | |
void | vstore1 (float32_t *p, const index_t stride, const float32x4_t val) |
Store with dynamic stride. | |
template<int S, typename std::enable_if< S==1, bool >::type = true> | |
void | vstore1_z (float32_t *p, const float32x4_t val, const std::size_t nb, const mve_pred16_t p0) |
Store with stride and tail predicate. | |
void | vstore1_z (float32_t *p, const index_t stride, const float32x4_t val, const std::size_t nb, const mve_pred16_t p0) |
Store with dynamic stride. | |
+Data Structures | |
struct | vector_traits< float16_t, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > |
Vector features for f16 on Helium. More... | |
struct | vctpq< float16_t > |
vctpq for Helium and f16 More... | |
+Namespaces | |
namespace | inner |
+Functions | |
float16x8_t | vconst (float16_t v) |
Vector const. | |
float16x8_t | vconst_tail (const float16_t v, const mve_pred16_t p0) |
Vector of const with tail predicate. | |
float16x8_t | vneg (const float16x8_t a) |
Vector negate. | |
float16x8_t | vneg (const float16x8_t a, const mve_pred16_t p0) |
Vector negate with tail predicate. | |
float16x8_t | vadd (const float16x8_t a, const float16x8_t b) |
Vector + Vector. | |
float16x8_t | vadd (const float16x8_t a, const float16_t b) |
Vector + Scalar. | |
float16x8_t | vadd (const float16_t a, const float16x8_t b) |
Scalar + Vector. | |
float16x8_t | vadd (const float16x8_t a, const float16x8_t b, const mve_pred16_t p0) |
Vector + Vector with tail predicate. | |
float16x8_t | vadd (const float16x8_t a, const float16_t b, const mve_pred16_t p0) |
Vector + Scalar with tail predicate. | |
float16x8_t | vadd (const float16_t a, const float16x8_t b, const mve_pred16_t p0) |
Scalar + Vector with tail predicate. | |
#include "matrix_multiply_fixed.hpp"
#include "matrix_multiply_f16.hpp"
#include "matrix_multiply_f32.hpp"
+Data Structures | |
struct | vector_traits< Q15, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > |
Vector features for Q15 on Helium. More... | |
+Namespaces | |
namespace | inner |
+Functions | |
Q15DSPVector | vconst (Q15 val) |
Vector const. | |
template<int S, typename std::enable_if< S==1, bool >::type = true> | |
int16x8_t | vload1 (const Q15 *p) |
Vector load with stride. | |
Q< 33, 30 > | vmacc (const Q< 33, 30 > sum, const int16x8_t vala, const int16x8_t valb) |
Vector accumulate into scalar. | |
Q< 33, 30 > | vreduce (const Q< 33, 30 > sum) |
Reduce accumulation value. | |
+Namespaces | |
namespace | inner |
+Namespaces | |
namespace | inner |
+Functions | |
template<typename T , typename DST , typename std::enable_if< IsVector< DST >::value &&SameElementType< DST, T >::value, bool >::type = true> | |
void | _Fill (DST &v, const T val, vector_length_t l, const Scalar *=nullptr) |
Fill evaluator for scalar architecture. | |
template<typename T , typename DST , typename std::enable_if< must_use_matrix_idx< DST >() &&SameElementType< DST, T >::value, bool >::type = true> | |
void | _Fill2D (DST &v, const T val, const vector_length_t rows, const vector_length_t cols, const Scalar *=nullptr) |
Fill2D evaluator for scalar architecture. | |
template<typename DA , typename DB , typename std::enable_if< vector_idx_pair< DA, DB >(), bool >::type = true> | |
void | eval (DA &v, const DB &other, const vector_length_t l, const Scalar *=nullptr) |
Expression evaluator for vector in scalar mode. | |
template<typename DA , typename DB , typename std::enable_if< must_use_matrix_idx_pair< DA, DB >(), bool >::type = true> | |
void | eval2D (DA &v, const DB &other, const vector_length_t rows, const vector_length_t cols, const Scalar *=nullptr) |
2D expression evaluator for scalar archiecture | |
template<typename DA , typename DB , typename std::enable_if< vector_idx_pair< DA, DB >(), bool >::type = true> | |
DotResult< DA > | _dot (const DA &a, const DB &b, const vector_length_t l, const Scalar *=nullptr) |
Dot product evaluator for scalar architectuire. | |
template<typename DA , typename DB , typename std::enable_if< vector_idx_pair< DA, DB >(), bool >::type = true> | |
void | _swap (DA &&a, DB &&b, const vector_length_t l, const Scalar *=nullptr) |
Swap evaluator for scalar architecture. | |
+Functions | |
template<typename MA , typename MB > | |
__STATIC_INLINE void | _arm_mat_trans (const MA &src, MB &dst, const Scalar *=nullptr) |
Transposition for scalar architecture. | |
template<typename M , typename V , typename RES > | |
void | _dot_m_v (RES &res, const M &m, const V &v, const Scalar *=nullptr) |
Matrix times vector for scalar architecture. | |
+Functions | |
template<typename MA , typename MB , typename RES , typename TMP , typename std::enable_if< number_traits< typename traits< MA >::Scalar >::is_fixed, bool >::type = true> | |
__STATIC_INLINE void | _dot_m_m (const MA &pSrcA, const MB &pSrcB, RES &&pDst, const TMP &BT, const Scalar *=nullptr) |
Matrix times matrix for scalar architecture and fixed point. | |
+Namespaces | |
namespace | arm_cmsis_dsp |
+Functions | |
template<typename MA , typename MB , typename std::enable_if< HasMatrixIndexing< MA >::value &&HasMatrixIndexing< MB >::value, bool >::type = true> | |
void | transposeTo (MA &dst, const MB &src) |
Transpose a matrix. | |
template<typename M , typename V , typename std::enable_if< CompatibleStaticMatVecProduct< M, V >::value, bool >::type = true> | |
OutputVector< M, V >::type | dot (const M &m, const V &v) |
Matrix x Vector product. | |
template<typename MA , typename MB , typename std::enable_if< CompatibleStaticMatMatProduct< MA, MB >::value &&number_traits< typename traits< MA >::Scalar >::is_fixed, bool >::type = true> | |
OutputMatrix< MA, MB >::type | dot (const MA &ma, const MB &mb) |
Matrix x Matrix product. | |
template<typename MA , typename MB , typename RES , typename std::enable_if< CompatibleDynamicMatMatProduct< MA, MB >::value &&number_traits< typename traits< MA >::Scalar >::is_float, bool >::type = true> | |
void | dot (RES &&res, const MA &ma, const MB &mb) |
Matrix x Matrix product. | |
template<typename P > | |
Matrix< P, DYNAMIC, DYNAMIC, TMP_ALLOC > | mk_identity (const vector_length_t l) |
Create identity matrix. | |
template<typename P , int L> | |
Matrix< P, L, L, TMP_ALLOC > | mk_identity () |
Create identity matrix. | |
►Narm_cmsis_dsp | |
►Ninner | |
C_AddOp | Add operator |
C_BinaryOperator | Unary operator |
C_MulOp | Mul operator |
C_NegOp | Neg operator |
C_NoOp | No operator |
C_SubOp | Sub operator |
C_UnaryOperator | Unary operator |
Carm_bilinear_interp_instance_f16 | Instance structure for the floating-point bilinear interpolation function |
Carm_bilinear_interp_instance_f32 | Instance structure for the floating-point bilinear interpolation function |
Carm_bilinear_interp_instance_q15 | Instance structure for the Q15 bilinear interpolation function |
Carm_bilinear_interp_instance_q31 | Instance structure for the Q31 bilinear interpolation function |
Carm_bilinear_interp_instance_q7 | Instance structure for the Q15 bilinear interpolation function |
Carm_biquad_cas_df1_32x64_ins_q31 | Instance structure for the high precision Q31 Biquad cascade filter |
Carm_biquad_cascade_df2T_instance_f16 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_cascade_df2T_instance_f32 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_cascade_df2T_instance_f64 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_cascade_stereo_df2T_instance_f16 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_cascade_stereo_df2T_instance_f32 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_casd_df1_inst_f16 | Instance structure for the floating-point Biquad cascade filter |
Carm_biquad_casd_df1_inst_f32 | Instance structure for the floating-point Biquad cascade filter |
Carm_biquad_casd_df1_inst_q15 | Instance structure for the Q15 Biquad cascade filter |
Carm_biquad_casd_df1_inst_q31 | Instance structure for the Q31 Biquad cascade filter |
Carm_cfft_instance_f16 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_instance_f32 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_instance_f64 | Instance structure for the Double Precision Floating-point CFFT/CIFFT function |
Carm_cfft_instance_q15 | Instance structure for the fixed-point CFFT/CIFFT function |
Carm_cfft_instance_q31 | Instance structure for the fixed-point CFFT/CIFFT function |
Carm_cfft_radix2_instance_f16 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_radix2_instance_f32 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_radix2_instance_q15 | Instance structure for the Q15 CFFT/CIFFT function |
Carm_cfft_radix2_instance_q31 | Instance structure for the Radix-2 Q31 CFFT/CIFFT function |
Carm_cfft_radix4_instance_f16 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_radix4_instance_f32 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_radix4_instance_q15 | Instance structure for the Q15 CFFT/CIFFT function |
Carm_cfft_radix4_instance_q31 | Instance structure for the Q31 CFFT/CIFFT function |
Carm_dct4_instance_f32 | Instance structure for the floating-point DCT4/IDCT4 function |
Carm_dct4_instance_q15 | Instance structure for the Q15 DCT4/IDCT4 function |
Carm_dct4_instance_q31 | Instance structure for the Q31 DCT4/IDCT4 function |
Carm_fir_decimate_instance_f32 | Instance structure for single precision floating-point FIR decimator |
Carm_fir_decimate_instance_f64 | Instance structure for double precision floating-point FIR decimator |
Carm_fir_decimate_instance_q15 | Instance structure for the Q15 FIR decimator |
Carm_fir_decimate_instance_q31 | Instance structure for the Q31 FIR decimator |
Carm_fir_instance_f16 | Instance structure for the floating-point FIR filter |
Carm_fir_instance_f32 | Instance structure for the floating-point FIR filter |
Carm_fir_instance_f64 | Instance structure for the floating-point FIR filter |
Carm_fir_instance_q15 | Instance structure for the Q15 FIR filter |
Carm_fir_instance_q31 | Instance structure for the Q31 FIR filter |
Carm_fir_instance_q7 | Instance structure for the Q7 FIR filter |
Carm_fir_interpolate_instance_f32 | Instance structure for the floating-point FIR interpolator |
Carm_fir_interpolate_instance_q15 | Instance structure for the Q15 FIR interpolator |
Carm_fir_interpolate_instance_q31 | Instance structure for the Q31 FIR interpolator |
Carm_fir_lattice_instance_f32 | Instance structure for the floating-point FIR lattice filter |
Carm_fir_lattice_instance_q15 | Instance structure for the Q15 FIR lattice filter |
Carm_fir_lattice_instance_q31 | Instance structure for the Q31 FIR lattice filter |
Carm_fir_sparse_instance_f32 | Instance structure for the floating-point sparse FIR filter |
Carm_fir_sparse_instance_q15 | Instance structure for the Q15 sparse FIR filter |
Carm_fir_sparse_instance_q31 | Instance structure for the Q31 sparse FIR filter |
Carm_fir_sparse_instance_q7 | Instance structure for the Q7 sparse FIR filter |
Carm_gaussian_naive_bayes_instance_f16 | Instance structure for Naive Gaussian Bayesian estimator |
Carm_gaussian_naive_bayes_instance_f32 | Instance structure for Naive Gaussian Bayesian estimator |
Carm_iir_lattice_instance_f32 | Instance structure for the floating-point IIR lattice filter |
Carm_iir_lattice_instance_q15 | Instance structure for the Q15 IIR lattice filter |
Carm_iir_lattice_instance_q31 | Instance structure for the Q31 IIR lattice filter |
Carm_linear_interp_instance_f16 | Instance structure for the half floating-point Linear Interpolate function |
Carm_linear_interp_instance_f32 | Instance structure for the floating-point Linear Interpolate function |
Carm_lms_instance_f32 | Instance structure for the floating-point LMS filter |
Carm_lms_instance_q15 | Instance structure for the Q15 LMS filter |
Carm_lms_instance_q31 | Instance structure for the Q31 LMS filter |
Carm_lms_norm_instance_f32 | Instance structure for the floating-point normalized LMS filter |
Carm_lms_norm_instance_q15 | Instance structure for the Q15 normalized LMS filter |
Carm_lms_norm_instance_q31 | Instance structure for the Q31 normalized LMS filter |
Carm_matrix_instance_f16 | Instance structure for the floating-point matrix structure |
Carm_matrix_instance_f32 | Instance structure for the floating-point matrix structure |
Carm_matrix_instance_f64 | Instance structure for the floating-point matrix structure |
Carm_matrix_instance_q15 | Instance structure for the Q15 matrix structure |
Carm_matrix_instance_q31 | Instance structure for the Q31 matrix structure |
Carm_matrix_instance_q7 | Instance structure for the Q7 matrix structure |
Carm_merge_sort_instance_f32 | Instance structure for the sorting algorithms |
Carm_mfcc_instance_f16 | Instance structure for the Floating-point MFCC function |
Carm_mfcc_instance_f32 | Instance structure for the Floating-point MFCC function |
Carm_mfcc_instance_q15 | Instance structure for the Q15 MFCC function |
Carm_mfcc_instance_q31 | Instance structure for the Q31 MFCC function |
Carm_pid_instance_f32 | Instance structure for the floating-point PID Control |
Carm_pid_instance_q15 | Instance structure for the Q15 PID Control |
Carm_pid_instance_q31 | Instance structure for the Q31 PID Control |
Carm_rfft_fast_instance_f16 | Instance structure for the floating-point RFFT/RIFFT function |
Carm_rfft_fast_instance_f32 | Instance structure for the floating-point RFFT/RIFFT function |
Carm_rfft_fast_instance_f64 | Instance structure for the Double Precision Floating-point RFFT/RIFFT function |
Carm_rfft_instance_f32 | Instance structure for the floating-point RFFT/RIFFT function |
Carm_rfft_instance_q15 | Instance structure for the Q15 RFFT/RIFFT function |
Carm_rfft_instance_q31 | Instance structure for the Q31 RFFT/RIFFT function |
Carm_sort_instance_f32 | Instance structure for the sorting algorithms |
Carm_spline_instance_f32 | Instance structure for the floating-point cubic spline interpolation |
Carm_svm_linear_instance_f16 | Instance structure for linear SVM prediction function |
Carm_svm_linear_instance_f32 | Instance structure for linear SVM prediction function |
Carm_svm_polynomial_instance_f16 | Instance structure for polynomial SVM prediction function |
Carm_svm_polynomial_instance_f32 | Instance structure for polynomial SVM prediction function |
Carm_svm_rbf_instance_f16 | Instance structure for rbf SVM prediction function |
Carm_svm_rbf_instance_f32 | Instance structure for rbf SVM prediction function |
Carm_svm_sigmoid_instance_f16 | Instance structure for sigmoid SVM prediction function |
Carm_svm_sigmoid_instance_f32 | Instance structure for sigmoid SVM prediction function |
Cnumber_traits< double > | Features for double |
Cnumber_traits< float > | Features for float |
Cnumber_traits< float16_t > | Feature of float16 datatype |
Cnumber_traits< Q15 > | Q15 features |
Cnumber_traits< Q31 > | Features for Q31 |
Cnumber_traits< Q7 > | Q7 features |
Cnumber_traits< std::tuple< E... > > | Number description for a tuple of numbers |
CQ15DSPVector | Representation of a vector when DSP extension supported |
Cvector_traits< double, arch, void > | Default vector datatype description for this scalar datatype |
Cvector_traits< float, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > | Vector datatype for Helium |
Cvector_traits< float, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type > | Vector instructions for float when no Helium or Neon |
Cvector_traits< float16_t > | Float16 vector descrition when no vector architecture |
Cvector_traits< float16_t, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > | Vector features for f16 on Helium |
Cvector_traits< Q15, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > | Vector features for Q15 on Helium |
Cvector_traits< Q15, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type > | Vector features for Q15 when no vector architecture |
Cvector_traits< Q15, DSP, typename std::enable_if< true >::type > | Vector description for Q15 with DSP extensions |
Cvector_traits< Q31, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type > | Vector features for Q31 when no vector instructions |
Cvector_traits< Q7, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type > | Vector descrition when no vector architecture |
Cvector_traits< std::tuple< E... >, arch > | Tuple of compatible vectors |
+Namespaces | |
namespace | arm_cmsis_dsp |
+Typedefs | |
+typedef int32_t | index_t |
index datatype. It must be a signed datatype | |
+typedef int32_t | vector_length_t |
Vector length datatype. Iy must be a signed datatype. | |
+Functions | |
template<typename T > | |
void | PrintType (void) |
Prints a textual representation of a type. | |
+Files | |
file | double.hpp |
file | num_features/float.hpp |
file | group.hpp |
file | num_features/half.hpp |
file | num_features/q15.hpp |
file | num_features/q31.hpp |
file | num_features/q7.hpp |
+Files | |
file | Helium/basic.hpp |
file | Helium/float.hpp |
file | Helium/half.hpp |
file | Helium/matrix_multiply.hpp |
file | matrix_multiply_f16.hpp |
file | matrix_multiply_f32.hpp |
file | Helium/matrix_multiply_fixed.hpp |
file | Helium/num_features.hpp |
file | Helium/q15.hpp |
file | Helium/q31.hpp |
file | Helium/q7.hpp |
+Files | |
file | Scalar/basic.hpp |
file | Scalar/matrix_multiply.hpp |
file | Scalar/matrix_multiply_fixed.hpp |
file | matrix_multiply_float.hpp |
+Directories | |
directory | BasicMathFunctions |
directory | BayesFunctions |
directory | CommonTables |
directory | ComplexMathFunctions |
directory | ControllerFunctions |
directory | DistanceFunctions |
directory | FastMathFunctions |
directory | FilteringFunctions |
directory | InterpolationFunctions |
directory | MatrixFunctions |
directory | QuaternionMathFunctions |
directory | StatisticsFunctions |
directory | SupportFunctions |
directory | SVMFunctions |
directory | TransformFunctions |
directory | WindowFunctions |
+Directories | |
directory | dsp |
+Files | |
file | DSP/basic.hpp |
file | DSP/matrix_multiply.hpp |
file | memory.hpp |
file | DSP/num_features.hpp |
file | DSP/q15.hpp |
file | DSP/q7.hpp |
+Directories | |
directory | DSP |
directory | Helium |
directory | Neon |
directory | num_features |
directory | Scalar |
+Files | |
file | algorithms.hpp |
file | arch.hpp |
file | common.hpp |
file | fixed_point.hpp |
file | forward.hpp |
file | fusion.hpp |
file | fusion_ops.hpp |
file | matrix.hpp |
file | matrix_impl.hpp |
file | matrix_view.hpp |
file | memory_pool.hpp |
file | number.hpp |
file | unroll.hpp |
file | vec.hpp |
file | vector_impl.hpp |
file | vector_view.hpp |
+Directories | |
directory | dsppp |
+Directories | |
directory | arm_bayes_example |
directory | arm_class_marks_example |
directory | arm_convolution_example |
directory | arm_dotproduct_example |
directory | arm_fft_bin_example |
directory | arm_fir_example |
directory | arm_graphic_equalizer_example |
directory | arm_linear_interp_example |
directory | arm_matrix_example |
directory | arm_signal_converge_example |
directory | arm_sin_cos_example |
directory | arm_svm_example |
directory | arm_variance_example |
+Data Structures | |
struct | number_traits< double > |
Features for double. More... | |
struct | vector_traits< double, arch, void > |
Default vector datatype description for this scalar datatype. More... | |
+Namespaces | |
namespace | inner |
+Functions | |
double | from_accumulator (const double a) |
Convert from accumulator representation. | |
double | mac (const double acc, const double a, const double b) |
Multiply and accumulate for this datatype. | |
void | accumulate (double &a, const double &b) |
Accumulate. | |
double | mult (double &a, const double &b) |
Multiply. | |
First time:
+Other times:
+If you want to select another test, edit the file example.cproject.yml
and uncomment the test.
If the tools have been installed with vcpkg
:
Otherwise, you'll need to use the path to your FVP installation.
+ It was explained in previous sections that types Vector<T,NB1>
and Vector<T,NB2>
are considered as different types if NB1
and NB2
are differents.
A template algorithm is like a code generator that will generate different code for different values of the template arguments : the types.
+If you use a template algorithm with different vector datatypes, it will generate different code for those two datatypes. The generated code will be specialized for the specific datatypes used and thus is likely to be more efficient.
+But then it means you get different implementations so more code size.
+If you have a lot of different sizes in your system, then you're likely to get too much code size and in that case it may be better to use dynamic objects instead of static ones.
+dynamic objects are less efficient so it is a trade-off between code size / speed.
+With this line of code, there is loop fusion : instead of having one loop per operator there is one loop for the whole computation.
+It is important to have some ideas of how it works to avoid some mistake in the use of the library.
+In above code, a + b * c
is not computing anything ! a + b * c
is creating a representation of the expression : an abstract syntax tree (AST) at build time.
When this AST is assigned to the variable d
it is evaluated. The evaluation forces the inlining of the expression operators in one loop. The code generated thus contains only one loop with a fusion of all the operators : +
and *
.
The library is supporting virtual vectors. They are a view on an existing part of a vector. You can use a virtual vector for instance to read some samples with a stride. Or write some samples with a stride. A virtual vector does not own its memory.
+If you write:
and d
and a
are virtual vectors then nothing will be written to d
!
d
will becomes a
and a
will no more be valid.
If you want to copy a virtual vector you need to make an expression and write:
+Note that this problem occurs only for virtual vectors who do not own their memory.
+For real vectors, a copy would occur. But since there is no overhead in adding copy
it is better to do it to avoid problems.
If you use dynamic objects in your algorithms and some temporaries need to be allocated, they'll generally be allocated through a malloc
since the size is not known at build time. It can be an issue:
If you need to allocate those temporaries very often then it may be better to write the algorithm in such a way that the temporary can be reused between different calls.
+The function implementing your algorithm would have additional arguments for the temporary matrixes and vectors required in the algorithm.
+If you want to compute the dot product:
++\[ + +<scale*(\overrightarrow{a}+\overrightarrow{b}),\overrightarrow{c}*\overrightarrow{d}> + +\] +
+with CMSIS-DSP, you would write:
+There are several limitations with this way of writing the code:
+_f32
suffix changed if the developer wants to use another datatypetmp1
,tmp2
,tmp3
,tmp4
)arm_add_f32
, two loads, an add instruction and a store. It is not enough to enable the compiler to reorder the instructions to improve the performanceWith this new C++ template library, you can write:
+The code generated by this line computes the dot product in one pass with all the operators (+
, *
) included in the loop. There is no more any temporary buffers.
Let's look at another example:
++\[ + +\overrightarrow{d} = \overrightarrow{a} + \overrightarrow{b} * \overrightarrow{c} + +\] +
+With the C++ library, it can be written as:
+Here again : all the vector operations (+
,*
) are done in one pass with one loop. There is no more any temporary buffer.
If you're coming from C and does not know anything about C++ templates, we have a very quick introduction : The minimum you need to know about C++ template to use this library.
+You can also jump directly to an example with vector operations.
+C++ extensions to CMSIS-DSP using C++ template meta-programming (headers only).
+The headers are not yet part of the CMSIS-DSP pack since they are experimental. You can get them from the CMSIS-DSP github. There is nothing to build. Just include the headers when you want to use this framework.
+ +Matrixes can be used similarly to vectors:
+If the dimensions of the matrixes are not known at build time, you would instead write:
+Once you have matrixes, you need to initialize them. A matrix is also a vector, so you can initialize it by indexing into the vector:
+You can also use a bidimensional indexing:
+Once you have initialized matrixes, you can operate on them:
+The operators +
and *
are merged into the loop. *
is the element-wise multiply. For the vector / matrix products you should use the operator dot
.
Note that fusion of operators will not work with dot(Matrix, Matrix
). It is only supported with vectors : dot(Vector,Vector)
or dot(Matrix,Vector)
.
We can create virtual vectors which are view of some slices of the matrix.
+To set the second row to 0.0f
, you can do:
To set the odd elements of the 3rd row to 0.0f
we can do:
The first argument 2
is the row number (starting from 0
).
The second argument 1
is where is the row we start the view : element 1
.
<2>
is the stride known at built time.
The row
API is:
stop
is the index of the first element after the end of the view.
i
is the row index
There is a similar API for columns.
+Let's set the odd elements of columns 3 to 5.0f
:
It is also possible to create a virtual matrix : a view onto a subset of the matrix.
+Let's add the bottom right corner of the matrix to itself:
+The API is:
+You specify the row start and row end, then column start and column end.
+Note that the end is the first index after the end of your rows or columns.
+No stride is supported for matrix view in this version of the library.
+In addition to the vector operations +
,-
and *
, matrixes are supporting more operations:
dot
for vector / matrix productsdiagonal
to create a diagonal matrix from a vector.identity
to create an identity matrixtranpose
to create the transposed matrixouter
for the outer product of two vectorsThe compiler may use the move semantic to copy the temporary result of the dot
function to result
.
In this case, no copy would occur and result
after the assignment would be a vector allocated by dot
so using the TMP_ALLOC
.
or
+is allocating a vector of dimension NB
(known at build time) and datatype float32_t
.
The definition of the Vector
template is:
It means that by default the memory allocator is TMP_ALLOC
.
This TMP_ALLOC
is a #define
and can be changed if you define it before including any header from the library.
An allocator should implement a template like:
+It has no state because in practice we observed that compilers were generating more efficient code without state in the memory allocator template.
+If you don't want to use a malloc
based memory allocator, you can replace it with your own memory allocator and implement an API like the one just shown in malloc_allocator
.
For instance, often in DSP pipelines, the dimensions of the vectors and matrixes are fixed and known at build time. In that case, you could replace the memory allocator by one using memory pools.
+With memory pools, allocation is nearly cost free and there is no fragmentation.
+The test framework of the library is providing an example in allocator.h
and allocator.cpp
.
There are two memory allocators:
+stat_allocator
is a malloc
based allocator that is making statistics on the memory allocations and how many buffers of each dimension is requiredpool_allocator
can use the data generated by stat_allocator
to pre-allocate memory pools that will be then used for the memory allocations. The memory pools are also creating aligned buffers.It is no more difficult (and less difficult) than allocating temporary buffers in CMSIS-DSP.
+You could define the TMP_ALLOC
with:
You use stat_allocator
by default. When your code is working, you switch to pool_allocator
to have better performance and determinism.
Another possibility is to use different vector types:
+Note that you cannot avoid using TMP_ALLOC
because some functions in the library are creating temporary objects. For instance, if you want to make an identity matrix, you can use mk_identity
that will make a memory allocation using TMP_ALLOC
Also note that if you create a vector with:
+then the dimension NB
is a runtime parameter. The memory pool allocator given as example in this library is only working with dimensions known at build time. For runtime dimensions, it is still using a malloc
.
As we have seen in the previous sections, there are two kind of vectors:
+Vector<T>
with a dimension known at runtimeVector<T,NB>
with a dimension known at build timeThe former vectors are called "dynamic" in this library. The later are called "static".
+This naming "static" / "dynamic" is referring to the dimension. With "dynamic" vectors the same code can, at runtime, create vectors of different length based on a runtime length.
+With "static" vectors : the length is fixed at build time and will never change at runtime.
+Note that the library also have "static" / "dynamic" matrixes. So, we are going to use the name "object" to cover both cases in the below explanations.
+The advantage of static objects is that the dimension is known at build time. The compiler can thus generate an algorithm that is specialized for those dimensions and thus more efficient.
+With static objects it is also possible to use different memory allocator with better performances and determinism.
+But, with static objects, objects of different dimension are considered as different types. The compiler will generate different implementation so it will have an impact on the code size.
+If you need lots of objects of different dimensions, or if the dimensions are not known at build time, then you need to use dynamic object
+With dynamic objects, the dimension is know at runtime. So object of different dimensions have the same datatype and the compiler is generating only one implementation for all those objects. It cannot generate specialized implementations based on the dimension. It is better for code size, but the implementations will be less efficient.
+Also when dimension is not know at build time, some instruction selection made by the C++ library at build time is no more possible. It has an effect on performance since at runtime one must decides what's possible or not. It is mostly impacting matrixes where stride information is needed.
+With vector instructions one can use scatter / gather instructions and they require a stride. But there are constraints depending on the datatype and when the stride is too big for those instructions, they cannot be used. This check has to be done at runtime for dynamic object.
+Finally, with dynamic object, memory allocation can be an issue. You can mitigate the problem by reusing temporaries in your algorithms instead of re-allocating them. But it makes the implementation more difficult. See section about Guidelines.
+In CMSIS-DSP, you have functions like:
+arm_add_f32
arm_add_f64
Without unrolling, the scalar implementation is the same but is duplicated (two different source files to maintain although they are nearly the same).
+One could try to reuse the same source for both functions using C preprocessor. But we would still have two different functions with different names at the end (both generated from the same C + C preprocessor macros)
+With C++ templates, we can achieve the same result in a better way since the C++ compiler will check the templates and typecheck them. In addition to that, both functions can share the same name.
+With C++ template, we could have a generic function arm_add
taking as argument a pointer T *pSrc
where T
is a type variable !
When the function is used with a float32_t *
, the compiler would generate code for a function using float32_t
.
And if the function is used with a float64_t *
, the compiler would generate code for a function using float64_t
.
The generic arm_add
source code is a template used to generate different implementations. It is like a code generator.
And if the compiler is unable to generate an implementation because the type variable T
is replaced by a type with no addition operator, then it would be detected by the compiler.
Note that in C++, you can also use overloading of functions. They'll use the same name (but different arguments) but they won't share the same source code.
+C++ templates also apply to structs and classes.
+For instance, we could have a template Vector<T>
and thus different types Vector<float32_t>
, Vector<Q15>
...
There is another aspect of C++ templates that may be surprising : the types can contain numbers.
+For instance, one could have a type Vector<float32_t,10>
for a vector of float
and of length 10
. The length being known at build time.
The types Vector<float32_t,10>
and Vector<float32_t,5>
should be considered as different types because they have different lengths. The length is part of the type.
What we said above for code generation applies. For a template algorithm using any kind of vector, the compiler would generate different code for different vector types. The code for a template algorithm using Vector<float32_t,10>
would be different from the code for Vector<float32_t,5>
because those two types are different.
A template can also have implicit parameters.
+For instance one could use Vector<float32_t>
or Vector<float32_t,10>
.
In the first case, the length is an implicit parameter with a default value and it is equivalent to writing Vector<float32_t,DYNAMIC>
where DYNAMIC
could be a special value (negative for instance) used to tell the compiler that the length of the vector is not known at build time but only at runtime.
Both variants may use totally different implementations. The DYNAMIC
variant may contain a length
field in the struct
definition whereas other variants do not need this field since the length is known at build time.
A template is just a C++ header. You only need to include this header to start using the template. There is nothing to build.
+Now you can look at an example with vector operations showing how to use the library
+ The use of vectors has been explained in example with vector operations and focusing on float32_t
.
The vector template is defined as:
+P
is the datatype of vector elementsL
is the static length of the vector (length known at build time). L<0
when the length is dynamic and not known at build time. It is the default value.Allocator
is the memory allocator. By default it is TMP_ALLOC
that you can redefine since it is a macroVector_Base<P>
is providing the storage. A vector owns its storage buffer.Example with Q15
is very similar:
The vectors are defined:
+They are initialized:
+Here, the Q15
value is initialized from the int value i
and thus represents \( i/2^{15} \)
Some computation is done
+The result is displayed:
+A vector view is a virtual vector : a view of a vector.
+One can define a VectorView
with:
This is creating a virtual vector starting at index 2
(3rd element) of vector d
.
You can then operate with this virtual vector:
+If you display the vector d
, you'll see that 2.0f
has been added to all elements starting from the 2rd one.
VectorView
do not own their memory. It is owned by the original vector.
If you write:
+and x
and y
are VectorView
, no copy will occur. x
will just reference the same data as y
. If you want to copy you have to be explicit and write:
It is advised to always use the copy
operator (even with normal vectors).
Virtual vectors can have a stride:
+This line sets the odd elements of the vector to 0.0f
. It is creating a virtual vector with stride 2
and starting at index 1
of first vector.
Then, all elements of this virtual vector are set to 0.0f
.
The sub
API is:
You can define:
+S
: statically known and by default 1
.0
by default)L
by default : the length known at build time). Note that it is the first index after the end of the vector. +\[ + +\overrightarrow{d} = \overrightarrow{a} + \overrightarrow{b} * \overrightarrow{c} + +\] +
+we need to:
The headers are not yet part of the CMSIS-DSP packs since they are experimental. You can get them from the CMSIS-DSP github
+If fixed point datatypes are required, #include <dsppp/fixed_point>
should be used before <dsppp/matrix>
Fixed point requires the use of CMSIS-DSP.
+To create a vector a
you would write:
Vector<float32_t,NB>
is creating a vector of dimension NB
(known at build time) and datatype float32_t
. This creation is requiring some memory allocation and by default it is done with a malloc
.
It is possible to change the memory allocator for the vectors (and it is advised) to avoid using malloc
and instead have deterministic allocation without fragmentation.
See section Memory allocation.
+Vectors of different dimensions are considered as being different types.
+If you don't know the dimension at build time, you can use a different type of vector with:
+For the trade-off between vector with build time dimension or runtime dimension please see the section Static / dynamic .
+You can index the vectors as normal C arrays.
+The computation can be written normally as :
+Note that the computation can be parametrized with template arguments so the same computation could be used with any datatype or length. In that case you would have to define a template (and not just a normal function) and inside you would use something like:
+where T
is a type variable coming from the template.
The operators +
, *
are computed in one pass with one loop : we have loop fusion and instead of having a loop per operator we have a loop for the whole computation.
To understand fusion and how to extend it with new operators, see section Fusion .
+For an overview of vector operators, see section Vector . For an overview of matrix operators, see section Matrix .
+The vectors can be displayed on stdout
for debug purpose.
► dsppp |
#include <cstdint>
#include "arch.hpp"
#include <cstdlib>
#include <type_traits>
#include <iostream>
+Data Structures | |
struct | fixed_storage_type< M, F, s, bool > |
Storage type for a fixed point number. More... | |
struct | fixed_storage_type< M, F, true, test64(M, F, 1)> |
Storage type for a fixed point number representable on int64. More... | |
struct | fixed_storage_type< M, F, false, test64(M, F, 0)> |
Storage type for a fixed point number representable on uint64. More... | |
struct | fixed_storage_type< M, F, true, test32(M, F, 1)> |
Storage type for a fixed point number representable on int32. More... | |
struct | fixed_storage_type< M, F, false, test32(M, F, 0)> |
Storage type for a fixed point number representable on uint32. More... | |
struct | fixed_storage_type< M, F, true, test16(M, F, 1)> |
Storage type for a fixed point number representable on int16. More... | |
struct | fixed_storage_type< M, F, false, test16(M, F, 0)> |
Storage type for a fixed point number representable on uint16. More... | |
struct | fixed_storage_type< M, F, true, test8(M, F, 1)> |
Storage type for a fixed point number representable on int8. More... | |
struct | fixed_storage_type< M, F, false, test8(M, F, 0)> |
Storage type for a fixed point number representable on uint8. More... | |
struct | Q< M, F, S, T > |
Fixed point template. More... | |
struct | Q< M, F, true, int64_t > |
Signed fixed point datatypes on 64 bits. More... | |
struct | Q< M, F, false, uint64_t > |
Unsigned fixed point datatypes on 64 bits. More... | |
struct | Q< M, F, true, int32_t > |
Signed fixed point datatypes on 32 bits. More... | |
struct | Q< M, F, false, uint32_t > |
Unsigned fixed point datatypes on 32 bits. More... | |
struct | Q< M, F, true, int16_t > |
Signed fixed point datatypes on 16 bits. More... | |
struct | Q< M, F, false, uint16_t > |
Unsigned fixed point datatypes on 16 bits. More... | |
struct | Q< M, F, true, int8_t > |
Signed fixed point datatypes on 8 bits. More... | |
struct | Q< M, F, false, uint8_t > |
Unsigned fixed point datatypes on 8 bits. More... | |
struct | FixedCastShift< M, FD, FS, S,(FD >FS)> |
Changed fractional representation of a fixed point number using a shift. More... | |
struct | FixedCastShift< M, FD, FS, S,(FD< FS)> |
Changed fractional representation of a fixed point number using a shift. More... | |
struct | Accumulate< MD, MS, F, S, true > |
Accumulation without saturation. More... | |
+Namespaces | |
namespace | arm_cmsis_dsp |
+Typedefs | |
+using | Q63 = Q< 0, 63 > |
Q63 datatype. | |
+using | Q31 = Q< 0, 31 > |
Q31 datatype. | |
+using | Q15 = Q< 0, 15 > |
Q15 datatype. | |
+using | Q7 = Q< 0, 7 > |
Q7 datatype. | |
+Functions | |
constexpr bool | test64 (const int M, const int F, const int S) |
Function to identify the template for fixed number representable on 64 bits. | |
constexpr bool | test32 (const int M, const int F, const int S) |
Function to identify the template for fixed number representable on 32 bits. | |
constexpr bool | test16 (const int M, const int F, const int S) |
Function to identify the template for fixed number representable on 16 bits. | |
constexpr bool | test8 (const int M, const int F, const int S) |
Function to identify the template for fixed number representable on 8 bits. | |
constexpr Q63 | operator""_q63 (long double x) |
q63 literal | |
constexpr Q31 | operator""_q31 (long double x) |
q31 literal | |
constexpr Q15 | operator""_q15 (long double x) |
q15 literal | |
constexpr Q7 | operator""_q7 (long double x) |
q7 literal | |
template<int MA, int FA, int MB, int FB, bool SA, bool SB> | |
Q< MA+MB+1, FA+FB, SA||SB > | mult (const Q< MA, FA, SA > &a, const Q< MB, FB, SB > &b) |
Multiplication of two fixed point numbers A and B. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator+ (const Q< M, F, S > &a, const Q< M, F, S > &b) |
Add two fixed point numbers with saturation. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator- (const Q< M, F, S > &a, const Q< M, F, S > &b) |
Subtract two fixed point numbers with saturation. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator- (const Q< M, F, S > &a) |
Negate a fixed point number with saturation. | |
template<int M, int F, bool S> | |
Q< M, F, S > | add (const Q< M, F, S > &a, const Q< M, F, S > &b) |
Add two fixed point numbers without saturation. | |
template<int M, int F, bool S> | |
Q< M, F, S > | sub (const Q< M, F, S > &a, const Q< M, F, S > &b) |
Subtract two fixed point numbers without saturation. | |
template<int M, int F, int N, bool S> | |
Q< M, F, S > | operator>> (const Q< M, F, S > &a, std::integral_constant< int, N >) noexcept |
Shift right a fixed point number with a shift known at build time. | |
template<int M, int F, int N, bool S> | |
Q< M+N, F, S > | operator<< (const Q< M, F, S > &a, std::integral_constant< int, N >) noexcept |
Shift left a fixed point number with a shift known at build time. | |
template<int MD = 0, int MS, int F> | |
Q< MD, F, true > | saturate (const Q< MS, F, true > &src, typename std::enable_if<(MD< MS) &&((MD+F)< 31)>::type *=nullptr) |
Saturate a signed fixed point number. | |
template<int MD = 0, int MS, int F> | |
Q< MD, F, false > | saturate (const Q< MS, F, false > &src, typename std::enable_if<(MD< MS) &&((MD+F)< 31)>::type *=nullptr) |
Saturate an unsigned fixed point number. | |
template<int FD, int M, int FS, bool S> | |
Q< M, FD, S > | toFrac (const Q< M, FS, S > &src) |
Convert between different fractional part formats. | |
template<int MD, int MS, int F, bool S> | |
Q< MD, F, S > | accumulate (const Q< MD, F, S > &a, const Q< MS, F, S > &b) |
Accumulate without saturation. | |
Q7 | operator* (const Q7 &a, const Q7 &b) |
Multiplication operator. | |
Q15 | operator* (const Q15 &a, const Q15 &b) |
Multiplication operator. | |
Q31 | operator* (const Q31 &a, const Q31 &b) |
Multiplication operator. | |
template<int M, int F> | |
bool | operator> (const Q< M, F > &a, const Q< M, F > &b) |
Greater-than comparison operator. | |
template<int M, int F> | |
bool | operator< (const Q< M, F > &a, const Q< M, F > &b) |
Less-than comparison operator. | |
template<int M, int F> | |
bool | operator>= (const Q< M, F > &a, const Q< M, F > &b) |
Greater-than-or-equal comparison operator. | |
template<int M, int F> | |
bool | operator<= (const Q< M, F > &a, const Q< M, F > &b) |
Less-than-or-equal comparison operator. | |
template<int M, int F> | |
bool | operator== (const Q< M, F > a, const Q< M, F > b) |
Equality operator. | |
template<int M, int F> | |
bool | operator!= (const Q< M, F > a, const Q< M, F > b) |
Inequality operator. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator/ (const Q< M, F, S > a, const int32_t b) |
Division operator. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator+ (const Q< M, F, S > &a) |
No op operator. | |
+Namespaces | |
namespace | arm_cmsis_dsp |
#include "fusion_ops.hpp"
+Data Structures | |
struct | _Expr< T > |
Expression template. More... | |
struct | _Binary< LHS, RHS, DerivedOp > |
Expression for binary operator. More... | |
struct | _Unary< LHS, DerivedOp > |
Expression for unary operator. More... | |
+Namespaces | |
namespace | arm_cmsis_dsp |
+Functions | |
template<typename DA > | |
constexpr bool | has_vector_inst () |
Determines if vector datatype supports vector instruction on a current architecture. | |
template<typename DA > | |
constexpr bool | has_predicate_inst () |
Determines if datatype has predicated loop for current architecture. | |
template<typename DA > | |
constexpr bool | is_scalar () |
Determines if scalar datatype (not vector, vectorview, matrix, matrixview) | |
template<typename DA > | |
constexpr bool | must_use_matrix_idx () |
Check if datatype can only be used as a matrix (no vector addressing) | |
template<typename DA , typename DB > | |
constexpr bool | vector_idx_pair () |
Check if both datatype have vector indexing are same scalar datatype. | |
template<typename DA > | |
constexpr bool | is_only_vector () |
Check if has vector indexing. | |
template<typename DA , typename DB > | |
constexpr bool | must_use_matrix_idx_pair () |
Check if datatypes have same scalar datatype and no vector indexing. | |
template<typename DA , typename DB > | |
constexpr vector_length_t | static_length () |
Static length. | |
template<typename DA , typename DB > | |
constexpr bool | same_static_length () |
Check compatibility of length. | |
template<typename VA , typename VB , typename std::enable_if< vector_idx_pair< VA, VB >() &&is_only_vector< VA >() &&is_only_vector< VB >() &&(!IsDynamic< VA >::value||!IsDynamic< VB >::value), bool >::type = true> | |
DotResult< VA > | dot (const VA &a, const VB &b) |
Dot product. | |
template<typename VA , typename VB , typename std::enable_if< vector_idx_pair< VA, VB >() &&(!IsDynamic< VA >::value||!IsDynamic< VB >::value), bool >::type = true> | |
void | swap (VA &&a, VB &&b) |
Swap vectors. | |
+Data Structures | |
struct | _UnaryOperator< Scalar, Derived > |
Unary operator. More... | |
struct | _BinaryOperator< Scalar, Derived > |
Unary operator. More... | |
struct | _AddOp< Scalar > |
Add operator. More... | |
struct | _SubOp< Scalar > |
Sub operator. More... | |
struct | _MulOp< Scalar > |
Mul operator. More... | |
struct | _NegOp< Scalar > |
Neg operator. More... | |
struct | _NoOp< Scalar > |
No operator. More... | |
+Data Structures | |
struct | number_traits< std::tuple< E... > > |
Number description for a tuple of numbers. More... | |
struct | vector_traits< std::tuple< E... >, arch > |
Tuple of compatible vectors. More... | |
+Namespaces | |
namespace | inner |
+Functions | |
template<typename A , typename V , std::size_t... Ns> | |
A | vmacc_impl (const A &acc, const V &a, const V &b, std::index_sequence< Ns... >) |
Vector accumulate for tuples of vectors. | |
template<typename A , typename ... E> | |
A | vmacc (const A &acc, const std::tuple< E... > &a, const std::tuple< E... > &b) |
Vector accumulate for tuples of vectors. | |
template<typename A , typename V , typename B , std::size_t... Ns> | |
A | vmacc_impl (const A &acc, const V &a, const V &b, const B p0, std::index_sequence< Ns... >) |
Predicated vector accumulate for tuple. | |
template<typename A , typename B , typename ... E> | |
A | vmacc (const A &acc, const std::tuple< E... > &a, const std::tuple< E... > &b, const B p0) |
Predicated vector accumulate for tuples. | |
template<typename A , std::size_t... Ns> | |
auto | vreduce_impl (const A &acc, std::index_sequence< Ns... >) |
Reduce function for tuple. | |
template<typename ... E> | |
auto | vreduce (const std::tuple< E... > &acc) |
Reduce function for tuples. | |
template<typename A , std::size_t... Ns> | |
auto | from_accumulator_impl (const A &acc, std::index_sequence< Ns... >) |
Convert from accumulator value. | |
template<typename ... E> | |
auto | from_accumulator (const std::tuple< E... > &acc) |
Convert from tuple of accumulator values. | |
template<typename A , typename V , std::size_t... Ns> | |
A | mac_impl (const A &acc, const V &a, const V &b, std::index_sequence< Ns... >) |
Multiply accumulate for tuple of scalar. | |
template<typename A , typename ... E> | |
A | mac (const A &acc, const std::tuple< E... > &a, const std::tuple< E... > &b) |
Multiply accumulate. | |
template<typename A , typename V , typename B , std::size_t... Ns> | |
A | mac_impl (const A &acc, const V &a, const V &b, const B p0, std::index_sequence< Ns... >) |
Multiply accumulate for tuple of scalar. | |
template<typename A , typename B , typename ... E> | |
A | mac (const A &acc, const std::tuple< E... > &a, const std::tuple< E... > &b, const B p0) |
Multiply accumulate. | |
+Functions | |
template<typename MA , typename MB , typename std::enable_if< HasMatrixIndexing< MA >::value &&HasMatrixIndexing< MB >::value, bool >::type = true> | |
void | transposeTo (MA &dst, const MB &src) |
Transpose a matrix. | |
template<typename M , typename V , typename std::enable_if< CompatibleStaticMatVecProduct< M, V >::value, bool >::type = true> | |
OutputVector< M, V >::type | dot (const M &m, const V &v) |
Matrix x Vector product. | |
template<typename MA , typename MB , typename std::enable_if< CompatibleStaticMatMatProduct< MA, MB >::value &&number_traits< typename traits< MA >::Scalar >::is_fixed, bool >::type = true> | |
OutputMatrix< MA, MB >::type | dot (const MA &ma, const MB &mb) |
Matrix x Matrix product. | |
template<typename MA , typename MB , typename RES , typename std::enable_if< CompatibleDynamicMatMatProduct< MA, MB >::value &&number_traits< typename traits< MA >::Scalar >::is_float, bool >::type = true> | |
void | dot (RES &&res, const MA &ma, const MB &mb) |
Matrix x Matrix product. | |
template<typename P > | |
Matrix< P, DYNAMIC, DYNAMIC, TMP_ALLOC > | mk_identity (const vector_length_t l) |
Create identity matrix. | |
template<typename P , int L> | |
Matrix< P, L, L, TMP_ALLOC > | mk_identity () |
Create identity matrix. | |
Algorithms written in an architecture independent way
+
+
|
+ +inline | +
+
|
+ +inline | +
+
|
+ +inline | +
MA | Any matrix type |
MB | Any matrix type |
RES | Any matrix type |
res | Output matrix. Result of ma x mb is written to this argument |
ma | Matrix. |
mb | Matrix. |
Used in dynamic mode (dimension of matrix not know at build time) to avoid a memory allocation if the result matrix is already available (Enable to reuse the same matrix storage for the result in some algorithms)
+ +Matrix< P, L, L, TMP_ALLOC > mk_identity | +( | +) | ++ |
Create identity matrix.
+P | Datatype of matrix elements |
L | Matrix dimension (L x L) |
Matrix< P, DYNAMIC, DYNAMIC, TMP_ALLOC > mk_identity | +( | +const vector_length_t | +l | ) | ++ |
Create identity matrix.
+P | Datatype of matrix elements |
l | Dimension of matrix (l x l) |
+
|
+ +inline | +
Transpose a matrix.
+MA | Any matrix type |
MB | Any matrix type |
dst | Destination matrix. |
src | Source matrix. |
+Data Structures | |
class | Scalar |
class | DSP |
class | Helium |
class | Helium82 |
class | Neon |
class arm_cmsis_dsp::Scalar | +
Scalar architecture
+class arm_cmsis_dsp::DSP | +
Architecture supporting DSP extensions
+class arm_cmsis_dsp::Helium | +
v8.1M Architecture
+class arm_cmsis_dsp::Helium82 | +
v8.2M Architecture
+class arm_cmsis_dsp::Neon | +
Architecture supporting Neon
++Content | |
DSP Extension specific algorithm | |
Helium specific algorithm | |
Scalar algorithm | |
+Functions | |
void | arm_absmax_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult, uint32_t *pIndex) |
Maximum value of absolute values of a floating-point vector. | |
void | arm_absmax_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex) |
Maximum value of absolute values of a floating-point vector. | |
void | arm_absmax_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult, uint32_t *pIndex) |
Maximum value of absolute values of a floating-point vector. | |
void | arm_absmax_no_idx_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Maximum value of absolute values of a floating-point vector. | |
void | arm_absmax_no_idx_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Maximum value of absolute values of a floating-point vector. | |
void | arm_absmax_no_idx_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult) |
Maximum value of absolute values of a floating-point vector. | |
void | arm_absmax_no_idx_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult) |
Maximum value of absolute values of a Q15 vector. | |
void | arm_absmax_no_idx_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Maximum value of absolute values of a Q31 vector. | |
void | arm_absmax_no_idx_q7 (const q7_t *pSrc, uint32_t blockSize, q7_t *pResult) |
Maximum value of absolute values of a Q7 vector. | |
void | arm_absmax_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex) |
Maximum value of absolute values of a Q15 vector. | |
void | arm_absmax_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex) |
Maximum value of absolute values of a Q31 vector. | |
void | arm_absmax_q7 (const q7_t *pSrc, uint32_t blockSize, q7_t *pResult, uint32_t *pIndex) |
Maximum value of absolute values of a Q7 vector. | |
Computes the maximum value of absolute values of an array of data. The function returns both the maximum value and its position within the array. There are separate functions for floating-point, Q31, Q15, and Q7 data types.
+void arm_absmax_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_absmax_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_absmax_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_absmax_no_idx_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
Maximum value of absolute values of a floating-point vector.
+Maximum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_absmax_no_idx_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Maximum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_absmax_no_idx_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Maximum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_absmax_no_idx_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult | +
+ | ) | ++ |
Maximum value of absolute values of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_absmax_no_idx_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Maximum value of absolute values of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_absmax_no_idx_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult | +
+ | ) | ++ |
Maximum value of absolute values of a Q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_absmax_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of absolute values of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_absmax_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of absolute values of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_absmax_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of absolute values of a Q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
+Functions | |
void | arm_absmin_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult, uint32_t *pIndex) |
Minimum value of absolute values of a floating-point vector. | |
void | arm_absmin_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex) |
Minimum value of absolute values of a floating-point vector. | |
void | arm_absmin_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult, uint32_t *pIndex) |
Minimum value of absolute values of a floating-point vector. | |
void | arm_absmin_no_idx_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Minimum value of absolute values of a floating-point vector. | |
void | arm_absmin_no_idx_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Minimum value of absolute values of a floating-point vector. | |
void | arm_absmin_no_idx_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult) |
Minimum value of absolute values of a floating-point vector. | |
void | arm_absmin_no_idx_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult) |
Minimum value of absolute values of a Q15 vector. | |
void | arm_absmin_no_idx_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Minimum value of absolute values of a Q31 vector. | |
void | arm_absmin_no_idx_q7 (const q7_t *pSrc, uint32_t blockSize, q7_t *pResult) |
Minimum value of absolute values of a Q7 vector. | |
void | arm_absmin_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex) |
Minimum value of absolute values of a Q15 vector. | |
void | arm_absmin_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex) |
Minimum value of absolute values of a Q31 vector. | |
void | arm_absmin_q7 (const q7_t *pSrc, uint32_t blockSize, q7_t *pResult, uint32_t *pIndex) |
Minimum value of absolute values of a Q7 vector. | |
Computes the minimum value of absolute values of an array of data. The function returns both the minimum value and its position within the array. There are separate functions for floating-point, Q31, Q15, and Q7 data types.
+void arm_absmin_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_absmin_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_absmin_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_absmin_no_idx_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
Minimum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_absmin_no_idx_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Minimum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_absmin_no_idx_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Minimum value of absolute values of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_absmin_no_idx_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult | +
+ | ) | ++ |
Minimum value of absolute values of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_absmin_no_idx_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Minimum value of absolute values of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_absmin_no_idx_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult | +
+ | ) | ++ |
Minimum value of absolute values of a Q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_absmin_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of absolute values of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_absmin_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of absolute values of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_absmin_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of absolute values of a Q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
+Functions | |
void | arm_accumulate_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
accumulate value of a floating-point vector. | |
void | arm_accumulate_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Accumulation value of a floating-point vector. | |
void | arm_accumulate_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult) |
Accumulation value of a floating-point vector. | |
Calculates the accumulation of the input vector. Sum is defined as the addition of the elements in the vector. The underlying algorithm is used:
++Result = (pSrc[0] + pSrc[1] + pSrc[2] + ... + pSrc[blockSize-1]); +
There are separate functions for floating-point, Q31, Q15, and Q7 data types.
+void arm_accumulate_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
accumulate value of a floating-point vector.
+Sum value of a floating-point vector.
+[in] | pSrc | points to the input vector. |
[in] | blockSize | number of samples in input vector. |
[out] | pResult | sum of values in input vector. |
void arm_accumulate_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Accumulation value of a floating-point vector.
+[in] | pSrc | points to the input vector. |
[in] | blockSize | number of samples in input vector. |
[out] | pResult | sum of values in input vector. |
void arm_accumulate_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Accumulation value of a floating-point vector.
+[in] | pSrc | points to the input vector. |
[in] | blockSize | number of samples in input vector. |
[out] | pResult | sum of values in input vector. |
+Functions | |
void | arm_and_u16 (const uint16_t *pSrcA, const uint16_t *pSrcB, uint16_t *pDst, uint32_t blockSize) |
Compute the logical bitwise AND of two fixed-point vectors. | |
void | arm_and_u32 (const uint32_t *pSrcA, const uint32_t *pSrcB, uint32_t *pDst, uint32_t blockSize) |
Compute the logical bitwise AND of two fixed-point vectors. | |
void | arm_and_u8 (const uint8_t *pSrcA, const uint8_t *pSrcB, uint8_t *pDst, uint32_t blockSize) |
Compute the logical bitwise AND of two fixed-point vectors. | |
Compute the logical bitwise AND.
+There are separate functions for uint32_t, uint16_t, and uint7_t data types.
+void arm_and_u16 | +( | +const uint16_t * | +pSrcA, | +
+ | + | const uint16_t * | +pSrcB, | +
+ | + | uint16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise AND of two fixed-point vectors.
+[in] | pSrcA | points to input vector A |
[in] | pSrcB | points to input vector B |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_and_u32 | +( | +const uint32_t * | +pSrcA, | +
+ | + | const uint32_t * | +pSrcB, | +
+ | + | uint32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise AND of two fixed-point vectors.
+[in] | pSrcA | points to input vector A |
[in] | pSrcB | points to input vector B |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_and_u8 | +( | +const uint8_t * | +pSrcA, | +
+ | + | const uint8_t * | +pSrcB, | +
+ | + | uint8_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise AND of two fixed-point vectors.
+[in] | pSrcA | points to input vector A |
[in] | pSrcB | points to input vector B |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
void | arm_abs_f16 (const float16_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Floating-point vector absolute value. | |
void | arm_abs_f32 (const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Floating-point vector absolute value. | |
void | arm_abs_f64 (const float64_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Floating-point vector absolute value. | |
void | arm_abs_q15 (const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Q15 vector absolute value. | |
void | arm_abs_q31 (const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Q31 vector absolute value. | |
void | arm_abs_q7 (const q7_t *pSrc, q7_t *pDst, uint32_t blockSize) |
Q7 vector absolute value. | |
Computes the absolute value of a vector on an element-by-element basis.
++ pDst[n] = abs(pSrc[n]), 0 <= n < blockSize. +
The functions support in-place computation allowing the source and destination pointers to reference the same memory buffer. There are separate functions for floating-point, Q7, Q15, and Q31 data types.
+void arm_abs_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector absolute value.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_abs_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector absolute value.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_abs_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector absolute value.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_abs_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q15 vector absolute value.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_abs_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q31 vector absolute value.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_abs_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q7 vector absolute value.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
void | arm_add_f16 (const float16_t *pSrcA, const float16_t *pSrcB, float16_t *pDst, uint32_t blockSize) |
Floating-point vector addition. | |
void | arm_add_f32 (const float32_t *pSrcA, const float32_t *pSrcB, float32_t *pDst, uint32_t blockSize) |
Floating-point vector addition. | |
void | arm_add_f64 (const float64_t *pSrcA, const float64_t *pSrcB, float64_t *pDst, uint32_t blockSize) |
Floating-point vector addition. | |
void | arm_add_q15 (const q15_t *pSrcA, const q15_t *pSrcB, q15_t *pDst, uint32_t blockSize) |
Q15 vector addition. | |
void | arm_add_q31 (const q31_t *pSrcA, const q31_t *pSrcB, q31_t *pDst, uint32_t blockSize) |
Q31 vector addition. | |
void | arm_add_q7 (const q7_t *pSrcA, const q7_t *pSrcB, q7_t *pDst, uint32_t blockSize) |
Q7 vector addition. | |
Element-by-element addition of two vectors.
++ pDst[n] = pSrcA[n] + pSrcB[n], 0 <= n < blockSize. +
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
+void arm_add_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector addition.
+[in] | pSrcA | points to first input vector |
[in] | pSrcB | points to second input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_add_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector addition.
+[in] | pSrcA | points to first input vector |
[in] | pSrcB | points to second input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_add_f64 | +( | +const float64_t * | +pSrcA, | +
+ | + | const float64_t * | +pSrcB, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector addition.
+[in] | pSrcA | points to first input vector |
[in] | pSrcB | points to second input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_add_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q15 vector addition.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_add_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q31 vector addition.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_add_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q7 vector addition.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
void | arm_clip_f16 (const float16_t *pSrc, float16_t *pDst, float16_t low, float16_t high, uint32_t numSamples) |
Elementwise floating-point clipping. | |
void | arm_clip_f32 (const float32_t *pSrc, float32_t *pDst, float32_t low, float32_t high, uint32_t numSamples) |
Elementwise floating-point clipping. | |
void | arm_clip_q15 (const q15_t *pSrc, q15_t *pDst, q15_t low, q15_t high, uint32_t numSamples) |
Elementwise fixed-point clipping. | |
void | arm_clip_q31 (const q31_t *pSrc, q31_t *pDst, q31_t low, q31_t high, uint32_t numSamples) |
Elementwise fixed-point clipping. | |
void | arm_clip_q7 (const q7_t *pSrc, q7_t *pDst, q7_t low, q7_t high, uint32_t numSamples) |
Elementwise fixed-point clipping. | |
Element-by-element clipping of a value.
+The value is constrained between 2 bounds.
+There are separate functions for floating-point, Q7, Q15, and Q31 data types.
+void arm_clip_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | float16_t | +low, | +
+ | + | float16_t | +high, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Elementwise floating-point clipping.
+[in] | pSrc | points to input values |
[out] | pDst | points to output clipped values |
[in] | low | lower bound |
[in] | high | higher bound |
[in] | numSamples | number of samples to clip |
void arm_clip_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | float32_t | +low, | +
+ | + | float32_t | +high, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Elementwise floating-point clipping.
+[in] | pSrc | points to input values |
[out] | pDst | points to output clipped values |
[in] | low | lower bound |
[in] | high | higher bound |
[in] | numSamples | number of samples to clip |
void arm_clip_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | q15_t | +low, | +
+ | + | q15_t | +high, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Elementwise fixed-point clipping.
+[in] | pSrc | points to input values |
[out] | pDst | points to output clipped values |
[in] | low | lower bound |
[in] | high | higher bound |
[in] | numSamples | number of samples to clip |
void arm_clip_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | q31_t | +low, | +
+ | + | q31_t | +high, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Elementwise fixed-point clipping.
+[in] | pSrc | points to input values |
[out] | pDst | points to output clipped values |
[in] | low | lower bound |
[in] | high | higher bound |
[in] | numSamples | number of samples to clip |
void arm_clip_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | q7_t | +low, | +
+ | + | q7_t | +high, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Elementwise fixed-point clipping.
+[in] | pSrc | points to input values |
[out] | pDst | points to output clipped values |
[in] | low | lower bound |
[in] | high | higher bound |
[in] | numSamples | number of samples to clip |
+Functions | |
void | arm_dot_prod_f16 (const float16_t *pSrcA, const float16_t *pSrcB, uint32_t blockSize, float16_t *result) |
Dot product of floating-point vectors. | |
void | arm_dot_prod_f32 (const float32_t *pSrcA, const float32_t *pSrcB, uint32_t blockSize, float32_t *result) |
Dot product of floating-point vectors. | |
void | arm_dot_prod_f64 (const float64_t *pSrcA, const float64_t *pSrcB, uint32_t blockSize, float64_t *result) |
Dot product of floating-point vectors. | |
void | arm_dot_prod_q15 (const q15_t *pSrcA, const q15_t *pSrcB, uint32_t blockSize, q63_t *result) |
Dot product of Q15 vectors. | |
void | arm_dot_prod_q31 (const q31_t *pSrcA, const q31_t *pSrcB, uint32_t blockSize, q63_t *result) |
Dot product of Q31 vectors. | |
void | arm_dot_prod_q7 (const q7_t *pSrcA, const q7_t *pSrcB, uint32_t blockSize, q31_t *result) |
Dot product of Q7 vectors. | |
Computes the dot product of two vectors. The vectors are multiplied element-by-element and then summed.
++ sum = pSrcA[0]*pSrcB[0] + pSrcA[1]*pSrcB[1] + ... + pSrcA[blockSize-1]*pSrcB[blockSize-1] +
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
+void arm_dot_prod_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +result | +
+ | ) | ++ |
Dot product of floating-point vectors.
+[in] | pSrcA | points to the first input vector. |
[in] | pSrcB | points to the second input vector. |
[in] | blockSize | number of samples in each vector. |
[out] | result | output result returned here. |
void arm_dot_prod_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +result | +
+ | ) | ++ |
Dot product of floating-point vectors.
+[in] | pSrcA | points to the first input vector. |
[in] | pSrcB | points to the second input vector. |
[in] | blockSize | number of samples in each vector. |
[out] | result | output result returned here. |
void arm_dot_prod_f64 | +( | +const float64_t * | +pSrcA, | +
+ | + | const float64_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +result | +
+ | ) | ++ |
Dot product of floating-point vectors.
+[in] | pSrcA | points to the first input vector. |
[in] | pSrcB | points to the second input vector. |
[in] | blockSize | number of samples in each vector. |
[out] | result | output result returned here. |
void arm_dot_prod_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q63_t * | +result | +
+ | ) | ++ |
Dot product of Q15 vectors.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | blockSize | number of samples in each vector |
[out] | result | output result returned here |
void arm_dot_prod_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q63_t * | +result | +
+ | ) | ++ |
Dot product of Q31 vectors.
+[in] | pSrcA | points to the first input vector. |
[in] | pSrcB | points to the second input vector. |
[in] | blockSize | number of samples in each vector. |
[out] | result | output result returned here. |
void arm_dot_prod_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +result | +
+ | ) | ++ |
Dot product of Q7 vectors.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | blockSize | number of samples in each vector |
[out] | result | output result returned here |
+Functions | |
void | arm_mult_f16 (const float16_t *pSrcA, const float16_t *pSrcB, float16_t *pDst, uint32_t blockSize) |
Floating-point vector multiplication. | |
void | arm_mult_f32 (const float32_t *pSrcA, const float32_t *pSrcB, float32_t *pDst, uint32_t blockSize) |
Floating-point vector multiplication. | |
void | arm_mult_f64 (const float64_t *pSrcA, const float64_t *pSrcB, float64_t *pDst, uint32_t blockSize) |
Floating-point vector multiplication. | |
void | arm_mult_q15 (const q15_t *pSrcA, const q15_t *pSrcB, q15_t *pDst, uint32_t blockSize) |
Q15 vector multiplication. | |
void | arm_mult_q31 (const q31_t *pSrcA, const q31_t *pSrcB, q31_t *pDst, uint32_t blockSize) |
Q31 vector multiplication. | |
void | arm_mult_q7 (const q7_t *pSrcA, const q7_t *pSrcB, q7_t *pDst, uint32_t blockSize) |
Q7 vector multiplication. | |
Element-by-element multiplication of two vectors.
++ pDst[n] = pSrcA[n] * pSrcB[n], 0 <= n < blockSize. +
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
+void arm_mult_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector multiplication.
+[in] | pSrcA | points to the first input vector. |
[in] | pSrcB | points to the second input vector. |
[out] | pDst | points to the output vector. |
[in] | blockSize | number of samples in each vector. |
void arm_mult_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector multiplication.
+[in] | pSrcA | points to the first input vector. |
[in] | pSrcB | points to the second input vector. |
[out] | pDst | points to the output vector. |
[in] | blockSize | number of samples in each vector. |
void arm_mult_f64 | +( | +const float64_t * | +pSrcA, | +
+ | + | const float64_t * | +pSrcB, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector multiplication.
+[in] | pSrcA | points to the first input vector. |
[in] | pSrcB | points to the second input vector. |
[out] | pDst | points to the output vector. |
[in] | blockSize | number of samples in each vector. |
void arm_mult_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q15 vector multiplication.
+[in] | pSrcA | points to first input vector |
[in] | pSrcB | points to second input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_mult_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q31 vector multiplication.
+[in] | pSrcA | points to the first input vector. |
[in] | pSrcB | points to the second input vector. |
[out] | pDst | points to the output vector. |
[in] | blockSize | number of samples in each vector. |
void arm_mult_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q7 vector multiplication.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
void | arm_negate_f16 (const float16_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Negates the elements of a floating-point vector. | |
void | arm_negate_f32 (const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Negates the elements of a floating-point vector. | |
void | arm_negate_f64 (const float64_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Negates the elements of a floating-point vector. | |
void | arm_negate_q15 (const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Negates the elements of a Q15 vector. | |
void | arm_negate_q31 (const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Negates the elements of a Q31 vector. | |
void | arm_negate_q7 (const q7_t *pSrc, q7_t *pDst, uint32_t blockSize) |
Negates the elements of a Q7 vector. | |
Negates the elements of a vector.
++ pDst[n] = -pSrc[n], 0 <= n < blockSize. +
The functions support in-place computation allowing the source and destination pointers to reference the same memory buffer. There are separate functions for floating-point, Q7, Q15, and Q31 data types.
+void arm_negate_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Negates the elements of a floating-point vector.
+[in] | pSrc | points to input vector. |
[out] | pDst | points to output vector. |
[in] | blockSize | number of samples in each vector. |
void arm_negate_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Negates the elements of a floating-point vector.
+[in] | pSrc | points to input vector. |
[out] | pDst | points to output vector. |
[in] | blockSize | number of samples in each vector. |
void arm_negate_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Negates the elements of a floating-point vector.
+[in] | pSrc | points to input vector. |
[out] | pDst | points to output vector. |
[in] | blockSize | number of samples in each vector. |
void arm_negate_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Negates the elements of a Q15 vector.
+[in] | pSrc | points to the input vector. |
[out] | pDst | points to the output vector. |
[in] | blockSize | number of samples in each vector. |
void arm_negate_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Negates the elements of a Q31 vector.
+[in] | pSrc | points to the input vector. |
[out] | pDst | points to the output vector. |
[in] | blockSize | number of samples in each vector. |
void arm_negate_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Negates the elements of a Q7 vector.
+[in] | pSrc | points to the input vector. |
[out] | pDst | points to the output vector. |
[in] | blockSize | number of samples in each vector. |
+Functions | |
void | arm_offset_f16 (const float16_t *pSrc, float16_t offset, float16_t *pDst, uint32_t blockSize) |
Adds a constant offset to a floating-point vector. | |
void | arm_offset_f32 (const float32_t *pSrc, float32_t offset, float32_t *pDst, uint32_t blockSize) |
Adds a constant offset to a floating-point vector. | |
void | arm_offset_f64 (const float64_t *pSrc, float64_t offset, float64_t *pDst, uint32_t blockSize) |
Adds a constant offset to a floating-point vector. | |
void | arm_offset_q15 (const q15_t *pSrc, q15_t offset, q15_t *pDst, uint32_t blockSize) |
Adds a constant offset to a Q15 vector. | |
void | arm_offset_q31 (const q31_t *pSrc, q31_t offset, q31_t *pDst, uint32_t blockSize) |
Adds a constant offset to a Q31 vector. | |
void | arm_offset_q7 (const q7_t *pSrc, q7_t offset, q7_t *pDst, uint32_t blockSize) |
Adds a constant offset to a Q7 vector. | |
Adds a constant offset to each element of a vector.
++ pDst[n] = pSrc[n] + offset, 0 <= n < blockSize. +
The functions support in-place computation allowing the source and destination pointers to reference the same memory buffer. There are separate functions for floating-point, Q7, Q15, and Q31 data types.
+void arm_offset_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t | +offset, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Adds a constant offset to a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | offset | is the offset to be added |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_offset_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t | +offset, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Adds a constant offset to a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | offset | is the offset to be added |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_offset_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | float64_t | +offset, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Adds a constant offset to a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | offset | is the offset to be added |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_offset_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t | +offset, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Adds a constant offset to a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | offset | is the offset to be added |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_offset_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t | +offset, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Adds a constant offset to a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | offset | is the offset to be added |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_offset_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | q7_t | +offset, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Adds a constant offset to a Q7 vector.
+[in] | pSrc | points to the input vector |
[in] | offset | is the offset to be added |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
void | arm_scale_f16 (const float16_t *pSrc, float16_t scale, float16_t *pDst, uint32_t blockSize) |
Multiplies a floating-point vector by a scalar. | |
void | arm_scale_f32 (const float32_t *pSrc, float32_t scale, float32_t *pDst, uint32_t blockSize) |
Multiplies a floating-point vector by a scalar. | |
void | arm_scale_f64 (const float64_t *pSrc, float64_t scale, float64_t *pDst, uint32_t blockSize) |
Multiplies a floating-point vector by a scalar. | |
void | arm_scale_q15 (const q15_t *pSrc, q15_t scaleFract, int8_t shift, q15_t *pDst, uint32_t blockSize) |
Multiplies a Q15 vector by a scalar. | |
void | arm_scale_q31 (const q31_t *pSrc, q31_t scaleFract, int8_t shift, q31_t *pDst, uint32_t blockSize) |
Multiplies a Q31 vector by a scalar. | |
void | arm_scale_q7 (const q7_t *pSrc, q7_t scaleFract, int8_t shift, q7_t *pDst, uint32_t blockSize) |
Multiplies a Q7 vector by a scalar. | |
Multiply a vector by a scalar value. For floating-point data, the algorithm used is:
++ pDst[n] = pSrc[n] * scale, 0 <= n < blockSize. +
In the fixed-point Q7, Q15, and Q31 functions, scale
is represented by a fractional multiplication scaleFract
and an arithmetic shift shift
. The shift allows the gain of the scaling operation to exceed 1.0. The algorithm used with fixed-point data is:
+ pDst[n] = (pSrc[n] * scaleFract) << shift, 0 <= n < blockSize. +
The overall scale factor applied to the fixed-point data is
+ scale = scaleFract * 2^shift. +
The functions support in-place computation allowing the source and destination pointers to reference the same memory buffer.
+void arm_scale_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t | +scale, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Multiplies a floating-point vector by a scalar.
+[in] | pSrc | points to the input vector |
[in] | scale | scale factor to be applied |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_scale_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t | +scale, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Multiplies a floating-point vector by a scalar.
+[in] | pSrc | points to the input vector |
[in] | scale | scale factor to be applied |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_scale_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | float64_t | +scale, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Multiplies a floating-point vector by a scalar.
+[in] | pSrc | points to the input vector |
[in] | scale | scale factor to be applied |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_scale_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t | +scaleFract, | +
+ | + | int8_t | +shift, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Multiplies a Q15 vector by a scalar.
+[in] | pSrc | points to the input vector |
[in] | scaleFract | fractional portion of the scale value |
[in] | shift | number of bits to shift the result by |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
*pSrc
and scaleFract
are in 1.15 format. These are multiplied to yield a 2.30 intermediate result and this is shifted with saturation to 1.15 format. void arm_scale_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t | +scaleFract, | +
+ | + | int8_t | +shift, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Multiplies a Q31 vector by a scalar.
+[in] | pSrc | points to the input vector |
[in] | scaleFract | fractional portion of the scale value |
[in] | shift | number of bits to shift the result by |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
*pSrc
and scaleFract
are in 1.31 format. These are multiplied to yield a 2.62 intermediate result and this is shifted with saturation to 1.31 format. There is an intermediate shift by 32 to go from the 2.62 to 1.31 format. The shift argument is applied on the 1.31 result and not to the intermediate 2.62 format. void arm_scale_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | q7_t | +scaleFract, | +
+ | + | int8_t | +shift, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Multiplies a Q7 vector by a scalar.
+[in] | pSrc | points to the input vector |
[in] | scaleFract | fractional portion of the scale value |
[in] | shift | number of bits to shift the result by |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
*pSrc
and scaleFract
are in 1.7 format. These are multiplied to yield a 2.14 intermediate result and this is shifted with saturation to 1.7 format. +Functions | |
void | arm_shift_q15 (const q15_t *pSrc, int8_t shiftBits, q15_t *pDst, uint32_t blockSize) |
Shifts the elements of a Q15 vector a specified number of bits. | |
void | arm_shift_q31 (const q31_t *pSrc, int8_t shiftBits, q31_t *pDst, uint32_t blockSize) |
Shifts the elements of a Q31 vector a specified number of bits. | |
void | arm_shift_q7 (const q7_t *pSrc, int8_t shiftBits, q7_t *pDst, uint32_t blockSize) |
Shifts the elements of a Q7 vector a specified number of bits. | |
Shifts the elements of a fixed-point vector by a specified number of bits. There are separate functions for Q7, Q15, and Q31 data types. The underlying algorithm used is:
++ pDst[n] = pSrc[n] << shift, 0 <= n < blockSize. +
If shift
is positive then the elements of the vector are shifted to the left. If shift
is negative then the elements of the vector are shifted to the right.
The functions support in-place computation allowing the source and destination pointers to reference the same memory buffer.
+void arm_shift_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | int8_t | +shiftBits, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Shifts the elements of a Q15 vector a specified number of bits.
+[in] | pSrc | points to the input vector |
[in] | shiftBits | number of bits to shift. A positive value shifts left; a negative value shifts right. |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_shift_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | int8_t | +shiftBits, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Shifts the elements of a Q31 vector a specified number of bits.
+[in] | pSrc | points to the input vector |
[in] | shiftBits | number of bits to shift. A positive value shifts left; a negative value shifts right. |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in the vector |
void arm_shift_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | int8_t | +shiftBits, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Shifts the elements of a Q7 vector a specified number of bits.
+[in] | pSrc | points to the input vector |
[in] | shiftBits | number of bits to shift. A positive value shifts left; a negative value shifts right. |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
void | arm_sub_f16 (const float16_t *pSrcA, const float16_t *pSrcB, float16_t *pDst, uint32_t blockSize) |
Floating-point vector subtraction. | |
void | arm_sub_f32 (const float32_t *pSrcA, const float32_t *pSrcB, float32_t *pDst, uint32_t blockSize) |
Floating-point vector subtraction. | |
void | arm_sub_f64 (const float64_t *pSrcA, const float64_t *pSrcB, float64_t *pDst, uint32_t blockSize) |
Floating-point vector subtraction. | |
void | arm_sub_q15 (const q15_t *pSrcA, const q15_t *pSrcB, q15_t *pDst, uint32_t blockSize) |
Q15 vector subtraction. | |
void | arm_sub_q31 (const q31_t *pSrcA, const q31_t *pSrcB, q31_t *pDst, uint32_t blockSize) |
Q31 vector subtraction. | |
void | arm_sub_q7 (const q7_t *pSrcA, const q7_t *pSrcB, q7_t *pDst, uint32_t blockSize) |
Q7 vector subtraction. | |
Element-by-element subtraction of two vectors.
++ pDst[n] = pSrcA[n] - pSrcB[n], 0 <= n < blockSize. +
There are separate functions for floating-point, Q7, Q15, and Q31 data types.
+void arm_sub_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector subtraction.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_sub_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector subtraction.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_sub_f64 | +( | +const float64_t * | +pSrcA, | +
+ | + | const float64_t * | +pSrcB, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector subtraction.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_sub_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q15 vector subtraction.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_sub_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q31 vector subtraction.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_sub_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Q7 vector subtraction.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
float16_t | arm_bilinear_interp_f16 (const arm_bilinear_interp_instance_f16 *S, float16_t X, float16_t Y) |
Floating-point bilinear interpolation. | |
float32_t | arm_bilinear_interp_f32 (const arm_bilinear_interp_instance_f32 *S, float32_t X, float32_t Y) |
Floating-point bilinear interpolation. | |
q15_t | arm_bilinear_interp_q15 (arm_bilinear_interp_instance_q15 *S, q31_t X, q31_t Y) |
Q15 bilinear interpolation. | |
q31_t | arm_bilinear_interp_q31 (arm_bilinear_interp_instance_q31 *S, q31_t X, q31_t Y) |
Q31 bilinear interpolation. | |
q7_t | arm_bilinear_interp_q7 (arm_bilinear_interp_instance_q7 *S, q31_t X, q31_t Y) |
Q7 bilinear interpolation. | |
Bilinear interpolation is an extension of linear interpolation applied to a two dimensional grid. The underlying function f(x, y)
is sampled on a regular grid and the interpolation process determines values between the grid points. Bilinear interpolation is equivalent to two step linear interpolation, first in the x-dimension and then in the y-dimension. Bilinear interpolation is often used in image processing to rescale images. The CMSIS DSP library provides bilinear interpolation functions for Q7, Q15, Q31, and floating-point data types.
Algorithm
+ typedef struct + { + uint16_t numRows; + uint16_t numCols; + const float32_t *pData; +} arm_bilinear_interp_instance_f32; +
numRows
specifies the number of rows in the table; numCols
specifies the number of columns in the table; and pData
points to an array of size numRows*numCols
values. The data table pTable
is organized in row order and the supplied data values fall on integer indexes. That is, table element (x,y) is located at pTable[x + y*numCols]
where x and y are integers.(x, y)
specify the desired interpolation point. Then define: + XF = floor(x) + YF = floor(y) +
+ f(x, y) = f(XF, YF) * (1-(x-XF)) * (1-(y-YF)) + + f(XF+1, YF) * (x-XF)*(1-(y-YF)) + + f(XF, YF+1) * (1-(x-XF))*(y-YF) + + f(XF+1, YF+1) * (x-XF)*(y-YF) +Note that the coordinates (x, y) contain integer and fractional components. The integer components specify which portion of the table to use while the fractional components control the interpolation processor.
end of LinearInterpolate group
+float16_t arm_bilinear_interp_f16 | +( | +const arm_bilinear_interp_instance_f16 * | +S, | +
+ | + | float16_t | +X, | +
+ | + | float16_t | +Y | +
+ | ) | ++ |
Floating-point bilinear interpolation.
+[in,out] | S | points to an instance of the interpolation structure. |
[in] | X | interpolation coordinate. |
[in] | Y | interpolation coordinate. |
float32_t arm_bilinear_interp_f32 | +( | +const arm_bilinear_interp_instance_f32 * | +S, | +
+ | + | float32_t | +X, | +
+ | + | float32_t | +Y | +
+ | ) | ++ |
Floating-point bilinear interpolation.
+[in,out] | S | points to an instance of the interpolation structure. |
[in] | X | interpolation coordinate. |
[in] | Y | interpolation coordinate. |
q15_t arm_bilinear_interp_q15 | +( | +arm_bilinear_interp_instance_q15 * | +S, | +
+ | + | q31_t | +X, | +
+ | + | q31_t | +Y | +
+ | ) | ++ |
Q15 bilinear interpolation.
+[in,out] | S | points to an instance of the interpolation structure. |
[in] | X | interpolation coordinate in 12.20 format. |
[in] | Y | interpolation coordinate in 12.20 format. |
q31_t arm_bilinear_interp_q31 | +( | +arm_bilinear_interp_instance_q31 * | +S, | +
+ | + | q31_t | +X, | +
+ | + | q31_t | +Y | +
+ | ) | ++ |
Q31 bilinear interpolation.
+[in,out] | S | points to an instance of the interpolation structure. |
[in] | X | interpolation coordinate in 12.20 format. |
[in] | Y | interpolation coordinate in 12.20 format. |
q7_t arm_bilinear_interp_q7 | +( | +arm_bilinear_interp_instance_q7 * | +S, | +
+ | + | q31_t | +X, | +
+ | + | q31_t | +Y | +
+ | ) | ++ |
Q7 bilinear interpolation.
+[in,out] | S | points to an instance of the interpolation structure. |
[in] | X | interpolation coordinate in 12.20 format. |
[in] | Y | interpolation coordinate in 12.20 format. |
+Functions | |
void | arm_biquad_cascade_df1_f16 (const arm_biquad_casd_df1_inst_f16 *S, const float16_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Processing function for the floating-point Biquad cascade filter. | |
void | arm_biquad_cascade_df1_f32 (const arm_biquad_casd_df1_inst_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Processing function for the floating-point Biquad cascade filter. | |
void | arm_biquad_cascade_df1_fast_q15 (const arm_biquad_casd_df1_inst_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Processing function for the Q15 Biquad cascade filter (fast variant). | |
void | arm_biquad_cascade_df1_fast_q31 (const arm_biquad_casd_df1_inst_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for the Q31 Biquad cascade filter (fast variant). | |
void | arm_biquad_cascade_df1_init_f16 (arm_biquad_casd_df1_inst_f16 *S, uint8_t numStages, const float16_t *pCoeffs, float16_t *pState) |
Initialization function for the floating-point Biquad cascade filter. | |
void | arm_biquad_cascade_df1_init_f32 (arm_biquad_casd_df1_inst_f32 *S, uint8_t numStages, const float32_t *pCoeffs, float32_t *pState) |
Initialization function for the floating-point Biquad cascade filter. | |
void | arm_biquad_cascade_df1_init_q15 (arm_biquad_casd_df1_inst_q15 *S, uint8_t numStages, const q15_t *pCoeffs, q15_t *pState, int8_t postShift) |
Initialization function for the Q15 Biquad cascade filter. | |
void | arm_biquad_cascade_df1_init_q31 (arm_biquad_casd_df1_inst_q31 *S, uint8_t numStages, const q31_t *pCoeffs, q31_t *pState, int8_t postShift) |
Initialization function for the Q31 Biquad cascade filter. | |
void | arm_biquad_cascade_df1_q15 (const arm_biquad_casd_df1_inst_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Processing function for the Q15 Biquad cascade filter. | |
void | arm_biquad_cascade_df1_q31 (const arm_biquad_casd_df1_inst_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for the Q31 Biquad cascade filter. | |
This set of functions implements arbitrary order recursive (IIR) filters. The filters are implemented as a cascade of second order Biquad sections. The functions support Q15, Q31 and floating-point data types. Fast version of Q15 and Q31 also available.
+The functions operate on blocks of input and output data and each call to the function processes blockSize
samples through the filter. pSrc
points to the array of input data and pDst
points to the array of output data. Both arrays contain blockSize
values.
+ y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] +A Direct Form I algorithm is used with 5 coefficients and 4 state variables per stage.
b0, b1 and b2
multiply the input signal x[n]
and are referred to as the feedforward coefficients. Coefficients a1
and a2
multiply the output signal y[n]
and are referred to as the feedback coefficients. Pay careful attention to the sign of the feedback coefficients. Some design tools use the difference equation + y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] - a1 * y[n-1] - a2 * y[n-2] +In this case the feedback coefficients
a1
and a2
must be negated when used with the CMSIS DSP Library.numStages
refers to the number of second order stages used. For example, an 8th order filter would be realized with numStages=4
second order stages. numStages=5
second order stages with the coefficients for one of the stages configured as a first order filter (b2=0
and a2=0
).pState
points to state variables array. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1],
and y[n-2]
. The state variables are arranged in the pState
array as: + {x[n-1], x[n-2], y[n-1], y[n-2]} +
4*numStages
values. The state variables are updated after each block of data is processed, the coefficients are untouched.+ arm_biquad_casd_df1_inst_f32 S1 = {numStages, pState, pCoeffs}; + arm_biquad_casd_df1_inst_q15 S2 = {numStages, pState, pCoeffs, postShift}; + arm_biquad_casd_df1_inst_q31 S3 = {numStages, pState, pCoeffs, postShift}; +where
numStages
is the number of Biquad stages in the filter; pState
is the address of the state buffer; pCoeffs
is the address of the coefficient buffer; postShift
shift to be applied.[-1 +1)
. The fixed-point functions have an additional scaling parameter postShift
which allow the filter coefficients to exceed the range [+1 -1)
. At the output of the filter's accumulator is a shift register which shifts the result by postShift
bits. 2^postShift
. For example, to realize the coefficients + {1.5, -0.8, 1.2, 1.6, -0.9} +set the pCoeffs array to:
+ {0.75, -0.4, 0.6, 0.8, -0.45} +and set
postShift=1
void arm_biquad_cascade_df1_f16 | +( | +const arm_biquad_casd_df1_inst_f16 * | +S, | +
+ | + | const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point Biquad cascade filter.
+[in] | S | points to an instance of the floating-point Biquad cascade structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_biquad_cascade_df1_f32 | +( | +const arm_biquad_casd_df1_inst_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point Biquad cascade filter.
+[in] | S | points to an instance of the floating-point Biquad cascade structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_biquad_cascade_df1_fast_q15 | +( | +const arm_biquad_casd_df1_inst_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q15 Biquad cascade filter (fast variant).
+Fast but less precise processing function for the Q15 Biquad cascade filter for Cortex-M3 and Cortex-M4.
+[in] | S | points to an instance of the Q15 Biquad cascade structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process per call |
postShift
bits and the result truncated to 1.15 format by discarding the low 16 bits. void arm_biquad_cascade_df1_fast_q31 | +( | +const arm_biquad_casd_df1_inst_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 Biquad cascade filter (fast variant).
+Fast but less precise processing function for the Q31 Biquad cascade filter for Cortex-M3 and Cortex-M4.
+[in] | S | points to an instance of the Q31 Biquad cascade structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process per call |
void arm_biquad_cascade_df1_init_f16 | +( | +arm_biquad_casd_df1_inst_f16 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const float16_t * | +pCoeffs, | +
+ | + | float16_t * | +pState | +
+ | ) | ++ |
Initialization function for the floating-point Biquad cascade filter.
+[in,out] | S | points to an instance of the floating-point Biquad cascade structure. |
[in] | numStages | number of 2nd order stages in the filter. |
[in] | pCoeffs | points to the filter coefficients. |
[in] | pState | points to the state buffer. |
pCoeffs
in the following order: + {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 5*numStages
values. pState
is a pointer to state array. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1],
and y[n-2]
. The state variables are arranged in the pState
array as: + {x[n-1], x[n-2], y[n-1], y[n-2]} +The 4 state variables for stage 1 are first, then the 4 state variables for stage 2, and so on. The state array has a total length of
4*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched.The initialization function which must be used is arm_biquad_cascade_df1_mve_init_f16.
+ +void arm_biquad_cascade_df1_init_f32 | +( | +arm_biquad_casd_df1_inst_f32 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState | +
+ | ) | ++ |
Initialization function for the floating-point Biquad cascade filter.
+[in,out] | S | points to an instance of the floating-point Biquad cascade structure. |
[in] | numStages | number of 2nd order stages in the filter. |
[in] | pCoeffs | points to the filter coefficients. |
[in] | pState | points to the state buffer. |
pCoeffs
in the following order: + {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 5*numStages
values. pState
is a pointer to state array. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1],
and y[n-2]
. The state variables are arranged in the pState
array as: + {x[n-1], x[n-2], y[n-1], y[n-2]} +The 4 state variables for stage 1 are first, then the 4 state variables for stage 2, and so on. The state array has a total length of
4*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched.The initialization function which must be used is arm_biquad_cascade_df1_mve_init_f32.
+ +void arm_biquad_cascade_df1_init_q15 | +( | +arm_biquad_casd_df1_inst_q15 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const q15_t * | +pCoeffs, | +
+ | + | q15_t * | +pState, | +
+ | + | int8_t | +postShift | +
+ | ) | ++ |
Initialization function for the Q15 Biquad cascade filter.
+[in,out] | S | points to an instance of the Q15 Biquad cascade structure. |
[in] | numStages | number of 2nd order stages in the filter. |
[in] | pCoeffs | points to the filter coefficients. |
[in] | pState | points to the state buffer. |
[in] | postShift | Shift to be applied to the accumulator result. Varies according to the coefficients format |
pCoeffs
in the following order: + {b10, 0, b11, b12, a11, a12, b20, 0, b21, b22, a21, a22, ...} +
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 6*numStages
values. The zero coefficient between b1
and b2
facilities use of 16-bit SIMD instructions on the Cortex-M4. pState
. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1],
and y[n-2]
. The state variables are arranged in the pState
array as: + {x[n-1], x[n-2], y[n-1], y[n-2]} +The 4 state variables for stage 1 are first, then the 4 state variables for stage 2, and so on. The state array has a total length of
4*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched. void arm_biquad_cascade_df1_init_q31 | +( | +arm_biquad_casd_df1_inst_q31 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const q31_t * | +pCoeffs, | +
+ | + | q31_t * | +pState, | +
+ | + | int8_t | +postShift | +
+ | ) | ++ |
Initialization function for the Q31 Biquad cascade filter.
+[in,out] | S | points to an instance of the Q31 Biquad cascade structure. |
[in] | numStages | number of 2nd order stages in the filter. |
[in] | pCoeffs | points to the filter coefficients. |
[in] | pState | points to the state buffer. |
[in] | postShift | Shift to be applied after the accumulator. Varies according to the coefficients format |
pCoeffs
in the following order: + {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 5*numStages
values. pState
points to state variables array. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1],
and y[n-2]
. The state variables are arranged in the pState
array as: + {x[n-1], x[n-2], y[n-1], y[n-2]} +The 4 state variables for stage 1 are first, then the 4 state variables for stage 2, and so on. The state array has a total length of
4*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched. void arm_biquad_cascade_df1_q15 | +( | +const arm_biquad_casd_df1_inst_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q15 Biquad cascade filter.
+[in] | S | points to an instance of the Q15 Biquad cascade structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the location where the output result is written |
[in] | blockSize | number of samples to process |
postShift
bits to truncate the result to 1.15 format by discarding the low 16 bits. Finally, the result is saturated to 1.15 format. void arm_biquad_cascade_df1_q31 | +( | +const arm_biquad_casd_df1_inst_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 Biquad cascade filter.
+[in] | S | points to an instance of the Q31 Biquad cascade structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
postShift
bits and the result truncated to 1.31 format by discarding the low 32 bits. +Functions | |
void | arm_biquad_cas_df1_32x64_init_q31 (arm_biquad_cas_df1_32x64_ins_q31 *S, uint8_t numStages, const q31_t *pCoeffs, q63_t *pState, uint8_t postShift) |
Initialization function for the Q31 Biquad cascade 32x64 filter. | |
void | arm_biquad_cas_df1_32x64_q31 (const arm_biquad_cas_df1_32x64_ins_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for the Q31 Biquad cascade 32x64 filter. | |
This function implements a high precision Biquad cascade filter which operates on Q31 data values. The filter coefficients are in 1.31 format and the state variables are in 1.63 format. The double precision state variables reduce quantization noise in the filter and provide a cleaner output. These filters are particularly useful when implementing filters in which the singularities are close to the unit circle. This is common for low pass or high pass filters with very low cutoff frequencies.
+The function operates on blocks of input and output data and each call to the function processes blockSize
samples through the filter. pSrc
and pDst
points to input and output arrays containing blockSize
Q31 values.
+ y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] + a1 * y[n-1] + a2 * y[n-2] +A Direct Form I algorithm is used with 5 coefficients and 4 state variables per stage.
b0, b1 and b2
multiply the input signal x[n]
and are referred to as the feedforward coefficients. Coefficients a1
and a2
multiply the output signal y[n]
and are referred to as the feedback coefficients. Pay careful attention to the sign of the feedback coefficients. Some design tools use the difference equation + y[n] = b0 * x[n] + b1 * x[n-1] + b2 * x[n-2] - a1 * y[n-1] - a2 * y[n-2] +In this case the feedback coefficients
a1
and a2
must be negated when used with the CMSIS DSP Library. numStages
refers to the number of second order stages used. For example, an 8th order filter would be realized with numStages=4
second order stages. numStages=5
second order stages with the coefficients for one of the stages configured as a first order filter (b2=0
and a2=0
). pState
points to state variables array. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1],
and y[n-2]
and each state variable in 1.63 format to improve precision. The state variables are arranged in the array as: + {x[n-1], x[n-2], y[n-1], y[n-2]} +
4*numStages
values of data in 1.63 format. The state variables are updated after each block of data is processed, the coefficients are untouched.+ arm_biquad_cas_df1_32x64_ins_q31 S1 = {numStages, pState, pCoeffs, postShift}; +where
numStages
is the number of Biquad stages in the filter; pState
is the address of the state buffer; pCoeffs
is the address of the coefficient buffer; postShift
shift to be applied which is described in detail below. [-1 +1)
. The processing function has an additional scaling parameter postShift
which allows the filter coefficients to exceed the range [+1 -1)
. At the output of the filter's accumulator is a shift register which shifts the result by postShift
bits. 2^postShift
. For example, to realize the coefficients + {1.5, -0.8, 1.2, 1.6, -0.9} +set the Coefficient array to:
+ {0.75, -0.4, 0.6, 0.8, -0.45} +and set
postShift=1
void arm_biquad_cas_df1_32x64_init_q31 | +( | +arm_biquad_cas_df1_32x64_ins_q31 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const q31_t * | +pCoeffs, | +
+ | + | q63_t * | +pState, | +
+ | + | uint8_t | +postShift | +
+ | ) | ++ |
Initialization function for the Q31 Biquad cascade 32x64 filter.
+[in,out] | S | points to an instance of the high precision Q31 Biquad cascade filter structure |
[in] | numStages | number of 2nd order stages in the filter |
[in] | pCoeffs | points to the filter coefficients |
[in] | pState | points to the state buffer |
[in] | postShift | Shift to be applied after the accumulator. Varies according to the coefficients format |
pCoeffs
in the following order: + {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +where
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 5*numStages
values. pState
points to state variables array and size of each state variable is 1.63 format. Each Biquad stage has 4 state variables x[n-1], x[n-2], y[n-1],
and y[n-2]
. The state variables are arranged in the state array as: + {x[n-1], x[n-2], y[n-1], y[n-2]} +The 4 state variables for stage 1 are first, then the 4 state variables for stage 2, and so on. The state array has a total length of
4*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched. void arm_biquad_cas_df1_32x64_q31 | +( | +const arm_biquad_cas_df1_32x64_ins_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 Biquad cascade 32x64 filter.
+[in] | S | points to an instance of the high precision Q31 Biquad cascade filter |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
postShift
bits and the result truncated to 1.31 format by discarding the low 32 bits. +Functions | |
void | arm_biquad_cascade_df2T_f16 (const arm_biquad_cascade_df2T_instance_f16 *S, const float16_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Processing function for the floating-point transposed direct form II Biquad cascade filter. | |
void | arm_biquad_cascade_df2T_f32 (const arm_biquad_cascade_df2T_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Processing function for the floating-point transposed direct form II Biquad cascade filter. | |
void | arm_biquad_cascade_df2T_f64 (const arm_biquad_cascade_df2T_instance_f64 *S, const float64_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Processing function for the floating-point transposed direct form II Biquad cascade filter. | |
void | arm_biquad_cascade_df2T_init_f16 (arm_biquad_cascade_df2T_instance_f16 *S, uint8_t numStages, const float16_t *pCoeffs, float16_t *pState) |
Initialization function for the floating-point transposed direct form II Biquad cascade filter. | |
void | arm_biquad_cascade_df2T_compute_coefs_f32 (uint8_t numStages, const float32_t *pCoeffs, float32_t *pComputedCoeffs) |
Compute new coefficient arrays for use in vectorized filter (Neon only). | |
void | arm_biquad_cascade_df2T_init_f32 (arm_biquad_cascade_df2T_instance_f32 *S, uint8_t numStages, const float32_t *pCoeffs, float32_t *pState) |
Initialization function for the floating-point transposed direct form II Biquad cascade filter. | |
void | arm_biquad_cascade_df2T_init_f64 (arm_biquad_cascade_df2T_instance_f64 *S, uint8_t numStages, const float64_t *pCoeffs, float64_t *pState) |
Initialization function for the floating-point transposed direct form II Biquad cascade filter. | |
void | arm_biquad_cascade_stereo_df2T_f16 (const arm_biquad_cascade_stereo_df2T_instance_f16 *S, const float16_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Processing function for the floating-point transposed direct form II Biquad cascade filter. | |
void | arm_biquad_cascade_stereo_df2T_f32 (const arm_biquad_cascade_stereo_df2T_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Processing function for the floating-point transposed direct form II Biquad cascade filter. | |
void | arm_biquad_cascade_stereo_df2T_init_f16 (arm_biquad_cascade_stereo_df2T_instance_f16 *S, uint8_t numStages, const float16_t *pCoeffs, float16_t *pState) |
Initialization function for the floating-point transposed direct form II Biquad cascade filter. | |
void | arm_biquad_cascade_stereo_df2T_init_f32 (arm_biquad_cascade_stereo_df2T_instance_f32 *S, uint8_t numStages, const float32_t *pCoeffs, float32_t *pState) |
Initialization function for the floating-point transposed direct form II Biquad cascade filter. | |
This set of functions implements arbitrary order recursive (IIR) filters using a transposed direct form II structure. The filters are implemented as a cascade of second order Biquad sections. These functions provide a slight memory savings as compared to the direct form I Biquad filter functions. Only floating-point data is supported.
+This function operate on blocks of input and output data and each call to the function processes blockSize
samples through the filter. pSrc
points to the array of input data and pDst
points to the array of output data. Both arrays contain blockSize
values.
+ y[n] = b0 * x[n] + d1 + d1 = b1 * x[n] + a1 * y[n] + d2 + d2 = b2 * x[n] + a2 * y[n] +where d1 and d2 represent the two state values.
b0, b1, and b2
multiply the input signal x[n]
and are referred to as the feedforward coefficients. Coefficients a1
and a2
multiply the output signal y[n]
and are referred to as the feedback coefficients. Pay careful attention to the sign of the feedback coefficients. Some design tools flip the sign of the feedback coefficients: + y[n] = b0 * x[n] + d1; + d1 = b1 * x[n] - a1 * y[n] + d2; + d2 = b2 * x[n] - a2 * y[n]; +In this case the feedback coefficients
a1
and a2
must be negated when used with the CMSIS DSP Library. numStages
refers to the number of second order stages used. For example, an 8th order filter would be realized with numStages=4
second order stages. A 9th order filter would be realized with numStages=5
second order stages with the coefficients for one of the stages configured as a first order filter (b2=0
and a2=0
). pState
points to the state variable array. Each Biquad stage has 2 state variables d1
and d2
. The state variables are arranged in the pState
array as: + {d11, d12, d21, d22, ...} +where
d1x
refers to the state variables for the first Biquad and d2x
refers to the state variables for the second Biquad. The state array has a total length of 2*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched. d1
and d2
. Because of this, the CMSIS library only has a floating-point version of the Direct Form II Biquad. The advantage of the Direct Form II Biquad is that it requires half the number of state variables, 2 rather than 4, per Biquad stage.+ arm_biquad_cascade_df2T_instance_f64 S1 = {numStages, pState, pCoeffs}; + arm_biquad_cascade_df2T_instance_f32 S1 = {numStages, pState, pCoeffs}; +where
numStages
is the number of Biquad stages in the filter; pState
is the address of the state buffer. pCoeffs
is the address of the coefficient buffer;See the documentation of arm_biquad_cascade_df2T_init_x for more details.
+void arm_biquad_cascade_df2T_compute_coefs_f32 | +( | +uint8_t | +numStages, | +
+ | + | const float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pComputedCoeffs | +
+ | ) | ++ |
Compute new coefficient arrays for use in vectorized filter (Neon only).
+[in] | numStages | number of 2nd order stages in the filter. |
[in] | pCoeffs | points to the original filter coefficients. |
[in] | pComputedCoeffs | points to the new computed coefficients for the vectorized Neon version. |
pComputedCoeffs has size 8 * numStages
+pComputedCoeffs is the array to be used in arm_biquad_cascade_df2T_init_f32.
+ +void arm_biquad_cascade_df2T_f16 | +( | +const arm_biquad_cascade_df2T_instance_f16 * | +S, | +
+ | + | const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point transposed direct form II Biquad cascade filter.
+[in] | S | points to an instance of the filter data structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_biquad_cascade_df2T_f32 | +( | +const arm_biquad_cascade_df2T_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point transposed direct form II Biquad cascade filter.
+[in] | S | points to an instance of the filter data structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_biquad_cascade_df2T_f64 | +( | +const arm_biquad_cascade_df2T_instance_f64 * | +S, | +
+ | + | const float64_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point transposed direct form II Biquad cascade filter.
+[in] | S | points to an instance of the filter data structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_biquad_cascade_df2T_init_f16 | +( | +arm_biquad_cascade_df2T_instance_f16 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const float16_t * | +pCoeffs, | +
+ | + | float16_t * | +pState | +
+ | ) | ++ |
Initialization function for the floating-point transposed direct form II Biquad cascade filter.
+[in,out] | S | points to an instance of the filter data structure. |
[in] | numStages | number of 2nd order stages in the filter. |
[in] | pCoeffs | points to the filter coefficients. |
[in] | pState | points to the state buffer. |
pCoeffs
in the following order in the not Neon version. + {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 5*numStages
values.For Neon version, this array is bigger. If numstages = 4x + y, then the array has size: 32*x + 5*y and it must be initialized using the function arm_biquad_cascade_df2T_compute_coefs_f16 which is taking the standard array coefficient as parameters.
+But, an array of 8*numstages is a good approximation.
+Then, the initialization can be done with:
+ arm_biquad_cascade_df2T_init_f16(&SNeon, nbCascade, neonCoefs, stateNeon); + arm_biquad_cascade_df2T_compute_coefs_f16(&SNeon,nbCascade,coefs); +
+ {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
pState
is a pointer to state array. Each Biquad stage has 2 state variables d1,
and d2
. The 2 state variables for stage 1 are first, then the 2 state variables for stage 2, and so on. The state array has a total length of 2*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched. void arm_biquad_cascade_df2T_init_f32 | +( | +arm_biquad_cascade_df2T_instance_f32 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState | +
+ | ) | ++ |
Initialization function for the floating-point transposed direct form II Biquad cascade filter.
+[in,out] | S | points to an instance of the filter data structure. |
[in] | numStages | number of 2nd order stages in the filter. |
[in] | pCoeffs | points to the filter coefficients. |
[in] | pState | points to the state buffer. |
pCoeffs
in the following order in the not Neon version. + {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 5*numStages
values.For Neon version, this array is bigger. If numstages = 4x + y, then the array has size: 32*x + 5*y and it must be initialized using the function arm_biquad_cascade_df2T_compute_coefs_f32 which is taking the standard array coefficient as parameters.
+But, an array of 8*numstages is a good approximation.
+Then, the initialization can be done with:
+ arm_biquad_cascade_df2T_compute_coefs_f32(nbCascade,coefs,computedCoefs); + arm_biquad_cascade_df2T_init_f32(&SNeon, nbCascade, computedCoefs, stateNeon); +
+ {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
pState
is a pointer to state array. Each Biquad stage has 2 state variables d1,
and d2
. The 2 state variables for stage 1 are first, then the 2 state variables for stage 2, and so on. The state array has a total length of 2*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched. void arm_biquad_cascade_df2T_init_f64 | +( | +arm_biquad_cascade_df2T_instance_f64 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const float64_t * | +pCoeffs, | +
+ | + | float64_t * | +pState | +
+ | ) | ++ |
Initialization function for the floating-point transposed direct form II Biquad cascade filter.
+[in,out] | S | points to an instance of the filter data structure |
[in] | numStages | number of 2nd order stages in the filter |
[in] | pCoeffs | points to the filter coefficients |
[in] | pState | points to the state buffer |
pCoeffs
in the following order: + {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 5*numStages
values. pState
is a pointer to state array. Each Biquad stage has 2 state variables d1,
and d2
. The 2 state variables for stage 1 are first, then the 2 state variables for stage 2, and so on. The state array has a total length of 2*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched. void arm_biquad_cascade_stereo_df2T_f16 | +( | +const arm_biquad_cascade_stereo_df2T_instance_f16 * | +S, | +
+ | + | const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point transposed direct form II Biquad cascade filter.
+Processing function for the floating-point transposed direct form II Biquad cascade filter. 2 channels.
+[in] | S | points to an instance of the filter data structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_biquad_cascade_stereo_df2T_f32 | +( | +const arm_biquad_cascade_stereo_df2T_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point transposed direct form II Biquad cascade filter.
+Processing function for the floating-point transposed direct form II Biquad cascade filter. 2 channels.
+[in] | S | points to an instance of the filter data structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_biquad_cascade_stereo_df2T_init_f16 | +( | +arm_biquad_cascade_stereo_df2T_instance_f16 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const float16_t * | +pCoeffs, | +
+ | + | float16_t * | +pState | +
+ | ) | ++ |
Initialization function for the floating-point transposed direct form II Biquad cascade filter.
+[in,out] | S | points to an instance of the filter data structure. |
[in] | numStages | number of 2nd order stages in the filter. |
[in] | pCoeffs | points to the filter coefficients. |
[in] | pState | points to the state buffer. |
pCoeffs
in the following order: + {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 5*numStages
values. pState
is a pointer to state array. Each Biquad stage has 2 state variables d1,
and d2
for each channel. The 2 state variables for stage 1 are first, then the 2 state variables for stage 2, and so on. The state array has a total length of 2*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched. void arm_biquad_cascade_stereo_df2T_init_f32 | +( | +arm_biquad_cascade_stereo_df2T_instance_f32 * | +S, | +
+ | + | uint8_t | +numStages, | +
+ | + | const float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState | +
+ | ) | ++ |
Initialization function for the floating-point transposed direct form II Biquad cascade filter.
+[in,out] | S | points to an instance of the filter data structure. |
[in] | numStages | number of 2nd order stages in the filter. |
[in] | pCoeffs | points to the filter coefficients. |
[in] | pState | points to the state buffer. |
pCoeffs
in the following order: + {b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...} +
b1x
and a1x
are the coefficients for the first stage, b2x
and a2x
are the coefficients for the second stage, and so on. The pCoeffs
array contains a total of 5*numStages
values. pState
is a pointer to state array. Each Biquad stage has 2 state variables d1,
and d2
for each channel. The 2 state variables for stage 1 are first, then the 2 state variables for stage 2, and so on. The state array has a total length of 2*numStages
values. The state variables are updated after each block of data is processed; the coefficients are untouched. +Functions | |
float32_t | arm_hamming_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools) |
Hamming distance between two vectors. | |
float32_t | arm_jaccard_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools) |
Jaccard distance between two vectors. | |
float32_t | arm_kulsinski_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools) |
Kulsinski distance between two vectors. | |
float32_t | arm_rogerstanimoto_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools) |
Rogers Tanimoto distance between two vectors. | |
float32_t | arm_russellrao_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools) |
Russell-Rao distance between two vectors. | |
float32_t | arm_sokalmichener_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools) |
Sokal-Michener distance between two vectors. | |
float32_t | arm_sokalsneath_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools) |
Sokal-Sneath distance between two vectors. | |
float32_t | arm_yule_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools) |
Yule distance between two vectors. | |
float32_t | arm_dice_distance (const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools) |
Dice distance between two vectors. | |
Distances between two vectors of boolean values.
+Booleans are packed in 32 bit words. numberOfBooleans argument is the number of booleans and not the number of words.
+Bits are packed in big-endian mode (because of behavior of numpy packbits in in version < 1.17)
+float32_t arm_dice_distance | +( | +const uint32_t * | +pA, | +
+ | + | const uint32_t * | +pB, | +
+ | + | uint32_t | +numberOfBools | +
+ | ) | ++ |
Dice distance between two vectors.
+[in] | pA | First vector of packed booleans |
[in] | pB | Second vector of packed booleans |
[in] | numberOfBools | Number of booleans |
float32_t arm_hamming_distance | +( | +const uint32_t * | +pA, | +
+ | + | const uint32_t * | +pB, | +
+ | + | uint32_t | +numberOfBools | +
+ | ) | ++ |
Hamming distance between two vectors.
+[in] | pA | First vector of packed booleans |
[in] | pB | Second vector of packed booleans |
[in] | numberOfBools | Number of booleans |
float32_t arm_jaccard_distance | +( | +const uint32_t * | +pA, | +
+ | + | const uint32_t * | +pB, | +
+ | + | uint32_t | +numberOfBools | +
+ | ) | ++ |
Jaccard distance between two vectors.
+[in] | pA | First vector of packed booleans |
[in] | pB | Second vector of packed booleans |
[in] | numberOfBools | Number of booleans |
float32_t arm_kulsinski_distance | +( | +const uint32_t * | +pA, | +
+ | + | const uint32_t * | +pB, | +
+ | + | uint32_t | +numberOfBools | +
+ | ) | ++ |
Kulsinski distance between two vectors.
+[in] | pA | First vector of packed booleans |
[in] | pB | Second vector of packed booleans |
[in] | numberOfBools | Number of booleans |
float32_t arm_rogerstanimoto_distance | +( | +const uint32_t * | +pA, | +
+ | + | const uint32_t * | +pB, | +
+ | + | uint32_t | +numberOfBools | +
+ | ) | ++ |
Rogers Tanimoto distance between two vectors.
+Roger Stanimoto distance between two vectors.
+[in] | pA | First vector of packed booleans |
[in] | pB | Second vector of packed booleans |
[in] | numberOfBools | Number of booleans |
float32_t arm_russellrao_distance | +( | +const uint32_t * | +pA, | +
+ | + | const uint32_t * | +pB, | +
+ | + | uint32_t | +numberOfBools | +
+ | ) | ++ |
Russell-Rao distance between two vectors.
+[in] | pA | First vector of packed booleans |
[in] | pB | Second vector of packed booleans |
[in] | numberOfBools | Number of booleans |
float32_t arm_sokalmichener_distance | +( | +const uint32_t * | +pA, | +
+ | + | const uint32_t * | +pB, | +
+ | + | uint32_t | +numberOfBools | +
+ | ) | ++ |
Sokal-Michener distance between two vectors.
+[in] | pA | First vector of packed booleans |
[in] | pB | Second vector of packed booleans |
[in] | numberOfBools | Number of booleans |
float32_t arm_sokalsneath_distance | +( | +const uint32_t * | +pA, | +
+ | + | const uint32_t * | +pB, | +
+ | + | uint32_t | +numberOfBools | +
+ | ) | ++ |
Sokal-Sneath distance between two vectors.
+[in] | pA | First vector of packed booleans |
[in] | pB | Second vector of packed booleans |
[in] | numberOfBools | Number of booleans |
float32_t arm_yule_distance | +( | +const uint32_t * | +pA, | +
+ | + | const uint32_t * | +pB, | +
+ | + | uint32_t | +numberOfBools | +
+ | ) | ++ |
Yule distance between two vectors.
+[in] | pA | First vector of packed booleans |
[in] | pB | Second vector of packed booleans |
[in] | numberOfBools | Number of booleans |
+Variables | |
const uint16_t | armBitRevTable [1024] |
Table for bit reversal process. | |
const uint64_t | twiddleCoefF64_16 [32] |
Double Precision Floating-point Twiddle factors Table Generation. | |
const uint64_t | twiddleCoefF64_32 [64] |
const uint64_t | twiddleCoefF64_64 [128] |
const uint64_t | twiddleCoefF64_128 [256] |
const uint64_t | twiddleCoefF64_256 [512] |
const uint64_t | twiddleCoefF64_512 [1024] |
const uint64_t | twiddleCoefF64_1024 [2048] |
const uint64_t | twiddleCoefF64_2048 [4096] |
const uint64_t | twiddleCoefF64_4096 [8192] |
const float32_t | twiddleCoef_16 [32] |
const float32_t | twiddleCoef_32 [64] |
const float32_t | twiddleCoef_64 [128] |
const float32_t | twiddleCoef_128 [256] |
const float32_t | twiddleCoef_256 [512] |
const float32_t | twiddleCoef_512 [1024] |
const float32_t | twiddleCoef_1024 [2048] |
const float32_t | twiddleCoef_2048 [4096] |
const float32_t | twiddleCoef_4096 [8192] |
const q31_t | twiddleCoef_16_q31 [24] |
Q31 Twiddle factors Table. | |
const q31_t | twiddleCoef_32_q31 [48] |
const q31_t | twiddleCoef_64_q31 [96] |
const q31_t | twiddleCoef_128_q31 [192] |
const q31_t | twiddleCoef_256_q31 [384] |
const q31_t | twiddleCoef_512_q31 [768] |
const q31_t | twiddleCoef_1024_q31 [1536] |
const q31_t | twiddleCoef_2048_q31 [3072] |
const q31_t | twiddleCoef_4096_q31 [6144] |
const q15_t | twiddleCoef_16_q15 [24] |
q15 Twiddle factors Table | |
const q15_t | twiddleCoef_32_q15 [48] |
const q15_t | twiddleCoef_64_q15 [96] |
const q15_t | twiddleCoef_128_q15 [192] |
const q15_t | twiddleCoef_256_q15 [384] |
const q15_t | twiddleCoef_512_q15 [768] |
const q15_t | twiddleCoef_1024_q15 [1536] |
const q15_t | twiddleCoef_2048_q15 [3072] |
const q15_t | twiddleCoef_4096_q15 [6144] |
const float16_t | twiddleCoefF16_16 [32] |
Floating-point Twiddle factors Table Generation. | |
const float16_t | twiddleCoefF16_32 [64] |
const float16_t | twiddleCoefF16_64 [128] |
const float16_t | twiddleCoefF16_128 [256] |
const float16_t | twiddleCoefF16_256 [512] |
const float16_t | twiddleCoefF16_512 [1024] |
const float16_t | twiddleCoefF16_1024 [2048] |
const float16_t | twiddleCoefF16_2048 [4096] |
const float16_t | twiddleCoefF16_4096 [8192] |
const float16_t | twiddleCoefF16_rfft_32 [32] |
const uint16_t armBitRevTable[1024] | +
Table for bit reversal process.
+for (l = 1; l <= N/4; l++) +{ + for (i = 0; i< logN2; i++) + { + a[i] = l & (1 << i); + } + for (j = 0; j < logN2; j++) + { + if (a[j] != 0) + y[l] += (1 << ((logN2 - 1) - j)); + } + y[l] = y[l] >> 1; + }
const float32_t twiddleCoef_1024[2048] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const q15_t twiddleCoef_1024_q15[1536] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N); +}
const q31_t twiddleCoef_1024_q31[1536] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N); +}
const float32_t twiddleCoef_128[256] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const q15_t twiddleCoef_128_q15[192] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N); +}
const q31_t twiddleCoef_128_q31[192] | +
for (i = 0; i < 3N/4; i++) +{ + twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N); +}
const float32_t twiddleCoef_16[32] | +
for (i = 0; i < N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const q15_t twiddleCoef_16_q15[24] | +
q15 Twiddle factors Table
+fori = 0; i< 3N/4; i++) +{ + twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N); +}
const q31_t twiddleCoef_16_q31[24] | +
Q31 Twiddle factors Table.
+for(i = 0; i< 3N/4; i++) +{ + twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N); +}
const float32_t twiddleCoef_2048[4096] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const q15_t twiddleCoef_2048_q15[3072] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N); +}
const q31_t twiddleCoef_2048_q31[3072] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N); +}
const float32_t twiddleCoef_256[512] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const q15_t twiddleCoef_256_q15[384] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N); +}
const q31_t twiddleCoef_256_q31[384] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N); +}
const float32_t twiddleCoef_32[64] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const q15_t twiddleCoef_32_q15[48] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N); +}
const q31_t twiddleCoef_32_q31[48] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N); +}
const float32_t twiddleCoef_4096[8192] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const q15_t twiddleCoef_4096_q15[6144] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N); +}
const q31_t twiddleCoef_4096_q31[6144] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N); +}
const float32_t twiddleCoef_512[1024] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const q15_t twiddleCoef_512_q15[768] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N); +}
const q31_t twiddleCoef_512_q31[768] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N); +}
const float32_t twiddleCoef_64[128] | +
for(i = 0; i < N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const q15_t twiddleCoef_64_q15[96] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefq15[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefq15[2*i+1] = sin(i * 2*PI/(float)N); +}
const q31_t twiddleCoef_64_q31[96] | +
for (i = 0; i< 3N/4; i++) +{ + twiddleCoefQ31[2*i] = cos(i * 2*PI/(float)N); + twiddleCoefQ31[2*i+1] = sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_1024[2048] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i]= cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_128[256] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i]= cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_16[32] | +
Floating-point Twiddle factors Table Generation.
+for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i]= cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_2048[4096] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i]= cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_256[512] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i]= cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_32[64] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i]= cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_4096[8192] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i]= cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_512[1024] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i]= cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_64[128] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i]= cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1]= sin(i * 2*PI/(float)N); +}
const float16_t twiddleCoefF16_rfft_32[32] | +
TW = exp(pi/2*i-2*pi*i*[0:L/2-1]/L).'
const uint64_t twiddleCoefF64_1024[2048] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const uint64_t twiddleCoefF64_128[256] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const uint64_t twiddleCoefF64_16[32] | +
Double Precision Floating-point Twiddle factors Table Generation.
+for (i = 0; i < N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(double)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(double)N); +}
const uint64_t twiddleCoefF64_2048[4096] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const uint64_t twiddleCoefF64_256[512] | +
for(i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const uint64_t twiddleCoefF64_32[64] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/N); +twiddleCoef[2*i+1] = sin(i * 2*PI/N); +}
const uint64_t twiddleCoefF64_4096[8192] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const uint64_t twiddleCoefF64_512[1024] | +
for (i = 0; i< N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
const uint64_t twiddleCoefF64_64[128] | +
for(i = 0; i < N/; i++) +{ +twiddleCoef[2*i] = cos(i * 2*PI/(float)N); +twiddleCoef[2*i+1] = sin(i * 2*PI/(float)N); +}
+Typedefs | |
+typedef int32_t | index_t |
index datatype. It must be a signed datatype | |
+typedef int32_t | vector_length_t |
Vector length datatype. Iy must be a signed datatype. | |
+Functions | |
float16_t | arm_canberra_distance_f16 (const float16_t *pA, const float16_t *pB, uint32_t blockSize) |
Canberra distance between two vectors. | |
float32_t | arm_canberra_distance_f32 (const float32_t *pA, const float32_t *pB, uint32_t blockSize) |
Canberra distance between two vectors. | |
Canberra distance
+float16_t arm_canberra_distance_f16 | +( | +const float16_t * | +pA, | +
+ | + | const float16_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Canberra distance between two vectors.
+This function may divide by zero when samples pA[i] and pB[i] are both zero. The result of the computation will be correct. So the division per zero may be ignored.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float32_t arm_canberra_distance_f32 | +( | +const float32_t * | +pA, | +
+ | + | const float32_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Canberra distance between two vectors.
+This function may divide by zero when samples pA[i] and pB[i] are both zero. The result of the computation will be correct. So the division per zero may be ignored.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
+Functions | |
float16_t | arm_chebyshev_distance_f16 (const float16_t *pA, const float16_t *pB, uint32_t blockSize) |
Chebyshev distance between two vectors. | |
float32_t | arm_chebyshev_distance_f32 (const float32_t *pA, const float32_t *pB, uint32_t blockSize) |
Chebyshev distance between two vectors. | |
float64_t | arm_chebyshev_distance_f64 (const float64_t *pA, const float64_t *pB, uint32_t blockSize) |
Chebyshev distance between two vectors. | |
Chebyshev distance
+float16_t arm_chebyshev_distance_f16 | +( | +const float16_t * | +pA, | +
+ | + | const float16_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Chebyshev distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float32_t arm_chebyshev_distance_f32 | +( | +const float32_t * | +pA, | +
+ | + | const float32_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Chebyshev distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float64_t arm_chebyshev_distance_f64 | +( | +const float64_t * | +pA, | +
+ | + | const float64_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Chebyshev distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
testMarks_f32
points to the marks scored by 20 students in 4 subjects max_marks
Maximum of all marks min_marks
Minimum of all marks mean
Mean of all marks var
Variance of the marks std
Standard deviation of the marks numStudents
Total number of students in the class+Functions | |
void | arm_cmplx_mult_cmplx_f16 (const float16_t *pSrcA, const float16_t *pSrcB, float16_t *pDst, uint32_t numSamples) |
Floating-point complex-by-complex multiplication. | |
void | arm_cmplx_mult_cmplx_f32 (const float32_t *pSrcA, const float32_t *pSrcB, float32_t *pDst, uint32_t numSamples) |
Floating-point complex-by-complex multiplication. | |
void | arm_cmplx_mult_cmplx_f64 (const float64_t *pSrcA, const float64_t *pSrcB, float64_t *pDst, uint32_t numSamples) |
Floating-point complex-by-complex multiplication. | |
void | arm_cmplx_mult_cmplx_q15 (const q15_t *pSrcA, const q15_t *pSrcB, q15_t *pDst, uint32_t numSamples) |
Q15 complex-by-complex multiplication. | |
void | arm_cmplx_mult_cmplx_q31 (const q31_t *pSrcA, const q31_t *pSrcB, q31_t *pDst, uint32_t numSamples) |
Q31 complex-by-complex multiplication. | |
Multiplies a complex vector by another complex vector and generates a complex result. The data in the complex arrays is stored in an interleaved fashion (real, imag, real, imag, ...). The parameter numSamples
represents the number of complex samples processed. The complex arrays have a total of 2*numSamples
real values.
The underlying algorithm is used:
++for (n = 0; n < numSamples; n++) { + pDst[(2*n)+0] = pSrcA[(2*n)+0] * pSrcB[(2*n)+0] - pSrcA[(2*n)+1] * pSrcB[(2*n)+1]; + pDst[(2*n)+1] = pSrcA[(2*n)+0] * pSrcB[(2*n)+1] + pSrcA[(2*n)+1] * pSrcB[(2*n)+0]; +} +
There are separate functions for floating-point, Q15, and Q31 data types.
+void arm_cmplx_mult_cmplx_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex-by-complex multiplication.
+[in] | pSrcA | points to first input vector |
[in] | pSrcB | points to second input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mult_cmplx_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex-by-complex multiplication.
+[in] | pSrcA | points to first input vector |
[in] | pSrcB | points to second input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mult_cmplx_f64 | +( | +const float64_t * | +pSrcA, | +
+ | + | const float64_t * | +pSrcB, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex-by-complex multiplication.
+[in] | pSrcA | points to first input vector |
[in] | pSrcB | points to second input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mult_cmplx_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q15 complex-by-complex multiplication.
+[in] | pSrcA | points to first input vector |
[in] | pSrcB | points to second input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mult_cmplx_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q31 complex-by-complex multiplication.
+[in] | pSrcA | points to first input vector |
[in] | pSrcB | points to second input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
+Functions | |
void | arm_cmplx_mult_real_f16 (const float16_t *pSrcCmplx, const float16_t *pSrcReal, float16_t *pCmplxDst, uint32_t numSamples) |
Floating-point complex-by-real multiplication. | |
void | arm_cmplx_mult_real_f32 (const float32_t *pSrcCmplx, const float32_t *pSrcReal, float32_t *pCmplxDst, uint32_t numSamples) |
Floating-point complex-by-real multiplication. | |
void | arm_cmplx_mult_real_q15 (const q15_t *pSrcCmplx, const q15_t *pSrcReal, q15_t *pCmplxDst, uint32_t numSamples) |
Q15 complex-by-real multiplication. | |
void | arm_cmplx_mult_real_q31 (const q31_t *pSrcCmplx, const q31_t *pSrcReal, q31_t *pCmplxDst, uint32_t numSamples) |
Q31 complex-by-real multiplication. | |
Multiplies a complex vector by a real vector and generates a complex result. The data in the complex arrays is stored in an interleaved fashion (real, imag, real, imag, ...). The parameter numSamples
represents the number of complex samples processed. The complex arrays have a total of 2*numSamples
real values while the real array has a total of numSamples
real values.
The underlying algorithm is used:
++for (n = 0; n < numSamples; n++) { + pCmplxDst[(2*n)+0] = pSrcCmplx[(2*n)+0] * pSrcReal[n]; + pCmplxDst[(2*n)+1] = pSrcCmplx[(2*n)+1] * pSrcReal[n]; +} +
There are separate functions for floating-point, Q15, and Q31 data types.
+void arm_cmplx_mult_real_f16 | +( | +const float16_t * | +pSrcCmplx, | +
+ | + | const float16_t * | +pSrcReal, | +
+ | + | float16_t * | +pCmplxDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex-by-real multiplication.
+[in] | pSrcCmplx | points to complex input vector |
[in] | pSrcReal | points to real input vector |
[out] | pCmplxDst | points to complex output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mult_real_f32 | +( | +const float32_t * | +pSrcCmplx, | +
+ | + | const float32_t * | +pSrcReal, | +
+ | + | float32_t * | +pCmplxDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex-by-real multiplication.
+[in] | pSrcCmplx | points to complex input vector |
[in] | pSrcReal | points to real input vector |
[out] | pCmplxDst | points to complex output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mult_real_q15 | +( | +const q15_t * | +pSrcCmplx, | +
+ | + | const q15_t * | +pSrcReal, | +
+ | + | q15_t * | +pCmplxDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q15 complex-by-real multiplication.
+[in] | pSrcCmplx | points to complex input vector |
[in] | pSrcReal | points to real input vector |
[out] | pCmplxDst | points to complex output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mult_real_q31 | +( | +const q31_t * | +pSrcCmplx, | +
+ | + | const q31_t * | +pSrcReal, | +
+ | + | q31_t * | +pCmplxDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q31 complex-by-real multiplication.
+[in] | pSrcCmplx | points to complex input vector |
[in] | pSrcReal | points to real input vector |
[out] | pCmplxDst | points to complex output vector |
[in] | numSamples | number of samples in each vector |
+Functions | |
arm_status | arm_mat_cmplx_mult_f16 (const arm_matrix_instance_f16 *pSrcA, const arm_matrix_instance_f16 *pSrcB, arm_matrix_instance_f16 *pDst) |
Floating-point Complex matrix multiplication. | |
arm_status | arm_mat_cmplx_mult_f32 (const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst) |
Floating-point Complex matrix multiplication. | |
arm_status | arm_mat_cmplx_mult_q15 (const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst, q15_t *pScratch) |
Q15 Complex matrix multiplication. | |
arm_status | arm_mat_cmplx_mult_q31 (const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst) |
Q31 Complex matrix multiplication. | |
Complex Matrix multiplication is only defined if the number of columns of the first matrix equals the number of rows of the second matrix. Multiplying an M x N
matrix with an N x P
matrix results in an M x P
matrix.
pSrcA
and pSrcB
are equal;pSrcA
and pSrcB
. arm_status arm_mat_cmplx_mult_f16 | +( | +const arm_matrix_instance_f16 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f16 * | +pSrcB, | +
+ | + | arm_matrix_instance_f16 * | +pDst | +
+ | ) | ++ |
Floating-point Complex matrix multiplication.
+Floating-point, complex, matrix multiplication.
+[in] | pSrcA | points to first input complex matrix structure |
[in] | pSrcB | points to second input complex matrix structure |
[out] | pDst | points to output complex matrix structure |
arm_status arm_mat_cmplx_mult_f32 | +( | +const arm_matrix_instance_f32 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f32 * | +pSrcB, | +
+ | + | arm_matrix_instance_f32 * | +pDst | +
+ | ) | ++ |
Floating-point Complex matrix multiplication.
+Floating-point, complex, matrix multiplication.
+[in] | pSrcA | points to first input complex matrix structure |
[in] | pSrcB | points to second input complex matrix structure |
[out] | pDst | points to output complex matrix structure |
arm_status arm_mat_cmplx_mult_q15 | +( | +const arm_matrix_instance_q15 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q15 * | +pSrcB, | +
+ | + | arm_matrix_instance_q15 * | +pDst, | +
+ | + | q15_t * | +pScratch | +
+ | ) | ++ |
Q15 Complex matrix multiplication.
+Q15, complex, matrix multiplication.
+[in] | pSrcA | points to first input complex matrix structure |
[in] | pSrcB | points to second input complex matrix structure |
[out] | pDst | points to output complex matrix structure |
[in] | pScratch | points to an array for storing intermediate results |
arm_status arm_mat_cmplx_mult_q31 | +( | +const arm_matrix_instance_q31 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q31 * | +pSrcB, | +
+ | + | arm_matrix_instance_q31 * | +pDst | +
+ | ) | ++ |
Q31 Complex matrix multiplication.
+Q31, complex, matrix multiplication.
+[in] | pSrcA | points to first input complex matrix structure |
[in] | pSrcB | points to second input complex matrix structure |
[out] | pDst | points to output complex matrix structure |
+Content | |
Complex FFT Tables | |
Complex FFT F16 | |
Complex FFT F32 | |
Complex FFT F64 | |
Complex FFT Q15 | |
Complex FFT Q31 | |
Deprecated Complex FFT functions | |
2*fftLen
interleaved values as shown below. {real[0], imag[0], real[1], imag[1], ...}The FFT result will be contained in the same array and the frequency domain values will have the same interleaving.
fftLen
when computing the forward transform. The inverse transform includes a scale of 1/fftLen
as part of the calculation and this matches the textbook definition of the inverse FFT. arm_const_structs.h
. Include this header in your function and then pass one of the constant structures as an argument to arm_cfft_f32. For example: arm_cfft_f32(arm_cfft_sR_f32_len64, pSrc, 1, 1)
fftLen
when computing the forward transform. The inverse transform includes a scale of 1/fftLen
as part of the calculation and this matches the textbook definition of the inverse FFT. arm_const_structs.h
. Include this header in your function and then pass one of the constant structures as an argument to arm_cfft_q31. For example: arm_cfft_q31(arm_cfft_sR_q31_len64, pSrc, 1, 1)
+Functions | |
void | arm_cfft_radix2_f16 (const arm_cfft_radix2_instance_f16 *S, float16_t *pSrc) |
Radix-2 CFFT/CIFFT. | |
void | arm_cfft_radix2_f32 (const arm_cfft_radix2_instance_f32 *S, float32_t *pSrc) |
Radix-2 CFFT/CIFFT. | |
arm_status | arm_cfft_radix2_init_f16 (arm_cfft_radix2_instance_f16 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Initialization function for the floating-point CFFT/CIFFT. | |
arm_status | arm_cfft_radix2_init_f32 (arm_cfft_radix2_instance_f32 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Initialization function for the floating-point CFFT/CIFFT. | |
arm_status | arm_cfft_radix2_init_q15 (arm_cfft_radix2_instance_q15 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Initialization function for the Q15 CFFT/CIFFT. | |
arm_status | arm_cfft_radix2_init_q31 (arm_cfft_radix2_instance_q31 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Initialization function for the Q31 CFFT/CIFFT. | |
void | arm_cfft_radix2_q15 (const arm_cfft_radix2_instance_q15 *S, q15_t *pSrc) |
Processing function for the fixed-point CFFT/CIFFT. | |
void | arm_cfft_radix2_q31 (const arm_cfft_radix2_instance_q31 *S, q31_t *pSrc) |
Processing function for the fixed-point CFFT/CIFFT. | |
void | arm_cfft_radix4_f16 (const arm_cfft_radix4_instance_f16 *S, float16_t *pSrc) |
Processing function for the floating-point Radix-4 CFFT/CIFFT. | |
void | arm_cfft_radix4_f32 (const arm_cfft_radix4_instance_f32 *S, float32_t *pSrc) |
Processing function for the floating-point Radix-4 CFFT/CIFFT. | |
arm_status | arm_cfft_radix4_init_f16 (arm_cfft_radix4_instance_f16 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Initialization function for the floating-point CFFT/CIFFT. | |
arm_status | arm_cfft_radix4_init_f32 (arm_cfft_radix4_instance_f32 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Initialization function for the floating-point CFFT/CIFFT. | |
arm_status | arm_cfft_radix4_init_q15 (arm_cfft_radix4_instance_q15 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Initialization function for the Q15 CFFT/CIFFT. | |
arm_status | arm_cfft_radix4_init_q31 (arm_cfft_radix4_instance_q31 *S, uint16_t fftLen, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Initialization function for the Q31 CFFT/CIFFT. | |
void | arm_cfft_radix4_q15 (const arm_cfft_radix4_instance_q15 *S, q15_t *pSrc) |
Processing function for the Q15 CFFT/CIFFT. | |
void | arm_cfft_radix4_q31 (const arm_cfft_radix4_instance_q31 *S, q31_t *pSrc) |
Processing function for the Q31 CFFT/CIFFT. | |
void arm_cfft_radix2_f16 | +( | +const arm_cfft_radix2_instance_f16 * | +S, | +
+ | + | float16_t * | +pSrc | +
+ | ) | ++ |
Radix-2 CFFT/CIFFT.
+[in] | S | points to an instance of the floating-point Radix-2 CFFT/CIFFT structure |
[in,out] | pSrc | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
void arm_cfft_radix2_f32 | +( | +const arm_cfft_radix2_instance_f32 * | +S, | +
+ | + | float32_t * | +pSrc | +
+ | ) | ++ |
Radix-2 CFFT/CIFFT.
+[in] | S | points to an instance of the floating-point Radix-2 CFFT/CIFFT structure |
[in,out] | pSrc | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
arm_status arm_cfft_radix2_init_f16 | +( | +arm_cfft_radix2_instance_f16 * | +S, | +
+ | + | uint16_t | +fftLen, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the floating-point CFFT/CIFFT.
+[in,out] | S | points to an instance of the floating-point CFFT/CIFFT structure |
[in] | fftLen | length of the FFT |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLen
is not a supported lengthifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. arm_status arm_cfft_radix2_init_f32 | +( | +arm_cfft_radix2_instance_f32 * | +S, | +
+ | + | uint16_t | +fftLen, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the floating-point CFFT/CIFFT.
+[in,out] | S | points to an instance of the floating-point CFFT/CIFFT structure |
[in] | fftLen | length of the FFT |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLen
is not a supported lengthifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. arm_status arm_cfft_radix2_init_q15 | +( | +arm_cfft_radix2_instance_q15 * | +S, | +
+ | + | uint16_t | +fftLen, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the Q15 CFFT/CIFFT.
+[in,out] | S | points to an instance of the Q15 CFFT/CIFFT structure. |
[in] | fftLen | length of the FFT. |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLen
is not a supported lengthifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. arm_status arm_cfft_radix2_init_q31 | +( | +arm_cfft_radix2_instance_q31 * | +S, | +
+ | + | uint16_t | +fftLen, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the Q31 CFFT/CIFFT.
+[in,out] | S | points to an instance of the Q31 CFFT/CIFFT structure |
[in] | fftLen | length of the FFT |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLen
is not a supported lengthifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. void arm_cfft_radix2_q15 | +( | +const arm_cfft_radix2_instance_q15 * | +S, | +
+ | + | q15_t * | +pSrc | +
+ | ) | ++ |
Processing function for the fixed-point CFFT/CIFFT.
+[in] | S | points to an instance of the fixed-point CFFT/CIFFT structure |
[in,out] | pSrc | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
void arm_cfft_radix2_q31 | +( | +const arm_cfft_radix2_instance_q31 * | +S, | +
+ | + | q31_t * | +pSrc | +
+ | ) | ++ |
Processing function for the fixed-point CFFT/CIFFT.
+[in] | S | points to an instance of the fixed-point CFFT/CIFFT structure |
[in,out] | pSrc | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
void arm_cfft_radix4_f16 | +( | +const arm_cfft_radix4_instance_f16 * | +S, | +
+ | + | float16_t * | +pSrc | +
+ | ) | ++ |
Processing function for the floating-point Radix-4 CFFT/CIFFT.
+[in] | S | points to an instance of the floating-point Radix-4 CFFT/CIFFT structure |
[in,out] | pSrc | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
void arm_cfft_radix4_f32 | +( | +const arm_cfft_radix4_instance_f32 * | +S, | +
+ | + | float32_t * | +pSrc | +
+ | ) | ++ |
Processing function for the floating-point Radix-4 CFFT/CIFFT.
+[in] | S | points to an instance of the floating-point Radix-4 CFFT/CIFFT structure |
[in,out] | pSrc | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
arm_status arm_cfft_radix4_init_f16 | +( | +arm_cfft_radix4_instance_f16 * | +S, | +
+ | + | uint16_t | +fftLen, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the floating-point CFFT/CIFFT.
+[in,out] | S | points to an instance of the floating-point CFFT/CIFFT structure |
[in] | fftLen | length of the FFT |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLen
is not a supported lengthifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. arm_status arm_cfft_radix4_init_f32 | +( | +arm_cfft_radix4_instance_f32 * | +S, | +
+ | + | uint16_t | +fftLen, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the floating-point CFFT/CIFFT.
+[in,out] | S | points to an instance of the floating-point CFFT/CIFFT structure |
[in] | fftLen | length of the FFT |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLen
is not a supported lengthifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. arm_status arm_cfft_radix4_init_q15 | +( | +arm_cfft_radix4_instance_q15 * | +S, | +
+ | + | uint16_t | +fftLen, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the Q15 CFFT/CIFFT.
+[in,out] | S | points to an instance of the Q15 CFFT/CIFFT structure |
[in] | fftLen | length of the FFT |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLen
is not a supported lengthifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. arm_status arm_cfft_radix4_init_q31 | +( | +arm_cfft_radix4_instance_q31 * | +S, | +
+ | + | uint16_t | +fftLen, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the Q31 CFFT/CIFFT.
+[in,out] | S | points to an instance of the Q31 CFFT/CIFFT structure. |
[in] | fftLen | length of the FFT. |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLen
is not a supported lengthifftFlag
controls whether a forward or inverse transform is computed. Set(=1) ifftFlag for calculation of CIFFT otherwise CFFT is calculated bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. fftLen
Specifies length of CFFT/CIFFT process. Supported FFT Lengths are 16, 64, 256, 1024. void arm_cfft_radix4_q15 | +( | +const arm_cfft_radix4_instance_q15 * | +S, | +
+ | + | q15_t * | +pSrc | +
+ | ) | ++ |
Processing function for the Q15 CFFT/CIFFT.
+[in] | S | points to an instance of the Q15 CFFT/CIFFT structure. |
[in,out] | pSrc | points to the complex data buffer. Processing occurs in-place. |
CFFT Size | Input format | Output format | Number of bits to upscale |
---|---|---|---|
16 | 1.15 | 5.11 | 4 |
64 | 1.15 | 7.9 | 6 |
256 | 1.15 | 9.7 | 8 |
1024 | 1.15 | 11.5 | 10 |
CIFFT Size | Input format | Output format | Number of bits to upscale |
---|---|---|---|
16 | 1.15 | 5.11 | 0 |
64 | 1.15 | 7.9 | 0 |
256 | 1.15 | 9.7 | 0 |
1024 | 1.15 | 11.5 | 0 |
void arm_cfft_radix4_q31 | +( | +const arm_cfft_radix4_instance_q31 * | +S, | +
+ | + | q31_t * | +pSrc | +
+ | ) | ++ |
Processing function for the Q31 CFFT/CIFFT.
+[in] | S | points to an instance of the Q31 CFFT/CIFFT structure |
[in,out] | pSrc | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
CFFT Size | Input format | Output format | Number of bits to upscale |
---|---|---|---|
16 | 1.31 | 5.27 | 4 |
64 | 1.31 | 7.25 | 6 |
256 | 1.31 | 9.23 | 8 |
1024 | 1.31 | 11.21 | 10 |
CIFFT Size | Input format | Output format | Number of bits to upscale |
---|---|---|---|
16 | 1.31 | 5.27 | 0 |
64 | 1.31 | 7.25 | 0 |
256 | 1.31 | 9.23 | 0 |
1024 | 1.31 | 11.21 | 0 |
+Functions | |
void | arm_cfft_f16 (const arm_cfft_instance_f16 *S, float16_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Processing function for the floating-point complex FFT. | |
arm_status | arm_cfft_init_4096_f16 (arm_cfft_instance_f16 *S) |
Initialization function for the cfft f16 function with 4096 samples. | |
arm_status | arm_cfft_init_2048_f16 (arm_cfft_instance_f16 *S) |
Initialization function for the cfft f16 function with 2048 samples. | |
arm_status | arm_cfft_init_1024_f16 (arm_cfft_instance_f16 *S) |
Initialization function for the cfft f16 function with 1024 samples. | |
arm_status | arm_cfft_init_512_f16 (arm_cfft_instance_f16 *S) |
Initialization function for the cfft f16 function with 512 samples. | |
arm_status | arm_cfft_init_256_f16 (arm_cfft_instance_f16 *S) |
Initialization function for the cfft f16 function with 256 samples. | |
arm_status | arm_cfft_init_128_f16 (arm_cfft_instance_f16 *S) |
Initialization function for the cfft f16 function with 128 samples. | |
arm_status | arm_cfft_init_64_f16 (arm_cfft_instance_f16 *S) |
Initialization function for the cfft f16 function with 64 samples. | |
arm_status | arm_cfft_init_32_f16 (arm_cfft_instance_f16 *S) |
Initialization function for the cfft f16 function with 32 samples. | |
arm_status | arm_cfft_init_16_f16 (arm_cfft_instance_f16 *S) |
Initialization function for the cfft f16 function with 16 samples. | |
arm_status | arm_cfft_init_f16 (arm_cfft_instance_f16 *S, uint16_t fftLen) |
Generic initialization function for the cfft f16 function. | |
void arm_cfft_f16 | +( | +const arm_cfft_instance_f16 * | +S, | +
+ | + | float16_t * | +p1, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Processing function for the floating-point complex FFT.
+[in] | S | points to an instance of the floating-point CFFT structure |
[in,out] | p1 | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
arm_status arm_cfft_init_1024_f16 | +( | +arm_cfft_instance_f16 * | +S | ) | ++ |
Initialization function for the cfft f16 function with 1024 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_128_f16 | +( | +arm_cfft_instance_f16 * | +S | ) | ++ |
Initialization function for the cfft f16 function with 128 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_16_f16 | +( | +arm_cfft_instance_f16 * | +S | ) | ++ |
Initialization function for the cfft f16 function with 16 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_2048_f16 | +( | +arm_cfft_instance_f16 * | +S | ) | ++ |
Initialization function for the cfft f16 function with 2048 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_256_f16 | +( | +arm_cfft_instance_f16 * | +S | ) | ++ |
Initialization function for the cfft f16 function with 256 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_32_f16 | +( | +arm_cfft_instance_f16 * | +S | ) | ++ |
Initialization function for the cfft f16 function with 32 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_4096_f16 | +( | +arm_cfft_instance_f16 * | +S | ) | ++ |
Initialization function for the cfft f16 function with 4096 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_512_f16 | +( | +arm_cfft_instance_f16 * | +S | ) | ++ |
Initialization function for the cfft f16 function with 512 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_64_f16 | +( | +arm_cfft_instance_f16 * | +S | ) | ++ |
Initialization function for the cfft f16 function with 64 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_f16 | +( | +arm_cfft_instance_f16 * | +S, | +
+ | + | uint16_t | +fftLen | +
+ | ) | ++ |
Generic initialization function for the cfft f16 function.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
[in] | fftLen | fft length (number of complex samples) |
+Functions | |
void | arm_cfft_f32 (const arm_cfft_instance_f32 *S, float32_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Processing function for the floating-point complex FFT. | |
arm_status | arm_cfft_init_4096_f32 (arm_cfft_instance_f32 *S) |
Initialization function for the cfft f32 function with 4096 samples. | |
arm_status | arm_cfft_init_2048_f32 (arm_cfft_instance_f32 *S) |
Initialization function for the cfft f32 function with 2048 samples. | |
arm_status | arm_cfft_init_1024_f32 (arm_cfft_instance_f32 *S) |
Initialization function for the cfft f32 function with 1024 samples. | |
arm_status | arm_cfft_init_512_f32 (arm_cfft_instance_f32 *S) |
Initialization function for the cfft f32 function with 512 samples. | |
arm_status | arm_cfft_init_256_f32 (arm_cfft_instance_f32 *S) |
Initialization function for the cfft f32 function with 256 samples. | |
arm_status | arm_cfft_init_128_f32 (arm_cfft_instance_f32 *S) |
Initialization function for the cfft f32 function with 128 samples. | |
arm_status | arm_cfft_init_64_f32 (arm_cfft_instance_f32 *S) |
Initialization function for the cfft f32 function with 64 samples. | |
arm_status | arm_cfft_init_32_f32 (arm_cfft_instance_f32 *S) |
Initialization function for the cfft f32 function with 32 samples. | |
arm_status | arm_cfft_init_16_f32 (arm_cfft_instance_f32 *S) |
Initialization function for the cfft f32 function with 16 samples. | |
arm_status | arm_cfft_init_f32 (arm_cfft_instance_f32 *S, uint16_t fftLen) |
Generic initialization function for the cfft f32 function. | |
void arm_cfft_f32 | +( | +const arm_cfft_instance_f32 * | +S, | +
+ | + | float32_t * | +p1, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Processing function for the floating-point complex FFT.
+[in] | S | points to an instance of the floating-point CFFT structure |
[in,out] | p1 | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
arm_status arm_cfft_init_1024_f32 | +( | +arm_cfft_instance_f32 * | +S | ) | ++ |
Initialization function for the cfft f32 function with 1024 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_128_f32 | +( | +arm_cfft_instance_f32 * | +S | ) | ++ |
Initialization function for the cfft f32 function with 128 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_16_f32 | +( | +arm_cfft_instance_f32 * | +S | ) | ++ |
Initialization function for the cfft f32 function with 16 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_2048_f32 | +( | +arm_cfft_instance_f32 * | +S | ) | ++ |
Initialization function for the cfft f32 function with 2048 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_256_f32 | +( | +arm_cfft_instance_f32 * | +S | ) | ++ |
Initialization function for the cfft f32 function with 256 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_32_f32 | +( | +arm_cfft_instance_f32 * | +S | ) | ++ |
Initialization function for the cfft f32 function with 32 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_4096_f32 | +( | +arm_cfft_instance_f32 * | +S | ) | ++ |
Initialization function for the cfft f32 function with 4096 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_512_f32 | +( | +arm_cfft_instance_f32 * | +S | ) | ++ |
Initialization function for the cfft f32 function with 512 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_64_f32 | +( | +arm_cfft_instance_f32 * | +S | ) | ++ |
Initialization function for the cfft f32 function with 64 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_f32 | +( | +arm_cfft_instance_f32 * | +S, | +
+ | + | uint16_t | +fftLen | +
+ | ) | ++ |
Generic initialization function for the cfft f32 function.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
[in] | fftLen | fft length (number of complex samples) |
+Functions | |
void | arm_cfft_f64 (const arm_cfft_instance_f64 *S, float64_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Processing function for the Double Precision floating-point complex FFT. | |
arm_status | arm_cfft_init_4096_f64 (arm_cfft_instance_f64 *S) |
Initialization function for the cfft f64 function with 4096 samples. | |
arm_status | arm_cfft_init_2048_f64 (arm_cfft_instance_f64 *S) |
Initialization function for the cfft f64 function with 2048 samples. | |
arm_status | arm_cfft_init_1024_f64 (arm_cfft_instance_f64 *S) |
Initialization function for the cfft f64 function with 1024 samples. | |
arm_status | arm_cfft_init_512_f64 (arm_cfft_instance_f64 *S) |
Initialization function for the cfft f64 function with 512 samples. | |
arm_status | arm_cfft_init_256_f64 (arm_cfft_instance_f64 *S) |
Initialization function for the cfft f64 function with 256 samples. | |
arm_status | arm_cfft_init_128_f64 (arm_cfft_instance_f64 *S) |
Initialization function for the cfft f64 function with 128 samples. | |
arm_status | arm_cfft_init_64_f64 (arm_cfft_instance_f64 *S) |
Initialization function for the cfft f64 function with 64 samples. | |
arm_status | arm_cfft_init_32_f64 (arm_cfft_instance_f64 *S) |
Initialization function for the cfft f64 function with 32 samples. | |
arm_status | arm_cfft_init_16_f64 (arm_cfft_instance_f64 *S) |
Initialization function for the cfft f64 function with 16 samples. | |
arm_status | arm_cfft_init_f64 (arm_cfft_instance_f64 *S, uint16_t fftLen) |
Generic initialization function for the cfft f64 function. | |
void arm_cfft_f64 | +( | +const arm_cfft_instance_f64 * | +S, | +
+ | + | float64_t * | +p1, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Processing function for the Double Precision floating-point complex FFT.
+[in] | S | points to an instance of the Double Precision floating-point CFFT structure |
[in,out] | p1 | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
arm_status arm_cfft_init_1024_f64 | +( | +arm_cfft_instance_f64 * | +S | ) | ++ |
Initialization function for the cfft f64 function with 1024 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_128_f64 | +( | +arm_cfft_instance_f64 * | +S | ) | ++ |
Initialization function for the cfft f64 function with 128 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_16_f64 | +( | +arm_cfft_instance_f64 * | +S | ) | ++ |
Initialization function for the cfft f64 function with 16 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_2048_f64 | +( | +arm_cfft_instance_f64 * | +S | ) | ++ |
Initialization function for the cfft f64 function with 2048 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_256_f64 | +( | +arm_cfft_instance_f64 * | +S | ) | ++ |
Initialization function for the cfft f64 function with 256 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_32_f64 | +( | +arm_cfft_instance_f64 * | +S | ) | ++ |
Initialization function for the cfft f64 function with 32 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_4096_f64 | +( | +arm_cfft_instance_f64 * | +S | ) | ++ |
Initialization function for the cfft f64 function with 4096 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_512_f64 | +( | +arm_cfft_instance_f64 * | +S | ) | ++ |
Initialization function for the cfft f64 function with 512 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_64_f64 | +( | +arm_cfft_instance_f64 * | +S | ) | ++ |
Initialization function for the cfft f64 function with 64 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_f64 | +( | +arm_cfft_instance_f64 * | +S, | +
+ | + | uint16_t | +fftLen | +
+ | ) | ++ |
Generic initialization function for the cfft f64 function.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
[in] | fftLen | fft length (number of complex samples) |
+Functions | |
arm_status | arm_cfft_init_4096_q15 (arm_cfft_instance_q15 *S) |
Initialization function for the cfft q15 function for 4096 samples. | |
arm_status | arm_cfft_init_2048_q15 (arm_cfft_instance_q15 *S) |
Initialization function for the cfft q15 function for 2048 samples. | |
arm_status | arm_cfft_init_1024_q15 (arm_cfft_instance_q15 *S) |
Initialization function for the cfft q15 function for 1024 samples. | |
arm_status | arm_cfft_init_512_q15 (arm_cfft_instance_q15 *S) |
Initialization function for the cfft q15 function for 512 samples. | |
arm_status | arm_cfft_init_256_q15 (arm_cfft_instance_q15 *S) |
Initialization function for the cfft q15 function for 256 samples. | |
arm_status | arm_cfft_init_128_q15 (arm_cfft_instance_q15 *S) |
Initialization function for the cfft q15 function for 128 samples. | |
arm_status | arm_cfft_init_64_q15 (arm_cfft_instance_q15 *S) |
Initialization function for the cfft q15 function for 64 samples. | |
arm_status | arm_cfft_init_32_q15 (arm_cfft_instance_q15 *S) |
Initialization function for the cfft q15 function for 32 samples. | |
arm_status | arm_cfft_init_16_q15 (arm_cfft_instance_q15 *S) |
Initialization function for the cfft q15 function for 16 samples. | |
arm_status | arm_cfft_init_q15 (arm_cfft_instance_q15 *S, uint16_t fftLen) |
Generic initialization function for the cfft q15 function. | |
void | arm_cfft_q15 (const arm_cfft_instance_q15 *S, q15_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Processing function for Q15 complex FFT. | |
arm_status arm_cfft_init_1024_q15 | +( | +arm_cfft_instance_q15 * | +S | ) | ++ |
Initialization function for the cfft q15 function for 1024 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_128_q15 | +( | +arm_cfft_instance_q15 * | +S | ) | ++ |
Initialization function for the cfft q15 function for 128 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_16_q15 | +( | +arm_cfft_instance_q15 * | +S | ) | ++ |
Initialization function for the cfft q15 function for 16 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_2048_q15 | +( | +arm_cfft_instance_q15 * | +S | ) | ++ |
Initialization function for the cfft q15 function for 2048 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_256_q15 | +( | +arm_cfft_instance_q15 * | +S | ) | ++ |
Initialization function for the cfft q15 function for 256 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_32_q15 | +( | +arm_cfft_instance_q15 * | +S | ) | ++ |
Initialization function for the cfft q15 function for 32 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_4096_q15 | +( | +arm_cfft_instance_q15 * | +S | ) | ++ |
Initialization function for the cfft q15 function for 4096 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_512_q15 | +( | +arm_cfft_instance_q15 * | +S | ) | ++ |
Initialization function for the cfft q15 function for 512 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_64_q15 | +( | +arm_cfft_instance_q15 * | +S | ) | ++ |
Initialization function for the cfft q15 function for 64 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_q15 | +( | +arm_cfft_instance_q15 * | +S, | +
+ | + | uint16_t | +fftLen | +
+ | ) | ++ |
Generic initialization function for the cfft q15 function.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
[in] | fftLen | fft length (number of complex samples) |
void arm_cfft_q15 | +( | +const arm_cfft_instance_q15 * | +S, | +
+ | + | q15_t * | +p1, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Processing function for Q15 complex FFT.
+[in] | S | points to an instance of Q15 CFFT structure |
[in,out] | p1 | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
+Functions | |
arm_status | arm_cfft_init_4096_q31 (arm_cfft_instance_q31 *S) |
Initialization function for the cfft q31 function for 4096 samples. | |
arm_status | arm_cfft_init_2048_q31 (arm_cfft_instance_q31 *S) |
Initialization function for the cfft q31 function for 2048 samples. | |
arm_status | arm_cfft_init_1024_q31 (arm_cfft_instance_q31 *S) |
Initialization function for the cfft q31 function for 1024 samples. | |
arm_status | arm_cfft_init_512_q31 (arm_cfft_instance_q31 *S) |
Initialization function for the cfft q31 function for 512 samples. | |
arm_status | arm_cfft_init_256_q31 (arm_cfft_instance_q31 *S) |
Initialization function for the cfft q31 function for 256 samples. | |
arm_status | arm_cfft_init_128_q31 (arm_cfft_instance_q31 *S) |
Initialization function for the cfft q31 function for 128 samples. | |
arm_status | arm_cfft_init_64_q31 (arm_cfft_instance_q31 *S) |
Initialization function for the cfft q31 function for 64 samples. | |
arm_status | arm_cfft_init_32_q31 (arm_cfft_instance_q31 *S) |
Initialization function for the cfft q31 function for 32 samples. | |
arm_status | arm_cfft_init_16_q31 (arm_cfft_instance_q31 *S) |
Initialization function for the cfft q31 function for 16 samples. | |
arm_status | arm_cfft_init_q31 (arm_cfft_instance_q31 *S, uint16_t fftLen) |
Generic initialization function for the cfft q31 function. | |
void | arm_cfft_q31 (const arm_cfft_instance_q31 *S, q31_t *p1, uint8_t ifftFlag, uint8_t bitReverseFlag) |
Processing function for the Q31 complex FFT. | |
arm_status arm_cfft_init_1024_q31 | +( | +arm_cfft_instance_q31 * | +S | ) | ++ |
Initialization function for the cfft q31 function for 1024 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_128_q31 | +( | +arm_cfft_instance_q31 * | +S | ) | ++ |
Initialization function for the cfft q31 function for 128 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_16_q31 | +( | +arm_cfft_instance_q31 * | +S | ) | ++ |
Initialization function for the cfft q31 function for 16 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_2048_q31 | +( | +arm_cfft_instance_q31 * | +S | ) | ++ |
Initialization function for the cfft q31 function for 2048 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_256_q31 | +( | +arm_cfft_instance_q31 * | +S | ) | ++ |
Initialization function for the cfft q31 function for 256 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_32_q31 | +( | +arm_cfft_instance_q31 * | +S | ) | ++ |
Initialization function for the cfft q31 function for 32 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_4096_q31 | +( | +arm_cfft_instance_q31 * | +S | ) | ++ |
Initialization function for the cfft q31 function for 4096 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_512_q31 | +( | +arm_cfft_instance_q31 * | +S | ) | ++ |
Initialization function for the cfft q31 function for 512 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_64_q31 | +( | +arm_cfft_instance_q31 * | +S | ) | ++ |
Initialization function for the cfft q31 function for 64 samples.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
arm_status arm_cfft_init_q31 | +( | +arm_cfft_instance_q31 * | +S, | +
+ | + | uint16_t | +fftLen | +
+ | ) | ++ |
Generic initialization function for the cfft q31 function.
+[in,out] | S | points to an instance of the floating-point CFFT structure |
[in] | fftLen | fft length (number of complex samples) |
void arm_cfft_q31 | +( | +const arm_cfft_instance_q31 * | +S, | +
+ | + | q31_t * | +p1, | +
+ | + | uint8_t | +ifftFlag, | +
+ | + | uint8_t | +bitReverseFlag | +
+ | ) | ++ |
Processing function for the Q31 complex FFT.
+[in] | S | points to an instance of the fixed-point CFFT structure |
[in,out] | p1 | points to the complex data buffer of size 2*fftLen . Processing occurs in-place |
[in] | ifftFlag | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
+Functions | |
void | arm_conv_f32 (const float32_t *pSrcA, uint32_t srcALen, const float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst) |
Convolution of floating-point sequences. | |
void | arm_conv_fast_opt_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch1, q15_t *pScratch2) |
Convolution of Q15 sequences (fast version). | |
void | arm_conv_fast_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst) |
Convolution of Q15 sequences (fast version). | |
void | arm_conv_fast_q31 (const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst) |
Convolution of Q31 sequences (fast version). | |
void | arm_conv_opt_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch1, q15_t *pScratch2) |
Convolution of Q15 sequences. | |
void | arm_conv_opt_q7 (const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, q15_t *pScratch1, q15_t *pScratch2) |
Convolution of Q7 sequences. | |
void | arm_conv_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst) |
Convolution of Q15 sequences. | |
void | arm_conv_q31 (const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst) |
Convolution of Q31 sequences. | |
void | arm_conv_q7 (const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst) |
Convolution of Q7 sequences. | |
Convolution is a mathematical operation that operates on two finite length vectors to generate a finite length output vector. Convolution is similar to correlation and is frequently used in filtering and data analysis. The CMSIS DSP library contains functions for convolving Q7, Q15, Q31, and floating-point data types. The library also provides fast versions of the Q15 and Q31 functions.
+a[n]
and b[n]
be sequences of length srcALen
and srcBLen
samples respectively. Then the convolution +\[ + c[n] = a[n] * b[n] + \] +
++\[ + c[n] = \sum_{k=0}^{srcALen} a[k] b[n-k] + \] +
+c[n]
is of length srcALen + srcBLen - 1
and is defined over the interval n=0, 1, 2, ..., srcALen + srcBLen - 2
. pSrcA
points to the first input vector of length srcALen
and pSrcB
points to the second input vector of length srcBLen
. The output result is written to pDst
and the calling function must allocate srcALen+srcBLen-1
words for the result. a[n]
and b[n]
are convolved, the signal b[n]
slides over a[n]
. For each offset n
, the overlapping portions of a[n] and b[n] are multiplied and summed together. +\[ + a[n] * b[n] = b[n] * a[n]. + \] +
+void arm_conv_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | float32_t * | +pDst | +
+ | ) | ++ |
Convolution of floating-point sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length srcALen+srcBLen-1. |
void arm_conv_fast_opt_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst, | +
+ | + | q15_t * | +pScratch1, | +
+ | + | q15_t * | +pScratch2 | +
+ | ) | ++ |
Convolution of Q15 sequences (fast version).
+Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length srcALen+srcBLen-1 |
[in] | pScratch1 | points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2 |
[in] | pScratch2 | points to scratch buffer of size min(srcALen, srcBLen |
void arm_conv_fast_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst | +
+ | ) | ++ |
Convolution of Q15 sequences (fast version).
+Convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length srcALen+srcBLen-1 |
void arm_conv_fast_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q31_t * | +pDst | +
+ | ) | ++ |
Convolution of Q31 sequences (fast version).
+Convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
+[in] | pSrcA | points to the first input sequence. |
[in] | srcALen | length of the first input sequence. |
[in] | pSrcB | points to the second input sequence. |
[in] | srcBLen | length of the second input sequence. |
[out] | pDst | points to the location where the output result is written. Length srcALen+srcBLen-1. |
void arm_conv_opt_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst, | +
+ | + | q15_t * | +pScratch1, | +
+ | + | q15_t * | +pScratch2 | +
+ | ) | ++ |
Convolution of Q15 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length srcALen+srcBLen-1. |
[in] | pScratch1 | points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
[in] | pScratch2 | points to scratch buffer of size min(srcALen, srcBLen). |
void arm_conv_opt_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q7_t * | +pDst, | +
+ | + | q15_t * | +pScratch1, | +
+ | + | q15_t * | +pScratch2 | +
+ | ) | ++ |
Convolution of Q7 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length srcALen+srcBLen-1. |
[in] | pScratch1 | points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
[in] | pScratch2 | points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen). |
max(srcALen, srcBLen)<131072
. The 18.14 result is then truncated to 18.7 format by discarding the low 7 bits and then saturated to 1.7 format. void arm_conv_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst | +
+ | ) | ++ |
Convolution of Q15 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length srcALen+srcBLen-1. |
void arm_conv_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q31_t * | +pDst | +
+ | ) | ++ |
Convolution of Q31 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length srcALen+srcBLen-1. |
void arm_conv_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q7_t * | +pDst | +
+ | ) | ++ |
Convolution of Q7 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length srcALen+srcBLen-1. |
max(srcALen, srcBLen)<131072
. The 18.14 result is then truncated to 18.7 format by discarding the low 7 bits and then saturated to 1.7 format. a[n]
and b[n]
, with lengths n1
and n2
respectively, are zero padded so that their lengths become N
, which is greater than or equal to (n1+n2-1)
and is a power of 4 as FFT implementation is radix-4. The convolution of a[n]
and b[n]
is obtained by taking the FFT of the input signals, multiplying the Fourier transforms of the two signals, and taking the inverse FFT of the multiplied result. A[k] = FFT(a[n],N) +B[k] = FFT(b[n],N) +conv(a[n], b[n]) = IFFT(A[k] * B[k], N)where
A[k]
and B[k]
are the N-point FFTs of the signals a[n]
and b[n]
respectively. The length of the convolved signal is (n1+n2-1)
.testInputA_f32
points to the first input sequence srcALen
length of the first input sequence testInputB_f32
points to the second input sequence srcBLen
length of the second input sequence outLen
length of convolution output sequence, (srcALen + srcBLen - 1)
AxB
points to the output array where the product of individual FFTs of inputs is stored.+Functions | |
void | arm_correlate_f16 (const float16_t *pSrcA, uint32_t srcALen, const float16_t *pSrcB, uint32_t srcBLen, float16_t *pDst) |
Correlation of floating-point sequences. | |
void | arm_correlate_f32 (const float32_t *pSrcA, uint32_t srcALen, const float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst) |
Correlation of floating-point sequences. | |
void | arm_correlate_f64 (const float64_t *pSrcA, uint32_t srcALen, const float64_t *pSrcB, uint32_t srcBLen, float64_t *pDst) |
Correlation of floating-point sequences. | |
void | arm_correlate_fast_opt_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch) |
Correlation of Q15 sequences (fast version). | |
void | arm_correlate_fast_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst) |
Correlation of Q15 sequences (fast version). | |
void | arm_correlate_fast_q31 (const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst) |
Correlation of Q31 sequences (fast version). | |
void | arm_correlate_opt_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, q15_t *pScratch) |
Correlation of Q15 sequences. | |
void | arm_correlate_opt_q7 (const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, q15_t *pScratch1, q15_t *pScratch2) |
Correlation of Q7 sequences. | |
void | arm_correlate_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst) |
Correlation of Q15 sequences. | |
void | arm_correlate_q31 (const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst) |
Correlation of Q31 sequences. | |
void | arm_correlate_q7 (const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst) |
Correlation of Q7 sequences. | |
Correlation is a mathematical operation that is similar to convolution. As with convolution, correlation uses two signals to produce a third signal. The underlying algorithms in correlation and convolution are identical except that one of the inputs is flipped in convolution. Correlation is commonly used to measure the similarity between two signals. It has applications in pattern recognition, cryptanalysis, and searching. The CMSIS library provides correlation functions for Q7, Q15, Q31 and floating-point data types. Fast versions of the Q15 and Q31 functions are also provided.
+a[n]
and b[n]
be sequences of length srcALen
and srcBLen
samples respectively. The convolution of the two signals is denoted by +\[ + c[n] = a[n] * b[n] + \] +
+In correlation, one of the signals is flipped in time
++\[ + c[n] = a[n] * b[-n] + \] +
++\[ + c[n] = \sum_{k=0}^{srcALen} a[k] b[k-n] + \] +
+pSrcA
points to the first input vector of length srcALen
and pSrcB
points to the second input vector of length srcBLen
. The result c[n]
is of length 2 * max(srcALen, srcBLen) - 1
and is defined over the interval n=0, 1, 2, ..., (2 * max(srcALen, srcBLen) - 2)
. The output result is written to pDst
and the calling function must allocate 2 * max(srcALen, srcBLen) - 1
words for the result.pDst
should be initialized to all zeros before being used.void arm_correlate_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | float16_t * | +pDst | +
+ | ) | ++ |
Correlation of floating-point sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
void arm_correlate_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | float32_t * | +pDst | +
+ | ) | ++ |
Correlation of floating-point sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
void arm_correlate_f64 | +( | +const float64_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const float64_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | float64_t * | +pDst | +
+ | ) | ++ |
Correlation of floating-point sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
void arm_correlate_fast_opt_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst, | +
+ | + | q15_t * | +pScratch | +
+ | ) | ++ |
Correlation of Q15 sequences (fast version).
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence. |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
[in] | pScratch | points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
void arm_correlate_fast_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst | +
+ | ) | ++ |
Correlation of Q15 sequences (fast version).
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
void arm_correlate_fast_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q31_t * | +pDst | +
+ | ) | ++ |
Correlation of Q31 sequences (fast version).
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
void arm_correlate_opt_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst, | +
+ | + | q15_t * | +pScratch | +
+ | ) | ++ |
Correlation of Q15 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
[in] | pScratch | points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
void arm_correlate_opt_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q7_t * | +pDst, | +
+ | + | q15_t * | +pScratch1, | +
+ | + | q15_t * | +pScratch2 | +
+ | ) | ++ |
Correlation of Q7 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
[in] | pScratch1 | points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
[in] | pScratch2 | points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen). |
max(srcALen, srcBLen)<131072
. The 18.14 result is then truncated to 18.7 format by discarding the low 7 bits and then saturated to 1.7 format. void arm_correlate_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst | +
+ | ) | ++ |
Correlation of Q15 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
void arm_correlate_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q31_t * | +pDst | +
+ | ) | ++ |
Correlation of Q31 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
void arm_correlate_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q7_t * | +pDst | +
+ | ) | ++ |
Correlation of Q7 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written. Length 2 * max(srcALen, srcBLen) - 1. |
max(srcALen, srcBLen)<131072
. The 18.14 result is then truncated to 18.7 format by discarding the low 7 bits and saturated to 1.7 format.+Functions | |
float16_t | arm_correlation_distance_f16 (float16_t *pA, float16_t *pB, uint32_t blockSize) |
Correlation distance between two vectors. | |
float32_t | arm_correlation_distance_f32 (float32_t *pA, float32_t *pB, uint32_t blockSize) |
Correlation distance between two vectors. | |
Correlation distance
+float16_t arm_correlation_distance_f16 | +( | +float16_t * | +pA, | +
+ | + | float16_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Correlation distance between two vectors.
+The input vectors are modified in place !
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float32_t arm_correlation_distance_f32 | +( | +float32_t * | +pA, | +
+ | + | float32_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Correlation distance between two vectors.
+The input vectors are modified in place !
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
+Functions | |
float16_t | arm_cosine_distance_f16 (const float16_t *pA, const float16_t *pB, uint32_t blockSize) |
Cosine distance between two vectors. | |
float32_t | arm_cosine_distance_f32 (const float32_t *pA, const float32_t *pB, uint32_t blockSize) |
Cosine distance between two vectors. | |
float64_t | arm_cosine_distance_f64 (const float64_t *pA, const float64_t *pB, uint32_t blockSize) |
Cosine distance between two vectors. | |
Cosine distance
+float16_t arm_cosine_distance_f16 | +( | +const float16_t * | +pA, | +
+ | + | const float16_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Cosine distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float32_t arm_cosine_distance_f32 | +( | +const float32_t * | +pA, | +
+ | + | const float32_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Cosine distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float64_t arm_cosine_distance_f64 | +( | +const float64_t * | +pA, | +
+ | + | const float64_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Cosine distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
+Functions | |
void | arm_dct4_f32 (const arm_dct4_instance_f32 *S, float32_t *pState, float32_t *pInlineBuffer) |
Processing function for the floating-point DCT4/IDCT4. | |
arm_status | arm_dct4_init_f32 (arm_dct4_instance_f32 *S, arm_rfft_instance_f32 *S_RFFT, arm_cfft_radix4_instance_f32 *S_CFFT, uint16_t N, uint16_t Nby2, float32_t normalize) |
Initialization function for the floating-point DCT4/IDCT4. | |
void arm_dct4_f32 | +( | +const arm_dct4_instance_f32 * | +S, | +
+ | + | float32_t * | +pState, | +
+ | + | float32_t * | +pInlineBuffer | +
+ | ) | ++ |
Processing function for the floating-point DCT4/IDCT4.
+[in] | S | points to an instance of the floating-point DCT4/IDCT4 structure |
[in] | pState | points to state buffer |
[in,out] | pInlineBuffer | points to the in-place input and output buffer |
arm_status arm_dct4_init_f32 | +( | +arm_dct4_instance_f32 * | +S, | +
+ | + | arm_rfft_instance_f32 * | +S_RFFT, | +
+ | + | arm_cfft_radix4_instance_f32 * | +S_CFFT, | +
+ | + | uint16_t | +N, | +
+ | + | uint16_t | +Nby2, | +
+ | + | float32_t | +normalize | +
+ | ) | ++ |
Initialization function for the floating-point DCT4/IDCT4.
+[in,out] | S | points to an instance of floating-point DCT4/IDCT4 structure |
[in] | S_RFFT | points to an instance of floating-point RFFT/RIFFT structure |
[in] | S_CFFT | points to an instance of floating-point CFFT/CIFFT structure |
[in] | N | length of the DCT4 |
[in] | Nby2 | half of the length of the DCT4 |
[in] | normalize | normalizing factor. |
N
is not a supported transform lengthsqrt(2/N)
, which depends on the size of transform N
. Floating-point normalizing factors are mentioned in the table below for different DCT sizes:DCT Size | Normalizing factor value |
---|---|
2048 | 0.03125 |
512 | 0.0625 |
128 | 0.125 |
+Functions | |
arm_status | arm_dct4_init_q15 (arm_dct4_instance_q15 *S, arm_rfft_instance_q15 *S_RFFT, arm_cfft_radix4_instance_q15 *S_CFFT, uint16_t N, uint16_t Nby2, q15_t normalize) |
Initialization function for the Q15 DCT4/IDCT4. | |
void | arm_dct4_q15 (const arm_dct4_instance_q15 *S, q15_t *pState, q15_t *pInlineBuffer) |
Processing function for the Q15 DCT4/IDCT4. | |
arm_status arm_dct4_init_q15 | +( | +arm_dct4_instance_q15 * | +S, | +
+ | + | arm_rfft_instance_q15 * | +S_RFFT, | +
+ | + | arm_cfft_radix4_instance_q15 * | +S_CFFT, | +
+ | + | uint16_t | +N, | +
+ | + | uint16_t | +Nby2, | +
+ | + | q15_t | +normalize | +
+ | ) | ++ |
Initialization function for the Q15 DCT4/IDCT4.
+[in,out] | S | points to an instance of Q15 DCT4/IDCT4 structure |
[in] | S_RFFT | points to an instance of Q15 RFFT/RIFFT structure |
[in] | S_CFFT | points to an instance of Q15 CFFT/CIFFT structure |
[in] | N | length of the DCT4 |
[in] | Nby2 | half of the length of the DCT4 |
[in] | normalize | normalizing factor |
N
is not a supported transform lengthsqrt(2/N)
, which depends on the size of transform N
. Normalizing factors in 1.15 format are mentioned in the table below for different DCT sizes:DCT Size | Normalizing factor value (hexadecimal) |
---|---|
2048 | 0x400 |
512 | 0x800 |
128 | 0x1000 |
void arm_dct4_q15 | +( | +const arm_dct4_instance_q15 * | +S, | +
+ | + | q15_t * | +pState, | +
+ | + | q15_t * | +pInlineBuffer | +
+ | ) | ++ |
Processing function for the Q15 DCT4/IDCT4.
+[in] | S | points to an instance of the Q15 DCT4 structure. |
[in] | pState | points to state buffer. |
[in,out] | pInlineBuffer | points to the in-place input and output buffer. |
DCT Size | Input format | Output format | Number of bits to upscale |
---|---|---|---|
2048 | 1.15 | 11.5 | 10 |
512 | 1.15 | 9.7 | 8 |
128 | 1.15 | 7.9 | 6 |
+Functions | |
arm_status | arm_dct4_init_q31 (arm_dct4_instance_q31 *S, arm_rfft_instance_q31 *S_RFFT, arm_cfft_radix4_instance_q31 *S_CFFT, uint16_t N, uint16_t Nby2, q31_t normalize) |
Initialization function for the Q31 DCT4/IDCT4. | |
void | arm_dct4_q31 (const arm_dct4_instance_q31 *S, q31_t *pState, q31_t *pInlineBuffer) |
Processing function for the Q31 DCT4/IDCT4. | |
arm_status arm_dct4_init_q31 | +( | +arm_dct4_instance_q31 * | +S, | +
+ | + | arm_rfft_instance_q31 * | +S_RFFT, | +
+ | + | arm_cfft_radix4_instance_q31 * | +S_CFFT, | +
+ | + | uint16_t | +N, | +
+ | + | uint16_t | +Nby2, | +
+ | + | q31_t | +normalize | +
+ | ) | ++ |
Initialization function for the Q31 DCT4/IDCT4.
+[in,out] | S | points to an instance of Q31 DCT4/IDCT4 structure. |
[in] | S_RFFT | points to an instance of Q31 RFFT/RIFFT structure |
[in] | S_CFFT | points to an instance of Q31 CFFT/CIFFT structure |
[in] | N | length of the DCT4. |
[in] | Nby2 | half of the length of the DCT4. |
[in] | normalize | normalizing factor. |
N
is not a supported transform lengthsqrt(2/N)
, which depends on the size of transform N
. Normalizing factors in 1.31 format are mentioned in the table below for different DCT sizes:DCT Size | Normalizing factor value (hexadecimal) |
---|---|
2048 | 0x4000000 |
512 | 0x8000000 |
128 | 0x10000000 |
void arm_dct4_q31 | +( | +const arm_dct4_instance_q31 * | +S, | +
+ | + | q31_t * | +pState, | +
+ | + | q31_t * | +pInlineBuffer | +
+ | ) | ++ |
Processing function for the Q31 DCT4/IDCT4.
+[in] | S | points to an instance of the Q31 DCT4 structure. |
[in] | pState | points to state buffer. |
[in,out] | pInlineBuffer | points to the in-place input and output buffer. |
DCT Size | Input format | Output format | Number of bits to upscale |
---|---|---|---|
2048 | 2.30 | 12.20 | 11 |
512 | 2.30 | 10.22 | 9 |
128 | 2.30 | 8.24 | 7 |
+Content | |
DCT Type IV Tables | |
DCT4 F32 | |
DCT4 Q15 | |
DCT4 Q31 | |
Representation of signals by minimum number of values is important for storage and transmission. The possibility of large discontinuity between the beginning and end of a period of a signal in DFT can be avoided by extending the signal so that it is even-symmetric. Discrete Cosine Transform (DCT) is constructed such that its energy is heavily concentrated in the lower part of the spectrum and is very widely used in signal and image coding applications. The family of DCTs (DCT type- 1,2,3,4) is the outcome of different combinations of homogeneous boundary conditions. DCT has an excellent energy-packing capability, hence has many applications and in data compression in particular.
+DCT is essentially the Discrete Fourier Transform(DFT) of an even-extended real signal. Reordering of the input data makes the computation of DCT just a problem of computing the DFT of a real signal with a few additional operations. This approach provides regular, simple, and very efficient DCT algorithms for practical hardware and software implementations.
+DCT type-II can be implemented using Fast fourier transform (FFT) internally, as the transform is applied on real values, Real FFT can be used. DCT4 is implemented using DCT2 as their implementations are similar except with some added pre-processing and post-processing. DCT2 implementation can be described in the following steps:
This process is explained by the block diagram below:
+\[ + X_c(k) = \sqrt{\frac{2}{N}}\sum_{n=0}^{N-1} x(n)cos\Big[\Big(n+\frac{1}{2}\Big)\Big(k+\frac{1}{2}\Big)\frac{\pi}{N}\Big] + \] +
+ wherek = 0, 1, 2, ..., N-1
+\[ + x(n) = \sqrt{\frac{2}{N}}\sum_{k=0}^{N-1} X_c(k)cos\Big[\Big(n+\frac{1}{2}\Big)\Big(k+\frac{1}{2}\Big)\frac{\pi}{N}\Big] + \] +
+ wheren = 0, 1, 2, ..., N-1
+ arm_dct4_instance_f32 S = {N, Nby2, normalize, pTwiddle, pCosFactor, pRfft, pCfft}; + arm_dct4_instance_q31 S = {N, Nby2, normalize, pTwiddle, pCosFactor, pRfft, pCfft}; + arm_dct4_instance_q15 S = {N, Nby2, normalize, pTwiddle, pCosFactor, pRfft, pCfft}; +where
N
is the length of the DCT4; Nby2
is half of the length of the DCT4; normalize
is normalizing factor used and is equal to sqrt(2/N)
; pTwiddle
points to the twiddle factor table; pCosFactor
points to the cosFactor table; pRfft
points to the real FFT instance; pCfft
points to the complex FFT instance; The CFFT and RFFT structures also needs to be initialized, refer to arm_cfft_radix4_f32() and arm_rfft_f32() respectively for details regarding static initialization.+Variables | |
const float32_t | Weights_128 [256] |
Weights Table. | |
const q15_t | WeightsQ15_128 [256] |
Weights Table. | |
const q31_t | WeightsQ31_128 [256] |
end of RealFFT_Table group
+const float32_t Weights_128[256] | +
Weights Table.
+weights[n] = e^(-j*n*pi/(2*N))
+for(i = 0; i< N; i++) +{ + weights[(2*i)] = cos (i*c); + weights[(2*i)+1] = -sin (i*c); +}
N
is the Number of weights to be calculated and c
is pi/(2*N)
2*N
. cos_factors[n] = 2 * cos((2n+1)*pi/(4*N))
for(i = 0; i< N; i++) +{ + cos_factors[i]= 2 * cos((2*i+1)*c/2); +}
N
is the number of factors to generate and c
is pi/(2*N)
const q15_t WeightsQ15_128[256] | +
Weights Table.
+weights[n] = e^(-j*n*pi/(2*N))
+for(i = 0; i< N; i++) +{ + weights[(2*i)] = cos(i*c); + weights[(2*i)+1] = -sin(i*c); +}
N
is the Number of weights to be calculated and c
is pi/(2*N)
2*N
. cos_factors[n] = 2 * cos((2n+1)*pi/(4*N))
+for (i = 0; i< N; i++) +{ + cos_factors[i] = 2 * cos((2*i+1)*c/2); +}
N
is the number of factors to generate and c
is pi/(2*N)
const q31_t WeightsQ31_128[256] | +
weights[n] = e^(-j*n*pi/(2*N))
+for (i = 0; i< N; i++) +{ + weights[(2*i)] = cos(i*c); + weights[(2*i)+1] = -sin(i*c); +}
N
is the Number of weights to be calculated and c
is pi/(2*N)
2*N
. cos_factors[n] = 2 * cos((2n+1)*pi/(4*N))
+for (i = 0; i< N; i++) +{ + cos_factors[i] = 2 * cos((2*i+1)*c/2); +}
N
is the number of factors to generate and c
is pi/(2*N)
+Functions | |
template<typename T > | |
void | PrintType (void) |
Prints a textual representation of a type. | |
void PrintType | +( | +void | +) | ++ |
Prints a textual representation of a type.
+T | The datatype to display |
+Content | |
Architecture independent algorithms | |
Architecture detection | |
Common types and constants | |
Tools for debugging | |
Fixed point datatypes | |
Abstract syntax tree for fusion | |
Matrixes | |
Memory allocator | |
Number datatypes | |
Architecture specific algorithm | |
Unrolling | |
Vectors | |
C++ template extension to CMSIS-DSP. It is not yet part of the pack but the headers can be found on the CMSIS-DSP github The principles are described in this page
++Namespaces | |
namespace | inner |
+Data Structures | |
struct | Q15DSPVector |
Representation of a vector when DSP extension supported. More... | |
struct | vector_traits< Q15, DSP, typename std::enable_if< true >::type > |
Vector description for Q15 with DSP extensions. More... | |
struct Q15DSPVector | +
Representation of a vector when DSP extension supported.
+Public Member Functions | |
+ | Q15DSPVector () |
Create new 0 initialized vector. | |
Q15DSPVector (int32_t val) | |
Create vector initialized from value. | |
+ | operator int32_t () |
Return value in vector. | |
+
|
+ +inlineexplicit | +
Create vector initialized from value.
+[in] | val | The value |
struct vector_traits< Q15, DSP, typename std::enable_if< true >::type > | +
Vector description for Q15 with DSP extensions.
+Public Types | |
+typedef Q15 | type |
Scalar datatype. | |
+typedef type::value_type | storage_type |
Storage datatype. | |
+typedef Q15DSPVector | vector |
Vector datatype. | |
+typedef Q< 33, 30 > | temp_accumulator |
Accumulator datatype. | |
typedef uint32_t | predicate_t |
Static Public Member Functions | |
static Q< 33, 30 > | temp_acc_zero () |
Zero accumulator. | |
static constexpr int16_t | zero_lane () |
Value to write in a lane to write 0. | |
static constexpr int16_t | lane_value (const Q15 x) |
Convert to lane value. | |
Static Public Attributes | |
+static constexpr bool | has_vector = true |
Has some vector instructions. | |
+static constexpr bool | is_float = false |
Is not float. | |
+static constexpr bool | is_fixed = true |
Is fixed point. | |
+static constexpr bool | has_predicate = false |
No predicated loops. | |
+static constexpr int | nb_lanes = 2 |
Number of lanes. | |
typedef uint32_t predicate_t | +
Dummy type since there is no predicated loop for DSP extensions
+ +
+
|
+ +inlinestaticconstexpr | +
Convert to lane value.
+[in] | x | Value |
+
|
+ +inlinestatic | +
Zero accumulator.
+
+
|
+ +inlinestaticconstexpr | +
Value to write in a lane to write 0.
++Functions | |
arm_status | arm_dtw_distance_f32 (const arm_matrix_instance_f32 *pDistance, const arm_matrix_instance_q7 *pWindow, arm_matrix_instance_f32 *pDTW, float32_t *distance) |
Dynamic Time Warping distance. | |
arm_status | arm_dtw_init_window_q7 (const arm_dtw_window windowType, const int32_t windowSize, arm_matrix_instance_q7 *pWindow) |
Window for dynamic time warping computation. | |
void | arm_dtw_path_f32 (const arm_matrix_instance_f32 *pDTW, int16_t *pPath, uint32_t *pathLength) |
Mapping between query and template. | |
Dynamic Time Warping Distance.
+This is not really a distance since triangular inequality is not respected.
+The step pattern used is symmetric2. Future versions of this function will provide more customization options.
+arm_status arm_dtw_distance_f32 | +( | +const arm_matrix_instance_f32 * | +pDistance, | +
+ | + | const arm_matrix_instance_q7 * | +pWindow, | +
+ | + | arm_matrix_instance_f32 * | +pDTW, | +
+ | + | float32_t * | +distance | +
+ | ) | ++ |
Dynamic Time Warping distance.
+[in] | pDistance | Distance matrix (Query rows * Template columns) |
[in] | pWindow | Windowing matrix (can be NULL if no windowing used) |
[out] | pDTW | Temporary cost buffer (same size) |
[out] | distance | Distance |
The windowing matrix is used to impose some constraints on the search for a path. The algorithm will run faster (smaller search path) but may not be able to find a solution.
+The distance matrix must be initialized only where the windowing matrix is containing 1. Thus, use of a window also decreases the number of distances which must be computed.
+ +arm_status arm_dtw_init_window_q7 | +( | +const arm_dtw_window | +windowType, | +
+ | + | const int32_t | +windowSize, | +
+ | + | arm_matrix_instance_q7 * | +pWindow | +
+ | ) | ++ |
Window for dynamic time warping computation.
+[in] | windowType | Type of window |
[in] | windowSize | Window size |
[in,out] | pWindow | Window |
The input matrix must already contain a buffer and the number of rows (query length) and columns (template length) must be initialized. The function will fill the matrix with 0 and 1.
+ +void arm_dtw_path_f32 | +( | +const arm_matrix_instance_f32 * | +pDTW, | +
+ | + | int16_t * | +pPath, | +
+ | + | uint32_t * | +pathLength | +
+ | ) | ++ |
Mapping between query and template.
+[in] | pDTW | Cost matrix (Query rows * Template columns) |
[out] | pPath | Warping path in cost matrix 2*(nb rows + nb columns) |
[out] | pathLength | Length of path in number of points |
The warping path has length which is at most 2*(query length + template length) in float. 2 because it is a list of coordinates : (query index, template index) coordinate.
+The buffer pPath must be big enough to contain the warping path.
+pathLength is the number of points in the returned path. The resturned path may be smaller than query + template.
+ ++Functions | |
void | arm_rfft_f32 (const arm_rfft_instance_f32 *S, float32_t *pSrc, float32_t *pDst) |
Processing function for the floating-point RFFT/RIFFT. Source buffer is modified by this function. | |
arm_status | arm_rfft_init_f32 (arm_rfft_instance_f32 *S, arm_cfft_radix4_instance_f32 *S_CFFT, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the floating-point RFFT/RIFFT. | |
void arm_rfft_f32 | +( | +const arm_rfft_instance_f32 * | +S, | +
+ | + | float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst | +
+ | ) | ++ |
Processing function for the floating-point RFFT/RIFFT. Source buffer is modified by this function.
+[in] | S | points to an instance of the floating-point RFFT/RIFFT structure |
[in] | pSrc | points to the input buffer |
[out] | pDst | points to the output buffer |
arm_status arm_rfft_init_f32 | +( | +arm_rfft_instance_f32 * | +S, | +
+ | + | arm_cfft_radix4_instance_f32 * | +S_CFFT, | +
+ | + | uint32_t | +fftLenReal, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the floating-point RFFT/RIFFT.
+[in,out] | S | points to an instance of the floating-point RFFT/RIFFT structure |
[in,out] | S_CFFT | points to an instance of the floating-point CFFT/CIFFT structure |
[in] | fftLenReal | length of the FFT. |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthfftLenReal
specifies length of RFFT/RIFFT Process. Supported FFT Lengths are 128, 512, 2048. ifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. A
and B
with length n
, are multiplied element-by-element and then added to obtain dot product. dotProduct = A[0] * B[0] + A[1] * B[1] + ... + A[n-1] * B[n-1]
srcA_buf_f32
points to first input vector srcB_buf_f32
points to second input vector testOutput
stores dot product of the two input vectors.+Functions | |
float16_t | arm_entropy_f16 (const float16_t *pSrcA, uint32_t blockSize) |
Entropy. | |
float32_t | arm_entropy_f32 (const float32_t *pSrcA, uint32_t blockSize) |
Entropy. | |
float64_t | arm_entropy_f64 (const float64_t *pSrcA, uint32_t blockSize) |
Entropy. | |
Computes the entropy of a distribution
+float16_t arm_entropy_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Entropy.
+[in] | pSrcA | Array of input values. |
[in] | blockSize | Number of samples in the input array. |
float32_t arm_entropy_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Entropy.
+[in] | pSrcA | Array of input values. |
[in] | blockSize | Number of samples in the input array. |
+Functions | |
float16_t | arm_euclidean_distance_f16 (const float16_t *pA, const float16_t *pB, uint32_t blockSize) |
Euclidean distance between two vectors. | |
float32_t | arm_euclidean_distance_f32 (const float32_t *pA, const float32_t *pB, uint32_t blockSize) |
Euclidean distance between two vectors. | |
float64_t | arm_euclidean_distance_f64 (const float64_t *pA, const float64_t *pB, uint32_t blockSize) |
Euclidean distance between two vectors. | |
Euclidean distance
+float16_t arm_euclidean_distance_f16 | +( | +const float16_t * | +pA, | +
+ | + | const float16_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Euclidean distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float32_t arm_euclidean_distance_f32 | +( | +const float32_t * | +pA, | +
+ | + | const float32_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Euclidean distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float64_t arm_euclidean_distance_f64 | +( | +const float64_t * | +pA, | +
+ | + | const float64_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Euclidean distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
+Functions | |
void | arm_fir_f16 (const arm_fir_instance_f16 *S, const float16_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Processing function for floating-point FIR filter. | |
void | arm_fir_f32 (const arm_fir_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Processing function for floating-point FIR filter. | |
void | arm_fir_f64 (const arm_fir_instance_f64 *S, const float64_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Processing function for floating-point FIR filter. | |
void | arm_fir_fast_q15 (const arm_fir_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Processing function for the Q15 FIR filter (fast version). | |
void | arm_fir_fast_q31 (const arm_fir_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for the Q31 FIR filter (fast version). | |
void | arm_fir_init_f16 (arm_fir_instance_f16 *S, uint16_t numTaps, const float16_t *pCoeffs, float16_t *pState, uint32_t blockSize) |
Initialization function for the floating-point FIR filter. | |
void | arm_fir_init_f32 (arm_fir_instance_f32 *S, uint16_t numTaps, const float32_t *pCoeffs, float32_t *pState, uint32_t blockSize) |
Initialization function for the floating-point FIR filter. | |
void | arm_fir_init_f64 (arm_fir_instance_f64 *S, uint16_t numTaps, const float64_t *pCoeffs, float64_t *pState, uint32_t blockSize) |
Initialization function for the floating-point FIR filter. | |
arm_status | arm_fir_init_q15 (arm_fir_instance_q15 *S, uint16_t numTaps, const q15_t *pCoeffs, q15_t *pState, uint32_t blockSize) |
Initialization function for the Q15 FIR filter. | |
void | arm_fir_init_q31 (arm_fir_instance_q31 *S, uint16_t numTaps, const q31_t *pCoeffs, q31_t *pState, uint32_t blockSize) |
Initialization function for the Q31 FIR filter. | |
void | arm_fir_init_q7 (arm_fir_instance_q7 *S, uint16_t numTaps, const q7_t *pCoeffs, q7_t *pState, uint32_t blockSize) |
Initialization function for the Q7 FIR filter. | |
void | arm_fir_q15 (const arm_fir_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Processing function for the Q15 FIR filter. | |
void | arm_fir_q31 (const arm_fir_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for Q31 FIR filter. | |
void | arm_fir_q7 (const arm_fir_instance_q7 *S, const q7_t *pSrc, q7_t *pDst, uint32_t blockSize) |
Processing function for Q7 FIR filter. | |
This set of functions implements Finite Impulse Response (FIR) filters for Q7, Q15, Q31, and floating-point data types. Fast versions of Q15 and Q31 are also provided. The functions operate on blocks of input and output data and each call to the function processes blockSize
samples through the filter. pSrc
and pDst
points to input and output arrays containing blockSize
values.
b[n]
is multiplied by a state variable which equals a previous input sample x[n]
. + y[n] = b[0] * x[n] + b[1] * x[n-1] + b[2] * x[n-2] + ...+ b[numTaps-1] * x[n-numTaps+1] +
pCoeffs
points to a coefficient array of size numTaps
. Coefficients are stored in time reversed order. + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to a state array of size numTaps + blockSize - 1
. Samples in the state buffer are stored in the following order. + {x[n-numTaps+1], x[n-numTaps], x[n-numTaps-1], x[n-numTaps-2]....x[n](==pSrc[0]), x[n+1](==pSrc[1]), ..., x[n+blockSize-1](==pSrc[blockSize-1])} +
blockSize-1
. The increased state buffer length allows circular addressing, which is traditionally used in the FIR filters, to be avoided and yields a significant speed improvement. The state variables are updated after each block of data is processed; the coefficients are untouched.+ arm_fir_instance_f32 S = {numTaps, pState, pCoeffs}; + arm_fir_instance_q31 S = {numTaps, pState, pCoeffs}; + arm_fir_instance_q15 S = {numTaps, pState, pCoeffs}; + arm_fir_instance_q7 S = {numTaps, pState, pCoeffs}; +where
numTaps
is the number of filter coefficients in the filter; pState
is the address of the state buffer; pCoeffs
is the address of the coefficient buffer.The array length L must be a multiple of x. L = x * a :
The additional coefficients (x * a - numTaps) must be set to 0. numTaps is still set to its right value in the init function. It means that the implementation may require to read more coefficients due to the vectorization and to avoid having to manage too many different cases in the code.
+ numTaps + A + blockSize - 1
:void arm_fir_f16 | +( | +const arm_fir_instance_f16 * | +S, | +
+ | + | const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for floating-point FIR filter.
+Processing function for the floating-point FIR filter.
+[in] | S | points to an instance of the floating-point FIR filter structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_fir_f32 | +( | +const arm_fir_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for floating-point FIR filter.
+Processing function for the floating-point FIR filter.
+[in] | S | points to an instance of the floating-point FIR filter structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_fir_f64 | +( | +const arm_fir_instance_f64 * | +S, | +
+ | + | const float64_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for floating-point FIR filter.
+Processing function for the floating-point FIR filter.
+[in] | S | points to an instance of the floating-point FIR filter structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_fir_fast_q15 | +( | +const arm_fir_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q15 FIR filter (fast version).
+Processing function for the fast Q15 FIR filter (fast version).
+[in] | S | points to an instance of the Q15 FIR filter structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_fir_fast_q31 | +( | +const arm_fir_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 FIR filter (fast version).
+Processing function for the fast Q31 FIR filter (fast version).
+[in] | S | points to an instance of the Q31 structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_fir_init_f16 | +( | +arm_fir_instance_f16 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const float16_t * | +pCoeffs, | +
+ | + | float16_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the floating-point FIR filter.
+[in,out] | S | points to an instance of the floating-point FIR filter structure |
[in] | numTaps | number of filter coefficients in the filter |
[in] | pCoeffs | points to the filter coefficients buffer |
[in] | pState | points to the state buffer |
[in] | blockSize | number of samples processed per call |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to the array of state variables. pState
is of length numTaps+blockSize-1
samples (except for Helium - see below), where blockSize
is the number of input samples processed by each call to arm_fir_f16()
. numTaps + 8*ceil(blockSize/8) + blockSize - 1
void arm_fir_init_f32 | +( | +arm_fir_instance_f32 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the floating-point FIR filter.
+[in,out] | S | points to an instance of the floating-point FIR filter structure |
[in] | numTaps | number of filter coefficients in the filter |
[in] | pCoeffs | points to the filter coefficients buffer |
[in] | pState | points to the state buffer |
[in] | blockSize | number of samples processed per call |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to the array of state variables and some working memory for the Helium version. pState
is of length numTaps+blockSize-1
samples (except for Helium - see below), where blockSize
is the number of input samples processed by each call to arm_fir_f32()
. numTaps + 2 * blockSize - 1
void arm_fir_init_f64 | +( | +arm_fir_instance_f64 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const float64_t * | +pCoeffs, | +
+ | + | float64_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the floating-point FIR filter.
+[in,out] | S | points to an instance of the floating-point FIR filter structure |
[in] | numTaps | number of filter coefficients in the filter |
[in] | pCoeffs | points to the filter coefficients buffer |
[in] | pState | points to the state buffer |
[in] | blockSize | number of samples processed per call |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to the array of state variables. pState
is of length numTaps+blockSize-1
samples, where blockSize
is the number of input samples processed by each call to arm_fir_f64()
.arm_status arm_fir_init_q15 | +( | +arm_fir_instance_q15 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const q15_t * | +pCoeffs, | +
+ | + | q15_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q15 FIR filter.
+[in,out] | S | points to an instance of the Q15 FIR filter structure. |
[in] | numTaps | number of filter coefficients in the filter. Must be even and greater than or equal to 4. |
[in] | pCoeffs | points to the filter coefficients buffer. |
[in] | pState | points to the state buffer. |
[in] | blockSize | number of samples processed per call. |
numTaps
is not greater than or equal to 4 and evenpCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +Note that
numTaps
must be even and greater than or equal to 4. To implement an odd length filter simply increase numTaps
by 1 and set the last coefficient to zero. For example, to implement a filter with numTaps=3
and coefficients + {0.3, -0.8, 0.3} +set
numTaps=4
and use the coefficients: + {0.3, -0.8, 0.3, 0}. +Similarly, to implement a two point filter
+ {0.3, -0.3} +set
numTaps=4
and use the coefficients: + {0.3, -0.3, 0, 0}. +
pState
points to the array of state variables. pState
is of length numTaps+blockSize
, when running on Cortex-M4 and Cortex-M3 and is of length numTaps+blockSize-1
, when running on Cortex-M0 where blockSize
is the number of input samples processed by each call to arm_fir_q15()
.void arm_fir_init_q31 | +( | +arm_fir_instance_q31 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const q31_t * | +pCoeffs, | +
+ | + | q31_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q31 FIR filter.
+[in,out] | S | points to an instance of the Q31 FIR filter structure |
[in] | numTaps | number of filter coefficients in the filter |
[in] | pCoeffs | points to the filter coefficients buffer |
[in] | pState | points to the state buffer |
[in] | blockSize | number of samples processed |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to the array of state variables. pState
is of length numTaps+blockSize-1
samples (except for Helium - see below), where blockSize
is the number of input samples processed by each call to arm_fir_q31()
. numTaps + 8*ceil(blockSize/4) + blockSize - 1
void arm_fir_init_q7 | +( | +arm_fir_instance_q7 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const q7_t * | +pCoeffs, | +
+ | + | q7_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q7 FIR filter.
+[in,out] | S | points to an instance of the Q7 FIR filter structure |
[in] | numTaps | number of filter coefficients in the filter |
[in] | pCoeffs | points to the filter coefficients buffer |
[in] | pState | points to the state buffer |
[in] | blockSize | number of samples processed |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to the array of state variables. pState
is of length numTaps+blockSize-1
samples, where blockSize
is the number of input samples processed by each call to arm_fir_q7()
.void arm_fir_q15 | +( | +const arm_fir_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q15 FIR filter.
+[in] | S | points to an instance of the Q15 FIR filter structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_fir_q31 | +( | +const arm_fir_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for Q31 FIR filter.
+Processing function for the Q31 FIR filter.
+[in] | S | points to an instance of the Q31 FIR filter structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_fir_q7 | +( | +const arm_fir_instance_q7 * | +S, | +
+ | + | const q7_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for Q7 FIR filter.
+Processing function for the Q7 FIR filter.
+[in] | S | points to an instance of the Q7 FIR filter structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
+ h = fir1(28, 6/24); +The first argument is the "order" of the filter and is always one less than the desired length. The second argument is the normalized cutoff frequency. This is in the range 0 (DC) to 1.0 (Nyquist). A 6 kHz cutoff with a Nyquist frequency of 24 kHz lies at a normalized frequency of 6/24 = 0.25. The CMSIS FIR filter function requires the coefficients to be in time reversed order.
+ fliplr(h) +The resulting filter coefficients and are shown below. Note that the filter is symmetric (a property of linear phase FIR filters) and the point of symmetry is sample 14. Thus the filter will have a delay of 14 samples for all frequencies.
testInput_f32_1kHz_15kHz
points to the input data refOutput
points to the reference output data testOutput
points to the test output data firStateF32
points to state buffer firCoeffs32
points to coefficient buffer blockSize
number of samples processed at a time numBlocks
number of framesRefer arm_fir_example_f32.c
++Functions | |
void | arm_fir_interpolate_f32 (const arm_fir_interpolate_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Processing function for floating-point FIR interpolator. | |
arm_status | arm_fir_interpolate_init_f32 (arm_fir_interpolate_instance_f32 *S, uint8_t L, uint16_t numTaps, const float32_t *pCoeffs, float32_t *pState, uint32_t blockSize) |
Initialization function for the floating-point FIR interpolator. | |
arm_status | arm_fir_interpolate_init_q15 (arm_fir_interpolate_instance_q15 *S, uint8_t L, uint16_t numTaps, const q15_t *pCoeffs, q15_t *pState, uint32_t blockSize) |
Initialization function for the Q15 FIR interpolator. | |
arm_status | arm_fir_interpolate_init_q31 (arm_fir_interpolate_instance_q31 *S, uint8_t L, uint16_t numTaps, const q31_t *pCoeffs, q31_t *pState, uint32_t blockSize) |
Initialization function for the Q31 FIR interpolator. | |
void | arm_fir_interpolate_q15 (const arm_fir_interpolate_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Processing function for the Q15 FIR interpolator. | |
void | arm_fir_interpolate_q31 (const arm_fir_interpolate_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for the Q31 FIR interpolator. | |
These functions combine an upsampler (zero stuffer) and an FIR filter. They are used in multirate systems for increasing the sample rate of a signal without introducing high frequency images. Conceptually, the functions are equivalent to the block diagram below:
After upsampling by a factor of L
, the signal should be filtered by a lowpass filter with a normalized cutoff frequency of 1/L
in order to eliminate high frequency copies of the spectrum. The user of the function is responsible for providing the filter coefficients.
The FIR interpolator functions provided in the CMSIS DSP Library combine the upsampler and FIR filter in an efficient manner. The upsampler inserts L-1
zeros between each sample. Instead of multiplying by these zero values, the FIR filter is designed to skip them. This leads to an efficient implementation without any wasted effort. The functions operate on blocks of input and output data. pSrc
points to an array of blockSize
input values and pDst
points to an array of blockSize*L
output values.
The library provides separate functions for Q15, Q31, and floating-point data types.
++ y[n] = b[0] * x[n] + b[L] * x[n-1] + ... + b[L*(phaseLength-1)] * x[n-phaseLength+1] + y[n+1] = b[1] * x[n] + b[L+1] * x[n-1] + ... + b[L*(phaseLength-1)+1] * x[n-phaseLength+1] + ... + y[n+(L-1)] = b[L-1] * x[n] + b[2*L-1] * x[n-1] + ....+ b[L*(phaseLength-1)+(L-1)] * x[n-phaseLength+1] +This approach is more efficient than straightforward upsample-then-filter algorithms. With this method the computation is reduced by a factor of
1/L
when compared to using a standard FIR filter. pCoeffs
points to a coefficient array of size numTaps
. numTaps
must be a multiple of the interpolation factor L
and this is checked by the initialization functions. Internally, the function divides the FIR filter's impulse response into shorter filters of length phaseLength=numTaps/L
. Coefficients are stored in time reversed order. + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to a state array of size blockSize + phaseLength - 1
. Samples in the state buffer are stored in the order: + {x[n-phaseLength+1], x[n-phaseLength], x[n-phaseLength-1], x[n-phaseLength-2]....x[0], x[1], ..., x[blockSize-1]} +
+ arm_fir_interpolate_instance_f32 S = {L, phaseLength, pCoeffs, pState}; + arm_fir_interpolate_instance_q31 S = {L, phaseLength, pCoeffs, pState}; + arm_fir_interpolate_instance_q15 S = {L, phaseLength, pCoeffs, pState}; +
L
is the interpolation factor; phaseLength=numTaps/L
is the length of each of the shorter FIR filters used internally, pCoeffs
is the address of the coefficient buffer; pState
is the address of the state buffer. Be sure to set the values in the state buffer to zeros when doing static initialization.void arm_fir_interpolate_f32 | +( | +const arm_fir_interpolate_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for floating-point FIR interpolator.
+Processing function for the floating-point FIR interpolator.
+[in] | S | points to an instance of the floating-point FIR interpolator structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of input samples to process |
arm_status arm_fir_interpolate_init_f32 | +( | +arm_fir_interpolate_instance_f32 * | +S, | +
+ | + | uint8_t | +L, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the floating-point FIR interpolator.
+[in,out] | S | points to an instance of the floating-point FIR interpolator structure |
[in] | L | upsample factor |
[in] | numTaps | number of filter coefficients in the filter |
[in] | pCoeffs | points to the filter coefficient buffer |
[in] | pState | points to the state buffer |
[in] | blockSize | number of input samples to process per call |
numTaps
is not a multiple of the interpolation factor L
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[numTaps-2], ..., b[1], b[0]} +
numTaps
must be a multiple of the interpolation factor L
. pState
points to the array of state variables. pState
is of length (numTaps/L)+blockSize-1
words where blockSize
is the number of input samples processed by each call to arm_fir_interpolate_f32()
. arm_status arm_fir_interpolate_init_q15 | +( | +arm_fir_interpolate_instance_q15 * | +S, | +
+ | + | uint8_t | +L, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const q15_t * | +pCoeffs, | +
+ | + | q15_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q15 FIR interpolator.
+[in,out] | S | points to an instance of the Q15 FIR interpolator structure |
[in] | L | upsample factor |
[in] | numTaps | number of filter coefficients in the filter |
[in] | pCoeffs | points to the filter coefficient buffer |
[in] | pState | points to the state buffer |
[in] | blockSize | number of input samples to process per call |
numTaps
is not a multiple of the interpolation factor L
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[numTaps-2], ..., b[1], b[0]} +The length of the filter
numTaps
must be a multiple of the interpolation factor L
. pState
points to the array of state variables. pState
is of length (numTaps/L)+blockSize-1
words where blockSize
is the number of input samples processed by each call to arm_fir_interpolate_q15()
. arm_status arm_fir_interpolate_init_q31 | +( | +arm_fir_interpolate_instance_q31 * | +S, | +
+ | + | uint8_t | +L, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const q31_t * | +pCoeffs, | +
+ | + | q31_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q31 FIR interpolator.
+[in,out] | S | points to an instance of the Q31 FIR interpolator structure |
[in] | L | upsample factor |
[in] | numTaps | number of filter coefficients in the filter |
[in] | pCoeffs | points to the filter coefficient buffer |
[in] | pState | points to the state buffer |
[in] | blockSize | number of input samples to process per call |
numTaps
is not a multiple of the interpolation factor L
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[numTaps-2], ..., b[1], b[0]} +The length of the filter
numTaps
must be a multiple of the interpolation factor L
. pState
points to the array of state variables. pState
is of length (numTaps/L)+blockSize-1
words where blockSize
is the number of input samples processed by each call to arm_fir_interpolate_q31()
. void arm_fir_interpolate_q15 | +( | +const arm_fir_interpolate_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q15 FIR interpolator.
+[in] | S | points to an instance of the Q15 FIR interpolator structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of input samples to process |
void arm_fir_interpolate_q31 | +( | +const arm_fir_interpolate_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 FIR interpolator.
+[in] | S | points to an instance of the Q31 FIR interpolator structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of input samples to process |
1/(numTaps/L)
. since numTaps/L
additions occur per output sample. After all multiply-accumulates are performed, the 2.62 accumulator is truncated to 1.32 format and then saturated to 1.31 format. +Functions | |
void | arm_fir_lattice_f32 (const arm_fir_lattice_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Processing function for the floating-point FIR lattice filter. | |
void | arm_fir_lattice_init_f32 (arm_fir_lattice_instance_f32 *S, uint16_t numStages, const float32_t *pCoeffs, float32_t *pState) |
Initialization function for the floating-point FIR lattice filter. | |
void | arm_fir_lattice_init_q15 (arm_fir_lattice_instance_q15 *S, uint16_t numStages, const q15_t *pCoeffs, q15_t *pState) |
Initialization function for the Q15 FIR lattice filter. | |
void | arm_fir_lattice_init_q31 (arm_fir_lattice_instance_q31 *S, uint16_t numStages, const q31_t *pCoeffs, q31_t *pState) |
Initialization function for the Q31 FIR lattice filter. | |
void | arm_fir_lattice_q15 (const arm_fir_lattice_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Processing function for Q15 FIR lattice filter. | |
void | arm_fir_lattice_q31 (const arm_fir_lattice_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for the Q31 FIR lattice filter. | |
This set of functions implements Finite Impulse Response (FIR) lattice filters for Q15, Q31 and floating-point data types. Lattice filters are used in a variety of adaptive filter applications. The filter structure is feedforward and the net impulse response is finite length. The functions operate on blocks of input and output data and each call to the function processes blockSize
samples through the filter. pSrc
and pDst
point to input and output arrays containing blockSize
values.
+ f0[n] = g0[n] = x[n] + fm[n] = fm-1[n] + km * gm-1[n-1] for m = 1, 2, ...M + gm[n] = km * fm-1[n] + gm-1[n-1] for m = 1, 2, ...M + y[n] = fM[n] +
pCoeffs
points to tha array of reflection coefficients of size numStages
. Reflection Coefficients are stored in the following order. + {k1, k2, ..., kM} +where M is number of stages
pState
points to a state array of size numStages
. The state variables (g values) hold previous inputs and are stored in the following order. + {g0[n], g1[n], g2[n] ...gM-1[n]} +The state variables are updated after each block of data is processed; the coefficients are untouched.
+ arm_fir_lattice_instance_f32 S = {numStages, pState, pCoeffs}; + arm_fir_lattice_instance_q31 S = {numStages, pState, pCoeffs}; + arm_fir_lattice_instance_q15 S = {numStages, pState, pCoeffs}; +
numStages
is the number of stages in the filter; pState
is the address of the state buffer; pCoeffs
is the address of the coefficient buffer.void arm_fir_lattice_f32 | +( | +const arm_fir_lattice_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point FIR lattice filter.
+[in] | S | points to an instance of the floating-point FIR lattice structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_fir_lattice_init_f32 | +( | +arm_fir_lattice_instance_f32 * | +S, | +
+ | + | uint16_t | +numStages, | +
+ | + | const float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState | +
+ | ) | ++ |
Initialization function for the floating-point FIR lattice filter.
+[in] | S | points to an instance of the floating-point FIR lattice structure |
[in] | numStages | number of filter stages |
[in] | pCoeffs | points to the coefficient buffer. The array is of length numStages |
[in] | pState | points to the state buffer. The array is of length numStages |
void arm_fir_lattice_init_q15 | +( | +arm_fir_lattice_instance_q15 * | +S, | +
+ | + | uint16_t | +numStages, | +
+ | + | const q15_t * | +pCoeffs, | +
+ | + | q15_t * | +pState | +
+ | ) | ++ |
Initialization function for the Q15 FIR lattice filter.
+[in] | S | points to an instance of the Q15 FIR lattice structure |
[in] | numStages | number of filter stages |
[in] | pCoeffs | points to the coefficient buffer. The array is of length numStages |
[in] | pState | points to the state buffer. The array is of length numStages |
void arm_fir_lattice_init_q31 | +( | +arm_fir_lattice_instance_q31 * | +S, | +
+ | + | uint16_t | +numStages, | +
+ | + | const q31_t * | +pCoeffs, | +
+ | + | q31_t * | +pState | +
+ | ) | ++ |
Initialization function for the Q31 FIR lattice filter.
+[in] | S | points to an instance of the Q31 FIR lattice structure |
[in] | numStages | number of filter stages |
[in] | pCoeffs | points to the coefficient buffer. The array is of length numStages |
[in] | pState | points to the state buffer. The array is of length numStages |
void arm_fir_lattice_q15 | +( | +const arm_fir_lattice_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for Q15 FIR lattice filter.
+Processing function for the Q15 FIR lattice filter.
+[in] | S | points to an instance of the Q15 FIR lattice structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_fir_lattice_q31 | +( | +const arm_fir_lattice_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 FIR lattice filter.
+[in] | S | points to an instance of the Q31 FIR lattice structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
+Functions | |
void | arm_fir_sparse_f32 (arm_fir_sparse_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, float32_t *pScratchIn, uint32_t blockSize) |
Processing function for the floating-point sparse FIR filter. | |
void | arm_fir_sparse_init_f32 (arm_fir_sparse_instance_f32 *S, uint16_t numTaps, const float32_t *pCoeffs, float32_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize) |
Initialization function for the floating-point sparse FIR filter. | |
void | arm_fir_sparse_init_q15 (arm_fir_sparse_instance_q15 *S, uint16_t numTaps, const q15_t *pCoeffs, q15_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize) |
Initialization function for the Q15 sparse FIR filter. | |
void | arm_fir_sparse_init_q31 (arm_fir_sparse_instance_q31 *S, uint16_t numTaps, const q31_t *pCoeffs, q31_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize) |
Initialization function for the Q31 sparse FIR filter. | |
void | arm_fir_sparse_init_q7 (arm_fir_sparse_instance_q7 *S, uint16_t numTaps, const q7_t *pCoeffs, q7_t *pState, int32_t *pTapDelay, uint16_t maxDelay, uint32_t blockSize) |
Initialization function for the Q7 sparse FIR filter. | |
void | arm_fir_sparse_q15 (arm_fir_sparse_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, q15_t *pScratchIn, q31_t *pScratchOut, uint32_t blockSize) |
Processing function for the Q15 sparse FIR filter. | |
void | arm_fir_sparse_q31 (arm_fir_sparse_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, q31_t *pScratchIn, uint32_t blockSize) |
Processing function for the Q31 sparse FIR filter. | |
void | arm_fir_sparse_q7 (arm_fir_sparse_instance_q7 *S, const q7_t *pSrc, q7_t *pDst, q7_t *pScratchIn, q31_t *pScratchOut, uint32_t blockSize) |
Processing function for the Q7 sparse FIR filter. | |
This group of functions implements sparse FIR filters. Sparse FIR filters are equivalent to standard FIR filters except that most of the coefficients are equal to zero. Sparse filters are used for simulating reflections in communications and audio applications.
+There are separate functions for Q7, Q15, Q31, and floating-point data types. The functions operate on blocks of input and output data and each call to the function processes blockSize
samples through the filter. pSrc
and pDst
points to input and output arrays respectively containing blockSize
values.
pTapDelay
which specifies the locations of the non-zero coefficients. This is in addition to the coefficient array b
. The implementation essentially skips the multiplications by zero and leads to an efficient realization. + y[n] = b[0] * x[n-pTapDelay[0]] + b[1] * x[n-pTapDelay[1]] + b[2] * x[n-pTapDelay[2]] + ...+ b[numTaps-1] * x[n-pTapDelay[numTaps-1]] +
pCoeffs
points to a coefficient array of size numTaps
; pTapDelay
points to an array of nonzero indices and is also of size numTaps
; pState
points to a state array of size maxDelay + blockSize
, where maxDelay
is the largest offset value that is ever used in the pTapDelay
array. Some of the processing functions also require temporary working buffers.+ arm_fir_sparse_instance_f32 S = {numTaps, 0, pState, pCoeffs, maxDelay, pTapDelay}; + arm_fir_sparse_instance_q31 S = {numTaps, 0, pState, pCoeffs, maxDelay, pTapDelay}; + arm_fir_sparse_instance_q15 S = {numTaps, 0, pState, pCoeffs, maxDelay, pTapDelay}; + arm_fir_sparse_instance_q7 S = {numTaps, 0, pState, pCoeffs, maxDelay, pTapDelay}; +
void arm_fir_sparse_f32 | +( | +arm_fir_sparse_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | float32_t * | +pScratchIn, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point sparse FIR filter.
+[in] | S | points to an instance of the floating-point sparse FIR structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | pScratchIn | points to a temporary buffer of size blockSize |
[in] | blockSize | number of input samples to process |
void arm_fir_sparse_init_f32 | +( | +arm_fir_sparse_instance_f32 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState, | +
+ | + | int32_t * | +pTapDelay, | +
+ | + | uint16_t | +maxDelay, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the floating-point sparse FIR filter.
+[in,out] | S | points to an instance of the floating-point sparse FIR structure |
[in] | numTaps | number of nonzero coefficients in the filter |
[in] | pCoeffs | points to the array of filter coefficients |
[in] | pState | points to the state buffer |
[in] | pTapDelay | points to the array of offset times |
[in] | maxDelay | maximum offset time supported |
[in] | blockSize | number of samples that will be processed per block |
pCoeffs
holds the filter coefficients and has length numTaps
. pState
holds the filter's state variables and must be of length maxDelay + blockSize
, where maxDelay
is the maximum number of delay line values. blockSize
is the number of samples processed by the arm_fir_sparse_f32()
function. void arm_fir_sparse_init_q15 | +( | +arm_fir_sparse_instance_q15 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const q15_t * | +pCoeffs, | +
+ | + | q15_t * | +pState, | +
+ | + | int32_t * | +pTapDelay, | +
+ | + | uint16_t | +maxDelay, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q15 sparse FIR filter.
+[in,out] | S | points to an instance of the Q15 sparse FIR structure |
[in] | numTaps | number of nonzero coefficients in the filter |
[in] | pCoeffs | points to the array of filter coefficients |
[in] | pState | points to the state buffer |
[in] | pTapDelay | points to the array of offset times |
[in] | maxDelay | maximum offset time supported |
[in] | blockSize | number of samples that will be processed per block |
pCoeffs
holds the filter coefficients and has length numTaps
. pState
holds the filter's state variables and must be of length maxDelay + blockSize
, where maxDelay
is the maximum number of delay line values. blockSize
is the number of words processed by arm_fir_sparse_q15()
function. void arm_fir_sparse_init_q31 | +( | +arm_fir_sparse_instance_q31 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const q31_t * | +pCoeffs, | +
+ | + | q31_t * | +pState, | +
+ | + | int32_t * | +pTapDelay, | +
+ | + | uint16_t | +maxDelay, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q31 sparse FIR filter.
+[in,out] | S | points to an instance of the Q31 sparse FIR structure |
[in] | numTaps | number of nonzero coefficients in the filter |
[in] | pCoeffs | points to the array of filter coefficients |
[in] | pState | points to the state buffer |
[in] | pTapDelay | points to the array of offset times |
[in] | maxDelay | maximum offset time supported |
[in] | blockSize | number of samples that will be processed per block |
pCoeffs
holds the filter coefficients and has length numTaps
. pState
holds the filter's state variables and must be of length maxDelay + blockSize
, where maxDelay
is the maximum number of delay line values. blockSize
is the number of words processed by arm_fir_sparse_q31()
function. void arm_fir_sparse_init_q7 | +( | +arm_fir_sparse_instance_q7 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | const q7_t * | +pCoeffs, | +
+ | + | q7_t * | +pState, | +
+ | + | int32_t * | +pTapDelay, | +
+ | + | uint16_t | +maxDelay, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q7 sparse FIR filter.
+[in,out] | S | points to an instance of the Q7 sparse FIR structure |
[in] | numTaps | number of nonzero coefficients in the filter |
[in] | pCoeffs | points to the array of filter coefficients |
[in] | pState | points to the state buffer |
[in] | pTapDelay | points to the array of offset times |
[in] | maxDelay | maximum offset time supported |
[in] | blockSize | number of samples that will be processed per block |
pCoeffs
holds the filter coefficients and has length numTaps
. pState
holds the filter's state variables and must be of length maxDelay + blockSize
, where maxDelay
is the maximum number of delay line values. blockSize
is the number of samples processed by the arm_fir_sparse_q7()
function. void arm_fir_sparse_q15 | +( | +arm_fir_sparse_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | q15_t * | +pScratchIn, | +
+ | + | q31_t * | +pScratchOut, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q15 sparse FIR filter.
+[in] | S | points to an instance of the Q15 sparse FIR structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | pScratchIn | points to a temporary buffer of size blockSize |
[in] | pScratchOut | points to a temporary buffer of size blockSize |
[in] | blockSize | number of input samples to process per call |
void arm_fir_sparse_q31 | +( | +arm_fir_sparse_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | q31_t * | +pScratchIn, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 sparse FIR filter.
+[in] | S | points to an instance of the Q31 sparse FIR structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | pScratchIn | points to a temporary buffer of size blockSize |
[in] | blockSize | number of input samples to process |
void arm_fir_sparse_q7 | +( | +arm_fir_sparse_instance_q7 * | +S, | +
+ | + | const q7_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | q7_t * | +pScratchIn, | +
+ | + | q31_t * | +pScratchOut, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q7 sparse FIR filter.
+[in] | S | points to an instance of the Q7 sparse FIR structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | pScratchIn | points to a temporary buffer of size blockSize |
[in] | pScratchOut | points to a temporary buffer of size blockSize |
[in] | blockSize | number of input samples to process |
+Functions | |
void | arm_fir_decimate_f32 (const arm_fir_decimate_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Processing function for floating-point FIR decimator. | |
void | arm_fir_decimate_f64 (const arm_fir_decimate_instance_f64 *S, const float64_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Processing function for floating-point FIR decimator. | |
void | arm_fir_decimate_fast_q15 (const arm_fir_decimate_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Processing function for the Q15 FIR decimator (fast variant). | |
void | arm_fir_decimate_fast_q31 (const arm_fir_decimate_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for the Q31 FIR decimator (fast variant). | |
arm_status | arm_fir_decimate_init_f32 (arm_fir_decimate_instance_f32 *S, uint16_t numTaps, uint8_t M, const float32_t *pCoeffs, float32_t *pState, uint32_t blockSize) |
Initialization function for the floating-point FIR decimator. | |
arm_status | arm_fir_decimate_init_f64 (arm_fir_decimate_instance_f64 *S, uint16_t numTaps, uint8_t M, const float64_t *pCoeffs, float64_t *pState, uint32_t blockSize) |
Initialization function for the floating-point FIR decimator. | |
arm_status | arm_fir_decimate_init_q15 (arm_fir_decimate_instance_q15 *S, uint16_t numTaps, uint8_t M, const q15_t *pCoeffs, q15_t *pState, uint32_t blockSize) |
Initialization function for the Q15 FIR decimator. | |
arm_status | arm_fir_decimate_init_q31 (arm_fir_decimate_instance_q31 *S, uint16_t numTaps, uint8_t M, const q31_t *pCoeffs, q31_t *pState, uint32_t blockSize) |
Initialization function for the Q31 FIR decimator. | |
void | arm_fir_decimate_q15 (const arm_fir_decimate_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Processing function for the Q15 FIR decimator. | |
void | arm_fir_decimate_q31 (const arm_fir_decimate_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for the Q31 FIR decimator. | |
These functions combine an FIR filter together with a decimator. They are used in multirate systems for reducing the sample rate of a signal without introducing aliasing distortion. Conceptually, the functions are equivalent to the block diagram below:
When decimating by a factor of M
, the signal should be prefiltered by a lowpass filter with a normalized cutoff frequency of 1/M
in order to prevent aliasing distortion. The user of the function is responsible for providing the filter coefficients.
The FIR decimator functions provided in the CMSIS DSP Library combine the FIR filter and the decimator in an efficient manner. Instead of calculating all of the FIR filter outputs and discarding M-1
out of every M
, only the samples output by the decimator are computed. The functions operate on blocks of input and output data. pSrc
points to an array of blockSize
input values and pDst
points to an array of blockSize/M
output values. In order to have an integer number of output samples blockSize
must always be a multiple of the decimation factor M
.
The library provides separate functions for Q15, Q31 and floating-point data types.
++ y[n] = b[0] * x[n] + b[1] * x[n-1] + b[2] * x[n-2] + ...+ b[numTaps-1] * x[n-numTaps+1] +where,
b[n]
are the filter coefficients. pCoeffs
points to a coefficient array of size numTaps
. Coefficients are stored in time reversed order. + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to a state array of size numTaps + blockSize - 1
. Samples in the state buffer are stored in the order: + {x[n-numTaps+1], x[n-numTaps], x[n-numTaps-1], x[n-numTaps-2]....x[0], x[1], ..., x[blockSize-1]} +The state variables are updated after each block of data is processed, the coefficients are untouched.
+ arm_fir_decimate_instance_f32 S = {M, numTaps, pCoeffs, pState}; + arm_fir_decimate_instance_q31 S = {M, numTaps, pCoeffs, pState}; + arm_fir_decimate_instance_q15 S = {M, numTaps, pCoeffs, pState}; +where
M
is the decimation factor; numTaps
is the number of filter coefficients in the filter; pCoeffs
is the address of the coefficient buffer; pState
is the address of the state buffer. Be sure to set the values in the state buffer to zeros when doing static initialization.void arm_fir_decimate_f32 | +( | +const arm_fir_decimate_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for floating-point FIR decimator.
+[in] | S | points to an instance of the floating-point FIR decimator structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of input samples to process |
void arm_fir_decimate_f64 | +( | +const arm_fir_decimate_instance_f64 * | +S, | +
+ | + | const float64_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for floating-point FIR decimator.
+[in] | S | points to an instance of the floating-point FIR decimator structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of input samples to process |
void arm_fir_decimate_fast_q15 | +( | +const arm_fir_decimate_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q15 FIR decimator (fast variant).
+Processing function for the Q15 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
+[in] | S | points to an instance of the Q15 FIR decimator structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of input samples to process per call |
void arm_fir_decimate_fast_q31 | +( | +const arm_fir_decimate_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 FIR decimator (fast variant).
+Processing function for the Q31 FIR decimator (fast variant) for Cortex-M3 and Cortex-M4.
+[in] | S | points to an instance of the Q31 FIR decimator structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
arm_status arm_fir_decimate_init_f32 | +( | +arm_fir_decimate_instance_f32 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | uint8_t | +M, | +
+ | + | const float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the floating-point FIR decimator.
+[in,out] | S | points to an instance of the floating-point FIR decimator structure |
[in] | numTaps | number of coefficients in the filter |
[in] | M | decimation factor |
[in] | pCoeffs | points to the filter coefficients |
[in] | pState | points to the state buffer |
[in] | blockSize | number of input samples to process per call |
blockSize
is not a multiple of M
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to the array of state variables. pState
is of length numTaps+blockSize-1
words where blockSize
is the number of input samples passed to arm_fir_decimate_f32()
. M
is the decimation factor. arm_status arm_fir_decimate_init_f64 | +( | +arm_fir_decimate_instance_f64 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | uint8_t | +M, | +
+ | + | const float64_t * | +pCoeffs, | +
+ | + | float64_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the floating-point FIR decimator.
+[in,out] | S | points to an instance of the floating-point FIR decimator structure |
[in] | numTaps | number of coefficients in the filter |
[in] | M | decimation factor |
[in] | pCoeffs | points to the filter coefficients |
[in] | pState | points to the state buffer |
[in] | blockSize | number of input samples to process per call |
blockSize
is not a multiple of M
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to the array of state variables. pState
is of length numTaps+blockSize-1
words where blockSize
is the number of input samples passed to arm_fir_decimate_f64()
. M
is the decimation factor. arm_status arm_fir_decimate_init_q15 | +( | +arm_fir_decimate_instance_q15 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | uint8_t | +M, | +
+ | + | const q15_t * | +pCoeffs, | +
+ | + | q15_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q15 FIR decimator.
+[in,out] | S | points to an instance of the Q15 FIR decimator structure |
[in] | numTaps | number of coefficients in the filter |
[in] | M | decimation factor |
[in] | pCoeffs | points to the filter coefficients |
[in] | pState | points to the state buffer |
[in] | blockSize | number of input samples to process |
blockSize
is not a multiple of M
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to the array of state variables. pState
is of length numTaps+blockSize-1
words where blockSize
is the number of input samples to the call arm_fir_decimate_q15()
. M
is the decimation factor. arm_status arm_fir_decimate_init_q31 | +( | +arm_fir_decimate_instance_q31 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | uint8_t | +M, | +
+ | + | const q31_t * | +pCoeffs, | +
+ | + | q31_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q31 FIR decimator.
+[in,out] | S | points to an instance of the Q31 FIR decimator structure |
[in] | numTaps | number of coefficients in the filter |
[in] | M | decimation factor |
[in] | pCoeffs | points to the filter coefficients |
[in] | pState | points to the state buffer |
[in] | blockSize | number of input samples to process |
blockSize
is not a multiple of M
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to the array of state variables. pState
is of length numTaps+blockSize-1
words where blockSize
is the number of input samples passed to arm_fir_decimate_q31()
. M
is the decimation factor. void arm_fir_decimate_q15 | +( | +const arm_fir_decimate_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q15 FIR decimator.
+[in] | S | points to an instance of the Q15 FIR decimator structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of input samples to process per call |
void arm_fir_decimate_q31 | +( | +const arm_fir_decimate_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 FIR decimator.
+[in] | S | points to an instance of the Q31 FIR decimator structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of input samples to process |
+Data Structures | |
struct | fixed_storage_type< M, F, s, bool > |
Storage type for a fixed point number. More... | |
struct | fixed_storage_type< M, F, true, test64(M, F, 1)> |
Storage type for a fixed point number representable on int64. More... | |
struct | fixed_storage_type< M, F, false, test64(M, F, 0)> |
Storage type for a fixed point number representable on uint64. More... | |
struct | fixed_storage_type< M, F, true, test32(M, F, 1)> |
Storage type for a fixed point number representable on int32. More... | |
struct | fixed_storage_type< M, F, false, test32(M, F, 0)> |
Storage type for a fixed point number representable on uint32. More... | |
struct | fixed_storage_type< M, F, true, test16(M, F, 1)> |
Storage type for a fixed point number representable on int16. More... | |
struct | fixed_storage_type< M, F, false, test16(M, F, 0)> |
Storage type for a fixed point number representable on uint16. More... | |
struct | fixed_storage_type< M, F, true, test8(M, F, 1)> |
Storage type for a fixed point number representable on int8. More... | |
struct | fixed_storage_type< M, F, false, test8(M, F, 0)> |
Storage type for a fixed point number representable on uint8. More... | |
struct | Q< M, F, S, T > |
Fixed point template. More... | |
struct | Q< M, F, true, int64_t > |
Signed fixed point datatypes on 64 bits. More... | |
struct | Q< M, F, false, uint64_t > |
Unsigned fixed point datatypes on 64 bits. More... | |
struct | Q< M, F, true, int32_t > |
Signed fixed point datatypes on 32 bits. More... | |
struct | Q< M, F, false, uint32_t > |
Unsigned fixed point datatypes on 32 bits. More... | |
struct | Q< M, F, true, int16_t > |
Signed fixed point datatypes on 16 bits. More... | |
struct | Q< M, F, false, uint16_t > |
Unsigned fixed point datatypes on 16 bits. More... | |
struct | Q< M, F, true, int8_t > |
Signed fixed point datatypes on 8 bits. More... | |
struct | Q< M, F, false, uint8_t > |
Unsigned fixed point datatypes on 8 bits. More... | |
struct | FixedCastShift< M, FD, FS, S,(FD >FS)> |
Changed fractional representation of a fixed point number using a shift. More... | |
struct | FixedCastShift< M, FD, FS, S,(FD< FS)> |
Changed fractional representation of a fixed point number using a shift. More... | |
struct | Accumulate< MD, MS, F, S, bool > |
Accumulation without saturation. More... | |
struct | Accumulate< MD, MS, F, S, true > |
Accumulation without saturation. More... | |
+Typedefs | |
+using | Q63 = Q< 0, 63 > |
Q63 datatype. | |
+using | Q31 = Q< 0, 31 > |
Q31 datatype. | |
+using | Q15 = Q< 0, 15 > |
Q15 datatype. | |
+using | Q7 = Q< 0, 7 > |
Q7 datatype. | |
+Functions | |
constexpr bool | test64 (const int M, const int F, const int S) |
Function to identify the template for fixed number representable on 64 bits. | |
constexpr bool | test32 (const int M, const int F, const int S) |
Function to identify the template for fixed number representable on 32 bits. | |
constexpr bool | test16 (const int M, const int F, const int S) |
Function to identify the template for fixed number representable on 16 bits. | |
constexpr bool | test8 (const int M, const int F, const int S) |
Function to identify the template for fixed number representable on 8 bits. | |
constexpr Q63 | operator""_q63 (long double x) |
q63 literal | |
constexpr Q31 | operator""_q31 (long double x) |
q31 literal | |
constexpr Q15 | operator""_q15 (long double x) |
q15 literal | |
constexpr Q7 | operator""_q7 (long double x) |
q7 literal | |
template<int MA, int FA, int MB, int FB, bool SA, bool SB> | |
Q< MA+MB+1, FA+FB, SA||SB > | mult (const Q< MA, FA, SA > &a, const Q< MB, FB, SB > &b) |
Multiplication of two fixed point numbers A and B. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator+ (const Q< M, F, S > &a, const Q< M, F, S > &b) |
Add two fixed point numbers with saturation. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator- (const Q< M, F, S > &a, const Q< M, F, S > &b) |
Subtract two fixed point numbers with saturation. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator- (const Q< M, F, S > &a) |
Negate a fixed point number with saturation. | |
template<int M, int F, bool S> | |
Q< M, F, S > | add (const Q< M, F, S > &a, const Q< M, F, S > &b) |
Add two fixed point numbers without saturation. | |
template<int M, int F, bool S> | |
Q< M, F, S > | sub (const Q< M, F, S > &a, const Q< M, F, S > &b) |
Subtract two fixed point numbers without saturation. | |
template<int M, int F, int N, bool S> | |
Q< M, F, S > | operator>> (const Q< M, F, S > &a, std::integral_constant< int, N >) noexcept |
Shift right a fixed point number with a shift known at build time. | |
template<int M, int F, int N, bool S> | |
Q< M+N, F, S > | operator<< (const Q< M, F, S > &a, std::integral_constant< int, N >) noexcept |
Shift left a fixed point number with a shift known at build time. | |
template<int MD = 0, int MS, int F> | |
Q< MD, F, true > | saturate (const Q< MS, F, true > &src, typename std::enable_if<(MD< MS) &&((MD+F)< 31)>::type *=nullptr) |
Saturate a signed fixed point number. | |
template<int MD = 0, int MS, int F> | |
Q< MD, F, false > | saturate (const Q< MS, F, false > &src, typename std::enable_if<(MD< MS) &&((MD+F)< 31)>::type *=nullptr) |
Saturate an unsigned fixed point number. | |
template<int FD, int M, int FS, bool S> | |
Q< M, FD, S > | toFrac (const Q< M, FS, S > &src) |
Convert between different fractional part formats. | |
template<int MD, int MS, int F, bool S> | |
Q< MD, F, S > | accumulate (const Q< MD, F, S > &a, const Q< MS, F, S > &b) |
Accumulate without saturation. | |
Q7 | operator* (const Q7 &a, const Q7 &b) |
Multiplication operator. | |
Q15 | operator* (const Q15 &a, const Q15 &b) |
Multiplication operator. | |
Q31 | operator* (const Q31 &a, const Q31 &b) |
Multiplication operator. | |
template<int M, int F> | |
bool | operator> (const Q< M, F > &a, const Q< M, F > &b) |
Greater-than comparison operator. | |
template<int M, int F> | |
bool | operator< (const Q< M, F > &a, const Q< M, F > &b) |
Less-than comparison operator. | |
template<int M, int F> | |
bool | operator>= (const Q< M, F > &a, const Q< M, F > &b) |
Greater-than-or-equal comparison operator. | |
template<int M, int F> | |
bool | operator<= (const Q< M, F > &a, const Q< M, F > &b) |
Less-than-or-equal comparison operator. | |
template<int M, int F> | |
bool | operator== (const Q< M, F > a, const Q< M, F > b) |
Equality operator. | |
template<int M, int F> | |
bool | operator!= (const Q< M, F > a, const Q< M, F > b) |
Inequality operator. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator/ (const Q< M, F, S > a, const int32_t b) |
Division operator. | |
template<int M, int F, bool S> | |
Q< M, F, S > | operator+ (const Q< M, F, S > &a) |
No op operator. | |
struct arm_cmsis_dsp::fixed_storage_type | +
Storage type for a fixed point number.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
s | signed or unsigned |
struct arm_cmsis_dsp::fixed_storage_type< M, F, true, test64(M, F, 1)> | +
Storage type for a fixed point number representable on int64.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
struct arm_cmsis_dsp::fixed_storage_type< M, F, false, test64(M, F, 0)> | +
Storage type for a fixed point number representable on uint64.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
struct arm_cmsis_dsp::fixed_storage_type< M, F, true, test32(M, F, 1)> | +
Storage type for a fixed point number representable on int32.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
struct arm_cmsis_dsp::fixed_storage_type< M, F, false, test32(M, F, 0)> | +
Storage type for a fixed point number representable on uint32.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
struct arm_cmsis_dsp::fixed_storage_type< M, F, true, test16(M, F, 1)> | +
Storage type for a fixed point number representable on int16.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
struct arm_cmsis_dsp::fixed_storage_type< M, F, false, test16(M, F, 0)> | +
Storage type for a fixed point number representable on uint16.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
struct arm_cmsis_dsp::fixed_storage_type< M, F, true, test8(M, F, 1)> | +
Storage type for a fixed point number representable on int8.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
struct arm_cmsis_dsp::fixed_storage_type< M, F, false, test8(M, F, 0)> | +
Storage type for a fixed point number representable on uint8.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
struct arm_cmsis_dsp::Q | +
Fixed point template.
+M | Number of bits for mantissa (without sign bit)# |
F | Number of bits for fractional part |
S | Signed or unsigned |
T | storage datatype |
struct arm_cmsis_dsp::Q< M, F, true, int64_t > | +
Signed fixed point datatypes on 64 bits.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
Public Types | |
+using | value_type = typename fixed_storage_type< M, F, true >::value_type |
Storage type for the value. | |
+using | wider_type = typename fixed_storage_type< M, F, true >::wider_type |
Storage type for the widening of the value. | |
Public Member Functions | |
+constexpr | Q () |
Create a new zero fixed point. | |
constexpr | Q (const value_type x) |
Create a new fixed point from a raw integer. | |
constexpr | Q (const Q< M, F, false > &other) |
Convert an unsigned fixed point to this fixed point. | |
bool | operator== (const Q &b) const |
this == b | |
bool | operator!= (const Q &b) const |
this != b | |
bool | operator< (const Q &b) const |
this < b | |
bool | operator> (const Q &b) const |
this > b | |
bool | operator<= (const Q &b) const |
this <= b | |
bool | operator>= (const Q &b) const |
this >= b | |
Q & | operator+= (const Q other) |
this += other | |
Q & | operator-= (const Q other) |
this -= other | |
Static Public Member Functions | |
static constexpr value_type | convert (const float f) |
Convert a float to fixed point. | |
static constexpr Q | f (const float x) |
Create a new fixed point from a float. | |
static constexpr Q | one () |
Fixed point number representing 1. | |
Data Fields | |
+value_type | v |
Storage value. | |
Static Public Attributes | |
+static constexpr int | fracBits = F |
Number of fractional bits. | |
+static constexpr int | mantissaBits = M |
Number of mantissa bits (without sign bit) | |
+static constexpr bool | isSigned = true |
Is this number representation signed. | |
+static constexpr value_type | maxVal = 0x7FFFFFFFFFFFFFFFLL |
Maximum representable positive value. | |
+static constexpr value_type | minVal = 0x8000000000000000LL |
Minimum representable negative value. | |
+
|
+ +inlineexplicitconstexpr | +
Create a new fixed point from a raw integer.
+x | the raw integer |
+
|
+ +inlineexplicitconstexpr | +
Convert an unsigned fixed point to this fixed point.
+other | The unsigned fixed point number |
Some problem may occur since the unsigned may not be representable with the less bits required for the sign representation. This convertion is not saturating.
+ +
+
|
+ +inlinestaticconstexpr | +
Convert a float to fixed point.
+f | float value |
+
|
+ +inlinestaticconstexpr | +
Create a new fixed point from a float.
+x | the float |
+
|
+ +inlinestaticconstexpr | +
Fixed point number representing 1.
+
+
|
+ +inline | +
this != b
+b | the other fixed point |
this += other
+other | the other fixed point |
this -= other
+other | the other fixed point |
+
|
+ +inline | +
this < b
+b | the other fixed point |
+
|
+ +inline | +
this <= b
+b | the other fixed point |
+
|
+ +inline | +
this == b
+b | the other fixed point |
+
|
+ +inline | +
this > b
+b | the other fixed point |
+
|
+ +inline | +
this >= b
+b | the other fixed point |
struct arm_cmsis_dsp::Q< M, F, false, uint64_t > | +
Unsigned fixed point datatypes on 64 bits.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
Public Types | |
+using | value_type = typename fixed_storage_type< M, F, false >::value_type |
Storage type for the value. | |
+using | wider_type = typename fixed_storage_type< M, F, false >::wider_type |
Storage type for the widening of the value. | |
Public Member Functions | |
+constexpr | Q () |
Create a new zero fixed point. | |
constexpr | Q (const value_type x) |
Create a new fixed point from a raw integer. | |
bool | operator== (const Q &b) const |
this == b | |
bool | operator!= (const Q &b) const |
this != b | |
bool | operator< (const Q &b) const |
this < b | |
bool | operator> (const Q &b) const |
this > b | |
bool | operator<= (const Q &b) const |
this <= b | |
bool | operator>= (const Q &b) const |
this >= b | |
Static Public Member Functions | |
static constexpr value_type | convert (const float f) |
Convert a float to fixed point. | |
static constexpr Q | f (const float x) |
Create a new fixed point from a float. | |
static constexpr Q | one () |
Fixed point number representing 1. | |
Data Fields | |
+value_type | v |
Storage value. | |
Static Public Attributes | |
+static constexpr int | fracBits = F |
Number of fractional bits. | |
+static constexpr int | mantissaBits = M |
Number of mantissa bits (without sign bit) | |
+static constexpr bool | isSigned = false |
Is this number representation signed. | |
+static constexpr value_type | maxVal = 0xFFFFFFFFFFFFFFFFLL |
Maximum representable positive value. | |
+
|
+ +inlineexplicitconstexpr | +
Create a new fixed point from a raw integer.
+x | the raw integer |
+
|
+ +inlinestaticconstexpr | +
Convert a float to fixed point.
+f | float value |
+
|
+ +inlinestaticconstexpr | +
Create a new fixed point from a float.
+x | the float |
+
|
+ +inlinestaticconstexpr | +
Fixed point number representing 1.
+
+
|
+ +inline | +
this != b
+b | the other fixed point |
+
|
+ +inline | +
this < b
+b | the other fixed point |
+
|
+ +inline | +
this <= b
+b | the other fixed point |
+
|
+ +inline | +
this == b
+b | the other fixed point |
+
|
+ +inline | +
this > b
+b | the other fixed point |
+
|
+ +inline | +
this >= b
+b | the other fixed point |
struct arm_cmsis_dsp::Q< M, F, true, int32_t > | +
Signed fixed point datatypes on 32 bits.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
Public Types | |
+using | value_type = typename fixed_storage_type< M, F, true >::value_type |
Storage type for the value. | |
+using | wider_type = typename fixed_storage_type< M, F, true >::wider_type |
Storage type for the widening of the value. | |
Public Member Functions | |
+constexpr | Q () |
Create a new zero fixed point. | |
constexpr | Q (const value_type x) |
Create a new fixed point from a raw integer. | |
constexpr | Q (const Q< M, F, false > &other) |
Convert an unsigned fixed point to this fixed point. | |
bool | operator== (const Q &b) const |
this == b | |
bool | operator!= (const Q &b) const |
this != b | |
bool | operator< (const Q &b) const |
this < b | |
bool | operator> (const Q &b) const |
this > b | |
bool | operator<= (const Q &b) const |
this <= b | |
bool | operator>= (const Q &b) const |
this >= b | |
Q & | operator+= (const Q other) |
this += other | |
Q & | operator-= (const Q other) |
this -= other | |
Static Public Member Functions | |
static constexpr value_type | sat (const wider_type i) |
Saturate a wider type to the current type. | |
static constexpr value_type | convert (const float f) |
Convert a float to fixed point with saturation. | |
static constexpr Q | f (const float x) |
Create a new fixed point from a float. | |
static constexpr Q | one () |
Fixed point number representing 1. | |
Data Fields | |
+value_type | v |
Storage value. | |
Static Public Attributes | |
+static constexpr int | fracBits = F |
Number of fractional bits. | |
+static constexpr int | mantissaBits = M |
Number of mantissa bits (without sign bit) | |
+static constexpr bool | isSigned = true |
Is this number representation signed. | |
+static constexpr value_type | maxVal = 0x7FFFFFFFL |
Maximum representable positive value. | |
+static constexpr value_type | minVal = 0x80000000L |
Minimum representable negative value. | |
+
|
+ +inlineexplicitconstexpr | +
Create a new fixed point from a raw integer.
+x | the raw integer |
+
|
+ +inlineexplicitconstexpr | +
Convert an unsigned fixed point to this fixed point.
+other | The unsigned fixed point number |
Some problem may occur since the unsigned may not be representable with the less bits required for the sign representation. This convertion is not saturating.
+ +
+
|
+ +inlinestaticconstexpr | +
Convert a float to fixed point with saturation.
+f | float value |
+
|
+ +inlinestaticconstexpr | +
Create a new fixed point from a float.
+x | the float |
+
|
+ +inlinestaticconstexpr | +
Fixed point number representing 1.
+
+
|
+ +inline | +
this != b
+b | the other fixed point |
this += other
+other | the other fixed point |
this -= other
+other | the other fixed point |
+
|
+ +inline | +
this < b
+b | the other fixed point |
+
|
+ +inline | +
this <= b
+b | the other fixed point |
+
|
+ +inline | +
this == b
+b | the other fixed point |
+
|
+ +inline | +
this > b
+b | the other fixed point |
+
|
+ +inline | +
this >= b
+b | the other fixed point |
+
|
+ +inlinestaticconstexpr | +
Saturate a wider type to the current type.
+i | the wider integer type |
struct arm_cmsis_dsp::Q< M, F, false, uint32_t > | +
Unsigned fixed point datatypes on 32 bits.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
Public Types | |
+using | value_type = typename fixed_storage_type< M, F, false >::value_type |
Storage type for the value. | |
+using | wider_type = typename fixed_storage_type< M, F, false >::wider_type |
Storage type for the widening of the value. | |
Public Member Functions | |
+constexpr | Q () |
Create a new zero fixed point. | |
constexpr | Q (const value_type x) |
Create a new fixed point from a raw integer. | |
bool | operator== (const Q &b) const |
this == b | |
bool | operator!= (const Q &b) const |
this != b | |
bool | operator< (const Q &b) const |
this < b | |
bool | operator> (const Q &b) const |
this > b | |
bool | operator<= (const Q &b) const |
this <= b | |
bool | operator>= (const Q &b) const |
this >= b | |
Static Public Member Functions | |
static constexpr value_type | sat (const wider_type i) |
Saturate a wider type to the current type. | |
static constexpr value_type | convert (const float f) |
Convert a float to fixed point with saturation. | |
static constexpr Q | f (const float x) |
Create a new fixed point from a float. | |
static constexpr Q | one () |
Fixed point number representing 1. | |
Data Fields | |
+value_type | v |
Storage value. | |
Static Public Attributes | |
+static constexpr int | fracBits = F |
Number of fractional bits. | |
+static constexpr int | mantissaBits = M |
Number of mantissa bits (without sign bit) | |
+static constexpr bool | isSigned = false |
Is this number representation signed. | |
+static constexpr value_type | maxVal = 0xFFFFFFFFL |
Maximum representable positive value. | |
+
|
+ +inlineexplicitconstexpr | +
Create a new fixed point from a raw integer.
+x | the raw integer |
+
|
+ +inlinestaticconstexpr | +
Convert a float to fixed point with saturation.
+f | float value |
+
|
+ +inlinestaticconstexpr | +
Create a new fixed point from a float.
+x | the float |
+
|
+ +inlinestaticconstexpr | +
Fixed point number representing 1.
+
+
|
+ +inline | +
this != b
+b | the other fixed point |
+
|
+ +inline | +
this < b
+b | the other fixed point |
+
|
+ +inline | +
this <= b
+b | the other fixed point |
+
|
+ +inline | +
this == b
+b | the other fixed point |
+
|
+ +inline | +
this > b
+b | the other fixed point |
+
|
+ +inline | +
this >= b
+b | the other fixed point |
+
|
+ +inlinestaticconstexpr | +
Saturate a wider type to the current type.
+i | the wider integer type |
struct arm_cmsis_dsp::Q< M, F, true, int16_t > | +
Signed fixed point datatypes on 16 bits.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
Public Types | |
+using | value_type = typename fixed_storage_type< M, F, true >::value_type |
Storage type for the value. | |
+using | wider_type = typename fixed_storage_type< M, F, true >::wider_type |
Storage type for the widening of the value. | |
Public Member Functions | |
+constexpr | Q () |
Create a new zero fixed point. | |
constexpr | Q (const value_type x) |
Create a new fixed point from a raw integer. | |
constexpr | Q (const Q< M, F, false > &other) |
Convert an unsigned fixed point to this fixed point. | |
bool | operator== (const Q &b) const |
this == b | |
bool | operator!= (const Q &b) const |
this != b | |
bool | operator< (const Q &b) const |
this < b | |
bool | operator> (const Q &b) const |
this > b | |
bool | operator<= (const Q &b) const |
this <= b | |
bool | operator>= (const Q &b) const |
this >= b | |
Q & | operator+= (const Q other) |
this += other | |
Q & | operator-= (const Q other) |
this -= other | |
Static Public Member Functions | |
static constexpr value_type | sat (const wider_type i) |
Saturate a wider type to the current type. | |
static constexpr value_type | convert (const float f) |
Convert a float to fixed point with saturation. | |
static constexpr Q | f (const float x) |
Create a new fixed point from a float. | |
static constexpr Q | one () |
Fixed point number representing 1. | |
Data Fields | |
+value_type | v |
Storage value. | |
Static Public Attributes | |
+static constexpr int | fracBits = F |
Number of fractional bits. | |
+static constexpr int | mantissaBits = M |
Number of mantissa bits (without sign bit) | |
+static constexpr bool | isSigned = true |
Is this number representation signed. | |
+static constexpr value_type | maxVal = 0x7FFF |
Maximum representable positive value. | |
+static constexpr value_type | minVal = 0x8000 |
Minimum representable negative value. | |
+
|
+ +inlineexplicitconstexpr | +
Create a new fixed point from a raw integer.
+x | the raw integer |
+
|
+ +inlineexplicitconstexpr | +
Convert an unsigned fixed point to this fixed point.
+other | The unsigned fixed point number |
Some problem may occur since the unsigned may not be representable with the less bits required for the sign representation. This convertion is not saturating.
+ +
+
|
+ +inlinestaticconstexpr | +
Convert a float to fixed point with saturation.
+f | float value |
+
|
+ +inlinestaticconstexpr | +
Create a new fixed point from a float.
+x | the float |
+
|
+ +inlinestaticconstexpr | +
Fixed point number representing 1.
+
+
|
+ +inline | +
this != b
+b | the other fixed point |
this += other
+other | the other fixed point |
this -= other
+other | the other fixed point |
+
|
+ +inline | +
this < b
+b | the other fixed point |
+
|
+ +inline | +
this <= b
+b | the other fixed point |
+
|
+ +inline | +
this == b
+b | the other fixed point |
+
|
+ +inline | +
this > b
+b | the other fixed point |
+
|
+ +inline | +
this >= b
+b | the other fixed point |
+
|
+ +inlinestaticconstexpr | +
Saturate a wider type to the current type.
+i | the wider integer type |
struct arm_cmsis_dsp::Q< M, F, false, uint16_t > | +
Unsigned fixed point datatypes on 16 bits.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
Public Types | |
+using | value_type = typename fixed_storage_type< M, F, false >::value_type |
Storage type for the value. | |
+using | wider_type = typename fixed_storage_type< M, F, false >::wider_type |
Storage type for the widening of the value. | |
Public Member Functions | |
+constexpr | Q () |
Create a new zero fixed point. | |
constexpr | Q (const value_type x) |
Create a new fixed point from a raw integer. | |
bool | operator== (const Q &b) const |
this == b | |
bool | operator!= (const Q &b) const |
this != b | |
bool | operator< (const Q &b) const |
this < b | |
bool | operator> (const Q &b) const |
this > b | |
bool | operator<= (const Q &b) const |
this <= b | |
bool | operator>= (const Q &b) const |
this >= b | |
Q & | operator+= (const Q other) |
this += other | |
Static Public Member Functions | |
static constexpr value_type | sat (const wider_type i) |
Saturate a wider type to the current type. | |
static constexpr value_type | convert (const float f) |
Convert a float to fixed point with saturation. | |
static constexpr Q | f (const float x) |
Create a new fixed point from a float. | |
static constexpr Q | one () |
Fixed point number representing 1. | |
Data Fields | |
+value_type | v |
Storage value. | |
Static Public Attributes | |
+static constexpr int | fracBits = F |
Number of fractional bits. | |
+static constexpr int | mantissaBits = M |
Number of mantissa bits (without sign bit) | |
+static constexpr bool | isSigned = false |
Is this number representation signed. | |
+static constexpr value_type | maxVal = 0xFFFF |
Maximum representable positive value. | |
+
|
+ +inlineexplicitconstexpr | +
Create a new fixed point from a raw integer.
+x | the raw integer |
+
|
+ +inlinestaticconstexpr | +
Convert a float to fixed point with saturation.
+f | float value |
+
|
+ +inlinestaticconstexpr | +
Create a new fixed point from a float.
+x | the float |
+
|
+ +inlinestaticconstexpr | +
Fixed point number representing 1.
+
+
|
+ +inline | +
this != b
+b | the other fixed point |
this += other
+other | the other fixed point |
+
|
+ +inline | +
this < b
+b | the other fixed point |
+
|
+ +inline | +
this <= b
+b | the other fixed point |
+
|
+ +inline | +
this == b
+b | the other fixed point |
+
|
+ +inline | +
this > b
+b | the other fixed point |
+
|
+ +inline | +
this >= b
+b | the other fixed point |
+
|
+ +inlinestaticconstexpr | +
Saturate a wider type to the current type.
+i | the wider integer type |
struct arm_cmsis_dsp::Q< M, F, true, int8_t > | +
Signed fixed point datatypes on 8 bits.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
Public Types | |
+using | value_type = typename fixed_storage_type< M, F, true >::value_type |
Storage type for the value. | |
+using | wider_type = typename fixed_storage_type< M, F, true >::wider_type |
Storage type for the widening of the value. | |
Public Member Functions | |
+constexpr | Q () |
Create a new zero fixed point. | |
constexpr | Q (const value_type x) |
Create a new fixed point from a raw integer. | |
constexpr | Q (const Q< M, F, false > &other) |
Convert an unsigned fixed point to this fixed point. | |
bool | operator== (const Q &b) const |
this == b | |
bool | operator!= (const Q &b) const |
this != b | |
bool | operator< (const Q &b) const |
this < b | |
bool | operator> (const Q &b) const |
this > b | |
bool | operator<= (const Q &b) const |
this <= b | |
bool | operator>= (const Q &b) const |
this >= b | |
Q & | operator+= (const Q other) |
this += other | |
Q & | operator-= (const Q other) |
this -= other | |
Static Public Member Functions | |
static constexpr value_type | sat (const wider_type i) |
Saturate a wider type to the current type. | |
static constexpr value_type | convert (const float f) |
Convert a float to fixed point with saturation. | |
static constexpr Q | f (const float x) |
Create a new fixed point from a float. | |
static constexpr Q | one () |
Fixed point number representing 1. | |
Data Fields | |
+value_type | v |
Storage value. | |
Static Public Attributes | |
+static constexpr int | fracBits = F |
Number of fractional bits. | |
+static constexpr int | mantissaBits = M |
Number of mantissa bits (without sign bit) | |
+static constexpr bool | isSigned = true |
Is this number representation signed. | |
+static constexpr value_type | maxVal = 0x7F |
Maximum representable positive value. | |
+static constexpr value_type | minVal = 0x80 |
Minimum representable negative value. | |
+
|
+ +inlineexplicitconstexpr | +
Create a new fixed point from a raw integer.
+x | the raw integer |
+
|
+ +inlineexplicitconstexpr | +
Convert an unsigned fixed point to this fixed point.
+other | The unsigned fixed point number |
Some problem may occur since the unsigned may not be representable with the less bits required for the sign representation. This convertion is not saturating.
+ +
+
|
+ +inlinestaticconstexpr | +
Convert a float to fixed point with saturation.
+f | float value |
+
|
+ +inlinestaticconstexpr | +
Create a new fixed point from a float.
+x | the float |
+
|
+ +inlinestaticconstexpr | +
Fixed point number representing 1.
+
+
|
+ +inline | +
this != b
+b | the other fixed point |
this += other
+other | the other fixed point |
this -= other
+other | the other fixed point |
+
|
+ +inline | +
this < b
+b | the other fixed point |
+
|
+ +inline | +
this <= b
+b | the other fixed point |
+
|
+ +inline | +
this == b
+b | the other fixed point |
+
|
+ +inline | +
this > b
+b | the other fixed point |
+
|
+ +inline | +
this >= b
+b | the other fixed point |
+
|
+ +inlinestaticconstexpr | +
Saturate a wider type to the current type.
+i | the wider integer type |
struct arm_cmsis_dsp::Q< M, F, false, uint8_t > | +
Unsigned fixed point datatypes on 8 bits.
+M | Number of bits for mantissa (without sign bit) |
F | Number of bits for fractional part |
Public Types | |
+using | value_type = typename fixed_storage_type< M, F, false >::value_type |
Storage type for the value. | |
+using | wider_type = typename fixed_storage_type< M, F, false >::wider_type |
Storage type for the widening of the value. | |
Public Member Functions | |
+constexpr | Q () |
Create a new zero fixed point. | |
constexpr | Q (const value_type x) |
Create a new fixed point from a raw integer. | |
bool | operator== (const Q &b) const |
this == b | |
bool | operator!= (const Q &b) const |
this != b | |
bool | operator< (const Q &b) const |
this < b | |
bool | operator> (const Q &b) const |
this > b | |
bool | operator<= (const Q &b) const |
this <= b | |
bool | operator>= (const Q &b) const |
this >= b | |
Q & | operator+= (const Q other) |
this += other | |
Static Public Member Functions | |
static constexpr value_type | sat (const wider_type i) |
Saturate a wider type to the current type. | |
static constexpr value_type | convert (const float f) |
Convert a float to fixed point with saturation. | |
static constexpr Q | f (const float x) |
Create a new fixed point from a float. | |
static constexpr Q | one () |
Fixed point number representing 1. | |
Data Fields | |
+value_type | v |
Storage value. | |
Static Public Attributes | |
+static constexpr int | fracBits = F |
Number of fractional bits. | |
+static constexpr int | mantissaBits = M |
Number of mantissa bits (without sign bit) | |
+static constexpr bool | isSigned = false |
Is this number representation signed. | |
+static constexpr value_type | maxVal = 0xFF |
Maximum representable positive value. | |
+
|
+ +inlineexplicitconstexpr | +
Create a new fixed point from a raw integer.
+x | the raw integer |
+
|
+ +inlinestaticconstexpr | +
Convert a float to fixed point with saturation.
+f | float value |
+
|
+ +inlinestaticconstexpr | +
Create a new fixed point from a float.
+x | the float |
+
|
+ +inlinestaticconstexpr | +
Fixed point number representing 1.
+
+
|
+ +inline | +
this != b
+b | the other fixed point |
this += other
+other | the other fixed point |
+
|
+ +inline | +
this < b
+b | the other fixed point |
+
|
+ +inline | +
this <= b
+b | the other fixed point |
+
|
+ +inline | +
this == b
+b | the other fixed point |
+
|
+ +inline | +
this > b
+b | the other fixed point |
+
|
+ +inline | +
this >= b
+b | the other fixed point |
+
|
+ +inlinestaticconstexpr | +
Saturate a wider type to the current type.
+i | the wider integer type |
struct arm_cmsis_dsp::FixedCastShift< M, FD, FS, S,(FD >FS)> | +
Changed fractional representation of a fixed point number using a shift.
+M | Number of mantissa bits for the fixed point number |
FD | Number of fractional bits for the destination fixed point number |
FS | Number of fractional bits for the source fixed point number |
S | Is the fixed point number using a signed representation |
src | The fixed point number |
Only applies if FD > FS
+struct arm_cmsis_dsp::FixedCastShift< M, FD, FS, S,(FD< FS)> | +
Changed fractional representation of a fixed point number using a shift.
+M | Number of mantissa bits for the fixed point number |
FD | Number of fractional bits for the destination fixed point number |
FS | Number of fractional bits for the source fixed point number |
S | Is the fixed point number using a signed representation |
src | The fixed point number |
Only applies if FD < FS
+struct arm_cmsis_dsp::Accumulate | +
Accumulation without saturation.
+MD | Number of mantissa bits for the destination fixed point number |
MS | Number of mantissa bits for the source fixed point number |
F | Number of fractional bits for fixed point number |
S | Is the fixed point number using a signed representation |
struct arm_cmsis_dsp::Accumulate< MD, MS, F, S, true > | +
Accumulation without saturation.
+MD | Number of mantissa bits for the destination fixed point number |
MS | Number of mantissa bits for the source fixed point number |
F | Number of fractional bits for fixed point number |
S | Is the fixed point number using a signed representation |
Static Public Member Functions | |
static Q< MD, F, S > | acc (const Q< MD, F, S > &a, const Q< MS, F, S > &b) |
Accumulation without saturation. | |
+
|
+ +inlinestatic | +
Accumulation without saturation.
+[in] | a | first fixed point number |
[in] | b | second fixed point number |
+
|
+ +inline | +
Accumulate without saturation.
+[in] | a | First fixed point number |
[in] | b | Second fixed point number |
MD | Number of mantissa bits for destination |
MS | Number of mantissa bits fro source |
F | Number of fractional bits |
S | Is the representation signed |
+
|
+ +inline | +
Add two fixed point numbers without saturation.
+M | Number of mantissa bits for the fixed point number |
F | Number of fractional bits for the fixed point number |
S | Is the fixed point number using a signed representation |
a | First fixed point number |
b | Second fixed point number |
+
|
+ +inline | +
Multiplication of two fixed point numbers A and B.
+MA | Number of mantissa bits for A |
FA | Number of fractional bits for A |
MB | Number of mantissa bits for B |
FB | Number of fractional bits for B |
SA | Is A using a signed representation |
SB | Is B using a signed representation |
a | First fixed point number |
b | Second fixed point number |
+
|
+ +inline | +
Inequality operator.
+[in] | a | First value |
[in] | b | Second value |
M | Number of mantissa bits |
F | Number of fractional bits |
+
|
+ +constexpr | +
q15 literal
+x | long double value |
You can write
The float is converted to Q15 at build time.
+ +
+
|
+ +constexpr | +
q31 literal
+x | long double value |
You can write
The float is converted to Q31 at build time.
+ +
+
|
+ +constexpr | +
q63 literal
+x | long double value |
You can write
The float is converted to Q63 at build time.
+ +
+
|
+ +constexpr | +
q7 literal
+x | long double value |
You can write
The float is converted to Q7 at build time.
+ +
+
|
+ +inline | +
Multiplication operator.
+[in] | a | First value |
[in] | b | Second value |
+
|
+ +inline | +
Multiplication operator.
+[in] | a | First value |
[in] | b | Second value |
+
|
+ +inline | +
Multiplication operator.
+[in] | a | First value |
[in] | b | Second value |
No op operator.
+[in] | a | Fixed point number |
M | Number of mantissa bits |
F | Number of fractional bits |
S | Is the representation signed |
+
|
+ +inline | +
Add two fixed point numbers with saturation.
+M | Number of mantissa bits for the fixed point number |
F | Number of fractional bits for the fixed point number |
S | Is the fixed point number using a signed representation |
a | First fixed point number |
b | Second fixed point number |
Negate a fixed point number with saturation.
+M | Number of mantissa bits for the fixed point number |
F | Number of fractional bits for the fixed point number |
S | Is the fixed point number using a signed representation |
a | First fixed point number |
+
|
+ +inline | +
Subtract two fixed point numbers with saturation.
+M | Number of mantissa bits for the fixed point number |
F | Number of fractional bits for the fixed point number |
S | Is the fixed point number using a signed representation |
a | First fixed point number |
b | Second fixed point number |
+
|
+ +inline | +
Division operator.
+[in] | a | First fixed point value |
[in] | b | Integer |
M | Number of mantissa bits |
F | Number of fractional bits |
S | Is representation signed |
+
|
+ +inline | +
Less-than comparison operator.
+[in] | a | First value |
[in] | b | Second value |
M | Number of mantissa bits |
F | Number of fractional bits |
+
|
+ +inlinenoexcept | +
Shift left a fixed point number with a shift known at build time.
+M | Number of mantissa bits for the fixed point number |
F | Number of fractional bits for the fixed point number |
S | Is the fixed point number using a signed representation |
a | First fixed point number |
+
|
+ +inline | +
Less-than-or-equal comparison operator.
+[in] | a | First value |
[in] | b | Second value |
M | Number of mantissa bits |
F | Number of fractional bits |
+
|
+ +inline | +
Equality operator.
+[in] | a | First value |
[in] | b | Second value |
M | Number of mantissa bits |
F | Number of fractional bits |
+
|
+ +inline | +
Greater-than comparison operator.
+[in] | a | First value |
[in] | b | Second value |
M | Number of mantissa bits |
F | Number of fractional bits |
+
|
+ +inline | +
Greater-than-or-equal comparison operator.
+[in] | a | First value |
[in] | b | Second value |
M | Number of mantissa bits |
F | Number of fractional bits |
+
|
+ +inlinenoexcept | +
Shift right a fixed point number with a shift known at build time.
+M | Number of mantissa bits for the fixed point number |
F | Number of fractional bits for the fixed point number |
S | Is the fixed point number using a signed representation |
a | First fixed point number |
+
|
+ +inline | +
Saturate an unsigned fixed point number.
+MD | Number of mantissa bits for the destination fixed point number |
MS | Number of mantissa bits for the source fixed point number |
S | Is the fixed point number using a signed representation |
src | The fixed point number |
Only applies if the number is unsigned, the representation requires less than 31 bits (since there is no saturating instruction for 64 bits) and if destination has less mantissa bits.
+If destination has more or equal number of mantissa bits then it does not make sense to saturate.
+ +
+
|
+ +inline | +
Saturate a signed fixed point number.
+MD | Number of mantissa bits for the destination fixed point number |
MS | Number of mantissa bits for the source fixed point number |
S | Is the fixed point number using a signed representation |
src | First fixed point number |
Only applies if the number is signed, the representation requires less than 32 bits (since there is no saturating instruction for 64 bits) and if destination has less mantissa bits.
+If destination has more or equal number of mantissa bits then it does not make sense to saturate.
+ +
+
|
+ +inline | +
Subtract two fixed point numbers without saturation.
+M | Number of mantissa bits for the fixed point number |
F | Number of fractional bits for the fixed point number |
S | Is the fixed point number using a signed representation |
a | First fixed point number |
b | Second fixed point number |
+
|
+ +constexpr | +
Function to identify the template for fixed number representable on 16 bits.
+M | number of mantissa bit (without sign bit) |
F | number of fractional bits |
S | sign or unsigned |
+
|
+ +constexpr | +
Function to identify the template for fixed number representable on 32 bits.
+M | number of mantissa bit (without sign bit) |
F | number of fractional bits |
S | sign or unsigned |
+
|
+ +constexpr | +
Function to identify the template for fixed number representable on 64 bits.
+M | number of mantissa bit (without sign bit) |
F | number of fractional bits |
S | sign or unsigned |
+
|
+ +constexpr | +
Function to identify the template for fixed number representable on 8 bits.
+M | number of mantissa bit (without sign bit) |
F | number of fractional bits |
S | sign or unsigned |
Convert between different fractional part formats.
+M | Number of mantissa bits for the fixed point number |
FD | Number of fractional bits for the destination fixed point number |
FS | Number of fractional bits for the source fixed point number |
S | Is the fixed point number using a signed representation |
src | The fixed point number |
+Data Structures | |
struct | _Expr< T > |
Expression template. More... | |
struct | _Binary< LHS, RHS, DerivedOp > |
Expression for binary operator. More... | |
struct | _Unary< LHS, DerivedOp > |
Expression for unary operator. More... | |
struct | _UnaryOperator< Scalar, Derived > |
Unary operator. More... | |
struct | _BinaryOperator< Scalar, Derived > |
Unary operator. More... | |
struct | _AddOp< Scalar > |
Add operator. More... | |
struct | _SubOp< Scalar > |
Sub operator. More... | |
struct | _MulOp< Scalar > |
Mul operator. More... | |
struct | _NegOp< Scalar > |
Neg operator. More... | |
struct | _NoOp< Scalar > |
No operator. More... | |
+Functions | |
template<typename DA > | |
constexpr bool | has_vector_inst () |
Determines if vector datatype supports vector instruction on a current architecture. | |
template<typename DA > | |
constexpr bool | has_predicate_inst () |
Determines if datatype has predicated loop for current architecture. | |
template<typename DA > | |
constexpr bool | is_scalar () |
Determines if scalar datatype (not vector, vectorview, matrix, matrixview) | |
template<typename DA > | |
constexpr bool | must_use_matrix_idx () |
Check if datatype can only be used as a matrix (no vector addressing) | |
template<typename DA , typename DB > | |
constexpr bool | vector_idx_pair () |
Check if both datatype have vector indexing are same scalar datatype. | |
template<typename DA > | |
constexpr bool | is_only_vector () |
Check if has vector indexing. | |
template<typename DA , typename DB > | |
constexpr bool | must_use_matrix_idx_pair () |
Check if datatypes have same scalar datatype and no vector indexing. | |
template<typename DA , typename DB > | |
constexpr vector_length_t | static_length () |
Static length. | |
template<typename DA , typename DB > | |
constexpr bool | same_static_length () |
Check compatibility of length. | |
template<typename VA , typename VB , typename std::enable_if< vector_idx_pair< VA, VB >() &&is_only_vector< VA >() &&is_only_vector< VB >() &&(!IsDynamic< VA >::value||!IsDynamic< VB >::value), bool >::type = true> | |
DotResult< VA > | dot (const VA &a, const VB &b) |
Dot product. | |
template<typename VA , typename VB , typename std::enable_if< vector_idx_pair< VA, VB >() &&(!IsDynamic< VA >::value||!IsDynamic< VB >::value), bool >::type = true> | |
void | swap (VA &&a, VB &&b) |
Swap vectors. | |
struct arm_cmsis_dsp::_Expr | +
Expression template.
+T | Datatype representing the expression |
Public Member Functions | |
T & | derived () |
Derived datatype. | |
T const & | derived () const |
Derived datatype. | |
Scalar const | operator[] (const index_t i) const |
Vector indexing in the expression. | |
Scalar const | operator() (const index_t r, const index_t c) const |
Matrix indexing. | |
Vector const | vector_op (const index_t i) const |
Vector operation at given index. | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index with loop predicate. | |
Vector const | matrix_op (const index_t r, const index_t c) const |
Matrix operation at index. | |
Vector const | matrix_op_tail (const index_t r, const index_t c, const vector_length_t remaining) const |
Matrix operation at index with tail predication. | |
vector_length_t | length () const |
Length of result. | |
vector_length_t | rows () const |
Number of rows for result. | |
vector_length_t | columns () const |
Number of columns for result. | |
+
|
+ +inline | +
Number of columns for result.
+
+
|
+ +inline | +
Derived datatype.
+
+
|
+ +inline | +
Derived datatype.
+
+
|
+ +inline | +
Length of result.
+
+
|
+ +inline | +
Matrix operation at index.
+[in] | r | row index |
[in] | c | column index |
+
|
+ +inline | +
Matrix operation at index with tail predication.
+[in] | r | row index |
[in] | c | column index |
[in] | remaining | Remaining elements in the loop |
+
|
+ +inline | +
Matrix indexing.
+[in] | r | Row index |
[in] | c | Column index |
+
|
+ +inline | +
Vector indexing in the expression.
+[in] | i | Index |
+
|
+ +inline | +
Number of rows for result.
+
+
|
+ +inline | +
+
|
+ +inline | +
struct arm_cmsis_dsp::_Binary | +
Expression for binary operator.
+LHS | Left hand side datatype |
RHS | Right hand side datatype |
DerivedOp | Operator for the binary operation |
+Additional Inherited Members | |
Public Member Functions inherited from _Expr< _Binary< LHS, RHS, DerivedOp > > | |
_Binary< LHS, RHS, DerivedOp > & | derived () |
Derived datatype. | |
_Binary< LHS, RHS, DerivedOp > const & | derived () const |
Derived datatype. | |
Scalar const | operator[] (const index_t i) const |
Vector indexing in the expression. | |
Scalar const | operator() (const index_t r, const index_t c) const |
Matrix indexing. | |
Vector const | vector_op (const index_t i) const |
Vector operation at given index. | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index with loop predicate. | |
Vector const | matrix_op (const index_t r, const index_t c) const |
Matrix operation at index. | |
Vector const | matrix_op_tail (const index_t r, const index_t c, const vector_length_t remaining) const |
Matrix operation at index with tail predication. | |
vector_length_t | length () const |
Length of result. | |
vector_length_t | rows () const |
Number of rows for result. | |
vector_length_t | columns () const |
Number of columns for result. | |
struct arm_cmsis_dsp::_Unary | +
Expression for unary operator.
+LHS | Left hand side datatype |
DerivedOp | Operator for the binary operation |
+Additional Inherited Members | |
Public Member Functions inherited from _Expr< _Unary< LHS, DerivedOp > > | |
_Unary< LHS, DerivedOp > & | derived () |
Derived datatype. | |
_Unary< LHS, DerivedOp > const & | derived () const |
Derived datatype. | |
Scalar const | operator[] (const index_t i) const |
Vector indexing in the expression. | |
Scalar const | operator() (const index_t r, const index_t c) const |
Matrix indexing. | |
Vector const | vector_op (const index_t i) const |
Vector operation at given index. | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index with loop predicate. | |
Vector const | matrix_op (const index_t r, const index_t c) const |
Matrix operation at index. | |
Vector const | matrix_op_tail (const index_t r, const index_t c, const vector_length_t remaining) const |
Matrix operation at index with tail predication. | |
vector_length_t | length () const |
Length of result. | |
vector_length_t | rows () const |
Number of rows for result. | |
vector_length_t | columns () const |
Number of columns for result. | |
struct _UnaryOperator | +
Unary operator.
+Scalar | Datatype for scalar |
Derived | Datatype representing the operator expression |
struct _BinaryOperator | +
Unary operator.
+Scalar | Datatype for scalar |
Derived | Datatype representing the operator expression |
struct _AddOp | +
Add operator.
+Scalar | Datatype for scalar |
struct _SubOp | +
Sub operator.
+Scalar | Datatype for scalar |
struct _MulOp | +
Mul operator.
+Scalar | Datatype for scalar |
struct _NegOp | +
Neg operator.
+Scalar | Datatype for scalar |
struct _NoOp | +
No operator.
+Scalar | Datatype for scalar |
+
|
+ +inline | +
Dot product.
+VA | Left hand side vector datatype |
VB | Right hand side vector datatype |
a | left hand side vector |
b | right hand side vector |
The vector can be vector, vector views or expressions.
+ +
+
|
+ +constexpr | +
Determines if datatype has predicated loop for current architecture.
+DA | Datatype |
+
|
+ +constexpr | +
Determines if vector datatype supports vector instruction on a current architecture.
+DA | Datatype |
+
|
+ +constexpr | +
Check if has vector indexing.
+DA | Datatype |
+
|
+ +constexpr | +
Determines if scalar datatype (not vector, vectorview, matrix, matrixview)
+DA | { description } |
+
|
+ +constexpr | +
Check if datatype can only be used as a matrix (no vector addressing)
+DA | Datatype |
+
|
+ +constexpr | +
Check if datatypes have same scalar datatype and no vector indexing.
+DA | First datatype |
DB | Second datatype |
+
|
+ +constexpr | +
Check compatibility of length.
+DA | First datatype |
DB | Second datatype |
+
|
+ +constexpr | +
Static length.
+DA | First datatype |
DB | Second datatype |
+
|
+ +inline | +
Swap vectors.
+VA | Left hand side vector datatype |
VB | Right hand side vector datatype |
a | left hand side vector |
b | right hand side vector |
The vector can be vector, vector views or expressions.
+The content of vector is swapped.
+ +
+
|
+ +constexpr | +
Check if both datatype have vector indexing are same scalar datatype.
+DA | First datatype |
DB | Second datatype |
+Functions | |
void | arm_fill_f16 (float16_t value, float16_t *pDst, uint32_t blockSize) |
Fills a constant value into a f16 vector. | |
void | arm_fill_f32 (float32_t value, float32_t *pDst, uint32_t blockSize) |
Fills a constant value into a floating-point vector. | |
void | arm_fill_f64 (float64_t value, float64_t *pDst, uint32_t blockSize) |
Fills a constant value into a floating-point vector. | |
void | arm_fill_q15 (q15_t value, q15_t *pDst, uint32_t blockSize) |
Fills a constant value into a Q15 vector. | |
void | arm_fill_q31 (q31_t value, q31_t *pDst, uint32_t blockSize) |
Fills a constant value into a Q31 vector. | |
void | arm_fill_q7 (q7_t value, q7_t *pDst, uint32_t blockSize) |
Fills a constant value into a Q7 vector. | |
Fills the destination vector with a constant value.
++ pDst[n] = value; 0 <= n < blockSize. +
There are separate functions for floating point, Q31, Q15, and Q7 data types.
+void arm_fill_f16 | +( | +float16_t | +value, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Fills a constant value into a f16 vector.
+Fills a constant value into a floating-point vector.
+[in] | value | input value to be filled |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_fill_f32 | +( | +float32_t | +value, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Fills a constant value into a floating-point vector.
+[in] | value | input value to be filled |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_fill_f64 | +( | +float64_t | +value, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Fills a constant value into a floating-point vector.
+[in] | value | input value to be filled |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_fill_q15 | +( | +q15_t | +value, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Fills a constant value into a Q15 vector.
+[in] | value | input value to be filled |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_fill_q31 | +( | +q31_t | +value, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Fills a constant value into a Q31 vector.
+[in] | value | input value to be filled |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_fill_q7 | +( | +q7_t | +value, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Fills a constant value into a Q7 vector.
+[in] | value | input value to be filled |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
+Content | |
Bray-Curtis distance | |
Canberra distance | |
Chebyshev distance | |
Cityblock (Manhattan) distance | |
Correlation distance | |
Cosine distance | |
Dynamic Time Warping Distance | |
Euclidean distance | |
Jensen-Shannon distance | |
Minkowski distance | |
Distances between two vectors of float values.
+testInput_f32_10khz
points to the input data testOutput
points to the output data fftSize
length of FFT ifftFlag
flag for the selection of CFFT/CIFFT doBitReverse
Flag for selection of normal order or bit reversed order refIndex
reference index value at which maximum energy of bin ocuurs testIndex
calculated index value at which maximum energy of bin ocuursbandGains
specifies the gain in dB to apply in each band. For example, if bandGains={0, -3, 6, 4, -6};
then the output signal will be: testInput_f32
points to the input data testRefOutput_f32
points to the reference output data testOutput
points to the test output data inputQ31
temporary input buffer outputQ31
temporary output buffer biquadStateBand1Q31
points to state buffer for band1 biquadStateBand2Q31
points to state buffer for band2 biquadStateBand3Q31
points to state buffer for band3 biquadStateBand4Q31
points to state buffer for band4 biquadStateBand5Q31
points to state buffer for band5 coeffTable
points to coefficient buffer for all bands gainDB
gain buffer which has gains applied for all the bands+Namespaces | |
namespace | inner |
+Data Structures | |
struct | number_traits< double > |
Features for double. More... | |
struct | vector_traits< double, arch, void > |
Default vector datatype description for this scalar datatype. More... | |
struct number_traits< double > | +
Features for double.
+Public Types | |
+typedef double | accumulator |
Accumulator datatype for this scalar datatype. | |
+typedef double | compute_type |
Compute datatype for this scalar datatype. | |
Static Public Member Functions | |
static constexpr double | one () |
One for this datatype. | |
Static Public Attributes | |
+static constexpr bool | is_float = true |
It is a float number. | |
+static constexpr bool | is_fixed = false |
It is not a fixed point. | |
+
|
+ +inlinestaticconstexpr | +
One for this datatype.
+struct vector_traits< double, arch, void > | +
Default vector datatype description for this scalar datatype.
+arch | Current architecture |
Public Types | |
typedef double | type |
typedef double | storage_type |
typedef bool | vector |
typedef bool | temp_accumulator |
typedef uint32_t | predicate_t |
Static Public Attributes | |
static constexpr bool | has_vector = false |
+static constexpr bool | is_float = true |
It is a float. | |
+static constexpr bool | is_fixed = false |
Not a fixed point. | |
+static constexpr bool | has_predicate = false |
No predicated loops. | |
typedef uint32_t predicate_t | +
Dummy datatype. Must be present for building but not used since by default there is no vector architecture assumed
+ +typedef double storage_type | +
Storage datatype
+ +typedef bool temp_accumulator | +
Dummy datatype. Must be present for building but not used since by default there is no vector architecture assumed
+ +typedef double type | +
Scalar datatype
+ +typedef bool vector | +
Dummy datatype. Must be present for building but not used since by default there is no vector architecture assumed
+ +
+
|
+ +staticconstexpr | +
By default : no vector architecture assumed
+ ++Namespaces | |
namespace | inner |
+Data Structures | |
struct | number_traits< float > |
Features for float. More... | |
struct | vector_traits< float, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type > |
Vector instructions for float when no Helium or Neon. More... | |
struct number_traits< float > | +
Features for float.
+Public Types | |
+typedef float | accumulator |
Accumulator datatype for this scalar datatype. | |
+typedef float | compute_type |
Compute datatype for this scalar datatype. | |
Static Public Member Functions | |
static constexpr float | one () |
One for this datatype. | |
Static Public Attributes | |
+static constexpr bool | is_float = true |
It is a float number. | |
+static constexpr bool | is_fixed = false |
It is not a fixed point. | |
+
|
+ +inlinestaticconstexpr | +
One for this datatype.
+struct vector_traits< float, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type > | +
Vector instructions for float when no Helium or Neon.
+arch | Current architecture |
+Namespaces | |
namespace | inner |
+Data Structures | |
struct | number_traits< float16_t > |
Feature of float16 datatype. More... | |
struct | vector_traits< float16_t > |
float16 vector descrition when no vector architecture More... | |
struct number_traits< float16_t > | +
Feature of float16 datatype.
+Public Types | |
+typedef float16_t | accumulator |
Accumulator datatype. | |
+typedef _Float16 | compute_type |
Compute datatype. | |
Static Public Member Functions | |
static constexpr float16_t | one () |
One value. | |
Static Public Attributes | |
+static constexpr bool | is_float = true |
It is a float number. | |
+static constexpr bool | is_fixed = false |
It is not a fixed point number. | |
+
|
+ +inlinestaticconstexpr | +
One value.
+struct vector_traits< float16_t > | +
float16 vector descrition when no vector architecture
++Namespaces | |
namespace | inner |
+Data Structures | |
struct | number_traits< Q15 > |
Q15 features. More... | |
struct | vector_traits< Q15, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type > |
Vector features for Q15 when no vector architecture. More... | |
struct number_traits< Q15 > | +
Q15 features.
+Public Types | |
+typedef Q< 33, 30 > | accumulator |
Accumulator datatype. | |
+typedef Q15 | compute_type |
Compute type. | |
Static Public Member Functions | |
static constexpr Q15 | one () |
One value. | |
Static Public Attributes | |
+static constexpr bool | is_float = false |
Is not float. | |
+static constexpr bool | is_fixed = true |
Is fixed point. | |
+
|
+ +inlinestaticconstexpr | +
One value.
+struct vector_traits< Q15, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type > | +
Vector features for Q15 when no vector architecture.
+arch | Current architecture |
+Namespaces | |
namespace | inner |
+Data Structures | |
struct | number_traits< Q31 > |
Features for Q31. More... | |
struct | vector_traits< Q31, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type > |
Vector features for Q31 when no vector instructions. More... | |
struct number_traits< Q31 > | +
Features for Q31.
+Public Types | |
+typedef Q< 15, 48 > | accumulator |
Accumulator datatype. | |
+typedef Q31 | compute_type |
Compute type. | |
Static Public Member Functions | |
static constexpr Q31 | one () |
One value. | |
Static Public Attributes | |
+static constexpr bool | is_float = false |
Is not a float. | |
+static constexpr bool | is_fixed = true |
Is fixed point. | |
+
|
+ +inlinestaticconstexpr | +
One value.
+struct vector_traits< Q31, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type > | +
Vector features for Q31 when no vector instructions.
+arch | Current architecture |
+Namespaces | |
namespace | inner |
+Data Structures | |
struct | number_traits< Q7 > |
Q7 features. More... | |
struct | vector_traits< Q7, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type > |
Vector descrition when no vector architecture. More... | |
struct number_traits< Q7 > | +
Q7 features.
+Public Types | |
+typedef Q< 17, 14 > | accumulator |
Accumulator datatype. | |
+typedef Q7 | compute_type |
Compute type. | |
Static Public Member Functions | |
static constexpr Q7 | one () |
One value. | |
Static Public Attributes | |
+static constexpr bool | is_float = false |
Is not float. | |
+static constexpr bool | is_fixed = true |
Is fixed point. | |
+
|
+ +inlinestaticconstexpr | +
One value.
+struct vector_traits< Q7, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type > | +
Vector descrition when no vector architecture.
+arch | Current architecture |
+Namespaces | |
namespace | inner |
+Data Structures | |
struct | number_traits< std::tuple< E... > > |
Number description for a tuple of numbers. More... | |
struct | vector_traits< std::tuple< E... >, arch > |
Tuple of compatible vectors. More... | |
Tuples of numbers or expressions used for unrolling
+struct number_traits< std::tuple< E... > > | +
Number description for a tuple of numbers.
+E | Datatype for all numbers |
Public Types | |
+typedef std::tuple< typename number_traits< E >::accumulator... > | accumulator |
Tuple of accumulator datatype for the accumulator type. | |
+typedef std::tuple< typename number_traits< E >::compute_type... > | compute_type |
Tuple of compute datatype for the compute type. | |
Static Public Member Functions | |
static std::tuple< typename number_traits< E >::accumulator... > | one () |
Return of tuples of one values. | |
Static Public Attributes | |
+static constexpr bool | is_float = false |
It is not a float number. | |
+static constexpr bool | is_fixed = false |
It is not a fixed point number. | |
+
|
+ +inlinestatic | +
Return of tuples of one values.
+struct vector_traits< std::tuple< E... >, arch > | +
Tuple of compatible vectors.
+arch | Current architecture |
E | List of vector dataypes |
The vector datatypes must be coherent : have same number of lanes or same lane datatype
+Public Types | |
+using | RefScalar = typename std::tuple_element< 0, std::tuple< E... > >::type |
First element of tuple defines the scalar datatype. | |
+typedef std::tuple< typename vector_traits< E, arch >::temp_accumulator... > | temp_accumulator |
Temporary accumulator datatype. | |
+typedef std::tuple< typename vector_traits< E, arch >::vector... > | vector |
Vector datatype. | |
+typedef std::tuple< typename vector_traits< E, arch >::predicate_t... > | predicate_t |
Predicate datatype. | |
Static Public Member Functions | |
static temp_accumulator | temp_acc_zero () |
Zero represented with temp accumulator datatype. | |
Static Public Attributes | |
+static constexpr int | nb_lanes = vector_traits<RefScalar,arch>::nb_lanes |
Number of lanes (from RefScalar) | |
+static constexpr bool | has_vector = vector_traits<RefScalar,arch>::has_vector |
Has vector instructions. | |
+static constexpr bool | is_float = vector_traits<RefScalar,arch>::is_float |
Is a float. | |
+static constexpr bool | is_fixed = vector_traits<RefScalar,arch>::is_fixed |
Is fixed point. | |
+static constexpr bool | has_predicate = vector_traits<RefScalar,arch>::has_predicate |
Has predicated loop. | |
+
|
+ +inlinestatic | +
Zero represented with temp accumulator datatype.
++Functions | |
template<typename T , typename DST , typename std::enable_if< has_vector_inst< DST >() &&IsVector< DST >::value &&SameElementType< DST, T >::value, bool >::type = true> | |
void | _Fill (DST &v, const T val, const vector_length_t l, const Helium *=nullptr) |
Fill evaluator for Helium. | |
template<typename T , typename DST , typename std::enable_if< has_vector_inst< DST >() &&must_use_matrix_idx< DST >() &&SameElementType< DST, T >::value, bool >::type = true> | |
void | _Fill2D (DST &v, const T val, const vector_length_t rows, const vector_length_t cols, const Helium *=nullptr) |
Fill2D evaluator for Helium. | |
template<typename DA , typename DB , typename std::enable_if< has_vector_inst< DA >() &&vector_idx_pair< DA, DB >(), bool >::type = true> | |
void | eval (DA &v, const DB &other, const vector_length_t l, const Helium *=nullptr) |
Eval function for Helium. | |
template<typename DA , typename DB , typename std::enable_if< has_vector_inst< DA >() &&must_use_matrix_idx_pair< DA, DB >(), bool >::type = true> | |
void | eval2D (DA &v, const DB &other, const vector_length_t rows, const vector_length_t cols, const Helium *=nullptr) |
Eval2D function for Helium. | |
template<class TupType , size_t... I> | |
void | printt (const TupType &_tup, std::index_sequence< I... >) |
Print tuple for debug. | |
template<class... T> | |
void | printt (const std::tuple< T... > &_tup) |
Print tuple. | |
template<typename DA , typename DB , typename std::enable_if< has_vector_inst< DA >() &&vector_idx_pair< DA, DB >(), bool >::type = true> | |
DotResult< DA > | _dot (const DA &a, const DB &b, const vector_length_t l, const Helium *=nullptr) |
Dor product for Helium. | |
template<typename DA , typename DB , typename std::enable_if< has_vector_inst< DA >() &&vector_idx_pair< DA, DB >(), bool >::type = true> | |
void | _swap (DA &&a, DB &&b, const vector_length_t l, const Helium *=nullptr) |
Swap operator for Helium. | |
+
|
+ +inline | +
Dor product for Helium.
+[in] | a | First expression |
[in] | b | Second expression |
[in] | l | Vector length |
DA | First operand datatype |
DB | Second operand datatype |
<unnamed> | Check vector indexing and compatible vectors |
+
|
+ +inline | +
Fill evaluator for Helium.
+v | Destination value | |
[in] | val | Initialization value |
[in] | l | Vector length |
T | Scalar datatype |
DST | Destination datatype |
<unnamed> | Check if has vector indexing |
+
|
+ +inline | +
Fill2D evaluator for Helium.
+v | Destination value | |
[in] | val | Initialization value |
[in] | rows | Number of rows |
[in] | cols | Number of columns |
T | Scalar datatype |
DST | Destination datatype |
<unnamed> | Check only matrix indexing supported |
+
|
+ +inline | +
Swap operator for Helium.
+a | First opetand | |
b | Second operand | |
[in] | l | Vector length |
DA | First operand datatype |
DB | Second operand datatype |
<unnamed> | Check vector indexing and compatible vectors |
+
|
+ +inline | +
Eval function for Helium.
+v | Destination | |
[in] | other | Expression to evaluate |
[in] | l | Vector length |
DA | Destination datatype |
DB | Expression datatype |
<unnamed> | Check vector indexing and compatible vectors |
+
|
+ +inline | +
Eval2D function for Helium.
+v | Destination vector | |
[in] | other | Expression to evaluate |
[in] | rows | Number of rows |
[in] | cols | Number of columns |
DA | Destination datatype |
DB | Source datatype |
<unnamed> | Check has only matrix indexing |
void printt | +( | +const std::tuple< T... > & | +_tup | ) | ++ |
Print tuple.
+[in] | _tup | Tuple |
T | Datatype for tuple elements |
void printt | +( | +const TupType & | +_tup, | +
+ | + | std::index_sequence< I... > | ++ |
+ | ) | ++ |
Print tuple for debug.
+[in] | _tup | Tuple |
TupType | Tuple datatype |
I | List of tuple indexes |
+Namespaces | |
namespace | inner |
+Data Structures | |
struct | vector_traits< float, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > |
Vector datatype for Helium. More... | |
struct | vctpq< float > |
vctpq for this datatype More... | |
struct | vload1_gen_stride< S > |
Load with generalized stride (gather load) More... | |
struct | vload1_gen_stride< 0, 1, 2, 3 > |
Load with generalized stride specialized for <0,1,2,3> More... | |
struct | vload1_gen_stride_z< S > |
Load with generalized stride (gather load) and tail predicate. More... | |
struct | vload1_gen_stride_z< 0, 1, 2, 3 > |
Load with generalized stride (gather load) and tail predicate specialized for <0,1,2,3> More... | |
struct | vstore1_gen_stride< S > |
Generalized store with strides. More... | |
struct | vstore1_gen_stride< 0, 1, 2, 3 > |
Generalized store with stride (Specialized for <0,1,2,3>) More... | |
struct | vstore1_gen_stride_z< S > |
Store with generalized strides and tail predicate. More... | |
struct | vstore1_gen_stride_z< 0, 1, 2, 3 > |
Scatter store with tail predicate (specialized for <0,1,2,3>) More... | |
struct vector_traits< float, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > | +
Vector datatype for Helium.
+arch | Current architecture |
Public Types | |
+typedef float | type |
Scalar datatype. | |
+typedef float | storage_type |
Storage datatype. | |
+typedef float32x4_t | vector |
Vector datatype. | |
+typedef float32x4_t | temp_accumulator |
Temp accumulator datatype (must be reduced to final scalar datatype) | |
+typedef mve_pred16_t | predicate_t |
Predicate datatype. | |
Static Public Member Functions | |
static float32x4_t | temp_acc_zero () |
Temp accumulator initialized to 0. | |
static constexpr float | zero_lane () |
Zero lane. | |
static constexpr float | lane_value (const float x) |
Lane value. | |
Static Public Attributes | |
+static constexpr bool | has_vector = true |
Has vector instruction. | |
+static constexpr bool | is_float = true |
Is float. | |
+static constexpr bool | is_fixed = false |
Is not fixed point. | |
+static constexpr bool | has_predicate = true |
Has predicated loops. | |
+static constexpr int | nb_lanes = 4 |
Number of lanes. | |
+
|
+ +inlinestaticconstexpr | +
Lane value.
+[in] | x | Lane vlue |
+
|
+ +inlinestatic | +
Temp accumulator initialized to 0.
+
+
|
+ +inlinestaticconstexpr | +
Zero lane.
+struct inner::vctpq< float > | +
vctpq for this datatype
+Static Public Member Functions | |
static mve_pred16_t | mk (uint32_t v) |
Make a predicate. | |
+
|
+ +inlinestatic | +
Make a predicate.
+[in] | v | Number of iterations |
struct inner::vload1_gen_stride | +
Load with generalized stride (gather load)
+S | List of offsets known at built time |
Static Public Member Functions | |
static float32x4_t | run (const float32_t *p) |
Load with generalized stride. | |
+
|
+ +inlinestatic | +
Load with generalized stride.
+[in] | p | Load address |
struct inner::vload1_gen_stride< 0, 1, 2, 3 > | +
Load with generalized stride specialized for <0,1,2,3>
+Static Public Member Functions | |
static float32x4_t | run (const float32_t *p) |
Load with generalized stride. | |
+
|
+ +inlinestatic | +
Load with generalized stride.
+[in] | p | Load address |
struct inner::vload1_gen_stride_z | +
Load with generalized stride (gather load) and tail predicate.
+S | List of offsets known at built time |
Static Public Member Functions | |
static float32x4_t | run (const float32_t *p, const std::size_t nb, const mve_pred16_t p0) |
Load. | |
+
|
+ +inlinestatic | +
Load.
+[in] | p | Load address |
[in] | nb | Number of remaining samples in loop |
[in] | p0 | Predicate for remaining samples |
struct inner::vload1_gen_stride_z< 0, 1, 2, 3 > | +
Load with generalized stride (gather load) and tail predicate specialized for <0,1,2,3>
+S | List of offsets known at built time |
Static Public Member Functions | |
static float32x4_t | run (const float32_t *p, const std::size_t nb, const mve_pred16_t p0) |
Gather load with predicated specialized for <0,1,2,3> | |
+
|
+ +inlinestatic | +
Gather load with predicated specialized for <0,1,2,3>
+[in] | p | Load address |
[in] | nb | Number of remaining samples in the loop |
[in] | p0 | Predicate for samples in the loop |
struct inner::vstore1_gen_stride | +
Generalized store with strides.
+S | Stride values known at built time |
Static Public Member Functions | |
static void | run (float32_t *p, const float32x4_t val) |
Scatter store. | |
+
|
+ +inlinestatic | +
Scatter store.
+p | Store address | |
[in] | val | VAlue to store |
struct inner::vstore1_gen_stride< 0, 1, 2, 3 > | +
Generalized store with stride (Specialized for <0,1,2,3>)
+Static Public Member Functions | |
static void | run (float32_t *p, const float32x4_t val) |
Scatter store. | |
+
|
+ +inlinestatic | +
Scatter store.
+p | Store address | |
[in] | val | Value to store |
struct inner::vstore1_gen_stride_z | +
Store with generalized strides and tail predicate.
+S | Strides values known at built time |
Static Public Member Functions | |
static void | vstore1_z (float32_t *p, const float32x4_t val, const std::size_t nb, const mve_pred16_t p0) |
Scatter store with tail predicate. | |
+
|
+ +inlinestatic | +
Scatter store with tail predicate.
+p | Store address | |
[in] | val | Value to store |
[in] | nb | Remaining number of loops |
[in] | p0 | Loop predicate |
struct inner::vstore1_gen_stride_z< 0, 1, 2, 3 > | +
Scatter store with tail predicate (specialized for <0,1,2,3>)
+Static Public Member Functions | |
static void | vstore1_z (float32_t *p, const float32x4_t val, const std::size_t nb, const mve_pred16_t p0) |
Scatter store with tail predicate. | |
+
|
+ +inlinestatic | +
Scatter store with tail predicate.
+p | Store address | |
[in] | val | Value to store |
[in] | nb | Number of remaining loops |
[in] | p0 | Loop predicate |
+Namespaces | |
namespace | inner |
+Data Structures | |
struct | vector_traits< float16_t, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > |
Vector features for f16 on Helium. More... | |
struct | vctpq< float16_t > |
vctpq for Helium and f16 More... | |
struct vector_traits< float16_t, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > | +
Vector features for f16 on Helium.
+arch | Current architecture |
Public Types | |
+typedef float16_t | type |
Scalar datatype. | |
+typedef float16_t | storage_type |
Storage datatype. | |
+typedef float16x8_t | vector |
Vector datatype. | |
+typedef float16x8_t | temp_accumulator |
Temp accumulator datatype. | |
+typedef mve_pred16_t | predicate_t |
Predicate datatype. | |
Static Public Member Functions | |
static float16x8_t | temp_acc_zero () |
Vector of 0. | |
static constexpr float16_t | zero_lane () |
Value to write 0 in a lane. | |
static constexpr float16_t | lane_value (const float16_t x) |
Convert from lane value. | |
Static Public Attributes | |
+static constexpr bool | has_vector = true |
Has vector instructions. | |
+static constexpr bool | is_float = true |
Is float. | |
+static constexpr bool | is_fixed = false |
Is not fixed point. | |
+static constexpr bool | has_predicate = true |
Has predicated loop. | |
+static constexpr int | nb_lanes = 8 |
Number of lanes. | |
+
|
+ +inlinestaticconstexpr | +
Convert from lane value.
+[in] | x | Lane value |
+
|
+ +inlinestatic | +
Vector of 0.
+
+
|
+ +inlinestaticconstexpr | +
Value to write 0 in a lane.
+f16 suffix not supported in C++
+ +struct inner::vctpq< float16_t > | +
vctpq for Helium and f16
+Static Public Member Functions | |
static mve_pred16_t | mk (uint32_t v) |
Make predicate. | |
+
|
+ +inlinestatic | +
Make predicate.
+[in] | v | Remaining iterations |
+Content | |
Float | |
Half | |
Q15 | |
Q31 | |
Q7 | |
+Namespaces | |
namespace | inner |
+Data Structures | |
struct | vctpq< float > |
vctpq for this datatype More... | |
struct | vload1_gen_stride< S > |
Load with generalized stride (gather load) More... | |
struct | vload1_gen_stride< 0, 1, 2, 3 > |
Load with generalized stride specialized for <0,1,2,3> More... | |
struct | vload1_gen_stride_z< S > |
Load with generalized stride (gather load) and tail predicate. More... | |
struct | vload1_gen_stride_z< 0, 1, 2, 3 > |
Load with generalized stride (gather load) and tail predicate specialized for <0,1,2,3> More... | |
struct | vstore1_gen_stride< S > |
Generalized store with strides. More... | |
struct | vstore1_gen_stride< 0, 1, 2, 3 > |
Generalized store with stride (Specialized for <0,1,2,3>) More... | |
struct | vstore1_gen_stride_z< S > |
Store with generalized strides and tail predicate. More... | |
struct | vstore1_gen_stride_z< 0, 1, 2, 3 > |
Scatter store with tail predicate (specialized for <0,1,2,3>) More... | |
struct | vctpq< float16_t > |
vctpq for Helium and f16 More... | |
struct inner::vctpq< float > | +
vctpq for this datatype
+Static Public Member Functions | |
static mve_pred16_t | mk (uint32_t v) |
Make a predicate. | |
+
|
+ +inlinestatic | +
Make a predicate.
+[in] | v | Number of iterations |
struct inner::vload1_gen_stride | +
Load with generalized stride (gather load)
+S | List of offsets known at built time |
Static Public Member Functions | |
static float32x4_t | run (const float32_t *p) |
Load with generalized stride. | |
+
|
+ +inlinestatic | +
Load with generalized stride.
+[in] | p | Load address |
struct inner::vload1_gen_stride< 0, 1, 2, 3 > | +
Load with generalized stride specialized for <0,1,2,3>
+Static Public Member Functions | |
static float32x4_t | run (const float32_t *p) |
Load with generalized stride. | |
+
|
+ +inlinestatic | +
Load with generalized stride.
+[in] | p | Load address |
struct inner::vload1_gen_stride_z | +
Load with generalized stride (gather load) and tail predicate.
+S | List of offsets known at built time |
Static Public Member Functions | |
static float32x4_t | run (const float32_t *p, const std::size_t nb, const mve_pred16_t p0) |
Load. | |
+
|
+ +inlinestatic | +
Load.
+[in] | p | Load address |
[in] | nb | Number of remaining samples in loop |
[in] | p0 | Predicate for remaining samples |
struct inner::vload1_gen_stride_z< 0, 1, 2, 3 > | +
Load with generalized stride (gather load) and tail predicate specialized for <0,1,2,3>
+S | List of offsets known at built time |
Static Public Member Functions | |
static float32x4_t | run (const float32_t *p, const std::size_t nb, const mve_pred16_t p0) |
Gather load with predicated specialized for <0,1,2,3> | |
+
|
+ +inlinestatic | +
Gather load with predicated specialized for <0,1,2,3>
+[in] | p | Load address |
[in] | nb | Number of remaining samples in the loop |
[in] | p0 | Predicate for samples in the loop |
struct inner::vstore1_gen_stride | +
Generalized store with strides.
+S | Stride values known at built time |
Static Public Member Functions | |
static void | run (float32_t *p, const float32x4_t val) |
Scatter store. | |
+
|
+ +inlinestatic | +
Scatter store.
+p | Store address | |
[in] | val | VAlue to store |
struct inner::vstore1_gen_stride< 0, 1, 2, 3 > | +
Generalized store with stride (Specialized for <0,1,2,3>)
+Static Public Member Functions | |
static void | run (float32_t *p, const float32x4_t val) |
Scatter store. | |
+
|
+ +inlinestatic | +
Scatter store.
+p | Store address | |
[in] | val | Value to store |
struct inner::vstore1_gen_stride_z | +
Store with generalized strides and tail predicate.
+S | Strides values known at built time |
Static Public Member Functions | |
static void | vstore1_z (float32_t *p, const float32x4_t val, const std::size_t nb, const mve_pred16_t p0) |
Scatter store with tail predicate. | |
+
|
+ +inlinestatic | +
Scatter store with tail predicate.
+p | Store address | |
[in] | val | Value to store |
[in] | nb | Remaining number of loops |
[in] | p0 | Loop predicate |
struct inner::vstore1_gen_stride_z< 0, 1, 2, 3 > | +
Scatter store with tail predicate (specialized for <0,1,2,3>)
+Static Public Member Functions | |
static void | vstore1_z (float32_t *p, const float32x4_t val, const std::size_t nb, const mve_pred16_t p0) |
Scatter store with tail predicate. | |
+
|
+ +inlinestatic | +
Scatter store with tail predicate.
+p | Store address | |
[in] | val | Value to store |
[in] | nb | Number of remaining loops |
[in] | p0 | Loop predicate |
struct inner::vctpq< float16_t > | +
vctpq for Helium and f16
+Static Public Member Functions | |
static mve_pred16_t | mk (uint32_t v) |
Make predicate. | |
+
|
+ +inlinestatic | +
Make predicate.
+[in] | v | Remaining iterations |
+Namespaces | |
namespace | inner |
+Data Structures | |
struct | vector_traits< Q15, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > |
Vector features for Q15 on Helium. More... | |
struct vector_traits< Q15, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > | +
Vector features for Q15 on Helium.
+arch | Current architecture |
Public Types | |
+typedef Q15 | type |
Scalar datatype. | |
+typedef type::value_type | storage_type |
Storage datatype (int16_t) | |
+typedef int16x8_t | vector |
Vector datatype. | |
+typedef Q< 33, 30 > | temp_accumulator |
Temp accumulator datatype. | |
+typedef mve_pred16_t | predicate_t |
Predicate for loop. | |
Static Public Member Functions | |
static Q< 33, 30 > | temp_acc_zero () |
Zero. | |
static constexpr int16_t | zero_lane () |
Value to write in a lane to write 0. | |
static constexpr int16_t | lane_value (const Q15 x) |
Convert to lane value. | |
Static Public Attributes | |
+static constexpr bool | has_vector = true |
Has vector instructions. | |
+static constexpr bool | is_float = false |
Is not float. | |
+static constexpr bool | is_fixed = true |
Is fixed point. | |
+static constexpr bool | has_predicate = true |
Has predicated loop. | |
+static constexpr int | nb_lanes = 8 |
Number of lanes. | |
+
|
+ +inlinestaticconstexpr | +
Convert to lane value.
+[in] | x | Lane value |
+
|
+ +inlinestatic | +
Zero.
+
+
|
+ +inlinestaticconstexpr | +
Value to write in a lane to write 0.
++Functions | |
void | arm_iir_lattice_f32 (const arm_iir_lattice_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Processing function for the floating-point IIR lattice filter. | |
void | arm_iir_lattice_init_f32 (arm_iir_lattice_instance_f32 *S, uint16_t numStages, float32_t *pkCoeffs, float32_t *pvCoeffs, float32_t *pState, uint32_t blockSize) |
Initialization function for the floating-point IIR lattice filter. | |
void | arm_iir_lattice_init_q15 (arm_iir_lattice_instance_q15 *S, uint16_t numStages, q15_t *pkCoeffs, q15_t *pvCoeffs, q15_t *pState, uint32_t blockSize) |
Initialization function for the Q15 IIR lattice filter. | |
void | arm_iir_lattice_init_q31 (arm_iir_lattice_instance_q31 *S, uint16_t numStages, q31_t *pkCoeffs, q31_t *pvCoeffs, q31_t *pState, uint32_t blockSize) |
Initialization function for the Q31 IIR lattice filter. | |
void | arm_iir_lattice_q15 (const arm_iir_lattice_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Processing function for the Q15 IIR lattice filter. | |
void | arm_iir_lattice_q31 (const arm_iir_lattice_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Processing function for the Q31 IIR lattice filter. | |
This set of functions implements lattice filters for Q15, Q31 and floating-point data types. Lattice filters are used in a variety of adaptive filter applications. The filter structure has feedforward and feedback components and the net impulse response is infinite length. The functions operate on blocks of input and output data and each call to the function processes blockSize
samples through the filter. pSrc
and pDst
point to input and output arrays containing blockSize
values.
+ fN(n) = x(n) + fm-1(n) = fm(n) - km * gm-1(n-1) for m = N, N-1, ..., 1 + gm(n) = km * fm-1(n) + gm-1(n-1) for m = N, N-1, ..., 1 + y(n) = vN * gN(n) + vN-1 * gN-1(n) + ...+ v0 * g0(n) +
pkCoeffs
points to array of reflection coefficients of size numStages
. Reflection Coefficients are stored in time-reversed order. + {kN, kN-1, ..., k1} +
pvCoeffs
points to the array of ladder coefficients of size (numStages+1)
. Ladder coefficients are stored in time-reversed order. + {vN, vN-1, ..., v0} +
pState
points to a state array of size numStages + blockSize
. The state variables shown in the figure above (the g values) are stored in the pState
array. The state variables are updated after each block of data is processed; the coefficients are untouched.+ arm_iir_lattice_instance_f32 S = {numStages, pState, pkCoeffs, pvCoeffs}; + arm_iir_lattice_instance_q31 S = {numStages, pState, pkCoeffs, pvCoeffs}; + arm_iir_lattice_instance_q15 S = {numStages, pState, pkCoeffs, pvCoeffs}; +
numStages
is the number of stages in the filter; pState
points to the state buffer array; pkCoeffs
points to array of the reflection coefficients; pvCoeffs
points to the array of ladder coefficients.void arm_iir_lattice_f32 | +( | +const arm_iir_lattice_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point IIR lattice filter.
+[in] | S | points to an instance of the floating-point IIR lattice structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_iir_lattice_init_f32 | +( | +arm_iir_lattice_instance_f32 * | +S, | +
+ | + | uint16_t | +numStages, | +
+ | + | float32_t * | +pkCoeffs, | +
+ | + | float32_t * | +pvCoeffs, | +
+ | + | float32_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the floating-point IIR lattice filter.
+[in] | S | points to an instance of the floating-point IIR lattice structure |
[in] | numStages | number of stages in the filter |
[in] | pkCoeffs | points to reflection coefficient buffer. The array is of length numStages |
[in] | pvCoeffs | points to ladder coefficient buffer. The array is of length numStages+1 |
[in] | pState | points to state buffer. The array is of length numStages+blockSize |
[in] | blockSize | number of samples to process |
void arm_iir_lattice_init_q15 | +( | +arm_iir_lattice_instance_q15 * | +S, | +
+ | + | uint16_t | +numStages, | +
+ | + | q15_t * | +pkCoeffs, | +
+ | + | q15_t * | +pvCoeffs, | +
+ | + | q15_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q15 IIR lattice filter.
+[in] | S | points to an instance of the Q15 IIR lattice structure |
[in] | numStages | number of stages in the filter |
[in] | pkCoeffs | points to reflection coefficient buffer. The array is of length numStages |
[in] | pvCoeffs | points to ladder coefficient buffer. The array is of length numStages+1 |
[in] | pState | points to state buffer. The array is of length numStages+blockSize |
[in] | blockSize | number of samples to process |
void arm_iir_lattice_init_q31 | +( | +arm_iir_lattice_instance_q31 * | +S, | +
+ | + | uint16_t | +numStages, | +
+ | + | q31_t * | +pkCoeffs, | +
+ | + | q31_t * | +pvCoeffs, | +
+ | + | q31_t * | +pState, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for the Q31 IIR lattice filter.
+[in] | S | points to an instance of the Q31 IIR lattice structure |
[in] | numStages | number of stages in the filter |
[in] | pkCoeffs | points to reflection coefficient buffer. The array is of length numStages |
[in] | pvCoeffs | points to ladder coefficient buffer. The array is of length numStages+1 |
[in] | pState | points to state buffer. The array is of length numStages+blockSize |
[in] | blockSize | number of samples to process |
void arm_iir_lattice_q15 | +( | +const arm_iir_lattice_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q15 IIR lattice filter.
+[in] | S | points to an instance of the Q15 IIR lattice structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
void arm_iir_lattice_q31 | +( | +const arm_iir_lattice_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the Q31 IIR lattice filter.
+[in] | S | points to an instance of the Q31 IIR lattice structure |
[in] | pSrc | points to the block of input data |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process |
+Functions | |
float16_t | arm_jensenshannon_distance_f16 (const float16_t *pA, const float16_t *pB, uint32_t blockSize) |
Jensen-Shannon distance between two vectors. | |
float32_t | arm_jensenshannon_distance_f32 (const float32_t *pA, const float32_t *pB, uint32_t blockSize) |
Jensen-Shannon distance between two vectors. | |
Jensen-Shannon distance
+float16_t arm_jensenshannon_distance_f16 | +( | +const float16_t * | +pA, | +
+ | + | const float16_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Jensen-Shannon distance between two vectors.
+This function is assuming that elements of second vector are > 0 and 0 only when the corresponding element of first vector is 0. Otherwise the result of the computation does not make sense and for speed reasons, the cases returning NaN or Infinity are not managed.
+When the function is computing x log (x / y) with x == 0 and y == 0, it will compute the right result (0) but a division by zero will occur and should be ignored in client code.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float32_t arm_jensenshannon_distance_f32 | +( | +const float32_t * | +pA, | +
+ | + | const float32_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Jensen-Shannon distance between two vectors.
+This function is assuming that elements of second vector are > 0 and 0 only when the corresponding element of first vector is 0. Otherwise the result of the computation does not make sense and for speed reasons, the cases returning NaN or Infinity are not managed.
+When the function is computing x log (x / y) with x == 0 and y == 0, it will compute the right result (0) but a division by zero will occur and should be ignored in client code.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
+Functions | |
float16_t | arm_kullback_leibler_f16 (const float16_t *pSrcA, const float16_t *pSrcB, uint32_t blockSize) |
Kullback-Leibler. | |
float32_t | arm_kullback_leibler_f32 (const float32_t *pSrcA, const float32_t *pSrcB, uint32_t blockSize) |
Kullback-Leibler. | |
float64_t | arm_kullback_leibler_f64 (const float64_t *pSrcA, const float64_t *pSrcB, uint32_t blockSize) |
Kullback-Leibler. | |
Computes the Kullback-Leibler divergence between two distributions
+float16_t arm_kullback_leibler_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Kullback-Leibler.
+Distribution A may contain 0 with Neon version. Result will be right but some exception flags will be set.
+Distribution B must not contain 0 probability.
+[in] | *pSrcA | points to an array of input values for probaility distribution A. |
[in] | *pSrcB | points to an array of input values for probaility distribution B. |
[in] | blockSize | number of samples in the input array. |
float32_t arm_kullback_leibler_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Kullback-Leibler.
+Distribution A may contain 0 with Neon version. Result will be right but some exception flags will be set.
+Distribution B must not contain 0 probability.
+[in] | *pSrcA | points to an array of input values for probaility distribution A. |
[in] | *pSrcB | points to an array of input values for probaility distribution B. |
[in] | blockSize | number of samples in the input array. |
float64_t arm_kullback_leibler_f64 | +( | +const float64_t * | +pSrcA, | +
+ | + | const float64_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Kullback-Leibler.
+[in] | *pSrcA | points to an array of input values for probaility distribution A. |
[in] | *pSrcB | points to an array of input values for probaility distribution B. |
[in] | blockSize | number of samples in the input array. |
+Functions | |
void | arm_levinson_durbin_f16 (const float16_t *phi, float16_t *a, float16_t *err, int nbCoefs) |
Levinson Durbin. | |
void | arm_levinson_durbin_f32 (const float32_t *phi, float32_t *a, float32_t *err, int nbCoefs) |
Levinson Durbin. | |
void | arm_levinson_durbin_q31 (const q31_t *phi, q31_t *a, q31_t *err, int nbCoefs) |
Levinson Durbin. | |
void arm_levinson_durbin_f16 | +( | +const float16_t * | +phi, | +
+ | + | float16_t * | +a, | +
+ | + | float16_t * | +err, | +
+ | + | int | +nbCoefs | +
+ | ) | ++ |
Levinson Durbin.
+[in] | phi | autocovariance vector starting with lag 0 (length is nbCoefs + 1) |
[out] | a | autoregressive coefficients |
[out] | err | prediction error (variance) |
[in] | nbCoefs | number of autoregressive coefficients |
void arm_levinson_durbin_f32 | +( | +const float32_t * | +phi, | +
+ | + | float32_t * | +a, | +
+ | + | float32_t * | +err, | +
+ | + | int | +nbCoefs | +
+ | ) | ++ |
Levinson Durbin.
+[in] | phi | autocovariance vector starting with lag 0 (length is nbCoefs + 1) |
[out] | a | autoregressive coefficients |
[out] | err | prediction error (variance) |
[in] | nbCoefs | number of autoregressive coefficients |
void arm_levinson_durbin_q31 | +( | +const q31_t * | +phi, | +
+ | + | q31_t * | +a, | +
+ | + | q31_t * | +err, | +
+ | + | int | +nbCoefs | +
+ | ) | ++ |
Levinson Durbin.
+[in] | phi | autocovariance vector starting with lag 0 (length is nbCoefs + 1) |
[out] | a | autoregressive coefficients |
[out] | err | prediction error (variance) |
[in] | nbCoefs | number of autoregressive coefficients |
+Functions | |
void | arm_lms_f32 (const arm_lms_instance_f32 *S, const float32_t *pSrc, float32_t *pRef, float32_t *pOut, float32_t *pErr, uint32_t blockSize) |
Processing function for floating-point LMS filter. | |
void | arm_lms_init_f32 (arm_lms_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, float32_t mu, uint32_t blockSize) |
Initialization function for floating-point LMS filter. | |
void | arm_lms_init_q15 (arm_lms_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, q15_t mu, uint32_t blockSize, uint32_t postShift) |
Initialization function for the Q15 LMS filter. | |
void | arm_lms_init_q31 (arm_lms_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, q31_t mu, uint32_t blockSize, uint32_t postShift) |
Initialization function for Q31 LMS filter. | |
void | arm_lms_q15 (const arm_lms_instance_q15 *S, const q15_t *pSrc, q15_t *pRef, q15_t *pOut, q15_t *pErr, uint32_t blockSize) |
Processing function for Q15 LMS filter. | |
void | arm_lms_q31 (const arm_lms_instance_q31 *S, const q31_t *pSrc, q31_t *pRef, q31_t *pOut, q31_t *pErr, uint32_t blockSize) |
Processing function for Q31 LMS filter. | |
LMS filters are a class of adaptive filters that are able to "learn" an unknown transfer functions. LMS filters use a gradient descent method in which the filter coefficients are updated based on the instantaneous error signal. Adaptive filters are often used in communication systems, equalizers, and noise removal. The CMSIS DSP Library contains LMS filter functions that operate on Q15, Q31, and floating-point data types. The library also contains normalized LMS filters in which the filter coefficient adaptation is indepedent of the level of the input signal.
+An LMS filter consists of two components as shown below. The first component is a standard transversal or FIR filter. The second component is a coefficient update mechanism. The LMS filter has two input signals. The "input" feeds the FIR filter while the "reference input" corresponds to the desired output of the FIR filter. That is, the FIR filter coefficients are updated so that the output of the FIR filter matches the reference input. The filter coefficient update mechanism is based on the difference between the FIR filter output and the reference input. This "error signal" tends towards zero as the filter adapts. The LMS processing functions accept the input and reference input signals and generate the filter output and error signal.
The functions operate on blocks of data and each call to the function processes blockSize
samples through the filter. pSrc
points to input signal, pRef
points to reference signal, pOut
points to output signal and pErr
points to error signal. All arrays contain blockSize
values.
The functions operate on a block-by-block basis. Internally, the filter coefficients b[n]
are updated on a sample-by-sample basis. The convergence of the LMS filter is slower compared to the normalized LMS algorithm.
y[n]
is computed by a standard FIR filter: + y[n] = b[0] * x[n] + b[1] * x[n-1] + b[2] * x[n-2] + ...+ b[numTaps-1] * x[n-numTaps+1] +
d[n]
and the filter output: + e[n] = d[n] - y[n]. +
b[k]
are updated on a sample-by-sample basis: + b[k] = b[k] + e[n] * mu * x[n-k], for k=0, 1, ..., numTaps-1 +where
mu
is the step size and controls the rate of coefficient convergence. pCoeffs
points to a coefficient array of size numTaps
. Coefficients are stored in time reversed order. + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to a state array of size numTaps + blockSize - 1
. Samples in the state buffer are stored in the order: + {x[n-numTaps+1], x[n-numTaps], x[n-numTaps-1], x[n-numTaps-2]....x[0], x[1], ..., x[blockSize-1]} +
blockSize-1
samples. The increased state buffer length allows circular addressing, which is traditionally used in FIR filters, to be avoided and yields a significant speed improvement. The state variables are updated after each block of data is processed. + arm_lms_instance_f32 S = {numTaps, pState, pCoeffs, mu}; + arm_lms_instance_q31 S = {numTaps, pState, pCoeffs, mu, postShift}; + arm_lms_instance_q15 S = {numTaps, pState, pCoeffs, mu, postShift}; +where
numTaps
is the number of filter coefficients in the filter; pState
is the address of the state buffer; pCoeffs
is the address of the coefficient buffer; mu
is the step size parameter; and postShift
is the shift applied to coefficients.[-1 +1)
. The fixed-point functions have an additional scaling parameter postShift
. At the output of the filter's accumulator is a shift register which shifts the result by postShift
bits. This essentially scales the filter coefficients by 2^postShift
and allows the filter coefficients to exceed the range [+1 -1)
. The value of postShift
is set by the user based on the expected gain through the system being modeled.void arm_lms_f32 | +( | +const arm_lms_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pRef, | +
+ | + | float32_t * | +pOut, | +
+ | + | float32_t * | +pErr, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for floating-point LMS filter.
+[in] | S | points to an instance of the floating-point LMS filter structure |
[in] | pSrc | points to the block of input data |
[in] | pRef | points to the block of reference data |
[out] | pOut | points to the block of output data |
[out] | pErr | points to the block of error data |
[in] | blockSize | number of samples to process |
void arm_lms_init_f32 | +( | +arm_lms_instance_f32 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState, | +
+ | + | float32_t | +mu, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for floating-point LMS filter.
+[in] | S | points to an instance of the floating-point LMS filter structure |
[in] | numTaps | number of filter coefficients |
[in] | pCoeffs | points to coefficient buffer |
[in] | pState | points to state buffer |
[in] | mu | step size that controls filter coefficient updates |
[in] | blockSize | number of samples to process |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +The initial filter coefficients serve as a starting point for the adaptive filter.
pState
points to an array of length numTaps+blockSize-1
samples, where blockSize
is the number of input samples processed by each call to arm_lms_f32()
. void arm_lms_init_q15 | +( | +arm_lms_instance_q15 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | q15_t * | +pCoeffs, | +
+ | + | q15_t * | +pState, | +
+ | + | q15_t | +mu, | +
+ | + | uint32_t | +blockSize, | +
+ | + | uint32_t | +postShift | +
+ | ) | ++ |
Initialization function for the Q15 LMS filter.
+[in] | S | points to an instance of the Q15 LMS filter structure. |
[in] | numTaps | number of filter coefficients. |
[in] | pCoeffs | points to coefficient buffer. |
[in] | pState | points to state buffer. |
[in] | mu | step size that controls filter coefficient updates. |
[in] | blockSize | number of samples to process. |
[in] | postShift | bit shift applied to coefficients. |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +The initial filter coefficients serve as a starting point for the adaptive filter.
pState
points to the array of state variables and size of array is numTaps+blockSize-1
samples, where blockSize
is the number of input samples processed by each call to arm_lms_q15()
. void arm_lms_init_q31 | +( | +arm_lms_instance_q31 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | q31_t * | +pCoeffs, | +
+ | + | q31_t * | +pState, | +
+ | + | q31_t | +mu, | +
+ | + | uint32_t | +blockSize, | +
+ | + | uint32_t | +postShift | +
+ | ) | ++ |
Initialization function for Q31 LMS filter.
+[in] | S | points to an instance of the Q31 LMS filter structure |
[in] | numTaps | number of filter coefficients |
[in] | pCoeffs | points to coefficient buffer |
[in] | pState | points to state buffer |
[in] | mu | step size that controls filter coefficient updates |
[in] | blockSize | number of samples to process |
[in] | postShift | bit shift applied to coefficients |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +The initial filter coefficients serve as a starting point for the adaptive filter.
pState
points to an array of length numTaps+blockSize-1
samples, where blockSize
is the number of input samples processed by each call to arm_lms_q31()
. void arm_lms_q15 | +( | +const arm_lms_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pRef, | +
+ | + | q15_t * | +pOut, | +
+ | + | q15_t * | +pErr, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for Q15 LMS filter.
+[in] | S | points to an instance of the Q15 LMS filter structure |
[in] | pSrc | points to the block of input data |
[in] | pRef | points to the block of reference data |
[out] | pOut | points to the block of output data |
[out] | pErr | points to the block of error data |
[in] | blockSize | number of samples to process |
void arm_lms_q31 | +( | +const arm_lms_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pRef, | +
+ | + | q31_t * | +pOut, | +
+ | + | q31_t * | +pErr, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for Q31 LMS filter.
+[in] | S | points to an instance of the Q31 LMS filter structure. |
[in] | pSrc | points to the block of input data. |
[in] | pRef | points to the block of reference data. |
[out] | pOut | points to the block of output data. |
[out] | pErr | points to the block of error data. |
[in] | blockSize | number of samples to process. |
+Functions | |
void | arm_lms_norm_f32 (arm_lms_norm_instance_f32 *S, const float32_t *pSrc, float32_t *pRef, float32_t *pOut, float32_t *pErr, uint32_t blockSize) |
Processing function for floating-point normalized LMS filter. | |
void | arm_lms_norm_init_f32 (arm_lms_norm_instance_f32 *S, uint16_t numTaps, float32_t *pCoeffs, float32_t *pState, float32_t mu, uint32_t blockSize) |
Initialization function for floating-point normalized LMS filter. | |
void | arm_lms_norm_init_q15 (arm_lms_norm_instance_q15 *S, uint16_t numTaps, q15_t *pCoeffs, q15_t *pState, q15_t mu, uint32_t blockSize, uint8_t postShift) |
Initialization function for Q15 normalized LMS filter. | |
void | arm_lms_norm_init_q31 (arm_lms_norm_instance_q31 *S, uint16_t numTaps, q31_t *pCoeffs, q31_t *pState, q31_t mu, uint32_t blockSize, uint8_t postShift) |
Initialization function for Q31 normalized LMS filter. | |
void | arm_lms_norm_q15 (arm_lms_norm_instance_q15 *S, const q15_t *pSrc, q15_t *pRef, q15_t *pOut, q15_t *pErr, uint32_t blockSize) |
Processing function for Q15 normalized LMS filter. | |
void | arm_lms_norm_q31 (arm_lms_norm_instance_q31 *S, const q31_t *pSrc, q31_t *pRef, q31_t *pOut, q31_t *pErr, uint32_t blockSize) |
Processing function for Q31 normalized LMS filter. | |
This set of functions implements a commonly used adaptive filter. It is related to the Least Mean Square (LMS) adaptive filter and includes an additional normalization factor which increases the adaptation rate of the filter. The CMSIS DSP Library contains normalized LMS filter functions that operate on Q15, Q31, and floating-point data types.
+A normalized least mean square (NLMS) filter consists of two components as shown below. The first component is a standard transversal or FIR filter. The second component is a coefficient update mechanism. The NLMS filter has two input signals. The "input" feeds the FIR filter while the "reference input" corresponds to the desired output of the FIR filter. That is, the FIR filter coefficients are updated so that the output of the FIR filter matches the reference input. The filter coefficient update mechanism is based on the difference between the FIR filter output and the reference input. This "error signal" tends towards zero as the filter adapts. The NLMS processing functions accept the input and reference input signals and generate the filter output and error signal.
The functions operate on blocks of data and each call to the function processes blockSize
samples through the filter. pSrc
points to input signal, pRef
points to reference signal, pOut
points to output signal and pErr
points to error signal. All arrays contain blockSize
values.
The functions operate on a block-by-block basis. Internally, the filter coefficients b[n]
are updated on a sample-by-sample basis. The convergence of the LMS filter is slower compared to the normalized LMS algorithm.
y[n]
is computed by a standard FIR filter: + y[n] = b[0] * x[n] + b[1] * x[n-1] + b[2] * x[n-2] + ...+ b[numTaps-1] * x[n-numTaps+1] +
d[n]
and the filter output: + e[n] = d[n] - y[n]. +
+ E = x[n]^2 + x[n-1]^2 + ... + x[n-numTaps+1]^2. +The filter coefficients
b[k]
are then updated on a sample-by-sample basis: + b[k] = b[k] + e[n] * (mu/E) * x[n-k], for k=0, 1, ..., numTaps-1 +where
mu
is the step size and controls the rate of coefficient convergence. pCoeffs
points to a coefficient array of size numTaps
. Coefficients are stored in time reversed order. + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +
pState
points to a state array of size numTaps + blockSize - 1
. Samples in the state buffer are stored in the order: + {x[n-numTaps+1], x[n-numTaps], x[n-numTaps-1], x[n-numTaps-2]....x[0], x[1], ..., x[blockSize-1]} +
blockSize-1
samples. The increased state buffer length allows circular addressing, which is traditionally used in FIR filters, to be avoided and yields a significant speed improvement. The state variables are updated after each block of data is processed.[-1 +1)
. The fixed-point functions have an additional scaling parameter postShift
. At the output of the filter's accumulator is a shift register which shifts the result by postShift
bits. This essentially scales the filter coefficients by 2^postShift
and allows the filter coefficients to exceed the range [+1 -1)
. The value of postShift
is set by the user based on the expected gain through the system being modeled.void arm_lms_norm_f32 | +( | +arm_lms_norm_instance_f32 * | +S, | +
+ | + | const float32_t * | +pSrc, | +
+ | + | float32_t * | +pRef, | +
+ | + | float32_t * | +pOut, | +
+ | + | float32_t * | +pErr, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for floating-point normalized LMS filter.
+[in] | S | points to an instance of the floating-point normalized LMS filter structure |
[in] | pSrc | points to the block of input data |
[in] | pRef | points to the block of reference data |
[out] | pOut | points to the block of output data |
[out] | pErr | points to the block of error data |
[in] | blockSize | number of samples to process |
void arm_lms_norm_init_f32 | +( | +arm_lms_norm_instance_f32 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | float32_t * | +pCoeffs, | +
+ | + | float32_t * | +pState, | +
+ | + | float32_t | +mu, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Initialization function for floating-point normalized LMS filter.
+[in] | S | points to an instance of the floating-point LMS filter structure |
[in] | numTaps | number of filter coefficients |
[in] | pCoeffs | points to coefficient buffer |
[in] | pState | points to state buffer |
[in] | mu | step size that controls filter coefficient updates |
[in] | blockSize | number of samples to process |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +The initial filter coefficients serve as a starting point for the adaptive filter.
pState
points to an array of length numTaps+blockSize-1
samples, where blockSize
is the number of input samples processed by each call to arm_lms_norm_f32()
. void arm_lms_norm_init_q15 | +( | +arm_lms_norm_instance_q15 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | q15_t * | +pCoeffs, | +
+ | + | q15_t * | +pState, | +
+ | + | q15_t | +mu, | +
+ | + | uint32_t | +blockSize, | +
+ | + | uint8_t | +postShift | +
+ | ) | ++ |
Initialization function for Q15 normalized LMS filter.
+[in] | S | points to an instance of the Q15 normalized LMS filter structure. |
[in] | numTaps | number of filter coefficients. |
[in] | pCoeffs | points to coefficient buffer. |
[in] | pState | points to state buffer. |
[in] | mu | step size that controls filter coefficient updates. |
[in] | blockSize | number of samples to process. |
[in] | postShift | bit shift applied to coefficients. |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +The initial filter coefficients serve as a starting point for the adaptive filter.
pState
points to the array of state variables and size of array is numTaps+blockSize-1
samples, where blockSize
is the number of input samples processed by each call to arm_lms_norm_q15()
. void arm_lms_norm_init_q31 | +( | +arm_lms_norm_instance_q31 * | +S, | +
+ | + | uint16_t | +numTaps, | +
+ | + | q31_t * | +pCoeffs, | +
+ | + | q31_t * | +pState, | +
+ | + | q31_t | +mu, | +
+ | + | uint32_t | +blockSize, | +
+ | + | uint8_t | +postShift | +
+ | ) | ++ |
Initialization function for Q31 normalized LMS filter.
+[in] | S | points to an instance of the Q31 normalized LMS filter structure. |
[in] | numTaps | number of filter coefficients. |
[in] | pCoeffs | points to coefficient buffer. |
[in] | pState | points to state buffer. |
[in] | mu | step size that controls filter coefficient updates. |
[in] | blockSize | number of samples to process. |
[in] | postShift | bit shift applied to coefficients. |
pCoeffs
points to the array of filter coefficients stored in time reversed order: + {b[numTaps-1], b[numTaps-2], b[N-2], ..., b[1], b[0]} +The initial filter coefficients serve as a starting point for the adaptive filter.
pState
points to an array of length numTaps+blockSize-1
samples, where blockSize
is the number of input samples processed by each call to arm_lms_norm_q31()
. void arm_lms_norm_q15 | +( | +arm_lms_norm_instance_q15 * | +S, | +
+ | + | const q15_t * | +pSrc, | +
+ | + | q15_t * | +pRef, | +
+ | + | q15_t * | +pOut, | +
+ | + | q15_t * | +pErr, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for Q15 normalized LMS filter.
+[in] | S | points to an instance of the Q15 normalized LMS filter structure |
[in] | pSrc | points to the block of input data |
[in] | pRef | points to the block of reference data |
[out] | pOut | points to the block of output data |
[out] | pErr | points to the block of error data |
[in] | blockSize | number of samples to process |
void arm_lms_norm_q31 | +( | +arm_lms_norm_instance_q31 * | +S, | +
+ | + | const q31_t * | +pSrc, | +
+ | + | q31_t * | +pRef, | +
+ | + | q31_t * | +pOut, | +
+ | + | q31_t * | +pErr, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for Q31 normalized LMS filter.
+[in] | S | points to an instance of the Q31 normalized LMS filter structure |
[in] | pSrc | points to the block of input data |
[in] | pRef | points to the block of reference data |
[out] | pOut | points to the block of output data |
[out] | pErr | points to the block of error data |
[in] | blockSize | number of samples to process |
CMSIS DSP Software Library – Linear Interpolate Example
+Description This example demonstrates usage of linear interpolate modules and fast math modules. Method 1 uses fast math sine function to calculate sine values using cubic interpolation and method 2 uses linear interpolation function and results are compared to reference output. Example shows linear interpolation function can be used to get higher precision compared to fast math sin calculation.
+testInputSin_f32
points to the input values for sine calculation testRefSinOutput32_f32
points to the reference values caculated from sin() matlab function testOutput
points to output buffer calculation from cubic interpolation testLinIntOutput
points to output buffer calculation from linear interpolation snr1
Signal to noise ratio for reference and cubic interpolation output snr2
Signal to noise ratio for reference and linear interpolation output+Functions | |
float16_t | arm_linear_interp_f16 (const arm_linear_interp_instance_f16 *S, float16_t x) |
Process function for the floating-point Linear Interpolation Function. | |
float32_t | arm_linear_interp_f32 (const arm_linear_interp_instance_f32 *S, float32_t x) |
Process function for the floating-point Linear Interpolation Function. | |
q15_t | arm_linear_interp_q15 (const q15_t *pYData, q31_t x, uint32_t nValues) |
Process function for the Q15 Linear Interpolation Function. | |
q31_t | arm_linear_interp_q31 (const q31_t *pYData, q31_t x, uint32_t nValues) |
Process function for the Q31 Linear Interpolation Function. | |
q7_t | arm_linear_interp_q7 (const q7_t *pYData, q31_t x, uint32_t nValues) |
Process function for the Q7 Linear Interpolation Function. | |
Linear interpolation is a method of curve fitting using linear polynomials. Linear interpolation works by effectively drawing a straight line between two neighboring samples and returning the appropriate point along that line
++ y = y0 + (x - x0) * ((y1 - y0)/(x1-x0)) + where x0, x1 are nearest values of input x + y0, y1 are nearest values to output y +
S
points to an instance of the Linear Interpolate function data structure. x
is the input sample value. The functions returns the output value.float16_t arm_linear_interp_f16 | +( | +const arm_linear_interp_instance_f16 * | +S, | +
+ | + | float16_t | +x | +
+ | ) | ++ |
Process function for the floating-point Linear Interpolation Function.
+[in,out] | S | is an instance of the floating-point Linear Interpolation structure |
[in] | x | input sample to process |
float32_t arm_linear_interp_f32 | +( | +const arm_linear_interp_instance_f32 * | +S, | +
+ | + | float32_t | +x | +
+ | ) | ++ |
Process function for the floating-point Linear Interpolation Function.
+[in,out] | S | is an instance of the floating-point Linear Interpolation structure |
[in] | x | input sample to process |
q15_t arm_linear_interp_q15 | +( | +const q15_t * | +pYData, | +
+ | + | q31_t | +x, | +
+ | + | uint32_t | +nValues | +
+ | ) | ++ |
Process function for the Q15 Linear Interpolation Function.
+[in] | pYData | pointer to Q15 Linear Interpolation table |
[in] | x | input sample to process |
[in] | nValues | number of table values |
x
is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part. This function can support maximum of table size 2^12. q31_t arm_linear_interp_q31 | +( | +const q31_t * | +pYData, | +
+ | + | q31_t | +x, | +
+ | + | uint32_t | +nValues | +
+ | ) | ++ |
Process function for the Q31 Linear Interpolation Function.
+[in] | pYData | pointer to Q31 Linear Interpolation table |
[in] | x | input sample to process |
[in] | nValues | number of table values |
x
is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part. This function can support maximum of table size 2^12. q7_t arm_linear_interp_q7 | +( | +const q7_t * | +pYData, | +
+ | + | q31_t | +x, | +
+ | + | uint32_t | +nValues | +
+ | ) | ++ |
Process function for the Q7 Linear Interpolation Function.
+[in] | pYData | pointer to Q7 Linear Interpolation table |
[in] | x | input sample to process |
[in] | nValues | number of table values |
x
is in 12.20 format which contains 12 bits for table index and 20 bits for fractional part. This function can support maximum of table size 2^12. +Functions | |
float16_t | arm_logsumexp_dot_prod_f16 (const float16_t *pSrcA, const float16_t *pSrcB, uint32_t blockSize, float16_t *pTmpBuffer) |
Dot product with log arithmetic. | |
float32_t | arm_logsumexp_dot_prod_f32 (const float32_t *pSrcA, const float32_t *pSrcB, uint32_t blockSize, float32_t *pTmpBuffer) |
Dot product with log arithmetic. | |
float16_t | arm_logsumexp_f16 (const float16_t *in, uint32_t blockSize) |
Computation of the LogSumExp. | |
float32_t | arm_logsumexp_f32 (const float32_t *in, uint32_t blockSize) |
Computation of the LogSumExp. | |
LogSumExp optimizations to compute sum of probabilities with Gaussian distributions
+float16_t arm_logsumexp_dot_prod_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pTmpBuffer | +
+ | ) | ++ |
Dot product with log arithmetic.
+Vectors are containing the log of the samples
+[in] | *pSrcA | points to the first input vector |
[in] | *pSrcB | points to the second input vector |
[in] | blockSize | number of samples in each vector |
[in] | *pTmpBuffer | temporary buffer of length blockSize |
float32_t arm_logsumexp_dot_prod_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pTmpBuffer | +
+ | ) | ++ |
Dot product with log arithmetic.
+Vectors are containing the log of the samples
+[in] | *pSrcA | points to the first input vector |
[in] | *pSrcB | points to the second input vector |
[in] | blockSize | number of samples in each vector |
[in] | *pTmpBuffer | temporary buffer of length blockSize |
float16_t arm_logsumexp_f16 | +( | +const float16_t * | +in, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Computation of the LogSumExp.
+In probabilistic computations, the dynamic of the probability values can be very wide because they come from gaussian functions. To avoid underflow and overflow issues, the values are represented by their log. In this representation, multiplying the original exp values is easy : their logs are added. But adding the original exp values is requiring some special handling and it is the goal of the LogSumExp function.
+If the values are x1...xn, the function is computing:
+ln(exp(x1) + ... + exp(xn)) and the computation is done in such a way that rounding issues are minimised.
+The max xm of the values is extracted and the function is computing: xm + ln(exp(x1 - xm) + ... + exp(xn - xm))
+[in] | *in | Pointer to an array of input values. |
[in] | blockSize | Number of samples in the input array. |
float32_t arm_logsumexp_f32 | +( | +const float32_t * | +in, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Computation of the LogSumExp.
+In probabilistic computations, the dynamic of the probability values can be very wide because they come from gaussian functions. To avoid underflow and overflow issues, the values are represented by their log. In this representation, multiplying the original exp values is easy : their logs are added. But adding the original exp values is requiring some special handling and it is the goal of the LogSumExp function.
+If the values are x1...xn, the function is computing:
+ln(exp(x1) + ... + exp(xn)) and the computation is done in such a way that rounding issues are minimised.
+The max xm of the values is extracted and the function is computing: xm + ln(exp(x1 - xm) + ... + exp(xn - xm))
+[in] | *in | Pointer to an array of input values. |
[in] | blockSize | Number of samples in the input array. |
+Data Structures | |
struct | default_user_allocator_malloc_free |
Malloc memory allocator. More... | |
struct | user_allocator_aligned_malloc |
Memory allocation for aligned buffers. More... | |
+Functions | |
void * | aligned_malloc (std::size_t alignment, std::size_t size) |
Aligned memory allocation. | |
void | aligned_free (void *ptr) |
Free an aligned buffer. | |
Allocators for allocating memory buffers
+struct arm_cmsis_dsp::default_user_allocator_malloc_free | +
Malloc memory allocator.
+Static Public Member Functions | |
static char * | malloc (const std::size_t bytes) |
Allocate a buffer. | |
static void | free (char *const block) |
Free a buffer. | |
+
|
+ +inlinestatic | +
Free a buffer.
+block | The buffer to free |
+
|
+ +inlinestatic | +
Allocate a buffer.
+[in] | bytes | The bytes |
struct arm_cmsis_dsp::user_allocator_aligned_malloc | +
Memory allocation for aligned buffers.
+Static Public Member Functions | |
static char * | malloc (const size_type bytes) |
Allocate a new buffer. | |
static void | free (char *const block) |
Free a buffer. | |
+
|
+ +inlinestatic | +
Free a buffer.
+block | Pointer to the buffer |
+
|
+ +inlinestatic | +
Allocate a new buffer.
+[in] | bytes | The bytes |
+
|
+ +inline | +
Free an aligned buffer.
+ptr | The pointer |
+
|
+ +inline | +
Aligned memory allocation.
+[in] | alignment | The alignment of the buffer |
[in] | size | The size of the buffer |
+Content | |
Memory buffer allocator | |
Vector / matrix buffer allocator | |
Miscellaneous utilities for memory | |
+Data Structures | |
struct | default_user_allocator_malloc_free |
Malloc memory allocator. More... | |
struct | user_allocator_aligned_malloc |
Memory allocation for aligned buffers. More... | |
struct | malloc_allocator< L > |
Default memory allocator for vectors and matrixes. More... | |
struct | ListElem |
Simple list of elements. More... | |
class | MemoryPool< BUF_SIZE, UserAllocator > |
This class describes a memory pool that can be used to build a memory allocator for vectors and matrixes. More... | |
struct arm_cmsis_dsp::default_user_allocator_malloc_free | +
Malloc memory allocator.
+Static Public Member Functions | |
static char * | malloc (const std::size_t bytes) |
Allocate a buffer. | |
static void | free (char *const block) |
Free a buffer. | |
+
|
+ +inlinestatic | +
Free a buffer.
+block | The buffer to free |
+
|
+ +inlinestatic | +
Allocate a buffer.
+[in] | bytes | The bytes |
struct arm_cmsis_dsp::user_allocator_aligned_malloc | +
Memory allocation for aligned buffers.
+Static Public Member Functions | |
static char * | malloc (const size_type bytes) |
Allocate a new buffer. | |
static void | free (char *const block) |
Free a buffer. | |
+
|
+ +inlinestatic | +
Free a buffer.
+block | Pointer to the buffer |
+
|
+ +inlinestatic | +
Allocate a new buffer.
+[in] | bytes | The bytes |
struct arm_cmsis_dsp::malloc_allocator | +
Default memory allocator for vectors and matrixes.
+L | Size known at build time in bytes |
Static Public Member Functions | |
static char * | allocate (vector_length_t sz) noexcept |
Allocate a buffer with size known at runtime. | |
static char * | allocate () noexcept |
Allocate a buffer with size known at build time. | |
static void | destroy (char *ptr) noexcept |
Destroys the given pointer. | |
+
|
+ +inlinestaticnoexcept | +
Allocate a buffer with size known at build time.
+
+
|
+ +inlinestaticnoexcept | +
Allocate a buffer with size known at runtime.
+[in] | sz | The size |
+
|
+ +inlinestaticnoexcept | +
Destroys the given pointer.
+ptr | The pointer |
struct arm_cmsis_dsp::ListElem | +
Simple list of elements.
+class arm_cmsis_dsp::MemoryPool | +
This class describes a memory pool that can be used to build a memory allocator for vectors and matrixes.
+BUF_SIZE | Size of a buffer known at build time |
UserAllocator | Memory allocator to allocate the memory buffer |
Public Member Functions | |
MemoryPool (const uint16_t nbBufs) | |
Create a new memory pool. | |
+ | ~MemoryPool () |
Destroys the object. | |
char * | get_new_buffer () noexcept |
Gets the new free buffer. | |
void | recycle_buffer (char *buf) noexcept |
Release the buffer so that it can be reused. | |
+void | reset () noexcept |
Release all the buffers so that they can be reused. | |
+
|
+ +inlineexplicit | +
Create a new memory pool.
+[in] | nbBufs | The number of buffers to pre-allocate |
+
|
+ +inlinenoexcept | +
Gets the new free buffer.
+
+
|
+ +inlinenoexcept | +
Release the buffer so that it can be reused.
+buf | The buffer |
+Data Structures | |
struct | ListElem |
Simple list of elements. More... | |
class | MemoryPool< BUF_SIZE, UserAllocator > |
This class describes a memory pool that can be used to build a memory allocator for vectors and matrixes. More... | |
Miscellaneous utilities for implementing memory allocators
+struct arm_cmsis_dsp::ListElem | +
Simple list of elements.
+class arm_cmsis_dsp::MemoryPool | +
This class describes a memory pool that can be used to build a memory allocator for vectors and matrixes.
+BUF_SIZE | Size of a buffer known at build time |
UserAllocator | Memory allocator to allocate the memory buffer |
Public Member Functions | |
MemoryPool (const uint16_t nbBufs) | |
Create a new memory pool. | |
+ | ~MemoryPool () |
Destroys the object. | |
char * | get_new_buffer () noexcept |
Gets the new free buffer. | |
void | recycle_buffer (char *buf) noexcept |
Release the buffer so that it can be reused. | |
+void | reset () noexcept |
Release all the buffers so that they can be reused. | |
+
|
+ +inlineexplicit | +
Create a new memory pool.
+[in] | nbBufs | The number of buffers to pre-allocate |
+
|
+ +inlinenoexcept | +
Gets the new free buffer.
+
+
|
+ +inlinenoexcept | +
Release the buffer so that it can be reused.
+buf | The buffer |
+Data Structures | |
struct | malloc_allocator< L > |
Default memory allocator for vectors and matrixes. More... | |
Allocators for allocating vector / matrix buffers
+struct arm_cmsis_dsp::malloc_allocator | +
Default memory allocator for vectors and matrixes.
+L | Size known at build time in bytes |
Static Public Member Functions | |
static char * | allocate (vector_length_t sz) noexcept |
Allocate a buffer with size known at runtime. | |
static char * | allocate () noexcept |
Allocate a buffer with size known at build time. | |
static void | destroy (char *ptr) noexcept |
Destroys the given pointer. | |
+
|
+ +inlinestaticnoexcept | +
Allocate a buffer with size known at build time.
+
+
|
+ +inlinestaticnoexcept | +
Allocate a buffer with size known at runtime.
+[in] | sz | The size |
+
|
+ +inlinestaticnoexcept | +
Destroys the given pointer.
+ptr | The pointer |
+Functions | |
void | arm_mfcc_f16 (const arm_mfcc_instance_f16 *S, float16_t *pSrc, float16_t *pDst, float16_t *pTmp) |
MFCC F16. | |
arm_status | arm_mfcc_init_f16 (arm_mfcc_instance_f16 *S, uint32_t fftLen, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs) |
Generic initialization of the MFCC F16 instance structure. | |
arm_status | arm_mfcc_init_32_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs) |
Initialization of the MFCC F16 instance structure for 32 samples MFCC. | |
arm_status | arm_mfcc_init_64_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs) |
Initialization of the MFCC F16 instance structure for 64 samples MFCC. | |
arm_status | arm_mfcc_init_128_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs) |
Initialization of the MFCC F16 instance structure for 128 samples MFCC. | |
arm_status | arm_mfcc_init_256_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs) |
Initialization of the MFCC F16 instance structure for 256 samples MFCC. | |
arm_status | arm_mfcc_init_512_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs) |
Initialization of the MFCC F16 instance structure for 512 samples MFCC. | |
arm_status | arm_mfcc_init_1024_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs) |
Initialization of the MFCC F16 instance structure for 1024 samples MFCC. | |
arm_status | arm_mfcc_init_2048_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs) |
Initialization of the MFCC F16 instance structure for 2048 samples MFCC. | |
arm_status | arm_mfcc_init_4096_f16 (arm_mfcc_instance_f16 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float16_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float16_t *filterCoefs, const float16_t *windowCoefs) |
Initialization of the MFCC F16 instance structure for 4096 samples MFCC. | |
void arm_mfcc_f16 | +( | +const arm_mfcc_instance_f16 * | +S, | +
+ | + | float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | float16_t * | +pTmp | +
+ | ) | ++ |
MFCC F16.
+[in] | S | points to the mfcc instance structure |
[in] | pSrc | points to the input samples |
[out] | pDst | points to the output MFCC values |
[in,out] | pTmp | points to a temporary buffer of complex |
The temporary buffer has a 2*fft length size when MFCC is implemented with CFFT. It has length FFT Length + 2 when implemented with RFFT (default implementation).
+The source buffer is modified by this function.
+ +arm_status arm_mfcc_init_1024_f16 | +( | +arm_mfcc_instance_f16 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float16_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float16_t * | +filterCoefs, | +
+ | + | const float16_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F16 instance structure for 1024 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_128_f16 | +( | +arm_mfcc_instance_f16 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float16_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float16_t * | +filterCoefs, | +
+ | + | const float16_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F16 instance structure for 128 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_2048_f16 | +( | +arm_mfcc_instance_f16 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float16_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float16_t * | +filterCoefs, | +
+ | + | const float16_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F16 instance structure for 2048 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_256_f16 | +( | +arm_mfcc_instance_f16 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float16_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float16_t * | +filterCoefs, | +
+ | + | const float16_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F16 instance structure for 256 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_32_f16 | +( | +arm_mfcc_instance_f16 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float16_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float16_t * | +filterCoefs, | +
+ | + | const float16_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F16 instance structure for 32 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_4096_f16 | +( | +arm_mfcc_instance_f16 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float16_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float16_t * | +filterCoefs, | +
+ | + | const float16_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F16 instance structure for 4096 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_512_f16 | +( | +arm_mfcc_instance_f16 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float16_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float16_t * | +filterCoefs, | +
+ | + | const float16_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F16 instance structure for 512 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_64_f16 | +( | +arm_mfcc_instance_f16 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float16_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float16_t * | +filterCoefs, | +
+ | + | const float16_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F16 instance structure for 64 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_f16 | +( | +arm_mfcc_instance_f16 * | +S, | +
+ | + | uint32_t | +fftLen, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float16_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float16_t * | +filterCoefs, | +
+ | + | const float16_t * | +windowCoefs | +
+ | ) | ++ |
Generic initialization of the MFCC F16 instance structure.
+[out] | S | points to the mfcc instance structure |
[in] | fftLen | fft length |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script that can be used to generate the filter, dct and window arrays.
++Functions | |
void | arm_mfcc_f32 (const arm_mfcc_instance_f32 *S, float32_t *pSrc, float32_t *pDst, float32_t *pTmp) |
MFCC F32. | |
arm_status | arm_mfcc_init_f32 (arm_mfcc_instance_f32 *S, uint32_t fftLen, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float32_t *filterCoefs, const float32_t *windowCoefs) |
Generic initialization of the MFCC F32 instance structure. | |
arm_status | arm_mfcc_init_32_f32 (arm_mfcc_instance_f32 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float32_t *filterCoefs, const float32_t *windowCoefs) |
Initialization of the MFCC F32 instance structure for 32 samples MFCC. | |
arm_status | arm_mfcc_init_64_f32 (arm_mfcc_instance_f32 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float32_t *filterCoefs, const float32_t *windowCoefs) |
Initialization of the MFCC F32 instance structure for 64 samples MFCC. | |
arm_status | arm_mfcc_init_128_f32 (arm_mfcc_instance_f32 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float32_t *filterCoefs, const float32_t *windowCoefs) |
Initialization of the MFCC F32 instance structure for 128 samples MFCC. | |
arm_status | arm_mfcc_init_256_f32 (arm_mfcc_instance_f32 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float32_t *filterCoefs, const float32_t *windowCoefs) |
Initialization of the MFCC F32 instance structure for 256 samples MFCC. | |
arm_status | arm_mfcc_init_512_f32 (arm_mfcc_instance_f32 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float32_t *filterCoefs, const float32_t *windowCoefs) |
Initialization of the MFCC F32 instance structure for 512 samples MFCC. | |
arm_status | arm_mfcc_init_1024_f32 (arm_mfcc_instance_f32 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float32_t *filterCoefs, const float32_t *windowCoefs) |
Initialization of the MFCC F32 instance structure for 1024 samples MFCC. | |
arm_status | arm_mfcc_init_2048_f32 (arm_mfcc_instance_f32 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float32_t *filterCoefs, const float32_t *windowCoefs) |
Initialization of the MFCC F32 instance structure for 2048 samples MFCC. | |
arm_status | arm_mfcc_init_4096_f32 (arm_mfcc_instance_f32 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const float32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const float32_t *filterCoefs, const float32_t *windowCoefs) |
Initialization of the MFCC F32 instance structure for 4096 samples MFCC. | |
void arm_mfcc_f32 | +( | +const arm_mfcc_instance_f32 * | +S, | +
+ | + | float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | float32_t * | +pTmp | +
+ | ) | ++ |
MFCC F32.
+[in] | S | points to the mfcc instance structure |
[in] | pSrc | points to the input samples |
[out] | pDst | points to the output MFCC values |
[in,out] | pTmp | points to a temporary buffer of complex |
The temporary buffer has a 2*fft length size when MFCC is implemented with CFFT. It has length FFT Length + 2 when implemented with RFFT (default implementation).
+The source buffer is modified by this function.
+ +arm_status arm_mfcc_init_1024_f32 | +( | +arm_mfcc_instance_f32 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float32_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float32_t * | +filterCoefs, | +
+ | + | const float32_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F32 instance structure for 1024 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_128_f32 | +( | +arm_mfcc_instance_f32 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float32_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float32_t * | +filterCoefs, | +
+ | + | const float32_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F32 instance structure for 128 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_2048_f32 | +( | +arm_mfcc_instance_f32 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float32_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float32_t * | +filterCoefs, | +
+ | + | const float32_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F32 instance structure for 2048 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_256_f32 | +( | +arm_mfcc_instance_f32 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float32_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float32_t * | +filterCoefs, | +
+ | + | const float32_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F32 instance structure for 256 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_32_f32 | +( | +arm_mfcc_instance_f32 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float32_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float32_t * | +filterCoefs, | +
+ | + | const float32_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F32 instance structure for 32 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_4096_f32 | +( | +arm_mfcc_instance_f32 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float32_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float32_t * | +filterCoefs, | +
+ | + | const float32_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F32 instance structure for 4096 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_512_f32 | +( | +arm_mfcc_instance_f32 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float32_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float32_t * | +filterCoefs, | +
+ | + | const float32_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F32 instance structure for 512 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_64_f32 | +( | +arm_mfcc_instance_f32 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float32_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float32_t * | +filterCoefs, | +
+ | + | const float32_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC F32 instance structure for 64 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_f32 | +( | +arm_mfcc_instance_f32 * | +S, | +
+ | + | uint32_t | +fftLen, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const float32_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const float32_t * | +filterCoefs, | +
+ | + | const float32_t * | +windowCoefs | +
+ | ) | ++ |
Generic initialization of the MFCC F32 instance structure.
+[out] | S | points to the mfcc instance structure |
[in] | fftLen | fft length |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
++Functions | |
arm_status | arm_mfcc_init_q15 (arm_mfcc_instance_q15 *S, uint32_t fftLen, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs) |
Generic initialization of the MFCC Q15 instance structure. | |
arm_status | arm_mfcc_init_32_q15 (arm_mfcc_instance_q15 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs) |
Initialization of the MFCC Q15 instance structure for 32 samples MFCC. | |
arm_status | arm_mfcc_init_64_q15 (arm_mfcc_instance_q15 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs) |
Initialization of the MFCC Q15 instance structure for 64 samples MFCC. | |
arm_status | arm_mfcc_init_128_q15 (arm_mfcc_instance_q15 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs) |
Initialization of the MFCC Q15 instance structure for 128 samples MFCC. | |
arm_status | arm_mfcc_init_256_q15 (arm_mfcc_instance_q15 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs) |
Initialization of the MFCC Q15 instance structure for 256 samples MFCC. | |
arm_status | arm_mfcc_init_512_q15 (arm_mfcc_instance_q15 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs) |
Initialization of the MFCC Q15 instance structure for 512 samples MFCC. | |
arm_status | arm_mfcc_init_1024_q15 (arm_mfcc_instance_q15 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs) |
Initialization of the MFCC Q15 instance structure for 1024 samples MFCC. | |
arm_status | arm_mfcc_init_2048_q15 (arm_mfcc_instance_q15 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs) |
Initialization of the MFCC Q15 instance structure for 2048 samples MFCC. | |
arm_status | arm_mfcc_init_4096_q15 (arm_mfcc_instance_q15 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs) |
Initialization of the MFCC Q15 instance structure for 4096 samples MFCC. | |
arm_status | arm_mfcc_q15 (const arm_mfcc_instance_q15 *S, q15_t *pSrc, q15_t *pDst, q31_t *pTmp) |
MFCC Q15. | |
arm_status arm_mfcc_init_1024_q15 | +( | +arm_mfcc_instance_q15 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q15_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q15_t * | +filterCoefs, | +
+ | + | const q15_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q15 instance structure for 1024 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_128_q15 | +( | +arm_mfcc_instance_q15 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q15_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q15_t * | +filterCoefs, | +
+ | + | const q15_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q15 instance structure for 128 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_2048_q15 | +( | +arm_mfcc_instance_q15 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q15_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q15_t * | +filterCoefs, | +
+ | + | const q15_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q15 instance structure for 2048 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_256_q15 | +( | +arm_mfcc_instance_q15 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q15_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q15_t * | +filterCoefs, | +
+ | + | const q15_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q15 instance structure for 256 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_32_q15 | +( | +arm_mfcc_instance_q15 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q15_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q15_t * | +filterCoefs, | +
+ | + | const q15_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q15 instance structure for 32 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_4096_q15 | +( | +arm_mfcc_instance_q15 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q15_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q15_t * | +filterCoefs, | +
+ | + | const q15_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q15 instance structure for 4096 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_512_q15 | +( | +arm_mfcc_instance_q15 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q15_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q15_t * | +filterCoefs, | +
+ | + | const q15_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q15 instance structure for 512 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_64_q15 | +( | +arm_mfcc_instance_q15 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q15_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q15_t * | +filterCoefs, | +
+ | + | const q15_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q15 instance structure for 64 samples MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_q15 | +( | +arm_mfcc_instance_q15 * | +S, | +
+ | + | uint32_t | +fftLen, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q15_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q15_t * | +filterCoefs, | +
+ | + | const q15_t * | +windowCoefs | +
+ | ) | ++ |
Generic initialization of the MFCC Q15 instance structure.
+[out] | S | points to the mfcc instance structure |
[in] | fftLen | fft length |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+arm_status arm_mfcc_q15 | +( | +const arm_mfcc_instance_q15 * | +S, | +
+ | + | q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | q31_t * | +pTmp | +
+ | ) | ++ |
MFCC Q15.
+[in] | S | points to the mfcc instance structure |
[in] | pSrc | points to the input samples in Q15 |
[out] | pDst | points to the output MFCC values in q8.7 format |
[in,out] | pTmp | points to a temporary buffer of complex |
The temporary buffer has a 2*fft length.
+The source buffer is modified by this function.
+The function may saturate. If the FFT length is too big and the number of MEL filters too small then the fixed point computations may saturate.
+ ++Functions | |
arm_status | arm_mfcc_init_q31 (arm_mfcc_instance_q31 *S, uint32_t fftLen, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs) |
Generic initialization of the MFCC Q31 instance structure. | |
arm_status | arm_mfcc_init_32_q31 (arm_mfcc_instance_q31 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs) |
Initialization of the MFCC Q31 instance structure for 32 sample MFCC. | |
arm_status | arm_mfcc_init_64_q31 (arm_mfcc_instance_q31 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs) |
Initialization of the MFCC Q31 instance structure for 64 sample MFCC. | |
arm_status | arm_mfcc_init_128_q31 (arm_mfcc_instance_q31 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs) |
Initialization of the MFCC Q31 instance structure for 128 sample MFCC. | |
arm_status | arm_mfcc_init_256_q31 (arm_mfcc_instance_q31 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs) |
Initialization of the MFCC Q31 instance structure for 256 sample MFCC. | |
arm_status | arm_mfcc_init_512_q31 (arm_mfcc_instance_q31 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs) |
Initialization of the MFCC Q31 instance structure for 512 sample MFCC. | |
arm_status | arm_mfcc_init_1024_q31 (arm_mfcc_instance_q31 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs) |
Initialization of the MFCC Q31 instance structure for 1024 sample MFCC. | |
arm_status | arm_mfcc_init_2048_q31 (arm_mfcc_instance_q31 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs) |
Initialization of the MFCC Q31 instance structure for 2048 sample MFCC. | |
arm_status | arm_mfcc_init_4096_q31 (arm_mfcc_instance_q31 *S, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs) |
Initialization of the MFCC Q31 instance structure for 4096 sample MFCC. | |
arm_status | arm_mfcc_q31 (const arm_mfcc_instance_q31 *S, q31_t *pSrc, q31_t *pDst, q31_t *pTmp) |
MFCC Q31. | |
arm_status arm_mfcc_init_1024_q31 | +( | +arm_mfcc_instance_q31 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q31_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q31_t * | +filterCoefs, | +
+ | + | const q31_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q31 instance structure for 1024 sample MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_128_q31 | +( | +arm_mfcc_instance_q31 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q31_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q31_t * | +filterCoefs, | +
+ | + | const q31_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q31 instance structure for 128 sample MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_2048_q31 | +( | +arm_mfcc_instance_q31 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q31_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q31_t * | +filterCoefs, | +
+ | + | const q31_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q31 instance structure for 2048 sample MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_256_q31 | +( | +arm_mfcc_instance_q31 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q31_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q31_t * | +filterCoefs, | +
+ | + | const q31_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q31 instance structure for 256 sample MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_32_q31 | +( | +arm_mfcc_instance_q31 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q31_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q31_t * | +filterCoefs, | +
+ | + | const q31_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q31 instance structure for 32 sample MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_4096_q31 | +( | +arm_mfcc_instance_q31 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q31_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q31_t * | +filterCoefs, | +
+ | + | const q31_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q31 instance structure for 4096 sample MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_512_q31 | +( | +arm_mfcc_instance_q31 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q31_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q31_t * | +filterCoefs, | +
+ | + | const q31_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q31 instance structure for 512 sample MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_64_q31 | +( | +arm_mfcc_instance_q31 * | +S, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q31_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q31_t * | +filterCoefs, | +
+ | + | const q31_t * | +windowCoefs | +
+ | ) | ++ |
Initialization of the MFCC Q31 instance structure for 64 sample MFCC.
+[out] | S | points to the mfcc instance structure |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+ +arm_status arm_mfcc_init_q31 | +( | +arm_mfcc_instance_q31 * | +S, | +
+ | + | uint32_t | +fftLen, | +
+ | + | uint32_t | +nbMelFilters, | +
+ | + | uint32_t | +nbDctOutputs, | +
+ | + | const q31_t * | +dctCoefs, | +
+ | + | const uint32_t * | +filterPos, | +
+ | + | const uint32_t * | +filterLengths, | +
+ | + | const q31_t * | +filterCoefs, | +
+ | + | const q31_t * | +windowCoefs | +
+ | ) | ++ |
Generic initialization of the MFCC Q31 instance structure.
+[out] | S | points to the mfcc instance structure |
[in] | fftLen | fft length |
[in] | nbMelFilters | number of Mel filters |
[in] | nbDctOutputs | number of Dct outputs |
[in] | dctCoefs | points to an array of DCT coefficients |
[in] | filterPos | points of the array of filter positions |
[in] | filterLengths | points to the array of filter lengths |
[in] | filterCoefs | points to the array of filter coefficients |
[in] | windowCoefs | points to the array of window coefficients |
window coefficients can describe (for instance) a Hamming window. The array has the same size as the FFT length.
+The folder Scripts is containing a Python script which can be used to generate the filter, dct and window arrays.
+arm_status arm_mfcc_q31 | +( | +const arm_mfcc_instance_q31 * | +S, | +
+ | + | q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | q31_t * | +pTmp | +
+ | ) | ++ |
MFCC Q31.
+[in] | S | points to the mfcc instance structure |
[in] | pSrc | points to the input samples in Q31 |
[out] | pDst | points to the output MFCC values in q8.23 format |
[in,out] | pTmp | points to a temporary buffer of complex |
The temporary buffer has a 2*fft length.
+The source buffer is modified by this function.
+The function may saturate. If the FFT length is too big and the number of MEL filters too small then the fixed point computations may saturate.
+ ++Functions | |
void | arm_mse_f16 (const float16_t *pSrcA, const float16_t *pSrcB, uint32_t blockSize, float16_t *result) |
Mean square error between two half floating point vectors. | |
void | arm_mse_f32 (const float32_t *pSrcA, const float32_t *pSrcB, uint32_t blockSize, float32_t *pResult) |
Mean square error between two floating point vectors. | |
void | arm_mse_f64 (const float64_t *pSrcA, const float64_t *pSrcB, uint32_t blockSize, float64_t *pResult) |
Mean square error between two double floating point vectors. | |
void | arm_mse_q15 (const q15_t *pSrcA, const q15_t *pSrcB, uint32_t blockSize, q15_t *pResult) |
Mean square error between two Q15 vectors. | |
void | arm_mse_q31 (const q31_t *pSrcA, const q31_t *pSrcB, uint32_t blockSize, q31_t *pResult) |
Mean square error between two Q31 vectors. | |
void | arm_mse_q7 (const q7_t *pSrcA, const q7_t *pSrcB, uint32_t blockSize, q7_t *pResult) |
Mean square error between two Q7 vectors. | |
Calculates the mean square error between two vectors.
+void arm_mse_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +result | +
+ | ) | ++ |
Mean square error between two half floating point vectors.
+Mean square error between two half precision float vectors.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | blockSize | number of samples in input vector |
[out] | result | mean square error |
void arm_mse_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Mean square error between two floating point vectors.
+Mean square error between two single precision float vectors.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | mean square error |
void arm_mse_f64 | +( | +const float64_t * | +pSrcA, | +
+ | + | const float64_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Mean square error between two double floating point vectors.
+Mean square error between two double precision float vectors.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | mean square error |
void arm_mse_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult | +
+ | ) | ++ |
Mean square error between two Q15 vectors.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | mean square error |
void arm_mse_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Mean square error between two Q31 vectors.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | mean square error |
void arm_mse_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult | +
+ | ) | ++ |
Mean square error between two Q7 vectors.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | mean square error |
+Functions | |
float16_t | arm_cityblock_distance_f16 (const float16_t *pA, const float16_t *pB, uint32_t blockSize) |
Cityblock (Manhattan) distance between two vectors. | |
float32_t | arm_cityblock_distance_f32 (const float32_t *pA, const float32_t *pB, uint32_t blockSize) |
Cityblock (Manhattan) distance between two vectors. | |
float64_t | arm_cityblock_distance_f64 (const float64_t *pA, const float64_t *pB, uint32_t blockSize) |
Cityblock (Manhattan) distance between two vectors. | |
Cityblock (Manhattan) distance
+float16_t arm_cityblock_distance_f16 | +( | +const float16_t * | +pA, | +
+ | + | const float16_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Cityblock (Manhattan) distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float32_t arm_cityblock_distance_f32 | +( | +const float32_t * | +pA, | +
+ | + | const float32_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Cityblock (Manhattan) distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float64_t arm_cityblock_distance_f64 | +( | +const float64_t * | +pA, | +
+ | + | const float64_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Cityblock (Manhattan) distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
+Data Structures | |
struct | _Outer< LHS, RHS, DerivedOp > |
Outer product operator for expressions. More... | |
struct | Slice |
Slice. More... | |
struct | Matrix< P, R, C, Allocator > |
Matrix. More... | |
struct | Matrix< P, DYNAMIC, DYNAMIC, Allocator > |
Matrix. More... | |
struct | MatrixView< T, S > |
Matrix. More... | |
struct | MatrixView< T, DYNAMIC > |
Dynamic Matrix View. More... | |
struct | MatrixView< T, CONSTRAINED_DYNAMIC > |
Dynamic Matrix View. More... | |
+Functions | |
template<typename VA , typename VB , typename std::enable_if< vector_idx_pair< VA, VB >(), bool >::type = true> | |
auto | outer (const VA &a, const VB &b) |
Outer product. | |
struct arm_cmsis_dsp::_Outer | +
Outer product operator for expressions.
+LHS | Left hand side datatype |
RHS | Right hand side datatype |
DerivedOp | Operator for the Outer operation |
vector op
vector (including matrix)
Public Types | |
+using | Scalar = typename traits< LHS >::Scalar |
Type of vector elements. | |
+using | Vector = typename traits< LHS >::Vector |
Type of vector in the architecture. | |
Public Member Functions | |
_Outer (const LHS &lhs, const RHS &rhs, const _BinaryOperator< Scalar, DerivedOp > &op) | |
Create an Outer operator. | |
_Outer (const _Outer &other) | |
Create an Outer operator from another operator of same type. | |
_Outer (_Outer &&other) | |
Move semantic for _Outer operator. | |
template<typename R = RHS, typename L = LHS, typename std::enable_if< IsVector< L >::value &&IsVector< R >::value, bool >::type = true> | |
vector_length_t | length () const |
Length of the matrix (seen as vector) resulting from the outer operator. | |
template<typename R = RHS, typename L = LHS, typename std::enable_if< IsVector< L >::value, bool >::type = true> | |
vector_length_t | rows () const |
Rows of the matrix. | |
template<typename R = RHS, typename L = LHS, typename std::enable_if< IsVector< R >::value, bool >::type = true> | |
vector_length_t | columns () const |
Columns of the matrix. | |
template<typename R = RHS, typename L = LHS, typename std::enable_if< IsVector< L >::value &&IsVector< R >::value, bool >::type = true> | |
Scalar const | operator() (const index_t r, const index_t c) const |
Expression value at given position. | |
template<typename R = RHS, typename L = LHS, typename std::enable_if< IsVector< L >::value &&IsVector< R >::value, bool >::type = true> | |
Vector const | matrix_op (const index_t r, const index_t c) const |
Expression vector value at given position. | |
template<typename R = RHS, typename L = LHS, typename std::enable_if< IsVector< L >::value &&IsVector< R >::value, bool >::type = true> | |
Vector const | matrix_op_tail (const index_t r, const index_t c, const vector_length_t remaining) const |
Expression vector value at given position with tail predication. | |
Public Member Functions inherited from _Expr< _Outer< LHS, RHS, DerivedOp > > | |
_Outer< LHS, RHS, DerivedOp > & | derived () |
Derived datatype. | |
_Outer< LHS, RHS, DerivedOp > const & | derived () const |
Derived datatype. | |
Scalar const | operator[] (const index_t i) const |
Vector indexing in the expression. | |
Scalar const | operator() (const index_t r, const index_t c) const |
Matrix indexing. | |
Vector const | vector_op (const index_t i) const |
Vector operation at given index. | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index with loop predicate. | |
Vector const | matrix_op (const index_t r, const index_t c) const |
Matrix operation at index. | |
Vector const | matrix_op_tail (const index_t r, const index_t c, const vector_length_t remaining) const |
Matrix operation at index with tail predication. | |
vector_length_t | length () const |
Length of result. | |
vector_length_t | rows () const |
Number of rows for result. | |
vector_length_t | columns () const |
Number of columns for result. | |
+
|
+ +inline | +
Create an Outer operator.
+lhs | Left hand side expression |
rhs | Right hand side expression |
op | operator |
Create an Outer operator from another operator of same type.
+other | the other operator |
Move semantic for _Outer operator.
+other | the other operator |
+
|
+ +inline | +
Columns of the matrix.
+R | Right hand side datatype |
L | Left hand side datatype |
+
|
+ +inline | +
Length of the matrix (seen as vector) resulting from the outer operator.
+R | Right hand side datatype |
L | Left hand side datatype |
+
|
+ +inline | +
Expression vector value at given position with tail predication.
+R | Right hand side datatype |
L | Left hand side datatype |
r | row index |
c | column index |
remaining | remaining number of samples in loop |
+
|
+ +inline | +
Expression value at given position.
+R | Right hand side datatype |
L | Left hand side datatype |
r | row index |
c | column index |
+
|
+ +inline | +
Rows of the matrix.
+R | Right hand side datatype |
L | Left hand side datatype |
struct arm_cmsis_dsp::Slice | +
struct arm_cmsis_dsp::Matrix | +
P | Type of the scalar |
R | Number of rows |
C | Number of columns |
Allocator | Memory allocator |
Public Types | |
+using | VectorType = typename vector_traits< P >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Types inherited from Vector< P, L, Allocator > | |
+using | element_type = P |
Type of vector elements. | |
Public Types inherited from Vector_Base< P > | |
+typedef P | element_type |
Type of vector elements. | |
+using | Vector = typename vector_traits< P >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Member Functions | |
constexpr vector_length_t | rows () const |
Number of rows. | |
constexpr vector_length_t | columns () const |
Number of columns. | |
constexpr uint32_t | stride () const |
Number of stride. | |
+ | Matrix () |
Create matrix. | |
Matrix (P init_val) | |
Create matrix. | |
template<template< int > typename OtherAllocator> | |
Matrix (const Matrix< P, R, C, OtherAllocator > &other) | |
Create matrix from another matrix using different memory allocator. | |
template<typename Derived , typename std::enable_if< IsVector< Derived >::value, bool >::type = true> | |
Matrix (const _Expr< Derived > &other) | |
Create matrix from expression. | |
template<typename Derived , typename std::enable_if< must_use_matrix_idx< Derived >(), bool >::type = true> | |
Matrix (const _Expr< Derived > &other) | |
Create matrix from expression. | |
template<typename Derived , typename std::enable_if< IsVector< Derived >::value, bool >::type = true> | |
Matrix & | operator= (const _Expr< Derived > &other) |
Assign matrix from expression. | |
template<typename Derived , typename std::enable_if< must_use_matrix_idx< Derived >(), bool >::type = true> | |
Matrix & | operator= (const _Expr< Derived > &other) |
Assign matrix from expression. | |
MatrixView< P, C > | sub (const index_t rs, const index_t cs) |
Create a matrix view. | |
const MatrixView< P, C > | sub (const index_t rs, const index_t cs) const |
Create a constant matrix view. | |
MatrixView< P, C > | sub (const Slice &rs, const index_t cs) |
Create a matrix view. | |
const MatrixView< P, C > | sub (const Slice &rs, const index_t cs) const |
Create a constant matrix view. | |
MatrixView< P, C > | sub (const index_t rs, const Slice &cs) |
Create a matrix view. | |
const MatrixView< P, C > | sub (const index_t rs, const Slice &cs) const |
Create a constant matrix view. | |
MatrixView< P, C > | sub (const Slice &rs, const Slice &cs) |
Create a matrix view. | |
const MatrixView< P, C > | sub (const Slice &rs, const Slice &cs) const |
Create a constant matrix view. | |
MatrixView< P, C > | sub (const index_t rs, const index_t re, const index_t cs, const index_t ce) |
Create a matrix view. | |
const MatrixView< P, C > | sub (const index_t rs, const index_t re, const index_t cs, const index_t ce) const |
Create a constant matrix view. | |
P & | operator() (const index_t r, const index_t c) |
Access matrix element at given position. | |
P & | operator() (const index_t r, const index_t c) const |
Access matrix element at given position. | |
template<int S = 1> | |
VectorView< P, S > | row (const index_t i, const index_t start=0, const index_t stop=C) |
Create a row view vector with stride. | |
template<int S = 1> | |
const VectorView< P, S > | row (const index_t i, const index_t start=0, const index_t stop=C) const |
Create a constant row view vector with stride. | |
template<int CS = 1, int S = C> | |
VectorView< P, CS *S > | col (const index_t i, const index_t start=0, const index_t stop=R) |
Create a column view vector with stride. | |
template<int CS = 1, int S = C> | |
const VectorView< P, CS *S > | col (const index_t i, const index_t start=0, const index_t stop=R) const |
Create a constant column view vector with stride. | |
template<int RA = R, int CA = C, typename VA , typename std::enable_if< IsVector< VA >::value &&(RA==CA) &&(RA >0) &&SameElementType< VA, P >::value, bool >::type = true> | |
void | fill_diagonal (const VA &a) |
Fill diagonal of a matrix with a vector. | |
Matrix< P, R, C, Allocator > | create () const |
Create a matrix of same type. | |
Matrix< P, C, R, Allocator > | transpose () const |
Create the transposed matrix. | |
void | matrix_store (const index_t row, const index_t col, const VectorType val) const |
Vector store at a given row,column position | |
void | matrix_store_tail (const index_t row, const index_t col, const vector_length_t remaining, const VectorType val) const |
Vector store at a given row,column position with predicated tail | |
VectorType const | matrix_op_tail (const index_t row, const index_t col, const vector_length_t remaining) const |
Vector operation at a given row,column position with predicated tail | |
VectorType const | matrix_op (const index_t row, const index_t col) const |
Vector operation at a given row,column position | |
Public Member Functions inherited from Vector< P, L, Allocator > | |
Vector () | |
Construct a new vector. | |
Vector (P init_val) | |
Construct a new vector and initialize it. | |
Vector (const std::initializer_list< P > &l) | |
Construct a new vector and initialize it with a list. | |
template<template< int > typename OtherAllocator> | |
Vector (const Vector< P, L, OtherAllocator > &other) | |
Create a vector from a vector using a different memory allocator. | |
template<int S> | |
Vector (const VectorView< P, S > &other) | |
Create a vector from a VectorView. | |
template<typename Derived > | |
Vector (const _Expr< Derived > &other) | |
Create a vector from an expression. | |
template<typename Derived > | |
Vector & | operator= (const _Expr< Derived > &other) |
Copy result of an expression to a vector content. | |
template<typename T , typename std::enable_if< is_scalar< T >(), bool >::type = true> | |
Vector & | operator= (const T other) |
Fill a vector with a constant. | |
template<typename Derived > | |
Vector & | operator+= (const _Expr< Derived > &other) |
Elementwise add the result of an expression to a vector. | |
Vector & | operator+= (const Vector &other) |
Elementwise add vector to another vector. | |
Vector & | operator+= (const P other) |
Elementwise add a constant to a vector. | |
template<typename Derived > | |
Vector & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract the result of an expression from a vector. | |
Vector & | operator-= (const Vector &other) |
Elementwise subtract a vector from a vector. | |
Vector & | operator-= (const P other) |
Elementwise subtract a constant from a vector. | |
template<typename Derived > | |
Vector & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply the result of an expression with a vector. | |
Vector & | operator*= (const Vector &other) |
Elementwise multiply a vector with a vector. | |
Vector & | operator*= (const P other) |
Elementwise multiply a constant with a vector. | |
template<int S = 1> | |
VectorView< P, S > | sub (const index_t start=0, const index_t stop=L) |
Create a vector view. | |
Public Member Functions inherited from Vector_Base< P > | |
vector_length_t | length () const |
Vector dimension. | |
P * | ptr () const |
Pointer to storage buffer. | |
P * | ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
const P * | const_ptr () const |
Pointer to storage buffer. | |
const P * | const_ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
P * | begin () const |
Iterator begin. | |
P * | end () const |
Iterator end. | |
P & | operator[] (const index_t i) |
Element at index i. | |
P & | operator[] (const index_t i) const |
Element at index i. | |
template<typename T = P, typename std::enable_if< vector_traits< T >::has_vector, bool >::type = true> | |
void | vector_store (const index_t i, const Vector val) const |
Vector store at index i | |
void | vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) const |
Vector store at index i with predicated tail | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index i with predicated tail | |
Vector const | vector_op (const index_t i) const |
Vector operation at index i | |
Static Public Member Functions | |
template<int RA = R, int CA = C, typename VA , typename std::enable_if< IsVector< VA >::value &&(RA==CA) &&(RA >0) &&SameElementType< VA, P >::value, bool >::type = true> | |
static Matrix< P, RA, CA, Allocator > | diagonal (const VA &a) |
Create a diagonal matrix. | |
template<int RA = R, int CA = C, typename std::enable_if<(RA==CA) &&(RA >0), bool >::type = true> | |
static Matrix< P, RA, CA, Allocator > | identity () |
Create an identity matrix. | |
Static Public Member Functions inherited from Vector< P, L, Allocator > | |
static char * | allocate () |
Allocate a buffer for this vector using the memory allocator. | |
+Additional Inherited Members | |
Static Public Attributes inherited from Vector< P, L, Allocator > | |
+static constexpr vector_length_t | vector_size = sizeof(P)*L |
Length of the vector when known at build time. | |
+
|
+ +inlineexplicit | +
Create matrix.
+init_val | Initialization value |
+
|
+ +inlineexplicit | +
Create matrix from another matrix using different memory allocator.
+OtherAllocator | other memory allocator |
other | Other matrix |
Create matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Other matrix |
Only applies when the expression does not contain any MatrixView since matrix view may have a stride and cannot be used as vectors.
+ +Create matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Other matrix |
Applies when contain a matrix view that has a stride and thus force a 2D evaluation loop.
+ +
+
|
+ +inline | +
Create a column view vector with stride.
+S | stride |
i | column index |
start | Start index in row |
stop | Stop index in row Default is number of rows |
+
|
+ +inline | +
Create a constant column view vector with stride.
+S | stride |
i | column index |
start | Start index in row |
stop | Stop index in row Default is number of rows |
+
|
+ +inlineconstexpr | +
Number of columns.
+
+
|
+ +inline | +
Create a matrix of same type.
+
+
|
+ +inlinestatic | +
+
|
+ +inline | +
+
|
+ +inlinestatic | +
Create an identity matrix.
+RA | Number of rows |
CA | Number of columns |
Only exists when RA == CA and the size is known at built time
+ +
+
|
+ +inline | +
Vector operation at a given row,column position
+row | row index |
col | column index |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype
+ +
+
|
+ +inline | +
Vector operation at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Vector store at a given row,column position
+row | row index |
col | column index |
val | Vector value |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column in this matrix.
+ +
+
|
+ +inline | +
Vector store at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
val | Vector value to write at index i with tail predication |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Access matrix element at given position.
+r | Row index |
c | Column index |
+
|
+ +inline | +
Access matrix element at given position.
+r | Row index |
c | Column index |
Assign matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Other matrix |
Applies when expression does not contain matrix view
+ +Assign matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Other matrix |
Applies when contain a matrix view that has a stride and thus force a 2D evaluation loop.
+ +
+
|
+ +inline | +
Create a row view vector with stride.
+S | stride |
i | row index |
start | Start index in row |
stop | Stop index in row Default is number of columns |
+
|
+ +inline | +
Create a constant row view vector with stride.
+S | stride |
i | row index |
start | Start index in row |
stop | Stop index in row Default is number of columns |
+
|
+ +inlineconstexpr | +
Number of rows.
+
+
|
+ +inlineconstexpr | +
Number of stride.
+
+
|
+ +inline | +
Create a matrix view.
+rs | start row |
cs | start column |
+
|
+ +inline | +
Create a constant matrix view.
+rs | start row |
cs | start column |
+
|
+ +inline | +
Create a matrix view.
+rs | Row start |
re | Row end |
cs | Column start |
ce | Column end |
+
|
+ +inline | +
Create a constant matrix view.
+rs | Row start |
re | Row end |
cs | Column start |
ce | Column end |
+
|
+ +inline | +
Create a matrix view.
+rs | Row start index |
cs | Column slice |
+
|
+ +inline | +
Create a constant matrix view.
+rs | Row start index |
cs | Column slice |
+
|
+ +inline | +
Create a matrix view.
+rs | Row slice (start and end row) |
cs | start column |
+
|
+ +inline | +
Create a constant matrix view.
+rs | Row slice (start and end row) |
cs | start column |
+
|
+ +inline | +
Create a matrix view.
+rs | Row slice |
cs | Column slice |
+
|
+ +inline | +
Create a constant matrix view.
+rs | Row slice |
cs | Column slice |
+
|
+ +inline | +
Create the transposed matrix.
+struct arm_cmsis_dsp::Matrix< P, DYNAMIC, DYNAMIC, Allocator > | +
P | Type of the scalar |
Allocator | Memory allocator |
Public Types | |
+using | VectorType = typename vector_traits< P >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Types inherited from Vector_Base< P > | |
+typedef P | element_type |
Type of vector elements. | |
+using | Vector = typename vector_traits< P >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Member Functions | |
vector_length_t | rows () const |
Number of rows. | |
vector_length_t | columns () const |
Number of columns. | |
uint32_t | stride () const |
Number of stride. | |
Matrix (vector_length_t r, vector_length_t c) | |
Create matrix. | |
Matrix (vector_length_t r, vector_length_t c, P init_val) | |
Create matrix. | |
P & | operator() (const index_t r, const index_t c) |
Access matrix element at given position. | |
P & | operator() (const index_t r, const index_t c) const |
Access matrix element at given position. | |
template<int RK, int CK, template< int > typename OtherAllocator> | |
Matrix (const Matrix< P, RK, CK, OtherAllocator > &other) | |
Create matrix from another matrix using different memory allocator. | |
template<typename Derived , typename std::enable_if< IsVector< Derived >::value, bool >::type = true> | |
Matrix (const _Expr< Derived > &other) | |
Create matrix from expression. | |
template<typename Derived , typename std::enable_if< must_use_matrix_idx< Derived >(), bool >::type = true> | |
Matrix (const _Expr< Derived > &other) | |
Create matrix from expression. | |
template<typename Derived , typename std::enable_if< IsVector< Derived >::value, bool >::type = true> | |
Matrix & | operator= (const _Expr< Derived > &other) |
Assign matrix from expression. | |
template<typename Derived , typename std::enable_if< must_use_matrix_idx< Derived >(), bool >::type = true> | |
Matrix & | operator= (const _Expr< Derived > &other) |
Assign matrix from expression. | |
template<typename VA , typename std::enable_if< IsVector< VA >::value &&SameElementType< VA, P >::value, bool >::type = true> | |
void | fill_diagonal (const VA &a) |
Fill diagonal of a matrix with a vector. | |
Matrix< P, DYNAMIC, DYNAMIC, Allocator > | create () const |
Create a matrix of same type. | |
Matrix< P, DYNAMIC, DYNAMIC, Allocator > | transpose () const |
Create the transposed matrix. | |
VectorView< P, 1 > | row (const index_t i, const index_t start=0) |
Create a row view with stride 1. | |
VectorView< P, 1 > | row (const index_t i, const index_t start, const index_t stop) |
Create a row view with stride 1. | |
const VectorView< P, 1 > | row (const index_t i, const index_t start=0) const |
Create a constant row view with stride 1. | |
const VectorView< P, 1 > | row (const index_t i, const index_t start, const index_t stop) const |
Create a constant row view with stride 1. | |
template<int CS = 1> | |
VectorView< P, DYNAMIC > | col (const index_t i, const index_t start=0) |
Create a column view vector. | |
template<int CS = 1> | |
VectorView< P, DYNAMIC > | col (const index_t i, const index_t start, const index_t stop) |
Create a column view vector. | |
template<int CS = 1> | |
const VectorView< P, DYNAMIC > | col (const index_t i, const index_t start=0) const |
Create a constant column view vector. | |
template<int CS = 1> | |
const VectorView< P, DYNAMIC > | col (const index_t i, const index_t start, const index_t stop) const |
Create a constant column view vector. | |
void | matrix_store (const index_t row, const index_t col, const VectorType val) const |
Vector store at a given row,column position | |
void | matrix_store_tail (const index_t row, const index_t col, const vector_length_t remaining, const VectorType val) const |
Vector store at a given row,column position with predicated tail | |
VectorType const | matrix_op_tail (const index_t row, const index_t col, const vector_length_t remaining) const |
Vector operation at a given row,column position with predicated tail | |
VectorType const | matrix_op (const index_t row, const index_t col) const |
Vector operation at a given row,column position | |
MatrixView< P, DYNAMIC > | sub (const index_t rs, const index_t cs) |
Create a matrix view. | |
const MatrixView< P, DYNAMIC > | sub (const index_t rs, const index_t cs) const |
Create a constant matrix view. | |
MatrixView< P, DYNAMIC > | sub (const Slice &rs, const index_t cs) |
Create a matrix view. | |
const MatrixView< P, DYNAMIC > | sub (const Slice &rs, const index_t cs) const |
Create a constant matrix view. | |
MatrixView< P, DYNAMIC > | sub (const index_t rs, const Slice &cs) |
Create a matrix view. | |
const MatrixView< P, DYNAMIC > | sub (const index_t rs, const Slice &cs) const |
Create a constant matrix view. | |
MatrixView< P, DYNAMIC > | sub (const Slice &rs, const Slice &cs) |
Create a matrix view. | |
const MatrixView< P, DYNAMIC > | sub (const Slice &rs, const Slice &cs) const |
Create a constant matrix view. | |
MatrixView< P, DYNAMIC > | sub (const index_t rs, const index_t re, const index_t cs, const index_t ce) |
Create a matrix view. | |
const MatrixView< P, DYNAMIC > | sub (const index_t rs, const index_t re, const index_t cs, const index_t ce) const |
Create a constant matrix view. | |
Public Member Functions inherited from Vector< P, DYNAMIC, Allocator > | |
Vector (vector_length_t length, P init_val) | |
Create a new vector. | |
Vector (vector_length_t length) | |
Create a new vector. | |
Vector (const std::initializer_list< P > &l) | |
Create a new vector. | |
template<int K, template< int > typename OtherAllocator> | |
Vector (const Vector< P, K, OtherAllocator > &other) | |
Create a new vector from a vector using a different memory allocator. | |
Vector (const Vector &other) | |
Create a new vector from a vector of same type. | |
template<int S> | |
Vector (const VectorView< P, S > &other) | |
Create a new vector from a vector view. | |
template<typename Derived > | |
Vector (const _Expr< Derived > &other) | |
Create a new vector from an expressipn. | |
template<typename Derived > | |
Vector & | operator= (const _Expr< Derived > &other) |
Fill a vector with an expression. | |
template<typename T , typename std::enable_if< is_scalar< T >(), bool >::type = true> | |
Vector & | operator= (const T other) |
Fill a vector with a scalar. | |
template<typename Derived > | |
Vector & | operator+= (const _Expr< Derived > &other) |
Elementwise add an expression to a vector. | |
Vector & | operator+= (const Vector &other) |
Elementwise add a vector to a vector. | |
Vector & | operator+= (const P other) |
Elementwise add a scalar to a vector. | |
template<typename Derived > | |
Vector & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract an expression to a vector. | |
Vector & | operator-= (const Vector &other) |
Elementwise subtract a vector to a vector. | |
Vector & | operator-= (const P other) |
Elementwise subtract a scalar to a vector. | |
template<typename Derived > | |
Vector & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply an expression with a vector. | |
Vector & | operator*= (const Vector &other) |
Elementwise multiply a vector with a vector. | |
Vector & | operator*= (const P other) |
Elementwise multiply a scalar with a vector. | |
template<int S = 1> | |
VectorView< P, S > | sub (const index_t start=0, const index_t stop=-1) |
Create a vector view. | |
Public Member Functions inherited from Vector_Base< P > | |
vector_length_t | length () const |
Vector dimension. | |
P * | ptr () const |
Pointer to storage buffer. | |
P * | ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
const P * | const_ptr () const |
Pointer to storage buffer. | |
const P * | const_ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
P * | begin () const |
Iterator begin. | |
P * | end () const |
Iterator end. | |
P & | operator[] (const index_t i) |
Element at index i. | |
P & | operator[] (const index_t i) const |
Element at index i. | |
template<typename T = P, typename std::enable_if< vector_traits< T >::has_vector, bool >::type = true> | |
void | vector_store (const index_t i, const Vector val) const |
Vector store at index i | |
void | vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) const |
Vector store at index i with predicated tail | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index i with predicated tail | |
Vector const | vector_op (const index_t i) const |
Vector operation at index i | |
Static Public Member Functions | |
template<typename VA , typename std::enable_if< IsVector< VA >::value &&SameElementType< VA, P >::value, bool >::type = true> | |
static Matrix< P, DYNAMIC, DYNAMIC, Allocator > | diagonal (const VA &a) |
Create a diagonal matrix. | |
static Matrix< P, DYNAMIC, DYNAMIC, Allocator > | identity (const vector_length_t l) |
Create an identity matrix. | |
Static Public Member Functions inherited from Vector< P, DYNAMIC, Allocator > | |
static char * | allocate (vector_length_t length) |
Allocate a buffer for this vector using the memory allocator. | |
+
|
+ +inlineexplicit | +
Create matrix.
+r | number of rows |
c | number of columns |
+
|
+ +inlineexplicit | +
Create matrix.
+r | number of rows |
c | number of columns |
init_val | Initialization value |
+
|
+ +inlineexplicit | +
Create matrix from another matrix using different memory allocator.
+RK | Number of rows |
CK | Number of columns |
OtherAllocator | other memory allocator |
other | Other matrix |
Create matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Other matrix |
Only applies when the expression does not contain any MatrixView since matrix view may have a stride and cannot be used as vectors.
+ +Create matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Other matrix |
Applies when contain a matrix view that has a stride and thus force a 2D evaluation loop.
+ +
+
|
+ +inline | +
Create a column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
stop | Stop index in column |
+
|
+ +inline | +
Create a constant column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
stop | Stop index in column |
+
|
+ +inline | +
Create a column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
+
|
+ +inline | +
Create a constant column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
+
|
+ +inline | +
Number of columns.
+Create a matrix of same type.
+
+
|
+ +inline | +
+
|
+ +inlinestatic | +
+
|
+ +inline | +
Vector operation at a given row,column position
+row | row index |
col | column index |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype
+ +
+
|
+ +inline | +
Vector operation at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Vector store at a given row,column position
+row | row index |
col | column index |
val | Vector value |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column in this matrix.
+ +
+
|
+ +inline | +
Vector store at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
val | Vector value to write at index i with tail predication |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Access matrix element at given position.
+r | Row index |
c | Column index |
+
|
+ +inline | +
Access matrix element at given position.
+r | Row index |
c | Column index |
Assign matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Other matrix |
Applies when expression does not contain matrix view
+ +Assign matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Other matrix |
Applies when contain a matrix view that has a stride and thus force a 2D evaluation loop.
+ +
+
|
+ +inline | +
Create a row view with stride 1.
+i | row index |
start | Start index in row |
stop | Stop index in row |
+
|
+ +inline | +
Create a constant row view with stride 1.
+i | row index |
start | Start index in row |
stop | Stop index in row |
+
|
+ +inline | +
Create a row view with stride 1.
+i | row index |
start | Start index in row |
+
|
+ +inline | +
Create a constant row view with stride 1.
+i | row index |
start | Start index in row |
+
|
+ +inline | +
Number of rows.
+
+
|
+ +inline | +
Number of stride.
+
+
|
+ +inline | +
Create a matrix view.
+rs | start row |
cs | start column |
+
|
+ +inline | +
Create a constant matrix view.
+rs | start row |
cs | start column |
+
|
+ +inline | +
Create a matrix view.
+rs | Row start |
re | Row end |
cs | Column start |
ce | Column end |
+
|
+ +inline | +
Create a constant matrix view.
+rs | Row start |
re | Row end |
cs | Column start |
ce | Column end |
+
|
+ +inline | +
Create a matrix view.
+rs | Row start index |
cs | Column slice |
+
|
+ +inline | +
Create a constant matrix view.
+rs | Row start index |
cs | Column slice |
+
|
+ +inline | +
Create a matrix view.
+rs | Row slice (start and end row) |
cs | start column |
+
|
+ +inline | +
Create a constant matrix view.
+rs | Row slice (start and end row) |
cs | start column |
+
|
+ +inline | +
Create a matrix view.
+rs | Row slice |
cs | Column slice |
+
|
+ +inline | +
Create a constant matrix view.
+rs | Row slice |
cs | Column slice |
struct arm_cmsis_dsp::MatrixView | +
T | Type of the scalar |
S | Stride |
Public Types | |
+using | VectorType = typename vector_traits< T >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Member Functions | |
vector_length_t | rows () const |
Number of rows. | |
vector_length_t | columns () const |
Number of columns. | |
constexpr uint32_t | stride () const |
Number of stride. | |
MatrixView (T *v, const vector_length_t rows, const vector_length_t cols) | |
Create matrix view on a buffer (buffer not owned by the view) | |
MatrixView (const Vector_Base< T > &v, const vector_length_t rows, const vector_length_t cols) | |
Create matrix view on vector (vector not owned by the view) | |
T & | operator() (const index_t r, const index_t c) |
Access matrix view element at given position. | |
T const | operator() (const index_t r, const index_t c) const |
Access matrix view element at given position. | |
template<typename Derived > | |
MatrixView & | operator= (const _Expr< Derived > &other) |
Assign matrix from expression. | |
MatrixView & | operator= (const T val) |
Assign matrix view from constant. | |
template<typename Derived > | |
MatrixView & | operator+= (const _Expr< Derived > &other) |
Add matrix from expression. | |
MatrixView & | operator+= (const MatrixView &other) |
Add matrix from matrix view. | |
MatrixView & | operator+= (const T other) |
Add constant to matrix view. | |
template<typename Derived > | |
MatrixView & | operator-= (const _Expr< Derived > &other) |
Subtract matrix from expression. | |
MatrixView & | operator-= (const MatrixView &other) |
Subtract matrix view. | |
MatrixView & | operator-= (const T other) |
Subtract constant. | |
template<typename Derived > | |
MatrixView & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply matrix view with expression. | |
MatrixView & | operator*= (const MatrixView &other) |
Elementwise multiply matrix view with matrix view. | |
MatrixView & | operator*= (const T other) |
Elementwise multiply matrix view constant. | |
VectorView< T, 1 > | row (const index_t i, const index_t start=0) |
Create a row view with stride 1. | |
VectorView< T, 1 > | row (const index_t i, const index_t start, const index_t stop) |
Create a row view with stride 1. | |
const VectorView< T, 1 > | row (const index_t i, const index_t start=0) const |
Create a constant row view with stride 1. | |
const VectorView< T, 1 > | row (const index_t i, const index_t start, const index_t stop) const |
Create a constant row view with stride 1. | |
template<int CS = 1> | |
VectorView< T, CS *S > | col (const index_t i, const index_t start=0) |
Create a column view vector. | |
template<int CS = 1> | |
VectorView< T, CS *S > | col (const index_t i, const index_t start, const index_t stop) |
Create a column view vector. | |
template<int CS = 1> | |
const VectorView< T, CS *S > | col (const index_t i, const index_t start=0) const |
Create a constant column view vector. | |
template<int CS = 1> | |
const VectorView< T, CS *S > | col (const index_t i, const index_t start, const index_t stop) const |
Create a constant column view vector. | |
void | matrix_store (const index_t row, const index_t col, const VectorType val) const |
Vector store at a given row,column position | |
void | matrix_store_tail (const index_t row, const index_t col, const vector_length_t remaining, const VectorType val) const |
Vector store at a given row,column position with predicated tail | |
VectorType const | matrix_op_tail (const index_t row, const index_t col, const vector_length_t remaining) const |
Vector operation at a given row,column position with predicated tail | |
VectorType const | matrix_op (const index_t row, const index_t col) const |
Vector operation at a given row,column position | |
template<typename VA , typename std::enable_if< IsVector< VA >::value &&SameElementType< VA, T >::value, bool >::type = true> | |
void | fill_diagonal (const VA &a) |
Fill diagonal of a matrix with a vector. | |
Matrix< T, DYNAMIC, DYNAMIC, malloc_allocator > | transpose () const |
Create the transposed matrix. | |
Matrix< T, DYNAMIC, DYNAMIC, malloc_allocator > | create () const |
Create a matrix of same type. | |
T * | ptr () const |
Pointer to storage buffer. | |
const T * | const_ptr () const |
Constant pointer to storage buffer. | |
+
|
+ +inlineexplicit | +
Create matrix view on a buffer (buffer not owned by the view)
+v | buffer |
rows | number of rows |
cols | number of columns |
+
|
+ +inlineexplicit | +
Create matrix view on vector (vector not owned by the view)
+v | vector |
rows | number of rows |
cols | number of columns |
+
|
+ +inline | +
Create a column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
stop | Stop index in column |
+
|
+ +inline | +
Create a constant column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
stop | Stop index in column |
+
|
+ +inline | +
Create a column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
+
|
+ +inline | +
Create a constant column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
+
|
+ +inline | +
Number of columns.
+
+
|
+ +inline | +
Constant pointer to storage buffer.
+
+
|
+ +inline | +
Create a matrix of same type.
+
+
|
+ +inline | +
+
|
+ +inline | +
Vector operation at a given row,column position
+row | row index |
col | column index |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype
+ +
+
|
+ +inline | +
Vector operation at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Vector store at a given row,column position
+row | row index |
col | column index |
val | Vector value |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column in this matrix.
+ +
+
|
+ +inline | +
Vector store at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
val | Vector value to write at index i with tail predication |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Access matrix view element at given position.
+r | Row index |
c | Column index |
+
|
+ +inline | +
Access matrix view element at given position.
+r | Row index |
c | Column index |
+
|
+ +inline | +
Elementwise multiply matrix view with expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | expression |
+
|
+ +inline | +
Elementwise multiply matrix view with matrix view.
+other | Other matrix |
+
|
+ +inline | +
Elementwise multiply matrix view constant.
+other | constant |
+
|
+ +inline | +
Add matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Expression |
+
|
+ +inline | +
Add matrix from matrix view.
+other | Other matrix |
+
|
+ +inline | +
Add constant to matrix view.
+other | The constant |
+
|
+ +inline | +
Subtract matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | expression |
+
|
+ +inline | +
Subtract matrix view.
+other | Other matrix view |
+
|
+ +inline | +
Subtract constant.
+other | Other matrix |
+
|
+ +inline | +
Assign matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Expression |
+
|
+ +inline | +
Assign matrix view from constant.
+val | The constant |
+
|
+ +inline | +
Pointer to storage buffer.
+
+
|
+ +inline | +
Create a row view with stride 1.
+i | row index |
start | Start index in row |
stop | Stop index in row |
+
|
+ +inline | +
Create a constant row view with stride 1.
+i | row index |
start | Start index in row |
stop | Stop index in row |
+
|
+ +inline | +
Create a row view with stride 1.
+i | row index |
start | Start index in row |
+
|
+ +inline | +
Create a constant row view with stride 1.
+i | row index |
start | Start index in row |
+
|
+ +inline | +
Number of rows.
+
+
|
+ +inlineconstexpr | +
Number of stride.
+
+
|
+ +inline | +
Create the transposed matrix.
+struct arm_cmsis_dsp::MatrixView< T, DYNAMIC > | +
Dynamic Matrix View.
+T | Type of the scalar |
This template is used for dynamic matrix (stride not known at build time) and when we do not know if stride == number of columns. When stride is different from number of columns, the matrix cannot be seen as a vector.
+Public Types | |
+using | VectorType = typename vector_traits< T >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Member Functions | |
vector_length_t | rows () const |
Number of rows. | |
vector_length_t | columns () const |
Number of columns. | |
uint32_t | stride () const |
Number of stride. | |
MatrixView (T *v, const vector_length_t rows, const vector_length_t cols, const uint32_t stride) | |
Create matrix view on a buffer (buffer not owned by the view) | |
MatrixView (const Vector_Base< T > &v, const vector_length_t rows, const vector_length_t cols, const uint32_t stride) | |
Create matrix view on vector (vector not owned by the view) | |
T & | operator() (const index_t r, const index_t c) |
Access matrix view element at given position. | |
T const | operator() (const index_t r, const index_t c) const |
Access matrix view element at given position. | |
template<typename Derived > | |
MatrixView & | operator= (const _Expr< Derived > &other) |
Assign matrix view from expression. | |
MatrixView & | operator= (const T val) |
Assign matrix view from constant. | |
template<typename Derived > | |
MatrixView & | operator+= (const _Expr< Derived > &other) |
Add matrix from expression. | |
MatrixView & | operator+= (const MatrixView &other) |
Add matrix from matrix view. | |
MatrixView & | operator+= (const T other) |
Add constant to matrix view. | |
template<typename Derived > | |
MatrixView & | operator-= (const _Expr< Derived > &other) |
Subtract matrix from expression. | |
MatrixView & | operator-= (const MatrixView &other) |
Subtract matrix view. | |
MatrixView & | operator-= (const T other) |
Subtract constant. | |
template<typename Derived > | |
MatrixView & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply matrix view with expression. | |
MatrixView & | operator*= (const MatrixView &other) |
Elementwise multiply matrix view with matrix view. | |
MatrixView & | operator*= (const T other) |
Elementwise multiply matrix view constant. | |
VectorView< T, 1 > | row (const index_t i, const index_t start=0) |
Create a row view with stride 1. | |
VectorView< T, 1 > | row (const index_t i, const index_t start, const index_t stop) |
Create a row view with stride 1. | |
const VectorView< T, 1 > | row (const index_t i, const index_t start=0) const |
Create a constant row view with stride 1. | |
const VectorView< T, 1 > | row (const index_t i, const index_t start, const index_t stop) const |
Create a constant row view with stride 1. | |
template<int CS = 1> | |
VectorView< T, DYNAMIC > | col (const index_t i, const index_t start=0) |
Create a column view vector. | |
template<int CS = 1> | |
VectorView< T, DYNAMIC > | col (const index_t i, const index_t start, const index_t stop) |
Create a column view vector. | |
template<int CS = 1> | |
const VectorView< T, DYNAMIC > | col (const index_t i, const index_t start=0) const |
Create a constant column view vector. | |
template<int CS = 1> | |
const VectorView< T, DYNAMIC > | col (const index_t i, const index_t start, const index_t stop) const |
Create a constant column view vector. | |
void | matrix_store (const index_t row, const index_t col, const VectorType val) const |
Vector store at a given row,column position | |
void | matrix_store_tail (const index_t row, const index_t col, const vector_length_t remaining, const VectorType val) const |
Vector store at a given row,column position with predicated tail | |
VectorType const | matrix_op_tail (const index_t row, const index_t col, const vector_length_t remaining) const |
Vector operation at a given row,column position with predicated tail | |
VectorType const | matrix_op (const index_t row, const index_t col) const |
Vector operation at a given row,column position | |
template<typename VA , typename std::enable_if< IsVector< VA >::value &&SameElementType< VA, T >::value, bool >::type = true> | |
void | fill_diagonal (const VA &a) |
Fill diagonal of a matrix with a vector. | |
Matrix< T, DYNAMIC, DYNAMIC, malloc_allocator > | transpose () const |
Create the transposed matrix. | |
Matrix< T, DYNAMIC, DYNAMIC, malloc_allocator > | create () const |
Create a matrix of same type. | |
T * | ptr () const |
Pointer to storage buffer. | |
const T * | const_ptr () const |
Constant pointer to storage buffer. | |
+
|
+ +inlineexplicit | +
Create matrix view on a buffer (buffer not owned by the view)
+v | buffer |
rows | number of rows |
cols | number of columns |
stride | stride |
+
|
+ +inlineexplicit | +
Create matrix view on vector (vector not owned by the view)
+v | vector |
rows | number of rows |
cols | number of columns |
stride | stride |
+
|
+ +inline | +
Create a column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
stop | Stop index in column |
+
|
+ +inline | +
Create a constant column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
stop | Stop index in column |
+
|
+ +inline | +
Create a column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
+
|
+ +inline | +
Create a constant column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
+
|
+ +inline | +
Number of columns.
+
+
|
+ +inline | +
Constant pointer to storage buffer.
+
+
|
+ +inline | +
Create a matrix of same type.
+
+
|
+ +inline | +
+
|
+ +inline | +
Vector operation at a given row,column position
+row | row index |
col | column index |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype
+ +
+
|
+ +inline | +
Vector operation at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Vector store at a given row,column position
+row | row index |
col | column index |
val | Vector value |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column in this matrix.
+ +
+
|
+ +inline | +
Vector store at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
val | Vector value to write at index i with tail predication |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Access matrix view element at given position.
+r | Row index |
c | Column index |
+
|
+ +inline | +
Access matrix view element at given position.
+r | Row index |
c | Column index |
+
|
+ +inline | +
Elementwise multiply matrix view with expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | expression |
+
|
+ +inline | +
Elementwise multiply matrix view with matrix view.
+other | Other matrix |
+
|
+ +inline | +
Elementwise multiply matrix view constant.
+other | constant |
+
|
+ +inline | +
Add matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Expression |
+
|
+ +inline | +
Add matrix from matrix view.
+other | Other matrix |
+
|
+ +inline | +
Add constant to matrix view.
+other | The constant |
+
|
+ +inline | +
Subtract matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | expression |
+
|
+ +inline | +
Subtract matrix view.
+other | Other matrix view |
+
|
+ +inline | +
Subtract constant.
+other | Other matrix |
+
|
+ +inline | +
Assign matrix view from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Expression |
+
|
+ +inline | +
Assign matrix view from constant.
+val | The constant |
+
|
+ +inline | +
Pointer to storage buffer.
+
+
|
+ +inline | +
Create a row view with stride 1.
+i | row index |
start | Start index in row |
stop | Stop index in row |
+
|
+ +inline | +
Create a constant row view with stride 1.
+i | row index |
start | Start index in row |
stop | Stop index in row |
+
|
+ +inline | +
Create a row view with stride 1.
+i | row index |
start | Start index in row |
+
|
+ +inline | +
Create a constant row view with stride 1.
+i | row index |
start | Start index in row |
+
|
+ +inline | +
Number of rows.
+
+
|
+ +inline | +
Number of stride.
+
+
|
+ +inline | +
Create the transposed matrix.
+struct arm_cmsis_dsp::MatrixView< T, CONSTRAINED_DYNAMIC > | +
Dynamic Matrix View.
+T | Type of the scalar |
This template is used for dynamic matrix (stride not known at build time) and when we do know that stride == number of columns. When stride is equal to the number of columns, the matrix can be seen as a vector and it enables to use the vector eval loop in the operator fusion mechanism.
+Those matrix views are created by expression when a reference to a matrix is used in the expression tree (to avoid copying the matrix). In this case, we do know that the matrix view is the full matrix and thus stride == number of columns
+Public Types | |
+using | VectorType = typename vector_traits< T >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Types inherited from VectorView< T, 1 > | |
+using | Vector = typename vector_traits< T >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Member Functions | |
vector_length_t | rows () const |
Number of rows. | |
vector_length_t | columns () const |
Number of columns. | |
uint32_t | stride () const |
Number of stride. | |
MatrixView (T *v, const vector_length_t rows, const vector_length_t cols) | |
Create matrix view on a buffer (buffer not owned by the view) | |
MatrixView (const Vector_Base< T > &v, const vector_length_t rows, const vector_length_t cols) | |
Create matrix view on vector (vector not owned by the view) | |
T & | operator() (const index_t r, const index_t c) |
Access matrix view element at given position. | |
T const | operator() (const index_t r, const index_t c) const |
Access matrix view element at given position. | |
template<typename Derived > | |
MatrixView & | operator= (const _Expr< Derived > &other) |
Assign matrix view from expression. | |
MatrixView & | operator= (const T val) |
Assign matrix view from constant. | |
template<typename Derived > | |
MatrixView & | operator+= (const _Expr< Derived > &other) |
Add matrix from expression. | |
MatrixView & | operator+= (const MatrixView &other) |
Add matrix from matrix view. | |
MatrixView & | operator+= (const T other) |
Add constant to matrix view. | |
template<typename Derived > | |
MatrixView & | operator-= (const _Expr< Derived > &other) |
Subtract matrix from expression. | |
MatrixView & | operator-= (const MatrixView &other) |
Subtract matrix view. | |
MatrixView & | operator-= (const T other) |
Subtract constant. | |
template<typename Derived > | |
MatrixView & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply matrix view with expression. | |
MatrixView & | operator*= (const MatrixView &other) |
Elementwise multiply matrix view with matrix view. | |
MatrixView & | operator*= (const T other) |
Elementwise multiply matrix view constant. | |
VectorView< T, 1 > | row (const index_t i, const index_t start=0) |
Create a row view with stride 1. | |
VectorView< T, 1 > | row (const index_t i, const index_t start, const index_t stop) |
Create a row view with stride 1. | |
const VectorView< T, 1 > | row (const index_t i, const index_t start=0) const |
Create a constant row view with stride 1. | |
const VectorView< T, 1 > | row (const index_t i, const index_t start, const index_t stop) const |
Create a constant row view with stride 1. | |
template<int CS = 1> | |
VectorView< T, DYNAMIC > | col (const index_t i, const index_t start=0) |
Create a column view vector. | |
template<int CS = 1> | |
VectorView< T, DYNAMIC > | col (const index_t i, const index_t start, const index_t stop) |
Create a column view vector. | |
template<int CS = 1> | |
const VectorView< T, DYNAMIC > | col (const index_t i, const index_t start=0) const |
Create a constant column view vector. | |
template<int CS = 1> | |
const VectorView< T, DYNAMIC > | col (const index_t i, const index_t start, const index_t stop) const |
Create a constant column view vector. | |
void | matrix_store (const index_t row, const index_t col, const VectorType val) const |
Vector store at a given row,column position | |
void | matrix_store_tail (const index_t row, const index_t col, const vector_length_t remaining, const VectorType val) const |
Vector store at a given row,column position with predicated tail | |
VectorType const | matrix_op_tail (const index_t row, const index_t col, const vector_length_t remaining) const |
Vector operation at a given row,column position with predicated tail | |
VectorType const | matrix_op (const index_t row, const index_t col) const |
Vector operation at a given row,column position | |
template<typename VA , typename std::enable_if< IsVector< VA >::value &&SameElementType< VA, T >::value, bool >::type = true> | |
void | fill_diagonal (const VA &a) |
Fill diagonal of a matrix with a vector. | |
Matrix< T, DYNAMIC, DYNAMIC, malloc_allocator > | transpose () const |
Create the transposed matrix. | |
Matrix< T, DYNAMIC, DYNAMIC, malloc_allocator > | create () const |
Create a matrix of same type. | |
Public Member Functions inherited from VectorView< T, 1 > | |
VectorView (T *v, const vector_length_t start, const vector_length_t stop) | |
Create a vector view on a buffer. | |
VectorView (const Vector_Base< T > &v) | |
Create a vector on a vector. | |
VectorView (const Vector_Base< T > &v, const index_t start, const index_t stop) | |
Create a vector view on vector. | |
VectorView (const VectorView &other) | |
Create a vector view from another view. | |
VectorView (VectorView &&other) | |
Move a vector view to another view. | |
vector_length_t | length () const |
Vector view dimension. | |
T * | ptr () const |
Pointer to view storage. | |
T * | ptr (const index_t i) const |
Pointer to view storage at index i. | |
const T * | const_ptr () const |
Pointer to view constant storage. | |
const T * | const_ptr (const index_t i) const |
Pointer to view constant storage at index i. | |
T & | operator[] (const index_t i) |
Element at index i. | |
T & | operator[] (const index_t i) const |
Element at index i. | |
void | vector_store (const index_t i, const Vector val) |
Vector store at index i | |
void | vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) |
Vector store at index i with predicated tail | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index i with predicated tail | |
Vector const | vector_op (const index_t i) const |
Vector operation at index i | |
VectorView & | operator= (const _Expr< Derived > &other) |
Assign an expression to a vector view. | |
VectorView & | operator= (const T val) |
Assign a scalar to a vector view. | |
VectorView & | operator+= (const _Expr< Derived > &other) |
Elementwise add an expression to a vector view. | |
VectorView & | operator+= (const VectorView &other) |
Elementwise add a vector view to a vector view. | |
VectorView & | operator+= (const T other) |
Elementwise add a scalar to a vector view. | |
VectorView & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract an expression to a vector view. | |
VectorView & | operator-= (const VectorView &other) |
Elementwise subtract a vector view to a vector view. | |
VectorView & | operator-= (const T other) |
Elementwise subtract a scalar to a vector view. | |
VectorView & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply an expression to a vector view. | |
VectorView & | operator*= (const VectorView &other) |
Elementwise multiply a vector view to a vector view. | |
VectorView & | operator*= (const T other) |
Elementwise multiply a scalar to a vector view. | |
VectorView< T, S *stride > | sub (const index_t start=0, const index_t stop=-1) |
Create a sub vector (a view of a view) | |
const VectorView< T, S *stride > | sub (const index_t start=0, const index_t stop=-1) const |
Create a constant sub vector (a view of a view) | |
+Additional Inherited Members | |
Static Public Member Functions inherited from VectorView< T, 1 > | |
static constexpr vector_length_t | compute_length (const index_t start, const index_t stop) |
Compute the number of elements in the vector view. | |
+
|
+ +inlineexplicit | +
Create matrix view on a buffer (buffer not owned by the view)
+v | buffer |
rows | number of rows |
cols | number of columns |
+
|
+ +inlineexplicit | +
Create matrix view on vector (vector not owned by the view)
+v | vector |
rows | number of rows |
cols | number of columns |
+
|
+ +inline | +
Create a column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
stop | Stop index in column |
+
|
+ +inline | +
Create a constant column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
stop | Stop index in column |
+
|
+ +inline | +
Create a column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
+
|
+ +inline | +
Create a constant column view vector.
+CS | column stride |
i | column index |
start | Start index in column |
+
|
+ +inline | +
Number of columns.
+
+
|
+ +inline | +
Create a matrix of same type.
+
+
|
+ +inline | +
+
|
+ +inline | +
Vector operation at a given row,column position
+row | row index |
col | column index |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype
+ +
+
|
+ +inline | +
Vector operation at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function compute an operation at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Vector store at a given row,column position
+row | row index |
col | column index |
val | Vector value |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column in this matrix.
+ +
+
|
+ +inline | +
Vector store at a given row,column position with predicated tail
+row | row index |
col | column index |
remaining | Number of remaining samples in the loop |
val | Vector value to write at index i with tail predication |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at row,column index in this matrix datatype with predication
+ +
+
|
+ +inline | +
Access matrix view element at given position.
+r | Row index |
c | Column index |
+
|
+ +inline | +
Access matrix view element at given position.
+r | Row index |
c | Column index |
+
|
+ +inline | +
Elementwise multiply matrix view with expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | expression |
+
|
+ +inline | +
Elementwise multiply matrix view with matrix view.
+other | Other matrix |
+
|
+ +inline | +
Elementwise multiply matrix view constant.
+other | constant |
+
|
+ +inline | +
Add matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Expression |
+
|
+ +inline | +
Add matrix from matrix view.
+other | Other matrix |
+
|
+ +inline | +
Add constant to matrix view.
+other | The constant |
+
|
+ +inline | +
Subtract matrix from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | expression |
+
|
+ +inline | +
Subtract matrix view.
+other | Other matrix view |
+
|
+ +inline | +
Subtract constant.
+other | Other matrix |
+
|
+ +inline | +
Assign matrix view from expression.
+Derived | Datatype representing the abstract syntax tree of the expression |
other | Expression |
+
|
+ +inline | +
Assign matrix view from constant.
+val | The constant |
+
|
+ +inline | +
Create a row view with stride 1.
+i | row index |
start | Start index in row |
stop | Stop index in row |
+
|
+ +inline | +
Create a constant row view with stride 1.
+i | row index |
start | Start index in row |
stop | Stop index in row |
+
|
+ +inline | +
Create a row view with stride 1.
+i | row index |
start | Start index in row |
+
|
+ +inline | +
Create a constant row view with stride 1.
+i | row index |
start | Start index in row |
+
|
+ +inline | +
Number of rows.
+
+
|
+ +inline | +
Number of stride.
+
+
|
+ +inline | +
Create the transposed matrix.
++Functions | |
arm_status | arm_mat_add_f16 (const arm_matrix_instance_f16 *pSrcA, const arm_matrix_instance_f16 *pSrcB, arm_matrix_instance_f16 *pDst) |
Floating-point matrix addition. | |
arm_status | arm_mat_add_f32 (const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst) |
Floating-point matrix addition. | |
arm_status | arm_mat_add_q15 (const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst) |
Q15 matrix addition. | |
arm_status | arm_mat_add_q31 (const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst) |
Q31 matrix addition. | |
Adds two matrices.
+\[ +\begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ +\end{pmatrix} ++ +\begin{pmatrix} + b_{1,1} & b_{1,2} & b_{1,3} \\ + b_{2,1} & b_{2,2} & b_{2,3} \\ + b_{3,1} & b_{3,2} & b_{3,3} \\ +\end{pmatrix} += +\begin{pmatrix} + a_{1,1}+b_{1,1} & a_{1,2}+b_{1,2} & a_{1,3}+b_{1,3} \\ + a_{2,1}+b_{2,1} & a_{2,2}+b_{2,2} & a_{2,3}+b_{2,3} \\ + a_{3,1}+b_{3,1} & a_{3,2}+b_{3,2} & a_{3,3}+b_{3,3} \\ +\end{pmatrix} +\] +
+The functions check to make sure that pSrcA
, pSrcB
, and pDst
have the same number of rows and columns.
arm_status arm_mat_add_f16 | +( | +const arm_matrix_instance_f16 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f16 * | +pSrcB, | +
+ | + | arm_matrix_instance_f16 * | +pDst | +
+ | ) | ++ |
Floating-point matrix addition.
+[in] | pSrcA | points to first input matrix structure |
[in] | pSrcB | points to second input matrix structure |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_add_f32 | +( | +const arm_matrix_instance_f32 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f32 * | +pSrcB, | +
+ | + | arm_matrix_instance_f32 * | +pDst | +
+ | ) | ++ |
Floating-point matrix addition.
+[in] | pSrcA | points to first input matrix structure |
[in] | pSrcB | points to second input matrix structure |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_add_q15 | +( | +const arm_matrix_instance_q15 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q15 * | +pSrcB, | +
+ | + | arm_matrix_instance_q15 * | +pDst | +
+ | ) | ++ |
Q15 matrix addition.
+[in] | pSrcA | points to first input matrix structure |
[in] | pSrcB | points to second input matrix structure |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_add_q31 | +( | +const arm_matrix_instance_q31 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q31 * | +pSrcB, | +
+ | + | arm_matrix_instance_q31 * | +pDst | +
+ | ) | ++ |
Q31 matrix addition.
+[in] | pSrcA | points to first input matrix structure |
[in] | pSrcB | points to second input matrix structure |
[out] | pDst | points to output matrix structure |
+Functions | |
arm_status | arm_mat_cholesky_f16 (const arm_matrix_instance_f16 *pSrc, arm_matrix_instance_f16 *pDst) |
Floating-point Cholesky decomposition of positive-definite matrix. | |
arm_status | arm_mat_cholesky_f32 (const arm_matrix_instance_f32 *pSrc, arm_matrix_instance_f32 *pDst) |
Floating-point Cholesky decomposition of positive-definite matrix. | |
arm_status | arm_mat_cholesky_f64 (const arm_matrix_instance_f64 *pSrc, arm_matrix_instance_f64 *pDst) |
Floating-point Cholesky decomposition of positive-definite matrix. | |
arm_status | arm_mat_ldlt_f32 (const arm_matrix_instance_f32 *pSrc, arm_matrix_instance_f32 *pl, arm_matrix_instance_f32 *pd, uint16_t *pp) |
Floating-point LDL^t decomposition of positive semi-definite matrix. | |
arm_status | arm_mat_ldlt_f64 (const arm_matrix_instance_f64 *pSrc, arm_matrix_instance_f64 *pl, arm_matrix_instance_f64 *pd, uint16_t *pp) |
Floating-point LDL^t decomposition of positive semi-definite matrix. | |
Computes the Cholesky or LL^t decomposition of a matrix.
+If the input matrix does not have a decomposition, then the algorithm terminates and returns error status ARM_MATH_DECOMPOSITION_FAILURE.
+arm_status arm_mat_cholesky_f16 | +( | +const arm_matrix_instance_f16 * | +pSrc, | +
+ | + | arm_matrix_instance_f16 * | +pDst | +
+ | ) | ++ |
Floating-point Cholesky decomposition of positive-definite matrix.
+Floating-point Cholesky decomposition of Symmetric Positive Definite Matrix.
+[in] | pSrc | points to the instance of the input floating-point matrix structure. |
[out] | pDst | points to the instance of the output floating-point matrix structure. |
arm_status arm_mat_cholesky_f32 | +( | +const arm_matrix_instance_f32 * | +pSrc, | +
+ | + | arm_matrix_instance_f32 * | +pDst | +
+ | ) | ++ |
Floating-point Cholesky decomposition of positive-definite matrix.
+Floating-point Cholesky decomposition of Symmetric Positive Definite Matrix.
+[in] | pSrc | points to the instance of the input floating-point matrix structure. |
[out] | pDst | points to the instance of the output floating-point matrix structure. |
arm_status arm_mat_cholesky_f64 | +( | +const arm_matrix_instance_f64 * | +pSrc, | +
+ | + | arm_matrix_instance_f64 * | +pDst | +
+ | ) | ++ |
Floating-point Cholesky decomposition of positive-definite matrix.
+Floating-point Cholesky decomposition of Symmetric Positive Definite Matrix.
+[in] | pSrc | points to the instance of the input floating-point matrix structure. |
[out] | pDst | points to the instance of the output floating-point matrix structure. |
arm_status arm_mat_ldlt_f32 | +( | +const arm_matrix_instance_f32 * | +pSrc, | +
+ | + | arm_matrix_instance_f32 * | +pl, | +
+ | + | arm_matrix_instance_f32 * | +pd, | +
+ | + | uint16_t * | +pp | +
+ | ) | ++ |
Floating-point LDL^t decomposition of positive semi-definite matrix.
+Floating-point LDL decomposition of Symmetric Positive Semi-Definite Matrix.
+[in] | pSrc | points to the instance of the input floating-point matrix structure. |
[out] | pl | points to the instance of the output floating-point triangular matrix structure. |
[out] | pd | points to the instance of the output floating-point diagonal matrix structure. |
[out] | pp | points to the instance of the output floating-point permutation vector. |
arm_status arm_mat_ldlt_f64 | +( | +const arm_matrix_instance_f64 * | +pSrc, | +
+ | + | arm_matrix_instance_f64 * | +pl, | +
+ | + | arm_matrix_instance_f64 * | +pd, | +
+ | + | uint16_t * | +pp | +
+ | ) | ++ |
Floating-point LDL^t decomposition of positive semi-definite matrix.
+Floating-point LDL decomposition of Symmetric Positive Semi-Definite Matrix.
+[in] | pSrc | points to the instance of the input floating-point matrix structure. |
[out] | pl | points to the instance of the output floating-point triangular matrix structure. |
[out] | pd | points to the instance of the output floating-point diagonal matrix structure. |
[out] | pp | points to the instance of the output floating-point permutation vector. |
+Functions | |
arm_status | arm_mat_cmplx_trans_f16 (const arm_matrix_instance_f16 *pSrc, arm_matrix_instance_f16 *pDst) |
Floating-point matrix transpose. | |
arm_status | arm_mat_cmplx_trans_f32 (const arm_matrix_instance_f32 *pSrc, arm_matrix_instance_f32 *pDst) |
Floating-point matrix transpose. | |
arm_status | arm_mat_cmplx_trans_q15 (const arm_matrix_instance_q15 *pSrc, arm_matrix_instance_q15 *pDst) |
Q15 complex matrix transpose. | |
arm_status | arm_mat_cmplx_trans_q31 (const arm_matrix_instance_q31 *pSrc, arm_matrix_instance_q31 *pDst) |
Q31 complex matrix transpose. | |
Tranposes a complex matrix.
+Transposing an M x N
matrix flips it around the center diagonal and results in an N x M
matrix.
+\[ +\begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ +\end{pmatrix}^T + = +\begin{pmatrix} + a_{1,1} & a_{2,1} & a_{3,1} \\ + a_{1,2} & a_{2,2} & a_{3,2} \\ + a_{1,3} & a_{2,3} & a_{3,3} \\ +\end{pmatrix} +\] +
+arm_status arm_mat_cmplx_trans_f16 | +( | +const arm_matrix_instance_f16 * | +pSrc, | +
+ | + | arm_matrix_instance_f16 * | +pDst | +
+ | ) | ++ |
Floating-point matrix transpose.
+Floating-point complex matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
arm_status arm_mat_cmplx_trans_f32 | +( | +const arm_matrix_instance_f32 * | +pSrc, | +
+ | + | arm_matrix_instance_f32 * | +pDst | +
+ | ) | ++ |
Floating-point matrix transpose.
+Floating-point complex matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
arm_status arm_mat_cmplx_trans_q15 | +( | +const arm_matrix_instance_q15 * | +pSrc, | +
+ | + | arm_matrix_instance_q15 * | +pDst | +
+ | ) | ++ |
Q15 complex matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
arm_status arm_mat_cmplx_trans_q31 | +( | +const arm_matrix_instance_q31 * | +pSrc, | +
+ | + | arm_matrix_instance_q31 * | +pDst | +
+ | ) | ++ |
Q31 complex matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
A * X = B
, where X
is the unknown value and can be estimated from A
& B
. X
is given by the following equation: X = Inverse(AT * A) * AT * B
A_f32
input matrix in the linear combination equation B_f32
output matrix in the linear combination equation X_f32
unknown matrix estimated using A_f32
& B_f32
matricesRefer arm_matrix_example_f32.c
++Functions | |
float16_t | arm_householder_f16 (const float16_t *pSrc, const float16_t threshold, uint32_t blockSize, float16_t *pOut) |
Householder transform of a half floating point vector. | |
float32_t | arm_householder_f32 (const float32_t *pSrc, const float32_t threshold, uint32_t blockSize, float32_t *pOut) |
Householder transform of a floating point vector. | |
float64_t | arm_householder_f64 (const float64_t *pSrc, const float64_t threshold, uint32_t blockSize, float64_t *pOut) |
Householder transform of a double floating point vector. | |
Computes the Householder transform of a vector x.
+The Householder transform of x is a vector v with
++\[ + v_0 = 1 + \] +
+and a scalar \(\beta\) such that:
++\[ + P = I - \beta v v^T + \] +
+is an orthogonal matrix and
++\[ + P x = ||x||_2 e_1 + \] +
+So P is an hyperplane reflection such that the image of x is proportional to \(e_1\).
+\(e_1\) is the vector of coordinates:
++\[ + \begin{pmatrix} + 1 \\ + 0 \\ + \vdots \\ + \end{pmatrix} + \] +
+If x is already proportional to \(e_1\) then the matrix P should be the identity.
+Thus, \(\beta\) should be 0 and in this case the vector v can also be null.
+But how do we detect that x is already proportional to \(e_1\).
+If x
+\[ + x = + \begin{pmatrix} + x_0 \\ + xr \\ + \end{pmatrix} + \] +
+where \(xr\) is a vector.
+The algorithm is computing the norm squared of this vector:
++\[ + ||xr||^2 + \] +
+and this value is compared to a threshold
. If the value is smaller than the threshold
, the algorithm is returning 0 for \(\beta\) and the householder vector.
This threshold
is an argument of the function.
Default values are provided in the header dsp/matrix_functions.h
like for instance DEFAULT_HOUSEHOLDER_THRESHOLD_F32
float16_t arm_householder_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | const float16_t | +threshold, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pOut | +
+ | ) | ++ |
Householder transform of a half floating point vector.
+[in] | pSrc | points to the input vector. |
[in] | threshold | norm2 threshold. + |
[in] | blockSize | dimension of the vector space. |
[out] | pOut | points to the output vector. |
float32_t arm_householder_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | const float32_t | +threshold, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pOut | +
+ | ) | ++ |
Householder transform of a floating point vector.
+[in] | pSrc | points to the input vector. |
[in] | threshold | norm2 threshold. + |
[in] | blockSize | dimension of the vector space. |
[out] | pOut | points to the output vector. |
float64_t arm_householder_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | const float64_t | +threshold, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pOut | +
+ | ) | ++ |
Householder transform of a double floating point vector.
+[in] | pSrc | points to the input vector. |
[in] | threshold | norm2 threshold. + |
[in] | blockSize | dimension of the vector space. |
[out] | pOut | points to the output vector. |
+Functions | |
void | arm_mat_init_f16 (arm_matrix_instance_f16 *S, uint16_t nRows, uint16_t nColumns, float16_t *pData) |
Floating-point matrix initialization. | |
void | arm_mat_init_f32 (arm_matrix_instance_f32 *S, uint16_t nRows, uint16_t nColumns, float32_t *pData) |
Floating-point matrix initialization. | |
void | arm_mat_init_f64 (arm_matrix_instance_f64 *S, uint16_t nRows, uint16_t nColumns, float64_t *pData) |
Floating-point matrix initialization. | |
void | arm_mat_init_q15 (arm_matrix_instance_q15 *S, uint16_t nRows, uint16_t nColumns, q15_t *pData) |
Q15 matrix initialization. | |
void | arm_mat_init_q31 (arm_matrix_instance_q31 *S, uint16_t nRows, uint16_t nColumns, q31_t *pData) |
Q31 matrix initialization. | |
Initializes the underlying matrix data structure. The functions set the numRows
, numCols
, and pData
fields of the matrix data structure.
void arm_mat_init_f16 | +( | +arm_matrix_instance_f16 * | +S, | +
+ | + | uint16_t | +nRows, | +
+ | + | uint16_t | +nColumns, | +
+ | + | float16_t * | +pData | +
+ | ) | ++ |
Floating-point matrix initialization.
+[in,out] | S | points to an instance of the floating-point matrix structure |
[in] | nRows | number of rows in the matrix |
[in] | nColumns | number of columns in the matrix |
[in] | pData | points to the matrix data array |
void arm_mat_init_f32 | +( | +arm_matrix_instance_f32 * | +S, | +
+ | + | uint16_t | +nRows, | +
+ | + | uint16_t | +nColumns, | +
+ | + | float32_t * | +pData | +
+ | ) | ++ |
Floating-point matrix initialization.
+[in,out] | S | points to an instance of the floating-point matrix structure |
[in] | nRows | number of rows in the matrix |
[in] | nColumns | number of columns in the matrix |
[in] | pData | points to the matrix data array |
void arm_mat_init_f64 | +( | +arm_matrix_instance_f64 * | +S, | +
+ | + | uint16_t | +nRows, | +
+ | + | uint16_t | +nColumns, | +
+ | + | float64_t * | +pData | +
+ | ) | ++ |
Floating-point matrix initialization.
+[in,out] | S | points to an instance of the floating-point matrix structure |
[in] | nRows | number of rows in the matrix |
[in] | nColumns | number of columns in the matrix |
[in] | pData | points to the matrix data array |
void arm_mat_init_q15 | +( | +arm_matrix_instance_q15 * | +S, | +
+ | + | uint16_t | +nRows, | +
+ | + | uint16_t | +nColumns, | +
+ | + | q15_t * | +pData | +
+ | ) | ++ |
Q15 matrix initialization.
+[in,out] | S | points to an instance of the floating-point matrix structure |
[in] | nRows | number of rows in the matrix |
[in] | nColumns | number of columns in the matrix |
[in] | pData | points to the matrix data array |
void arm_mat_init_q31 | +( | +arm_matrix_instance_q31 * | +S, | +
+ | + | uint16_t | +nRows, | +
+ | + | uint16_t | +nColumns, | +
+ | + | q31_t * | +pData | +
+ | ) | ++ |
Q31 matrix initialization.
+[in,out] | S | points to an instance of the Q31 matrix structure |
[in] | nRows | number of rows in the matrix |
[in] | nColumns | number of columns in the matrix |
[in] | pData | points to the matrix data array |
Computes the inverse of a matrix.
+The inverse is defined only if the input matrix is square and non-singular (the determinant is non-zero). The function checks that the input and output matrices are square and of the same size.
+Matrix inversion is numerically sensitive and the CMSIS DSP library only supports matrix inversion of floating-point matrices.
+ARM_MATH_SINGULAR
.+\[ +\begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} & | & 1 & 0 & 0\\ + a_{2,1} & a_{2,2} & a_{2,3} & | & 0 & 1 & 0\\ + a_{3,1} & a_{3,2} & a_{3,3} & | & 0 & 0 & 1\\ +\end{pmatrix} +\rightarrow +\begin{pmatrix} + 1 & 0 & 0 & | & x_{1,1} & x_{2,1} & x_{3,1} \\ + 0 & 1 & 0 & | & x_{1,2} & x_{2,2} & x_{3,2} \\ + 0 & 0 & 1 & | & x_{1,3} & x_{2,3} & x_{3,3} \\ +\end{pmatrix} +\] +
+arm_status arm_mat_inverse_f16 | +( | +const arm_matrix_instance_f16 * | +pSrc, | +
+ | + | arm_matrix_instance_f16 * | +pDst | +
+ | ) | ++ |
Floating-point matrix inverse.
+[in] | pSrc | points to input matrix structure. The source matrix is modified by the function. |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_inverse_f32 | +( | +const arm_matrix_instance_f32 * | +pSrc, | +
+ | + | arm_matrix_instance_f32 * | +pDst | +
+ | ) | ++ |
Floating-point matrix inverse.
+[in] | pSrc | points to input matrix structure. The source matrix is modified by the function. |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_inverse_f64 | +( | +const arm_matrix_instance_f64 * | +pSrc, | +
+ | + | arm_matrix_instance_f64 * | +pDst | +
+ | ) | ++ |
Floating-point (64 bit) matrix inverse.
+Floating-point matrix inverse.
+[in] | pSrc | points to input matrix structure. The source matrix is modified by the function. |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_solve_lower_triangular_f16 | +( | +const arm_matrix_instance_f16 * | +lt, | +
+ | + | const arm_matrix_instance_f16 * | +a, | +
+ | + | arm_matrix_instance_f16 * | +dst | +
+ | ) | ++ |
Solve LT . X = A where LT is a lower triangular matrix.
+[in] | lt | The lower triangular matrix |
[in] | a | The matrix a |
[out] | dst | The solution X of LT . X = A |
arm_status arm_mat_solve_lower_triangular_f32 | +( | +const arm_matrix_instance_f32 * | +lt, | +
+ | + | const arm_matrix_instance_f32 * | +a, | +
+ | + | arm_matrix_instance_f32 * | +dst | +
+ | ) | ++ |
Solve LT . X = A where LT is a lower triangular matrix.
+[in] | lt | The lower triangular matrix |
[in] | a | The matrix a |
[out] | dst | The solution X of LT . X = A |
arm_status arm_mat_solve_lower_triangular_f64 | +( | +const arm_matrix_instance_f64 * | +lt, | +
+ | + | const arm_matrix_instance_f64 * | +a, | +
+ | + | arm_matrix_instance_f64 * | +dst | +
+ | ) | ++ |
Solve LT . X = A where LT is a lower triangular matrix.
+[in] | lt | The lower triangular matrix |
[in] | a | The matrix a |
[out] | dst | The solution X of LT . X = A |
arm_status arm_mat_solve_upper_triangular_f16 | +( | +const arm_matrix_instance_f16 * | +ut, | +
+ | + | const arm_matrix_instance_f16 * | +a, | +
+ | + | arm_matrix_instance_f16 * | +dst | +
+ | ) | ++ |
Solve UT . X = A where UT is an upper triangular matrix.
+[in] | ut | The upper triangular matrix |
[in] | a | The matrix a |
[out] | dst | The solution X of UT . X = A |
arm_status arm_mat_solve_upper_triangular_f32 | +( | +const arm_matrix_instance_f32 * | +ut, | +
+ | + | const arm_matrix_instance_f32 * | +a, | +
+ | + | arm_matrix_instance_f32 * | +dst | +
+ | ) | ++ |
Solve UT . X = A where UT is an upper triangular matrix.
+[in] | ut | The upper triangular matrix |
[in] | a | The matrix a |
[out] | dst | The solution X of UT . X = A |
arm_status arm_mat_solve_upper_triangular_f64 | +( | +const arm_matrix_instance_f64 * | +ut, | +
+ | + | const arm_matrix_instance_f64 * | +a, | +
+ | + | arm_matrix_instance_f64 * | +dst | +
+ | ) | ++ |
Solve UT . X = A where UT is an upper triangular matrix.
+[in] | ut | The upper triangular matrix |
[in] | a | The matrix a |
[out] | dst | The solution X of UT . X = A |
Multiplies two matrices.
++\[ +\begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ +\end{pmatrix} + +\begin{pmatrix} + b_{1,1} & b_{1,2} & b_{1,3} \\ + b_{2,1} & b_{2,2} & b_{2,3} \\ + b_{3,1} & b_{3,2} & b_{3,3} \\ +\end{pmatrix} += +\begin{pmatrix} + a_{1,1} b_{1,1}+a_{1,2} b_{2,1}+a_{1,3} b_{3,1} & a_{1,1} b_{1,2}+a_{1,2} b_{2,2}+a_{1,3} b_{3,2} & a_{1,1} b_{1,3}+a_{1,2} b_{2,3}+a_{1,3} b_{3,3} \\ + a_{2,1} b_{1,1}+a_{2,2} b_{2,1}+a_{2,3} b_{3,1} & a_{2,1} b_{1,2}+a_{2,2} b_{2,2}+a_{2,3} b_{3,2} & a_{2,1} b_{1,3}+a_{2,2} b_{2,3}+a_{2,3} b_{3,3} \\ + a_{3,1} b_{1,1}+a_{3,2} b_{2,1}+a_{3,3} b_{3,1} & a_{3,1} b_{1,2}+a_{3,2} b_{2,2}+a_{3,3} b_{3,2} & a_{3,1} b_{1,3}+a_{3,2} b_{2,3}+a_{3,3} b_{3,3} \\ +\end{pmatrix} +\] +
+Matrix multiplication is only defined if the number of columns of the first matrix equals the number of rows of the second matrix. Multiplying an M x N
matrix with an N x P
matrix results in an M x P
matrix. When matrix size checking is enabled, the functions check: (1) that the inner dimensions of pSrcA
and pSrcB
are equal; and (2) that the size of the output matrix equals the outer dimensions of pSrcA
and pSrcB
.
Multiplies two matrices.
+Matrix multiplication is only defined if the number of columns of the first matrix equals the number of rows of the second matrix. Multiplying an M x N
matrix with an N x P
matrix results in an M x P
matrix. When matrix size checking is enabled, the functions check: (1) that the inner dimensions of pSrcA
and pSrcB
are equal; and (2) that the size of the output matrix equals the outer dimensions of pSrcA
and pSrcB
.
arm_status arm_mat_mult_f16 | +( | +const arm_matrix_instance_f16 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f16 * | +pSrcB, | +
+ | + | arm_matrix_instance_f16 * | +pDst | +
+ | ) | ++ |
Floating-point matrix multiplication.
+[in] | *pSrcA | points to the first input matrix structure |
[in] | *pSrcB | points to the second input matrix structure |
[out] | *pDst | points to output matrix structure |
ARM_MATH_SIZE_MISMATCH
or ARM_MATH_SUCCESS
based on the outcome of size checking. arm_status arm_mat_mult_f32 | +( | +const arm_matrix_instance_f32 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f32 * | +pSrcB, | +
+ | + | arm_matrix_instance_f32 * | +pDst | +
+ | ) | ++ |
Floating-point matrix multiplication.
+[in] | *pSrcA | points to the first input matrix structure |
[in] | *pSrcB | points to the second input matrix structure |
[out] | *pDst | points to output matrix structure |
ARM_MATH_SIZE_MISMATCH
or ARM_MATH_SUCCESS
based on the outcome of size checking. arm_status arm_mat_mult_f64 | +( | +const arm_matrix_instance_f64 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f64 * | +pSrcB, | +
+ | + | arm_matrix_instance_f64 * | +pDst | +
+ | ) | ++ |
Floating-point matrix multiplication.
+[in] | *pSrcA | points to the first input matrix structure |
[in] | *pSrcB | points to the second input matrix structure |
[out] | *pDst | points to output matrix structure |
ARM_MATH_SIZE_MISMATCH
or ARM_MATH_SUCCESS
based on the outcome of size checking. arm_status arm_mat_mult_fast_q15 | +( | +const arm_matrix_instance_q15 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q15 * | +pSrcB, | +
+ | + | arm_matrix_instance_q15 * | +pDst, | +
+ | + | q15_t * | +pState | +
+ | ) | ++ |
Q15 matrix multiplication (fast variant).
+Q15 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
[in] | pState | points to the array for storing intermediate results |
arm_status arm_mat_mult_fast_q31 | +( | +const arm_matrix_instance_q31 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q31 * | +pSrcB, | +
+ | + | arm_matrix_instance_q31 * | +pDst | +
+ | ) | ++ |
Q31 matrix multiplication (fast variant).
+Q31 matrix multiplication (fast variant) for Cortex-M3 and Cortex-M4.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_mult_opt_q31 | +( | +const arm_matrix_instance_q31 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q31 * | +pSrcB, | +
+ | + | arm_matrix_instance_q31 * | +pDst, | +
+ | + | q31_t * | +pState | +
+ | ) | ++ |
Q31 matrix multiplication.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
[in] | pState | points to the array for storing intermediate results |
arm_status arm_mat_mult_q15 | +( | +const arm_matrix_instance_q15 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q15 * | +pSrcB, | +
+ | + | arm_matrix_instance_q15 * | +pDst, | +
+ | + | q15_t * | +pState | +
+ | ) | ++ |
Q15 matrix multiplication.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
[in] | pState | points to the array for storing intermediate results |
arm_status arm_mat_mult_q31 | +( | +const arm_matrix_instance_q31 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q31 * | +pSrcB, | +
+ | + | arm_matrix_instance_q31 * | +pDst | +
+ | ) | ++ |
Q31 matrix multiplication.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_mult_q7 | +( | +const arm_matrix_instance_q7 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q7 * | +pSrcB, | +
+ | + | arm_matrix_instance_q7 * | +pDst, | +
+ | + | q7_t * | +pState | +
+ | ) | ++ |
Q7 matrix multiplication.
+[in] | *pSrcA | points to the first input matrix structure |
[in] | *pSrcB | points to the second input matrix structure |
[out] | *pDst | points to output matrix structure |
[in] | *pState | points to the array for storing intermediate results (Unused in some versions) |
ARM_MATH_SIZE_MISMATCH
or ARM_MATH_SUCCESS
based on the outcome of size checking.Scaling and Overflow Behavior:
++Functions | |
arm_status | arm_mat_qr_f16 (const arm_matrix_instance_f16 *pSrc, const float16_t threshold, arm_matrix_instance_f16 *pOutR, arm_matrix_instance_f16 *pOutQ, float16_t *pOutTau, float16_t *pTmpA, float16_t *pTmpB) |
QR decomposition of a m x n half floating point matrix with m >= n. | |
arm_status | arm_mat_qr_f32 (const arm_matrix_instance_f32 *pSrc, const float32_t threshold, arm_matrix_instance_f32 *pOutR, arm_matrix_instance_f32 *pOutQ, float32_t *pOutTau, float32_t *pTmpA, float32_t *pTmpB) |
QR decomposition of a m x n floating point matrix with m >= n. | |
arm_status | arm_mat_qr_f64 (const arm_matrix_instance_f64 *pSrc, const float64_t threshold, arm_matrix_instance_f64 *pOutR, arm_matrix_instance_f64 *pOutQ, float64_t *pOutTau, float64_t *pTmpA, float64_t *pTmpB) |
QR decomposition of a m x n double floating point matrix with m >= n. | |
Computes the QR decomposition of a matrix M using Householder algorithm.
++\[ + M = Q R + \] +
+where Q is an orthogonal matrix and R is upper triangular. No pivoting strategy is used.
+The returned value for R is using a format a bit similar to LAPACK : it is not just containing the matrix R but also the Householder reflectors.
+The function is also returning a vector \(\tau\) that is containing the scaling factor for the reflectors.
+Returned value R has the structure:
++\[ + \begin{pmatrix} + r_{11} & r_{12} & \dots & r_{1n} \\ + v_{12} & r_{22} & \dots & r_{2n} \\ + v_{13} & v_{22} & \dots & r_{3n} \\ + \vdots & \vdots & \ddots & \vdots \\ + v_{1m} & v_{2(m-1)} & \dots & r_{mn} \\ + \end{pmatrix} + \] +
+where
++\[ + v_1 = + \begin{pmatrix} + 1 \\ + v_{12} \\ + \vdots \\ + v_{1m} \\ + \end{pmatrix} + \] +
+is the first householder reflector.
+The Householder Matrix is given by \(H_1\)
++\[ + H_1 = I - \tau_1 v_1 v_1^T + \] +
+The Matrix Q is the product of the Householder matrices:
++\[ + Q = H_1 H_2 \dots H_n + \] +
+The computation of the matrix Q by this function is optional.
+And the matrix R, would be the returned value R without the householder reflectors:
++\[ + \begin{pmatrix} + r_{11} & r_{12} & \dots & r_{1n} \\ + 0 & r_{22} & \dots & r_{2n} \\ + 0 & 0 & \dots & r_{3n} \\ + \vdots & \vdots & \ddots & \vdots \\ + 0 & 0 & \dots & r_{mn} \\ + \end{pmatrix} + \] +
+arm_status arm_mat_qr_f16 | +( | +const arm_matrix_instance_f16 * | +pSrc, | +
+ | + | const float16_t | +threshold, | +
+ | + | arm_matrix_instance_f16 * | +pOutR, | +
+ | + | arm_matrix_instance_f16 * | +pOutQ, | +
+ | + | float16_t * | +pOutTau, | +
+ | + | float16_t * | +pTmpA, | +
+ | + | float16_t * | +pTmpB | +
+ | ) | ++ |
QR decomposition of a m x n half floating point matrix with m >= n.
+QR decomposition of a m x n floating point matrix with m >= n.
+[in] | pSrc | points to input matrix structure. The source matrix is modified by the function. |
[in] | threshold | norm2 threshold. + |
[out] | pOutR | points to output R matrix structure of dimension m x n |
[out] | pOutQ | points to output Q matrix structure of dimension m x m (can be NULL) |
[out] | pOutTau | points to Householder scaling factors of dimension n |
[in,out] | pTmpA | points to a temporary vector of dimension m. |
[in,out] | pTmpB | points to a temporary vector of dimension m. |
arm_status arm_mat_qr_f32 | +( | +const arm_matrix_instance_f32 * | +pSrc, | +
+ | + | const float32_t | +threshold, | +
+ | + | arm_matrix_instance_f32 * | +pOutR, | +
+ | + | arm_matrix_instance_f32 * | +pOutQ, | +
+ | + | float32_t * | +pOutTau, | +
+ | + | float32_t * | +pTmpA, | +
+ | + | float32_t * | +pTmpB | +
+ | ) | ++ |
QR decomposition of a m x n floating point matrix with m >= n.
+[in] | pSrc | points to input matrix structure. The source matrix is modified by the function. |
[in] | threshold | norm2 threshold. + |
[out] | pOutR | points to output R matrix structure of dimension m x n |
[out] | pOutQ | points to output Q matrix structure of dimension m x m (can be NULL) |
[out] | pOutTau | points to Householder scaling factors of dimension n |
[in,out] | pTmpA | points to a temporary vector of dimension m. |
[in,out] | pTmpB | points to a temporary vector of dimension m. |
arm_status arm_mat_qr_f64 | +( | +const arm_matrix_instance_f64 * | +pSrc, | +
+ | + | const float64_t | +threshold, | +
+ | + | arm_matrix_instance_f64 * | +pOutR, | +
+ | + | arm_matrix_instance_f64 * | +pOutQ, | +
+ | + | float64_t * | +pOutTau, | +
+ | + | float64_t * | +pTmpA, | +
+ | + | float64_t * | +pTmpB | +
+ | ) | ++ |
QR decomposition of a m x n double floating point matrix with m >= n.
+QR decomposition of a m x n floating point matrix with m >= n.
+[in] | pSrc | points to input matrix structure. The source matrix is modified by the function. |
[in] | threshold | norm2 threshold. + |
[out] | pOutR | points to output R matrix structure of dimension m x n |
[out] | pOutQ | points to output Q matrix structure of dimension m x m (can be NULL) |
[out] | pOutTau | points to Householder scaling factors of dimension n |
[in,out] | pTmpA | points to a temporary vector of dimension m. |
[in,out] | pTmpB | points to a temporary vector of dimension m. |
+Functions | |
arm_status | arm_mat_scale_f16 (const arm_matrix_instance_f16 *pSrc, float16_t scale, arm_matrix_instance_f16 *pDst) |
Floating-point matrix scaling. | |
arm_status | arm_mat_scale_f32 (const arm_matrix_instance_f32 *pSrc, float32_t scale, arm_matrix_instance_f32 *pDst) |
Floating-point matrix scaling. | |
arm_status | arm_mat_scale_q15 (const arm_matrix_instance_q15 *pSrc, q15_t scaleFract, int32_t shift, arm_matrix_instance_q15 *pDst) |
Q15 matrix scaling. | |
arm_status | arm_mat_scale_q31 (const arm_matrix_instance_q31 *pSrc, q31_t scaleFract, int32_t shift, arm_matrix_instance_q31 *pDst) |
Q31 matrix scaling. | |
Multiplies a matrix by a scalar. This is accomplished by multiplying each element in the matrix by the scalar. For example:
++\[ +\begin{pmatrix} +a_{1,1} & a_{1,2} & a_{1,3} \\ +a_{2,1} & a_{2,2} & a_{2,3} \\ +a_{3,1} & a_{3,2} & a_{3,3} \\ +\end{pmatrix} + K = +\begin{pmatrix} + K a_{1,1} & K a_{1,2} & K a_{1,3} \\ + K a_{2,1} & K a_{2,2} & K a_{2,3} \\ + K a_{3,1} & K a_{3,2} & K a_{3,3} \\ +\end{pmatrix} +\] +
+The function checks to make sure that the input and output matrices are of the same size.
+In the fixed-point Q15 and Q31 functions, scale
is represented by a fractional multiplication scaleFract
and an arithmetic shift shift
. The shift allows the gain of the scaling operation to exceed 1.0. The overall scale factor applied to the fixed-point data is
+ scale = scaleFract * 2^shift. +
arm_status arm_mat_scale_f16 | +( | +const arm_matrix_instance_f16 * | +pSrc, | +
+ | + | float16_t | +scale, | +
+ | + | arm_matrix_instance_f16 * | +pDst | +
+ | ) | ++ |
Floating-point matrix scaling.
+[in] | pSrc | points to input matrix |
[in] | scale | scale factor to be applied |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_scale_f32 | +( | +const arm_matrix_instance_f32 * | +pSrc, | +
+ | + | float32_t | +scale, | +
+ | + | arm_matrix_instance_f32 * | +pDst | +
+ | ) | ++ |
Floating-point matrix scaling.
+[in] | pSrc | points to input matrix |
[in] | scale | scale factor to be applied |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_scale_q15 | +( | +const arm_matrix_instance_q15 * | +pSrc, | +
+ | + | q15_t | +scaleFract, | +
+ | + | int32_t | +shift, | +
+ | + | arm_matrix_instance_q15 * | +pDst | +
+ | ) | ++ |
Q15 matrix scaling.
+[in] | pSrc | points to input matrix |
[in] | scaleFract | fractional portion of the scale factor |
[in] | shift | number of bits to shift the result by |
[out] | pDst | points to output matrix structure |
*pSrc
and scaleFract
are in 1.15 format. These are multiplied to yield a 2.30 intermediate result and this is shifted with saturation to 1.15 format. arm_status arm_mat_scale_q31 | +( | +const arm_matrix_instance_q31 * | +pSrc, | +
+ | + | q31_t | +scaleFract, | +
+ | + | int32_t | +shift, | +
+ | + | arm_matrix_instance_q31 * | +pDst | +
+ | ) | ++ |
Q31 matrix scaling.
+[in] | pSrc | points to input matrix |
[in] | scaleFract | fractional portion of the scale factor |
[in] | shift | number of bits to shift the result by |
[out] | pDst | points to output matrix structure |
*pSrc
and scaleFract
are in 1.31 format. These are multiplied to yield a 2.62 intermediate result which is shifted with saturation to 1.31 format. +Functions | |
arm_status | arm_mat_sub_f16 (const arm_matrix_instance_f16 *pSrcA, const arm_matrix_instance_f16 *pSrcB, arm_matrix_instance_f16 *pDst) |
Floating-point matrix subtraction. | |
arm_status | arm_mat_sub_f32 (const arm_matrix_instance_f32 *pSrcA, const arm_matrix_instance_f32 *pSrcB, arm_matrix_instance_f32 *pDst) |
Floating-point matrix subtraction. | |
arm_status | arm_mat_sub_f64 (const arm_matrix_instance_f64 *pSrcA, const arm_matrix_instance_f64 *pSrcB, arm_matrix_instance_f64 *pDst) |
Floating-point matrix subtraction. | |
arm_status | arm_mat_sub_q15 (const arm_matrix_instance_q15 *pSrcA, const arm_matrix_instance_q15 *pSrcB, arm_matrix_instance_q15 *pDst) |
Q15 matrix subtraction. | |
arm_status | arm_mat_sub_q31 (const arm_matrix_instance_q31 *pSrcA, const arm_matrix_instance_q31 *pSrcB, arm_matrix_instance_q31 *pDst) |
Q31 matrix subtraction. | |
Subtract two matrices.
+\[ +\begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ +\end{pmatrix} +- +\begin{pmatrix} + b_{1,1} & b_{1,2} & b_{1,3} \\ + b_{2,1} & b_{2,2} & b_{2,3} \\ + b_{3,1} & b_{3,2} & b_{3,3} \\ +\end{pmatrix} += +\begin{pmatrix} + a_{1,1}-b_{1,1} & a_{1,2}-b_{1,2} & a_{1,3}-b_{1,3} \\ + a_{2,1}-b_{2,1} & a_{2,2}-b_{2,2} & a_{2,3}-b_{2,3} \\ + a_{3,1}-b_{3,1} & a_{3,2}-b_{3,2} & a_{3,3}-b_{3,3} \\ +\end{pmatrix} +\] +
+ The functions check to make sure that pSrcA
, pSrcB
, and pDst
have the same number of rows and columns.
arm_status arm_mat_sub_f16 | +( | +const arm_matrix_instance_f16 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f16 * | +pSrcB, | +
+ | + | arm_matrix_instance_f16 * | +pDst | +
+ | ) | ++ |
Floating-point matrix subtraction.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_sub_f32 | +( | +const arm_matrix_instance_f32 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f32 * | +pSrcB, | +
+ | + | arm_matrix_instance_f32 * | +pDst | +
+ | ) | ++ |
Floating-point matrix subtraction.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_sub_f64 | +( | +const arm_matrix_instance_f64 * | +pSrcA, | +
+ | + | const arm_matrix_instance_f64 * | +pSrcB, | +
+ | + | arm_matrix_instance_f64 * | +pDst | +
+ | ) | ++ |
Floating-point matrix subtraction.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_sub_q15 | +( | +const arm_matrix_instance_q15 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q15 * | +pSrcB, | +
+ | + | arm_matrix_instance_q15 * | +pDst | +
+ | ) | ++ |
Q15 matrix subtraction.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
arm_status arm_mat_sub_q31 | +( | +const arm_matrix_instance_q31 * | +pSrcA, | +
+ | + | const arm_matrix_instance_q31 * | +pSrcB, | +
+ | + | arm_matrix_instance_q31 * | +pDst | +
+ | ) | ++ |
Q31 matrix subtraction.
+[in] | pSrcA | points to the first input matrix structure |
[in] | pSrcB | points to the second input matrix structure |
[out] | pDst | points to output matrix structure |
+Functions | |
arm_status | arm_mat_trans_f16 (const arm_matrix_instance_f16 *pSrc, arm_matrix_instance_f16 *pDst) |
Floating-point matrix transpose. | |
arm_status | arm_mat_trans_f32 (const arm_matrix_instance_f32 *pSrc, arm_matrix_instance_f32 *pDst) |
Floating-point matrix transpose. | |
arm_status | arm_mat_trans_f64 (const arm_matrix_instance_f64 *pSrc, arm_matrix_instance_f64 *pDst) |
Floating-point matrix transpose. | |
arm_status | arm_mat_trans_q15 (const arm_matrix_instance_q15 *pSrc, arm_matrix_instance_q15 *pDst) |
Q15 matrix transpose. | |
arm_status | arm_mat_trans_q31 (const arm_matrix_instance_q31 *pSrc, arm_matrix_instance_q31 *pDst) |
Q31 matrix transpose. | |
arm_status | arm_mat_trans_q7 (const arm_matrix_instance_q7 *pSrc, arm_matrix_instance_q7 *pDst) |
Q7 matrix transpose. | |
Tranposes a matrix.
+Transposing an M x N
matrix flips it around the center diagonal and results in an N x M
matrix.
+\[ +\begin{pmatrix} + a_{1,1} & a_{1,2} & a_{1,3} \\ + a_{2,1} & a_{2,2} & a_{2,3} \\ + a_{3,1} & a_{3,2} & a_{3,3} \\ +\end{pmatrix}^T + = +\begin{pmatrix} + a_{1,1} & a_{2,1} & a_{3,1} \\ + a_{1,2} & a_{2,2} & a_{3,2} \\ + a_{1,3} & a_{2,3} & a_{3,3} \\ +\end{pmatrix} +\] +
+Tranposes a matrix.
+Transposing an M x N
matrix flips it around the center diagonal and results in an N x M
matrix.
arm_status arm_mat_trans_f16 | +( | +const arm_matrix_instance_f16 * | +pSrc, | +
+ | + | arm_matrix_instance_f16 * | +pDst | +
+ | ) | ++ |
Floating-point matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
arm_status arm_mat_trans_f32 | +( | +const arm_matrix_instance_f32 * | +pSrc, | +
+ | + | arm_matrix_instance_f32 * | +pDst | +
+ | ) | ++ |
Floating-point matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
arm_status arm_mat_trans_f64 | +( | +const arm_matrix_instance_f64 * | +pSrc, | +
+ | + | arm_matrix_instance_f64 * | +pDst | +
+ | ) | ++ |
Floating-point matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
arm_status arm_mat_trans_q15 | +( | +const arm_matrix_instance_q15 * | +pSrc, | +
+ | + | arm_matrix_instance_q15 * | +pDst | +
+ | ) | ++ |
Q15 matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
arm_status arm_mat_trans_q31 | +( | +const arm_matrix_instance_q31 * | +pSrc, | +
+ | + | arm_matrix_instance_q31 * | +pDst | +
+ | ) | ++ |
Q31 matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
arm_status arm_mat_trans_q7 | +( | +const arm_matrix_instance_q7 * | +pSrc, | +
+ | + | arm_matrix_instance_q7 * | +pDst | +
+ | ) | ++ |
Q7 matrix transpose.
+[in] | pSrc | points to input matrix |
[out] | pDst | points to output matrix |
+Functions | |
void | arm_mat_vec_mult_f16 (const arm_matrix_instance_f16 *pSrcMat, const float16_t *pVec, float16_t *pDst) |
Floating-point matrix and vector multiplication. | |
void | arm_mat_vec_mult_f32 (const arm_matrix_instance_f32 *pSrcMat, const float32_t *pVec, float32_t *pDst) |
Floating-point matrix and vector multiplication. | |
void | arm_mat_vec_mult_q15 (const arm_matrix_instance_q15 *pSrcMat, const q15_t *pVec, q15_t *pDst) |
Q15 matrix and vector multiplication. | |
void | arm_mat_vec_mult_q31 (const arm_matrix_instance_q31 *pSrcMat, const q31_t *pVec, q31_t *pDst) |
Q31 matrix and vector multiplication. | |
void | arm_mat_vec_mult_q7 (const arm_matrix_instance_q7 *pSrcMat, const q7_t *pVec, q7_t *pDst) |
Q7 matrix and vector multiplication. | |
Multiplies a matrix and a vector.
+void arm_mat_vec_mult_f16 | +( | +const arm_matrix_instance_f16 * | +pSrcMat, | +
+ | + | const float16_t * | +pVec, | +
+ | + | float16_t * | +pDst | +
+ | ) | ++ |
Floating-point matrix and vector multiplication.
+[in] | *pSrcMat | points to the input matrix structure |
[in] | *pVec | points to input vector |
[out] | *pDst | points to output vector |
void arm_mat_vec_mult_f32 | +( | +const arm_matrix_instance_f32 * | +pSrcMat, | +
+ | + | const float32_t * | +pVec, | +
+ | + | float32_t * | +pDst | +
+ | ) | ++ |
Floating-point matrix and vector multiplication.
+[in] | *pSrcMat | points to the input matrix structure |
[in] | *pVec | points to input vector |
[out] | *pDst | points to output vector |
void arm_mat_vec_mult_q15 | +( | +const arm_matrix_instance_q15 * | +pSrcMat, | +
+ | + | const q15_t * | +pVec, | +
+ | + | q15_t * | +pDst | +
+ | ) | ++ |
Q15 matrix and vector multiplication.
+[in] | *pSrcMat | points to the input matrix structure |
[in] | *pVec | points to input vector |
[out] | *pDst | points to output vector |
void arm_mat_vec_mult_q31 | +( | +const arm_matrix_instance_q31 * | +pSrcMat, | +
+ | + | const q31_t * | +pVec, | +
+ | + | q31_t * | +pDst | +
+ | ) | ++ |
Q31 matrix and vector multiplication.
+[in] | *pSrcMat | points to the input matrix structure |
[in] | *pVec | points to the input vector |
[out] | *pDst | points to the output vector |
void arm_mat_vec_mult_q7 | +( | +const arm_matrix_instance_q7 * | +pSrcMat, | +
+ | + | const q7_t * | +pVec, | +
+ | + | q7_t * | +pDst | +
+ | ) | ++ |
Q7 matrix and vector multiplication.
+[in] | *pSrcMat | points to the input matrix structure |
[in] | *pVec | points to the input vector |
[out] | *pDst | points to the output vector |
+Functions | |
void | arm_max_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult, uint32_t *pIndex) |
Maximum value of a floating-point vector. | |
void | arm_max_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex) |
Maximum value of a floating-point vector. | |
void | arm_max_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult, uint32_t *pIndex) |
Maximum value of a floating-point vector. | |
void | arm_max_no_idx_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Maximum value of a floating-point vector. | |
void | arm_max_no_idx_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Maximum value of a floating-point vector. | |
void | arm_max_no_idx_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult) |
Maximum value of a floating-point vector. | |
void | arm_max_no_idx_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult) |
Maximum value of a q15 vector without index. | |
void | arm_max_no_idx_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Maximum value of a q31 vector without index. | |
void | arm_max_no_idx_q7 (const q7_t *pSrc, uint32_t blockSize, q7_t *pResult) |
Maximum value of a q7 vector without index. | |
void | arm_max_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex) |
Maximum value of a Q15 vector. | |
void | arm_max_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex) |
Maximum value of a Q31 vector. | |
void | arm_max_q7 (const q7_t *pSrc, uint32_t blockSize, q7_t *pResult, uint32_t *pIndex) |
Maximum value of a Q7 vector. | |
Computes the maximum value of an array of data. The function returns both the maximum value and its position within the array. There are separate functions for floating-point, Q31, Q15, and Q7 data types.
+void arm_max_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_max_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_max_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_max_no_idx_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
Maximum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_max_no_idx_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Maximum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_max_no_idx_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Maximum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_max_no_idx_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult | +
+ | ) | ++ |
Maximum value of a q15 vector without index.
+Maximum value of a q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_max_no_idx_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Maximum value of a q31 vector without index.
+Maximum value of a q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_max_no_idx_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult | +
+ | ) | ++ |
Maximum value of a q7 vector without index.
+Maximum value of a q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
void arm_max_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_max_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
void arm_max_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Maximum value of a Q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | maximum value returned here |
[out] | pIndex | index of maximum value returned here |
+Functions | |
void | arm_min_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult, uint32_t *pIndex) |
Minimum value of a floating-point vector. | |
void | arm_min_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult, uint32_t *pIndex) |
Minimum value of a floating-point vector. | |
void | arm_min_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult, uint32_t *pIndex) |
Minimum value of a floating-point vector. | |
void | arm_min_no_idx_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Minimum value of a floating-point vector. | |
void | arm_min_no_idx_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Minimum value of a floating-point vector. | |
void | arm_min_no_idx_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult) |
Maximum value of a floating-point vector. | |
void | arm_min_no_idx_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult) |
Minimum value of a q15 vector without index. | |
void | arm_min_no_idx_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Minimum value of a q31 vector without index. | |
void | arm_min_no_idx_q7 (const q7_t *pSrc, uint32_t blockSize, q7_t *pResult) |
Minimum value of a q7 vector without index. | |
void | arm_min_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult, uint32_t *pIndex) |
Minimum value of a Q15 vector. | |
void | arm_min_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult, uint32_t *pIndex) |
Minimum value of a Q31 vector. | |
void | arm_min_q7 (const q7_t *pSrc, uint32_t blockSize, q7_t *pResult, uint32_t *pIndex) |
Minimum value of a Q7 vector. | |
Computes the minimum value of an array of data. The function returns both the minimum value and its position within the array. There are separate functions for floating-point, Q31, Q15, and Q7 data types.
+void arm_min_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_min_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_min_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_min_no_idx_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
Minimum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_min_no_idx_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Minimum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_min_no_idx_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Maximum value of a floating-point vector.
+Minimum value of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_min_no_idx_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult | +
+ | ) | ++ |
Minimum value of a q15 vector without index.
+Minimum value of a q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_min_no_idx_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Minimum value of a q31 vector without index.
+Minimum value of a q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_min_no_idx_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult | +
+ | ) | ++ |
Minimum value of a q7 vector without index.
+Minimum value of a q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
void arm_min_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_min_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
void arm_min_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult, | +
+ | + | uint32_t * | +pIndex | +
+ | ) | ++ |
Minimum value of a Q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | minimum value returned here |
[out] | pIndex | index of minimum value returned here |
+Functions | |
float16_t | arm_minkowski_distance_f16 (const float16_t *pA, const float16_t *pB, int32_t order, uint32_t blockSize) |
Minkowski distance between two vectors. | |
float32_t | arm_minkowski_distance_f32 (const float32_t *pA, const float32_t *pB, int32_t order, uint32_t blockSize) |
Minkowski distance between two vectors. | |
Minkowski distance
+float16_t arm_minkowski_distance_f16 | +( | +const float16_t * | +pA, | +
+ | + | const float16_t * | +pB, | +
+ | + | int32_t | +order, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Minkowski distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | order | Distance order |
[in] | blockSize | Number of samples |
float32_t arm_minkowski_distance_f32 | +( | +const float32_t * | +pA, | +
+ | + | const float32_t * | +pB, | +
+ | + | int32_t | +order, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Minkowski distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | order | Distance order |
[in] | blockSize | Number of samples |
+Content | |
DSP extension specific number definitions | |
Helium specific number definitions | |
Scalar number definitions | |
+Data Structures | |
struct | number_traits< T > |
Properties of a scalar datatype. More... | |
struct | vector_traits< T, arch, typename > |
Properties of a vector datatype linked to a scalar datatype. More... | |
struct | vctpq< T, typename > |
Predicate (only defined for vector architectures) More... | |
Number datatypes expressing different properties of the numbers according to the architecture.
+Those definitions are used to write architecture independents algorithms.
+struct arm_cmsis_dsp::number_traits | +
Properties of a scalar datatype.
+T | datatype |
Needs to contain two static bool : is_float and is_fixed
+Needs to contain a static function one
returning the value 1 for this datatype (used to write some datatype generic algorithms)
struct arm_cmsis_dsp::vector_traits | +
Properties of a vector datatype linked to a scalar datatype.
+T | Type of the scalar |
arch | Architecture. It is defined by the architecture selection code and should never be set by the user. + |
Public Types | |
+typedef T | type |
Scalar datatype. | |
+typedef T | storage_type |
Storage type (for instance for Q15 scalar the storage is int16_t) | |
Static Public Attributes | |
+static constexpr bool | has_vector = false |
True if scalar type has a related vector type. | |
+static constexpr bool | is_float = false |
True if scalar type is a float (half, float or double) | |
+static constexpr bool | is_fixed = false |
True if scalar type is fixed point. | |
struct arm_cmsis_dsp::inner::vctpq | +
Predicate (only defined for vector architectures)
+T | scalar data type |
v | Number of loops |
+Functions | |
void | arm_not_u16 (const uint16_t *pSrc, uint16_t *pDst, uint32_t blockSize) |
Compute the logical bitwise NOT of a fixed-point vector. | |
void | arm_not_u32 (const uint32_t *pSrc, uint32_t *pDst, uint32_t blockSize) |
Compute the logical bitwise NOT of a fixed-point vector. | |
void | arm_not_u8 (const uint8_t *pSrc, uint8_t *pDst, uint32_t blockSize) |
Compute the logical bitwise NOT of a fixed-point vector. | |
Compute the logical bitwise NOT.
+There are separate functions for uint32_t, uint16_t, and uint8_t data types.
+void arm_not_u16 | +( | +const uint16_t * | +pSrc, | +
+ | + | uint16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise NOT of a fixed-point vector.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_not_u32 | +( | +const uint32_t * | +pSrc, | +
+ | + | uint32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise NOT of a fixed-point vector.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_not_u8 | +( | +const uint8_t * | +pSrc, | +
+ | + | uint8_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise NOT of a fixed-point vector.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
void | arm_or_u16 (const uint16_t *pSrcA, const uint16_t *pSrcB, uint16_t *pDst, uint32_t blockSize) |
Compute the logical bitwise OR of two fixed-point vectors. | |
void | arm_or_u32 (const uint32_t *pSrcA, const uint32_t *pSrcB, uint32_t *pDst, uint32_t blockSize) |
Compute the logical bitwise OR of two fixed-point vectors. | |
void | arm_or_u8 (const uint8_t *pSrcA, const uint8_t *pSrcB, uint8_t *pDst, uint32_t blockSize) |
Compute the logical bitwise OR of two fixed-point vectors. | |
Compute the logical bitwise OR.
+There are separate functions for uint32_t, uint16_t, and uint8_t data types.
+void arm_or_u16 | +( | +const uint16_t * | +pSrcA, | +
+ | + | const uint16_t * | +pSrcB, | +
+ | + | uint16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise OR of two fixed-point vectors.
+[in] | pSrcA | points to input vector A |
[in] | pSrcB | points to input vector B |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_or_u32 | +( | +const uint32_t * | +pSrcA, | +
+ | + | const uint32_t * | +pSrcB, | +
+ | + | uint32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise OR of two fixed-point vectors.
+[in] | pSrcA | points to input vector A |
[in] | pSrcB | points to input vector B |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_or_u8 | +( | +const uint8_t * | +pSrcA, | +
+ | + | const uint8_t * | +pSrcB, | +
+ | + | uint8_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise OR of two fixed-point vectors.
+[in] | pSrcA | points to input vector A |
[in] | pSrcB | points to input vector B |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
+Data Structures | |
struct | arm_pid_instance_q15 |
Instance structure for the Q15 PID Control. More... | |
struct | arm_pid_instance_q31 |
Instance structure for the Q31 PID Control. More... | |
struct | arm_pid_instance_f32 |
Instance structure for the floating-point PID Control. More... | |
+Functions | |
float32_t | arm_pid_f32 (arm_pid_instance_f32 *S, float32_t in) |
Process function for the floating-point PID Control. | |
q31_t | arm_pid_q31 (arm_pid_instance_q31 *S, q31_t in) |
Process function for the Q31 PID Control. | |
q15_t | arm_pid_q15 (arm_pid_instance_q15 *S, q15_t in) |
Process function for the Q15 PID Control. | |
void | arm_pid_init_f32 (arm_pid_instance_f32 *S, int32_t resetStateFlag) |
Initialization function for the floating-point PID Control. | |
void | arm_pid_init_q15 (arm_pid_instance_q15 *S, int32_t resetStateFlag) |
Initialization function for the Q15 PID Control. | |
void | arm_pid_init_q31 (arm_pid_instance_q31 *S, int32_t resetStateFlag) |
Initialization function for the Q31 PID Control. | |
void | arm_pid_reset_f32 (arm_pid_instance_f32 *S) |
Reset function for the floating-point PID Control. | |
void | arm_pid_reset_q15 (arm_pid_instance_q15 *S) |
Reset function for the Q15 PID Control. | |
void | arm_pid_reset_q31 (arm_pid_instance_q31 *S) |
Reset function for the Q31 PID Control. | |
A Proportional Integral Derivative (PID) controller is a generic feedback control loop mechanism widely used in industrial control systems. A PID controller is the most commonly used type of feedback controller.
+This set of functions implements (PID) controllers for Q15, Q31, and floating-point data types. The functions operate on a single sample of data and each call to the function returns a single processed value. S
points to an instance of the PID control data structure. in
is the input sample value. The functions return the output value.
+ y[n] = y[n-1] + A0 * x[n] + A1 * x[n-1] + A2 * x[n-2] + A0 = Kp + Ki + Kd + A1 = (-Kp ) - (2 * Kd ) + A2 = Kd +
Kp
is proportional constant, Ki
is Integral constant and Kd
is Derivative constantstruct arm_pid_instance_q15 | +
Instance structure for the Q15 PID Control.
+Data Fields | |
q15_t | A0 |
q15_t | A1 |
q15_t | A2 |
q15_t | state [3] |
q15_t | Kp |
q15_t | Ki |
q15_t | Kd |
q15_t A0 | +
The derived gain, A0 = Kp + Ki + Kd .
+ +q15_t A1 | +
The derived gain A1 = -Kp - 2Kd
+ +q15_t A2 | +
The derived gain A1 = Kd.
+ +q15_t Kd | +
The derivative gain.
+ +q15_t Ki | +
The integral gain.
+ +q15_t Kp | +
The proportional gain.
+ +q15_t state[3] | +
The state array of length 3.
+ +struct arm_pid_instance_q31 | +
Instance structure for the Q31 PID Control.
+Data Fields | |
q31_t | A0 |
q31_t | A1 |
q31_t | A2 |
q31_t | state [3] |
q31_t | Kp |
q31_t | Ki |
q31_t | Kd |
q31_t A0 | +
The derived gain, A0 = Kp + Ki + Kd .
+ +q31_t A1 | +
The derived gain, A1 = -Kp - 2Kd.
+ +q31_t A2 | +
The derived gain, A2 = Kd .
+ +q31_t Kd | +
The derivative gain.
+ +q31_t Ki | +
The integral gain.
+ +q31_t Kp | +
The proportional gain.
+ +q31_t state[3] | +
The state array of length 3.
+ +struct arm_pid_instance_f32 | +
Instance structure for the floating-point PID Control.
+Data Fields | |
float32_t | A0 |
float32_t | A1 |
float32_t | A2 |
float32_t | state [3] |
float32_t | Kp |
float32_t | Ki |
float32_t | Kd |
float32_t A0 | +
The derived gain, A0 = Kp + Ki + Kd .
+ +float32_t A1 | +
The derived gain, A1 = -Kp - 2Kd.
+ +float32_t A2 | +
The derived gain, A2 = Kd .
+ +float32_t Kd | +
The derivative gain.
+ +float32_t Ki | +
The integral gain.
+ +float32_t Kp | +
The proportional gain.
+ +float32_t state[3] | +
The state array of length 3.
+ +float32_t arm_pid_f32 | +( | +arm_pid_instance_f32 * | +S, | +
+ | + | float32_t | +in | +
+ | ) | ++ |
Process function for the floating-point PID Control.
+[in,out] | S | is an instance of the floating-point PID Control structure |
[in] | in | input sample to process |
void arm_pid_init_f32 | +( | +arm_pid_instance_f32 * | +S, | +
+ | + | int32_t | +resetStateFlag | +
+ | ) | ++ |
Initialization function for the floating-point PID Control.
+[in,out] | S | points to an instance of the PID structure |
[in] | resetStateFlag |
|
resetStateFlag
specifies whether to set state to zero or not. A0
, A1
A2
using the proportional gain( Kp
), integral gain( Ki
) and derivative gain( Kd
) also sets the state variables to all zeros. void arm_pid_init_q15 | +( | +arm_pid_instance_q15 * | +S, | +
+ | + | int32_t | +resetStateFlag | +
+ | ) | ++ |
Initialization function for the Q15 PID Control.
+[in,out] | S | points to an instance of the Q15 PID structure |
[in] | resetStateFlag |
|
resetStateFlag
specifies whether to set state to zero or not. A0
, A1
A2
using the proportional gain( Kp
), integral gain( Ki
) and derivative gain( Kd
) also sets the state variables to all zeros. void arm_pid_init_q31 | +( | +arm_pid_instance_q31 * | +S, | +
+ | + | int32_t | +resetStateFlag | +
+ | ) | ++ |
Initialization function for the Q31 PID Control.
+[in,out] | S | points to an instance of the Q31 PID structure |
[in] | resetStateFlag |
|
resetStateFlag
specifies whether to set state to zero or not. A0
, A1
A2
using the proportional gain( Kp
), integral gain( Ki
) and derivative gain( Kd
) also sets the state variables to all zeros. q15_t arm_pid_q15 | +( | +arm_pid_instance_q15 * | +S, | +
+ | + | q15_t | +in | +
+ | ) | ++ |
Process function for the Q15 PID Control.
+[in,out] | S | points to an instance of the Q15 PID Control structure |
[in] | in | input sample to process |
q31_t arm_pid_q31 | +( | +arm_pid_instance_q31 * | +S, | +
+ | + | q31_t | +in | +
+ | ) | ++ |
Process function for the Q31 PID Control.
+[in,out] | S | points to an instance of the Q31 PID Control structure |
[in] | in | input sample to process |
void arm_pid_reset_f32 | +( | +arm_pid_instance_f32 * | +S | ) | ++ |
Reset function for the floating-point PID Control.
+[in,out] | S | points to an instance of the floating-point PID structure |
void arm_pid_reset_q15 | +( | +arm_pid_instance_q15 * | +S | ) | ++ |
Reset function for the Q15 PID Control.
+[in,out] | S | points to an instance of the Q15 PID structure |
void arm_pid_reset_q31 | +( | +arm_pid_instance_q31 * | +S | ) | ++ |
Reset function for the Q31 PID Control.
+[in,out] | S | points to an instance of the Q31 PID structure |
+Functions | |
arm_status | arm_conv_partial_f32 (const float32_t *pSrcA, uint32_t srcALen, const float32_t *pSrcB, uint32_t srcBLen, float32_t *pDst, uint32_t firstIndex, uint32_t numPoints) |
Partial convolution of floating-point sequences. | |
arm_status | arm_conv_partial_fast_opt_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints, q15_t *pScratch1, q15_t *pScratch2) |
Partial convolution of Q15 sequences (fast version). | |
arm_status | arm_conv_partial_fast_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints) |
Partial convolution of Q15 sequences (fast version). | |
arm_status | arm_conv_partial_fast_q31 (const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst, uint32_t firstIndex, uint32_t numPoints) |
Partial convolution of Q31 sequences (fast version). | |
arm_status | arm_conv_partial_opt_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints, q15_t *pScratch1, q15_t *pScratch2) |
Partial convolution of Q15 sequences. | |
arm_status | arm_conv_partial_opt_q7 (const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, uint32_t firstIndex, uint32_t numPoints, q15_t *pScratch1, q15_t *pScratch2) |
Partial convolution of Q7 sequences. | |
arm_status | arm_conv_partial_q15 (const q15_t *pSrcA, uint32_t srcALen, const q15_t *pSrcB, uint32_t srcBLen, q15_t *pDst, uint32_t firstIndex, uint32_t numPoints) |
Partial convolution of Q15 sequences. | |
arm_status | arm_conv_partial_q31 (const q31_t *pSrcA, uint32_t srcALen, const q31_t *pSrcB, uint32_t srcBLen, q31_t *pDst, uint32_t firstIndex, uint32_t numPoints) |
Partial convolution of Q31 sequences. | |
arm_status | arm_conv_partial_q7 (const q7_t *pSrcA, uint32_t srcALen, const q7_t *pSrcB, uint32_t srcBLen, q7_t *pDst, uint32_t firstIndex, uint32_t numPoints) |
Partial convolution of Q7 sequences. | |
Partial Convolution is equivalent to Convolution except that a subset of the output samples is generated. Each function has two additional arguments. firstIndex
specifies the starting index of the subset of output samples. numPoints
is the number of output samples to compute. The function computes the output in the range [firstIndex, ..., firstIndex+numPoints-1]
. The output array pDst
contains numPoints
values.
The allowable range of output indices is [0 srcALen+srcBLen-2]. If the requested subset does not fall in this range then the functions return ARM_MATH_ARGUMENT_ERROR. Otherwise the functions return ARM_MATH_SUCCESS.
arm_status arm_conv_partial_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +firstIndex, | +
+ | + | uint32_t | +numPoints | +
+ | ) | ++ |
Partial convolution of floating-point sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written |
[in] | firstIndex | is the first output sample to start with |
[in] | numPoints | is the number of output points to be computed |
arm_status arm_conv_partial_fast_opt_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +firstIndex, | +
+ | + | uint32_t | +numPoints, | +
+ | + | q15_t * | +pScratch1, | +
+ | + | q15_t * | +pScratch2 | +
+ | ) | ++ |
Partial convolution of Q15 sequences (fast version).
+Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written |
[in] | firstIndex | is the first output sample to start with |
[in] | numPoints | is the number of output points to be computed |
[in] | pScratch1 | points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2 |
[in] | pScratch2 | points to scratch buffer of size min(srcALen, srcBLen) |
arm_status arm_conv_partial_fast_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +firstIndex, | +
+ | + | uint32_t | +numPoints | +
+ | ) | ++ |
Partial convolution of Q15 sequences (fast version).
+Partial convolution of Q15 sequences (fast version) for Cortex-M3 and Cortex-M4.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written |
[in] | firstIndex | is the first output sample to start with |
[in] | numPoints | is the number of output points to be computed |
arm_status arm_conv_partial_fast_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +firstIndex, | +
+ | + | uint32_t | +numPoints | +
+ | ) | ++ |
Partial convolution of Q31 sequences (fast version).
+Partial convolution of Q31 sequences (fast version) for Cortex-M3 and Cortex-M4.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written |
[in] | firstIndex | is the first output sample to start with |
[in] | numPoints | is the number of output points to be computed |
arm_status arm_conv_partial_opt_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +firstIndex, | +
+ | + | uint32_t | +numPoints, | +
+ | + | q15_t * | +pScratch1, | +
+ | + | q15_t * | +pScratch2 | +
+ | ) | ++ |
Partial convolution of Q15 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written |
[in] | firstIndex | is the first output sample to start with |
[in] | numPoints | is the number of output points to be computed |
[in] | pScratch1 | points to scratch buffer of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
[in] | pScratch2 | points to scratch buffer of size min(srcALen, srcBLen). |
arm_status arm_conv_partial_opt_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +firstIndex, | +
+ | + | uint32_t | +numPoints, | +
+ | + | q15_t * | +pScratch1, | +
+ | + | q15_t * | +pScratch2 | +
+ | ) | ++ |
Partial convolution of Q7 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written |
[in] | firstIndex | is the first output sample to start with |
[in] | numPoints | is the number of output points to be computed |
[in] | pScratch1 | points to scratch buffer(of type q15_t) of size max(srcALen, srcBLen) + 2*min(srcALen, srcBLen) - 2. |
[in] | pScratch2 | points to scratch buffer (of type q15_t) of size min(srcALen, srcBLen). |
arm_status arm_conv_partial_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +firstIndex, | +
+ | + | uint32_t | +numPoints | +
+ | ) | ++ |
Partial convolution of Q15 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written |
[in] | firstIndex | is the first output sample to start with |
[in] | numPoints | is the number of output points to be computed |
arm_status arm_conv_partial_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +firstIndex, | +
+ | + | uint32_t | +numPoints | +
+ | ) | ++ |
Partial convolution of Q31 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written |
[in] | firstIndex | is the first output sample to start with |
[in] | numPoints | is the number of output points to be computed |
arm_status arm_conv_partial_q7 | +( | +const q7_t * | +pSrcA, | +
+ | + | uint32_t | +srcALen, | +
+ | + | const q7_t * | +pSrcB, | +
+ | + | uint32_t | +srcBLen, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +firstIndex, | +
+ | + | uint32_t | +numPoints | +
+ | ) | ++ |
Partial convolution of Q7 sequences.
+[in] | pSrcA | points to the first input sequence |
[in] | srcALen | length of the first input sequence |
[in] | pSrcB | points to the second input sequence |
[in] | srcBLen | length of the second input sequence |
[out] | pDst | points to the location where the output result is written |
[in] | firstIndex | is the first output sample to start with |
[in] | numPoints | is the number of output points to be computed |
+Functions | |
void | arm_quaternion_conjugate_f32 (const float32_t *pInputQuaternions, float32_t *pConjugateQuaternions, uint32_t nbQuaternions) |
Floating-point quaternion conjugates. | |
Compute the conjugate of a quaternion.
+void arm_quaternion_conjugate_f32 | +( | +const float32_t * | +pInputQuaternions, | +
+ | + | float32_t * | +pConjugateQuaternions, | +
+ | + | uint32_t | +nbQuaternions | +
+ | ) | ++ |
Floating-point quaternion conjugates.
+[in] | pInputQuaternions | points to the input vector of quaternions |
[out] | pConjugateQuaternions | points to the output vector of conjugate quaternions |
[in] | nbQuaternions | number of quaternions in each vector |
+Content | |
Quaternion to Rotation | |
Rotation to Quaternion | |
Conversions between quaternion and rotation representations.
++Functions | |
void | arm_quaternion_inverse_f32 (const float32_t *pInputQuaternions, float32_t *pInverseQuaternions, uint32_t nbQuaternions) |
Floating-point quaternion inverse. | |
Compute the inverse of a quaternion.
+void arm_quaternion_inverse_f32 | +( | +const float32_t * | +pInputQuaternions, | +
+ | + | float32_t * | +pInverseQuaternions, | +
+ | + | uint32_t | +nbQuaternions | +
+ | ) | ++ |
Floating-point quaternion inverse.
+[in] | pInputQuaternions | points to the input vector of quaternions |
[out] | pInverseQuaternions | points to the output vector of inverse quaternions |
[in] | nbQuaternions | number of quaternions in each vector |
+Functions | |
void | arm_quaternion_norm_f32 (const float32_t *pInputQuaternions, float32_t *pNorms, uint32_t nbQuaternions) |
Floating-point quaternion Norm. | |
Compute the norm of a quaternion.
+void arm_quaternion_norm_f32 | +( | +const float32_t * | +pInputQuaternions, | +
+ | + | float32_t * | +pNorms, | +
+ | + | uint32_t | +nbQuaternions | +
+ | ) | ++ |
Floating-point quaternion Norm.
+[in] | pInputQuaternions | points to the input vector of quaternions |
[out] | pNorms | points to the output vector of norms |
[in] | nbQuaternions | number of quaternions in the input vector |
+Functions | |
void | arm_quaternion_normalize_f32 (const float32_t *pInputQuaternions, float32_t *pNormalizedQuaternions, uint32_t nbQuaternions) |
Floating-point normalization of quaternions. | |
Compute a normalized quaternion.
+void arm_quaternion_normalize_f32 | +( | +const float32_t * | +pInputQuaternions, | +
+ | + | float32_t * | +pNormalizedQuaternions, | +
+ | + | uint32_t | +nbQuaternions | +
+ | ) | ++ |
Floating-point normalization of quaternions.
+[in] | pInputQuaternions | points to the input vector of quaternions |
[out] | pNormalizedQuaternions | points to the output vector of normalized quaternions |
[in] | nbQuaternions | number of quaternions in each vector |
+Content | |
Elementwise Quaternion Product | |
Quaternion Product | |
Compute the product of quaternions.
++Functions | |
void | arm_quaternion_product_single_f32 (const float32_t *qa, const float32_t *qb, float32_t *qr) |
Floating-point product of two quaternions. | |
Compute the product of two quaternions.
+void arm_quaternion_product_single_f32 | +( | +const float32_t * | +qa, | +
+ | + | const float32_t * | +qb, | +
+ | + | float32_t * | +qr | +
+ | ) | ++ |
Floating-point product of two quaternions.
+[in] | qa | first quaternion |
[in] | qb | second quaternion |
[out] | qr | product of two quaternions |
+Functions | |
void | arm_quaternion_product_f32 (const float32_t *qa, const float32_t *qb, float32_t *qr, uint32_t nbQuaternions) |
Floating-point elementwise product two quaternions. | |
Compute the elementwise product of quaternions.
+void arm_quaternion_product_f32 | +( | +const float32_t * | +qa, | +
+ | + | const float32_t * | +qb, | +
+ | + | float32_t * | +qr, | +
+ | + | uint32_t | +nbQuaternions | +
+ | ) | ++ |
Floating-point elementwise product two quaternions.
+[in] | qa | first array of quaternions |
[in] | qb | second array of quaternions |
[out] | qr | elementwise product of quaternions |
[in] | nbQuaternions | number of quaternions in the array |
+Functions | |
void | arm_quaternion2rotation_f32 (const float32_t *pInputQuaternions, float32_t *pOutputRotations, uint32_t nbQuaternions) |
Conversion of quaternion to equivalent rotation matrix. | |
Conversions from quaternion to rotation.
+void arm_quaternion2rotation_f32 | +( | +const float32_t * | +pInputQuaternions, | +
+ | + | float32_t * | +pOutputRotations, | +
+ | + | uint32_t | +nbQuaternions | +
+ | ) | ++ |
Conversion of quaternion to equivalent rotation matrix.
+[in] | pInputQuaternions | points to an array of normalized quaternions |
[out] | pOutputRotations | points to an array of 3x3 rotations (in row order) |
[in] | nbQuaternions | number of quaternions in the array |
The quaternion a + ib + jc + kd is converted into rotation matrix:
+ a^2 + b^2 - c^2 - d^2 2bc - 2ad 2bd + 2ac + 2bc + 2ad a^2 - b^2 + c^2 - d^2 2cd - 2ab + 2bd - 2ac 2cd + 2ab a^2 - b^2 - c^2 + d^2 +
Rotation matrix is saved in row order : R00 R01 R02 R10 R11 R12 R20 R21 R22
+ ++Functions | |
void | arm_rms_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Root Mean Square of the elements of a floating-point vector. | |
void | arm_rms_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Root Mean Square of the elements of a floating-point vector. | |
void | arm_rms_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult) |
Root Mean Square of the elements of a Q15 vector. | |
void | arm_rms_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Root Mean Square of the elements of a Q31 vector. | |
Calculates the Root Mean Square of the elements in the input vector. The underlying algorithm is used:
++ Result = sqrt(((pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] * pSrc[blockSize-1]) / blockSize)); +
There are separate functions for floating point, Q31, and Q15 data types.
+void arm_rms_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
Root Mean Square of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | root mean square value returned here |
void arm_rms_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Root Mean Square of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | root mean square value returned here |
void arm_rms_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult | +
+ | ) | ++ |
Root Mean Square of the elements of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | root mean square value returned here |
void arm_rms_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Root Mean Square of the elements of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | root mean square value returned here |
+Content | |
Real FFT F16 Functions | |
Real FFT F64 Functions | |
Real FFT Q15 Functions | |
Real FFT Q31 Functions | |
Real FFT Tables | |
Real FFT F32 Functions | |
Deprecated Real FFT Functions | |
+ arm_rfft_instance_q31 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft}; + arm_rfft_instance_q15 S = {fftLenReal, fftLenBy2, ifftFlagR, bitReverseFlagR, twidCoefRModifier, pTwiddleAReal, pTwiddleBReal, pCfft}; +where
fftLenReal
is the length of the real transform; fftLenBy2
length of the internal complex transform (fftLenReal/2). ifftFlagR
Selects forward (=0) or inverse (=1) transform. bitReverseFlagR
Selects bit reversed output (=0) or normal order output (=1). twidCoefRModifier
stride modifier for the twiddle factor table. The value is based on the FFT length; pTwiddleAReal
points to the A array of twiddle coefficients; pTwiddleBReal
points to the B array of twiddle coefficients; pCfft
points to the CFFT Instance structure. The CFFT structure must also be initialized. +Functions | |
void | arm_rfft_fast_f16 (const arm_rfft_fast_instance_f16 *S, float16_t *p, float16_t *pOut, uint8_t ifftFlag) |
Processing function for the floating-point real FFT. | |
arm_status | arm_rfft_fast_init_32_f16 (arm_rfft_fast_instance_f16 *S) |
Initialization function for the 32pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_64_f16 (arm_rfft_fast_instance_f16 *S) |
Initialization function for the 64pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_128_f16 (arm_rfft_fast_instance_f16 *S) |
Initialization function for the 128pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_256_f16 (arm_rfft_fast_instance_f16 *S) |
Initialization function for the 256pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_512_f16 (arm_rfft_fast_instance_f16 *S) |
Initialization function for the 512pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_1024_f16 (arm_rfft_fast_instance_f16 *S) |
Initialization function for the 1024pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_2048_f16 (arm_rfft_fast_instance_f16 *S) |
Initialization function for the 2048pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_4096_f16 (arm_rfft_fast_instance_f16 *S) |
Initialization function for the 4096pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_f16 (arm_rfft_fast_instance_f16 *S, uint16_t fftLen) |
Generic initialization function for the floating-point real FFT. | |
void arm_rfft_fast_f16 | +( | +const arm_rfft_fast_instance_f16 * | +S, | +
+ | + | float16_t * | +p, | +
+ | + | float16_t * | +pOut, | +
+ | + | uint8_t | +ifftFlag | +
+ | ) | ++ |
Processing function for the floating-point real FFT.
+[in] | S | points to an arm_rfft_fast_instance_f16 structure |
[in] | p | points to input buffer (Source buffer is modified by this function.) |
[in] | pOut | points to output buffer |
[in] | ifftFlag |
|
arm_status arm_rfft_fast_init_1024_f16 | +( | +arm_rfft_fast_instance_f16 * | +S | ) | ++ |
Initialization function for the 1024pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f16 structure |
arm_status arm_rfft_fast_init_128_f16 | +( | +arm_rfft_fast_instance_f16 * | +S | ) | ++ |
Initialization function for the 128pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f16 structure |
arm_status arm_rfft_fast_init_2048_f16 | +( | +arm_rfft_fast_instance_f16 * | +S | ) | ++ |
Initialization function for the 2048pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f16 structure |
arm_status arm_rfft_fast_init_256_f16 | +( | +arm_rfft_fast_instance_f16 * | +S | ) | ++ |
Initialization function for the 256pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f16 structure |
arm_status arm_rfft_fast_init_32_f16 | +( | +arm_rfft_fast_instance_f16 * | +S | ) | ++ |
Initialization function for the 32pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f16 structure |
arm_status arm_rfft_fast_init_4096_f16 | +( | +arm_rfft_fast_instance_f16 * | +S | ) | ++ |
Initialization function for the 4096pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f16 structure |
arm_status arm_rfft_fast_init_512_f16 | +( | +arm_rfft_fast_instance_f16 * | +S | ) | ++ |
Initialization function for the 512pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f16 structure |
arm_status arm_rfft_fast_init_64_f16 | +( | +arm_rfft_fast_instance_f16 * | +S | ) | ++ |
Initialization function for the 64pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f16 structure |
arm_status arm_rfft_fast_init_f16 | +( | +arm_rfft_fast_instance_f16 * | +S, | +
+ | + | uint16_t | +fftLen | +
+ | ) | ++ |
Generic initialization function for the floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f16 structure |
[in] | fftLen | length of the Real Sequence |
fftLen
is not a supported lengthfftLen
specifies the length of RFFT/CIFFT process. Supported FFT Lengths are 32, 64, 128, 256, 512, 1024, 2048, 4096.+Functions | |
void | arm_rfft_fast_f32 (const arm_rfft_fast_instance_f32 *S, float32_t *p, float32_t *pOut, uint8_t ifftFlag) |
Processing function for the floating-point real FFT. | |
arm_status | arm_rfft_fast_init_32_f32 (arm_rfft_fast_instance_f32 *S) |
Initialization function for the 32pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_64_f32 (arm_rfft_fast_instance_f32 *S) |
Initialization function for the 64pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_128_f32 (arm_rfft_fast_instance_f32 *S) |
Initialization function for the 128pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_256_f32 (arm_rfft_fast_instance_f32 *S) |
Initialization function for the 256pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_512_f32 (arm_rfft_fast_instance_f32 *S) |
Initialization function for the 512pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_1024_f32 (arm_rfft_fast_instance_f32 *S) |
Initialization function for the 1024pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_2048_f32 (arm_rfft_fast_instance_f32 *S) |
Initialization function for the 2048pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_4096_f32 (arm_rfft_fast_instance_f32 *S) |
Initialization function for the 4096pt floating-point real FFT. | |
arm_status | arm_rfft_fast_init_f32 (arm_rfft_fast_instance_f32 *S, uint16_t fftLen) |
Generic initialization function for the floating-point real FFT. | |
void arm_rfft_fast_f32 | +( | +const arm_rfft_fast_instance_f32 * | +S, | +
+ | + | float32_t * | +p, | +
+ | + | float32_t * | +pOut, | +
+ | + | uint8_t | +ifftFlag | +
+ | ) | ++ |
Processing function for the floating-point real FFT.
+[in] | S | points to an arm_rfft_fast_instance_f32 structure |
[in] | p | points to input buffer (Source buffer is modified by this function.) |
[in] | pOut | points to output buffer |
[in] | ifftFlag |
|
arm_status arm_rfft_fast_init_1024_f32 | +( | +arm_rfft_fast_instance_f32 * | +S | ) | ++ |
Initialization function for the 1024pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f32 structure |
arm_status arm_rfft_fast_init_128_f32 | +( | +arm_rfft_fast_instance_f32 * | +S | ) | ++ |
Initialization function for the 128pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f32 structure |
arm_status arm_rfft_fast_init_2048_f32 | +( | +arm_rfft_fast_instance_f32 * | +S | ) | ++ |
Initialization function for the 2048pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f32 structure |
arm_status arm_rfft_fast_init_256_f32 | +( | +arm_rfft_fast_instance_f32 * | +S | ) | ++ |
Initialization function for the 256pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f32 structure |
arm_status arm_rfft_fast_init_32_f32 | +( | +arm_rfft_fast_instance_f32 * | +S | ) | ++ |
Initialization function for the 32pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f32 structure |
arm_status arm_rfft_fast_init_4096_f32 | +( | +arm_rfft_fast_instance_f32 * | +S | ) | ++ |
Initialization function for the 4096pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f32 structure |
arm_status arm_rfft_fast_init_512_f32 | +( | +arm_rfft_fast_instance_f32 * | +S | ) | ++ |
Initialization function for the 512pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f32 structure |
arm_status arm_rfft_fast_init_64_f32 | +( | +arm_rfft_fast_instance_f32 * | +S | ) | ++ |
Initialization function for the 64pt floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f32 structure |
arm_status arm_rfft_fast_init_f32 | +( | +arm_rfft_fast_instance_f32 * | +S, | +
+ | + | uint16_t | +fftLen | +
+ | ) | ++ |
Generic initialization function for the floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f32 structure |
[in] | fftLen | length of the Real Sequence |
fftLen
is not a supported lengthfftLen
specifies the length of RFFT/CIFFT process. Supported FFT Lengths are 32, 64, 128, 256, 512, 1024, 2048, 4096.+Functions | |
void | arm_rfft_fast_f64 (arm_rfft_fast_instance_f64 *S, float64_t *p, float64_t *pOut, uint8_t ifftFlag) |
Processing function for the Double Precision floating-point real FFT. | |
arm_status | arm_rfft_fast_init_32_f64 (arm_rfft_fast_instance_f64 *S) |
Initialization function for the 32pt double precision floating-point real FFT. | |
arm_status | arm_rfft_fast_init_64_f64 (arm_rfft_fast_instance_f64 *S) |
Initialization function for the 64pt Double Precision floating-point real FFT. | |
arm_status | arm_rfft_fast_init_128_f64 (arm_rfft_fast_instance_f64 *S) |
Initialization function for the 128pt Double Precision floating-point real FFT. | |
arm_status | arm_rfft_fast_init_256_f64 (arm_rfft_fast_instance_f64 *S) |
Initialization function for the 256pt Double Precision floating-point real FFT. | |
arm_status | arm_rfft_fast_init_512_f64 (arm_rfft_fast_instance_f64 *S) |
Initialization function for the 512pt Double Precision floating-point real FFT. | |
arm_status | arm_rfft_fast_init_1024_f64 (arm_rfft_fast_instance_f64 *S) |
Initialization function for the 1024pt Double Precision floating-point real FFT. | |
arm_status | arm_rfft_fast_init_2048_f64 (arm_rfft_fast_instance_f64 *S) |
Initialization function for the 2048pt Double Precision floating-point real FFT. | |
arm_status | arm_rfft_fast_init_4096_f64 (arm_rfft_fast_instance_f64 *S) |
Initialization function for the 4096pt Double Precision floating-point real FFT. | |
arm_status | arm_rfft_fast_init_f64 (arm_rfft_fast_instance_f64 *S, uint16_t fftLen) |
Generic initialization function for the Double Precision floating-point real FFT. | |
void arm_rfft_fast_f64 | +( | +arm_rfft_fast_instance_f64 * | +S, | +
+ | + | float64_t * | +p, | +
+ | + | float64_t * | +pOut, | +
+ | + | uint8_t | +ifftFlag | +
+ | ) | ++ |
Processing function for the Double Precision floating-point real FFT.
+[in] | S | points to an arm_rfft_fast_instance_f64 structure |
[in] | p | points to input buffer (Source buffer is modified by this function.) |
[in] | pOut | points to output buffer |
[in] | ifftFlag |
|
arm_status arm_rfft_fast_init_1024_f64 | +( | +arm_rfft_fast_instance_f64 * | +S | ) | ++ |
Initialization function for the 1024pt Double Precision floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f64 structure |
arm_status arm_rfft_fast_init_128_f64 | +( | +arm_rfft_fast_instance_f64 * | +S | ) | ++ |
Initialization function for the 128pt Double Precision floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f64 structure |
arm_status arm_rfft_fast_init_2048_f64 | +( | +arm_rfft_fast_instance_f64 * | +S | ) | ++ |
Initialization function for the 2048pt Double Precision floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f64 structure |
arm_status arm_rfft_fast_init_256_f64 | +( | +arm_rfft_fast_instance_f64 * | +S | ) | ++ |
Initialization function for the 256pt Double Precision floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f64 structure |
arm_status arm_rfft_fast_init_32_f64 | +( | +arm_rfft_fast_instance_f64 * | +S | ) | ++ |
Initialization function for the 32pt double precision floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f64 structure |
arm_status arm_rfft_fast_init_4096_f64 | +( | +arm_rfft_fast_instance_f64 * | +S | ) | ++ |
Initialization function for the 4096pt Double Precision floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f64 structure |
arm_status arm_rfft_fast_init_512_f64 | +( | +arm_rfft_fast_instance_f64 * | +S | ) | ++ |
Initialization function for the 512pt Double Precision floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f64 structure |
arm_status arm_rfft_fast_init_64_f64 | +( | +arm_rfft_fast_instance_f64 * | +S | ) | ++ |
Initialization function for the 64pt Double Precision floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f64 structure |
arm_status arm_rfft_fast_init_f64 | +( | +arm_rfft_fast_instance_f64 * | +S, | +
+ | + | uint16_t | +fftLen | +
+ | ) | ++ |
Generic initialization function for the Double Precision floating-point real FFT.
+[in,out] | S | points to an arm_rfft_fast_instance_f64 structure |
[in] | fftLen | length of the Real Sequence |
fftLen
is not a supported lengthfftLen
specifies the length of RFFT/CIFFT process. Supported FFT Lengths are 32, 64, 128, 256, 512, 1024, 2048, 4096.+Functions | |
arm_status | arm_rfft_init_8192_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 8192 pt Q15 real FFT. | |
arm_status | arm_rfft_init_4096_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 4096 pt Q15 real FFT. | |
arm_status | arm_rfft_init_2048_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 2048 pt Q15 real FFT. | |
arm_status | arm_rfft_init_1024_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 1024 pt Q15 real FFT. | |
arm_status | arm_rfft_init_512_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 512 pt Q15 real FFT. | |
arm_status | arm_rfft_init_256_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 256 pt Q15 real FFT. | |
arm_status | arm_rfft_init_128_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 128 pt Q15 real FFT. | |
arm_status | arm_rfft_init_64_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 64 pt Q15 real FFT. | |
arm_status | arm_rfft_init_32_q15 (arm_rfft_instance_q15 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 32 pt Q15 real FFT. | |
arm_status | arm_rfft_init_q15 (arm_rfft_instance_q15 *S, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Generic initialization function for the Q15 RFFT/RIFFT. | |
void | arm_rfft_q15 (const arm_rfft_instance_q15 *S, q15_t *pSrc, q15_t *pDst) |
Processing function for the Q15 RFFT/RIFFT. | |
arm_status arm_rfft_init_1024_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 1024 pt Q15 real FFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_128_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 128 pt Q15 real FFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_2048_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 2048 pt Q15 real FFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_256_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 256 pt Q15 real FFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_32_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 32 pt Q15 real FFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_4096_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 4096 pt Q15 real FFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_512_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 512 pt Q15 real FFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_64_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 64 pt Q15 real FFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_8192_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 8192 pt Q15 real FFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_q15 | +( | +arm_rfft_instance_q15 * | +S, | +
+ | + | uint32_t | +fftLenReal, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Generic initialization function for the Q15 RFFT/RIFFT.
+[in,out] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | fftLenReal | length of the FFT |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthfftLenReal
specifies length of RFFT/RIFFT Process. Supported FFT Lengths are 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192. ifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. void arm_rfft_q15 | +( | +const arm_rfft_instance_q15 * | +S, | +
+ | + | q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst | +
+ | ) | ++ |
Processing function for the Q15 RFFT/RIFFT.
+[in] | S | points to an instance of the Q15 RFFT/RIFFT structure |
[in] | pSrc | points to input buffer (Source buffer is modified by this function.) |
[out] | pDst | points to output buffer |
RFFT Size | Input Format | Output Format | Number of bits to upscale |
---|---|---|---|
32 | 1.15 | 6.10 | 5 |
64 | 1.15 | 7.9 | 6 |
128 | 1.15 | 8.8 | 7 |
256 | 1.15 | 9.7 | 8 |
512 | 1.15 | 10.6 | 9 |
1024 | 1.15 | 11.5 | 10 |
2048 | 1.15 | 12.4 | 11 |
4096 | 1.15 | 13.3 | 12 |
8192 | 1.15 | 14.2 | 13 |
RIFFT Size | Input Format | Output Format | Number of bits to upscale |
---|---|---|---|
32 | 1.15 | 6.10 | 0 |
64 | 1.15 | 7.9 | 0 |
128 | 1.15 | 8.8 | 0 |
256 | 1.15 | 9.7 | 0 |
512 | 1.15 | 10.6 | 0 |
1024 | 1.15 | 11.5 | 0 |
2048 | 1.15 | 12.4 | 0 |
4096 | 1.15 | 13.3 | 0 |
8192 | 1.15 | 14.2 | 0 |
+Functions | |
arm_status | arm_rfft_init_8192_q31 (arm_rfft_instance_q31 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 8192 pt Q31 real FFT. | |
arm_status | arm_rfft_init_4096_q31 (arm_rfft_instance_q31 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 4096 pt Q31 real FFT. | |
arm_status | arm_rfft_init_2048_q31 (arm_rfft_instance_q31 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 2048 pt Q31 real FFT. | |
arm_status | arm_rfft_init_1024_q31 (arm_rfft_instance_q31 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 1024 pt Q31 real FFT. | |
arm_status | arm_rfft_init_512_q31 (arm_rfft_instance_q31 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 512 pt Q31 real FFT. | |
arm_status | arm_rfft_init_256_q31 (arm_rfft_instance_q31 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 256 pt Q31 real FFT. | |
arm_status | arm_rfft_init_128_q31 (arm_rfft_instance_q31 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 128 pt Q31 real FFT. | |
arm_status | arm_rfft_init_64_q31 (arm_rfft_instance_q31 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 64 pt Q31 real FFT. | |
arm_status | arm_rfft_init_32_q31 (arm_rfft_instance_q31 *S, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Initialization function for the 32 pt Q31 real FFT. | |
arm_status | arm_rfft_init_q31 (arm_rfft_instance_q31 *S, uint32_t fftLenReal, uint32_t ifftFlagR, uint32_t bitReverseFlag) |
Generic initialization function for the Q31 RFFT/RIFFT. | |
void | arm_rfft_q31 (const arm_rfft_instance_q31 *S, q31_t *pSrc, q31_t *pDst) |
Processing function for the Q31 RFFT/RIFFT. | |
arm_status arm_rfft_init_1024_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 1024 pt Q31 real FFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_128_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 128 pt Q31 real FFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_2048_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 2048 pt Q31 real FFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_256_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 256 pt Q31 real FFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_32_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 32 pt Q31 real FFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_4096_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 4096 pt Q31 real FFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_512_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 512 pt Q31 real FFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_64_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 64 pt Q31 real FFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_8192_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Initialization function for the 8192 pt Q31 real FFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. arm_status arm_rfft_init_q31 | +( | +arm_rfft_instance_q31 * | +S, | +
+ | + | uint32_t | +fftLenReal, | +
+ | + | uint32_t | +ifftFlagR, | +
+ | + | uint32_t | +bitReverseFlag | +
+ | ) | ++ |
Generic initialization function for the Q31 RFFT/RIFFT.
+[in,out] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | fftLenReal | length of the FFT |
[in] | ifftFlagR | flag that selects transform direction
|
[in] | bitReverseFlag | flag that enables / disables bit reversal of output
|
fftLenReal
is not a supported lengthfftLenReal
specifies length of RFFT/RIFFT Process. Supported FFT Lengths are 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192. ifftFlagR
controls whether a forward or inverse transform is computed. Set(=1) ifftFlagR to calculate RIFFT, otherwise RFFT is calculated. bitReverseFlag
controls whether output is in normal order or bit reversed order. Set(=1) bitReverseFlag for output to be in normal order otherwise output is in bit reversed order. void arm_rfft_q31 | +( | +const arm_rfft_instance_q31 * | +S, | +
+ | + | q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst | +
+ | ) | ++ |
Processing function for the Q31 RFFT/RIFFT.
+[in] | S | points to an instance of the Q31 RFFT/RIFFT structure |
[in] | pSrc | points to input buffer (Source buffer is modified by this function) |
[out] | pDst | points to output buffer |
RFFT Size | Input Format | Output Format | Number of bits to upscale |
---|---|---|---|
32 | 1.31 | 6.26 | 5 |
64 | 1.31 | 7.25 | 6 |
128 | 1.31 | 8.24 | 7 |
256 | 1.31 | 9.23 | 8 |
512 | 1.31 | 10.22 | 9 |
1024 | 1.31 | 11.21 | 10 |
2048 | 1.31 | 12.20 | 11 |
4096 | 1.31 | 13.19 | 12 |
8192 | 1.31 | 14.18 | 13 |
RIFFT Size | Input Format | Output Format | Number of bits to upscale |
---|---|---|---|
32 | 1.31 | 6.26 | 0 |
64 | 1.31 | 7.25 | 0 |
128 | 1.31 | 8.24 | 0 |
256 | 1.31 | 9.23 | 0 |
512 | 1.31 | 10.22 | 0 |
1024 | 1.31 | 11.21 | 0 |
2048 | 1.31 | 12.20 | 0 |
4096 | 1.31 | 13.19 | 0 |
8192 | 1.31 | 14.18 | 0 |
+Variables | |
const float32_t | realCoefA [8192] |
const float32_t | realCoefB [8192] |
const q31_t | realCoefAQ31 [8192] |
const q31_t | realCoefBQ31 [8192] |
const q15_t | realCoefAQ15 [8192] |
const q15_t | realCoefBQ15 [8192] |
const float32_t realCoefA[8192] | +
for (i = 0; i < n; i++) +{ + pATable[2 * i] = 0.5 * ( 1.0 - sin (2 * PI / (double) (2 * n) * (double) i)); + pATable[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); +}
const q15_t realCoefAQ15[8192] | +
for (i = 0; i < n; i++) +{ + pATable[2 * i] = 0.5 * ( 1.0 - sin (2 * PI / (double) (2 * n) * (double) i)); + pATable[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); +}
const q31_t realCoefAQ31[8192] | +
for (i = 0; i < n; i++) +{ + pATable[2 * i] = 0.5 * ( 1.0 - sin (2 * PI / (double) (2 * n) * (double) i)); + pATable[2 * i + 1] = 0.5 * (-1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); +}
const float32_t realCoefB[8192] | +
for (i = 0; i < n; i++) +{ + pBTable[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * n) * (double) i)); + pBTable[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); +}
const q15_t realCoefBQ15[8192] | +
for (i = 0; i < n; i++) +{ + pBTable[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * n) * (double) i)); + pBTable[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); +}
const q31_t realCoefBQ31[8192] | +
for (i = 0; i < n; i++) +{ + pBTable[2 * i] = 0.5 * (1.0 + sin (2 * PI / (double) (2 * n) * (double) i)); + pBTable[2 * i + 1] = 0.5 * (1.0 * cos (2 * PI / (double) (2 * n) * (double) i)); +}
+Functions | |
void | arm_rotation2quaternion_f32 (const float32_t *pInputRotations, float32_t *pOutputQuaternions, uint32_t nbQuaternions) |
Conversion of a rotation matrix to an equivalent quaternion. | |
Conversions from rotation to quaternion.
+void arm_rotation2quaternion_f32 | +( | +const float32_t * | +pInputRotations, | +
+ | + | float32_t * | +pOutputQuaternions, | +
+ | + | uint32_t | +nbQuaternions | +
+ | ) | ++ |
Conversion of a rotation matrix to an equivalent quaternion.
+Conversion of a rotation matrix to equivalent quaternion.
+[in] | pInputRotations | points to an array 3x3 rotation matrix (in row order) |
[out] | pOutputQuaternions | points to an array quaternions |
[in] | nbQuaternions | number of quaternions in the array |
q and -q are representing the same rotation. This ambiguity must be taken into account when using the output of this function.
+ ++Functions | |
template<typename T , typename DST , typename std::enable_if< IsVector< DST >::value &&SameElementType< DST, T >::value, bool >::type = true> | |
void | _Fill (DST &v, const T val, vector_length_t l, const Scalar *=nullptr) |
Fill evaluator for scalar architecture. | |
template<typename T , typename DST , typename std::enable_if< must_use_matrix_idx< DST >() &&SameElementType< DST, T >::value, bool >::type = true> | |
void | _Fill2D (DST &v, const T val, const vector_length_t rows, const vector_length_t cols, const Scalar *=nullptr) |
Fill2D evaluator for scalar architecture. | |
template<typename DA , typename DB , typename std::enable_if< vector_idx_pair< DA, DB >(), bool >::type = true> | |
void | eval (DA &v, const DB &other, const vector_length_t l, const Scalar *=nullptr) |
Expression evaluator for vector in scalar mode. | |
template<typename DA , typename DB , typename std::enable_if< must_use_matrix_idx_pair< DA, DB >(), bool >::type = true> | |
void | eval2D (DA &v, const DB &other, const vector_length_t rows, const vector_length_t cols, const Scalar *=nullptr) |
2D expression evaluator for scalar archiecture | |
template<typename DA , typename DB , typename std::enable_if< vector_idx_pair< DA, DB >(), bool >::type = true> | |
DotResult< DA > | _dot (const DA &a, const DB &b, const vector_length_t l, const Scalar *=nullptr) |
Dot product evaluator for scalar architectuire. | |
template<typename DA , typename DB , typename std::enable_if< vector_idx_pair< DA, DB >(), bool >::type = true> | |
void | _swap (DA &&a, DB &&b, const vector_length_t l, const Scalar *=nullptr) |
Swap evaluator for scalar architecture. | |
template<typename MA , typename MB > | |
__STATIC_INLINE void | _arm_mat_trans (const MA &src, MB &dst, const Scalar *=nullptr) |
Transposition for scalar architecture. | |
template<typename M , typename V , typename RES > | |
void | _dot_m_v (RES &res, const M &m, const V &v, const Scalar *=nullptr) |
Matrix times vector for scalar architecture. | |
template<typename MA , typename MB , typename RES , typename TMP , typename std::enable_if< number_traits< typename traits< MA >::Scalar >::is_fixed, bool >::type = true> | |
__STATIC_INLINE void | _dot_m_m (const MA &pSrcA, const MB &pSrcB, RES &&pDst, const TMP &BT, const Scalar *=nullptr) |
Matrix times matrix for scalar architecture and fixed point. | |
template<typename MA , typename MB , typename RES , typename std::enable_if< number_traits< typename traits< MA >::Scalar >::is_float, bool >::type = true> | |
__STATIC_INLINE void | _dot_m_m (const MA &pSrcA, const MB &pSrcB, RES &&pDst, const Scalar *=nullptr) |
Matrix times matrix for scalar architecture and float. | |
__STATIC_INLINE void _arm_mat_trans | +( | +const MA & | +src, | +
+ | + | MB & | +dst, | +
+ | + | const Scalar * | + = nullptr |
+
+ | ) | ++ |
Transposition for scalar architecture.
+[in] | src | The source |
dst | The destination |
MA | Source datatype |
MB | Destination datatype |
+
|
+ +inline | +
Dot product evaluator for scalar architectuire.
+[in] | a | Left hand side |
[in] | b | Right hand side |
[in] | l | Vector lenght |
DA | Left hand side datatype (may be expression) |
DB | Right hand side datatype (may be expression) |
<unnamed> | Check vector expressions are compatible |
__STATIC_INLINE void _dot_m_m | +( | +const MA & | +pSrcA, | +
+ | + | const MB & | +pSrcB, | +
+ | + | RES && | +pDst, | +
+ | + | const Scalar * | + = nullptr |
+
+ | ) | ++ |
Matrix times matrix for scalar architecture and float.
+[in] | pSrcA | The source a |
[in] | pSrcB | The source b |
pDst | The destination |
MA | Left hand side datatype |
MB | Right hand side datatype |
RES | Result datatype |
<unnamed> | Check if float |
__STATIC_INLINE void _dot_m_m | +( | +const MA & | +pSrcA, | +
+ | + | const MB & | +pSrcB, | +
+ | + | RES && | +pDst, | +
+ | + | const TMP & | +BT, | +
+ | + | const Scalar * | + = nullptr |
+
+ | ) | ++ |
Matrix times matrix for scalar architecture and fixed point.
+[in] | pSrcA | The source a |
[in] | pSrcB | The source b |
pDst | The destination | |
[in] | BT | Temporary matrix for transposition |
MA | Left hand side datatype |
MB | Right hand side datatype |
RES | Destination datatype |
TMP | Temporary matrix datatype |
<unnamed> | Check fixed point arithmetic used |
+
|
+ +inline | +
Matrix times vector for scalar architecture.
+res | Destination | |
[in] | m | Matrix |
[in] | v | Vector (my be expression) |
M | Matrix datatype |
V | Vector datatype |
RES | Result datatype |
+
|
+ +inline | +
Fill evaluator for scalar architecture.
+v | Destination vector | |
[in] | val | Initialization value |
[in] | l | Length of vector |
T | Scalar datatype |
DST | VEctor / Matrix datatype |
<unnamed> | Test to restrict to vector addressing and compatible datatype |
+
|
+ +inline | +
Fill2D evaluator for scalar architecture.
+v | Matrix value | |
[in] | val | Initialization value |
[in] | rows | Number of rows |
[in] | cols | Number of columns |
T | Scalar datatype |
DST | Matrix datatype |
<unnamed> | Check DST has matrix indexing only |
+
|
+ +inline | +
Swap evaluator for scalar architecture.
+a | Left hand side | |
b | Right hand side | |
[in] | l | Vector length |
DA | Left hand side datatype |
DB | Right hand side datatype |
<unnamed> | Check vectors are compatible |
+
|
+ +inline | +
Expression evaluator for vector in scalar mode.
+v | Vector | |
[in] | other | Expression |
[in] | l | Length of expression (number of samples) |
DA | Destination datatype |
DB | Source datatype |
<unnamed> | Check vectors are compatible |
+
|
+ +inline | +
2D expression evaluator for scalar archiecture
+v | Destination value | |
[in] | other | The expression |
[in] | rows | Number of rows |
[in] | cols | Number of columns |
DA | Destination datatype |
DB | Source datatype |
<unnamed> | Check only support matrix indexing |
+Functions | |
arm_status | arm_sqrt_f32 (const float32_t in, float32_t *pOut) |
Floating-point square root function. | |
arm_status | arm_sqrt_q31 (q31_t in, q31_t *pOut) |
Q31 square root function. | |
arm_status | arm_sqrt_q15 (q15_t in, q15_t *pOut) |
Q15 square root function. | |
arm_status | arm_sqrt_f16 (float16_t in, float16_t *pOut) |
Floating-point square root function. | |
Computes the square root of a number. There are separate functions for Q15, Q31, and floating-point data types. The square root function is computed using the Newton-Raphson algorithm. This is an iterative algorithm of the form:
+ x1 = x0 - f(x0)/f'(x0) +
where x1
is the current estimate, x0
is the previous estimate, and f'(x0)
is the derivative of f()
evaluated at x0
. For the square root function, the algorithm reduces to:
+ x0 = in/2 [initial guess] + x1 = 1/2 * ( x0 + in / x0) [each iteration] +
arm_status arm_sqrt_f16 | +( | +float16_t | +in, | +
+ | + | float16_t * | +pOut | +
+ | ) | ++ |
Floating-point square root function.
+[in] | in | input value |
[out] | pOut | square root of input value |
arm_status arm_sqrt_f32 | +( | +const float32_t | +in, | +
+ | + | float32_t * | +pOut | +
+ | ) | ++ |
Floating-point square root function.
+[in] | in | input value |
[out] | pOut | square root of input value |
arm_status arm_sqrt_q15 | +( | +q15_t | +in, | +
+ | + | q15_t * | +pOut | +
+ | ) | ++ |
Q15 square root function.
+[in] | in | input value. The range of the input value is [0 +1) or 0x0000 to 0x7FFF |
[out] | pOut | points to square root of input value |
arm_status arm_sqrt_q31 | +( | +q31_t | +in, | +
+ | + | q31_t * | +pOut | +
+ | ) | ++ |
Q31 square root function.
+[in] | in | input value. The range of the input value is [0 +1) or 0x00000000 to 0x7FFFFFFF |
[out] | pOut | points to square root of input value |
+Functions | |
void | arm_std_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Standard deviation of the elements of a floating-point vector. | |
void | arm_std_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Standard deviation of the elements of a floating-point vector. | |
void | arm_std_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult) |
Standard deviation of the elements of a floating-point vector. | |
void | arm_std_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult) |
Standard deviation of the elements of a Q15 vector. | |
void | arm_std_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Standard deviation of the elements of a Q31 vector. | |
Calculates the standard deviation of the elements in the input vector.
+The float implementation is relying on arm_var_f32 which is using a two-pass algorithm to avoid problem of numerical instabilities and cancellation errors.
+Fixed point versions are using the standard textbook algorithm since the fixed point numerical behavior is different from the float one.
+Algorithm for fixed point versions is summarized below:
++ Result = sqrt((sumOfSquares - sum2 / blockSize) / (blockSize - 1)) + + sumOfSquares = pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] * pSrc[blockSize-1] + sum = pSrc[0] + pSrc[1] + pSrc[2] + ... + pSrc[blockSize-1] +
There are separate functions for floating point, Q31, and Q15 data types.
+void arm_std_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
Standard deviation of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | standard deviation value returned here |
void arm_std_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Standard deviation of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | standard deviation value returned here |
void arm_std_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Standard deviation of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | standard deviation value returned here |
void arm_std_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult | +
+ | ) | ++ |
Standard deviation of the elements of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | standard deviation value returned here |
void arm_std_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Standard deviation of the elements of a Q31 vector.
+[in] | pSrc | points to the input vector. |
[in] | blockSize | number of samples in input vector. |
[out] | pResult | standard deviation value returned here. |
testInput_f32
points to the input data firStateF32
points to FIR state buffer lmsStateF32
points to Normalised Least mean square FIR filter state buffer FIRCoeff_f32
points to coefficient buffer lmsNormCoeff_f32
points to Normalised Least mean square FIR filter coefficient buffer wire1
, wir2, wire3 temporary buffers errOutput
, err_signal temporary error buffers+Functions | |
void | arm_sin_cos_f32 (float32_t theta, float32_t *pSinVal, float32_t *pCosVal) |
Floating-point sin_cos function. | |
void | arm_sin_cos_q31 (q31_t theta, q31_t *pSinVal, q31_t *pCosVal) |
Q31 sin_cos function. | |
Computes the trigonometric sine and cosine values using a combination of table lookup and linear interpolation. There are separate functions for Q31 and floating-point data types. The input to the floating-point version is in degrees while the fixed-point Q31 have a scaled input with the range [-1 0.9999] mapping to [-180 +180] degrees.
+The floating point function also allows values that are out of the usual range. When this happens, the function will take extra time to adjust the input value to the range of [-180 180].
+The result is accurate to 5 digits after the decimal point.
+The implementation is based on table lookup using 360 values together with linear interpolation. The steps used are:
index
from sine table to y0
and also value from index+1
to y1
. *psinVal = y0 + (fract * (y1 - y0))
.index
from cosine table to y0
and also value from index+1
to y1
. *pcosVal = y0 + (fract * (y1 - y0))
. void arm_sin_cos_f32 | +( | +float32_t | +theta, | +
+ | + | float32_t * | +pSinVal, | +
+ | + | float32_t * | +pCosVal | +
+ | ) | ++ |
Floating-point sin_cos function.
+[in] | theta | input value in degrees |
[out] | pSinVal | points to processed sine output |
[out] | pCosVal | points to processed cosine output |
void arm_sin_cos_q31 | +( | +q31_t | +theta, | +
+ | + | q31_t * | +pSinVal, | +
+ | + | q31_t * | +pCosVal | +
+ | ) | ++ |
Q31 sin_cos function.
+[in] | theta | scaled input value in degrees |
[out] | pSinVal | points to processed sine output |
[out] | pCosVal | points to processed cosine output |
The Q31 input value is in the range [-1 0.999999] and is mapped to a degree value in the range [-180 179].
+ +sin(x) * sin(x) + cos(x) * cos(x) = 1where
x
is the angle in radians.testInput_f32
array of input angle in radians testOutput
stores sum of the squares of sine and cosine values of input angle+Functions | |
void | arm_merge_sort_f32 (const arm_merge_sort_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
void | arm_merge_sort_init_f32 (arm_merge_sort_instance_f32 *S, arm_sort_dir dir, float32_t *buffer) |
void | arm_sort_f32 (const arm_sort_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Generic sorting function. | |
void | arm_sort_init_f32 (arm_sort_instance_f32 *S, arm_sort_alg alg, arm_sort_dir dir) |
Sort the elements of a vector
+There are separate functions for floating-point, Q31, Q15, and Q7 data types.
+void arm_merge_sort_f32 | +( | +const arm_merge_sort_instance_f32 * | +S, | +
+ | + | float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
[in] | S | points to an instance of the sorting structure. |
[in] | pSrc | points to the block of input data. |
[out] | pDst | points to the block of output data |
[in] | blockSize | number of samples to process. |
void arm_merge_sort_init_f32 | +( | +arm_merge_sort_instance_f32 * | +S, | +
+ | + | arm_sort_dir | +dir, | +
+ | + | float32_t * | +buffer | +
+ | ) | ++ |
[in,out] | S | points to an instance of the sorting structure. |
[in] | dir | Sorting order. |
[in] | buffer | Working buffer. |
void arm_sort_f32 | +( | +const arm_sort_instance_f32 * | +S, | +
+ | + | float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Generic sorting function.
+[in] | S | points to an instance of the sorting structure. |
[in] | pSrc | points to the block of input data. |
[out] | pDst | points to the block of output data. |
[in] | blockSize | number of samples to process. |
void arm_sort_init_f32 | +( | +arm_sort_instance_f32 * | +S, | +
+ | + | arm_sort_alg | +alg, | +
+ | + | arm_sort_dir | +dir | +
+ | ) | ++ |
[in,out] | S | points to an instance of the sorting structure. |
[in] | alg | Selected algorithm. |
[in] | dir | Sorting order. |
+Functions | |
void | arm_spline_f32 (arm_spline_instance_f32 *S, const float32_t *xq, float32_t *pDst, uint32_t blockSize) |
Processing function for the floating-point cubic spline interpolation. | |
void | arm_spline_init_f32 (arm_spline_instance_f32 *S, arm_spline_type type, const float32_t *x, const float32_t *y, uint32_t n, float32_t *coeffs, float32_t *tempBuffer) |
Initialization function for the floating-point cubic spline interpolation. | |
Spline interpolation is a method of interpolation where the interpolant is a piecewise-defined polynomial called "spline".
+Given a function f defined on the interval [a,b], a set of n nodes x(i) where a=x(1)<x(2)<...<x(n)=b and a set of n values y(i) = f(x(i)), a cubic spline interpolant S(x) is defined as:
++ S1(x) x(1) < x < x(2) + S(x) = ... + Sn-1(x) x(n-1) < x < x(n) +
where
++ Si(x) = a_i+b_i(x-xi)+c_i(x-xi)^2+d_i(x-xi)^3 i=1, ..., n-1 +
Having defined h(i) = x(i+1) - x(i)
++ h(i-1)c(i-1)+2[h(i-1)+h(i)]c(i)+h(i)c(i+1) = 3/h(i)*[a(i+1)-a(i)]-3/h(i-1)*[a(i)-a(i-1)] i=2, ..., n-1 +
It is possible to write the previous conditions in matrix form (Ax=B). In order to solve the system two boundary conidtions are needed.
+ | 1 0 0 ... 0 0 0 || c(1) | | 0 | + | h(0) 2[h(0)+h(1)] h(1) ... 0 0 0 || c(2) | | 3/h(2)*[a(3)-a(2)]-3/h(1)*[a(2)-a(1)] | + | ... ... ... ... ... ... ... || ... |=| ... | + | 0 0 0 ... h(n-2) 2[h(n-2)+h(n-1)] h(n-1) || c(n-1) | | 3/h(n-1)*[a(n)-a(n-1)]-3/h(n-2)*[a(n-1)-a(n-2)] | + | 0 0 0 ... 0 0 1 || c(n) | | 0 | +
+ | 1 -1 0 ... 0 0 0 || c(1) | | 0 | + | h(0) 2[h(0)+h(1)] h(1) ... 0 0 0 || c(2) | | 3/h(2)*[a(3)-a(2)]-3/h(1)*[a(2)-a(1)] | + | ... ... ... ... ... ... ... || ... |=| ... | + | 0 0 0 ... h(n-2) 2[h(n-2)+h(n-1)] h(n-1) || c(n-1) | | 3/h(n-1)*[a(n)-a(n-1)]-3/h(n-2)*[a(n-1)-a(n-2)] | + | 0 0 0 ... 0 -1 1 || c(n) | | 0 | +
A is a tridiagonal matrix (a band matrix of bandwidth 3) of size N=n+1. The factorization algorithms (A=LU) can be simplified considerably because a large number of zeros appear in regular patterns. The Crout method has been used: 1) Solve LZ=B
++ u(1,2) = A(1,2)/A(1,1) + z(1) = B(1)/l(11) + + FOR i=2, ..., N-1 + l(i,i) = A(i,i)-A(i,i-1)u(i-1,i) + u(i,i+1) = a(i,i+1)/l(i,i) + z(i) = [B(i)-A(i,i-1)z(i-1)]/l(i,i) + + l(N,N) = A(N,N)-A(N,N-1)u(N-1,N) + z(N) = [B(N)-A(N,N-1)z(N-1)]/l(N,N) +
2) Solve UX=Z
++ c(N)=z(N) + + FOR i=N-1, ..., 1 + c(i)=z(i)-u(i,i+1)c(i+1) +
c(i) for i=1, ..., n-1 are needed to compute the n-1 polynomials. b(i) and d(i) are computed as:
It is possible to compute the interpolated vector for x values outside the input range (xq<x(1); xq>x(n)). The coefficients used to compute the y values for xq<x(1) are going to be the ones used for the first interval, while for xq>x(n) the coefficients used for the last interval.
+The initialization function takes as input two arrays that the user has to allocate: coeffs
will contain the b, c, and d coefficients for the (n-1) intervals (n is the number of known points), hence its size must be 3*(n-1); tempBuffer
is temporally used for internal computations and its size is n+n-1.
The x input array must be strictly sorted in ascending order and it must not contain twice the same value (x(i)<x(i+1)).
+void arm_spline_f32 | +( | +arm_spline_instance_f32 * | +S, | +
+ | + | const float32_t * | +xq, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Processing function for the floating-point cubic spline interpolation.
+[in] | S | points to an instance of the floating-point spline structure. |
[in] | xq | points to the x values of the interpolated data points. |
[out] | pDst | points to the block of output data. |
[in] | blockSize | number of samples of output data. |
void arm_spline_init_f32 | +( | +arm_spline_instance_f32 * | +S, | +
+ | + | arm_spline_type | +type, | +
+ | + | const float32_t * | +x, | +
+ | + | const float32_t * | +y, | +
+ | + | uint32_t | +n, | +
+ | + | float32_t * | +coeffs, | +
+ | + | float32_t * | +tempBuffer | +
+ | ) | ++ |
Initialization function for the floating-point cubic spline interpolation.
+[in,out] | S | points to an instance of the floating-point spline structure. |
[in] | type | type of cubic spline interpolation (boundary conditions) |
[in] | x | points to the x values of the known data points. |
[in] | y | points to the y values of the known data points. |
[in] | n | number of known data points. |
[in] | coeffs | coefficients array for b, c, and d |
[in] | tempBuffer | buffer array for internal computations |
+Data Structures | |
struct | Vector_Base< P > |
Storage for a vector. More... | |
struct | Vector< P, L, Allocator > |
Vector template for size knonw at build time. More... | |
struct | Vector< P, DYNAMIC, Allocator > |
Vector template for dynamic vector (size known at runtime) More... | |
struct | VectorView< T, stride > |
Vector view. More... | |
struct | VectorView< T, DYNAMIC > |
Vector view with dynamic stride (not known at build time) More... | |
+Functions | |
template<typename LHS , typename RHS , typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&SameElementType< LHS, RHS >::value &&same_static_length< LHS, RHS >(), bool >::type = true> | |
auto | operator+ (const LHS &a, const RHS &b) |
Addition operator for expressions. | |
template<typename LHS , typename std::enable_if<!is_scalar< LHS >(), bool >::type = true> | |
auto | operator+ (const LHS &a) |
| |
template<typename LHS , typename std::enable_if<!is_scalar< LHS >(), bool >::type = true> | |
auto | expr (const LHS &a) |
Identity operator for expression. | |
template<typename LHS , typename std::enable_if<!is_scalar< LHS >(), bool >::type = true> | |
auto | copy (const LHS &a) |
Identity operator for expression. | |
template<typename LHS , typename RHS , typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&SameElementType< LHS, RHS >::value &&same_static_length< LHS, RHS >(), bool >::type = true> | |
auto | operator- (const LHS &a, const RHS &b) |
Subtraction operator for expressions. | |
template<typename LHS , typename std::enable_if<!is_scalar< LHS >(), bool >::type = true> | |
auto | operator- (const LHS &a) |
| |
template<typename LHS , typename RHS , typename std::enable_if<(!is_scalar< LHS >()||!is_scalar< RHS >()) &&SameElementType< LHS, RHS >::value &&same_static_length< LHS, RHS >(), bool >::type = true> | |
auto | operator* (const LHS &a, const RHS &b) |
Element wise multiplication operator for expressions. | |
struct arm_cmsis_dsp::Vector_Base | +
Storage for a vector.
+P | Type of the scalar |
Public Types | |
+typedef P | element_type |
Type of vector elements. | |
+using | Vector = typename vector_traits< P >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Member Functions | |
vector_length_t | length () const |
Vector dimension. | |
P * | ptr () const |
Pointer to storage buffer. | |
P * | ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
const P * | const_ptr () const |
Pointer to storage buffer. | |
const P * | const_ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
P * | begin () const |
Iterator begin. | |
P * | end () const |
Iterator end. | |
P & | operator[] (const index_t i) |
Element at index i. | |
P & | operator[] (const index_t i) const |
Element at index i. | |
template<typename T = P, typename std::enable_if< vector_traits< T >::has_vector, bool >::type = true> | |
void | vector_store (const index_t i, const Vector val) const |
Vector store at index i | |
void | vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) const |
Vector store at index i with predicated tail | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index i with predicated tail | |
Vector const | vector_op (const index_t i) const |
Vector operation at index i | |
+
|
+ +inline | +
Iterator begin.
+
+
|
+ +inline | +
Pointer to storage buffer.
+
+
|
+ +inline | +
Pointer to storage buffer at index i.
+i | Index in buffer |
+
|
+ +inline | +
Iterator end.
+
+
|
+ +inline | +
+
|
+ +inline | +
Element at index i.
+i | index |
+
|
+ +inline | +
Element at index i.
+i | index |
+
|
+ +inline | +
Pointer to storage buffer.
+
+
|
+ +inline | +
Pointer to storage buffer at index i.
+i | Index in buffer |
Vector operation at index i
+i | index |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i. In the case of a vector, this operation is a load
+ +
+
|
+ +inline | +
Vector operation at index i with predicated tail
+i | index |
remaining | Number of remaining samples in the loop |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i with predication. In the case of a vector, this operation is a load
+ +
+
|
+ +inline | +
Vector store at index i
+T | scalar datatype |
i | index |
val | Vector value |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype
+ +
+
|
+ +inline | +
Vector store at index i with predicated tail
+i | index |
remaining | Number of remaining samples in the loop |
val | Vector value to write at index i with tail predication |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype with predication
+ +struct arm_cmsis_dsp::Vector | +
Vector template for size knonw at build time.
+P | Type of the scalar |
L | Vector length in number of elements. Negative if length not known at build time. It is the default value |
Allocator | Memory allocator to use. By default it is the macro TMP_ALLOC |
Public Types | |
+using | element_type = P |
Type of vector elements. | |
Public Types inherited from Vector_Base< P > | |
+typedef P | element_type |
Type of vector elements. | |
+using | Vector = typename vector_traits< P >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Member Functions | |
Vector () | |
Construct a new vector. | |
Vector (P init_val) | |
Construct a new vector and initialize it. | |
Vector (const std::initializer_list< P > &l) | |
Construct a new vector and initialize it with a list. | |
template<template< int > typename OtherAllocator> | |
Vector (const Vector< P, L, OtherAllocator > &other) | |
Create a vector from a vector using a different memory allocator. | |
template<int S> | |
Vector (const VectorView< P, S > &other) | |
Create a vector from a VectorView. | |
template<typename Derived > | |
Vector (const _Expr< Derived > &other) | |
Create a vector from an expression. | |
template<typename Derived > | |
Vector & | operator= (const _Expr< Derived > &other) |
Copy result of an expression to a vector content. | |
template<typename T , typename std::enable_if< is_scalar< T >(), bool >::type = true> | |
Vector & | operator= (const T other) |
Fill a vector with a constant. | |
template<typename Derived > | |
Vector & | operator+= (const _Expr< Derived > &other) |
Elementwise add the result of an expression to a vector. | |
Vector & | operator+= (const Vector &other) |
Elementwise add vector to another vector. | |
Vector & | operator+= (const P other) |
Elementwise add a constant to a vector. | |
template<typename Derived > | |
Vector & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract the result of an expression from a vector. | |
Vector & | operator-= (const Vector &other) |
Elementwise subtract a vector from a vector. | |
Vector & | operator-= (const P other) |
Elementwise subtract a constant from a vector. | |
template<typename Derived > | |
Vector & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply the result of an expression with a vector. | |
Vector & | operator*= (const Vector &other) |
Elementwise multiply a vector with a vector. | |
Vector & | operator*= (const P other) |
Elementwise multiply a constant with a vector. | |
template<int S = 1> | |
VectorView< P, S > | sub (const index_t start=0, const index_t stop=L) |
Create a vector view. | |
Public Member Functions inherited from Vector_Base< P > | |
vector_length_t | length () const |
Vector dimension. | |
P * | ptr () const |
Pointer to storage buffer. | |
P * | ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
const P * | const_ptr () const |
Pointer to storage buffer. | |
const P * | const_ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
P * | begin () const |
Iterator begin. | |
P * | end () const |
Iterator end. | |
P & | operator[] (const index_t i) |
Element at index i. | |
P & | operator[] (const index_t i) const |
Element at index i. | |
template<typename T = P, typename std::enable_if< vector_traits< T >::has_vector, bool >::type = true> | |
void | vector_store (const index_t i, const Vector val) const |
Vector store at index i | |
void | vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) const |
Vector store at index i with predicated tail | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index i with predicated tail | |
Vector const | vector_op (const index_t i) const |
Vector operation at index i | |
Static Public Member Functions | |
static char * | allocate () |
Allocate a buffer for this vector using the memory allocator. | |
Static Public Attributes | |
+static constexpr vector_length_t | vector_size = sizeof(P)*L |
Length of the vector when known at build time. | |
+
|
+ +inline | +
Construct a new vector.
+The length is known at build time. ++
+
|
+ +inlineexplicit | +
Construct a new vector and initialize it.
+The length is known at build time. +
init_val | Initialization value + |
+
|
+ +inline | +
Construct a new vector and initialize it with a list.
+A vector can be initialized like an array using {} syntax + The length is known at build time. +
l | Initialization list + |
+
|
+ +inlineexplicit | +
Create a vector from a vector using a different memory allocator.
+other | Other vector using a different memory allocator |
+
|
+ +inlineexplicit | +
Create a vector from a VectorView.
+S | The stride of the vector view known at build time |
other | The vector view |
Create a vector from an expression.
+Derived | The type representing the abstract syntax tree |
other | The expression |
It is the mechanism allowing to evaluate an expression and merge all of the operators the of the expression in the same loop
+ +
+
|
+ +inlinestatic | +
Allocate a buffer for this vector using the memory allocator.
+Elementwise multiply the result of an expression with a vector.
+Derived | The type representing the abstract syntax tree of the expression |
other | The expression |
+
|
+ +inline | +
Elementwise multiply a constant with a vector.
+Derived | Constant datatype |
other | The constant |
+
|
+ +inline | +
Elementwise multiply a vector with a vector.
+other | The othr vector |
Elementwise add the result of an expression to a vector.
+Derived | The type representing the abstract syntax tree of the expression |
other | The expression |
+
|
+ +inline | +
Elementwise add a constant to a vector.
+P | The constant datatype |
other | The expression |
+
|
+ +inline | +
Elementwise add vector to another vector.
+other | The vector |
Elementwise subtract the result of an expression from a vector.
+Derived | The type representing the abstract syntax tree of the expression |
other | The expression |
+
|
+ +inline | +
Elementwise subtract a constant from a vector.
+P | Datatype of the constant |
other | The constant |
+
|
+ +inline | +
Elementwise subtract a vector from a vector.
+other | The other vector |
Copy result of an expression to a vector content.
+Derived | The type representing the abstract syntax tree |
other | The expression |
It is the mechanism allowing to evaluate an expression and merge all of the operators the of the expression in the same loop
+ +
+
|
+ +inline | +
Fill a vector with a constant.
+T | The constant datatype |
other | The const |
+
|
+ +inline | +
Create a vector view.
+S | Stride known at build time |
start | Start index for the vector view |
stop | Stop index for the vector view (first element after the vector view) Default is length of the vector if known at build time. |
struct arm_cmsis_dsp::Vector< P, DYNAMIC, Allocator > | +
Vector template for dynamic vector (size known at runtime)
+P | Type of the scalar |
Allocator | Memory allocator to use. By default it is the macro TMP_ALLOC |
Public Member Functions | |
Vector (vector_length_t length, P init_val) | |
Create a new vector. | |
Vector (vector_length_t length) | |
Create a new vector. | |
Vector (const std::initializer_list< P > &l) | |
Create a new vector. | |
template<int K, template< int > typename OtherAllocator> | |
Vector (const Vector< P, K, OtherAllocator > &other) | |
Create a new vector from a vector using a different memory allocator. | |
Vector (const Vector &other) | |
Create a new vector from a vector of same type. | |
template<int S> | |
Vector (const VectorView< P, S > &other) | |
Create a new vector from a vector view. | |
template<typename Derived > | |
Vector (const _Expr< Derived > &other) | |
Create a new vector from an expressipn. | |
template<typename Derived > | |
Vector & | operator= (const _Expr< Derived > &other) |
Fill a vector with an expression. | |
template<typename T , typename std::enable_if< is_scalar< T >(), bool >::type = true> | |
Vector & | operator= (const T other) |
Fill a vector with a scalar. | |
template<typename Derived > | |
Vector & | operator+= (const _Expr< Derived > &other) |
Elementwise add an expression to a vector. | |
Vector & | operator+= (const Vector &other) |
Elementwise add a vector to a vector. | |
Vector & | operator+= (const P other) |
Elementwise add a scalar to a vector. | |
template<typename Derived > | |
Vector & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract an expression to a vector. | |
Vector & | operator-= (const Vector &other) |
Elementwise subtract a vector to a vector. | |
Vector & | operator-= (const P other) |
Elementwise subtract a scalar to a vector. | |
template<typename Derived > | |
Vector & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply an expression with a vector. | |
Vector & | operator*= (const Vector &other) |
Elementwise multiply a vector with a vector. | |
Vector & | operator*= (const P other) |
Elementwise multiply a scalar with a vector. | |
template<int S = 1> | |
VectorView< P, S > | sub (const index_t start=0, const index_t stop=-1) |
Create a vector view. | |
Public Member Functions inherited from Vector_Base< P > | |
vector_length_t | length () const |
Vector dimension. | |
P * | ptr () const |
Pointer to storage buffer. | |
P * | ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
const P * | const_ptr () const |
Pointer to storage buffer. | |
const P * | const_ptr (const index_t i) const |
Pointer to storage buffer at index i. | |
P * | begin () const |
Iterator begin. | |
P * | end () const |
Iterator end. | |
P & | operator[] (const index_t i) |
Element at index i. | |
P & | operator[] (const index_t i) const |
Element at index i. | |
template<typename T = P, typename std::enable_if< vector_traits< T >::has_vector, bool >::type = true> | |
void | vector_store (const index_t i, const Vector val) const |
Vector store at index i | |
void | vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) const |
Vector store at index i with predicated tail | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index i with predicated tail | |
Vector const | vector_op (const index_t i) const |
Vector operation at index i | |
Static Public Member Functions | |
static char * | allocate (vector_length_t length) |
Allocate a buffer for this vector using the memory allocator. | |
+Additional Inherited Members | |
Public Types inherited from Vector_Base< P > | |
+typedef P | element_type |
Type of vector elements. | |
+using | Vector = typename vector_traits< P >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
+
|
+ +inlineexplicit | +
Create a new vector.
+length | Vector dimension |
init_val | Initialization value |
+
|
+ +inlineexplicit | +
Create a new vector.
+length | Vector dimension |
+
|
+ +inlineexplicit | +
Create a new vector.
+l | Initializer list A vector can be initialized like an array using {} syntax |
+
|
+ +inlineexplicit | +
Create a new vector from a vector using a different memory allocator.
+K | Dimension of other vector (statically known or dynamic) |
other | The vector to copy |
Create a new vector from a vector of same type.
+other | The vector to copy |
+
|
+ +inlineexplicit | +
Create a new vector from a vector view.
+S | Stride of vector view known at build time |
other | The vector to copy |
Create a new vector from an expressipn.
+Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
+
|
+ +inlinestatic | +
Allocate a buffer for this vector using the memory allocator.
+length | Vector dimension |
Elementwise multiply an expression with a vector.
+Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
+
|
+ +inline | +
Elementwise multiply a scalar with a vector.
+P | Scalar datatype |
other | The scalar |
+
|
+ +inline | +
Elementwise multiply a vector with a vector.
+other | The vector to add |
Elementwise add an expression to a vector.
+Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
+
|
+ +inline | +
Elementwise add a scalar to a vector.
+P | Scalar datatype |
other | The scalar |
+
|
+ +inline | +
Elementwise add a vector to a vector.
+other | The vector to add |
Elementwise subtract an expression to a vector.
+Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
+
|
+ +inline | +
Elementwise subtract a scalar to a vector.
+P | Scalar datatype |
other | The scalar |
+
|
+ +inline | +
Elementwise subtract a vector to a vector.
+other | The vector to add |
Fill a vector with an expression.
+Derived | Type representing the abstract syntax tree of the expression |
other | The expression to evaluate |
+
|
+ +inline | +
Fill a vector with a scalar.
+T | Scalar datatype |
other | The scalar |
+
|
+ +inline | +
Create a vector view.
+S | stride |
start | Start index of view |
stop | Stop index of view (first index after end of view) By default it is the length of the vector. |
struct arm_cmsis_dsp::VectorView | +
Vector view.
+T | Type of the scalar |
S | Stride known at build time (default 1) |
Public Types | |
+using | Vector = typename vector_traits< T >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Member Functions | |
VectorView (T *v, const vector_length_t start, const vector_length_t stop) | |
Create a vector view on a buffer. | |
VectorView (const Vector_Base< T > &v) | |
Create a vector on a vector. | |
VectorView (const Vector_Base< T > &v, const index_t start, const index_t stop) | |
Create a vector view on vector. | |
vector_length_t | length () const |
Vector view dimension. | |
T * | ptr () const |
Pointer to view storage. | |
T * | ptr (const index_t i) const |
Pointer to view storage at index i. | |
const T * | const_ptr () const |
Pointer to view constant storage. | |
const T * | const_ptr (const index_t i) const |
Pointer to view constant storage at index i. | |
T & | operator[] (const index_t i) |
Element at index i. | |
T & | operator[] (const index_t i) const |
Element at index i. | |
void | vector_store (const index_t i, const Vector val) |
Vector store at index i | |
void | vector_store_tail (const index_t i, const vector_length_t remaining, const Vector val) |
Vector store at index i with predicated tail | |
Vector const | vector_op_tail (const index_t i, const vector_length_t remaining) const |
Vector operation at index i with predicated tail | |
Vector const | vector_op (const index_t i) const |
Vector operation at index i | |
VectorView (const VectorView &other) | |
Create a vector view from another view. | |
VectorView (VectorView &&other) | |
Move a vector view to another view. | |
template<typename Derived > | |
VectorView & | operator= (const _Expr< Derived > &other) |
Assign an expression to a vector view. | |
VectorView & | operator= (const T val) |
Assign a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator+= (const _Expr< Derived > &other) |
Elementwise add an expression to a vector view. | |
VectorView & | operator+= (const VectorView &other) |
Elementwise add a vector view to a vector view. | |
VectorView & | operator+= (const T other) |
Elementwise add a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract an expression to a vector view. | |
VectorView & | operator-= (const VectorView &other) |
Elementwise subtract a vector view to a vector view. | |
VectorView & | operator-= (const T other) |
Elementwise subtract a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply an expression to a vector view. | |
VectorView & | operator*= (const VectorView &other) |
Elementwise multiply a vector view to a vector view. | |
VectorView & | operator*= (const T other) |
Elementwise multiply a scalar to a vector view. | |
template<int S = 1> | |
VectorView< T, S *stride > | sub (const index_t start=0, const index_t stop=-1) |
Create a sub vector (a view of a view) | |
template<int S = 1> | |
const VectorView< T, S *stride > | sub (const index_t start=0, const index_t stop=-1) const |
Create a constant sub vector (a view of a view) | |
Static Public Member Functions | |
static constexpr vector_length_t | compute_length (const index_t start, const index_t stop) |
Compute the number of elements in the vector view. | |
+
|
+ +inlineexplicit | +
Create a vector view on a buffer.
+v | Buffer of samples (not owned by the view) |
start | Start index of the view |
stop | Stop index of the view (first elemnt after the view) |
+
|
+ +inlineexplicit | +
Create a vector on a vector.
+v | Vector storage (not owned by the view) |
+
|
+ +inlineexplicit | +
Create a vector view on vector.
+v | Vector storage (not owned by the view) |
start | Start index of the view |
stop | Stop index of the view (first elemnt after the view) |
+
|
+ +inline | +
Create a vector view from another view.
+other | the other vector view |
The new vector view will point to the same storage as the other vector view. No copy of element is occuring. To copy vector view content, the expr and copy operators are needed.
+ +
+
|
+ +inline | +
Move a vector view to another view.
+other | the other vector view |
The new vector view will point to the same storage as the other vector view. No copy of element is occuring.
+The other vector view is no more valid (points to null storage)
+ +
+
|
+ +inlinestaticconstexpr | +
+
|
+ +inline | +
Pointer to view constant storage.
+
+
|
+ +inline | +
Pointer to view constant storage at index i.
+i | Index |
The stride is used to compute this pointer. The index is scaled by the stride.
+ +
+
|
+ +inline | +
Vector view dimension.
+
+
|
+ +inline | +
Elementwise multiply an expression to a vector view.
+Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
+
|
+ +inline | +
Elementwise multiply a scalar to a vector view.
+other | the scalar |
+
|
+ +inline | +
Elementwise multiply a vector view to a vector view.
+other | the vector view to add |
+
|
+ +inline | +
Elementwise add an expression to a vector view.
+Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
+
|
+ +inline | +
Elementwise add a scalar to a vector view.
+other | the scalar |
+
|
+ +inline | +
Elementwise add a vector view to a vector view.
+other | the vector view to add |
+
|
+ +inline | +
Elementwise subtract an expression to a vector view.
+Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
+
|
+ +inline | +
Elementwise subtract a scalar to a vector view.
+other | the scalar |
+
|
+ +inline | +
Elementwise subtract a vector view to a vector view.
+other | the vector view to add |
+
|
+ +inline | +
Assign an expression to a vector view.
+Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
Evaluate an expression an assign its result to the vector view
+ +
+
|
+ +inline | +
Assign a scalar to a vector view.
+val | the scalar |
+
|
+ +inline | +
Element at index i.
+i | Index |
The stride is used to compute this reference. The index is scaled by the stride.
+ +
+
|
+ +inline | +
Element at index i.
+i | Index |
The stride is used to compute this reference. The index is scaled by the stride.
+ +
+
|
+ +inline | +
Pointer to view storage.
+
+
|
+ +inline | +
Pointer to view storage at index i.
+i | Index |
The stride is used to compute this pointer. The index is scaled by the stride.
+ +
+
|
+ +inline | +
Create a sub vector (a view of a view)
+S | stride known at build time |
start | Start index |
stop | Stop index (first element after the view) By default it is the vector view length |
+
|
+ +inline | +
Create a constant sub vector (a view of a view)
+S | stride known at build time |
start | Start index |
stop | Stop index (first element after the view) By default it is the vector view length |
Vector operation at index i
+i | index |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i. In the case of a vector, this operation is a load
+ +
+
|
+ +inline | +
Vector operation at index i with predicated tail
+i | index |
remaining | Number of remaining samples in the loop |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i with predication. In the case of a vector, this operation is a load
+ +
+
|
+ +inline | +
Vector store at index i
+i | index |
val | Vector value |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype
+ +
+
|
+ +inline | +
Vector store at index i with predicated tail
+i | index |
remaining | Number of remaining samples in the loop |
val | Vector value to write at index i with tail predication |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype with predication
+ +struct arm_cmsis_dsp::VectorView< T, DYNAMIC > | +
Vector view with dynamic stride (not known at build time)
+T | Type of the scalar |
Public Types | |
+using | Vector = typename vector_traits< T >::vector |
Type of vectors for a vector architecture and for scalar datatype P. | |
Public Member Functions | |
vector_length_t | compute_length (const index_t start, const index_t stop, const index_t stride) const |
Compute the number of elements in the vector view. | |
VectorView (T *v, const index_t start, const index_t stop, const index_t stride) | |
Create a vector view on a buffer. | |
VectorView (const Vector_Base< T > &v, const index_t stride) | |
Create a vector view on a vector. | |
VectorView (const Vector_Base< T > &v, const index_t start, const index_t stop, const index_t stride) | |
Create a vector view on a vector. | |
vector_length_t | length () const |
Vector view dimension. | |
T * | ptr () const |
Pointer to view storage. | |
T * | ptr (const index_t i) const |
Pointer to view storage at index i. | |
const T * | const_ptr () const |
Pointer to view constant storage. | |
const T * | const_ptr (const index_t i) const |
Pointer to view constant storage at index i. | |
T & | operator[] (index_t i) |
Element at index i. | |
T & | operator[] (index_t i) const |
Element at index i. | |
void | vector_store (index_t i, Vector val) |
Vector store at index i | |
void | vector_store_tail (index_t i, vector_length_t remaining, Vector val) |
Vector store at index i with predicated tail | |
Vector const | vector_op_tail (index_t i, vector_length_t remaining) const |
Vector operation at index i with predicated tail | |
Vector const | vector_op (index_t i) const |
Vector operation at index i | |
VectorView (const VectorView &other) | |
Create a vector view from another view. | |
VectorView (VectorView &&other) | |
Move a vector view to another view. | |
template<typename Derived > | |
VectorView & | operator= (const _Expr< Derived > &other) |
Assign an expression to a vector view. | |
VectorView & | operator= (const T val) |
Assign a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator+= (const _Expr< Derived > &other) |
Elementwise add an expression to a vector view. | |
VectorView & | operator+= (const VectorView &other) |
Elementwise add a vector view to a vector view. | |
VectorView & | operator+= (const T other) |
Elementwise add a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator-= (const _Expr< Derived > &other) |
Elementwise subtract an expression to a vector view. | |
VectorView & | operator-= (const VectorView &other) |
Elementwise subtract a vector view to a vector view. | |
VectorView & | operator-= (const T other) |
Elementwise subtract a scalar to a vector view. | |
template<typename Derived > | |
VectorView & | operator*= (const _Expr< Derived > &other) |
Elementwise multiply an expression to a vector view. | |
VectorView & | operator*= (const VectorView &other) |
Elementwise multiply a vector view to a vector view. | |
VectorView & | operator*= (const T other) |
Elementwise multiply a scalar to a vector view. | |
index_t | stride () const |
Stride of the vector view. | |
template<int S = 1> | |
VectorView< T, DYNAMIC > | sub (const index_t start=0, const index_t stop=-1) |
Create a sub vector (a view of a view) | |
template<int S = 1> | |
const VectorView< T, DYNAMIC > | sub (const index_t start=0, const index_t stop=-1) const |
Create a constant sub vector (a view of a view) | |
+
|
+ +inlineexplicit | +
Create a vector view on a buffer.
+v | Buffer of samples (not owned by the view) |
start | Start index of the view |
stop | Stop index of the view (first elemnt after the view) |
stride | Stride (only known at runtime) |
+
|
+ +inlineexplicit | +
Create a vector view on a vector.
+v | Vector owning the storage (not owned by the view) |
stride | Stride (only known at runtime) |
start is 0 stop is defined by the length of the vector
+ +
+
|
+ +inlineexplicit | +
Create a vector view on a vector.
+v | Vector owning the storage (not owned by the view) |
start | Start index of the view |
stop | Stop index |
stride | Stride (only known at runtime) |
+
|
+ +inline | +
Create a vector view from another view.
+other | the other vector view |
The new vector view will point to the same storage as the other vector view. No copy of element is occuring. To copy vector view content, the expr and copy operators are needed.
+ +
+
|
+ +inline | +
Move a vector view to another view.
+other | the other vector view |
The new vector view will point to the same storage as the other vector view. No copy of element is occuring.
+The other vector view is no more valid (points to null storage)
+ +
+
|
+ +inline | +
+
|
+ +inline | +
Pointer to view constant storage.
+
+
|
+ +inline | +
Pointer to view constant storage at index i.
+i | Index |
The stride is used to compute this pointer. The index is scaled by the stride.
+ +
+
|
+ +inline | +
Vector view dimension.
+
+
|
+ +inline | +
Elementwise multiply an expression to a vector view.
+Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
+
|
+ +inline | +
Elementwise multiply a scalar to a vector view.
+other | the scalar |
+
|
+ +inline | +
Elementwise multiply a vector view to a vector view.
+other | the vector view to add |
+
|
+ +inline | +
Elementwise add an expression to a vector view.
+Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
+
|
+ +inline | +
Elementwise add a scalar to a vector view.
+other | the scalar |
+
|
+ +inline | +
Elementwise add a vector view to a vector view.
+other | the vector view to add |
+
|
+ +inline | +
Elementwise subtract an expression to a vector view.
+Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
+
|
+ +inline | +
Elementwise subtract a scalar to a vector view.
+other | the scalar |
+
|
+ +inline | +
Elementwise subtract a vector view to a vector view.
+other | the vector view to add |
+
|
+ +inline | +
Assign an expression to a vector view.
+Derived | the datatype representing the abstract syntax tree of the view |
other | the expression |
Evaluate an expression an assign its result to the vector view
+ +
+
|
+ +inline | +
Assign a scalar to a vector view.
+val | the scalar |
+
|
+ +inline | +
Element at index i.
+i | Index |
The stride is used to compute this reference. The index is scaled by the stride.
+ +
+
|
+ +inline | +
Element at index i.
+i | Index |
The stride is used to compute this reference. The index is scaled by the stride.
+ +
+
|
+ +inline | +
Pointer to view storage.
+
+
|
+ +inline | +
Pointer to view storage at index i.
+i | Index |
The stride is used to compute this pointer. The index is scaled by the stride.
+ +
+
|
+ +inline | +
Stride of the vector view.
+
+
|
+ +inline | +
Create a sub vector (a view of a view)
+S | stride known at build time |
start | Start index |
stop | Stop index (first element after the view) By default it is the vector view length |
+
|
+ +inline | +
Create a constant sub vector (a view of a view)
+S | stride known at build time |
start | Start index |
stop | Stop index (first element after the view) By default it is the vector view length |
Vector operation at index i
+i | index |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i. In the case of a vector, this operation is a load
+ +
+
|
+ +inline | +
Vector operation at index i with predicated tail
+i | index |
remaining | Number of remaining samples in the loop |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function execute an operation at index i with predication. In the case of a vector, this operation is a load
+ +
+
|
+ +inline | +
Vector store at index i
+i | index |
val | Vector value |
On an architecture supporting vectors, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype
+ +
+
|
+ +inline | +
Vector store at index i with predicated tail
+i | index |
remaining | Number of remaining samples in the loop |
val | Vector value to write at index i with tail predication |
On an architecture supporting vectors and predicated loops, if the scalar datatype T has a corresponding vector datatype, this function stores a vector value at index i in this vector datatype with predication
+ +
+
|
+ +inline | +
Identity operator for expression.
+LHS | Left hand side datatype |
a | Left hand side expression tree |
Used to consider a vector view as an expression and force the copy of this vector view when assigned to another vector entity.
+ +
+
|
+ +inline | +
Identity operator for expression.
+LHS | Left hand side datatype |
a | Left hand side expression tree |
Used to consider a vector view as an expression and force the copy of this vector view when assigned to another vector entity.
+ +
+
|
+ +inline | +
Element wise multiplication operator for expressions.
+LHS | Left hand side datatype |
RHS | Right hand side datatype |
a | Left hand side expression tree |
b | Right hand side expression tree |
elementwise vector * vector (including matrix)
+ +
+
|
+ +inline | +
LHS | Left hand side datatype |
a | Left hand side expression tree |
+vector (including matrix)
+ +
+
|
+ +inline | +
Addition operator for expressions.
+LHS | Left hand side datatype |
RHS | Right hand side datatype |
a | Left hand side expression tree |
b | Right hand side expression tree |
vector + vector (including matrix)
+ +
+
|
+ +inline | +
LHS | Left hand side datatype |
a | Left hand side expression tree |
-vector (including matrix)
+ +
+
|
+ +inline | +
Subtraction operator for expressions.
+LHS | Left hand side datatype |
RHS | Right hand side datatype |
a | Left hand side expression tree |
b | Right hand side expression tree |
vector - vector (including matrix)
+ +variance = ((x[0] - x') * (x[0] - x') + (x[1] - x') * (x[1] - x') + ... + * (x[n-1] - x') * (x[n-1] - x')) / (N-1)where,
x[n]
is the input sequence, N
is the number of input samples, and x'
is the mean value of the input sequence, x[n]
. x'
is defined as: x' = (x[0] + x[1] + ... + x[n-1]) / N
testInput_f32
points to the input data wire1
, wir2
, wire3
temporary buffers blockSize
number of samples processed at a time refVarianceOut
reference variance value+Functions | |
void | arm_bartlett_f32 (float32_t *pDst, uint32_t blockSize) |
Bartlett window generating function (f32). | |
void | arm_bartlett_f64 (float64_t *pDst, uint32_t blockSize) |
Bartlett window generating function (f64). | |
void arm_bartlett_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Bartlett window generating function (f32).
+Bartlett window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 26.5 dB |
Normalized equivalent noise bandwidth | 1.3333 bins |
3 dB bandwidth | 1.2736 bins |
Flatness | -1.8242 dB |
Recommended overlap | 50.0 % |
void arm_bartlett_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Bartlett window generating function (f64).
+Bartlett window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 26.5 dB |
Normalized equivalent noise bandwidth | 1.3333 bins |
3 dB bandwidth | 1.2736 bins |
Flatness | -1.8242 dB |
Recommended overlap | 50.0 % |
+Functions | |
void | arm_blackman_harris_92db_f32 (float32_t *pDst, uint32_t blockSize) |
92 dB Blackman Harris window generating function (f32). | |
void | arm_blackman_harris_92db_f64 (float64_t *pDst, uint32_t blockSize) |
92 dB Blackman Harris window generating function (f64). | |
void arm_blackman_harris_92db_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
92 dB Blackman Harris window generating function (f32).
+92 db blackman harris window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 92.0 dB |
Normalized equivalent noise bandwidth | 2.0044 bins |
3 dB bandwidth | 1.8962 bins |
Flatness | -0.8256 dB |
Recommended overlap | 66.1 % |
void arm_blackman_harris_92db_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
92 dB Blackman Harris window generating function (f64).
+92 db blackman harris window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 92.0 dB |
Normalized equivalent noise bandwidth | 2.0044 bins |
3 dB bandwidth | 1.8962 bins |
Flatness | -0.8256 dB |
Recommended overlap | 66.1 % |
Use those windows when you need to estimate the amplitude of a tone.
+If just just need to detect a tone or estimate the noise, you can use the regular windows.
++Functions | |
void | arm_hamming_f32 (float32_t *pDst, uint32_t blockSize) |
Hamming window generating function (f32). | |
void | arm_hamming_f64 (float64_t *pDst, uint32_t blockSize) |
Hamming window generating function (f64). | |
void arm_hamming_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hamming window generating function (f32).
+Hamming window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 42.7 dB |
Normalized equivalent noise bandwidth | 1.3628 bins |
3 dB bandwidth | 1.3008 bins |
Flatness | -1.7514 dB |
Recommended overlap | 50 % |
void arm_hamming_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hamming window generating function (f64).
+Hamming window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 42.7 dB |
Normalized equivalent noise bandwidth | 1.3628 bins |
3 dB bandwidth | 1.3008 bins |
Flatness | -1.7514 dB |
Recommended overlap | 50 % |
+Functions | |
void | arm_hanning_f32 (float32_t *pDst, uint32_t blockSize) |
Hanning window generating function (f32). | |
void | arm_hanning_f64 (float64_t *pDst, uint32_t blockSize) |
Hanning window generating function (f64). | |
void arm_hanning_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hanning window generating function (f32).
+Hanning window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 31.5 dB |
Normalized equivalent noise bandwidth | 1.5 bins |
3 dB bandwidth | 1.4382 bins |
Flatness | -1.4236 dB |
Recommended overlap | 50 % |
void arm_hanning_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hanning window generating function (f64).
+Hanning window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 31.5 dB |
Normalized equivalent noise bandwidth | 1.5 bins |
3 dB bandwidth | 1.4382 bins |
Flatness | -1.4236 dB |
Recommended overlap | 50 % |
+Functions | |
void | arm_hft116d_f32 (float32_t *pDst, uint32_t blockSize) |
Hft116d window generating function (f32). | |
void | arm_hft116d_f64 (float64_t *pDst, uint32_t blockSize) |
Hft116d window generating function (f64). | |
void arm_hft116d_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft116d window generating function (f32).
+Hft116d window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 116.8 dB |
Normalized equivalent noise bandwidth | 4.2186 bins |
3 dB bandwidth | 4.1579 bins |
Flatness | -0.0028 dB |
Recommended overlap | 78.2 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
+void arm_hft116d_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft116d window generating function (f64).
+Hft116d window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 116.8 dB |
Normalized equivalent noise bandwidth | 4.2186 bins |
3 dB bandwidth | 4.1579 bins |
Flatness | -0.0028 dB |
Recommended overlap | 78.2 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
++Functions | |
void | arm_hft144d_f32 (float32_t *pDst, uint32_t blockSize) |
Hft144d window generating function (f32). | |
void | arm_hft144d_f64 (float64_t *pDst, uint32_t blockSize) |
Hft144d window generating function (f64). | |
void arm_hft144d_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft144d window generating function (f32).
+Hft144d window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 144.1 dB |
Normalized equivalent noise bandwidth | 4.5386 bins |
3 dB bandwidth | 4.4697 bins |
Flatness | 0.0021 dB |
Recommended overlap | 79.9 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
+void arm_hft144d_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft144d window generating function (f64).
+Hft144d window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 144.1 dB |
Normalized equivalent noise bandwidth | 4.5386 bins |
3 dB bandwidth | 4.4697 bins |
Flatness | 0.0021 dB |
Recommended overlap | 79.9 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
++Functions | |
void | arm_hft169d_f32 (float32_t *pDst, uint32_t blockSize) |
Hft169d window generating function (f32). | |
void | arm_hft169d_f64 (float64_t *pDst, uint32_t blockSize) |
Hft169d window generating function (f64). | |
void arm_hft169d_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft169d window generating function (f32).
+Hft169d window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 169.5 dB |
Normalized equivalent noise bandwidth | 4.8347 bins |
3 dB bandwidth | 4.7588 bins |
Flatness | 0.0017 dB |
Recommended overlap | 81.2 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
+void arm_hft169d_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft169d window generating function (f64).
+Hft169d window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 169.5 dB |
Normalized equivalent noise bandwidth | 4.8347 bins |
3 dB bandwidth | 4.7588 bins |
Flatness | 0.0017 dB |
Recommended overlap | 81.2 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
++Functions | |
void | arm_hft196d_f32 (float32_t *pDst, uint32_t blockSize) |
Hft196d window generating function (f32). | |
void | arm_hft196d_f64 (float64_t *pDst, uint32_t blockSize) |
Hft196d window generating function (f64). | |
void arm_hft196d_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft196d window generating function (f32).
+Hft196d window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 196.2 dB |
Normalized equivalent noise bandwidth | 5.1134 bins |
3 dB bandwidth | 5.0308 bins |
Flatness | 0.0013 dB |
Recommended overlap | 82.3 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
+void arm_hft196d_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft196d window generating function (f64).
+Hft196d window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 196.2 dB |
Normalized equivalent noise bandwidth | 5.1134 bins |
3 dB bandwidth | 5.0308 bins |
Flatness | 0.0013 dB |
Recommended overlap | 82.3 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
++Functions | |
void | arm_hft223d_f32 (float32_t *pDst, uint32_t blockSize) |
Hft223d window generating function (f32). | |
void | arm_hft223d_f64 (float64_t *pDst, uint32_t blockSize) |
Hft223d window generating function (f64). | |
void arm_hft223d_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft223d window generating function (f32).
+Hft223d window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 223.0 dB |
Normalized equivalent noise bandwidth | 5.3888 bins |
3 dB bandwidth | 5.3000 bins |
Flatness | -0.0011 dB |
Recommended overlap | 83.3 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
+void arm_hft223d_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft223d window generating function (f64).
+Hft223d window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 223.0 dB |
Normalized equivalent noise bandwidth | 5.3888 bins |
3 dB bandwidth | 5.3000 bins |
Flatness | 0.0011 dB |
Recommended overlap | 83.3 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
++Functions | |
void | arm_hft248d_f32 (float32_t *pDst, uint32_t blockSize) |
Hft248d window generating function (f32). | |
void | arm_hft248d_f64 (float64_t *pDst, uint32_t blockSize) |
Hft248d window generating function (f64). | |
void arm_hft248d_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft248d window generating function (f32).
+Hft248d window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 248.4 dB |
Normalized equivalent noise bandwidth | 5.6512 bins |
3 dB bandwidth | 5.5567 bins |
Flatness | 0.0009 dB |
Recommended overlap | 84.1 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
+void arm_hft248d_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft248d window generating function (f64).
+Hft248d window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 248.4 dB |
Normalized equivalent noise bandwidth | 5.6512 bins |
3 dB bandwidth | 5.5567 bins |
Flatness | 0.0009 dB |
Recommended overlap | 84.1 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
++Functions | |
void | arm_hft90d_f32 (float32_t *pDst, uint32_t blockSize) |
Hft90d window generating function (f32). | |
void | arm_hft90d_f64 (float64_t *pDst, uint32_t blockSize) |
Hft90d window generating function (f64). | |
void arm_hft90d_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft90d window generating function (f32).
+Hft90d window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 90.2 dB |
Normalized equivalent noise bandwidth | 3.8832 bins |
3 dB bandwidth | 3.8320 bins |
Flatness | -0.0039 dB |
Recommended overlap | 76.0 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
+void arm_hft90d_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft90d window generating function (f64).
+Hft90d window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 90.2 dB |
Normalized equivalent noise bandwidth | 3.8832 bins |
3 dB bandwidth | 3.8320 bins |
Flatness | -0.0039 dB |
Recommended overlap | 76.0 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
++Functions | |
void | arm_hft95_f32 (float32_t *pDst, uint32_t blockSize) |
Hft95 window generating function (f32). | |
void | arm_hft95_f64 (float64_t *pDst, uint32_t blockSize) |
Hft95 window generating function (f64). | |
void arm_hft95_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft95 window generating function (f32).
+Hft95 window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 95.0 dB |
Normalized equivalent noise bandwidth | 3.8112 bins |
3 dB bandwidth | 3.7590 bins |
Flatness | 0.0044 dB |
Recommended overlap | 75.6 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
+void arm_hft95_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Hft95 window generating function (f64).
+Hft95 window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 95.0 dB |
Normalized equivalent noise bandwidth | 3.8112 bins |
3 dB bandwidth | 3.7590 bins |
Flatness | 0.0044 dB |
Recommended overlap | 75.6 % |
Included in CMSIS-DSP with authorization from professor Gerhard Heinzel.
++Functions | |
void | arm_nuttall3_f32 (float32_t *pDst, uint32_t blockSize) |
Nuttall3 window generating function (f32). | |
void | arm_nuttall3_f64 (float64_t *pDst, uint32_t blockSize) |
Nuttall3 window generating function (f64). | |
void arm_nuttall3_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall3 window generating function (f32).
+Nuttall3 window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 46.7 dB |
Normalized equivalent noise bandwidth | 1.9444 bins |
3 dB bandwidth | 1.8496 bins |
Flatness | -0.8630 dB |
Recommended overlap | 64.7 % |
void arm_nuttall3_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall3 window generating function (f64).
+Nuttall3 window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 46.7 dB |
Normalized equivalent noise bandwidth | 1.9444 bins |
3 dB bandwidth | 1.8496 bins |
Flatness | -0.863 dB |
Recommended overlap | 64.7 % |
+Functions | |
void | arm_nuttall3a_f32 (float32_t *pDst, uint32_t blockSize) |
Nuttall3a window generating function (f32). | |
void | arm_nuttall3a_f64 (float64_t *pDst, uint32_t blockSize) |
Nuttall3a window generating function (f64). | |
void arm_nuttall3a_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall3a window generating function (f32).
+Nuttall3a window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 64.2 dB |
Normalized equivalent noise bandwidth | 1.7721 bins |
3 dB bandwidth | 1.6828 bins |
Flatness | -1.0453 dB |
Recommended overlap | 61.2 % |
void arm_nuttall3a_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall3a window generating function (f64).
+Nuttall3a window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 64.2 dB |
Normalized equivalent noise bandwidth | 1.7721 bins |
3 dB bandwidth | 1.6828 bins |
Flatness | -1.0453 dB |
Recommended overlap | 61.2 % |
+Functions | |
void | arm_nuttall3b_f32 (float32_t *pDst, uint32_t blockSize) |
Nuttall3b window generating function (f32). | |
void | arm_nuttall3b_f64 (float64_t *pDst, uint32_t blockSize) |
Nuttall3b window generating function (f64). | |
void arm_nuttall3b_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall3b window generating function (f32).
+Nuttall3b window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 71.5 dB |
Normalized equivalent noise bandwidth | 1.7037 bins |
3 dB bandwidth | 1.6162 bins |
Flatness | -1.1352 dB |
Recommended overlap | 59.8 % |
void arm_nuttall3b_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall3b window generating function (f64).
+Nuttall3b window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 71.5 dB |
Normalized equivalent noise bandwidth | 1.7037 bins |
3 dB bandwidth | 1.6162 bins |
Flatness | -1.1352 dB |
Recommended overlap | 59.8 % |
+Functions | |
void | arm_nuttall4_f32 (float32_t *pDst, uint32_t blockSize) |
Nuttall4 window generating function (f32). | |
void | arm_nuttall4_f64 (float64_t *pDst, uint32_t blockSize) |
Nuttall4 window generating function (f64). | |
void arm_nuttall4_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall4 window generating function (f32).
+Nuttall4 window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 60.9 dB |
Normalized equivalent noise bandwidth | 2.31 bins |
3 dB bandwidth | 2.1884 bins |
Flatness | -0.6184 dB |
Recommended overlap | 70.5 % |
void arm_nuttall4_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall4 window generating function (f64).
+Nuttall4 window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 60.9 dB |
Normalized equivalent noise bandwidth | 2.31 bins |
3 dB bandwidth | 2.1884 bins |
Flatness | -0.6184 dB |
Recommended overlap | 70.5 % |
+Functions | |
void | arm_nuttall4a_f32 (float32_t *pDst, uint32_t blockSize) |
Nuttall4a window generating function (f32). | |
void | arm_nuttall4a_f64 (float64_t *pDst, uint32_t blockSize) |
Nuttall4a window generating function (f64). | |
void arm_nuttall4a_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall4a window generating function (f32).
+Nuttall4a window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 82.6 dB |
Normalized equivalent noise bandwidth | 2.1253 bins |
3 dB bandwidth | 2.0123 bins |
Flatness | -0.7321 dB |
Recommended overlap | 68.0 % |
void arm_nuttall4a_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall4a window generating function (f64).
+Nuttall4a window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 82.6 dB |
Normalized equivalent noise bandwidth | 2.1253 bins |
3 dB bandwidth | 2.0123 bins |
Flatness | -0.7321 dB |
Recommended overlap | 68.0 % |
+Functions | |
void | arm_nuttall4b_f32 (float32_t *pDst, uint32_t blockSize) |
Nuttall4b window generating function (f32). | |
void | arm_nuttall4b_f64 (float64_t *pDst, uint32_t blockSize) |
Nuttall4b window generating function (f64). | |
void arm_nuttall4b_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall4b window generating function (f32).
+Nuttall4b window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 93.3 dB |
Normalized equivalent noise bandwidth | 2.0212 bins |
3 dB bandwidth | 1.9122 bins |
Flatness | -0.8118 dB |
Recommended overlap | 66.3 % |
void arm_nuttall4b_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall4b window generating function (f64).
+Nuttall4b window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 93.3 dB |
Normalized equivalent noise bandwidth | 2.0212 bins |
3 dB bandwidth | 1.9122 bins |
Flatness | -0.8118 dB |
Recommended overlap | 66.3 % |
+Functions | |
void | arm_nuttall4c_f32 (float32_t *pDst, uint32_t blockSize) |
Nuttall4c window generating function (f32). | |
void | arm_nuttall4c_f64 (float64_t *pDst, uint32_t blockSize) |
Nuttall4c window generating function (f64). | |
void arm_nuttall4c_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall4c window generating function (f32).
+Nuttall4c window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 98.1 dB |
Normalized equivalent noise bandwidth | 1.9761 bins |
3 dB bandwidth | 1.8687 bins |
Flatness | -0.8506 dB |
Recommended overlap | 65.6 % |
void arm_nuttall4c_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Nuttall4c window generating function (f64).
+Nuttall4c window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 98.1 dB |
Normalized equivalent noise bandwidth | 1.9761 bins |
3 dB bandwidth | 1.8687 bins |
Flatness | -0.8506 dB |
Recommended overlap | 65.6 % |
Regular window functions that can be used for detecting tones or estimating the noise. If you need to estimate the amplitude of a tones, prefer a flat top window.
++Functions | |
void | arm_welch_f32 (float32_t *pDst, uint32_t blockSize) |
Welch window generating function (f32). | |
void | arm_welch_f64 (float64_t *pDst, uint32_t blockSize) |
Welch window generating function (f64). | |
void arm_welch_f32 | +( | +float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Welch window generating function (f32).
+Welch window (float).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 21.3 dB |
Normalized equivalent noise bandwidth | 1.2 bins |
3 dB bandwidth | 1.1535 bins |
Flatness | -2.2248 dB |
Recommended overlap | 29.3 % |
void arm_welch_f64 | +( | +float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Welch window generating function (f64).
+Welch window (double).
+[out] | pDst | points to the output generated window |
[in] | blockSize | number of samples in the window |
Parameter | Value |
---|---|
Peak sidelobe level | 21.3 dB |
Normalized equivalent noise bandwidth | 1.2 bins |
3 dB bandwidth | 1.1535 bins |
Flatness | -2.2248 dB |
Recommended overlap | 29.3 % |
+Functions | |
void | arm_xor_u16 (const uint16_t *pSrcA, const uint16_t *pSrcB, uint16_t *pDst, uint32_t blockSize) |
Compute the logical bitwise XOR of two fixed-point vectors. | |
void | arm_xor_u32 (const uint32_t *pSrcA, const uint32_t *pSrcB, uint32_t *pDst, uint32_t blockSize) |
Compute the logical bitwise XOR of two fixed-point vectors. | |
void | arm_xor_u8 (const uint8_t *pSrcA, const uint8_t *pSrcB, uint8_t *pDst, uint32_t blockSize) |
Compute the logical bitwise XOR of two fixed-point vectors. | |
Compute the logical bitwise XOR.
+There are separate functions for uint32_t, uint16_t, and uint8_t data types.
+void arm_xor_u16 | +( | +const uint16_t * | +pSrcA, | +
+ | + | const uint16_t * | +pSrcB, | +
+ | + | uint16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise XOR of two fixed-point vectors.
+[in] | pSrcA | points to input vector A |
[in] | pSrcB | points to input vector B |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_xor_u32 | +( | +const uint32_t * | +pSrcA, | +
+ | + | const uint32_t * | +pSrcB, | +
+ | + | uint32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise XOR of two fixed-point vectors.
+[in] | pSrcA | points to input vector A |
[in] | pSrcB | points to input vector B |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_xor_u8 | +( | +const uint8_t * | +pSrcA, | +
+ | + | const uint8_t * | +pSrcB, | +
+ | + | uint8_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Compute the logical bitwise XOR of two fixed-point vectors.
+[in] | pSrcA | points to input vector A |
[in] | pSrcB | points to input vector B |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
arm_status | arm_atan2_f16 (float16_t y, float16_t x, float16_t *result) |
Arc Tangent of y/x using sign of y and x to get right quadrant. | |
arm_status | arm_atan2_f32 (float32_t y, float32_t x, float32_t *result) |
Arc Tangent of y/x using sign of y and x to get right quadrant. | |
arm_status | arm_atan2_q15 (q15_t y, q15_t x, q15_t *result) |
Arc Tangent of y/x using sign of y and x to get right quadrant. | |
arm_status | arm_atan2_q31 (q31_t y, q31_t x, q31_t *result) |
Arc Tangent of y/x using sign of y and x to get right quadrant. | |
Computing Arc tangent only using the ratio y/x is not enough to determine the angle since there is an indeterminacy. Opposite quadrants are giving the same ratio.
+ArcTan2 is not using y/x to compute the angle but y and x and use the sign of y and x to determine the quadrant.
+arm_status arm_atan2_f16 | +( | +float16_t | +y, | +
+ | + | float16_t | +x, | +
+ | + | float16_t * | +result | +
+ | ) | ++ |
Arc Tangent of y/x using sign of y and x to get right quadrant.
+Arc tangent in radian of y/x using sign of x and y to determine right quadrant.
+[in] | y | y coordinate |
[in] | x | x coordinate |
[out] | result | Result |
arm_status arm_atan2_f32 | +( | +float32_t | +y, | +
+ | + | float32_t | +x, | +
+ | + | float32_t * | +result | +
+ | ) | ++ |
Arc Tangent of y/x using sign of y and x to get right quadrant.
+Arc tangent in radian of y/x using sign of x and y to determine right quadrant.
+[in] | y | y coordinate |
[in] | x | x coordinate |
[out] | result | Result |
arm_status arm_atan2_q15 | +( | +q15_t | +y, | +
+ | + | q15_t | +x, | +
+ | + | q15_t * | +result | +
+ | ) | ++ |
Arc Tangent of y/x using sign of y and x to get right quadrant.
+Arc tangent in radian of y/x using sign of x and y to determine right quadrant.
+[in] | y | y coordinate |
[in] | x | x coordinate |
[out] | result | Result in Q2.13 |
arm_status arm_atan2_q31 | +( | +q31_t | +y, | +
+ | + | q31_t | +x, | +
+ | + | q31_t * | +result | +
+ | ) | ++ |
Arc Tangent of y/x using sign of y and x to get right quadrant.
+Arc tangent in radian of y/x using sign of x and y to determine right quadrant.
+[in] | y | y coordinate |
[in] | x | x coordinate |
[out] | result | Result in Q2.29 |
+Functions | |
void | arm_barycenter_f16 (const float16_t *in, const float16_t *weights, float16_t *out, uint32_t nbVectors, uint32_t vecDim) |
Barycenter. | |
void | arm_barycenter_f32 (const float32_t *in, const float32_t *weights, float32_t *out, uint32_t nbVectors, uint32_t vecDim) |
Barycenter. | |
Barycenter of weighted vectors
+void arm_barycenter_f16 | +( | +const float16_t * | +in, | +
+ | + | const float16_t * | +weights, | +
+ | + | float16_t * | +out, | +
+ | + | uint32_t | +nbVectors, | +
+ | + | uint32_t | +vecDim | +
+ | ) | ++ |
Barycenter.
+[in] | *in | List of vectors |
[in] | *weights | Weights of the vectors |
[out] | *out | Barycenter |
[in] | nbVectors | Number of vectors |
[in] | vecDim | Dimension of space (vector dimension) |
void arm_barycenter_f32 | +( | +const float32_t * | +in, | +
+ | + | const float32_t * | +weights, | +
+ | + | float32_t * | +out, | +
+ | + | uint32_t | +nbVectors, | +
+ | + | uint32_t | +vecDim | +
+ | ) | ++ |
Barycenter.
+[in] | *in | List of vectors |
[in] | *weights | Weights of the vectors |
[out] | *out | Barycenter |
[in] | nbVectors | Number of vectors |
[in] | vecDim | Dimension of space (vector dimension) |
+Functions | |
float16_t | arm_braycurtis_distance_f16 (const float16_t *pA, const float16_t *pB, uint32_t blockSize) |
Bray-Curtis distance between two vectors. | |
float32_t | arm_braycurtis_distance_f32 (const float32_t *pA, const float32_t *pB, uint32_t blockSize) |
Bray-Curtis distance between two vectors. | |
Bray-Curtis distance between two vectors
+float16_t arm_braycurtis_distance_f16 | +( | +const float16_t * | +pA, | +
+ | + | const float16_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Bray-Curtis distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
float32_t arm_braycurtis_distance_f32 | +( | +const float32_t * | +pA, | +
+ | + | const float32_t * | +pB, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Bray-Curtis distance between two vectors.
+[in] | pA | First vector |
[in] | pB | Second vector |
[in] | blockSize | vector length |
+Functions | |
void | arm_clarke_f32 (float32_t Ia, float32_t Ib, float32_t *pIalpha, float32_t *pIbeta) |
Floating-point Clarke transform. | |
void | arm_clarke_q31 (q31_t Ia, q31_t Ib, q31_t *pIalpha, q31_t *pIbeta) |
Clarke transform for Q31 version. | |
Forward Clarke transform converts the instantaneous stator phases into a two-coordinate time invariant vector. Generally the Clarke transform uses three-phase currents Ia, Ib and Ic
to calculate currents in the two-phase orthogonal stator axis Ialpha
and Ibeta
. When Ialpha
is superposed with Ia
as shown in the figure below
and Ia + Ib + Ic = 0
, in this condition Ialpha
and Ibeta
can be calculated using only Ia
and Ib
.
The function operates on a single sample of data and each call to the function returns the processed output. The library provides separate functions for Q31 and floating-point data types.
Ia
and Ib
are the instantaneous stator phases and pIalpha
and pIbeta
are the two coordinates of time invariant vector. void arm_clarke_f32 | +( | +float32_t | +Ia, | +
+ | + | float32_t | +Ib, | +
+ | + | float32_t * | +pIalpha, | +
+ | + | float32_t * | +pIbeta | +
+ | ) | ++ |
Floating-point Clarke transform.
+[in] | Ia | input three-phase coordinate a |
[in] | Ib | input three-phase coordinate b |
[out] | pIalpha | points to output two-phase orthogonal vector axis alpha |
[out] | pIbeta | points to output two-phase orthogonal vector axis beta |
void arm_clarke_q31 | +( | +q31_t | +Ia, | +
+ | + | q31_t | +Ib, | +
+ | + | q31_t * | +pIalpha, | +
+ | + | q31_t * | +pIbeta | +
+ | ) | ++ |
Clarke transform for Q31 version.
+[in] | Ia | input three-phase coordinate a |
[in] | Ib | input three-phase coordinate b |
[out] | pIalpha | points to output two-phase orthogonal vector axis alpha |
[out] | pIbeta | points to output two-phase orthogonal vector axis beta |
+Functions | |
void | arm_cmplx_conj_f16 (const float16_t *pSrc, float16_t *pDst, uint32_t numSamples) |
Floating-point complex conjugate. | |
void | arm_cmplx_conj_f32 (const float32_t *pSrc, float32_t *pDst, uint32_t numSamples) |
Floating-point complex conjugate. | |
void | arm_cmplx_conj_q15 (const q15_t *pSrc, q15_t *pDst, uint32_t numSamples) |
Q15 complex conjugate. | |
void | arm_cmplx_conj_q31 (const q31_t *pSrc, q31_t *pDst, uint32_t numSamples) |
Q31 complex conjugate. | |
Conjugates the elements of a complex data vector.
+The pSrc
points to the source data and pDst
points to the destination data where the result should be written. numSamples
specifies the number of complex samples and the data in each array is stored in an interleaved fashion (real, imag, real, imag, ...). Each array has a total of 2*numSamples
values.
The underlying algorithm is used:
+for (n = 0; n < numSamples; n++) { + pDst[(2*n) ] = pSrc[(2*n) ]; // real part + pDst[(2*n)+1] = -pSrc[(2*n)+1]; // imag part +} +
There are separate functions for floating-point, Q15, and Q31 data types.
+void arm_cmplx_conj_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex conjugate.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_conj_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex conjugate.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_conj_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q15 complex conjugate.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_conj_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q31 complex conjugate.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | numSamples | number of samples in each vector |
+Functions | |
void | arm_cmplx_dot_prod_f16 (const float16_t *pSrcA, const float16_t *pSrcB, uint32_t numSamples, float16_t *realResult, float16_t *imagResult) |
Floating-point complex dot product. | |
void | arm_cmplx_dot_prod_f32 (const float32_t *pSrcA, const float32_t *pSrcB, uint32_t numSamples, float32_t *realResult, float32_t *imagResult) |
Floating-point complex dot product. | |
void | arm_cmplx_dot_prod_q15 (const q15_t *pSrcA, const q15_t *pSrcB, uint32_t numSamples, q31_t *realResult, q31_t *imagResult) |
Q15 complex dot product. | |
void | arm_cmplx_dot_prod_q31 (const q31_t *pSrcA, const q31_t *pSrcB, uint32_t numSamples, q63_t *realResult, q63_t *imagResult) |
Q31 complex dot product. | |
Computes the dot product of two complex vectors. The vectors are multiplied element-by-element and then summed.
+The pSrcA
points to the first complex input vector and pSrcB
points to the second complex input vector. numSamples
specifies the number of complex samples and the data in each array is stored in an interleaved fashion (real, imag, real, imag, ...). Each array has a total of 2*numSamples
values.
The underlying algorithm is used:
++realResult = 0; +imagResult = 0; +for (n = 0; n < numSamples; n++) { + realResult += pSrcA[(2*n)+0] * pSrcB[(2*n)+0] - pSrcA[(2*n)+1] * pSrcB[(2*n)+1]; + imagResult += pSrcA[(2*n)+0] * pSrcB[(2*n)+1] + pSrcA[(2*n)+1] * pSrcB[(2*n)+0]; +} +
There are separate functions for floating-point, Q15, and Q31 data types.
+void arm_cmplx_dot_prod_f16 | +( | +const float16_t * | +pSrcA, | +
+ | + | const float16_t * | +pSrcB, | +
+ | + | uint32_t | +numSamples, | +
+ | + | float16_t * | +realResult, | +
+ | + | float16_t * | +imagResult | +
+ | ) | ++ |
Floating-point complex dot product.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | numSamples | number of samples in each vector |
[out] | realResult | real part of the result returned here |
[out] | imagResult | imaginary part of the result returned here |
void arm_cmplx_dot_prod_f32 | +( | +const float32_t * | +pSrcA, | +
+ | + | const float32_t * | +pSrcB, | +
+ | + | uint32_t | +numSamples, | +
+ | + | float32_t * | +realResult, | +
+ | + | float32_t * | +imagResult | +
+ | ) | ++ |
Floating-point complex dot product.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | numSamples | number of samples in each vector |
[out] | realResult | real part of the result returned here |
[out] | imagResult | imaginary part of the result returned here |
void arm_cmplx_dot_prod_q15 | +( | +const q15_t * | +pSrcA, | +
+ | + | const q15_t * | +pSrcB, | +
+ | + | uint32_t | +numSamples, | +
+ | + | q31_t * | +realResult, | +
+ | + | q31_t * | +imagResult | +
+ | ) | ++ |
Q15 complex dot product.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | numSamples | number of samples in each vector |
[out] | realResult | real part of the result returned here |
[out] | imagResult | imaginary part of the result returned her |
realResult
and imagResult
are in 8.24 format. void arm_cmplx_dot_prod_q31 | +( | +const q31_t * | +pSrcA, | +
+ | + | const q31_t * | +pSrcB, | +
+ | + | uint32_t | +numSamples, | +
+ | + | q63_t * | +realResult, | +
+ | + | q63_t * | +imagResult | +
+ | ) | ++ |
Q31 complex dot product.
+[in] | pSrcA | points to the first input vector |
[in] | pSrcB | points to the second input vector |
[in] | numSamples | number of samples in each vector |
[out] | realResult | real part of the result returned here |
[out] | imagResult | imaginary part of the result returned here |
numSamples
is less than 32768. The return results realResult
and imagResult
are in 16.48 format. Input down scaling is not required. +Functions | |
void | arm_cmplx_mag_f16 (const float16_t *pSrc, float16_t *pDst, uint32_t numSamples) |
Floating-point complex magnitude. | |
void | arm_cmplx_mag_f32 (const float32_t *pSrc, float32_t *pDst, uint32_t numSamples) |
Floating-point complex magnitude. | |
void | arm_cmplx_mag_f64 (const float64_t *pSrc, float64_t *pDst, uint32_t numSamples) |
Floating-point complex magnitude. | |
void | arm_cmplx_mag_fast_q15 (const q15_t *pSrc, q15_t *pDst, uint32_t numSamples) |
Q15 complex magnitude. | |
void | arm_cmplx_mag_q15 (const q15_t *pSrc, q15_t *pDst, uint32_t numSamples) |
Q15 complex magnitude. | |
void | arm_cmplx_mag_q31 (const q31_t *pSrc, q31_t *pDst, uint32_t numSamples) |
Q31 complex magnitude. | |
Computes the magnitude of the elements of a complex data vector.
+The pSrc
points to the source data and pDst
points to the where the result should be written. numSamples
specifies the number of complex samples in the input array and the data is stored in an interleaved fashion (real, imag, real, imag, ...). The input array has a total of 2*numSamples
values; the output array has a total of numSamples
values.
The underlying algorithm is used:
++for (n = 0; n < numSamples; n++) { + pDst[n] = sqrt(pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2); +} +
There are separate functions for floating-point, Q15, and Q31 data types.
+void arm_cmplx_mag_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex magnitude.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mag_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex magnitude.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mag_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex magnitude.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mag_fast_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q15 complex magnitude.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mag_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q15 complex magnitude.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mag_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q31 complex magnitude.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
+Functions | |
void | arm_cmplx_mag_squared_f16 (const float16_t *pSrc, float16_t *pDst, uint32_t numSamples) |
Floating-point complex magnitude squared. | |
void | arm_cmplx_mag_squared_f32 (const float32_t *pSrc, float32_t *pDst, uint32_t numSamples) |
Floating-point complex magnitude squared. | |
void | arm_cmplx_mag_squared_f64 (const float64_t *pSrc, float64_t *pDst, uint32_t numSamples) |
Floating-point complex magnitude squared. | |
void | arm_cmplx_mag_squared_q15 (const q15_t *pSrc, q15_t *pDst, uint32_t numSamples) |
Q15 complex magnitude squared. | |
void | arm_cmplx_mag_squared_q31 (const q31_t *pSrc, q31_t *pDst, uint32_t numSamples) |
Q31 complex magnitude squared. | |
Computes the magnitude squared of the elements of a complex data vector.
+The pSrc
points to the source data and pDst
points to the where the result should be written. numSamples
specifies the number of complex samples in the input array and the data is stored in an interleaved fashion (real, imag, real, imag, ...). The input array has a total of 2*numSamples
values; the output array has a total of numSamples
values.
The underlying algorithm is used:
++for (n = 0; n < numSamples; n++) { + pDst[n] = pSrc[(2*n)+0]^2 + pSrc[(2*n)+1]^2; +} +
There are separate functions for floating-point, Q15, and Q31 data types.
+void arm_cmplx_mag_squared_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex magnitude squared.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mag_squared_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex magnitude squared.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mag_squared_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Floating-point complex magnitude squared.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mag_squared_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q15 complex magnitude squared.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
void arm_cmplx_mag_squared_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +numSamples | +
+ | ) | ++ |
Q31 complex magnitude squared.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | numSamples | number of samples in each vector |
+Functions | |
void | arm_copy_f16 (const float16_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Copies the elements of a f16 vector. | |
void | arm_copy_f32 (const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Copies the elements of a floating-point vector. | |
void | arm_copy_f64 (const float64_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Copies the elements of a floating-point vector. | |
void | arm_copy_q15 (const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Copies the elements of a Q15 vector. | |
void | arm_copy_q31 (const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Copies the elements of a Q31 vector. | |
void | arm_copy_q7 (const q7_t *pSrc, q7_t *pDst, uint32_t blockSize) |
Copies the elements of a Q7 vector. | |
Copies sample by sample from source vector to destination vector.
++ pDst[n] = pSrc[n]; 0 <= n < blockSize. +
There are separate functions for floating point, Q31, Q15, and Q7 data types.
+void arm_copy_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Copies the elements of a f16 vector.
+Copies the elements of a floating-point vector.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_copy_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Copies the elements of a floating-point vector.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_copy_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Copies the elements of a floating-point vector.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_copy_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Copies the elements of a Q15 vector.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_copy_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Copies the elements of a Q31 vector.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
void arm_copy_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Copies the elements of a Q7 vector.
+[in] | pSrc | points to input vector |
[out] | pDst | points to output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
float32_t | arm_cos_f32 (float32_t x) |
Fast approximation to the trigonometric cosine function for floating-point data. | |
q15_t | arm_cos_q15 (q15_t x) |
Fast approximation to the trigonometric cosine function for Q15 data. | |
q31_t | arm_cos_q31 (q31_t x) |
Fast approximation to the trigonometric cosine function for Q31 data. | |
Computes the trigonometric cosine function using a combination of table lookup and linear interpolation. There are separate functions for Q15, Q31, and floating-point data types. The input to the floating-point version is in radians while the fixed-point Q15 and Q31 have a scaled input with the range [0 +0.9999] mapping to [0 2*pi). The fixed-point range is chosen so that a value of 2*pi wraps around to 0.
+The implementation is based on table lookup using 512 values together with linear interpolation. The steps used are:
(1.0f-fract)*a + fract*b;
where
+ a = Table[index]; + b = Table[index+1]; +
Fast approximation to the trigonometric cosine function for floating-point data.
+[in] | x | input value in radians |
Fast approximation to the trigonometric cosine function for Q15 data.
+[in] | x | Scaled input value in radians |
The Q15 input value is in the range [0 +0.9999] and is mapped to a radian value in the range [0 2*PI).
+ +Fast approximation to the trigonometric cosine function for Q31 data.
+[in] | x | Scaled input value in radians |
The Q31 input value is in the range [0 +0.9999] and is mapped to a radian value in the range [0 2*PI).
+ ++Functions | |
arm_status | arm_divide_q15 (q15_t numerator, q15_t denominator, q15_t *quotient, int16_t *shift) |
Fixed point division. | |
arm_status | arm_divide_q31 (q31_t numerator, q31_t denominator, q31_t *quotient, int16_t *shift) |
Fixed point division. | |
arm_status arm_divide_q15 | +( | +q15_t | +numerator, | +
+ | + | q15_t | +denominator, | +
+ | + | q15_t * | +quotient, | +
+ | + | int16_t * | +shift | +
+ | ) | ++ |
Fixed point division.
+[in] | numerator | Numerator |
[in] | denominator | Denominator |
[out] | quotient | Quotient value normalized between -1.0 and 1.0 |
[out] | shift | Shift left value to get the unnormalized quotient |
When dividing by 0, an error ARM_MATH_NANINF is returned. And the quotient is forced to the saturated negative or positive value.
+ +arm_status arm_divide_q31 | +( | +q31_t | +numerator, | +
+ | + | q31_t | +denominator, | +
+ | + | q31_t * | +quotient, | +
+ | + | int16_t * | +shift | +
+ | ) | ++ |
Fixed point division.
+[in] | numerator | Numerator |
[in] | denominator | Denominator |
[out] | quotient | Quotient value normalized between -1.0 and 1.0 |
[out] | shift | Shift left value to get the unnormalized quotient |
When dividing by 0, an error ARM_MATH_NANINF is returned. And the quotient is forced to the saturated negative or positive value.
+ ++Functions | |
void | arm_f16_to_f64 (const float16_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Converts the elements of the f16 vector to f64 vector. | |
void | arm_f16_to_float (const float16_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Converts the elements of the f16 vector to f32 vector. | |
void | arm_f16_to_q15 (const float16_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Converts the elements of the f16 vector to Q15 vector. | |
void arm_f16_to_f64 | +( | +const float16_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the f16 vector to f64 vector.
+Converts the elements of the 16 bit floating-point vector to 64 bit floating-point vector.
+[in] | pSrc | points to the f16 input vector |
[out] | pDst | points to the f64 output vector |
[in] | blockSize | number of samples in each vector |
void arm_f16_to_float | +( | +const float16_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the f16 vector to f32 vector.
+Converts the elements of the floating-point vector to Q31 vector.
+[in] | pSrc | points to the f16 input vector |
[out] | pDst | points to the f32 output vector |
[in] | blockSize | number of samples in each vector |
void arm_f16_to_q15 | +( | +const float16_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the f16 vector to Q15 vector.
+Converts the elements of the floating-point vector to Q31 vector.
+[in] | pSrc | points to the f16 input vector |
[out] | pDst | points to the Q15 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q15_t)(pSrc[n] * 32768); 0 <= n < blockSize. +
+Functions | |
void | arm_f64_to_f16 (const float64_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Converts the elements of the f64 vector to f16 vector. | |
void | arm_f64_to_float (const float64_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Converts the elements of the f64 vector to f32 vector. | |
void | arm_f64_to_q15 (const float64_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Converts the elements of the 64 bit floating-point vector to Q15 vector. | |
void | arm_f64_to_q31 (const float64_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Converts the elements of the 64 bit floating-point vector to Q31 vector. | |
void | arm_f64_to_q7 (const float64_t *pSrc, q7_t *pDst, uint32_t blockSize) |
Converts the elements of the 64 bit floating-point vector to Q7 vector. | |
void arm_f64_to_f16 | +( | +const float64_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the f64 vector to f16 vector.
+Converts the elements of the 64 bit floating-point vector to 16 bit floating-point vector.
+[in] | pSrc | points to the f64 input vector |
[out] | pDst | points to the f16 output vector |
[in] | blockSize | number of samples in each vector |
void arm_f64_to_float | +( | +const float64_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the f64 vector to f32 vector.
+Converts the elements of the 64 bit floating-point vector to floating-point vector.
+[in] | pSrc | points to the f64 input vector |
[out] | pDst | points to the f32 output vector |
[in] | blockSize | number of samples in each vector |
void arm_f64_to_q15 | +( | +const float64_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the 64 bit floating-point vector to Q15 vector.
+[in] | pSrc | points to the 64 bit floating-point input vector |
[out] | pDst | points to the Q15 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q15_t)(pSrc[n] * 32768); 0 <= n < blockSize. +
void arm_f64_to_q31 | +( | +const float64_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the 64 bit floating-point vector to Q31 vector.
+[in] | pSrc | points to the 64 bit floating-point input vector |
[out] | pDst | points to the Q31 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q31_t)(pSrc[n] * 2147483648); 0 <= n < blockSize. +
void arm_f64_to_q7 | +( | +const float64_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the 64 bit floating-point vector to Q7 vector.
+[in] | *pSrc | points to the 64 bit floating-point input vector |
[out] | *pDst | points to the Q7 output vector |
[in] | blockSize | length of the input vector |
+ pDst[n] = (q7_t)(pSrc[n] * 128); 0 <= n < blockSize. +
+Functions | |
void | arm_float_to_f16 (const float32_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Converts the elements of the floating-point vector to f16 vector. | |
void | arm_float_to_f64 (const float32_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Converts the elements of the floating-point vector to f64 vector. | |
void | arm_float_to_q15 (const float32_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Converts the elements of the floating-point vector to Q15 vector. | |
void | arm_float_to_q31 (const float32_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Converts the elements of the floating-point vector to Q31 vector. | |
void | arm_float_to_q7 (const float32_t *pSrc, q7_t *pDst, uint32_t blockSize) |
Converts the elements of the floating-point vector to Q7 vector. | |
void arm_float_to_f16 | +( | +const float32_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the floating-point vector to f16 vector.
+Converts the elements of the floating-point vector to Q31 vector.
+[in] | pSrc | points to the f32 input vector |
[out] | pDst | points to the f16 output vector |
[in] | blockSize | number of samples in each vector |
void arm_float_to_f64 | +( | +const float32_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the floating-point vector to f64 vector.
+Converts the elements of the floating-point vector to 64 bit floating-point vector.
+[in] | pSrc | points to the f32 input vector |
[out] | pDst | points to the f64 output vector |
[in] | blockSize | number of samples in each vector |
void arm_float_to_q15 | +( | +const float32_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the floating-point vector to Q15 vector.
+[in] | pSrc | points to the floating-point input vector |
[out] | pDst | points to the Q15 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q15_t)(pSrc[n] * 32768); 0 <= n < blockSize. +
void arm_float_to_q31 | +( | +const float32_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the floating-point vector to Q31 vector.
+[in] | pSrc | points to the floating-point input vector |
[out] | pDst | points to the Q31 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q31_t)(pSrc[n] * 2147483648); 0 <= n < blockSize. +
void arm_float_to_q7 | +( | +const float32_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the floating-point vector to Q7 vector.
+[in] | *pSrc | points to the floating-point input vector |
[out] | *pDst | points to the Q7 output vector |
[in] | blockSize | length of the input vector |
+ pDst[n] = (q7_t)(pSrc[n] * 128); 0 <= n < blockSize. +
+Typedefs | |
+typedef int8_t | q7_t |
8-bit fractional data type in 1.7 format. | |
+typedef int16_t | q15_t |
16-bit fractional data type in 1.15 format. | |
+typedef int32_t | q31_t |
32-bit fractional data type in 1.31 format. | |
+typedef int64_t | q63_t |
64-bit fractional data type in 1.63 format. | |
+typedef float | float32_t |
32-bit floating-point type definition. | |
+typedef double | float64_t |
64-bit floating-point type definition. | |
typedef int64x2_t | q63x2_t |
vector types | |
+typedef int32x4_t | q31x4_t |
32-bit fractional 128-bit vector data type in 1.31 format. | |
+typedef int16x8_t | q15x8_t |
16-bit fractional 128-bit vector data type with 16-bit alignment in 1.15 format. | |
+typedef int8x16_t | q7x16_t |
8-bit fractional 128-bit vector data type with 8-bit alignment in 1.7 format. | |
+typedef int32x4x2_t | q31x4x2_t |
32-bit fractional 128-bit vector pair data type in 1.31 format. | |
+typedef int32x4x4_t | q31x4x4_t |
32-bit fractional 128-bit vector quadruplet data type in 1.31 format. | |
+typedef int16x8x2_t | q15x8x2_t |
16-bit fractional 128-bit vector pair data type in 1.15 format. | |
+typedef int16x8x4_t | q15x8x4_t |
16-bit fractional 128-bit vector quadruplet data type in 1.15 format. | |
+typedef int8x16x2_t | q7x16x2_t |
8-bit fractional 128-bit vector pair data type in 1.7 format. | |
+typedef int8x16x4_t | q7x16x4_t |
8-bit fractional 128-bit vector quadruplet data type in 1.7 format. | |
+typedef int32_t | q23_t |
32-bit fractional data type in 9.23 format. | |
+typedef int32x4_t | q23x4_t |
32-bit fractional 128-bit vector data type in 9.23 format. | |
+typedef int64x2_t | status64x2_t |
64-bit status 128-bit vector data type. | |
+typedef int32x4_t | status32x4_t |
32-bit status 128-bit vector data type. | |
+typedef int16x8_t | status16x8_t |
16-bit status 128-bit vector data type. | |
+typedef int8x16_t | status8x16_t |
8-bit status 128-bit vector data type. | |
+typedef float32x4_t | f32x4_t |
32-bit floating-point 128-bit vector type | |
+typedef float32x4x2_t | f32x4x2_t |
32-bit floating-point 128-bit vector pair data type | |
+typedef float32x4x4_t | f32x4x4_t |
32-bit floating-point 128-bit vector quadruplet data type | |
+typedef int32x2_t | q31x2_t |
32-bit fractional 64-bit vector data type in 1.31 format. | |
+typedef int16x4_t | q15x4_t |
16-bit fractional 64-bit vector data type in 1.15 format. | |
+typedef int8x8_t | q7x8_t |
8-bit fractional 64-bit vector data type in 1.7 format. | |
+typedef float32x2_t | f32x2_t |
32-bit float 64-bit vector data type. | |
+typedef float32x4x3_t | f32x4x3_t |
32-bit floating-point 128-bit vector triplet data type | |
+typedef int32x4x3_t | q31x4x3_t |
32-bit fractional 128-bit vector triplet data type in 1.31 format | |
+typedef int16x8x3_t | q15x8x3_t |
16-bit fractional 128-bit vector triplet data type in 1.15 format | |
+typedef int8x16x3_t | q7x16x3_t |
8-bit fractional 128-bit vector triplet data type in 1.7 format | |
+typedef float32x2x2_t | f32x2x2_t |
32-bit floating-point 64-bit vector pair data type | |
+typedef float32x2x3_t | f32x2x3_t |
32-bit floating-point 64-bit vector triplet data type | |
+typedef float32x2x4_t | f32x2x4_t |
32-bit floating-point 64-bit vector quadruplet data type | |
+typedef int32x2x2_t | q31x2x2_t |
32-bit fractional 64-bit vector pair data type in 1.31 format | |
+typedef int32x2x3_t | q31x2x3_t |
32-bit fractional 64-bit vector triplet data type in 1.31 format | |
+typedef int32x4x3_t | q31x2x4_t |
32-bit fractional 64-bit vector quadruplet data type in 1.31 format | |
+typedef int16x4x2_t | q15x4x2_t |
16-bit fractional 64-bit vector pair data type in 1.15 format | |
+typedef int16x4x2_t | q15x4x3_t |
16-bit fractional 64-bit vector triplet data type in 1.15 format | |
+typedef int16x4x3_t | q15x4x4_t |
16-bit fractional 64-bit vector quadruplet data type in 1.15 format | |
+typedef int8x8x2_t | q7x8x2_t |
8-bit fractional 64-bit vector pair data type in 1.7 format | |
+typedef int8x8x3_t | q7x8x3_t |
8-bit fractional 64-bit vector triplet data type in 1.7 format | |
+typedef int8x8x4_t | q7x8x4_t |
8-bit fractional 64-bit vector quadruplet data type in 1.7 format | |
+typedef int32x4_t | status32x2_t |
32-bit status 64-bit vector data type. | |
+typedef int16x8_t | status16x4_t |
16-bit status 64-bit vector data type. | |
+typedef int8x16_t | status8x8_t |
8-bit status 64-bit vector data type. | |
+Enumerations | |
enum | arm_status { + ARM_MATH_SUCCESS = 0 +, + ARM_MATH_ARGUMENT_ERROR = -1 +, + ARM_MATH_LENGTH_ERROR = -2 +, + ARM_MATH_SIZE_MISMATCH = -3 +, + ARM_MATH_NANINF = -4 +, + ARM_MATH_SINGULAR = -5 +, + ARM_MATH_TEST_FAILURE = -6 +, + ARM_MATH_DECOMPOSITION_FAILURE = -7 + + } |
Error status returned by some functions in the library. More... | |
typedef int64x2_t q63x2_t | +
vector types
+64-bit fractional 128-bit vector data type in 1.63 format
+ +enum arm_status | +
Error status returned by some functions in the library.
++Functions | |
uint32_t | arm_gaussian_naive_bayes_predict_f16 (const arm_gaussian_naive_bayes_instance_f16 *S, const float16_t *in, float16_t *pOutputProbabilities, float16_t *pBufferB) |
Naive Gaussian Bayesian Estimator. | |
uint32_t | arm_gaussian_naive_bayes_predict_f32 (const arm_gaussian_naive_bayes_instance_f32 *S, const float32_t *in, float32_t *pOutputProbabilities, float32_t *pBufferB) |
Naive Gaussian Bayesian Estimator. | |
Implement the naive gaussian Bayes estimator. The training must be done from scikit-learn.
+The parameters can be easily generated from the scikit-learn object. Some examples are given in DSP/Testing/PatternGeneration/Bayes.py
+uint32_t arm_gaussian_naive_bayes_predict_f16 | +( | +const arm_gaussian_naive_bayes_instance_f16 * | +S, | +
+ | + | const float16_t * | +in, | +
+ | + | float16_t * | +pOutputProbabilities, | +
+ | + | float16_t * | +pBufferB | +
+ | ) | ++ |
Naive Gaussian Bayesian Estimator.
+[in] | *S | points to a naive bayes instance structure |
[in] | *in | points to the elements of the input vector. |
[out] | *pOutputProbabilities | points to a buffer of length numberOfClasses containing estimated probabilities |
[out] | *pBufferB | points to a temporary buffer of length numberOfClasses |
uint32_t arm_gaussian_naive_bayes_predict_f32 | +( | +const arm_gaussian_naive_bayes_instance_f32 * | +S, | +
+ | + | const float32_t * | +in, | +
+ | + | float32_t * | +pOutputProbabilities, | +
+ | + | float32_t * | +pBufferB | +
+ | ) | ++ |
Naive Gaussian Bayesian Estimator.
+[in] | *S | points to a naive bayes instance structure |
[in] | *in | points to the elements of the input vector. |
[out] | *pOutputProbabilities | points to a buffer of length numberOfClasses containing estimated probabilities |
[out] | *pBufferB | points to a temporary buffer of length numberOfClasses |
+Content | |
Complex Conjugate | |
Complex Dot Product | |
Complex Magnitude | |
Complex Magnitude Squared | |
Complex-by-Complex Multiplication | |
Complex-by-Real Multiplication | |
This set of functions operates on complex data vectors. The data in the complex arrays is stored in an interleaved fashion (real, imag, real, imag, ...). In the API functions, the number of samples in a complex array refers to the number of complex values; the array contains twice this number of real values.
++Content | |
Sine Cosine | |
PID Motor Control | |
Vector Park Transform | |
Vector Inverse Park transform | |
Vector Clarke Transform | |
Vector Inverse Clarke Transform | |
+Content | |
Float Distances | |
Boolean Distances | |
Distance functions for use with clustering algorithms. There are distance functions for float vectors and boolean vectors.
++Content | |
Bayes Example | |
Class Marks Example | |
Convolution Example | |
Dot Product Example | |
Frequency Bin Example | |
FIR Lowpass Filter Example | |
Graphic Audio Equalizer Example | |
Linear Interpolate Example | |
Matrix Example | |
Signal Convergence Example | |
SineCosine Example | |
SVM Example | |
Variance Example | |
+Content | |
ArcTan2 | |
Cosine | |
Fixed point division | |
Sine | |
Vector Exponential | |
Vector Log | |
Square Root | |
This set of functions provides a fast approximation to sine, cosine, and square root. As compared to most of the other functions in the CMSIS math library, the fast math functions operate on individual values and not arrays. There are separate functions for Q15, Q31, and floating-point data.
++Content | |
Bilinear Interpolation | |
Linear Interpolation | |
Cubic Spline Interpolation | |
These functions perform 1- and 2-dimensional interpolation of data. Linear interpolation is used for 1-dimensional data and bilinear interpolation is used for 2-dimensional data.
++Content | |
Vector Absolute Value | |
Vector Addition | |
Vector bitwise AND | |
Elementwise clipping | |
Vector Dot Product | |
Vector Multiplication | |
Vector Negate | |
Vector bitwise NOT | |
Vector Offset | |
Vector bitwise inclusive OR | |
Vector Scale | |
Vector Shift | |
Vector Subtraction | |
Vector bitwise exclusive OR | |
+Content | |
Householder transform of a vector | |
Matrix Addition | |
Cholesky and LDLT decompositions | |
Complex Matrix Multiplication | |
Complex Matrix Transpose | |
Matrix Initialization | |
Matrix Inverse | |
Matrix Multiplication | |
QR decomposition of a Matrix | |
Matrix Scale | |
Matrix Subtraction | |
Matrix Transpose | |
Matrix Vector Multiplication | |
This set of functions provides basic matrix math operations. The functions operate on matrix data structures. For example, the type definition for the floating-point matrix structure is shown below:
+ typedef struct + { + uint16_t numRows; // number of rows of the matrix. + uint16_t numCols; // number of columns of the matrix. + float32_t *pData; // points to the data of the matrix. + } arm_matrix_instance_f32; +
There are similar definitions for Q15 and Q31 data types.
+The structure specifies the size of the matrix and then points to an array of data. The array is of size numRows X numCols
and the values are arranged in row order. That is, the matrix element (i, j) is stored at:
+ pData[i*numCols + j] +
+wherearm_matrix_instance_f32 S = {nRows, nColumns, pData};
+arm_matrix_instance_q31 S = {nRows, nColumns, pData};
+arm_matrix_instance_q15 S = {nRows, nColumns, pData};
+
nRows
specifies the number of rows, nColumns
specifies the number of columns, and pData
points to the data array.+ ARM_MATH_SIZE_MISMATCH +Otherwise the functions return
+ ARM_MATH_SUCCESS +There is some overhead associated with this matrix size checking. The matrix size checking is enabled via the #define
+ ARM_MATH_MATRIX_CHECK +within the library project settings. By default this macro is defined and size checking is enabled. By changing the project settings and undefining this macro size checking is eliminated and the functions run a bit faster. With size checking disabled the functions always return
ARM_MATH_SUCCESS
. +Content | |
Quaternion conversions | |
Quaternion Conjugate | |
Quaternion Inverse | |
Quaternion Norm | |
Quaternion normalization | |
Quaternion Product | |
Functions to operates on quaternions and convert between a rotation and quaternion representation.
++Content | |
Linear SVM | |
Polynomial SVM | |
RBF SVM | |
Sigmoid SVM | |
This set of functions is implementing SVM classification on 2 classes. The training must be done from scikit-learn. The parameters can be easily generated from the scikit-learn object. Some examples are given in DSP/Testing/PatternGeneration/SVM.py
+If more than 2 classes are needed, the functions in this folder will have to be used, as building blocks, to do multi-class classification.
+No multi-class classification is provided in this SVM folder.
++Content | |
Absolute Maximum | |
Absolute Minimum | |
Accumulation functions | |
Entropy | |
Kullback-Leibler divergence | |
LogSumExp | |
Maximum | |
Mean | |
Minimum | |
Mean Square Error | |
Power | |
Root mean square (RMS) | |
Standard deviation | |
Variance | |
+Content | |
Typecasting | |
Barycenter | |
Vector sorting algorithms | |
Vector Copy | |
Convert 16-bit floating point value | |
Convert 64-bit floating point value | |
Vector Fill | |
Convert 32-bit floating point value | |
Convert 16-bit fixed point value | |
Convert 32-bit fixed point value | |
Convert 8-bit fixed point value | |
Weighted Average | |
+Content | |
Complex FFT Functions | |
DCT Type IV Functions | |
MFCC | |
Real FFT Functions | |
+Functions | |
void | arm_inv_clarke_f32 (float32_t Ialpha, float32_t Ibeta, float32_t *pIa, float32_t *pIb) |
Floating-point Inverse Clarke transform. | |
void | arm_inv_clarke_q31 (q31_t Ialpha, q31_t Ibeta, q31_t *pIa, q31_t *pIb) |
Inverse Clarke transform for Q31 version. | |
Inverse Clarke transform converts the two-coordinate time invariant vector into instantaneous stator phases.
+The function operates on a single sample of data and each call to the function returns the processed output. The library provides separate functions for Q31 and floating-point data types.
pIa
and pIb
are the instantaneous stator phases and Ialpha
and Ibeta
are the two coordinates of time invariant vector. void arm_inv_clarke_f32 | +( | +float32_t | +Ialpha, | +
+ | + | float32_t | +Ibeta, | +
+ | + | float32_t * | +pIa, | +
+ | + | float32_t * | +pIb | +
+ | ) | ++ |
Floating-point Inverse Clarke transform.
+[in] | Ialpha | input two-phase orthogonal vector axis alpha |
[in] | Ibeta | input two-phase orthogonal vector axis beta |
[out] | pIa | points to output three-phase coordinate a |
[out] | pIb | points to output three-phase coordinate b |
void arm_inv_clarke_q31 | +( | +q31_t | +Ialpha, | +
+ | + | q31_t | +Ibeta, | +
+ | + | q31_t * | +pIa, | +
+ | + | q31_t * | +pIb | +
+ | ) | ++ |
Inverse Clarke transform for Q31 version.
+[in] | Ialpha | input two-phase orthogonal vector axis alpha |
[in] | Ibeta | input two-phase orthogonal vector axis beta |
[out] | pIa | points to output three-phase coordinate a |
[out] | pIb | points to output three-phase coordinate b |
+Functions | |
void | arm_inv_park_f32 (float32_t Id, float32_t Iq, float32_t *pIalpha, float32_t *pIbeta, float32_t sinVal, float32_t cosVal) |
Floating-point Inverse Park transform. | |
void | arm_inv_park_q31 (q31_t Id, q31_t Iq, q31_t *pIalpha, q31_t *pIbeta, q31_t sinVal, q31_t cosVal) |
Inverse Park transform for Q31 version. | |
Inverse Park transform converts the input flux and torque components to two-coordinate vector.
+The function operates on a single sample of data and each call to the function returns the processed output. The library provides separate functions for Q31 and floating-point data types.
pIalpha
and pIbeta
are the stator vector components, Id
and Iq
are rotor vector components and cosVal
and sinVal
are the cosine and sine values of theta (rotor flux position). void arm_inv_park_f32 | +( | +float32_t | +Id, | +
+ | + | float32_t | +Iq, | +
+ | + | float32_t * | +pIalpha, | +
+ | + | float32_t * | +pIbeta, | +
+ | + | float32_t | +sinVal, | +
+ | + | float32_t | +cosVal | +
+ | ) | ++ |
Floating-point Inverse Park transform.
+[in] | Id | input coordinate of rotor reference frame d |
[in] | Iq | input coordinate of rotor reference frame q |
[out] | pIalpha | points to output two-phase orthogonal vector axis alpha |
[out] | pIbeta | points to output two-phase orthogonal vector axis beta |
[in] | sinVal | sine value of rotation angle theta |
[in] | cosVal | cosine value of rotation angle theta |
void arm_inv_park_q31 | +( | +q31_t | +Id, | +
+ | + | q31_t | +Iq, | +
+ | + | q31_t * | +pIalpha, | +
+ | + | q31_t * | +pIbeta, | +
+ | + | q31_t | +sinVal, | +
+ | + | q31_t | +cosVal | +
+ | ) | ++ |
Inverse Park transform for Q31 version.
+[in] | Id | input coordinate of rotor reference frame d |
[in] | Iq | input coordinate of rotor reference frame q |
[out] | pIalpha | points to output two-phase orthogonal vector axis alpha |
[out] | pIbeta | points to output two-phase orthogonal vector axis beta |
[in] | sinVal | sine value of rotation angle theta |
[in] | cosVal | cosine value of rotation angle theta |
+Functions | |
void | arm_svm_linear_init_f16 (arm_svm_linear_instance_f16 *S, uint32_t nbOfSupportVectors, uint32_t vectorDimension, float16_t intercept, const float16_t *dualCoefficients, const float16_t *supportVectors, const int32_t *classes) |
SVM linear instance init function. | |
void | arm_svm_linear_init_f32 (arm_svm_linear_instance_f32 *S, uint32_t nbOfSupportVectors, uint32_t vectorDimension, float32_t intercept, const float32_t *dualCoefficients, const float32_t *supportVectors, const int32_t *classes) |
SVM linear instance init function. | |
void | arm_svm_linear_predict_f16 (const arm_svm_linear_instance_f16 *S, const float16_t *in, int32_t *pResult) |
SVM linear prediction. | |
void | arm_svm_linear_predict_f32 (const arm_svm_linear_instance_f32 *S, const float32_t *in, int32_t *pResult) |
SVM linear prediction. | |
Linear SVM classifier
+void arm_svm_linear_init_f16 | +( | +arm_svm_linear_instance_f16 * | +S, | +
+ | + | uint32_t | +nbOfSupportVectors, | +
+ | + | uint32_t | +vectorDimension, | +
+ | + | float16_t | +intercept, | +
+ | + | const float16_t * | +dualCoefficients, | +
+ | + | const float16_t * | +supportVectors, | +
+ | + | const int32_t * | +classes | +
+ | ) | ++ |
SVM linear instance init function.
+Classes are integer used as output of the function (instead of having -1,1 as class values).
+[in] | S | Parameters for the SVM function |
[in] | nbOfSupportVectors | Number of support vectors |
[in] | vectorDimension | Dimension of vector space |
[in] | intercept | Intercept |
[in] | dualCoefficients | Array of dual coefficients |
[in] | supportVectors | Array of support vectors |
[in] | classes | Array of 2 classes ID |
void arm_svm_linear_init_f32 | +( | +arm_svm_linear_instance_f32 * | +S, | +
+ | + | uint32_t | +nbOfSupportVectors, | +
+ | + | uint32_t | +vectorDimension, | +
+ | + | float32_t | +intercept, | +
+ | + | const float32_t * | +dualCoefficients, | +
+ | + | const float32_t * | +supportVectors, | +
+ | + | const int32_t * | +classes | +
+ | ) | ++ |
SVM linear instance init function.
+Classes are integer used as output of the function (instead of having -1,1 as class values).
+[in] | S | Parameters for the SVM function |
[in] | nbOfSupportVectors | Number of support vectors |
[in] | vectorDimension | Dimension of vector space |
[in] | intercept | Intercept |
[in] | dualCoefficients | Array of dual coefficients |
[in] | supportVectors | Array of support vectors |
[in] | classes | Array of 2 classes ID |
void arm_svm_linear_predict_f16 | +( | +const arm_svm_linear_instance_f16 * | +S, | +
+ | + | const float16_t * | +in, | +
+ | + | int32_t * | +pResult | +
+ | ) | ++ |
SVM linear prediction.
+[in] | S | Pointer to an instance of the linear SVM structure. |
[in] | in | Pointer to input vector |
[out] | pResult | Decision value |
void arm_svm_linear_predict_f32 | +( | +const arm_svm_linear_instance_f32 * | +S, | +
+ | + | const float32_t * | +in, | +
+ | + | int32_t * | +pResult | +
+ | ) | ++ |
SVM linear prediction.
+[in] | S | Pointer to an instance of the linear SVM structure. |
[in] | in | Pointer to input vector |
[out] | pResult | Decision value |
+Functions | |
void | arm_mean_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Mean value of a floating-point vector. | |
void | arm_mean_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Mean value of a floating-point vector. | |
void | arm_mean_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult) |
Mean value of a floating-point vector. | |
void | arm_mean_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult) |
Mean value of a Q15 vector. | |
void | arm_mean_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Mean value of a Q31 vector. | |
void | arm_mean_q7 (const q7_t *pSrc, uint32_t blockSize, q7_t *pResult) |
Mean value of a Q7 vector. | |
Calculates the mean of the input vector. Mean is defined as the average of the elements in the vector. The underlying algorithm is used:
++ Result = (pSrc[0] + pSrc[1] + pSrc[2] + ... + pSrc[blockSize-1]) / blockSize; +
There are separate functions for floating-point, Q31, Q15, and Q7 data types.
+void arm_mean_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
Mean value of a floating-point vector.
+[in] | pSrc | points to the input vector. |
[in] | blockSize | number of samples in input vector. |
[out] | pResult | mean value returned here. |
void arm_mean_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Mean value of a floating-point vector.
+[in] | pSrc | points to the input vector. |
[in] | blockSize | number of samples in input vector. |
[out] | pResult | mean value returned here. |
void arm_mean_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Mean value of a floating-point vector.
+[in] | pSrc | points to the input vector. |
[in] | blockSize | number of samples in input vector. |
[out] | pResult | mean value returned here. |
void arm_mean_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult | +
+ | ) | ++ |
Mean value of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | mean value returned here |
void arm_mean_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Mean value of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | mean value returned here |
void arm_mean_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q7_t * | +pResult | +
+ | ) | ++ |
Mean value of a Q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | mean value returned here |
+Functions | |
void | arm_park_f32 (float32_t Ialpha, float32_t Ibeta, float32_t *pId, float32_t *pIq, float32_t sinVal, float32_t cosVal) |
Floating-point Park transform. | |
void | arm_park_q31 (q31_t Ialpha, q31_t Ibeta, q31_t *pId, q31_t *pIq, q31_t sinVal, q31_t cosVal) |
Park transform for Q31 version. | |
Forward Park transform converts the input two-coordinate vector to flux and torque components. The Park transform can be used to realize the transformation of the Ialpha
and the Ibeta
currents from the stationary to the moving reference frame and control the spatial relationship between the stator vector current and rotor flux vector. If we consider the d axis aligned with the rotor flux, the diagram below shows the current vector and the relationship from the two reference frames:
The function operates on a single sample of data and each call to the function returns the processed output. The library provides separate functions for Q31 and floating-point data types.
Ialpha
and Ibeta
are the stator vector components, pId
and pIq
are rotor vector components and cosVal
and sinVal
are the cosine and sine values of theta (rotor flux position). void arm_park_f32 | +( | +float32_t | +Ialpha, | +
+ | + | float32_t | +Ibeta, | +
+ | + | float32_t * | +pId, | +
+ | + | float32_t * | +pIq, | +
+ | + | float32_t | +sinVal, | +
+ | + | float32_t | +cosVal | +
+ | ) | ++ |
Floating-point Park transform.
+[in] | Ialpha | input two-phase vector coordinate alpha |
[in] | Ibeta | input two-phase vector coordinate beta |
[out] | pId | points to output rotor reference frame d |
[out] | pIq | points to output rotor reference frame q |
[in] | sinVal | sine value of rotation angle theta |
[in] | cosVal | cosine value of rotation angle theta |
The function implements the forward Park transform.
+ +void arm_park_q31 | +( | +q31_t | +Ialpha, | +
+ | + | q31_t | +Ibeta, | +
+ | + | q31_t * | +pId, | +
+ | + | q31_t * | +pIq, | +
+ | + | q31_t | +sinVal, | +
+ | + | q31_t | +cosVal | +
+ | ) | ++ |
Park transform for Q31 version.
+[in] | Ialpha | input two-phase vector coordinate alpha |
[in] | Ibeta | input two-phase vector coordinate beta |
[out] | pId | points to output rotor reference frame d |
[out] | pIq | points to output rotor reference frame q |
[in] | sinVal | sine value of rotation angle theta |
[in] | cosVal | cosine value of rotation angle theta |
+Functions | |
void | arm_svm_polynomial_init_f16 (arm_svm_polynomial_instance_f16 *S, uint32_t nbOfSupportVectors, uint32_t vectorDimension, float16_t intercept, const float16_t *dualCoefficients, const float16_t *supportVectors, const int32_t *classes, int32_t degree, float16_t coef0, float16_t gamma) |
SVM polynomial instance init function. | |
void | arm_svm_polynomial_init_f32 (arm_svm_polynomial_instance_f32 *S, uint32_t nbOfSupportVectors, uint32_t vectorDimension, float32_t intercept, const float32_t *dualCoefficients, const float32_t *supportVectors, const int32_t *classes, int32_t degree, float32_t coef0, float32_t gamma) |
SVM polynomial instance init function. | |
void | arm_svm_polynomial_predict_f16 (const arm_svm_polynomial_instance_f16 *S, const float16_t *in, int32_t *pResult) |
SVM polynomial prediction. | |
void | arm_svm_polynomial_predict_f32 (const arm_svm_polynomial_instance_f32 *S, const float32_t *in, int32_t *pResult) |
SVM polynomial prediction. | |
Polynomial SVM classifier
+void arm_svm_polynomial_init_f16 | +( | +arm_svm_polynomial_instance_f16 * | +S, | +
+ | + | uint32_t | +nbOfSupportVectors, | +
+ | + | uint32_t | +vectorDimension, | +
+ | + | float16_t | +intercept, | +
+ | + | const float16_t * | +dualCoefficients, | +
+ | + | const float16_t * | +supportVectors, | +
+ | + | const int32_t * | +classes, | +
+ | + | int32_t | +degree, | +
+ | + | float16_t | +coef0, | +
+ | + | float16_t | +gamma | +
+ | ) | ++ |
SVM polynomial instance init function.
+Classes are integer used as output of the function (instead of having -1,1 as class values).
+[in] | S | points to an instance of the polynomial SVM structure. |
[in] | nbOfSupportVectors | Number of support vectors |
[in] | vectorDimension | Dimension of vector space |
[in] | intercept | Intercept |
[in] | dualCoefficients | Array of dual coefficients |
[in] | supportVectors | Array of support vectors |
[in] | classes | Array of 2 classes ID |
[in] | degree | Polynomial degree |
[in] | coef0 | coeff0 (scikit-learn terminology) |
[in] | gamma | gamma (scikit-learn terminology) |
void arm_svm_polynomial_init_f32 | +( | +arm_svm_polynomial_instance_f32 * | +S, | +
+ | + | uint32_t | +nbOfSupportVectors, | +
+ | + | uint32_t | +vectorDimension, | +
+ | + | float32_t | +intercept, | +
+ | + | const float32_t * | +dualCoefficients, | +
+ | + | const float32_t * | +supportVectors, | +
+ | + | const int32_t * | +classes, | +
+ | + | int32_t | +degree, | +
+ | + | float32_t | +coef0, | +
+ | + | float32_t | +gamma | +
+ | ) | ++ |
SVM polynomial instance init function.
+Classes are integer used as output of the function (instead of having -1,1 as class values).
+[in] | S | points to an instance of the polynomial SVM structure. |
[in] | nbOfSupportVectors | Number of support vectors |
[in] | vectorDimension | Dimension of vector space |
[in] | intercept | Intercept |
[in] | dualCoefficients | Array of dual coefficients |
[in] | supportVectors | Array of support vectors |
[in] | classes | Array of 2 classes ID |
[in] | degree | Polynomial degree |
[in] | coef0 | coeff0 (scikit-learn terminology) |
[in] | gamma | gamma (scikit-learn terminology) |
void arm_svm_polynomial_predict_f16 | +( | +const arm_svm_polynomial_instance_f16 * | +S, | +
+ | + | const float16_t * | +in, | +
+ | + | int32_t * | +pResult | +
+ | ) | ++ |
SVM polynomial prediction.
+[in] | S | Pointer to an instance of the polynomial SVM structure. |
[in] | in | Pointer to input vector |
[out] | pResult | Decision value |
void arm_svm_polynomial_predict_f32 | +( | +const arm_svm_polynomial_instance_f32 * | +S, | +
+ | + | const float32_t * | +in, | +
+ | + | int32_t * | +pResult | +
+ | ) | ++ |
SVM polynomial prediction.
+[in] | S | Pointer to an instance of the polynomial SVM structure. |
[in] | in | Pointer to input vector |
[out] | pResult | Decision value |
+Functions | |
void | arm_power_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Sum of the squares of the elements of a floating-point vector. | |
void | arm_power_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Sum of the squares of the elements of a floating-point vector. | |
void | arm_power_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult) |
Sum of the squares of the elements of a floating-point vector. | |
void | arm_power_q15 (const q15_t *pSrc, uint32_t blockSize, q63_t *pResult) |
Sum of the squares of the elements of a Q15 vector. | |
void | arm_power_q31 (const q31_t *pSrc, uint32_t blockSize, q63_t *pResult) |
Sum of the squares of the elements of a Q31 vector. | |
void | arm_power_q7 (const q7_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Sum of the squares of the elements of a Q7 vector. | |
Calculates the sum of the squares of the elements in the input vector. The underlying algorithm is used:
++ Result = pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + pSrc[2] * pSrc[2] + ... + pSrc[blockSize-1] * pSrc[blockSize-1]; +
There are separate functions for floating point, Q31, Q15, and Q7 data types.
+Since the result is not divided by the length, those functions are in fact computing something which is more an energy than a power.
+void arm_power_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
Sum of the squares of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | sum of the squares value returned here |
void arm_power_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Sum of the squares of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | sum of the squares value returned here |
void arm_power_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Sum of the squares of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | sum of the squares value returned here |
void arm_power_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q63_t * | +pResult | +
+ | ) | ++ |
Sum of the squares of the elements of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | sum of the squares value returned here |
void arm_power_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q63_t * | +pResult | +
+ | ) | ++ |
Sum of the squares of the elements of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | sum of the squares value returned here |
void arm_power_q7 | +( | +const q7_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Sum of the squares of the elements of a Q7 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | sum of the squares value returned here |
+Functions | |
void | arm_q15_to_f16 (const q15_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Converts the elements of the Q15 vector to f16 vector. | |
void | arm_q15_to_f64 (const q15_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Converts the elements of the Q15 vector to 64 bit floating-point vector. | |
void | arm_q15_to_float (const q15_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Converts the elements of the Q15 vector to floating-point vector. | |
void | arm_q15_to_q31 (const q15_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Converts the elements of the Q15 vector to Q31 vector. | |
void | arm_q15_to_q7 (const q15_t *pSrc, q7_t *pDst, uint32_t blockSize) |
Converts the elements of the Q15 vector to Q7 vector. | |
void arm_q15_to_f16 | +( | +const q15_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q15 vector to f16 vector.
+Converts the elements of the floating-point vector to Q31 vector.
+[in] | pSrc | points to the Q15 input vector |
[out] | pDst | points to the f16 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (float16_t) pSrc[n] / 32768; 0 <= n < blockSize. +
void arm_q15_to_f64 | +( | +const q15_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q15 vector to 64 bit floating-point vector.
+[in] | pSrc | points to the Q15 input vector |
[out] | pDst | points to the 64 bit floating-point output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (float64_t) pSrc[n] / 32768; 0 <= n < blockSize. +
void arm_q15_to_float | +( | +const q15_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q15 vector to floating-point vector.
+[in] | pSrc | points to the Q15 input vector |
[out] | pDst | points to the floating-point output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (float32_t) pSrc[n] / 32768; 0 <= n < blockSize. +
void arm_q15_to_q31 | +( | +const q15_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q15 vector to Q31 vector.
+[in] | pSrc | points to the Q15 input vector |
[out] | pDst | points to the Q31 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q31_t) pSrc[n] << 16; 0 <= n < blockSize. +
void arm_q15_to_q7 | +( | +const q15_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q15 vector to Q7 vector.
+[in] | pSrc | points to the Q15 input vector |
[out] | pDst | points to the Q7 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q7_t) pSrc[n] >> 8; 0 <= n < blockSize. +
+Functions | |
void | arm_q31_to_f64 (const q31_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Converts the elements of the Q31 vector to 64 bit floating-point vector. | |
void | arm_q31_to_float (const q31_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Converts the elements of the Q31 vector to floating-point vector. | |
void | arm_q31_to_q15 (const q31_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Converts the elements of the Q31 vector to Q15 vector. | |
void | arm_q31_to_q7 (const q31_t *pSrc, q7_t *pDst, uint32_t blockSize) |
Converts the elements of the Q31 vector to Q7 vector. | |
void arm_q31_to_f64 | +( | +const q31_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q31 vector to 64 bit floating-point vector.
+[in] | pSrc | points to the Q31 input vector |
[out] | pDst | points to the 64 bit floating-point output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (float64_t) pSrc[n] / 2147483648; 0 <= n < blockSize. +
void arm_q31_to_float | +( | +const q31_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q31 vector to floating-point vector.
+[in] | pSrc | points to the Q31 input vector |
[out] | pDst | points to the floating-point output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (float32_t) pSrc[n] / 2147483648; 0 <= n < blockSize. +
void arm_q31_to_q15 | +( | +const q31_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q31 vector to Q15 vector.
+[in] | pSrc | points to the Q31 input vector |
[out] | pDst | points to the Q15 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q15_t) pSrc[n] >> 16; 0 <= n < blockSize. +
void arm_q31_to_q7 | +( | +const q31_t * | +pSrc, | +
+ | + | q7_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q31 vector to Q7 vector.
+[in] | pSrc | points to the Q31 input vector |
[out] | pDst | points to the Q7 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q7_t) pSrc[n] >> 24; 0 <= n < blockSize. +
+Functions | |
void | arm_q7_to_f64 (const q7_t *pSrc, float64_t *pDst, uint32_t blockSize) |
Converts the elements of the Q7 vector to 64 bit floating-point vector. | |
void | arm_q7_to_float (const q7_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Converts the elements of the Q7 vector to floating-point vector. | |
void | arm_q7_to_q15 (const q7_t *pSrc, q15_t *pDst, uint32_t blockSize) |
Converts the elements of the Q7 vector to Q15 vector. | |
void | arm_q7_to_q31 (const q7_t *pSrc, q31_t *pDst, uint32_t blockSize) |
Converts the elements of the Q7 vector to Q31 vector. | |
void arm_q7_to_f64 | +( | +const q7_t * | +pSrc, | +
+ | + | float64_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q7 vector to 64 bit floating-point vector.
+[in] | pSrc | points to the Q7 input vector |
[out] | pDst | points to the 64 bit floating-point output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (float64_t) pSrc[n] / 128; 0 <= n < blockSize. +
void arm_q7_to_float | +( | +const q7_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q7 vector to floating-point vector.
+[in] | pSrc | points to the Q7 input vector |
[out] | pDst | points to the floating-point output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (float32_t) pSrc[n] / 128; 0 <= n < blockSize. +
void arm_q7_to_q15 | +( | +const q7_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q7 vector to Q15 vector.
+[in] | pSrc | points to the Q7 input vector |
[out] | pDst | points to the Q15 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q15_t) pSrc[n] << 8; 0 <= n < blockSize. +
void arm_q7_to_q31 | +( | +const q7_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Converts the elements of the Q7 vector to Q31 vector.
+[in] | pSrc | points to the Q7 input vector |
[out] | pDst | points to the Q31 output vector |
[in] | blockSize | number of samples in each vector |
+ pDst[n] = (q31_t) pSrc[n] << 24; 0 <= n < blockSize. +
+Functions | |
void | arm_svm_rbf_init_f16 (arm_svm_rbf_instance_f16 *S, uint32_t nbOfSupportVectors, uint32_t vectorDimension, float16_t intercept, const float16_t *dualCoefficients, const float16_t *supportVectors, const int32_t *classes, float16_t gamma) |
SVM radial basis function instance init function. | |
void | arm_svm_rbf_init_f32 (arm_svm_rbf_instance_f32 *S, uint32_t nbOfSupportVectors, uint32_t vectorDimension, float32_t intercept, const float32_t *dualCoefficients, const float32_t *supportVectors, const int32_t *classes, float32_t gamma) |
SVM radial basis function instance init function. | |
void | arm_svm_rbf_predict_f16 (const arm_svm_rbf_instance_f16 *S, const float16_t *in, int32_t *pResult) |
SVM rbf prediction. | |
void | arm_svm_rbf_predict_f32 (const arm_svm_rbf_instance_f32 *S, const float32_t *in, int32_t *pResult) |
SVM rbf prediction. | |
RBF SVM classifier
+void arm_svm_rbf_init_f16 | +( | +arm_svm_rbf_instance_f16 * | +S, | +
+ | + | uint32_t | +nbOfSupportVectors, | +
+ | + | uint32_t | +vectorDimension, | +
+ | + | float16_t | +intercept, | +
+ | + | const float16_t * | +dualCoefficients, | +
+ | + | const float16_t * | +supportVectors, | +
+ | + | const int32_t * | +classes, | +
+ | + | float16_t | +gamma | +
+ | ) | ++ |
SVM radial basis function instance init function.
+Classes are integer used as output of the function (instead of having -1,1 as class values).
+[in] | S | points to an instance of the polynomial SVM structure. |
[in] | nbOfSupportVectors | Number of support vectors |
[in] | vectorDimension | Dimension of vector space |
[in] | intercept | Intercept |
[in] | dualCoefficients | Array of dual coefficients |
[in] | supportVectors | Array of support vectors |
[in] | classes | Array of 2 classes ID |
[in] | gamma | gamma (scikit-learn terminology) |
void arm_svm_rbf_init_f32 | +( | +arm_svm_rbf_instance_f32 * | +S, | +
+ | + | uint32_t | +nbOfSupportVectors, | +
+ | + | uint32_t | +vectorDimension, | +
+ | + | float32_t | +intercept, | +
+ | + | const float32_t * | +dualCoefficients, | +
+ | + | const float32_t * | +supportVectors, | +
+ | + | const int32_t * | +classes, | +
+ | + | float32_t | +gamma | +
+ | ) | ++ |
SVM radial basis function instance init function.
+Classes are integer used as output of the function (instead of having -1,1 as class values).
+[in] | S | points to an instance of the polynomial SVM structure. |
[in] | nbOfSupportVectors | Number of support vectors |
[in] | vectorDimension | Dimension of vector space |
[in] | intercept | Intercept |
[in] | dualCoefficients | Array of dual coefficients |
[in] | supportVectors | Array of support vectors |
[in] | classes | Array of 2 classes ID |
[in] | gamma | gamma (scikit-learn terminology) |
void arm_svm_rbf_predict_f16 | +( | +const arm_svm_rbf_instance_f16 * | +S, | +
+ | + | const float16_t * | +in, | +
+ | + | int32_t * | +pResult | +
+ | ) | ++ |
SVM rbf prediction.
+[in] | S | Pointer to an instance of the rbf SVM structure. |
[in] | in | Pointer to input vector |
[out] | pResult | decision value |
void arm_svm_rbf_predict_f32 | +( | +const arm_svm_rbf_instance_f32 * | +S, | +
+ | + | const float32_t * | +in, | +
+ | + | int32_t * | +pResult | +
+ | ) | ++ |
SVM rbf prediction.
+[in] | S | Pointer to an instance of the rbf SVM structure. |
[in] | in | Pointer to input vector |
[out] | pResult | decision value |
+Functions | |
void | arm_svm_sigmoid_init_f16 (arm_svm_sigmoid_instance_f16 *S, uint32_t nbOfSupportVectors, uint32_t vectorDimension, float16_t intercept, const float16_t *dualCoefficients, const float16_t *supportVectors, const int32_t *classes, float16_t coef0, float16_t gamma) |
SVM sigmoid instance init function. | |
void | arm_svm_sigmoid_init_f32 (arm_svm_sigmoid_instance_f32 *S, uint32_t nbOfSupportVectors, uint32_t vectorDimension, float32_t intercept, const float32_t *dualCoefficients, const float32_t *supportVectors, const int32_t *classes, float32_t coef0, float32_t gamma) |
SVM sigmoid instance init function. | |
void | arm_svm_sigmoid_predict_f16 (const arm_svm_sigmoid_instance_f16 *S, const float16_t *in, int32_t *pResult) |
SVM sigmoid prediction. | |
void | arm_svm_sigmoid_predict_f32 (const arm_svm_sigmoid_instance_f32 *S, const float32_t *in, int32_t *pResult) |
SVM sigmoid prediction. | |
Sigmoid SVM classifier
+void arm_svm_sigmoid_init_f16 | +( | +arm_svm_sigmoid_instance_f16 * | +S, | +
+ | + | uint32_t | +nbOfSupportVectors, | +
+ | + | uint32_t | +vectorDimension, | +
+ | + | float16_t | +intercept, | +
+ | + | const float16_t * | +dualCoefficients, | +
+ | + | const float16_t * | +supportVectors, | +
+ | + | const int32_t * | +classes, | +
+ | + | float16_t | +coef0, | +
+ | + | float16_t | +gamma | +
+ | ) | ++ |
SVM sigmoid instance init function.
+Classes are integer used as output of the function (instead of having -1,1 as class values).
+[in] | S | points to an instance of the rbf SVM structure. |
[in] | nbOfSupportVectors | Number of support vectors |
[in] | vectorDimension | Dimension of vector space |
[in] | intercept | Intercept |
[in] | dualCoefficients | Array of dual coefficients |
[in] | supportVectors | Array of support vectors |
[in] | classes | Array of 2 classes ID |
[in] | coef0 | coeff0 (scikit-learn terminology) |
[in] | gamma | gamma (scikit-learn terminology) |
void arm_svm_sigmoid_init_f32 | +( | +arm_svm_sigmoid_instance_f32 * | +S, | +
+ | + | uint32_t | +nbOfSupportVectors, | +
+ | + | uint32_t | +vectorDimension, | +
+ | + | float32_t | +intercept, | +
+ | + | const float32_t * | +dualCoefficients, | +
+ | + | const float32_t * | +supportVectors, | +
+ | + | const int32_t * | +classes, | +
+ | + | float32_t | +coef0, | +
+ | + | float32_t | +gamma | +
+ | ) | ++ |
SVM sigmoid instance init function.
+Classes are integer used as output of the function (instead of having -1,1 as class values).
+[in] | S | points to an instance of the rbf SVM structure. |
[in] | nbOfSupportVectors | Number of support vectors |
[in] | vectorDimension | Dimension of vector space |
[in] | intercept | Intercept |
[in] | dualCoefficients | Array of dual coefficients |
[in] | supportVectors | Array of support vectors |
[in] | classes | Array of 2 classes ID |
[in] | coef0 | coeff0 (scikit-learn terminology) |
[in] | gamma | gamma (scikit-learn terminology) |
void arm_svm_sigmoid_predict_f16 | +( | +const arm_svm_sigmoid_instance_f16 * | +S, | +
+ | + | const float16_t * | +in, | +
+ | + | int32_t * | +pResult | +
+ | ) | ++ |
SVM sigmoid prediction.
+[in] | S | Pointer to an instance of the rbf SVM structure. |
[in] | in | Pointer to input vector |
[out] | pResult | Decision value |
void arm_svm_sigmoid_predict_f32 | +( | +const arm_svm_sigmoid_instance_f32 * | +S, | +
+ | + | const float32_t * | +in, | +
+ | + | int32_t * | +pResult | +
+ | ) | ++ |
SVM sigmoid prediction.
+[in] | S | Pointer to an instance of the rbf SVM structure. |
[in] | in | Pointer to input vector |
[out] | pResult | Decision value |
+Functions | |
float32_t | arm_sin_f32 (float32_t x) |
Fast approximation to the trigonometric sine function for floating-point data. | |
q15_t | arm_sin_q15 (q15_t x) |
Fast approximation to the trigonometric sine function for Q15 data. | |
q31_t | arm_sin_q31 (q31_t x) |
Fast approximation to the trigonometric sine function for Q31 data. | |
Computes the trigonometric sine function using a combination of table lookup and linear interpolation. There are separate functions for Q15, Q31, and floating-point data types. The input to the floating-point version is in radians while the fixed-point Q15 and Q31 have a scaled input with the range [0 +0.9999] mapping to [0 2*pi). The fixed-point range is chosen so that a value of 2*pi wraps around to 0.
+The implementation is based on table lookup using 512 values together with linear interpolation. The steps used are:
(1.0f-fract)*a + fract*b;
where
+ b = Table[index]; + c = Table[index+1]; +
Fast approximation to the trigonometric sine function for floating-point data.
+[in] | x | input value in radians. |
Fast approximation to the trigonometric sine function for Q15 data.
+[in] | x | Scaled input value in radians |
The Q15 input value is in the range [0 +0.9999] and is mapped to a radian value in the range [0 2*PI).
+ +Fast approximation to the trigonometric sine function for Q31 data.
+[in] | x | Scaled input value in radians |
The Q31 input value is in the range [0 +0.9999] and is mapped to a radian value in the range [0 2*PI).
+ ++Functions | |
__STATIC_INLINE int16_t | arm_typecast_s16_f16 (float16_t x) |
Interpret a f16 as an s16 value. | |
__STATIC_INLINE float16_t | arm_typecast_f16_s16 (int16_t x) |
Interpret an s16 as an f16 value. | |
__STATIC_INLINE float16_t arm_typecast_f16_s16 | +( | +int16_t | +x | ) | ++ |
Interpret an s16 as an f16 value.
+[in] | x | input value. |
__STATIC_INLINE int16_t arm_typecast_s16_f16 | +( | +float16_t | +x | ) | ++ |
Interpret a f16 as an s16 value.
+[in] | x | input value. |
+Functions | |
void | arm_var_f16 (const float16_t *pSrc, uint32_t blockSize, float16_t *pResult) |
Variance of the elements of a floating-point vector. | |
void | arm_var_f32 (const float32_t *pSrc, uint32_t blockSize, float32_t *pResult) |
Variance of the elements of a floating-point vector. | |
void | arm_var_f64 (const float64_t *pSrc, uint32_t blockSize, float64_t *pResult) |
Variance of the elements of a floating-point vector. | |
void | arm_var_q15 (const q15_t *pSrc, uint32_t blockSize, q15_t *pResult) |
Variance of the elements of a Q15 vector. | |
void | arm_var_q31 (const q31_t *pSrc, uint32_t blockSize, q31_t *pResult) |
Variance of the elements of a Q31 vector. | |
Calculates the variance of the elements in the input vector. The underlying algorithm used is the direct method sometimes referred to as the two-pass method:
++ Result = sum(element - meanOfElements)^2) / numElement - 1 + + meanOfElements = ( pSrc[0] * pSrc[0] + pSrc[1] * pSrc[1] + ... + pSrc[blockSize-1] ) / blockSize +
There are separate functions for floating point, Q31, and Q15 data types.
+void arm_var_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float16_t * | +pResult | +
+ | ) | ++ |
Variance of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | variance value returned here |
void arm_var_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float32_t * | +pResult | +
+ | ) | ++ |
Variance of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | variance value returned here |
void arm_var_f64 | +( | +const float64_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | float64_t * | +pResult | +
+ | ) | ++ |
Variance of the elements of a floating-point vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | variance value returned here |
void arm_var_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q15_t * | +pResult | +
+ | ) | ++ |
Variance of the elements of a Q15 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | variance value returned here |
void arm_var_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | uint32_t | +blockSize, | +
+ | + | q31_t * | +pResult | +
+ | ) | ++ |
Variance of the elements of a Q31 vector.
+[in] | pSrc | points to the input vector |
[in] | blockSize | number of samples in input vector |
[out] | pResult | variance value returned here |
+Functions | |
void | arm_vexp_f16 (const float16_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Floating-point vector of exp values. | |
void | arm_vexp_f32 (const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Floating-point vector of exp values. | |
Compute the exp values of a vector of samples.
+void arm_vexp_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector of exp values.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_vexp_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector of exp values.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
+Functions | |
void | arm_vlog_f16 (const float16_t *pSrc, float16_t *pDst, uint32_t blockSize) |
Floating-point vector of log values. | |
void | arm_vlog_f32 (const float32_t *pSrc, float32_t *pDst, uint32_t blockSize) |
Floating-point vector of log values. | |
void | arm_vlog_q15 (const q15_t *pSrc, q15_t *pDst, uint32_t blockSize) |
q15 vector of log values. | |
void | arm_vlog_q31 (const q31_t *pSrc, q31_t *pDst, uint32_t blockSize) |
q31 vector of log values. | |
Compute the log values of a vector of samples.
+void arm_vlog_f16 | +( | +const float16_t * | +pSrc, | +
+ | + | float16_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector of log values.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_vlog_f32 | +( | +const float32_t * | +pSrc, | +
+ | + | float32_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Floating-point vector of log values.
+[in] | pSrc | points to the input vector |
[out] | pDst | points to the output vector |
[in] | blockSize | number of samples in each vector |
void arm_vlog_q15 | +( | +const q15_t * | +pSrc, | +
+ | + | q15_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
q15 vector of log values.
+[in] | pSrc | points to the input vector in q15 |
[out] | pDst | points to the output vector in q4.11 |
[in] | blockSize | number of samples in each vector |
void arm_vlog_q31 | +( | +const q31_t * | +pSrc, | +
+ | + | q31_t * | +pDst, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
q31 vector of log values.
+[in] | pSrc | points to the input vector in q31 |
[out] | pDst | points to the output vector q5.26 |
[in] | blockSize | number of samples in each vector |
+Functions | |
float16_t | arm_weighted_average_f16 (const float16_t *in, const float16_t *weigths, uint32_t blockSize) |
Weighted average. | |
float32_t | arm_weighted_average_f32 (const float32_t *in, const float32_t *weigths, uint32_t blockSize) |
Weighted average. | |
Weighted average of values
+float16_t arm_weighted_average_f16 | +( | +const float16_t * | +in, | +
+ | + | const float16_t * | +weigths, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Weighted average.
+[in] | *in | Array of input values. |
[in] | *weigths | Weights |
[in] | blockSize | Number of samples in the input array. |
float32_t arm_weighted_average_f32 | +( | +const float32_t * | +in, | +
+ | + | const float32_t * | +weigths, | +
+ | + | uint32_t | +blockSize | +
+ | ) | ++ |
Weighted average.
+[in] | *in | Array of input values. |
[in] | *weigths | Weights |
[in] | blockSize | Number of samples in the input array. |
C_BinaryOperator< Scalar, Derived > | Unary operator |
►C_BinaryOperator< Scalar, _AddOp< Scalar > > | |
►C_BinaryOperator< Scalar, _MulOp< Scalar > > | |
►C_BinaryOperator< Scalar, _SubOp< Scalar > > | |
C_BinaryOperator< Scalar, DerivedOp > | |
C_Expr< T > | Expression template |
►C_Expr< _Binary< LHS, RHS, DerivedOp > > | |
►C_Expr< _Outer< LHS, RHS, DerivedOp > > | |
►C_Expr< _Unary< LHS, DerivedOp > > | |
C_UnaryOperator< Scalar, Derived > | Unary operator |
►C_UnaryOperator< Scalar, _NegOp< Scalar > > | |
►C_UnaryOperator< Scalar, _NoOp< Scalar > > | |
C_UnaryOperator< Scalar, DerivedOp > | |
CAccumulate< MD, MS, F, S, bool > | Accumulation without saturation |
CAccumulate< MD, MS, F, S, true > | Accumulation without saturation |
Carm_bilinear_interp_instance_f16 | Instance structure for the floating-point bilinear interpolation function |
Carm_bilinear_interp_instance_f32 | Instance structure for the floating-point bilinear interpolation function |
Carm_bilinear_interp_instance_q15 | Instance structure for the Q15 bilinear interpolation function |
Carm_bilinear_interp_instance_q31 | Instance structure for the Q31 bilinear interpolation function |
Carm_bilinear_interp_instance_q7 | Instance structure for the Q15 bilinear interpolation function |
Carm_biquad_cas_df1_32x64_ins_q31 | Instance structure for the high precision Q31 Biquad cascade filter |
Carm_biquad_cascade_df2T_instance_f16 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_cascade_df2T_instance_f32 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_cascade_df2T_instance_f64 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_cascade_stereo_df2T_instance_f16 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_cascade_stereo_df2T_instance_f32 | Instance structure for the floating-point transposed direct form II Biquad cascade filter |
Carm_biquad_casd_df1_inst_f16 | Instance structure for the floating-point Biquad cascade filter |
Carm_biquad_casd_df1_inst_f32 | Instance structure for the floating-point Biquad cascade filter |
Carm_biquad_casd_df1_inst_q15 | Instance structure for the Q15 Biquad cascade filter |
Carm_biquad_casd_df1_inst_q31 | Instance structure for the Q31 Biquad cascade filter |
Carm_cfft_instance_f16 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_instance_f32 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_instance_f64 | Instance structure for the Double Precision Floating-point CFFT/CIFFT function |
Carm_cfft_instance_q15 | Instance structure for the fixed-point CFFT/CIFFT function |
Carm_cfft_instance_q31 | Instance structure for the fixed-point CFFT/CIFFT function |
Carm_cfft_radix2_instance_f16 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_radix2_instance_f32 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_radix2_instance_q15 | Instance structure for the Q15 CFFT/CIFFT function |
Carm_cfft_radix2_instance_q31 | Instance structure for the Radix-2 Q31 CFFT/CIFFT function |
Carm_cfft_radix4_instance_f16 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_radix4_instance_f32 | Instance structure for the floating-point CFFT/CIFFT function |
Carm_cfft_radix4_instance_q15 | Instance structure for the Q15 CFFT/CIFFT function |
Carm_cfft_radix4_instance_q31 | Instance structure for the Q31 CFFT/CIFFT function |
Carm_dct4_instance_f32 | Instance structure for the floating-point DCT4/IDCT4 function |
Carm_dct4_instance_q15 | Instance structure for the Q15 DCT4/IDCT4 function |
Carm_dct4_instance_q31 | Instance structure for the Q31 DCT4/IDCT4 function |
Carm_fir_decimate_instance_f32 | Instance structure for single precision floating-point FIR decimator |
Carm_fir_decimate_instance_f64 | Instance structure for double precision floating-point FIR decimator |
Carm_fir_decimate_instance_q15 | Instance structure for the Q15 FIR decimator |
Carm_fir_decimate_instance_q31 | Instance structure for the Q31 FIR decimator |
Carm_fir_instance_f16 | Instance structure for the floating-point FIR filter |
Carm_fir_instance_f32 | Instance structure for the floating-point FIR filter |
Carm_fir_instance_f64 | Instance structure for the floating-point FIR filter |
Carm_fir_instance_q15 | Instance structure for the Q15 FIR filter |
Carm_fir_instance_q31 | Instance structure for the Q31 FIR filter |
Carm_fir_instance_q7 | Instance structure for the Q7 FIR filter |
Carm_fir_interpolate_instance_f32 | Instance structure for the floating-point FIR interpolator |
Carm_fir_interpolate_instance_q15 | Instance structure for the Q15 FIR interpolator |
Carm_fir_interpolate_instance_q31 | Instance structure for the Q31 FIR interpolator |
Carm_fir_lattice_instance_f32 | Instance structure for the floating-point FIR lattice filter |
Carm_fir_lattice_instance_q15 | Instance structure for the Q15 FIR lattice filter |
Carm_fir_lattice_instance_q31 | Instance structure for the Q31 FIR lattice filter |
Carm_fir_sparse_instance_f32 | Instance structure for the floating-point sparse FIR filter |
Carm_fir_sparse_instance_q15 | Instance structure for the Q15 sparse FIR filter |
Carm_fir_sparse_instance_q31 | Instance structure for the Q31 sparse FIR filter |
Carm_fir_sparse_instance_q7 | Instance structure for the Q7 sparse FIR filter |
Carm_gaussian_naive_bayes_instance_f16 | Instance structure for Naive Gaussian Bayesian estimator |
Carm_gaussian_naive_bayes_instance_f32 | Instance structure for Naive Gaussian Bayesian estimator |
Carm_iir_lattice_instance_f32 | Instance structure for the floating-point IIR lattice filter |
Carm_iir_lattice_instance_q15 | Instance structure for the Q15 IIR lattice filter |
Carm_iir_lattice_instance_q31 | Instance structure for the Q31 IIR lattice filter |
Carm_linear_interp_instance_f16 | Instance structure for the half floating-point Linear Interpolate function |
Carm_linear_interp_instance_f32 | Instance structure for the floating-point Linear Interpolate function |
Carm_lms_instance_f32 | Instance structure for the floating-point LMS filter |
Carm_lms_instance_q15 | Instance structure for the Q15 LMS filter |
Carm_lms_instance_q31 | Instance structure for the Q31 LMS filter |
Carm_lms_norm_instance_f32 | Instance structure for the floating-point normalized LMS filter |
Carm_lms_norm_instance_q15 | Instance structure for the Q15 normalized LMS filter |
Carm_lms_norm_instance_q31 | Instance structure for the Q31 normalized LMS filter |
Carm_matrix_instance_f16 | Instance structure for the floating-point matrix structure |
Carm_matrix_instance_f32 | Instance structure for the floating-point matrix structure |
Carm_matrix_instance_f64 | Instance structure for the floating-point matrix structure |
Carm_matrix_instance_q15 | Instance structure for the Q15 matrix structure |
Carm_matrix_instance_q31 | Instance structure for the Q31 matrix structure |
Carm_matrix_instance_q7 | Instance structure for the Q7 matrix structure |
Carm_merge_sort_instance_f32 | Instance structure for the sorting algorithms |
Carm_mfcc_instance_f16 | Instance structure for the Floating-point MFCC function |
Carm_mfcc_instance_f32 | Instance structure for the Floating-point MFCC function |
Carm_mfcc_instance_q15 | Instance structure for the Q15 MFCC function |
Carm_mfcc_instance_q31 | Instance structure for the Q31 MFCC function |
Carm_pid_instance_f32 | Instance structure for the floating-point PID Control |
Carm_pid_instance_q15 | Instance structure for the Q15 PID Control |
Carm_pid_instance_q31 | Instance structure for the Q31 PID Control |
Carm_rfft_fast_instance_f16 | Instance structure for the floating-point RFFT/RIFFT function |
Carm_rfft_fast_instance_f32 | Instance structure for the floating-point RFFT/RIFFT function |
Carm_rfft_fast_instance_f64 | Instance structure for the Double Precision Floating-point RFFT/RIFFT function |
Carm_rfft_instance_f32 | Instance structure for the floating-point RFFT/RIFFT function |
Carm_rfft_instance_q15 | Instance structure for the Q15 RFFT/RIFFT function |
Carm_rfft_instance_q31 | Instance structure for the Q31 RFFT/RIFFT function |
Carm_sort_instance_f32 | Instance structure for the sorting algorithms |
Carm_spline_instance_f32 | Instance structure for the floating-point cubic spline interpolation |
Carm_svm_linear_instance_f16 | Instance structure for linear SVM prediction function |
Carm_svm_linear_instance_f32 | Instance structure for linear SVM prediction function |
Carm_svm_polynomial_instance_f16 | Instance structure for polynomial SVM prediction function |
Carm_svm_polynomial_instance_f32 | Instance structure for polynomial SVM prediction function |
Carm_svm_rbf_instance_f16 | Instance structure for rbf SVM prediction function |
Carm_svm_rbf_instance_f32 | Instance structure for rbf SVM prediction function |
Carm_svm_sigmoid_instance_f16 | Instance structure for sigmoid SVM prediction function |
Carm_svm_sigmoid_instance_f32 | Instance structure for sigmoid SVM prediction function |
Cdefault_user_allocator_malloc_free | Malloc memory allocator |
Cfixed_storage_type< M, F, s, bool > | Storage type for a fixed point number |
Cfixed_storage_type< M, F, false > | |
Cfixed_storage_type< M, F, false, test16(M, F, 0)> | Storage type for a fixed point number representable on uint16 |
Cfixed_storage_type< M, F, false, test32(M, F, 0)> | Storage type for a fixed point number representable on uint32 |
Cfixed_storage_type< M, F, false, test64(M, F, 0)> | Storage type for a fixed point number representable on uint64 |
Cfixed_storage_type< M, F, false, test8(M, F, 0)> | Storage type for a fixed point number representable on uint8 |
Cfixed_storage_type< M, F, true > | |
Cfixed_storage_type< M, F, true, test16(M, F, 1)> | Storage type for a fixed point number representable on int16 |
Cfixed_storage_type< M, F, true, test32(M, F, 1)> | Storage type for a fixed point number representable on int32 |
Cfixed_storage_type< M, F, true, test64(M, F, 1)> | Storage type for a fixed point number representable on int64 |
Cfixed_storage_type< M, F, true, test8(M, F, 1)> | Storage type for a fixed point number representable on int8 |
CFixedCastShift< M, FD, FS, S,(FD >FS)> | Changed fractional representation of a fixed point number using a shift |
CFixedCastShift< M, FD, FS, S,(FD< FS)> | Changed fractional representation of a fixed point number using a shift |
CListElem | Simple list of elements |
Cmalloc_allocator< L > | Default memory allocator for vectors and matrixes |
CMatrixView< T, S > | Matrix |
CMatrixView< T, DYNAMIC > | Dynamic Matrix View |
CMemoryPool< BUF_SIZE, UserAllocator > | This class describes a memory pool that can be used to build a memory allocator for vectors and matrixes |
Cnumber_traits< T > | Properties of a scalar datatype |
Cnumber_traits< double > | Features for double |
Cnumber_traits< float > | Features for float |
Cnumber_traits< float16_t > | Feature of float16 datatype |
Cnumber_traits< Q15 > | Q15 features |
Cnumber_traits< Q31 > | Features for Q31 |
Cnumber_traits< Q7 > | Q7 features |
Cnumber_traits< std::tuple< E... > > | Number description for a tuple of numbers |
CQ< M, F, S, T > | Fixed point template |
CQ15DSPVector | Representation of a vector when DSP extension supported |
CQ< M, F, false, uint16_t > | Unsigned fixed point datatypes on 16 bits |
CQ< M, F, false, uint32_t > | Unsigned fixed point datatypes on 32 bits |
CQ< M, F, false, uint64_t > | Unsigned fixed point datatypes on 64 bits |
CQ< M, F, false, uint8_t > | Unsigned fixed point datatypes on 8 bits |
CQ< M, F, true, int16_t > | Signed fixed point datatypes on 16 bits |
CQ< M, F, true, int32_t > | Signed fixed point datatypes on 32 bits |
CQ< M, F, true, int64_t > | Signed fixed point datatypes on 64 bits |
CQ< M, F, true, int8_t > | Signed fixed point datatypes on 8 bits |
►CScalar | |
CSlice | Slice |
Cuser_allocator_aligned_malloc | Memory allocation for aligned buffers |
Cvctpq< T, typename > | Predicate (only defined for vector architectures) |
Cvctpq< float > | Vctpq for this datatype |
Cvctpq< float16_t > | Vctpq for Helium and f16 |
►CVector_Base< P > | Storage for a vector |
Cvector_traits< T, arch, typename > | Properties of a vector datatype linked to a scalar datatype |
Cvector_traits< double, arch, void > | Default vector datatype description for this scalar datatype |
Cvector_traits< float, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > | Vector datatype for Helium |
Cvector_traits< float, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type > | Vector instructions for float when no Helium or Neon |
Cvector_traits< float16_t > | Float16 vector descrition when no vector architecture |
Cvector_traits< float16_t, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > | Vector features for f16 on Helium |
Cvector_traits< Q15, arch, typename std::enable_if< std::is_base_of< Helium, arch >::value >::type > | Vector features for Q15 on Helium |
Cvector_traits< Q15, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type > | Vector features for Q15 when no vector architecture |
Cvector_traits< Q15, DSP, typename std::enable_if< true >::type > | Vector description for Q15 with DSP extensions |
Cvector_traits< Q31, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value >::type > | Vector features for Q31 when no vector instructions |
Cvector_traits< Q7, arch, typename std::enable_if<!std::is_base_of< Helium, arch >::value &&!std::is_base_of< Neon, arch >::value &&!std::is_base_of< DSP, arch >::value >::type > | Vector descrition when no vector architecture |
Cvector_traits< std::tuple< E... >, arch > | Tuple of compatible vectors |
CVectorView< T, stride > | Vector view |
►CVectorView< T, 1 > | |
CVectorView< T, DYNAMIC > | Vector view with dynamic stride (not known at build time) |
Cvload1_gen_stride< S > | Load with generalized stride (gather load) |
Cvload1_gen_stride< 0, 1, 2, 3 > | Load with generalized stride specialized for <0,1,2,3> |
Cvload1_gen_stride_z< S > | Load with generalized stride (gather load) and tail predicate |
Cvload1_gen_stride_z< 0, 1, 2, 3 > | Load with generalized stride (gather load) and tail predicate specialized for <0,1,2,3> |
Cvstore1_gen_stride< S > | Generalized store with strides |
Cvstore1_gen_stride< 0, 1, 2, 3 > | Generalized store with stride (Specialized for <0,1,2,3>) |
Cvstore1_gen_stride_z< S > | Store with generalized strides and tail predicate |
Cvstore1_gen_stride_z< 0, 1, 2, 3 > | Scatter store with tail predicate (specialized for <0,1,2,3>) |
This user manual describes the CMSIS DSP software library, a suite of common compute processing functions for use on Cortex-M and Cortex-A processor based devices.
+The library is divided into a number of functions each covering a specific category:
+The library has generally separate functions for operating on 8-bit integers, 16-bit integers, 32-bit integer and 32-bit floating-point values and 64-bit floating-point values.
+The library is providing vectorized versions of most algorithms for Helium and of most f32 algorithms for Neon.
+When using a vectorized version, provide a little bit of padding after the end of a buffer (3 words) because the vectorized code may read a little bit after the end of a buffer. You don't have to modify your buffers but just ensure that the end of buffer + padding is not outside of a memory region.
+A Python wrapper is also available with a Python API as close as possible to the C one. It can be used to start developing and testing an algorithm with NumPy and SciPy before writing the C version. Is is available on PyPI.org. It can be installed with: pip install cmsisdsp
.
This extension is a set of C++ headers. They just need to included to start using the features.
+Those headers are not yet part of the pack and you need to get them from the github repository
+More documentation about the DSP++ extension.
+The library is released in source form. It is strongly advised to compile the library using -Ofast
optimization to have the best performances.
Following options should be avoided:
+-fno-builtin
-ffreestanding
because it enables previous optionsThe library is doing some type punning to process word 32 from memory as a pair of q15
or a quadruple of q7
. Those type manipulations are done through memcpy
functions. Most compilers should be able to optimize out those function calls when the length to copy is small (4 bytes).
This optimization will not occur when -fno-builtin
is used and it will have a very bad impact on the performances.
The library functions are declared in the public file Include/arm_math.h
. Simply include this file to use the CMSIS-DSP library. If you don't want to include everything, you can also rely on individual header files from the Include/dsp/
folder and include only those that are needed in the project.
The library ships with a number of examples which demonstrate how to use the library functions. Please refer to Examples.
+The library is now tested on Fast Models building with cmake. Core M0, M4, M7, M33, M55 are tested.
+CMSIS-DSP is actively maintained in the CMSIS-DSP GitHub repository and is released as a standalone CMSIS-DSP pack in the CMSIS-Pack format.
+The table below explains the content of ARM::CMSIS-DSP pack.
+Directory | Description |
---|---|
📂 ComputeLibrary | Small Neon kernels when building on Cortex-A |
📂 Documentation | Folder with this CMSIS-DSP documenation |
📂 Example | Example projects demonstrating the usage of the library functions |
📂 Include | Include files for using and building the lib |
📂 PrivateInclude | Private include files for building the lib |
📂 Source | Source files |
📄 ARM.CMSIS-DSP.pdsc | CMSIS-Pack description file |
📄 LICENSE | License Agreement (Apache 2.0) |
See CMSIS Documentation for an overview of CMSIS software components, tools and specifications.
+Each library project has different preprocessor macros.
+ARM_MATH_BIG_ENDIAN
:ARM_MATH_MATRIX_CHECK
:ARM_MATH_ROUNDING
:ARM_MATH_LOOPUNROLL
:ARM_MATH_NEON
:ARM_MATH_NEON_EXPERIMENTAL
:ARM_MATH_HELIUM
:ARM_MATH_HELIUM_EXPERIMENTAL
:ARM_MATH_MVEF
:ARM_MATH_MVEI
:ARM_MATH_MVE_FLOAT16
:DISABLEFLOAT16
:ARM_MATH_AUTOVECTORIZE
:ARM_DSP_ATTRIBUTE
: Can be set to define CMSIS-DSP function as weak functions. This can either be set on the command line when building or in a new arm_dsp_config.h
header (see below)ARM_DSP_TABLE_ATTRIBUTE
: Can be set to define in which section constant tables must be mapped. This can either be set on the command line when building or in a new arm_dsp_config.h
header (see below). Another way to set those sections is by modifying the linker scripts since the constant tables are defined only in a restricted set of source files.ARM_DSP_CUSTOM_CONFIG
When set, the file arm_dsp_config.h
is included by the arm_math_types.h
headers. You can use this file to define any of the above compilation symbols.Previous versions were using lots of compilation flags to control code size. It was enabled with ARM_DSP_CONFIG_TABLES
. It was getting too complex and has been removed. Now code size optimizations are relying on the linker.
You no more need to use any compilation flags like ARM_TABLE_TWIDDLECOEF_F32_2048
, ARM_FFT_ALLOW_TABLES
etc ...
They have been removed.
+Constant tables can use a lot of read only memory but the linker can remove the unused functions and constant tables if it can deduce that those tables or functions are not used.
+For this you need to use the right initialization functions in the library and the right options for the linker (they are compiler dependent).
+For all transforms functions (CFFT, RFFT ...) instead of using a generic initialization function that works for all lengths (like arm_cfft_init_f32
), use a dedicated initialization function for a specific size (like arm_cfft_init_1024_f32
).
By using the right initialization function, you're telling the linker what is really used.
+If you use a generic function, the linker cannot deduce the used lengths and thus will keep all the constant tables required for each length.
+Then you need to use the right options for the compiler so that the unused tables and functions are removed. It is compiler dependent but generally the options are named like -ffunction-sections
, -fdata-sections
, --gc-sections
...
Some algorithms may give slightlty different results on different architectures (like M0 or M4/M7 or M55). It is a tradeoff made for speed reasons and to make best use of the different instruction sets.
+All algorithms are compared with a double precision reference and the different versions (for different architectures) have the same characteristics when compared to the double precision (SNR bound, max bound for sample error ...)
+As consequence, the small differences that may exists between the different architecture implementations should be too small to have any practical consequences.
+The CMSIS-DSP is provided free of charge under the Apache 2.0 License.
+