MISCF16.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #include "MISCF16.h"
  2. #include "Error.h"
  3. #define MAX(A,B) (A) > (B) ? (A) : (B)
  4. #if 0
  5. void MISCF16::test_conv_f16()
  6. {
  7. arm_conv_f16(this->inp1, this->nba,this->inp2, this->nbb, this->outp);
  8. }
  9. #endif
  10. void MISCF16::test_correlate_f16()
  11. {
  12. arm_correlate_f16(this->inp1, this->nba,this->inp2, this->nbb, this->outp);
  13. }
  14. void MISCF16::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
  15. {
  16. std::vector<Testing::param_t>::iterator it = params.begin();
  17. this->nba = *it++;
  18. this->nbb = *it;
  19. input1.reload(MISCF16::INPUTSA1_F16_ID,mgr,this->nba);
  20. input2.reload(MISCF16::INPUTSB1_F16_ID,mgr,this->nbb);
  21. switch(id)
  22. {
  23. #if 0
  24. case TEST_CONV_F16_1:
  25. output.create(this->nba + this->nbb - 1 ,MISCF16::OUT_SAMPLES_F16_ID,mgr);
  26. break;
  27. #endif
  28. case TEST_CORRELATE_F16_2:
  29. output.create(2*MAX(this->nba , this->nbb) - 1 ,MISCF16::OUT_SAMPLES_F16_ID,mgr);
  30. break;
  31. }
  32. this->inp1=input1.ptr();
  33. this->inp2=input2.ptr();
  34. this->outp=output.ptr();
  35. }
  36. void MISCF16::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  37. {
  38. (void)id;
  39. (void)mgr;
  40. }