SupportTestsF64.cpp 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. #include "SupportTestsF64.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. /*
  12. void SupportTestsF64::test_weighted_sum_f64()
  13. {
  14. const float64_t *inp = input.ptr();
  15. const float64_t *coefsp = coefs.ptr();
  16. float64_t *refp = ref.ptr();
  17. float64_t *outp = output.ptr();
  18. *outp=arm_weighted_sum_f64(inp, coefsp,this->nbSamples);
  19. ASSERT_REL_ERROR(*outp,refp[this->offset],REL_ERROR);
  20. ASSERT_EMPTY_TAIL(output);
  21. }
  22. */
  23. void SupportTestsF64::test_copy_f64()
  24. {
  25. const float64_t *inp = input.ptr();
  26. float64_t *outp = output.ptr();
  27. arm_copy_f64(inp, outp,this->nbSamples);
  28. ASSERT_EQ(input,output);
  29. ASSERT_EMPTY_TAIL(output);
  30. }
  31. void SupportTestsF64::test_fill_f64()
  32. {
  33. float64_t *outp = output.ptr();
  34. float64_t val = 1.1;
  35. int i;
  36. arm_fill_f64(val, outp,this->nbSamples);
  37. for(i=0 ; i < this->nbSamples; i++)
  38. {
  39. ASSERT_EQ(val,outp[i]);
  40. }
  41. ASSERT_EMPTY_TAIL(output);
  42. }
  43. void SupportTestsF64::test_f64_to_float()
  44. {
  45. const float64_t *inp = input.ptr();
  46. float32_t *outp = outputF32.ptr();
  47. arm_f64_to_float(inp, outp,this->nbSamples);
  48. ASSERT_REL_ERROR(refF32,outputF32,REL_ERROR);
  49. ASSERT_EMPTY_TAIL(outputF32);
  50. }
  51. void SupportTestsF64::test_f64_to_q15()
  52. {
  53. const float64_t *inp = input.ptr();
  54. q15_t *outp = outputQ15.ptr();
  55. arm_f64_to_q15(inp, outp,this->nbSamples);
  56. ASSERT_NEAR_EQ(refQ15,outputQ15,ABS_Q15_ERROR);
  57. ASSERT_EMPTY_TAIL(outputQ15);
  58. }
  59. void SupportTestsF64::test_f64_to_q31()
  60. {
  61. const float64_t *inp = input.ptr();
  62. q31_t *outp = outputQ31.ptr();
  63. arm_f64_to_q31(inp, outp,this->nbSamples);
  64. ASSERT_NEAR_EQ(refQ31,outputQ31,ABS_Q31_ERROR);
  65. ASSERT_EMPTY_TAIL(outputQ31);
  66. }
  67. void SupportTestsF64::test_f64_to_q7()
  68. {
  69. const float64_t *inp = input.ptr();
  70. q7_t *outp = outputQ7.ptr();
  71. arm_f64_to_q7(inp, outp,this->nbSamples);
  72. ASSERT_NEAR_EQ(refQ7,outputQ7,ABS_Q7_ERROR);
  73. ASSERT_EMPTY_TAIL(outputQ7);
  74. }
  75. /*
  76. void SupportTestsF64::test_bitonic_sort_out_f64()
  77. {
  78. float64_t *inp = input.ptr();
  79. float64_t *outp = output.ptr();
  80. arm_sort_instance_f64 S;
  81. arm_sort_init_f64(&S, ARM_SORT_BITONIC, ARM_SORT_ASCENDING);
  82. arm_sort_f64(&S,inp,outp,this->nbSamples);
  83. ASSERT_EMPTY_TAIL(output);
  84. ASSERT_EQ(output,ref);
  85. }
  86. void SupportTestsF64::test_bitonic_sort_in_f64()
  87. {
  88. float64_t *inp = input.ptr();
  89. arm_sort_instance_f64 S;
  90. arm_sort_init_f64(&S, ARM_SORT_BITONIC, ARM_SORT_ASCENDING);
  91. arm_sort_f64(&S,inp,inp,this->nbSamples);
  92. ASSERT_EMPTY_TAIL(input);
  93. ASSERT_EQ(input,ref);
  94. }
  95. void SupportTestsF64::test_bitonic_sort_const_f64()
  96. {
  97. float64_t *inp = input.ptr();
  98. float64_t *outp = output.ptr();
  99. arm_sort_instance_f64 S;
  100. arm_sort_init_f64(&S, ARM_SORT_BITONIC, ARM_SORT_ASCENDING);
  101. arm_sort_f64(&S,inp,outp,this->nbSamples);
  102. ASSERT_EMPTY_TAIL(output);
  103. ASSERT_EQ(output,ref);
  104. }
  105. void SupportTestsF64::test_bubble_sort_out_f64()
  106. {
  107. float64_t *inp = input.ptr();
  108. float64_t *outp = output.ptr();
  109. arm_sort_instance_f64 S;
  110. arm_sort_init_f64(&S, ARM_SORT_BUBBLE, ARM_SORT_ASCENDING);
  111. arm_sort_f64(&S,inp,outp,this->nbSamples);
  112. ASSERT_EMPTY_TAIL(output);
  113. ASSERT_EQ(output,ref);
  114. }
  115. void SupportTestsF64::test_bubble_sort_in_f64()
  116. {
  117. float64_t *inp = input.ptr();
  118. arm_sort_instance_f64 S;
  119. arm_sort_init_f64(&S, ARM_SORT_BUBBLE, ARM_SORT_ASCENDING);
  120. arm_sort_f64(&S,inp,inp,this->nbSamples);
  121. ASSERT_EMPTY_TAIL(input);
  122. ASSERT_EQ(input,ref);
  123. }
  124. void SupportTestsF64::test_bubble_sort_const_f64()
  125. {
  126. float64_t *inp = input.ptr();
  127. float64_t *outp = output.ptr();
  128. arm_sort_instance_f64 S;
  129. arm_sort_init_f64(&S, ARM_SORT_BUBBLE, ARM_SORT_ASCENDING);
  130. arm_sort_f64(&S,inp,outp,this->nbSamples);
  131. ASSERT_EMPTY_TAIL(output);
  132. ASSERT_EQ(output,ref);
  133. }
  134. void SupportTestsF64::test_heap_sort_out_f64()
  135. {
  136. float64_t *inp = input.ptr();
  137. float64_t *outp = output.ptr();
  138. arm_sort_instance_f64 S;
  139. arm_sort_init_f64(&S, ARM_SORT_HEAP, ARM_SORT_ASCENDING);
  140. arm_sort_f64(&S,inp,outp,this->nbSamples);
  141. ASSERT_EMPTY_TAIL(output);
  142. ASSERT_EQ(output,ref);
  143. }
  144. void SupportTestsF64::test_heap_sort_in_f64()
  145. {
  146. float64_t *inp = input.ptr();
  147. arm_sort_instance_f64 S;
  148. arm_sort_init_f64(&S, ARM_SORT_HEAP, ARM_SORT_ASCENDING);
  149. arm_sort_f64(&S,inp,inp,this->nbSamples);
  150. ASSERT_EMPTY_TAIL(input);
  151. ASSERT_EQ(input,ref);
  152. }
  153. void SupportTestsF64::test_heap_sort_const_f64()
  154. {
  155. float64_t *inp = input.ptr();
  156. float64_t *outp = output.ptr();
  157. arm_sort_instance_f64 S;
  158. arm_sort_init_f64(&S, ARM_SORT_HEAP, ARM_SORT_ASCENDING);
  159. arm_sort_f64(&S,inp,outp,this->nbSamples);
  160. ASSERT_EMPTY_TAIL(output);
  161. ASSERT_EQ(output,ref);
  162. }
  163. void SupportTestsF64::test_insertion_sort_out_f64()
  164. {
  165. float64_t *inp = input.ptr();
  166. float64_t *outp = output.ptr();
  167. arm_sort_instance_f64 S;
  168. arm_sort_init_f64(&S, ARM_SORT_INSERTION, ARM_SORT_ASCENDING);
  169. arm_sort_f64(&S,inp,outp,this->nbSamples);
  170. ASSERT_EMPTY_TAIL(output);
  171. ASSERT_EQ(output,ref);
  172. }
  173. void SupportTestsF64::test_insertion_sort_in_f64()
  174. {
  175. float64_t *inp = input.ptr();
  176. arm_sort_instance_f64 S;
  177. arm_sort_init_f64(&S, ARM_SORT_INSERTION, ARM_SORT_ASCENDING);
  178. arm_sort_f64(&S,inp,inp,this->nbSamples);
  179. ASSERT_EMPTY_TAIL(input);
  180. ASSERT_EQ(input,ref);
  181. }
  182. void SupportTestsF64::test_insertion_sort_const_f64()
  183. {
  184. float64_t *inp = input.ptr();
  185. float64_t *outp = output.ptr();
  186. arm_sort_instance_f64 S;
  187. arm_sort_init_f64(&S, ARM_SORT_INSERTION, ARM_SORT_ASCENDING);
  188. arm_sort_f64(&S,inp,outp,this->nbSamples);
  189. ASSERT_EMPTY_TAIL(output);
  190. ASSERT_EQ(output,ref);
  191. }
  192. void SupportTestsF64::test_merge_sort_out_f64()
  193. {
  194. float64_t *inp = input.ptr();
  195. float64_t *outp = output.ptr();
  196. float64_t *buf = buffer.ptr();
  197. buf = (float64_t *)malloc((this->nbSamples)*sizeof(float64_t) );
  198. arm_merge_sort_instance_f64 S;
  199. arm_merge_sort_init_f64(&S, ARM_SORT_ASCENDING, buf);
  200. arm_merge_sort_f64(&S,inp,outp,this->nbSamples);
  201. ASSERT_EMPTY_TAIL(output);
  202. ASSERT_EQ(output,ref);
  203. }
  204. void SupportTestsF64::test_merge_sort_const_f64()
  205. {
  206. float64_t *inp = input.ptr();
  207. float64_t *outp = output.ptr();
  208. float64_t *buf = buffer.ptr();
  209. buf = (float64_t *)malloc((this->nbSamples)*sizeof(float64_t) );
  210. arm_merge_sort_instance_f64 S;
  211. arm_merge_sort_init_f64(&S, ARM_SORT_ASCENDING, buf);
  212. arm_merge_sort_f64(&S,inp,outp,this->nbSamples);
  213. ASSERT_EMPTY_TAIL(output);
  214. ASSERT_EQ(output,ref);
  215. }
  216. void SupportTestsF64::test_quick_sort_out_f64()
  217. {
  218. float64_t *inp = input.ptr();
  219. float64_t *outp = output.ptr();
  220. arm_sort_instance_f64 S;
  221. arm_sort_init_f64(&S, ARM_SORT_QUICK, ARM_SORT_ASCENDING);
  222. arm_sort_f64(&S,inp,outp,this->nbSamples);
  223. ASSERT_EMPTY_TAIL(output);
  224. ASSERT_EQ(output,ref);
  225. }
  226. void SupportTestsF64::test_quick_sort_in_f64()
  227. {
  228. float64_t *inp = input.ptr();
  229. arm_sort_instance_f64 S;
  230. arm_sort_init_f64(&S, ARM_SORT_QUICK, ARM_SORT_ASCENDING);
  231. arm_sort_f64(&S,inp,inp,this->nbSamples);
  232. ASSERT_EMPTY_TAIL(input);
  233. ASSERT_EQ(input,ref);
  234. }
  235. void SupportTestsF64::test_quick_sort_const_f64()
  236. {
  237. float64_t *inp = input.ptr();
  238. float64_t *outp = output.ptr();
  239. arm_sort_instance_f64 S;
  240. arm_sort_init_f64(&S, ARM_SORT_QUICK, ARM_SORT_ASCENDING);
  241. arm_sort_f64(&S,inp,outp,this->nbSamples);
  242. ASSERT_EMPTY_TAIL(output);
  243. ASSERT_EQ(output,ref);
  244. }
  245. void SupportTestsF64::test_selection_sort_out_f64()
  246. {
  247. float64_t *inp = input.ptr();
  248. float64_t *outp = output.ptr();
  249. arm_sort_instance_f64 S;
  250. arm_sort_init_f64(&S, ARM_SORT_SELECTION, ARM_SORT_ASCENDING);
  251. arm_sort_f64(&S,inp,outp,this->nbSamples);
  252. ASSERT_EMPTY_TAIL(output);
  253. ASSERT_EQ(output,ref);
  254. }
  255. void SupportTestsF64::test_selection_sort_in_f64()
  256. {
  257. float64_t *inp = input.ptr();
  258. arm_sort_instance_f64 S;
  259. arm_sort_init_f64(&S, ARM_SORT_SELECTION, ARM_SORT_ASCENDING);
  260. arm_sort_f64(&S,inp,inp,this->nbSamples);
  261. ASSERT_EMPTY_TAIL(input);
  262. ASSERT_EQ(input,ref);
  263. }
  264. void SupportTestsF64::test_selection_sort_const_f64()
  265. {
  266. float64_t *inp = input.ptr();
  267. float64_t *outp = output.ptr();
  268. arm_sort_instance_f64 S;
  269. arm_sort_init_f64(&S, ARM_SORT_SELECTION, ARM_SORT_ASCENDING);
  270. arm_sort_f64(&S,inp,outp,this->nbSamples);
  271. ASSERT_EMPTY_TAIL(output);
  272. ASSERT_EQ(output,ref);
  273. }
  274. */
  275. void SupportTestsF64::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr)
  276. {
  277. (void)paramsArgs;
  278. switch(id)
  279. {
  280. /*case TEST_WEIGHTED_SUM_F64_1:
  281. this->nbSamples = 2;
  282. input.reload(SupportTestsF64::INPUTS_F64_ID,mgr,this->nbSamples);
  283. coefs.reload(SupportTestsF64::WEIGHTS_F64_ID,mgr,this->nbSamples);
  284. ref.reload(SupportTestsF64::REF_F64_ID,mgr);
  285. output.create(1,SupportTestsF64::OUT_F64_ID,mgr);
  286. this->offset=0;
  287. break;
  288. case TEST_WEIGHTED_SUM_F64_2:
  289. this->nbSamples = 4;
  290. input.reload(SupportTestsF64::INPUTS_F64_ID,mgr,this->nbSamples);
  291. coefs.reload(SupportTestsF64::WEIGHTS_F64_ID,mgr,this->nbSamples);
  292. ref.reload(SupportTestsF64::REF_F64_ID,mgr);
  293. output.create(1,SupportTestsF64::OUT_F64_ID,mgr);
  294. this->offset=1;
  295. break;
  296. case TEST_WEIGHTED_SUM_F64_3:
  297. this->nbSamples = 5;
  298. input.reload(SupportTestsF64::INPUTS_F64_ID,mgr,this->nbSamples);
  299. coefs.reload(SupportTestsF64::WEIGHTS_F64_ID,mgr,this->nbSamples);
  300. ref.reload(SupportTestsF64::REF_F64_ID,mgr);
  301. output.create(1,SupportTestsF64::OUT_F64_ID,mgr);
  302. this->offset=2;
  303. break;
  304. */
  305. case TEST_COPY_F64_4:
  306. this->nbSamples = 2;
  307. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  308. output.create(input.nbSamples(),SupportTestsF64::OUT_F64_ID,mgr);
  309. break;
  310. case TEST_COPY_F64_5:
  311. this->nbSamples = 4;
  312. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  313. output.create(input.nbSamples(),SupportTestsF64::OUT_F64_ID,mgr);
  314. break;
  315. case TEST_COPY_F64_6:
  316. this->nbSamples = 5;
  317. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  318. output.create(input.nbSamples(),SupportTestsF64::OUT_F64_ID,mgr);
  319. break;
  320. case TEST_FILL_F64_7:
  321. this->nbSamples = 2;
  322. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  323. break;
  324. case TEST_FILL_F64_8:
  325. this->nbSamples = 4;
  326. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  327. break;
  328. case TEST_FILL_F64_9:
  329. this->nbSamples = 5;
  330. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  331. break;
  332. /*
  333. case TEST_BITONIC_SORT_OUT_F64_19:
  334. this->nbSamples = 16;
  335. input.reload(SupportTestsF64::INPUT_BITONIC_SORT_16_F64_ID,mgr,this->nbSamples);
  336. ref.reload(SupportTestsF64::REF_BITONIC_SORT_16_F64_ID,mgr);
  337. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  338. break;
  339. case TEST_BITONIC_SORT_OUT_F64_20:
  340. this->nbSamples = 32;
  341. input.reload(SupportTestsF64::INPUT_BITONIC_SORT_64_F64_ID,mgr,this->nbSamples);
  342. ref.reload(SupportTestsF64::REF_BITONIC_SORT_64_F64_ID,mgr);
  343. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  344. break;
  345. case TEST_BITONIC_SORT_IN_F64_21:
  346. this->nbSamples = 32;
  347. input.reload(SupportTestsF64::INPUT_BITONIC_SORT_64_F64_ID,mgr,this->nbSamples);
  348. ref.reload(SupportTestsF64::REF_BITONIC_SORT_64_F64_ID,mgr);
  349. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  350. break;
  351. case TEST_BITONIC_SORT_CONST_F64_22:
  352. this->nbSamples = 16;
  353. input.reload(SupportTestsF64::INPUT_SORT_CONST_F64_ID,mgr,this->nbSamples);
  354. ref.reload(SupportTestsF64::REF_SORT_CONST_F64_ID,mgr);
  355. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  356. break;
  357. case TEST_BUBBLE_SORT_OUT_F64_23:
  358. this->nbSamples = 11;
  359. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  360. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  361. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  362. break;
  363. case TEST_BUBBLE_SORT_IN_F64_24:
  364. this->nbSamples = 11;
  365. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  366. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  367. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  368. break;
  369. case TEST_BUBBLE_SORT_CONST_F64_25:
  370. this->nbSamples = 16;
  371. input.reload(SupportTestsF64::INPUT_SORT_CONST_F64_ID,mgr,this->nbSamples);
  372. ref.reload(SupportTestsF64::REF_SORT_CONST_F64_ID,mgr);
  373. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  374. break;
  375. case TEST_HEAP_SORT_OUT_F64_26:
  376. this->nbSamples = 11;
  377. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  378. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  379. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  380. break;
  381. case TEST_HEAP_SORT_IN_F64_27:
  382. this->nbSamples = 11;
  383. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  384. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  385. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  386. break;
  387. case TEST_HEAP_SORT_CONST_F64_28:
  388. this->nbSamples = 16;
  389. input.reload(SupportTestsF64::INPUT_SORT_CONST_F64_ID,mgr,this->nbSamples);
  390. ref.reload(SupportTestsF64::REF_SORT_CONST_F64_ID,mgr);
  391. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  392. break;
  393. case TEST_INSERTION_SORT_OUT_F64_29:
  394. this->nbSamples = 11;
  395. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  396. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  397. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  398. break;
  399. case TEST_INSERTION_SORT_IN_F64_30:
  400. this->nbSamples = 11;
  401. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  402. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  403. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  404. break;
  405. case TEST_INSERTION_SORT_CONST_F64_31:
  406. this->nbSamples = 16;
  407. input.reload(SupportTestsF64::INPUT_SORT_CONST_F64_ID,mgr,this->nbSamples);
  408. ref.reload(SupportTestsF64::REF_SORT_CONST_F64_ID,mgr);
  409. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  410. break;
  411. case TEST_MERGE_SORT_OUT_F64_32:
  412. this->nbSamples = 11;
  413. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  414. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  415. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  416. break;
  417. case TEST_MERGE_SORT_CONST_F64_33:
  418. this->nbSamples = 16;
  419. input.reload(SupportTestsF64::INPUT_SORT_CONST_F64_ID,mgr,this->nbSamples);
  420. ref.reload(SupportTestsF64::REF_SORT_CONST_F64_ID,mgr);
  421. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  422. break;
  423. case TEST_QUICK_SORT_OUT_F64_34:
  424. this->nbSamples = 11;
  425. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  426. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  427. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  428. break;
  429. case TEST_QUICK_SORT_IN_F64_35:
  430. this->nbSamples = 11;
  431. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  432. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  433. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  434. break;
  435. case TEST_QUICK_SORT_CONST_F64_36:
  436. this->nbSamples = 16;
  437. input.reload(SupportTestsF64::INPUT_SORT_CONST_F64_ID,mgr,this->nbSamples);
  438. ref.reload(SupportTestsF64::REF_SORT_CONST_F64_ID,mgr);
  439. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  440. break;
  441. case TEST_SELECTION_SORT_OUT_F64_37:
  442. this->nbSamples = 11;
  443. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  444. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  445. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  446. break;
  447. case TEST_SELECTION_SORT_IN_F64_38:
  448. this->nbSamples = 11;
  449. input.reload(SupportTestsF64::INPUT_SORT_F64_ID,mgr,this->nbSamples);
  450. ref.reload(SupportTestsF64::REF_SORT_F64_ID,mgr);
  451. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  452. break;
  453. case TEST_SELECTION_SORT_CONST_F64_39:
  454. this->nbSamples = 16;
  455. input.reload(SupportTestsF64::INPUT_SORT_CONST_F64_ID,mgr,this->nbSamples);
  456. ref.reload(SupportTestsF64::REF_SORT_CONST_F64_ID,mgr);
  457. output.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  458. break;
  459. */
  460. case TEST_F64_TO_Q15_31:
  461. this->nbSamples = 1;
  462. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  463. refQ15.reload(SupportTestsF64::SAMPLES_Q15_ID,mgr,this->nbSamples);
  464. outputQ15.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  465. break;
  466. case TEST_F64_TO_Q15_32:
  467. this->nbSamples = 4;
  468. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  469. refQ15.reload(SupportTestsF64::SAMPLES_Q15_ID,mgr,this->nbSamples);
  470. outputQ15.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  471. break;
  472. case TEST_F64_TO_Q15_33:
  473. this->nbSamples = 5;
  474. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  475. refQ15.reload(SupportTestsF64::SAMPLES_Q15_ID,mgr,this->nbSamples);
  476. outputQ15.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  477. break;
  478. case TEST_F64_TO_Q31_34:
  479. this->nbSamples = 1;
  480. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  481. refQ31.reload(SupportTestsF64::SAMPLES_Q31_ID,mgr,this->nbSamples);
  482. outputQ31.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  483. break;
  484. case TEST_F64_TO_Q31_35:
  485. this->nbSamples = 4;
  486. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  487. refQ31.reload(SupportTestsF64::SAMPLES_Q31_ID,mgr,this->nbSamples);
  488. outputQ31.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  489. break;
  490. case TEST_F64_TO_Q31_36:
  491. this->nbSamples = 6;
  492. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  493. refQ31.reload(SupportTestsF64::SAMPLES_Q31_ID,mgr,this->nbSamples);
  494. outputQ31.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  495. break;
  496. case TEST_F64_TO_Q7_37:
  497. this->nbSamples = 1;
  498. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  499. refQ7.reload(SupportTestsF64::SAMPLES_Q7_ID,mgr,this->nbSamples);
  500. outputQ7.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  501. break;
  502. case TEST_F64_TO_Q7_38:
  503. this->nbSamples = 4;
  504. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  505. refQ7.reload(SupportTestsF64::SAMPLES_Q7_ID,mgr,this->nbSamples);
  506. outputQ7.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  507. break;
  508. case TEST_F64_TO_Q7_39:
  509. this->nbSamples = 5;
  510. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  511. refQ7.reload(SupportTestsF64::SAMPLES_Q7_ID,mgr,this->nbSamples);
  512. outputQ7.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  513. break;
  514. case TEST_F64_TO_FLOAT_40:
  515. this->nbSamples = 1;
  516. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  517. refF32.reload(SupportTestsF64::SAMPLES_F32_ID,mgr,this->nbSamples);
  518. outputF32.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  519. break;
  520. case TEST_F64_TO_FLOAT_41:
  521. this->nbSamples = 4;
  522. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  523. refF32.reload(SupportTestsF64::SAMPLES_F32_ID,mgr,this->nbSamples);
  524. outputF32.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  525. break;
  526. case TEST_F64_TO_FLOAT_42:
  527. this->nbSamples = 5;
  528. input.reload(SupportTestsF64::SAMPLES_F64_ID,mgr,this->nbSamples);
  529. refF32.reload(SupportTestsF64::SAMPLES_F32_ID,mgr,this->nbSamples);
  530. outputF32.create(this->nbSamples,SupportTestsF64::OUT_F64_ID,mgr);
  531. break;
  532. }
  533. }
  534. void SupportTestsF64::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
  535. {
  536. (void)id;
  537. output.dump(mgr);
  538. }