mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	Edited sieve to work with wally. It was using the time of day to compute runspeed; however this functionality does not yet work in the wally software stack.
This commit is contained in:
		
							parent
							
								
									1c6e37120e
								
							
						
					
					
						commit
						efa8ad4e17
					
				| @ -61,26 +61,26 @@ int main () { | ||||
| 
 | ||||
|   int ans; | ||||
| 
 | ||||
|   struct timeval before , after; | ||||
|   gettimeofday(&before , NULL); | ||||
|   //struct timeval before , after;
 | ||||
|   //gettimeofday(&before , NULL);
 | ||||
|      | ||||
|   ans = sieve (); | ||||
|   gettimeofday(&after , NULL); | ||||
|   //gettimeofday(&after , NULL);
 | ||||
|   if (ans != 1899) | ||||
|     printf ("Sieve result wrong, ans = %d, expected 1899", ans); | ||||
| 
 | ||||
|   printf("Total time elapsed : %.0lf us\n" , time_diff(before , after) ); | ||||
|   //printf("Total time elapsed : %.0lf us\n" , time_diff(before , after) );
 | ||||
| 
 | ||||
| 
 | ||||
|   printf("Round 2\n"); | ||||
|   gettimeofday(&before , NULL); | ||||
|   //gettimeofday(&before , NULL);
 | ||||
|      | ||||
|   ans = sieve (); | ||||
|   gettimeofday(&after , NULL); | ||||
|   //gettimeofday(&after , NULL);
 | ||||
|   if (ans != 1899) | ||||
|     printf ("Sieve result wrong, ans = %d, expected 1899", ans); | ||||
| 
 | ||||
|   printf("Total time elapsed : %.0lf us\n" , time_diff(before , after) );  | ||||
|   //printf("Total time elapsed : %.0lf us\n" , time_diff(before , after) ); 
 | ||||
|    | ||||
|   return 0; | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user