From 30f8e07f61c40fc3371445251972f36e1474b2b3 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Sat, 8 Nov 2008 18:43:41 +0100 Subject: oops in vector-to-bit conversion Signed-off-by: Henrik Rydberg --- match/test.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'match/test.c') 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 @@ #define ITS 1000000 -int main(int argc,char* argv[]) +static void test1() +{ + float A[] = { + 1013.000000, + 3030660.000000, + 3559354.000000, + 12505925.000000, + 19008450.000000, + 6946421.000000, + 6118613.000000, + 698020.000000, + 3021800.000000, + 1017.000000, + 37573.000000, + 3242018.000000, + 8152794.000000, + 1266053.000000, + 942941.000000, + 462820.000000, + }; + int index[DIM_FINGER]; + match_fingers(index, A, 4, 4); +} + +static void speed1() { // column-by-column matrix float A[DIM2_FINGER]; @@ -31,10 +55,17 @@ int main(int argc,char* argv[]) match_fingers(index, A, n1, n2); clock_t t2 = clock(); - printf("%lf matches per second\n", ITS * ((float)CLOCKS_PER_SEC / (t2 - t1))); + printf("%lf matches per second\n", + ITS * ((float)CLOCKS_PER_SEC / (t2 - t1))); for (i = 0; i < n1; i++) printf("match[%d] = %d\n", i, index[i]); +} + +int main(int argc,char* argv[]) +{ + test1(); + speed1(); return 0; } -- cgit v1.2.3