Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 58) sorted by relevance

123

/cmsis-dsp-latest/dsppp/tests/
Dvector_test.cpp16 template<typename T,int NB>
21 PVector<T,NB> a; in test()
22 PVector<T,NB> b; in test()
24 PVector<T> a(NB); in test()
25 PVector<T> b(NB); in test()
36 PVector<T,NB> res = a + b; in test()
38 PVector<T> res = copy(a + b); in test()
48 PVector<T,NB> ref; in test()
50 PVector<T> ref(NB); in test()
64 template<typename T,int NB>
[all …]
Dmatrix_test.cpp24 template<typename T>
73 template<typename T>
263 template<typename T,int R,int C, template<int> typename A>
264 void init_mat(Matrix<T,R,C,A> &pDst,std::size_t r,std::size_t c) in init_mat() argument
285 pDst[i] = T(p[i]); in init_mat()
306 template<typename T,
310 void _matinv(const Matrix<T,NB,NB,A> &a,M && res) in _matinv() argument
313 Matrix<T,NB,NB,TMP_ALLOC> b = a; in _matinv()
321 res.row(r) = T{}; in _matinv()
322 res(r,r) = number_traits<T>::one(); in _matinv()
[all …]
Drow_test.cpp20 template<typename T,int R,int C>
29 PMat<T,R,C> a; in test()
31 PMat<T> a(R,C); in test()
41 PVector<T,NBOUT> res = a.row(0,1) + a.row(1,1); in test()
43 PVector<T> res = a.row(0,1) + a.row(1,1); in test()
50 PVector<T,NBOUT> da (a.row(0,1)); in test()
51 PVector<T,NBOUT> db (a.row(1,1)); in test()
52 PVector<T,NBOUT> ref; in test()
65 template<typename T,int R,int C>
74 PMat<T,R,C> a; in swaptest()
[all …]
Ddot_test.cpp22 template<typename T,int NB,typename O>
23 static void complex_test(const T scale) in complex_test()
27 PVector<T,NB> a; in complex_test()
28 PVector<T,NB> b; in complex_test()
29 PVector<T,NB> c; in complex_test()
30 PVector<T,NB> d; in complex_test()
32 PVector<T,NB> res; in complex_test()
34 PVector<T> a(NB); in complex_test()
35 PVector<T> b(NB); in complex_test()
36 PVector<T> c(NB); in complex_test()
[all …]
Dfusion_test.cpp19 template<typename T,int NB>
25 PVector<T,NB> a; in test()
26 PVector<T,NB> b; in test()
27 PVector<T,NB> c; in test()
29 PVector<T> a(NB); in test()
30 PVector<T> b(NB); in test()
31 PVector<T> c(NB); in test()
40 PVector<T,NB> resa; in test()
41 PVector<T,NB> resb; in test()
43 PVector<T> resa(NB); in test()
[all …]
Dcol_test.cpp20 template<typename T,int R,int C>
27 PMat<T,R,C> a; in test()
28 PVector<T,R> ref; in test()
30 PMat<T> a(R,C); in test()
31 PVector<T> ref(R); in test()
42 PVector<T,R> res = copy(a.col(4)); in test()
44 PVector<T> res = copy(a.col(4)); in test()
69 template<typename T>
72 const int nb_tails = TailForTests<T>::tail; in all_col_test()
73 const int nb_loops = TailForTests<T>::loop; in all_col_test()
[all …]
Dfilter_test.cpp424 template<typename T>
475 template<typename T,int BLOCK,int TAPS>
478 FIR(const PVector<T,TAPS> &coefs):coef_(coefs),state_(T{}) in FIR()
482 PVector<T,BLOCK> filter(const PVector<T,BLOCK> &signal) in filter()
485 PVector<T,BLOCK> res(T{}); in filter()
486 using acc_type = typename number_traits<T>::accumulator; in filter()
529 void purec(const T *signal, T *dst) in purec()
531 const T* coef=coef_.const_ptr(); in purec()
532 T *state = state_.ptr(); in purec()
539 T acc=T{}; in purec()
[all …]
Dcommon_tests.h58 template<typename T,
61 void init_array(Vector<T,L,A> &pDst,std::size_t nb) in init_array() argument
65 pDst[i] = T(i); in init_array()
82 template<typename T>
83 void init_array(Vector_Base<T> &pDst,std::size_t nb) in init_array()
87 pDst[i] = T(i); in init_array()
100 template<typename T,
101 typename std::enable_if<std::is_pointer<T>::value,bool>::type = true>
102 bool validate(const T a, const T b, std::size_t nb,float abser = ABS_ERROR, float reler = REL_ERROR)
158 template<typename T,
[all …]
/cmsis-dsp-latest/dsppp/Include/dsppp/
Dmatrix_view.hpp31 template<typename T,int S=1>
54 explicit MatrixView(T* v, in MatrixView()
64 explicit MatrixView(const Vector_Base<T> &v, in MatrixView()
89 T& operator()(const index_t r,const index_t c) in operator ()()
100 T const operator()(const index_t r,const index_t c) const in operator ()()
124 MatrixView& operator=(const T val) in operator =()
162 MatrixView& operator +=(const T other) in operator +=()
197 MatrixView& operator -=(const T other) in operator -=()
232 MatrixView& operator *=(const T other) in operator *=()
264 VectorView<T,1> row(const index_t i,const index_t start=0) in row()
[all …]
Dvector_view.hpp29 template<typename T,int stride=1>
60 explicit VectorView(T *v,const vector_length_t start,const vector_length_t stop): in VectorView()
68 explicit VectorView(const Vector_Base<T> &v): in VectorView()
78 explicit VectorView(const Vector_Base<T> &v,const index_t start,const index_t stop): in VectorView()
94 T* ptr() const {return(v_);} in ptr()
104 T* ptr(const index_t i) const {return(&v_[i*stride]);} in ptr()
111 const T* const_ptr() const {return(v_);} in const_ptr()
121 const T* const_ptr(const index_t i) const {return(&v_[i*stride]);} in const_ptr()
131 T& operator[](const index_t i) in operator []()
144 T& operator[](const index_t i) const in operator []()
[all …]
Dforward.hpp10 template<typename T,int stride>
21 template<typename T,int S>
24 template<typename T>
27 template<typename T>
78 template<typename T>
92 template<typename T>
106 template<typename T>
125 template<typename T>
132 template<typename T>
140 template<typename T>
[all …]
Dfusion_ops.hpp41 template<typename T=Scalar,
42 typename std::enable_if<vector_traits<T>::has_predicate,bool>::type = true>
99 template<typename T=Scalar,
100 typename std::enable_if<vector_traits<T>::has_predicate,bool>::type = true>
108 template<typename T=Scalar,
109 typename std::enable_if<vector_traits<T>::has_predicate,bool>::type = true>
117 template<typename T=Scalar,
118 typename std::enable_if<vector_traits<T>::has_predicate,bool>::type = true>
170 template<typename T=Scalar,
171 typename std::enable_if<vector_traits<T>::has_predicate,bool>::type = true>
[all …]
Dnumber.hpp51 template<typename T>
71 template<typename T,typename arch = ARCH,typename = void>
73 typedef T type; //!< Scalar datatype
74 typedef T storage_type; //!< Storage type (for instance for Q15 scalar the storage is int16_t)
86 template<int M, int F, bool S,typename T>
87 struct number_traits<Q<M,F,S,T>>
96 static constexpr Q<M,F,S,T> one() {return Q<M,F,S,T>::one();}; in one()
107 template<typename T,typename = void>
109 static typename vector_traits<T>::predicate_t mk(uint32_t v);
171 template<typename T>
[all …]
Dvec.hpp27 template<typename T,bool = true>
30 template<typename T>
31 struct VecRef<Vector_Base<T>>
33 typedef VectorView<T,1> type;
34 static type ref(const Vector_Base<T>&a){ in ref()
39 template<typename T,int S>
40 struct VecRef<VectorView<T,S>>
42 typedef VectorView<T,S> type;
43 static type ref(const VectorView<T,S>&a){ in ref()
157 template<typename T,int S>
[all …]
/cmsis-dsp-latest/Source/TransformFunctions/
Darm_cfft_radix4_q15.c163 q31_t R, S, T, U; in arm_radix4_butterfly_q15() local
206 T = read_q15x2 (pSi0); in arm_radix4_butterfly_q15()
207 T = __SHADD16(T, 0); /* this is just a SIMD arithmetic shift right by 1 */ in arm_radix4_butterfly_q15()
208T = __SHADD16(T, 0); /* it turns out doing this twice is 2 cycles, the alternative takes 3 cycles … in arm_radix4_butterfly_q15()
220 R = __QADD16(T, S); in arm_radix4_butterfly_q15()
223 S = __QSUB16(T, S); in arm_radix4_butterfly_q15()
227 T = read_q15x2 (pSi1); in arm_radix4_butterfly_q15()
228 T = __SHADD16(T, 0); in arm_radix4_butterfly_q15()
229 T = __SHADD16(T, 0); in arm_radix4_butterfly_q15()
237 T = __QADD16(T, U); in arm_radix4_butterfly_q15()
[all …]
Darm_cfft_radix2_q15.c94 q31_t T, S, R; in arm_radix2_butterfly_q15() local
113 T = read_q15x2 (pSrc + (2 * i)); in arm_radix2_butterfly_q15()
114 in = ((int16_t) (T & 0xFFFF)) >> 1; in arm_radix2_butterfly_q15()
115 T = ((T >> 1) & 0xFFFF0000) | (in & 0xFFFF); in arm_radix2_butterfly_q15()
121 R = __QSUB16(T, S); in arm_radix2_butterfly_q15()
123 write_q15x2 (pSrc + (2 * i), __SHADD16(T, S)); in arm_radix2_butterfly_q15()
143 T = read_q15x2 (pSrc + (2 * i)); in arm_radix2_butterfly_q15()
144 in = ((int16_t) (T & 0xFFFF)) >> 1; in arm_radix2_butterfly_q15()
145 T = ((T >> 1) & 0xFFFF0000) | (in & 0xFFFF); in arm_radix2_butterfly_q15()
151 R = __QSUB16(T, S); in arm_radix2_butterfly_q15()
[all …]
/cmsis-dsp-latest/dsppp/Include/dsppp/Neon/
Dbasic.hpp10 template<typename T>
11 void _Add(const T* pSrcA,
12 const T* pSrcB,
13 T* pDst,
16 typename std::enable_if<number_traits<T>::is_float &&
17 vector_traits<T,Neon>::has_vector,T>::type* = nullptr)
19 using num = vector_traits<T,Neon>;
75 template<typename T>
76 void _Add(const T* pSrcA_Q,
77 const T* pSrcB_Q,
[all …]
/cmsis-dsp-latest/dsppp/Include/dsppp/Helium/
Dmatrix_multiply_fixed.hpp33 using T = typename traits<MA>::Scalar; in arm_mat_mult_2x2_mve() typedef
34 using ACC = typename vector_traits<T>::temp_accumulator; in arm_mat_mult_2x2_mve()
35 using VEC = typename vector_traits<T>::vector; in arm_mat_mult_2x2_mve()
37 const T *pInB = pSrcB.const_ptr(); /* input data matrix pointer B */ in arm_mat_mult_2x2_mve()
38 const T *pInA = pSrcA.const_ptr(); /* input data matrix pointer A */ in arm_mat_mult_2x2_mve()
39 T *pOut = pDst.ptr(); /* output data matrix pointer */ in arm_mat_mult_2x2_mve()
40 const T *pInA0 = pInA; in arm_mat_mult_2x2_mve()
41 const T *pInA1 = pInA0 + pSrcA.stride(); in arm_mat_mult_2x2_mve()
44 mve_pred16_t p0 = inner::vctpq<T>::mk(MATRIX_DIM2); in arm_mat_mult_2x2_mve()
100 using T = typename traits<MA>::Scalar; in arm_mat_mult_3x3_mve() typedef
[all …]
Dbasic.hpp32 template<typename T,typename DST,
35 SameElementType<DST,T>::value,bool>::type = true>
37 const T val, in _Fill()
41 constexpr int nb_lanes = vector_traits<T>::nb_lanes; in _Fill()
46 v.vector_store_tail(i,l-i,inner::vconst_tail(val,inner::vctpq<T>::mk(l-i))); in _Fill()
62 template<typename T,typename DST,
65 SameElementType<DST,T>::value,bool>::type = true>
67 const T val, in _Fill2D()
72 constexpr int nb_lanes = vector_traits<T>::nb_lanes; in _Fill2D()
90 … v.matrix_store_tail(row+k,col,cols-col,inner::vconst_tail(val,inner::vctpq<T>::mk(cols-col))); in _Fill2D()
[all …]
Dmatrix_multiply.hpp89 using T = typename traits<MA>::Scalar;
90 using ACC = typename vector_traits<T>::temp_accumulator;
91 using VEC = typename vector_traits<T>::vector;
92 constexpr int nb_lanes = vector_traits<T>::nb_lanes;
94 T *pInB = pSrcB.ptr(); /* input data matrix pointer B */
95 T *pInA = pSrcA.ptr(); /* input data matrix pointer A */
96 T *pOut = pDst.ptr(); /* output data matrix pointer */
123 T *pInA0, *pInA1, *pInA2, *pInA3;
124 T *pInB0;
125 T *pOut0, *pOut1, *pOut2, *pOut3;
[all …]
Dmatrix_multiply_f32.hpp26 using T = typename traits<MA>::Scalar;
28 using VEC = typename vector_traits<T>::vector;
133 using T = typename traits<MA>::Scalar;
134 using ACC = typename vector_traits<T>::temp_accumulator;
135 using VEC = typename vector_traits<T>::vector;
136 T *pInB = pSrcB.ptr(); /* input data matrix pointer B */
137 T *pInA = pSrcA.ptr(); /* input data matrix pointer A */
138 T *pOut = pDst.ptr(); /* output data matrix pointer */
139 T *pInA0, *pInA1, *pInA2;
142 T const *pSrBVec;
[all …]
/cmsis-dsp-latest/dsppp/Include/dsppp/DSP/
Dmatrix_multiply.hpp29 using T = typename traits<MA>::Scalar; in _arm_mat_trans() typedef
30 using VEC = typename vector_traits<T>::vector; in _arm_mat_trans()
31 constexpr int nb_lanes = vector_traits<T>::nb_lanes; in _arm_mat_trans()
33 T *pIn = src.ptr(); /* input data matrix pointer */ in _arm_mat_trans()
34 T *pOut = dst.ptr(); /* output data matrix pointer */ in _arm_mat_trans()
124 using T = typename traits<M>::Scalar; in _dot_m_v() typedef
125 using ACC = typename vector_traits<T>::temp_accumulator; in _dot_m_v()
126 using VEC = typename vector_traits<T>::vector; in _dot_m_v()
127 constexpr int nb_lanes = vector_traits<T>::nb_lanes; in _dot_m_v()
131 const T *pSrcA = m.ptr(); in _dot_m_v()
[all …]
Dbasic.hpp23 template<typename T,typename DST,
26 SameElementType<DST,T>::value,bool>::type = true>
28 const T val, in _Fill()
32 constexpr int nb_lanes = vector_traits<T>::nb_lanes; in _Fill()
50 template<typename T,typename DST,
53 SameElementType<DST,T>::value,bool>::type = true>
55 const T val, in _Fill2D()
60 constexpr int nb_lanes = vector_traits<T>::nb_lanes; in _Fill2D()
114 using T = typename traits<DA>::Scalar; in eval() typedef
115 constexpr int nb_lanes = vector_traits<T>::nb_lanes; in eval()
[all …]
/cmsis-dsp-latest/Testing/FrameworkInclude/
DError.h172 template <typename T>
173 void assert_equal(unsigned long nb,T pa, T pb) in assert_equal()
182 template <typename T>
183 void assert_equal_partial(unsigned long nb,unsigned long nbSamples,AnyPattern<T> &pa, AnyPattern<T>… in assert_equal_partial()
201 T *ptrA = pa.ptr(); in assert_equal_partial()
202 T *ptrB = pb.ptr(); in assert_equal_partial()
219 template <typename T>
220 void assert_equal(unsigned long nb,AnyPattern<T> &pa, AnyPattern<T> &pb) in assert_equal()
233 T *ptrA = pa.ptr(); in assert_equal()
234 T *ptrB = pb.ptr(); in assert_equal()
[all …]
/cmsis-dsp-latest/PythonWrapper/examples/kws_example/kws/
DGenericNodes.h38 template<typename T>
40 typedef T type;
48 template<typename T>
49 using Debug = struct debugtype<T>;
53 template<typename T>
56 virtual T* getWriteBuffer(int nb)=0;
57 virtual T* getReadBuffer(int nb)=0;
61 template<typename T, int length, int isArray=0>
62 class FIFO: public FIFOBase<T>
65 FIFO(T *buffer,int delay=0):mBuffer(buffer),readPos(0),writePos(delay) {};
[all …]

123