MISCF32.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. const float32_t *inp1=input1.ptr();
  7. const float32_t *inp2=input2.ptr();
  8. float32_t *outp=output.ptr();
  9. arm_conv_f32(inp1, this->nba,inp2, this->nbb, outp);
  10. }
  11. void MISCF32::test_correlate_f32()
  12. {
  13. const float32_t *inp1=input1.ptr();
  14. const float32_t *inp2=input2.ptr();
  15. float32_t *outp=output.ptr();
  16. arm_correlate_f32(inp1, this->nba,inp2, this->nbb, outp);
  17. }
  18. void MISCF32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& params,Client::PatternMgr *mgr)
  19. {
  20. std::vector<Testing::param_t>::iterator it = params.begin();
  21. this->nba = *it++;
  22. this->nbb = *it;
  23. input1.reload(MISCF32::INPUTSA1_F32_ID,mgr,this->nba);
  24. input2.reload(MISCF32::INPUTSB1_F32_ID,mgr,this->nbb);
  25. switch(id)
  26. {
  27. case TEST_CONV_F32_1:
  28. output.create(this->nba + this->nbb - 1 ,MISCF32::OUT_SAMPLES_F32_ID,mgr);
  29. break;
  30. case TEST_CORRELATE_F32_2:
  31. output.create(2*MAX(this->nba , this->nbb) - 1 ,MISCF32::OUT_SAMPLES_F32_ID,mgr);
  32. break;
  33. }
  34. }
  35. void MISCF32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  36. {
  37. }