BinaryF32.cpp 1.6 KB

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