1 #include "StatsQ15.h" 2 #include <stdio.h> 3 #include "Error.h" 4 #include "Test.h" 5 6 7 test_max_q15()8 void StatsQ15::test_max_q15() 9 { 10 11 q15_t result; 12 uint32_t indexval; 13 14 arm_max_q15(inap, 15 this->nb, 16 &result, 17 &indexval); 18 19 } 20 test_absmax_q15()21 void StatsQ15::test_absmax_q15() 22 { 23 24 q15_t result; 25 uint32_t indexval; 26 27 arm_absmax_q15(inap, 28 this->nb, 29 &result, 30 &indexval); 31 32 } 33 test_min_q15()34 void StatsQ15::test_min_q15() 35 { 36 37 q15_t result; 38 uint32_t indexval; 39 40 41 arm_min_q15(inap, 42 this->nb, 43 &result, 44 &indexval); 45 46 47 48 } 49 test_absmin_q15()50 void StatsQ15::test_absmin_q15() 51 { 52 53 q15_t result; 54 uint32_t indexval; 55 56 57 arm_absmin_q15(inap, 58 this->nb, 59 &result, 60 &indexval); 61 62 63 64 } 65 test_mean_q15()66 void StatsQ15::test_mean_q15() 67 { 68 69 q15_t result; 70 71 arm_mean_q15(inap, 72 this->nb, 73 &result); 74 75 } 76 test_power_q15()77 void StatsQ15::test_power_q15() 78 { 79 80 q63_t result; 81 82 83 arm_power_q15(inap, 84 this->nb, 85 &result); 86 87 88 89 } 90 test_rms_q15()91 void StatsQ15::test_rms_q15() 92 { 93 94 q15_t result; 95 96 97 arm_rms_q15(inap, 98 this->nb, 99 &result); 100 101 102 } 103 test_std_q15()104 void StatsQ15::test_std_q15() 105 { 106 107 q15_t result; 108 109 110 arm_std_q15(inap, 111 this->nb, 112 &result); 113 114 115 } 116 test_var_q15()117 void StatsQ15::test_var_q15() 118 { 119 120 q15_t result; 121 122 123 arm_var_q15(inap, 124 this->nb, 125 &result); 126 127 128 } 129 130 131 132 133 setUp(Testing::testID_t id,std::vector<Testing::param_t> & paramsArgs,Client::PatternMgr * mgr)134 void StatsQ15::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr) 135 { 136 std::vector<Testing::param_t>::iterator it = paramsArgs.begin(); 137 this->nb = *it; 138 139 inputA.reload(StatsQ15::INPUT1_Q15_ID,mgr,this->nb); 140 141 inap=inputA.ptr(); 142 143 144 } 145 tearDown(Testing::testID_t id,Client::PatternMgr * mgr)146 void StatsQ15::tearDown(Testing::testID_t id,Client::PatternMgr *mgr) 147 { 148 (void)id; 149 150 } 151