1 #include "BinaryF32.h" 2 #include "Error.h" 3 4 test_mat_mult_f32()5 void BinaryF32::test_mat_mult_f32() 6 { 7 arm_mat_mult_f32(&this->in1,&this->in2,&this->out); 8 } 9 10 test_mat_cmplx_mult_f32()11 void BinaryF32::test_mat_cmplx_mult_f32() 12 { 13 arm_mat_cmplx_mult_f32(&this->in1,&this->in2,&this->out); 14 } 15 16 setUp(Testing::testID_t id,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)17 void BinaryF32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr) 18 { 19 20 21 std::vector<Testing::param_t>::iterator it = params.begin(); 22 this->nbr = *it++; 23 this->nbi = *it++; 24 this->nbc = *it; 25 26 switch(id) 27 { 28 case BinaryF32::TEST_MAT_CMPLX_MULT_F32_2: 29 input1.reload(BinaryF32::INPUTAC_F32_ID,mgr,2*this->nbr*this->nbi); 30 input2.reload(BinaryF32::INPUTBC_F32_ID,mgr,2*this->nbi*this->nbc); 31 output.create(2*this->nbr*this->nbc,BinaryF32::OUT_F32_ID,mgr); 32 break; 33 34 default: 35 input1.reload(BinaryF32::INPUTA_F32_ID,mgr,this->nbr*this->nbi); 36 input2.reload(BinaryF32::INPUTB_F32_ID,mgr,this->nbi*this->nbc); 37 output.create(this->nbr*this->nbc,BinaryF32::OUT_F32_ID,mgr); 38 39 } 40 41 42 43 44 this->in1.numRows = this->nbr; 45 this->in1.numCols = this->nbi; 46 this->in1.pData = input1.ptr(); 47 48 this->in2.numRows = this->nbi; 49 this->in2.numCols = this->nbc; 50 this->in2.pData = input2.ptr(); 51 52 this->out.numRows = this->nbr; 53 this->out.numCols = this->nbc; 54 this->out.pData = output.ptr(); 55 } 56 tearDown(Testing::testID_t id,Client::PatternMgr * mgr)57 void BinaryF32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr) 58 { 59 } 60