Home
last modified time | relevance | path

Searched +full:- +full:r (Results 1 – 25 of 171) sorted by relevance

1234567

/cmsis-dsp-latest/dsppp/tests/
Dmatrix_test.cpp95 constexpr static float abserr_cholesky = 3e-4;
96 constexpr static float relerr_cholesky = 1e-4;
112 constexpr static float abserr_cholesky = 3e-4;
113 constexpr static float relerr_cholesky = 1e-4;
120 constexpr static float abserr_inv = 4.0e-6;
121 constexpr static float relerr_inv = 5.0e-6;
130 constexpr static float abserr_cholesky = 2e-1;
131 constexpr static float relerr_cholesky = 2e-1;
133 constexpr static float abserr_householder = 2e-4;
134 constexpr static float relerr_householder = 2e-3;
[all …]
Drow_test.cpp20 template<typename T,int R,int C>
23 constexpr int NBOUT = C-1; in test()
24 std::cout << "----\r\n"; in test()
25 std::cout << R << " x " << C << "\r\n"; in test()
26 std::cout << "NBOUT = " << NBOUT << "\r\n"; in test()
29 PMat<T,R,C> a; in test()
31 PMat<T> a(R,C); in test()
34 init_array(a,R*C); in test()
59 printf("row add failed \r\n"); in test()
62 std::cout << "=====\r\n"; in test()
[all …]
Dcommon_tests.h15 #define REL_ERROR (1.0e-6)
16 #define ABS_ERROR (1.0e-6)
17 #define ERROR(A,B,AE,RE) ((fabs((A) - (B)) > (AE + RE * fabs((B)))))
19 std::cout << "Error = " << fabs(VAL-REF) << "\r\n"; \
20 std::cout << "compared to " << (AE + RE * abs((REF))) << "\r\n";
32 template<typename P,int R=arm_cmsis_dsp::DYNAMIC,int C=arm_cmsis_dsp::DYNAMIC>
33 using PMat = Matrix<P,R,C,malloc_allocator>;
41 template<typename P,int R=arm_cmsis_dsp::DYNAMIC,int C=arm_cmsis_dsp::DYNAMIC>
42 using PMat = Matrix<P,R,C,pool_allocator>;
49 template<typename P,int R=arm_cmsis_dsp::DYNAMIC,int C=arm_cmsis_dsp::DYNAMIC>
[all …]
Dcol_test.cpp20 template<typename T,int R,int C>
23 std::cout << "----\r\n"; in test()
24 std::cout << R << " x " << C << "\r\n"; in test()
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()
34 init_array(a,R*C); in test()
42 PVector<T,R> res = copy(a.col(4)); in test()
52 for(int i=0;i<R;i++) in test()
[all …]
Dfusion_test.cpp22 std::cout << "----\r\n" << "N = " << NB << "\r\n"; in test()
66 printf("add a failed \r\n"); in test()
72 printf("add b failed \r\n"); in test()
76 std::cout << "=====\r\n"; in test()
83 std::cout << "----\r\n" << "N = " << NB << "\r\n"; in test2()
118 printf("dot a failed \r\n"); in test2()
124 printf("dot b failed \r\n"); in test2()
128 std::cout << "=====\r\n"; in test2()
136 std::cout << "----\r\n" << "N = " << NB << "\r\n"; in test3()
181 printf("dot failed %d \r\n",i); in test3()
[all …]
Dcmsisdsp.cpp155 double &r, in cmsisdsp_dot_expr() argument
161 arm_dot_prod_f64(tmp1,tmp2,l,&r); in cmsisdsp_dot_expr()
171 float32_t &r, in cmsisdsp_dot_expr() argument
177 arm_dot_prod_f32(tmp1,tmp2,l,&r); in cmsisdsp_dot_expr()
188 float16_t &r, in cmsisdsp_dot_expr() argument
194 arm_dot_prod_f16(tmp1,tmp2,l,&r); in cmsisdsp_dot_expr()
241 Q<17,14> &r, in cmsisdsp_dot_expr() argument
257 reinterpret_cast<q7_t*>(tmp2),l,&r.v); in cmsisdsp_dot_expr()
267 Q<33,30> &r, in cmsisdsp_dot_expr() argument
279 reinterpret_cast<q15_t*>(tmp2),l,&r.v); in cmsisdsp_dot_expr()
[all …]
/cmsis-dsp-latest/Testing/PatternGeneration/
DDistance.py12 query=np.array([ 0.08387197, 0.68082274, 1.06756417, 0.88914541, 0.42513398, -0.3259053,
13 -0.80934885, -0.90979435, -0.64026483, 0.06923695])
15 template=np.array([ 1.00000000e+00, 7.96326711e-04, -9.99998732e-01, -2.38897811e-03,
16 9.99994927e-01])
19 r = scipy.spatial.distance.euclidean(xa,xb)
20 return(r)
23 r = scipy.spatial.distance.braycurtis(xa,xb)
24 return(r)
27 r = scipy.spatial.distance.canberra(xa,xb)
28 return(r)
[all …]
DDebugTools.py5 def readQ31Pattern(r): argument
7 with open(r, 'r') as f:
13 r=int(f.readline(),16)
14 r=struct.unpack('<i', struct.pack('<I',r))[0]
15 l.append(r)
20 def readQ15Pattern(r): argument
22 with open(r, 'r') as f:
28 r=int(f.readline(),16)
29 r=struct.unpack('<h', struct.pack('<H',r))[0]
30 l.append(r)
[all …]
DDecimate.py20 r=[]
22 r.append(element)
23 return(r)
71r=np.array([(n,blFactor*dFactor,dFactor) for (n,blFactor,dFactor) in itertools.product(*combinatio…
72 r = r.reshape(finalLength)
74 configf32.writeParam(1, r)
75 configf16.writeParam(1, r)
76 configq31.writeParam(1, r)
77 configq15.writeParam(1, r)
88r=np.array([(nFactor * iFactor,bl,iFactor) for (nFactor,bl,iFactor) in itertools.product(*combinat…
[all …]
DMatrix.py11 r=[]
13 r.append(element)
14 return(r)
52 if abs(alpha) < 1.0e-18:
58 v = v.reshape((n-k-1,1))
60 ma[k+1:,k+1:] = ma[k+1:,k+1:] - np.matmul(v , np.transpose(v)) / alpha
85 r = a - t
86 r[abs(r)<1e-10]=0.0
87 return(np.all(r == 0.0))
146 r = np.matmul(ma , mb)
[all …]
/cmsis-dsp-latest/Source/TransformFunctions/
Darm_cfft_radix2_q15.c1 /* ----------------------------------------------------------------------
4 * Description: Radix-2 Decimation in Frequency CFFT & CIFFT Fixed point processing function
9 * Target Processor: Cortex-M and Cortex-A cores
10 * -------------------------------------------------------------------- */
12 * Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
14 * SPDX-License-Identifier: Apache-2.0
20 * www.apache.org/licenses/LICENSE-2.0
56 @brief Processing function for the fixed-point CFFT/CIFFT.
58 @param[in] S points to an instance of the fixed-point CFFT/CIFFT structure
59 …t] pSrc points to the complex data buffer of size <code>2*fftLen</code>. Processing occurs in-place
[all …]
/cmsis-dsp-latest/dsppp/Include/dsppp/
Dfusion.hpp1 // -*- C++ -*-
259 Scalar const operator[](const index_t i) const {return(this->derived()[i]);} in operator []()
264 * @param[in] r Row index
269 Scalar const operator()(const index_t r,const index_t c) const {return(this->derived()(r,c));} in operator ()()
279 Vector const vector_op(const index_t i) const {return(this->derived().vector_op(i));} in vector_op()
289 …Vector const vector_op_tail(const index_t i,const vector_length_t remaining) const {return(this->d… in vector_op_tail()
294 * @param[in] r row index
299 …Vector const matrix_op(const index_t r,const index_t c) const {return(this->derived().matrix_op(r,… in matrix_op()
304 * @param[in] r row index
310 …atrix_op_tail(const index_t r,const index_t c,const vector_length_t remaining) const {return(this- in matrix_op_tail()
[all …]
Dmatrix.hpp1 // -*- C++ -*-
29 template<typename P,int R,int C,
31 struct traits<Matrix<P,R,C,A>>
48 template<typename P,int R,int C,
50 struct traits<const Matrix<P,R,C,A>&>
68 template<typename P,int R,int C,
70 struct IsVector<Matrix<P,R,C,Allocator>>
77 template<typename P,int R,int C,
79 struct HasStaticStride<Matrix<P,R,C,Allocator>>
84 template<typename P,int R,int C,
[all …]
Dalgorithms.hpp1 // -*- C++ -*-
6 * C++ template extension to CMSIS-DSP. It is not yet part of
8 * [CMSIS-DSP github](https://github.com/ARM-software/CMSIS-DSP/tree/main/dsppp/Include)
62 template<typename P,int R,
67 inline void _diagonal(Matrix<P,R,R,A> &v, in _diagonal() argument
72 for(index_t r=0;r < rows ; r++) in _diagonal() local
74 v.row(r) = P{}; in _diagonal()
75 v(r,r) = other[r]; in _diagonal()
86 template<typename P,int R,
91 inline void _fill_diagonal(Matrix<P,R,R,A> &v, in _fill_diagonal() argument
[all …]
/cmsis-dsp-latest/PythonWrapper/examples/
Dtestdsp3.py6 x = np.array([0.9,0.5,2**-16])
8 r=dsp.arm_vlog_q15(f.toQ15(x)) variable
9 print(f.Q15toF32(r)*16.0)
11 r=dsp.arm_vlog_q31(f.toQ31(x)) variable
12 print(f.Q31toF32(r)*32.0)
38 err,r=dsp.arm_sqrt_f32(a) variable
39 print(err,r)
41 err,r=dsp.arm_sqrt_q31(f.toQ31(a)) variable
42 print(err,f.Q31toF32(r))
44 err,r=dsp.arm_sqrt_q15(f.toQ15(a)) variable
[all …]
Dexample_1_5.py12 def householder(x,eps=1e-16):
29 beta = -math.sqrt(alpha*alpha + xnorm2)
31 r = (alpha - beta)
32 v = x / r
33 tau = (beta - alpha) / beta
58 print(np.isclose(betaRef,betaF32,1e-6,1e-6))
59 print(np.isclose(vRef,vF32,1e-6,1e-6))
63 print(np.isclose(betaRef,betaF64,1e-6,1e-6))
64 print(np.isclose(vRef,vF64,1e-6,1e-6))
71 a = a / np.max(np.abs(a)) * 1.0e-7
[all …]
Dtestdsp.py7 r = dsp.arm_add_f32(np.array([1.,2,3]),np.array([4.,5,7])) variable
8 print(r)
10 r = dsp.arm_add_q31([1,2,3],[4,5,7]) variable
11 print(r)
13 r = dsp.arm_add_q15([1,2,3],[4,5,7]) variable
14 print(r)
16 r = dsp.arm_add_q7([-1,2,3],[4,127,7]) variable
17 print(r)
19 r = dsp.arm_scale_f32([1.,2,3],2) variable
20 print(r)
[all …]
/cmsis-dsp-latest/dsppp/
Dmain.c34 printf("\033c\r\n\r\n"); in main()
36 printf("\r\n\r\n\r\n----------------------\r\n"); in main()
37 printf(__TIME__"\r\n"); in main()
39 printf("M55\r\n"); in main()
42 printf("ARMCM4_FP\r\n"); in main()
45 printf("ARMCM0P\r\n"); in main()
49 printf("MPS3\r\n"); in main()
52 printf("VHT\r\n"); in main()
55 printf("IPSS\r\n"); in main()
Dallocator.cpp21 std::cout << comment << "\r\n"; in print_map()
31 std::cout << "ALLOC_POOL(" << v.first << "," << v.second << "); \r\n"; in print_map()
41 std::cout << "POOL(" << v.first << "); \r\n"; in print_map()
45 std::cout << "\r\n"; in print_map()
47 …d::cout << "Total static bytes: " << total_static << std::hex << " (0x" << total_static << ")\r\n"; in print_map()
50 std::cout << "\r\nDynamic allocations\r\n"; in print_map()
60 std::cout << std::dec << -v.first << " : " << v.second << "\r\n"; in print_map()
61 total_dynamic += (-v.first) * v.second; in print_map()
64 …cout << "Total dynamic bytes: " << total_dynamic << std::hex << " (0x" << total_dynamic << ")\r\n"; in print_map()
65 …" << (total_static+total_dynamic) << std::hex << " (0x" << (total_static+total_dynamic) << ")\r\n"; in print_map()
[all …]
/cmsis-dsp-latest/Testing/cmsis_build/
Dcheck.bat3 python ..\processResult.py -f ..\Output.pickle -e -r results_m0p.txt -html > m0p.html
6 python ..\processResult.py -f ..\Output.pickle -e -r results_m23.txt -html > m23.html
9 python ..\processResult.py -f ..\Output.pickle -e -r results_m3.txt -html > m3.html
12 python ..\processResult.py -f ..\Output.pickle -e -r results_m4.txt -html > m4.html
15 python ..\processResult.py -f ..\Output.pickle -e -r results_m7.txt -html > m7.html
18 python ..\processResult.py -f ..\Output.pickle -e -r results_m7_unrolled.txt -html > m7_unrolled.h…
21 python ..\processResult.py -f ..\Output.pickle -e -r results_m33.txt -html > m33.html
24 python ..\processResult.py -f ..\Output.pickle -e -r results_cs300.txt -html > cs300.html
27 python ..\processResult.py -f ..\Output.pickle -e -r results_cs300_u55.txt -html > cs300_u55.html
30 python ..\processResult.py -f ..\Output.pickle -e -r results_cs310.txt -html > cs310.html
/cmsis-dsp-latest/Include/
Darm_vec_math.h6 * Target Processor: Cortex-M and Cortex-A cores
9 * Copyright (c) 2010-2021 Arm Limited or its affiliates. All rights reserved.
11 * SPDX-License-Identifier: Apache-2.0
17 * www.apache.org/licenses/LICENSE-2.0
55 m = 0x3F800000 - (xinv.i & 0x7F800000); in vrecip_medprec_f32()
57 xinv.f = 1.41176471f - 0.47058824f * xinv.f; in vrecip_medprec_f32()
60 b = 2.0f - xinv.f * ax; in vrecip_medprec_f32()
63 b = 2.0f - xinv.f * ax; in vrecip_medprec_f32()
66 b = 2.0f - xinv.f * ax; in vrecip_medprec_f32()
89 m = 0x3F800000 - (xinv.i & 0x7F800000); in vrecip_hiprec_f32()
[all …]
Darm_vec_math_f16.h6 * Target Processor: Cortex-M and Cortex-A cores
9 * Copyright (c) 2010-2021 Arm Limited or its affiliates. All rights reserved.
11 * SPDX-License-Identifier: Apache-2.0
17 * www.apache.org/licenses/LICENSE-2.0
57 m = 0x03c00 - (xinv.i & 0x07c00); in vrecip_medprec_f16()
59 xinv.f = 1.41176471f16 - 0.47058824f16 * xinv.f; in vrecip_medprec_f16()
62 b = 2.0f16 - xinv.f * ax; in vrecip_medprec_f16()
65 b = 2.0f16 - xinv.f * ax; in vrecip_medprec_f16()
68 b = 2.0f16 - xinv.f * ax; in vrecip_medprec_f16()
91 m = 0x03c00 - (xinv.i & 0x07c00); in vrecip_hiprec_f16()
[all …]
/cmsis-dsp-latest/Testing/
DaddToDB.py52 r=c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name=?",req)
53 return(r.fetchone() != None)
119 r = conn.execute("select %s from %s where %s=?" % (key,table,keystr),(strv,))
120 result=r.fetchone()
126 r = conn.execute("select %s from %s where %s=?" % (key,table,keystr),(strv,))
127 result=r.fetchone()
136r = conn.execute("select compilerid from COMPILER where compilerkindid=? AND version=?" , (kind,v…
137 result=r.fetchone()
145r = conn.execute("select compilerid from COMPILER where compilerkindid=? AND version=? AND testdat…
146 result=r.fetchone()
[all …]
DaddToRegDB.py54 r=c.execute("SELECT name FROM sqlite_master WHERE type='table' AND name=?",req)
55 return(r.fetchone() != None)
125 r = conn.execute("select %s from %s where %s=?" % (key,table,keystr),(strv,))
126 result=r.fetchone()
132 r = conn.execute("select %s from %s where %s=?" % (key,table,keystr),(strv,))
133 result=r.fetchone()
142r = conn.execute("select compilerid from COMPILER where compilerkindid=? AND version=?" , (kind,v…
143 result=r.fetchone()
151r = conn.execute("select compilerid from COMPILER where compilerkindid=? AND version=? AND testdat…
152 result=r.fetchone()
[all …]
/cmsis-dsp-latest/Include/dsp/
Dnone.h8 * Copyright (c) 2010-2020 Arm Limited or its affiliates. All rights reserved.
10 * SPDX-License-Identifier: Apache-2.0
16 * www.apache.org/licenses/LICENSE-2.0
28 CMSIS-DSP to build on a core (M0 for instance) or a host where
55 to CMSIS-DSP and only to allow the use of this library from other
58 MSVC is not going to be used to cross-compile to ARM. So, having a MSVC
82 const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U); in __SSAT()
83 const int32_t min = -1 - max ; in __SSAT()
100 const uint32_t max = ((1U << sat) - 1U); in __USAT()
127 return (op1 >> op2) | (op1 << (32U - op2)); in __ROR()
[all …]

1234567