1 #include "UnaryQ7.h" 2 #include "Error.h" 3 4 5 /*void UnaryQ7::test_mat_scale_q7() 6 { 7 arm_mat_scale_q7(&this->in1,0x4000,1,&this->out); 8 } 9 */ test_mat_trans_q7()10 void UnaryQ7::test_mat_trans_q7() 11 { 12 arm_mat_trans_q7(&this->in1,&this->out); 13 } 14 /* 15 void UnaryQ7::test_mat_add_q7() 16 { 17 arm_mat_add_q7(&this->in1,&this->in1,&this->out); 18 } 19 20 void UnaryQ7::test_mat_sub_q7() 21 { 22 arm_mat_sub_q7(&this->in1,&this->in1,&this->out); 23 } 24 */ 25 test_mat_vec_mult_q7()26 void UnaryQ7::test_mat_vec_mult_q7() 27 { 28 arm_mat_vec_mult_q7(&this->in1, vecp, outp); 29 } 30 31 setUp(Testing::testID_t id,std::vector<Testing::param_t> & params,Client::PatternMgr * mgr)32 void UnaryQ7::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr) 33 { 34 35 36 std::vector<Testing::param_t>::iterator it = params.begin(); 37 this->nbr = *it++; 38 this->nbc = *it; 39 40 switch(id) 41 { 42 case TEST_MAT_VEC_MULT_Q7_2: 43 vec.reload(UnaryQ7::INPUTVEC1_Q7_ID,mgr,this->nbc); 44 output.create(this->nbr,UnaryQ7::OUT_Q7_ID,mgr); 45 vecp=vec.ptr(); 46 outp=output.ptr(); 47 break; 48 default: 49 output.create(this->nbr*this->nbc,UnaryQ7::OUT_Q7_ID,mgr); 50 51 this->out.numRows = this->nbr; 52 this->out.numCols = this->nbc; 53 this->out.pData = output.ptr(); 54 break; 55 } 56 57 input1.reload(UnaryQ7::INPUTA_Q7_ID,mgr,this->nbr*this->nbc); 58 59 60 this->in1.numRows = this->nbr; 61 this->in1.numCols = this->nbc; 62 this->in1.pData = input1.ptr(); 63 64 } 65 tearDown(Testing::testID_t id,Client::PatternMgr * mgr)66 void UnaryQ7::tearDown(Testing::testID_t id,Client::PatternMgr *mgr) 67 { 68 } 69