FastMathF16.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. (void)id;
  30. std::vector<Testing::param_t>::iterator it = params.begin();
  31. this->nbSamples = *it;
  32. samples.reload(FastMathF16::SAMPLES_F16_ID,mgr,this->nbSamples);
  33. output.create(this->nbSamples,FastMathF16::OUT_SAMPLES_F16_ID,mgr);
  34. this->pSrc=samples.ptr();
  35. this->pDst=output.ptr();
  36. }
  37. void FastMathF16::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  38. {
  39. (void)id;
  40. (void)mgr;
  41. }