FastMathF32.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #include "FastMathF32.h"
  2. #include "Error.h"
  3. void FastMathF32::test_cos_f32()
  4. {
  5. for(int i=0; i < this->nbSamples; i++)
  6. {
  7. *this->pDst++ = arm_cos_f32(*this->pSrc++);
  8. }
  9. }
  10. void FastMathF32::test_sin_f32()
  11. {
  12. for(int i=0; i < this->nbSamples; i++)
  13. {
  14. *this->pDst++ = arm_sin_f32(*this->pSrc++);
  15. }
  16. }
  17. void FastMathF32::test_sqrt_f32()
  18. {
  19. for(int i=0; i < this->nbSamples; i++)
  20. {
  21. arm_sqrt_f32(*this->pSrc++,this->pDst);
  22. this->pDst++;
  23. }
  24. }
  25. void FastMathF32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
  26. {
  27. std::vector<Testing::param_t>::iterator it = params.begin();
  28. this->nbSamples = *it;
  29. samples.reload(FastMathF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  30. output.create(this->nbSamples,FastMathF32::OUT_SAMPLES_F32_ID,mgr);
  31. this->pSrc=samples.ptr();
  32. this->pDst=output.ptr();
  33. }
  34. void FastMathF32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  35. {
  36. }