1 #include "StatsF16.h"
2 #include <stdio.h>
3 #include "Error.h"
4 #include "Test.h"
5 
6 
7 
test_max_f16()8     void StatsF16::test_max_f16()
9     {
10 
11         float16_t result;
12         uint32_t  indexval;
13 
14         arm_max_f16(inap,
15               this->nb,
16               &result,
17               &indexval);
18 
19     }
20 
test_absmax_f16()21     void StatsF16::test_absmax_f16()
22     {
23 
24         float16_t result;
25         uint32_t  indexval;
26 
27         arm_absmax_f16(inap,
28               this->nb,
29               &result,
30               &indexval);
31 
32     }
33 
test_max_no_idx_f16()34     void StatsF16::test_max_no_idx_f16()
35     {
36 
37         float16_t result;
38 
39 
40         arm_max_no_idx_f16(inap,
41               this->nb,
42               &result);
43 
44 
45 
46     }
47 
test_min_f16()48     void StatsF16::test_min_f16()
49     {
50 
51         float16_t result;
52         uint32_t  indexval;
53 
54 
55         arm_min_f16(inap,
56               this->nb,
57               &result,
58               &indexval);
59 
60 
61 
62     }
63 
test_absmin_f16()64     void StatsF16::test_absmin_f16()
65     {
66 
67         float16_t result;
68         uint32_t  indexval;
69 
70 
71         arm_absmin_f16(inap,
72               this->nb,
73               &result,
74               &indexval);
75 
76 
77 
78     }
79 
test_mean_f16()80     void StatsF16::test_mean_f16()
81     {
82 
83         float16_t result;
84 
85         arm_mean_f16(inap,
86               this->nb,
87               &result);
88 
89     }
90 
test_power_f16()91     void StatsF16::test_power_f16()
92     {
93 
94         float16_t result;
95 
96 
97         arm_power_f16(inap,
98               this->nb,
99               &result);
100 
101 
102 
103     }
104 
test_rms_f16()105     void StatsF16::test_rms_f16()
106     {
107 
108         float16_t result;
109 
110 
111         arm_rms_f16(inap,
112               this->nb,
113               &result);
114 
115 
116     }
117 
test_std_f16()118     void StatsF16::test_std_f16()
119     {
120 
121         float16_t result;
122 
123 
124         arm_std_f16(inap,
125               this->nb,
126               &result);
127 
128 
129     }
130 
test_var_f16()131     void StatsF16::test_var_f16()
132     {
133 
134         float16_t result;
135 
136 
137         arm_var_f16(inap,
138               this->nb,
139               &result);
140 
141 
142     }
143 
144 
145 
146 
test_entropy_f16()147     void StatsF16::test_entropy_f16()
148     {
149       (void)arm_entropy_f16(inap,this->nb);
150 
151 
152     }
153 
test_logsumexp_f16()154     void StatsF16::test_logsumexp_f16()
155     {
156 
157        (void)arm_logsumexp_f16(inap,this->nb);
158 
159     }
160 
161 
test_kullback_leibler_f16()162     void StatsF16::test_kullback_leibler_f16()
163     {
164 
165 
166       (void)arm_kullback_leibler_f16(inap,inbp,this->nb);
167 
168     }
169 
test_logsumexp_dot_prod_f16()170     void StatsF16::test_logsumexp_dot_prod_f16()
171     {
172 
173       (void)arm_logsumexp_dot_prod_f16(inap,inbp,this->nb,tmpp);
174 
175     }
176 
177 
178 
setUp(Testing::testID_t id,std::vector<Testing::param_t> & paramsArgs,Client::PatternMgr * mgr)179     void StatsF16::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr)
180     {
181         std::vector<Testing::param_t>::iterator it = paramsArgs.begin();
182         this->nb = *it;
183 
184         inputA.reload(StatsF16::INPUT1_F16_ID,mgr,this->nb);
185 
186         inap=inputA.ptr();
187 
188         switch(id)
189         {
190           case TEST_KULLBACK_LEIBLER_F16_10:
191             inputB.reload(StatsF16::INPUT2_F16_ID,mgr,this->nb);
192 
193             inbp=inputB.ptr();
194           break;
195 
196           case TEST_LOGSUMEXP_DOT_PROD_F16_11:
197             inputB.reload(StatsF16::INPUT2_F16_ID,mgr,this->nb);
198 
199             inbp=inputB.ptr();
200 
201             tmp.create(this->nb,StatsF16::TMP_F16_ID,mgr);
202 
203             tmpp = tmp.ptr();
204 
205           break;
206 
207         }
208 
209     }
210 
tearDown(Testing::testID_t id,Client::PatternMgr * mgr)211     void StatsF16::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
212     {
213       (void)id;
214       (void)mgr;
215     }
216