1 #include "FastMathQ31.h" 2 #include "Error.h" 3 4 test_cos_q31()5 void FastMathQ31::test_cos_q31() 6 { 7 for(int i=0; i < this->nbSamples; i++) 8 { 9 *this->pDst++ = arm_cos_q31(*this->pSrc++); 10 } 11 } 12 test_sin_q31()13 void FastMathQ31::test_sin_q31() 14 { 15 for(int i=0; i < this->nbSamples; i++) 16 { 17 *this->pDst++ = arm_sin_q31(*this->pSrc++); 18 } 19 } 20 test_sqrt_q31()21 void FastMathQ31::test_sqrt_q31() 22 { 23 for(int i=0; i < this->nbSamples; i++) 24 { 25 arm_sqrt_q31(*this->pSrc++,this->pDst); 26 this->pDst++; 27 } 28 } 29 setUp(Testing::testID_t id,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)30 void FastMathQ31::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr) 31 { 32 33 34 std::vector<Testing::param_t>::iterator it = params.begin(); 35 this->nbSamples = *it; 36 37 samples.reload(FastMathQ31::SAMPLES_Q31_ID,mgr,this->nbSamples); 38 output.create(this->nbSamples,FastMathQ31::OUT_SAMPLES_Q31_ID,mgr); 39 40 41 this->pSrc=samples.ptr(); 42 this->pDst=output.ptr(); 43 44 } 45 tearDown(Testing::testID_t id,Client::PatternMgr * mgr)46 void FastMathQ31::tearDown(Testing::testID_t id,Client::PatternMgr *mgr) 47 { 48 } 49