1 #include "FastMathQ15.h"
2 #include "Error.h"
3 
4 
test_cos_q15()5     void FastMathQ15::test_cos_q15()
6     {
7        for(int i=0; i < this->nbSamples; i++)
8        {
9           *this->pDst++ = arm_cos_q15(*this->pSrc++);
10        }
11     }
12 
test_sin_q15()13     void FastMathQ15::test_sin_q15()
14     {
15        for(int i=0; i < this->nbSamples; i++)
16        {
17           *this->pDst++ = arm_sin_q15(*this->pSrc++);
18        }
19     }
20 
test_sqrt_q15()21     void FastMathQ15::test_sqrt_q15()
22     {
23        for(int i=0; i < this->nbSamples; i++)
24        {
25           arm_sqrt_q15(*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 FastMathQ15::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(FastMathQ15::SAMPLES_Q15_ID,mgr,this->nbSamples);
38        output.create(this->nbSamples,FastMathQ15::OUT_SAMPLES_Q15_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 FastMathQ15::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
47     {
48     }
49