1 #include "SupportTestsF32.h"
2 #include <stdlib.h>
3 #include <stdio.h>
4 #include "Error.h"
5 #include "Test.h"
6
7 #define SNR_THRESHOLD 120
8 #define REL_ERROR (1.0e-5)
9 #define ABS_Q15_ERROR ((q15_t)10)
10 #define ABS_Q31_ERROR ((q31_t)80)
11 #define ABS_Q7_ERROR ((q7_t)10)
12
13
test_weighted_average_f32()14 void SupportTestsF32::test_weighted_average_f32()
15 {
16 const float32_t *inp = input.ptr();
17 const float32_t *coefsp = coefs.ptr();
18 float32_t *refp = ref.ptr();
19
20 float32_t *outp = output.ptr();
21
22
23 *outp=arm_weighted_average_f32(inp, coefsp,this->nbSamples);
24
25
26 ASSERT_REL_ERROR(*outp,refp[this->offset],REL_ERROR);
27 ASSERT_EMPTY_TAIL(output);
28
29 }
30
test_copy_f32()31 void SupportTestsF32::test_copy_f32()
32 {
33 const float32_t *inp = input.ptr();
34 float32_t *outp = output.ptr();
35
36
37 arm_copy_f32(inp, outp,this->nbSamples);
38
39
40 ASSERT_EQ(input,output);
41 ASSERT_EMPTY_TAIL(output);
42
43 }
44
test_fill_f32()45 void SupportTestsF32::test_fill_f32()
46 {
47 float32_t *outp = output.ptr();
48 float32_t val = 1.1;
49 int i;
50
51
52 arm_fill_f32(val, outp,this->nbSamples);
53
54
55 for(i=0 ; i < this->nbSamples; i++)
56 {
57 ASSERT_EQ(val,outp[i]);
58 }
59 ASSERT_EMPTY_TAIL(output);
60
61 }
62
test_float_to_q15()63 void SupportTestsF32::test_float_to_q15()
64 {
65 const float32_t *inp = input.ptr();
66 q15_t *outp = outputQ15.ptr();
67
68
69 arm_float_to_q15(inp, outp,this->nbSamples);
70
71
72 ASSERT_NEAR_EQ(refQ15,outputQ15,ABS_Q15_ERROR);
73 ASSERT_EMPTY_TAIL(outputQ15);
74
75 }
76
test_float_to_f64()77 void SupportTestsF32::test_float_to_f64()
78 {
79 const float32_t *inp = input.ptr();
80 float64_t *outp = outputF64.ptr();
81
82
83 arm_float_to_f64(inp, outp,this->nbSamples);
84
85 ASSERT_REL_ERROR(refF64,outputF64,REL_ERROR);
86 ASSERT_EMPTY_TAIL(outputF64);
87
88 }
89
test_float_to_q31()90 void SupportTestsF32::test_float_to_q31()
91 {
92 const float32_t *inp = input.ptr();
93 q31_t *outp = outputQ31.ptr();
94
95
96 arm_float_to_q31(inp, outp,this->nbSamples);
97
98
99 ASSERT_NEAR_EQ(refQ31,outputQ31,ABS_Q31_ERROR);
100 ASSERT_EMPTY_TAIL(outputQ31);
101
102 }
103
test_float_to_q7()104 void SupportTestsF32::test_float_to_q7()
105 {
106 const float32_t *inp = input.ptr();
107 q7_t *outp = outputQ7.ptr();
108
109
110 arm_float_to_q7(inp, outp,this->nbSamples);
111
112
113 ASSERT_NEAR_EQ(refQ7,outputQ7,ABS_Q7_ERROR);
114 ASSERT_EMPTY_TAIL(outputQ7);
115
116 }
117
test_bitonic_sort_out_f32()118 void SupportTestsF32::test_bitonic_sort_out_f32()
119 {
120 float32_t *inp = input.ptr();
121 float32_t *outp = output.ptr();
122 arm_sort_instance_f32 S;
123
124 arm_sort_init_f32(&S, ARM_SORT_BITONIC, ARM_SORT_ASCENDING);
125
126 arm_sort_f32(&S,inp,outp,this->nbSamples);
127
128 ASSERT_EMPTY_TAIL(output);
129
130 ASSERT_EQ(output,ref);
131
132 }
133
test_bitonic_sort_in_f32()134 void SupportTestsF32::test_bitonic_sort_in_f32()
135 {
136 float32_t *inp = input.ptr();
137 arm_sort_instance_f32 S;
138
139 arm_sort_init_f32(&S, ARM_SORT_BITONIC, ARM_SORT_ASCENDING);
140
141 arm_sort_f32(&S,inp,inp,this->nbSamples);
142
143 ASSERT_EMPTY_TAIL(input);
144
145 ASSERT_EQ(input,ref);
146
147 }
148
test_bitonic_sort_const_f32()149 void SupportTestsF32::test_bitonic_sort_const_f32()
150 {
151 float32_t *inp = input.ptr();
152 float32_t *outp = output.ptr();
153 arm_sort_instance_f32 S;
154
155 arm_sort_init_f32(&S, ARM_SORT_BITONIC, ARM_SORT_ASCENDING);
156
157 arm_sort_f32(&S,inp,outp,this->nbSamples);
158
159 ASSERT_EMPTY_TAIL(output);
160
161 ASSERT_EQ(output,ref);
162
163 }
164
test_bubble_sort_out_f32()165 void SupportTestsF32::test_bubble_sort_out_f32()
166 {
167 float32_t *inp = input.ptr();
168 float32_t *outp = output.ptr();
169 arm_sort_instance_f32 S;
170
171 arm_sort_init_f32(&S, ARM_SORT_BUBBLE, ARM_SORT_ASCENDING);
172
173 arm_sort_f32(&S,inp,outp,this->nbSamples);
174
175 ASSERT_EMPTY_TAIL(output);
176
177 ASSERT_EQ(output,ref);
178
179 }
180
test_bubble_sort_in_f32()181 void SupportTestsF32::test_bubble_sort_in_f32()
182 {
183 float32_t *inp = input.ptr();
184 arm_sort_instance_f32 S;
185
186 arm_sort_init_f32(&S, ARM_SORT_BUBBLE, ARM_SORT_ASCENDING);
187
188 arm_sort_f32(&S,inp,inp,this->nbSamples);
189
190 ASSERT_EMPTY_TAIL(input);
191
192 ASSERT_EQ(input,ref);
193
194 }
195
test_bubble_sort_const_f32()196 void SupportTestsF32::test_bubble_sort_const_f32()
197 {
198 float32_t *inp = input.ptr();
199 float32_t *outp = output.ptr();
200 arm_sort_instance_f32 S;
201
202 arm_sort_init_f32(&S, ARM_SORT_BUBBLE, ARM_SORT_ASCENDING);
203
204 arm_sort_f32(&S,inp,outp,this->nbSamples);
205
206 ASSERT_EMPTY_TAIL(output);
207
208 ASSERT_EQ(output,ref);
209
210 }
211
test_heap_sort_out_f32()212 void SupportTestsF32::test_heap_sort_out_f32()
213 {
214 float32_t *inp = input.ptr();
215 float32_t *outp = output.ptr();
216 arm_sort_instance_f32 S;
217
218 arm_sort_init_f32(&S, ARM_SORT_HEAP, ARM_SORT_ASCENDING);
219
220 arm_sort_f32(&S,inp,outp,this->nbSamples);
221
222 ASSERT_EMPTY_TAIL(output);
223
224 ASSERT_EQ(output,ref);
225
226 }
227
test_heap_sort_in_f32()228 void SupportTestsF32::test_heap_sort_in_f32()
229 {
230 float32_t *inp = input.ptr();
231 arm_sort_instance_f32 S;
232
233 arm_sort_init_f32(&S, ARM_SORT_HEAP, ARM_SORT_ASCENDING);
234
235 arm_sort_f32(&S,inp,inp,this->nbSamples);
236
237 ASSERT_EMPTY_TAIL(input);
238
239 ASSERT_EQ(input,ref);
240 }
241
test_heap_sort_const_f32()242 void SupportTestsF32::test_heap_sort_const_f32()
243 {
244 float32_t *inp = input.ptr();
245 float32_t *outp = output.ptr();
246 arm_sort_instance_f32 S;
247
248 arm_sort_init_f32(&S, ARM_SORT_HEAP, ARM_SORT_ASCENDING);
249
250 arm_sort_f32(&S,inp,outp,this->nbSamples);
251
252 ASSERT_EMPTY_TAIL(output);
253
254 ASSERT_EQ(output,ref);
255
256 }
257
test_insertion_sort_out_f32()258 void SupportTestsF32::test_insertion_sort_out_f32()
259 {
260 float32_t *inp = input.ptr();
261 float32_t *outp = output.ptr();
262 arm_sort_instance_f32 S;
263
264 arm_sort_init_f32(&S, ARM_SORT_INSERTION, ARM_SORT_ASCENDING);
265
266 arm_sort_f32(&S,inp,outp,this->nbSamples);
267
268 ASSERT_EMPTY_TAIL(output);
269
270 ASSERT_EQ(output,ref);
271
272 }
273
test_insertion_sort_in_f32()274 void SupportTestsF32::test_insertion_sort_in_f32()
275 {
276 float32_t *inp = input.ptr();
277 arm_sort_instance_f32 S;
278
279 arm_sort_init_f32(&S, ARM_SORT_INSERTION, ARM_SORT_ASCENDING);
280
281 arm_sort_f32(&S,inp,inp,this->nbSamples);
282
283 ASSERT_EMPTY_TAIL(input);
284
285 ASSERT_EQ(input,ref);
286
287 }
288
test_insertion_sort_const_f32()289 void SupportTestsF32::test_insertion_sort_const_f32()
290 {
291 float32_t *inp = input.ptr();
292 float32_t *outp = output.ptr();
293 arm_sort_instance_f32 S;
294
295 arm_sort_init_f32(&S, ARM_SORT_INSERTION, ARM_SORT_ASCENDING);
296
297 arm_sort_f32(&S,inp,outp,this->nbSamples);
298
299 ASSERT_EMPTY_TAIL(output);
300
301 ASSERT_EQ(output,ref);
302
303 }
304
test_merge_sort_out_f32()305 void SupportTestsF32::test_merge_sort_out_f32()
306 {
307 float32_t *inp = input.ptr();
308 float32_t *outp = output.ptr();
309 float32_t *buf = buffer.ptr();
310 buf = (float32_t *)malloc((this->nbSamples)*sizeof(float32_t) );
311 arm_merge_sort_instance_f32 S;
312
313 arm_merge_sort_init_f32(&S, ARM_SORT_ASCENDING, buf);
314 arm_merge_sort_f32(&S,inp,outp,this->nbSamples);
315
316 ASSERT_EMPTY_TAIL(output);
317
318 ASSERT_EQ(output,ref);
319
320 }
321
test_merge_sort_const_f32()322 void SupportTestsF32::test_merge_sort_const_f32()
323 {
324 float32_t *inp = input.ptr();
325 float32_t *outp = output.ptr();
326 float32_t *buf = buffer.ptr();
327 buf = (float32_t *)malloc((this->nbSamples)*sizeof(float32_t) );
328 arm_merge_sort_instance_f32 S;
329
330 arm_merge_sort_init_f32(&S, ARM_SORT_ASCENDING, buf);
331 arm_merge_sort_f32(&S,inp,outp,this->nbSamples);
332
333 ASSERT_EMPTY_TAIL(output);
334
335 ASSERT_EQ(output,ref);
336 }
337
test_quick_sort_out_f32()338 void SupportTestsF32::test_quick_sort_out_f32()
339 {
340 float32_t *inp = input.ptr();
341 float32_t *outp = output.ptr();
342 arm_sort_instance_f32 S;
343
344 arm_sort_init_f32(&S, ARM_SORT_QUICK, ARM_SORT_ASCENDING);
345
346 arm_sort_f32(&S,inp,outp,this->nbSamples);
347
348 ASSERT_EMPTY_TAIL(output);
349
350 ASSERT_EQ(output,ref);
351
352 }
353
test_quick_sort_in_f32()354 void SupportTestsF32::test_quick_sort_in_f32()
355 {
356 float32_t *inp = input.ptr();
357 arm_sort_instance_f32 S;
358
359 arm_sort_init_f32(&S, ARM_SORT_QUICK, ARM_SORT_ASCENDING);
360
361 arm_sort_f32(&S,inp,inp,this->nbSamples);
362
363 ASSERT_EMPTY_TAIL(input);
364
365 ASSERT_EQ(input,ref);
366
367 }
368
test_quick_sort_const_f32()369 void SupportTestsF32::test_quick_sort_const_f32()
370 {
371 float32_t *inp = input.ptr();
372 float32_t *outp = output.ptr();
373 arm_sort_instance_f32 S;
374
375 arm_sort_init_f32(&S, ARM_SORT_QUICK, ARM_SORT_ASCENDING);
376
377 arm_sort_f32(&S,inp,outp,this->nbSamples);
378
379 ASSERT_EMPTY_TAIL(output);
380
381 ASSERT_EQ(output,ref);
382
383 }
384
test_selection_sort_out_f32()385 void SupportTestsF32::test_selection_sort_out_f32()
386 {
387 float32_t *inp = input.ptr();
388 float32_t *outp = output.ptr();
389 arm_sort_instance_f32 S;
390
391 arm_sort_init_f32(&S, ARM_SORT_SELECTION, ARM_SORT_ASCENDING);
392
393 arm_sort_f32(&S,inp,outp,this->nbSamples);
394
395 ASSERT_EMPTY_TAIL(output);
396
397 ASSERT_EQ(output,ref);
398
399 }
400
test_selection_sort_in_f32()401 void SupportTestsF32::test_selection_sort_in_f32()
402 {
403 float32_t *inp = input.ptr();
404 arm_sort_instance_f32 S;
405
406 arm_sort_init_f32(&S, ARM_SORT_SELECTION, ARM_SORT_ASCENDING);
407
408 arm_sort_f32(&S,inp,inp,this->nbSamples);
409
410 ASSERT_EMPTY_TAIL(input);
411
412 ASSERT_EQ(input,ref);
413
414 }
415
test_selection_sort_const_f32()416 void SupportTestsF32::test_selection_sort_const_f32()
417 {
418 float32_t *inp = input.ptr();
419 float32_t *outp = output.ptr();
420 arm_sort_instance_f32 S;
421
422 arm_sort_init_f32(&S, ARM_SORT_SELECTION, ARM_SORT_ASCENDING);
423
424 arm_sort_f32(&S,inp,outp,this->nbSamples);
425
426 ASSERT_EMPTY_TAIL(output);
427
428 ASSERT_EQ(output,ref);
429
430 }
431
432
setUp(Testing::testID_t id,std::vector<Testing::param_t> & paramsArgs,Client::PatternMgr * mgr)433 void SupportTestsF32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr)
434 {
435
436 (void)paramsArgs;
437 switch(id)
438 {
439 case TEST_WEIGHTED_AVERAGE_F32_1:
440 this->nbSamples = 3;
441 input.reload(SupportTestsF32::INPUTS_F32_ID,mgr,this->nbSamples);
442 coefs.reload(SupportTestsF32::WEIGHTS_F32_ID,mgr,this->nbSamples);
443 ref.reload(SupportTestsF32::REF_F32_ID,mgr);
444
445 output.create(1,SupportTestsF32::OUT_F32_ID,mgr);
446
447 this->offset=0;
448 break;
449
450 case TEST_WEIGHTED_AVERAGE_F32_2:
451 this->nbSamples = 8;
452 input.reload(SupportTestsF32::INPUTS_F32_ID,mgr,this->nbSamples);
453 coefs.reload(SupportTestsF32::WEIGHTS_F32_ID,mgr,this->nbSamples);
454 ref.reload(SupportTestsF32::REF_F32_ID,mgr);
455
456 output.create(1,SupportTestsF32::OUT_F32_ID,mgr);
457
458 this->offset=1;
459 break;
460
461 case TEST_WEIGHTED_AVERAGE_F32_3:
462 this->nbSamples = 11;
463 input.reload(SupportTestsF32::INPUTS_F32_ID,mgr,this->nbSamples);
464 coefs.reload(SupportTestsF32::WEIGHTS_F32_ID,mgr,this->nbSamples);
465 ref.reload(SupportTestsF32::REF_F32_ID,mgr);
466
467 output.create(1,SupportTestsF32::OUT_F32_ID,mgr);
468
469 this->offset=2;
470 break;
471
472 case TEST_COPY_F32_4:
473 this->nbSamples = 3;
474 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
475
476 output.create(input.nbSamples(),SupportTestsF32::OUT_F32_ID,mgr);
477
478 break;
479
480 case TEST_COPY_F32_5:
481 this->nbSamples = 8;
482 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
483
484 output.create(input.nbSamples(),SupportTestsF32::OUT_F32_ID,mgr);
485
486 break;
487
488 case TEST_COPY_F32_6:
489 this->nbSamples = 11;
490 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
491
492 output.create(input.nbSamples(),SupportTestsF32::OUT_F32_ID,mgr);
493
494 break;
495
496 case TEST_FILL_F32_7:
497 this->nbSamples = 3;
498
499 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
500
501 break;
502
503 case TEST_FILL_F32_8:
504 this->nbSamples = 8;
505
506 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
507
508 break;
509
510 case TEST_FILL_F32_9:
511 this->nbSamples = 11;
512
513 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
514
515 break;
516
517 case TEST_FLOAT_TO_Q15_10:
518 this->nbSamples = 7;
519 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
520 refQ15.reload(SupportTestsF32::SAMPLES_Q15_ID,mgr,this->nbSamples);
521 outputQ15.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
522
523 break;
524
525 case TEST_FLOAT_TO_Q15_11:
526 this->nbSamples = 16;
527 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
528 refQ15.reload(SupportTestsF32::SAMPLES_Q15_ID,mgr,this->nbSamples);
529 outputQ15.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
530
531 break;
532
533 case TEST_FLOAT_TO_Q15_12:
534 this->nbSamples = 17;
535 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
536 refQ15.reload(SupportTestsF32::SAMPLES_Q15_ID,mgr,this->nbSamples);
537 outputQ15.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
538
539 break;
540
541 case TEST_FLOAT_TO_Q31_13:
542 this->nbSamples = 3;
543 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
544 refQ31.reload(SupportTestsF32::SAMPLES_Q31_ID,mgr,this->nbSamples);
545 outputQ31.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
546
547 break;
548
549 case TEST_FLOAT_TO_Q31_14:
550 this->nbSamples = 8;
551 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
552 refQ31.reload(SupportTestsF32::SAMPLES_Q31_ID,mgr,this->nbSamples);
553 outputQ31.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
554
555 break;
556
557 case TEST_FLOAT_TO_Q31_15:
558 this->nbSamples = 11;
559 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
560 refQ31.reload(SupportTestsF32::SAMPLES_Q31_ID,mgr,this->nbSamples);
561 outputQ31.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
562
563 break;
564
565 case TEST_FLOAT_TO_Q7_16:
566 this->nbSamples = 15;
567 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
568 refQ7.reload(SupportTestsF32::SAMPLES_Q7_ID,mgr,this->nbSamples);
569 outputQ7.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
570
571 break;
572
573 case TEST_FLOAT_TO_Q7_17:
574 this->nbSamples = 32;
575 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
576 refQ7.reload(SupportTestsF32::SAMPLES_Q7_ID,mgr,this->nbSamples);
577 outputQ7.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
578
579 break;
580
581 case TEST_FLOAT_TO_Q7_18:
582 this->nbSamples = 33;
583 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
584 refQ7.reload(SupportTestsF32::SAMPLES_Q7_ID,mgr,this->nbSamples);
585 outputQ7.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
586
587 break;
588
589 case TEST_BITONIC_SORT_OUT_F32_19:
590 this->nbSamples = 16;
591 input.reload(SupportTestsF32::INPUT_BITONIC_SORT_16_F32_ID,mgr,this->nbSamples);
592 ref.reload(SupportTestsF32::REF_BITONIC_SORT_16_F32_ID,mgr);
593 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
594 break;
595
596 case TEST_BITONIC_SORT_OUT_F32_20:
597 this->nbSamples = 32;
598 input.reload(SupportTestsF32::INPUT_BITONIC_SORT_32_F32_ID,mgr,this->nbSamples);
599 ref.reload(SupportTestsF32::REF_BITONIC_SORT_32_F32_ID,mgr);
600 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
601 break;
602
603 case TEST_BITONIC_SORT_IN_F32_21:
604 this->nbSamples = 32;
605 input.reload(SupportTestsF32::INPUT_BITONIC_SORT_32_F32_ID,mgr,this->nbSamples);
606 ref.reload(SupportTestsF32::REF_BITONIC_SORT_32_F32_ID,mgr);
607 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
608 break;
609
610 case TEST_BITONIC_SORT_CONST_F32_22:
611 this->nbSamples = 16;
612 input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
613 ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
614 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
615 break;
616
617 case TEST_BUBBLE_SORT_OUT_F32_23:
618 this->nbSamples = 11;
619 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
620 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
621 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
622 break;
623
624 case TEST_BUBBLE_SORT_IN_F32_24:
625 this->nbSamples = 11;
626 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
627 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
628 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
629 break;
630
631 case TEST_BUBBLE_SORT_CONST_F32_25:
632 this->nbSamples = 16;
633 input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
634 ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
635 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
636 break;
637
638 case TEST_HEAP_SORT_OUT_F32_26:
639 this->nbSamples = 11;
640 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
641 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
642 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
643 break;
644
645 case TEST_HEAP_SORT_IN_F32_27:
646 this->nbSamples = 11;
647 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
648 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
649 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
650 break;
651
652 case TEST_HEAP_SORT_CONST_F32_28:
653 this->nbSamples = 16;
654 input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
655 ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
656 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
657 break;
658
659 case TEST_INSERTION_SORT_OUT_F32_29:
660 this->nbSamples = 11;
661 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
662 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
663 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
664 break;
665
666 case TEST_INSERTION_SORT_IN_F32_30:
667 this->nbSamples = 11;
668 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
669 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
670 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
671 break;
672
673 case TEST_INSERTION_SORT_CONST_F32_31:
674 this->nbSamples = 16;
675 input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
676 ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
677 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
678 break;
679
680 case TEST_MERGE_SORT_OUT_F32_32:
681 this->nbSamples = 11;
682 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
683 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
684 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
685 break;
686
687 case TEST_MERGE_SORT_CONST_F32_33:
688 this->nbSamples = 16;
689 input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
690 ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
691 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
692 break;
693
694 case TEST_QUICK_SORT_OUT_F32_34:
695 this->nbSamples = 11;
696 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
697 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
698 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
699 break;
700
701 case TEST_QUICK_SORT_IN_F32_35:
702 this->nbSamples = 11;
703 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
704 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
705 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
706 break;
707
708 case TEST_QUICK_SORT_CONST_F32_36:
709 this->nbSamples = 16;
710 input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
711 ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
712 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
713 break;
714
715 case TEST_SELECTION_SORT_OUT_F32_37:
716 this->nbSamples = 11;
717 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
718 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
719 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
720 break;
721
722 case TEST_SELECTION_SORT_IN_F32_38:
723 this->nbSamples = 11;
724 input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
725 ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
726 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
727 break;
728
729 case TEST_SELECTION_SORT_CONST_F32_39:
730 this->nbSamples = 16;
731 input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
732 ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
733 output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
734 break;
735
736 case TEST_FLOAT_TO_F64_40:
737 this->nbSamples = 7;
738 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
739 refF64.reload(SupportTestsF32::SAMPLES_F64_ID,mgr,this->nbSamples);
740 outputF64.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
741
742 break;
743
744 case TEST_FLOAT_TO_F64_41:
745 this->nbSamples = 16;
746 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
747 refF64.reload(SupportTestsF32::SAMPLES_F64_ID,mgr,this->nbSamples);
748 outputF64.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
749
750 break;
751
752 case TEST_FLOAT_TO_F64_42:
753 this->nbSamples = 17;
754 input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
755 refF64.reload(SupportTestsF32::SAMPLES_F64_ID,mgr,this->nbSamples);
756 outputF64.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
757
758 break;
759
760
761
762 }
763
764 }
765
tearDown(Testing::testID_t id,Client::PatternMgr * mgr)766 void SupportTestsF32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
767 {
768 (void)id;
769 output.dump(mgr);
770 }
771