1 #include "MISCF16.h" 2 #include "Error.h" 3 4 #define MAX(A,B) (A) > (B) ? (A) : (B) 5 6 #if 0 7 void MISCF16::test_conv_f16() 8 { 9 arm_conv_f16(this->inp1, this->nba,this->inp2, this->nbb, this->outp); 10 } 11 #endif 12 test_correlate_f16()13 void MISCF16::test_correlate_f16() 14 { 15 arm_correlate_f16(this->inp1, this->nba,this->inp2, this->nbb, this->outp); 16 } 17 18 19 setUp(Testing::testID_t id,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)20 void MISCF16::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr) 21 { 22 23 24 std::vector<Testing::param_t>::iterator it = params.begin(); 25 this->nba = *it++; 26 this->nbb = *it; 27 28 input1.reload(MISCF16::INPUTSA1_F16_ID,mgr,this->nba); 29 input2.reload(MISCF16::INPUTSB1_F16_ID,mgr,this->nbb); 30 31 switch(id) 32 { 33 #if 0 34 case TEST_CONV_F16_1: 35 output.create(this->nba + this->nbb - 1 ,MISCF16::OUT_SAMPLES_F16_ID,mgr); 36 break; 37 #endif 38 39 case TEST_CORRELATE_F16_2: 40 output.create(2*MAX(this->nba , this->nbb) - 1 ,MISCF16::OUT_SAMPLES_F16_ID,mgr); 41 break; 42 } 43 44 this->inp1=input1.ptr(); 45 this->inp2=input2.ptr(); 46 this->outp=output.ptr(); 47 48 } 49 tearDown(Testing::testID_t id,Client::PatternMgr * mgr)50 void MISCF16::tearDown(Testing::testID_t id,Client::PatternMgr *mgr) 51 { 52 (void)id; 53 (void)mgr; 54 } 55