[MN-dev] [mndiff]: r92 - trunk/noe/test.c

michael subversion at mplayerhq.hu
Tue Oct 21 16:25:48 CEST 2008


Author: michael
Date: Tue Oct 21 16:25:48 2008
New Revision: 92

Log:
Also print timings for error/erasure decoding.


Modified:
   trunk/noe/test.c

Modified: trunk/noe/test.c
==============================================================================
--- trunk/noe/test.c	(original)
+++ trunk/noe/test.c	Tue Oct 21 16:25:48 2008
@@ -217,8 +217,8 @@ STOP_TIMER}
     }
 #endif
 #endif
-    printf("\nTesting decoder");
-    for(i=1; i<2000 && i<(SIZE/2)>>decimate; i+=(SIZE == 0x10001 ? 100 : 10)){
+    printf("\nTesting error and erasure decoding\n");
+    for(i=1; i<(SIZE/2)>>decimate; i+=i){
         int n= (SIZE - 1)>>decimate;
         int k= n - i;
         int erased[i];
@@ -227,6 +227,7 @@ STOP_TIMER}
         GFF4Element code[n];
         GFF4Element parityLocator[i+2];
         int pass=5;
+        uint64_t end, start= rdtsc();
 
         parityLocator[0]= 0;
 
@@ -281,8 +282,10 @@ STOP_TIMER}
                     break;
                 }
             }
-            printf("."); fflush(stdout);
         }
+
+        end= rdtsc();
+        printf("%Ld cpu cycles for (%d, %d) code, %f bytes/cycle\n", (end-start)/5, n, k, 10*n/(float)(end-start)); fflush(stdout);
     }
     }
 



More information about the Mndiff-dev mailing list