BinaryQ7.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #include "BinaryQ7.h"
  2. #include "Error.h"
  3. void BinaryQ7::test_mat_mult_q7()
  4. {
  5. arm_mat_mult_q7(&this->in1,&this->in2,&this->out,this->pState);
  6. }
  7. /*
  8. void BinaryQ7::test_mat_cmplx_mult_q7()
  9. {
  10. arm_mat_cmplx_mult_q7(&this->in1,&this->in2,&this->out,this->pState);
  11. }
  12. void BinaryQ7::test_mat_mult_fast_q7()
  13. {
  14. arm_mat_mult_fast_q7(&this->in1,&this->in2,&this->out,this->pState);
  15. }
  16. */
  17. void BinaryQ7::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
  18. {
  19. std::vector<Testing::param_t>::iterator it = params.begin();
  20. this->nbr = *it++;
  21. this->nbi = *it++;
  22. this->nbc = *it;
  23. switch(id)
  24. {
  25. /*
  26. case BinaryQ7::TEST_MAT_CMPLX_MULT_Q7_2:
  27. input1.reload(BinaryQ7::INPUTAC_Q7_ID,mgr,2*this->nbr*this->nbi);
  28. input2.reload(BinaryQ7::INPUTBC_Q7_ID,mgr,2*this->nbi*this->nbc);
  29. output.create(2*this->nbr*this->nbc,BinaryQ7::OUT_Q7_ID,mgr);
  30. state.create(2*this->nbi*this->nbc,BinaryQ7::OUT_Q7_ID,mgr);
  31. break;
  32. */
  33. default:
  34. input1.reload(BinaryQ7::INPUTA_Q7_ID,mgr,this->nbr*this->nbi);
  35. input2.reload(BinaryQ7::INPUTB_Q7_ID,mgr,this->nbi*this->nbc);
  36. state.create(this->nbi*this->nbc,BinaryQ7::OUT_Q7_ID,mgr);
  37. output.create(this->nbr*this->nbc,BinaryQ7::OUT_Q7_ID,mgr);
  38. }
  39. this->in1.numRows = this->nbr;
  40. this->in1.numCols = this->nbi;
  41. this->in1.pData = input1.ptr();
  42. this->in2.numRows = this->nbi;
  43. this->in2.numCols = this->nbc;
  44. this->in2.pData = input2.ptr();
  45. this->out.numRows = this->nbr;
  46. this->out.numCols = this->nbc;
  47. this->out.pData = output.ptr();
  48. this->pState = state.ptr();
  49. }
  50. void BinaryQ7::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  51. {
  52. }