UnaryQ7.cpp 1.6 KB

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