StatsQ31.cpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #include "StatsQ31.h"
  2. #include <stdio.h>
  3. #include "Error.h"
  4. #include "Test.h"
  5. void StatsQ31::test_max_q31()
  6. {
  7. q31_t result;
  8. uint32_t indexval;
  9. arm_max_q31(inap,
  10. this->nb,
  11. &result,
  12. &indexval);
  13. }
  14. void StatsQ31::test_min_q31()
  15. {
  16. q31_t result;
  17. uint32_t indexval;
  18. arm_min_q31(inap,
  19. this->nb,
  20. &result,
  21. &indexval);
  22. }
  23. void StatsQ31::test_mean_q31()
  24. {
  25. q31_t result;
  26. arm_mean_q31(inap,
  27. this->nb,
  28. &result);
  29. }
  30. void StatsQ31::test_power_q31()
  31. {
  32. q63_t result;
  33. arm_power_q31(inap,
  34. this->nb,
  35. &result);
  36. }
  37. void StatsQ31::test_rms_q31()
  38. {
  39. q31_t result;
  40. arm_rms_q31(inap,
  41. this->nb,
  42. &result);
  43. }
  44. void StatsQ31::test_std_q31()
  45. {
  46. q31_t result;
  47. arm_std_q31(inap,
  48. this->nb,
  49. &result);
  50. }
  51. void StatsQ31::test_var_q31()
  52. {
  53. q31_t result;
  54. arm_var_q31(inap,
  55. this->nb,
  56. &result);
  57. }
  58. void StatsQ31::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr)
  59. {
  60. std::vector<Testing::param_t>::iterator it = paramsArgs.begin();
  61. this->nb = *it;
  62. inputA.reload(StatsQ31::INPUT1_Q31_ID,mgr,this->nb);
  63. inap=inputA.ptr();
  64. }
  65. void StatsQ31::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  66. {
  67. (void)id;
  68. }