FastMathF16.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #include "FastMathF16.h"
  2. #include "Error.h"
  3. #if 0
  4. void FastMathF16::test_cos_f16()
  5. {
  6. for(int i=0; i < this->nbSamples; i++)
  7. {
  8. *this->pDst++ = arm_cos_f16(*this->pSrc++);
  9. }
  10. }
  11. void FastMathF16::test_sin_f16()
  12. {
  13. for(int i=0; i < this->nbSamples; i++)
  14. {
  15. *this->pDst++ = arm_sin_f16(*this->pSrc++);
  16. }
  17. }
  18. #endif
  19. void FastMathF16::test_sqrt_f16()
  20. {
  21. for(int i=0; i < this->nbSamples; i++)
  22. {
  23. arm_sqrt_f16(*this->pSrc++,this->pDst);
  24. this->pDst++;
  25. }
  26. }
  27. void FastMathF16::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
  28. {
  29. std::vector<Testing::param_t>::iterator it = params.begin();
  30. this->nbSamples = *it;
  31. samples.reload(FastMathF16::SAMPLES_F16_ID,mgr,this->nbSamples);
  32. output.create(this->nbSamples,FastMathF16::OUT_SAMPLES_F16_ID,mgr);
  33. this->pSrc=samples.ptr();
  34. this->pDst=output.ptr();
  35. }
  36. void FastMathF16::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  37. {
  38. }