1 #include "MISCF32.h"
2 #include "Error.h"
3 
4 #define MAX(A,B) (A) > (B) ? (A) : (B)
5 
test_conv_f32()6     void MISCF32::test_conv_f32()
7     {
8        arm_conv_f32(this->inp1, this->nba,this->inp2, this->nbb, this->outp);
9     }
10 
test_correlate_f32()11     void MISCF32::test_correlate_f32()
12     {
13        arm_correlate_f32(this->inp1, this->nba,this->inp2, this->nbb, this->outp);
14     }
15 
16 
17 
setUp(Testing::testID_t id,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)18     void MISCF32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
19     {
20 
21 
22        std::vector<Testing::param_t>::iterator it = params.begin();
23        this->nba = *it++;
24        this->nbb = *it;
25 
26        input1.reload(MISCF32::INPUTSA1_F32_ID,mgr,this->nba);
27        input2.reload(MISCF32::INPUTSB1_F32_ID,mgr,this->nbb);
28 
29        switch(id)
30        {
31           case TEST_CONV_F32_1:
32              output.create(this->nba + this->nbb - 1 ,MISCF32::OUT_SAMPLES_F32_ID,mgr);
33           break;
34 
35           case TEST_CORRELATE_F32_2:
36              output.create(2*MAX(this->nba , this->nbb) - 1 ,MISCF32::OUT_SAMPLES_F32_ID,mgr);
37           break;
38        }
39 
40        this->inp1=input1.ptr();
41        this->inp2=input2.ptr();
42        this->outp=output.ptr();
43 
44     }
45 
tearDown(Testing::testID_t id,Client::PatternMgr * mgr)46     void MISCF32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
47     {
48     }
49