StatsQ31.cpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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_absmax_q31()
  15. {
  16. q31_t result;
  17. uint32_t indexval;
  18. arm_absmax_q31(inap,
  19. this->nb,
  20. &result,
  21. &indexval);
  22. }
  23. void StatsQ31::test_min_q31()
  24. {
  25. q31_t result;
  26. uint32_t indexval;
  27. arm_min_q31(inap,
  28. this->nb,
  29. &result,
  30. &indexval);
  31. }
  32. void StatsQ31::test_absmin_q31()
  33. {
  34. q31_t result;
  35. uint32_t indexval;
  36. arm_absmin_q31(inap,
  37. this->nb,
  38. &result,
  39. &indexval);
  40. }
  41. void StatsQ31::test_mean_q31()
  42. {
  43. q31_t result;
  44. arm_mean_q31(inap,
  45. this->nb,
  46. &result);
  47. }
  48. void StatsQ31::test_power_q31()
  49. {
  50. q63_t result;
  51. arm_power_q31(inap,
  52. this->nb,
  53. &result);
  54. }
  55. void StatsQ31::test_rms_q31()
  56. {
  57. q31_t result;
  58. arm_rms_q31(inap,
  59. this->nb,
  60. &result);
  61. }
  62. void StatsQ31::test_std_q31()
  63. {
  64. q31_t result;
  65. arm_std_q31(inap,
  66. this->nb,
  67. &result);
  68. }
  69. void StatsQ31::test_var_q31()
  70. {
  71. q31_t result;
  72. arm_var_q31(inap,
  73. this->nb,
  74. &result);
  75. }
  76. void StatsQ31::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr)
  77. {
  78. std::vector<Testing::param_t>::iterator it = paramsArgs.begin();
  79. this->nb = *it;
  80. inputA.reload(StatsQ31::INPUT1_Q31_ID,mgr,this->nb);
  81. inap=inputA.ptr();
  82. }
  83. void StatsQ31::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  84. {
  85. (void)id;
  86. }