MISCF32.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #include "MISCF32.h"
  2. #include "Error.h"
  3. #define MAX(A,B) (A) > (B) ? (A) : (B)
  4. void MISCF32::test_conv_f32()
  5. {
  6. arm_conv_f32(this->inp1, this->nba,this->inp2, this->nbb, this->outp);
  7. }
  8. void MISCF32::test_correlate_f32()
  9. {
  10. arm_correlate_f32(this->inp1, this->nba,this->inp2, this->nbb, this->outp);
  11. }
  12. void MISCF32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
  13. {
  14. std::vector<Testing::param_t>::iterator it = params.begin();
  15. this->nba = *it++;
  16. this->nbb = *it;
  17. input1.reload(MISCF32::INPUTSA1_F32_ID,mgr,this->nba);
  18. input2.reload(MISCF32::INPUTSB1_F32_ID,mgr,this->nbb);
  19. switch(id)
  20. {
  21. case TEST_CONV_F32_1:
  22. output.create(this->nba + this->nbb - 1 ,MISCF32::OUT_SAMPLES_F32_ID,mgr);
  23. break;
  24. case TEST_CORRELATE_F32_2:
  25. output.create(2*MAX(this->nba , this->nbb) - 1 ,MISCF32::OUT_SAMPLES_F32_ID,mgr);
  26. break;
  27. }
  28. this->inp1=input1.ptr();
  29. this->inp2=input2.ptr();
  30. this->outp=output.ptr();
  31. }
  32. void MISCF32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  33. {
  34. }