summaryrefslogtreecommitdiff
path: root/match/test.c
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2008-11-08 18:43:41 +0100
committerHenrik Rydberg <rydberg@euromail.se>2008-11-08 18:43:41 +0100
commit30f8e07f61c40fc3371445251972f36e1474b2b3 (patch)
tree96748f4ad61b60e3fe51ef448a51a056f8fe0a2c /match/test.c
parent809b43cb3bac52ad87228a458dcd3dbf11180c97 (diff)
oops in vector-to-bit conversion
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'match/test.c')
-rw-r--r--match/test.c35
1 files changed, 33 insertions, 2 deletions
diff --git a/match/test.c b/match/test.c
index 1544765..ad39370 100644
--- a/match/test.c
+++ b/match/test.c
@@ -4,7 +4,31 @@
4 4
5#define ITS 1000000 5#define ITS 1000000
6 6
7int main(int argc,char* argv[]) 7static void test1()
8{
9 float A[] = {
10 1013.000000,
11 3030660.000000,
12 3559354.000000,
13 12505925.000000,
14 19008450.000000,
15 6946421.000000,
16 6118613.000000,
17 698020.000000,
18 3021800.000000,
19 1017.000000,
20 37573.000000,
21 3242018.000000,
22 8152794.000000,
23 1266053.000000,
24 942941.000000,
25 462820.000000,
26 };
27 int index[DIM_FINGER];
28 match_fingers(index, A, 4, 4);
29}
30
31static void speed1()
8{ 32{
9 // column-by-column matrix 33 // column-by-column matrix
10 float A[DIM2_FINGER]; 34 float A[DIM2_FINGER];
@@ -31,10 +55,17 @@ int main(int argc,char* argv[])
31 match_fingers(index, A, n1, n2); 55 match_fingers(index, A, n1, n2);
32 clock_t t2 = clock(); 56 clock_t t2 = clock();
33 57
34 printf("%lf matches per second\n", ITS * ((float)CLOCKS_PER_SEC / (t2 - t1))); 58 printf("%lf matches per second\n",
59 ITS * ((float)CLOCKS_PER_SEC / (t2 - t1)));
35 60
36 for (i = 0; i < n1; i++) 61 for (i = 0; i < n1; i++)
37 printf("match[%d] = %d\n", i, index[i]); 62 printf("match[%d] = %d\n", i, index[i]);
38 63
64}
65
66int main(int argc,char* argv[])
67{
68 test1();
69 speed1();
39 return 0; 70 return 0;
40} 71}