BinaryF16.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #include "BinaryF16.h"
  2. #include "Error.h"
  3. void BinaryF16::test_mat_mult_f16()
  4. {
  5. arm_mat_mult_f16(&this->in1,&this->in2,&this->out);
  6. }
  7. void BinaryF16::test_mat_cmplx_mult_f16()
  8. {
  9. arm_mat_cmplx_mult_f16(&this->in1,&this->in2,&this->out);
  10. }
  11. void BinaryF16::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 BinaryF16::TEST_MAT_CMPLX_MULT_F16_2:
  20. input1.reload(BinaryF16::INPUTAC_F16_ID,mgr,2*this->nbr*this->nbi);
  21. input2.reload(BinaryF16::INPUTBC_F16_ID,mgr,2*this->nbi*this->nbc);
  22. output.create(2*this->nbr*this->nbc,BinaryF16::OUT_F16_ID,mgr);
  23. break;
  24. default:
  25. input1.reload(BinaryF16::INPUTA_F16_ID,mgr,this->nbr*this->nbi);
  26. input2.reload(BinaryF16::INPUTB_F16_ID,mgr,this->nbi*this->nbc);
  27. output.create(this->nbr*this->nbc,BinaryF16::OUT_F16_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 BinaryF16::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  40. {
  41. (void)id;
  42. (void)mgr;
  43. }