1 #include "BinaryQ15.h" 2 #include "Error.h" 3 4 test_mat_mult_q15()5 void BinaryQ15::test_mat_mult_q15() 6 { 7 arm_mat_mult_q15(&this->in1,&this->in2,&this->out,this->pState); 8 } 9 test_mat_cmplx_mult_q15()10 void BinaryQ15::test_mat_cmplx_mult_q15() 11 { 12 arm_mat_cmplx_mult_q15(&this->in1,&this->in2,&this->out,this->pState); 13 } 14 test_mat_mult_fast_q15()15 void BinaryQ15::test_mat_mult_fast_q15() 16 { 17 arm_mat_mult_fast_q15(&this->in1,&this->in2,&this->out,this->pState); 18 } 19 20 setUp(Testing::testID_t id,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)21 void BinaryQ15::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr) 22 { 23 24 25 std::vector<Testing::param_t>::iterator it = params.begin(); 26 this->nbr = *it++; 27 this->nbi = *it++; 28 this->nbc = *it; 29 30 switch(id) 31 { 32 case BinaryQ15::TEST_MAT_CMPLX_MULT_Q15_2: 33 input1.reload(BinaryQ15::INPUTAC_Q15_ID,mgr,2*this->nbr*this->nbi); 34 input2.reload(BinaryQ15::INPUTBC_Q15_ID,mgr,2*this->nbi*this->nbc); 35 output.create(2*this->nbr*this->nbc,BinaryQ15::OUT_Q15_ID,mgr); 36 state.create(2*this->nbi*this->nbc,BinaryQ15::OUT_Q15_ID,mgr); 37 break; 38 39 default: 40 input1.reload(BinaryQ15::INPUTA_Q15_ID,mgr,this->nbr*this->nbi); 41 input2.reload(BinaryQ15::INPUTB_Q15_ID,mgr,this->nbi*this->nbc); 42 state.create(this->nbi*this->nbc,BinaryQ15::OUT_Q15_ID,mgr); 43 output.create(this->nbr*this->nbc,BinaryQ15::OUT_Q15_ID,mgr); 44 45 } 46 47 48 49 50 this->in1.numRows = this->nbr; 51 this->in1.numCols = this->nbi; 52 this->in1.pData = input1.ptr(); 53 54 this->in2.numRows = this->nbi; 55 this->in2.numCols = this->nbc; 56 this->in2.pData = input2.ptr(); 57 58 this->out.numRows = this->nbr; 59 this->out.numCols = this->nbc; 60 this->out.pData = output.ptr(); 61 62 this->pState = state.ptr(); 63 } 64 tearDown(Testing::testID_t id,Client::PatternMgr * mgr)65 void BinaryQ15::tearDown(Testing::testID_t id,Client::PatternMgr *mgr) 66 { 67 } 68