SupportTestsF32.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  1. #include "SupportTestsF32.h"
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4. #include "Error.h"
  5. #include "Test.h"
  6. #define SNR_THRESHOLD 120
  7. #define REL_ERROR (1.0e-5)
  8. #define ABS_Q15_ERROR ((q15_t)10)
  9. #define ABS_Q31_ERROR ((q31_t)80)
  10. #define ABS_Q7_ERROR ((q7_t)10)
  11. void SupportTestsF32::test_weighted_sum_f32()
  12. {
  13. const float32_t *inp = input.ptr();
  14. const float32_t *coefsp = coefs.ptr();
  15. float32_t *refp = ref.ptr();
  16. float32_t *outp = output.ptr();
  17. *outp=arm_weighted_sum_f32(inp, coefsp,this->nbSamples);
  18. ASSERT_REL_ERROR(*outp,refp[this->offset],REL_ERROR);
  19. ASSERT_EMPTY_TAIL(output);
  20. }
  21. void SupportTestsF32::test_copy_f32()
  22. {
  23. const float32_t *inp = input.ptr();
  24. float32_t *outp = output.ptr();
  25. arm_copy_f32(inp, outp,this->nbSamples);
  26. ASSERT_EQ(input,output);
  27. ASSERT_EMPTY_TAIL(output);
  28. }
  29. void SupportTestsF32::test_fill_f32()
  30. {
  31. float32_t *outp = output.ptr();
  32. float32_t val = 1.1;
  33. int i;
  34. arm_fill_f32(val, outp,this->nbSamples);
  35. for(i=0 ; i < this->nbSamples; i++)
  36. {
  37. ASSERT_EQ(val,outp[i]);
  38. }
  39. ASSERT_EMPTY_TAIL(output);
  40. }
  41. void SupportTestsF32::test_float_to_q15()
  42. {
  43. const float32_t *inp = input.ptr();
  44. q15_t *outp = outputQ15.ptr();
  45. arm_float_to_q15(inp, outp,this->nbSamples);
  46. ASSERT_NEAR_EQ(refQ15,outputQ15,ABS_Q15_ERROR);
  47. ASSERT_EMPTY_TAIL(outputQ15);
  48. }
  49. void SupportTestsF32::test_float_to_q31()
  50. {
  51. const float32_t *inp = input.ptr();
  52. q31_t *outp = outputQ31.ptr();
  53. arm_float_to_q31(inp, outp,this->nbSamples);
  54. ASSERT_NEAR_EQ(refQ31,outputQ31,ABS_Q31_ERROR);
  55. ASSERT_EMPTY_TAIL(outputQ31);
  56. }
  57. void SupportTestsF32::test_float_to_q7()
  58. {
  59. const float32_t *inp = input.ptr();
  60. q7_t *outp = outputQ7.ptr();
  61. arm_float_to_q7(inp, outp,this->nbSamples);
  62. ASSERT_NEAR_EQ(refQ7,outputQ7,ABS_Q7_ERROR);
  63. ASSERT_EMPTY_TAIL(outputQ7);
  64. }
  65. void SupportTestsF32::test_bitonic_sort_out_f32()
  66. {
  67. float32_t *inp = input.ptr();
  68. float32_t *outp = output.ptr();
  69. arm_sort_instance_f32 S;
  70. arm_sort_init_f32(&S, ARM_SORT_BITONIC, ARM_SORT_ASCENDING);
  71. arm_sort_f32(&S,inp,outp,this->nbSamples);
  72. ASSERT_EMPTY_TAIL(output);
  73. ASSERT_EQ(output,ref);
  74. }
  75. void SupportTestsF32::test_bitonic_sort_in_f32()
  76. {
  77. float32_t *inp = input.ptr();
  78. arm_sort_instance_f32 S;
  79. arm_sort_init_f32(&S, ARM_SORT_BITONIC, ARM_SORT_ASCENDING);
  80. arm_sort_f32(&S,inp,inp,this->nbSamples);
  81. ASSERT_EMPTY_TAIL(input);
  82. ASSERT_EQ(input,ref);
  83. }
  84. void SupportTestsF32::test_bitonic_sort_const_f32()
  85. {
  86. float32_t *inp = input.ptr();
  87. float32_t *outp = output.ptr();
  88. arm_sort_instance_f32 S;
  89. arm_sort_init_f32(&S, ARM_SORT_BITONIC, ARM_SORT_ASCENDING);
  90. arm_sort_f32(&S,inp,outp,this->nbSamples);
  91. ASSERT_EMPTY_TAIL(output);
  92. ASSERT_EQ(output,ref);
  93. }
  94. void SupportTestsF32::test_bubble_sort_out_f32()
  95. {
  96. float32_t *inp = input.ptr();
  97. float32_t *outp = output.ptr();
  98. arm_sort_instance_f32 S;
  99. arm_sort_init_f32(&S, ARM_SORT_BUBBLE, ARM_SORT_ASCENDING);
  100. arm_sort_f32(&S,inp,outp,this->nbSamples);
  101. ASSERT_EMPTY_TAIL(output);
  102. ASSERT_EQ(output,ref);
  103. }
  104. void SupportTestsF32::test_bubble_sort_in_f32()
  105. {
  106. float32_t *inp = input.ptr();
  107. arm_sort_instance_f32 S;
  108. arm_sort_init_f32(&S, ARM_SORT_BUBBLE, ARM_SORT_ASCENDING);
  109. arm_sort_f32(&S,inp,inp,this->nbSamples);
  110. ASSERT_EMPTY_TAIL(input);
  111. ASSERT_EQ(input,ref);
  112. }
  113. void SupportTestsF32::test_bubble_sort_const_f32()
  114. {
  115. float32_t *inp = input.ptr();
  116. float32_t *outp = output.ptr();
  117. arm_sort_instance_f32 S;
  118. arm_sort_init_f32(&S, ARM_SORT_BUBBLE, ARM_SORT_ASCENDING);
  119. arm_sort_f32(&S,inp,outp,this->nbSamples);
  120. ASSERT_EMPTY_TAIL(output);
  121. ASSERT_EQ(output,ref);
  122. }
  123. void SupportTestsF32::test_heap_sort_out_f32()
  124. {
  125. float32_t *inp = input.ptr();
  126. float32_t *outp = output.ptr();
  127. arm_sort_instance_f32 S;
  128. arm_sort_init_f32(&S, ARM_SORT_HEAP, ARM_SORT_ASCENDING);
  129. arm_sort_f32(&S,inp,outp,this->nbSamples);
  130. ASSERT_EMPTY_TAIL(output);
  131. ASSERT_EQ(output,ref);
  132. }
  133. void SupportTestsF32::test_heap_sort_in_f32()
  134. {
  135. float32_t *inp = input.ptr();
  136. arm_sort_instance_f32 S;
  137. arm_sort_init_f32(&S, ARM_SORT_HEAP, ARM_SORT_ASCENDING);
  138. arm_sort_f32(&S,inp,inp,this->nbSamples);
  139. ASSERT_EMPTY_TAIL(input);
  140. ASSERT_EQ(input,ref);
  141. }
  142. void SupportTestsF32::test_heap_sort_const_f32()
  143. {
  144. float32_t *inp = input.ptr();
  145. float32_t *outp = output.ptr();
  146. arm_sort_instance_f32 S;
  147. arm_sort_init_f32(&S, ARM_SORT_HEAP, ARM_SORT_ASCENDING);
  148. arm_sort_f32(&S,inp,outp,this->nbSamples);
  149. ASSERT_EMPTY_TAIL(output);
  150. ASSERT_EQ(output,ref);
  151. }
  152. void SupportTestsF32::test_insertion_sort_out_f32()
  153. {
  154. float32_t *inp = input.ptr();
  155. float32_t *outp = output.ptr();
  156. arm_sort_instance_f32 S;
  157. arm_sort_init_f32(&S, ARM_SORT_INSERTION, ARM_SORT_ASCENDING);
  158. arm_sort_f32(&S,inp,outp,this->nbSamples);
  159. ASSERT_EMPTY_TAIL(output);
  160. ASSERT_EQ(output,ref);
  161. }
  162. void SupportTestsF32::test_insertion_sort_in_f32()
  163. {
  164. float32_t *inp = input.ptr();
  165. arm_sort_instance_f32 S;
  166. arm_sort_init_f32(&S, ARM_SORT_INSERTION, ARM_SORT_ASCENDING);
  167. arm_sort_f32(&S,inp,inp,this->nbSamples);
  168. ASSERT_EMPTY_TAIL(input);
  169. ASSERT_EQ(input,ref);
  170. }
  171. void SupportTestsF32::test_insertion_sort_const_f32()
  172. {
  173. float32_t *inp = input.ptr();
  174. float32_t *outp = output.ptr();
  175. arm_sort_instance_f32 S;
  176. arm_sort_init_f32(&S, ARM_SORT_INSERTION, ARM_SORT_ASCENDING);
  177. arm_sort_f32(&S,inp,outp,this->nbSamples);
  178. ASSERT_EMPTY_TAIL(output);
  179. ASSERT_EQ(output,ref);
  180. }
  181. void SupportTestsF32::test_merge_sort_out_f32()
  182. {
  183. float32_t *inp = input.ptr();
  184. float32_t *outp = output.ptr();
  185. float32_t *buf = buffer.ptr();
  186. buf = (float32_t *)malloc((this->nbSamples)*sizeof(float32_t) );
  187. arm_merge_sort_instance_f32 S;
  188. arm_merge_sort_init_f32(&S, ARM_SORT_ASCENDING, buf);
  189. arm_merge_sort_f32(&S,inp,outp,this->nbSamples);
  190. ASSERT_EMPTY_TAIL(output);
  191. ASSERT_EQ(output,ref);
  192. }
  193. void SupportTestsF32::test_merge_sort_const_f32()
  194. {
  195. float32_t *inp = input.ptr();
  196. float32_t *outp = output.ptr();
  197. float32_t *buf = buffer.ptr();
  198. buf = (float32_t *)malloc((this->nbSamples)*sizeof(float32_t) );
  199. arm_merge_sort_instance_f32 S;
  200. arm_merge_sort_init_f32(&S, ARM_SORT_ASCENDING, buf);
  201. arm_merge_sort_f32(&S,inp,outp,this->nbSamples);
  202. ASSERT_EMPTY_TAIL(output);
  203. ASSERT_EQ(output,ref);
  204. }
  205. void SupportTestsF32::test_quick_sort_out_f32()
  206. {
  207. float32_t *inp = input.ptr();
  208. float32_t *outp = output.ptr();
  209. arm_sort_instance_f32 S;
  210. arm_sort_init_f32(&S, ARM_SORT_QUICK, ARM_SORT_ASCENDING);
  211. arm_sort_f32(&S,inp,outp,this->nbSamples);
  212. ASSERT_EMPTY_TAIL(output);
  213. ASSERT_EQ(output,ref);
  214. }
  215. void SupportTestsF32::test_quick_sort_in_f32()
  216. {
  217. float32_t *inp = input.ptr();
  218. arm_sort_instance_f32 S;
  219. arm_sort_init_f32(&S, ARM_SORT_QUICK, ARM_SORT_ASCENDING);
  220. arm_sort_f32(&S,inp,inp,this->nbSamples);
  221. ASSERT_EMPTY_TAIL(input);
  222. ASSERT_EQ(input,ref);
  223. }
  224. void SupportTestsF32::test_quick_sort_const_f32()
  225. {
  226. float32_t *inp = input.ptr();
  227. float32_t *outp = output.ptr();
  228. arm_sort_instance_f32 S;
  229. arm_sort_init_f32(&S, ARM_SORT_QUICK, ARM_SORT_ASCENDING);
  230. arm_sort_f32(&S,inp,outp,this->nbSamples);
  231. ASSERT_EMPTY_TAIL(output);
  232. ASSERT_EQ(output,ref);
  233. }
  234. void SupportTestsF32::test_selection_sort_out_f32()
  235. {
  236. float32_t *inp = input.ptr();
  237. float32_t *outp = output.ptr();
  238. arm_sort_instance_f32 S;
  239. arm_sort_init_f32(&S, ARM_SORT_SELECTION, ARM_SORT_ASCENDING);
  240. arm_sort_f32(&S,inp,outp,this->nbSamples);
  241. ASSERT_EMPTY_TAIL(output);
  242. ASSERT_EQ(output,ref);
  243. }
  244. void SupportTestsF32::test_selection_sort_in_f32()
  245. {
  246. float32_t *inp = input.ptr();
  247. arm_sort_instance_f32 S;
  248. arm_sort_init_f32(&S, ARM_SORT_SELECTION, ARM_SORT_ASCENDING);
  249. arm_sort_f32(&S,inp,inp,this->nbSamples);
  250. ASSERT_EMPTY_TAIL(input);
  251. ASSERT_EQ(input,ref);
  252. }
  253. void SupportTestsF32::test_selection_sort_const_f32()
  254. {
  255. float32_t *inp = input.ptr();
  256. float32_t *outp = output.ptr();
  257. arm_sort_instance_f32 S;
  258. arm_sort_init_f32(&S, ARM_SORT_SELECTION, ARM_SORT_ASCENDING);
  259. arm_sort_f32(&S,inp,outp,this->nbSamples);
  260. ASSERT_EMPTY_TAIL(output);
  261. ASSERT_EQ(output,ref);
  262. }
  263. void SupportTestsF32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr)
  264. {
  265. (void)paramsArgs;
  266. switch(id)
  267. {
  268. case TEST_WEIGHTED_SUM_F32_1:
  269. this->nbSamples = 3;
  270. input.reload(SupportTestsF32::INPUTS_F32_ID,mgr,this->nbSamples);
  271. coefs.reload(SupportTestsF32::WEIGHTS_F32_ID,mgr,this->nbSamples);
  272. ref.reload(SupportTestsF32::REF_F32_ID,mgr);
  273. output.create(1,SupportTestsF32::OUT_F32_ID,mgr);
  274. this->offset=0;
  275. break;
  276. case TEST_WEIGHTED_SUM_F32_2:
  277. this->nbSamples = 8;
  278. input.reload(SupportTestsF32::INPUTS_F32_ID,mgr,this->nbSamples);
  279. coefs.reload(SupportTestsF32::WEIGHTS_F32_ID,mgr,this->nbSamples);
  280. ref.reload(SupportTestsF32::REF_F32_ID,mgr);
  281. output.create(1,SupportTestsF32::OUT_F32_ID,mgr);
  282. this->offset=1;
  283. break;
  284. case TEST_WEIGHTED_SUM_F32_3:
  285. this->nbSamples = 11;
  286. input.reload(SupportTestsF32::INPUTS_F32_ID,mgr,this->nbSamples);
  287. coefs.reload(SupportTestsF32::WEIGHTS_F32_ID,mgr,this->nbSamples);
  288. ref.reload(SupportTestsF32::REF_F32_ID,mgr);
  289. output.create(1,SupportTestsF32::OUT_F32_ID,mgr);
  290. this->offset=2;
  291. break;
  292. case TEST_COPY_F32_4:
  293. this->nbSamples = 3;
  294. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  295. output.create(input.nbSamples(),SupportTestsF32::OUT_F32_ID,mgr);
  296. break;
  297. case TEST_COPY_F32_5:
  298. this->nbSamples = 8;
  299. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  300. output.create(input.nbSamples(),SupportTestsF32::OUT_F32_ID,mgr);
  301. break;
  302. case TEST_COPY_F32_6:
  303. this->nbSamples = 11;
  304. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  305. output.create(input.nbSamples(),SupportTestsF32::OUT_F32_ID,mgr);
  306. break;
  307. case TEST_FILL_F32_7:
  308. this->nbSamples = 3;
  309. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  310. break;
  311. case TEST_FILL_F32_8:
  312. this->nbSamples = 8;
  313. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  314. break;
  315. case TEST_FILL_F32_9:
  316. this->nbSamples = 11;
  317. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  318. break;
  319. case TEST_FLOAT_TO_Q15_10:
  320. this->nbSamples = 7;
  321. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  322. refQ15.reload(SupportTestsF32::SAMPLES_Q15_ID,mgr,this->nbSamples);
  323. outputQ15.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  324. break;
  325. case TEST_FLOAT_TO_Q15_11:
  326. this->nbSamples = 16;
  327. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  328. refQ15.reload(SupportTestsF32::SAMPLES_Q15_ID,mgr,this->nbSamples);
  329. outputQ15.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  330. break;
  331. case TEST_FLOAT_TO_Q15_12:
  332. this->nbSamples = 17;
  333. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  334. refQ15.reload(SupportTestsF32::SAMPLES_Q15_ID,mgr,this->nbSamples);
  335. outputQ15.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  336. break;
  337. case TEST_FLOAT_TO_Q31_13:
  338. this->nbSamples = 3;
  339. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  340. refQ31.reload(SupportTestsF32::SAMPLES_Q31_ID,mgr,this->nbSamples);
  341. outputQ31.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  342. break;
  343. case TEST_FLOAT_TO_Q31_14:
  344. this->nbSamples = 8;
  345. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  346. refQ31.reload(SupportTestsF32::SAMPLES_Q31_ID,mgr,this->nbSamples);
  347. outputQ31.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  348. break;
  349. case TEST_FLOAT_TO_Q31_15:
  350. this->nbSamples = 11;
  351. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  352. refQ31.reload(SupportTestsF32::SAMPLES_Q31_ID,mgr,this->nbSamples);
  353. outputQ31.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  354. break;
  355. case TEST_FLOAT_TO_Q7_16:
  356. this->nbSamples = 15;
  357. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  358. refQ7.reload(SupportTestsF32::SAMPLES_Q7_ID,mgr,this->nbSamples);
  359. outputQ7.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  360. break;
  361. case TEST_FLOAT_TO_Q7_17:
  362. this->nbSamples = 32;
  363. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  364. refQ7.reload(SupportTestsF32::SAMPLES_Q7_ID,mgr,this->nbSamples);
  365. outputQ7.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  366. break;
  367. case TEST_FLOAT_TO_Q7_18:
  368. this->nbSamples = 33;
  369. input.reload(SupportTestsF32::SAMPLES_F32_ID,mgr,this->nbSamples);
  370. refQ7.reload(SupportTestsF32::SAMPLES_Q7_ID,mgr,this->nbSamples);
  371. outputQ7.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  372. break;
  373. case TEST_BITONIC_SORT_OUT_F32_19:
  374. this->nbSamples = 16;
  375. input.reload(SupportTestsF32::INPUT_BITONIC_SORT_16_F32_ID,mgr,this->nbSamples);
  376. ref.reload(SupportTestsF32::REF_BITONIC_SORT_16_F32_ID,mgr);
  377. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  378. break;
  379. case TEST_BITONIC_SORT_OUT_F32_20:
  380. this->nbSamples = 32;
  381. input.reload(SupportTestsF32::INPUT_BITONIC_SORT_32_F32_ID,mgr,this->nbSamples);
  382. ref.reload(SupportTestsF32::REF_BITONIC_SORT_32_F32_ID,mgr);
  383. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  384. break;
  385. case TEST_BITONIC_SORT_IN_F32_21:
  386. this->nbSamples = 32;
  387. input.reload(SupportTestsF32::INPUT_BITONIC_SORT_32_F32_ID,mgr,this->nbSamples);
  388. ref.reload(SupportTestsF32::REF_BITONIC_SORT_32_F32_ID,mgr);
  389. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  390. break;
  391. case TEST_BITONIC_SORT_CONST_F32_22:
  392. this->nbSamples = 16;
  393. input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
  394. ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
  395. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  396. break;
  397. case TEST_BUBBLE_SORT_OUT_F32_23:
  398. this->nbSamples = 11;
  399. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  400. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  401. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  402. break;
  403. case TEST_BUBBLE_SORT_IN_F32_24:
  404. this->nbSamples = 11;
  405. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  406. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  407. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  408. break;
  409. case TEST_BUBBLE_SORT_CONST_F32_25:
  410. this->nbSamples = 16;
  411. input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
  412. ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
  413. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  414. break;
  415. case TEST_HEAP_SORT_OUT_F32_26:
  416. this->nbSamples = 11;
  417. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  418. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  419. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  420. break;
  421. case TEST_HEAP_SORT_IN_F32_27:
  422. this->nbSamples = 11;
  423. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  424. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  425. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  426. break;
  427. case TEST_HEAP_SORT_CONST_F32_28:
  428. this->nbSamples = 16;
  429. input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
  430. ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
  431. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  432. break;
  433. case TEST_INSERTION_SORT_OUT_F32_29:
  434. this->nbSamples = 11;
  435. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  436. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  437. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  438. break;
  439. case TEST_INSERTION_SORT_IN_F32_30:
  440. this->nbSamples = 11;
  441. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  442. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  443. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  444. break;
  445. case TEST_INSERTION_SORT_CONST_F32_31:
  446. this->nbSamples = 16;
  447. input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
  448. ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
  449. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  450. break;
  451. case TEST_MERGE_SORT_OUT_F32_32:
  452. this->nbSamples = 11;
  453. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  454. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  455. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  456. break;
  457. case TEST_MERGE_SORT_CONST_F32_33:
  458. this->nbSamples = 16;
  459. input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
  460. ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
  461. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  462. break;
  463. case TEST_QUICK_SORT_OUT_F32_34:
  464. this->nbSamples = 11;
  465. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  466. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  467. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  468. break;
  469. case TEST_QUICK_SORT_IN_F32_35:
  470. this->nbSamples = 11;
  471. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  472. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  473. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  474. break;
  475. case TEST_QUICK_SORT_CONST_F32_36:
  476. this->nbSamples = 16;
  477. input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
  478. ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
  479. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  480. break;
  481. case TEST_SELECTION_SORT_OUT_F32_37:
  482. this->nbSamples = 11;
  483. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  484. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  485. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  486. break;
  487. case TEST_SELECTION_SORT_IN_F32_38:
  488. this->nbSamples = 11;
  489. input.reload(SupportTestsF32::INPUT_SORT_F32_ID,mgr,this->nbSamples);
  490. ref.reload(SupportTestsF32::REF_SORT_F32_ID,mgr);
  491. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  492. break;
  493. case TEST_SELECTION_SORT_CONST_F32_39:
  494. this->nbSamples = 16;
  495. input.reload(SupportTestsF32::INPUT_SORT_CONST_F32_ID,mgr,this->nbSamples);
  496. ref.reload(SupportTestsF32::REF_SORT_CONST_F32_ID,mgr);
  497. output.create(this->nbSamples,SupportTestsF32::OUT_F32_ID,mgr);
  498. break;
  499. }
  500. }
  501. void SupportTestsF32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  502. {
  503. (void)id;
  504. output.dump(mgr);
  505. }