Lines Matching refs:C

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
410 template<typename T,int R,int C>
414 std::cout << R << " x " << C << "\r\n"; in testinv()
417 PMat<T,R,C> a; in testinv()
419 PMat<T> a(R,C); in testinv()
422 init_mat(a,R,C); in testinv()
425 PMat<T> res(R,C); in testinv()
432 PMat<T,R,C> res = matinv(a); in testinv()
440 PMat<T> cmsis_res(R,C); in testinv()
444 cmsisdsp_mat_inv(amod.ptr(),cmsis_res.ptr(),R,C); in testinv()
449 if (!validate(res.const_ptr(),cmsis_res.const_ptr(),R*C, in testinv()
460 template<typename T,int R,int C>
464 std::cout << R << " x " << C << "\r\n"; in testadd()
467 PMat<T,R,C> a; in testadd()
468 PMat<T,R,C> b; in testadd()
470 PMat<T> a(R,C); in testadd()
471 PMat<T> b(R,C); in testadd()
474 init_array(a,R*C); in testadd()
475 init_array(b,R*C); in testadd()
482 PMat<T,R,C> res = a+b; in testadd()
505 PMat<T,R,C> cmsis_res; in testadd()
507 PMat<T> cmsis_res(R,C); in testadd()
509 cmsisdsp_mat_add(a.const_ptr(),b.const_ptr(),cmsis_res.ptr(),R,C); in testadd()
514 if (!validate(res.const_ptr(),cmsis_res.const_ptr(),R*C, in testadd()
525 template<typename T,int R,int C>
529 std::cout << R << " x " << C << "\r\n"; in testdiag()
541 PMat<T,R,C> res=PMat<T,R,C>::diagonal(a); in testdiag()
554 PMat<T,R,C> cmsis_res; in testdiag()
556 PMat<T> cmsis_res(R,C); in testdiag()
564 for(index_t col=0;col < C; col++) in testdiag()
568 refp[row*C+col] = T{}; in testdiag()
572 refp[row*C+col] = ap[row]; in testdiag()
580 if (!validate(res.const_ptr(),cmsis_res.const_ptr(),R*C, in testdiag()
591 template<typename T,int R,int C>
595 std::cout << R << " x " << C << "\r\n"; in testouter()
598 PVector<T,C> b; in testouter()
600 init_array(b,C); in testouter()
607 PMat<T,R,C> res = outer(a,b); in testouter()
617 PMat<T,R,C> cmsis_res; in testouter()
619 PMat<T> cmsis_res(R,C); in testouter()
621 CMSISOuter<T>::run(a.const_ptr(),b.const_ptr(),cmsis_res.ptr(),R,C); in testouter()
627 if (!validate(res.const_ptr(),cmsis_res.const_ptr(),R*C, in testouter()
637 template<typename T,int R,int C>
641 std::cout << R << " x " << C << "\r\n"; in testview()
651 PMat<T,R,C> res=PMat<T,R,C>::diagonal(a); in testview()
706 template<typename T,int R,int C>
713 std::cout << R << " x " << C << "\r\n"; in testmatvec()
716 PVector<T,C> a; in testmatvec()
718 PVector<T> a(C); in testmatvec()
720 init_array(a,C); in testmatvec()
723 PMat<T,R,C> m; in testmatvec()
725 PMat<T> m(R,C); in testmatvec()
727 init_array(m,R*C); in testmatvec()
752 S.numCols = C; in testmatvec()
772 template<typename T,int R,int C>
779 std::cout << R << " x " << C << "\r\n"; in testcomplexmatvec()
782 PVector<T,C> a; in testcomplexmatvec()
783 PVector<T,C> b; in testcomplexmatvec()
785 PVector<T> a(C); in testcomplexmatvec()
786 PVector<T> b(C); in testcomplexmatvec()
788 init_array(a,C); in testcomplexmatvec()
789 init_array(b,C); in testcomplexmatvec()
792 PMat<T,R,C> m; in testcomplexmatvec()
794 PMat<T> m(R,C); in testcomplexmatvec()
796 init_array(m,R*C); in testcomplexmatvec()
803 PVector<T,C> tmpv = a + b * scalar; in testcomplexmatvec()
818 PVector<T,C> tmp; in testcomplexmatvec()
821 PVector<T> tmp(C); in testcomplexmatvec()
825 S.numCols = C; in testcomplexmatvec()
854 template<typename T,int R, int K,int C>
858 std::cout << R << " x " << K << " x " << C << "\r\n"; in testmatmult()
870 PMat<T,K,C> mb; in testmatmult()
872 PMat<T> mb(K,C); in testmatmult()
874 init_array(mb,K*C); in testmatmult()
888 PMat<T,R,C> res = dot(ma,mb); in testmatmult()
904 PMat<T> tmp(C,K); in testmatmult()
909 PMat<T,R,C> cmsis_res; in testmatmult()
911 PMat<T> cmsis_res(R,C); in testmatmult()
922 SB.numCols = C; in testmatmult()
927 RES.numCols = C; in testmatmult()
949 template<typename T,int R,int K, int C>
953 std::cout << R << " x " << K << " x " << C << "\r\n"; in testsubmatmult()
957 constexpr int TOTALB = 4 + 2*C + 2*K + C*K; in testsubmatmult()
967 PMat<T,K+2,C+2> mb; in testsubmatmult()
969 PMat<T> mb(K+2,C+2); in testsubmatmult()
984 PMat<T,R,C> res(T{}); in testsubmatmult()
986 PMat<T> res(R,C,T{}); in testsubmatmult()
989 …res.sub(Slice(0,R),Slice(0,C)) = copy(dot(ma.sub(Slice(0,R),Slice(0,K)),mb.sub(Slice(0,K),Slice(0, in testsubmatmult()
1002 PMat<T> cmsis_res(R,C); in testsubmatmult()
1004 PMat<T> cmsis_mb(K,C); in testsubmatmult()
1005 PMat<T> tmp(C,K); in testsubmatmult()
1014 SB.numCols = C; in testsubmatmult()
1019 RES.numCols = C; in testsubmatmult()
1028 cmsis_mb = copy(mb.sub(Slice(0,K),Slice(0,C))); in testsubmatmult()
1036 if (!validate(res.sub(Slice(0,R),Slice(0,C)),cmsis_res, in testsubmatmult()
1047 template<typename T,int R,int C>
1051 std::cout << R << " x " << C << "\r\n"; in testmattranspose()
1054 PMat<T,R,C> ma; in testmattranspose()
1056 PMat<T> ma(R,C); in testmattranspose()
1058 init_array(ma,R*C); in testmattranspose()
1066 PMat<T,C,R> res = ma.transpose(); in testmattranspose()
1078 PMat<T,C,R> cmsis_res; in testmattranspose()
1080 PMat<T> cmsis_res(C,R); in testmattranspose()
1085 SA.numCols = C; in testmattranspose()
1089 RES.numRows = C; in testmattranspose()
1282 template<typename T,int R,int C,template<int> typename A>
1283 auto QR(const Matrix<T,R,C,A>&m,const T eps,bool wantQ) in QR() argument
1286 Vector<T,C,TMP_ALLOC> tau; in QR()
1287 Matrix<T,R,C,TMP_ALLOC> RM = m; in QR()
1361 template<typename T,int R,int C>
1365 std::cout << R << " x " << C << "\r\n"; in testQR()
1367 PMat<T,R,C> a; in testQR()
1369 PMat<T> a(R,C); in testQR()
1372 cmsis_init_qr(a.ptr(),R,C); in testQR()
1397 PMat<T,R,C> cmsis_res; in testQR()
1398 PMat<T,R,C> cmsis_outRp; in testQR()
1400 PVector<T,C> cmsis_tau; in testQR()
1402 PVector<T,C> cmsis_tmpb; in testQR()
1404 PMat<T> cmsis_res(R,C); in testQR()
1405 PMat<T> cmsis_outRp(R,C); in testQR()
1407 PVector<T> cmsis_tau(C); in testQR()
1409 PVector<T> cmsis_tmpb(C); in testQR()
1414 RP.numCols = C; in testQR()
1424 IN.numCols = C; in testQR()