Sfoglia il codice sorgente

tests/microbenchs/tasks_size_overhead.c: use long instead of suseconds_t (which is not available on windows), and rename variable to avoid double declaration

Nathalie Furmento 12 anni fa
parent
commit
1829239b3f
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      tests/microbenchs/tasks_size_overhead.c

+ 5 - 5
tests/microbenchs/tasks_size_overhead.c

@@ -54,7 +54,7 @@ static void func(void *descr[] __attribute__ ((unused)), void *arg)
 {
 	struct timeval tv1, tv2;
 	unsigned n = (uintptr_t)arg;
-	suseconds_t usec = 0;
+	long usec = 0;
 	gettimeofday(&tv1, NULL);
 	do {
 		gettimeofday(&tv2, NULL);
@@ -137,12 +137,12 @@ int main(int argc, char **argv)
 	FPRINTF(stdout, "\n");
 	FPRINTF(stdout, "\"seq\"\t");
 	for (size = START; size <= STOP; size *= FACTOR) {
-		double start,end;
-		start = starpu_timing_now();
+		double dstart, dend;
+		dstart = starpu_timing_now();
 		for (i = 0; i < ntasks; i++)
 			func(NULL, (void*) (uintptr_t) size);
-		end = starpu_timing_now();
-		FPRINTF(stdout, "%.0f       \t%f\t", (end-start)/ntasks, (end-start)/1000000);
+		dend = starpu_timing_now();
+		FPRINTF(stdout, "%.0f       \t%f\t", (dend-dstart)/ntasks, (dend-dstart)/1000000);
 	}
 	FPRINTF(stdout, "\n");
 	fflush(stdout);