forked from Github_Repos/cvw
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;
|
int ans;
|
||||||
|
|
||||||
struct timeval before , after;
|
//struct timeval before , after;
|
||||||
gettimeofday(&before , NULL);
|
//gettimeofday(&before , NULL);
|
||||||
|
|
||||||
ans = sieve ();
|
ans = sieve ();
|
||||||
gettimeofday(&after , NULL);
|
//gettimeofday(&after , NULL);
|
||||||
if (ans != 1899)
|
if (ans != 1899)
|
||||||
printf ("Sieve result wrong, ans = %d, expected 1899", ans);
|
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");
|
printf("Round 2\n");
|
||||||
gettimeofday(&before , NULL);
|
//gettimeofday(&before , NULL);
|
||||||
|
|
||||||
ans = sieve ();
|
ans = sieve ();
|
||||||
gettimeofday(&after , NULL);
|
//gettimeofday(&after , NULL);
|
||||||
if (ans != 1899)
|
if (ans != 1899)
|
||||||
printf ("Sieve result wrong, ans = %d, expected 1899", ans);
|
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;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user