1 #include "allocator.h"
2 #include <dsppp/arch.hpp>
3 #include <dsppp/fixed_point.hpp>
4 #include <dsppp/matrix.hpp>
5
6 #include "cmsis_tests.h"
7
8 extern "C" {
9 void memory_pool_stats();
10 }
11
12 #if 0
13 template<>
14 void init_array(Vector_Base<float16_t> &pDst,std::size_t nb)
15 {
16 for(std::size_t i=0;i<nb;i++)
17 {
18 pDst[i] = 0.1*i;
19 }
20 }
21 #endif
22
23 template<>
validate(const float32_t * a,const float32_t * b,std::size_t nb,float abser,float reler)24 bool validate(const float32_t* a,
25 const float32_t* b,
26 std::size_t nb,
27 float abser,
28 float reler)
29 {
30 for(std::size_t i=0;i<nb;i++)
31 {
32 if (ERROR(a[i],b[i],abser,reler) )
33 {
34 std::cout << "Error at :" << i << " ; res=" << a[i] << " ; ref=" << b[i] << "\r\n";
35 ERRVAL(a[i],b[i],abser,reler);
36 return(false);
37 }
38 }
39 return(true);
40 }
41
42
43
44
memory_pool_stats()45 void memory_pool_stats()
46 {
47 print_map("Stats");
48 }
49