BinaryQ31.cpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #include "BinaryQ31.h"
  2. #include "Error.h"
  3. void BinaryQ31::test_mat_mult_q31()
  4. {
  5. arm_mat_mult_q31(&this->in1,&this->in2,&this->out);
  6. }
  7. void BinaryQ31::test_mat_cmplx_mult_q31()
  8. {
  9. arm_mat_cmplx_mult_q31(&this->in1,&this->in2,&this->out);
  10. }
  11. void BinaryQ31::test_mat_mult_fast_q31()
  12. {
  13. arm_mat_mult_fast_q31(&this->in1,&this->in2,&this->out);
  14. }
  15. void BinaryQ31::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
  16. {
  17. std::vector<Testing::param_t>::iterator it = params.begin();
  18. this->nbr = *it++;
  19. this->nbi = *it++;
  20. this->nbc = *it;
  21. switch(id)
  22. {
  23. case BinaryQ31::TEST_MAT_CMPLX_MULT_Q31_2:
  24. input1.reload(BinaryQ31::INPUTAC_Q31_ID,mgr,2*this->nbr*this->nbi);
  25. input2.reload(BinaryQ31::INPUTBC_Q31_ID,mgr,2*this->nbi*this->nbc);
  26. output.create(2*this->nbr*this->nbc,BinaryQ31::OUT_Q31_ID,mgr);
  27. break;
  28. default:
  29. input1.reload(BinaryQ31::INPUTA_Q31_ID,mgr,this->nbr*this->nbi);
  30. input2.reload(BinaryQ31::INPUTB_Q31_ID,mgr,this->nbi*this->nbc);
  31. output.create(this->nbr*this->nbc,BinaryQ31::OUT_Q31_ID,mgr);
  32. }
  33. this->in1.numRows = this->nbr;
  34. this->in1.numCols = this->nbi;
  35. this->in1.pData = input1.ptr();
  36. this->in2.numRows = this->nbi;
  37. this->in2.numCols = this->nbc;
  38. this->in2.pData = input2.ptr();
  39. this->out.numRows = this->nbr;
  40. this->out.numCols = this->nbc;
  41. this->out.pData = output.ptr();
  42. }
  43. void BinaryQ31::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  44. {
  45. }