UnaryF32.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #include "UnaryF32.h"
  2. #include "Error.h"
  3. void UnaryF32::test_mat_scale_f32()
  4. {
  5. arm_mat_scale_f32(&this->in1,0.5,&this->out);
  6. }
  7. void UnaryF32::test_mat_inverse_f32()
  8. {
  9. arm_mat_inverse_f32(&this->in1,&this->out);
  10. }
  11. void UnaryF32::test_mat_trans_f32()
  12. {
  13. arm_mat_trans_f32(&this->in1,&this->out);
  14. }
  15. void UnaryF32::test_mat_add_f32()
  16. {
  17. arm_mat_add_f32(&this->in1,&this->in1,&this->out);
  18. }
  19. void UnaryF32::test_mat_sub_f32()
  20. {
  21. arm_mat_sub_f32(&this->in1,&this->in1,&this->out);
  22. }
  23. void UnaryF32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
  24. {
  25. std::vector<Testing::param_t>::iterator it = params.begin();
  26. this->nbr = *it++;
  27. this->nbc = *it;
  28. input1.reload(UnaryF32::INPUTA_F32_ID,mgr,this->nbr*this->nbc);
  29. output.create(this->nbr*this->nbc,UnaryF32::OUT_F32_ID,mgr);
  30. this->in1.numRows = this->nbr;
  31. this->in1.numCols = this->nbc;
  32. this->in1.pData = input1.ptr();
  33. this->out.numRows = this->nbr;
  34. this->out.numCols = this->nbc;
  35. this->out.pData = output.ptr();
  36. }
  37. void UnaryF32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  38. {
  39. }