From 47868725567bb03d9d64cecdbd763fb8c2aaabec Mon Sep 17 00:00:00 2001 From: Julian T Date: Mon, 23 Mar 2020 13:31:04 +0100 Subject: Removed mean row time --- main.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 630d4dc..82b376c 100644 --- a/main.c +++ b/main.c @@ -165,17 +165,11 @@ void *worker_func(void *arg) { // Organize our office office_t *office = (office_t *) arg; - // Timing - double rowtime = 0; - unsigned count = 0; int seed; // Start working for (int y = office->id; y < TESTH; y += WORKERS) { // Start time - clock_t t = clock(); - count++; - for (int x = 0; x < TESTW; x++) { color_t *c = &office->image[ y * TESTW + x ]; //color_t c; @@ -183,10 +177,6 @@ void *worker_func(void *arg) { ray_trace(&cont->space, TESTW - x, TESTH - y, 2, c, &seed); } - // Time stop - t = clock() - t; - rowtime += ((double)t)/CLOCKS_PER_SEC; // in seconds - if (y % PERCENTSTEP == 0) { // Unlock the thingy pthread_mutex_lock(&percentlock); @@ -195,8 +185,6 @@ void *worker_func(void *arg) { } } - fprintf(stderr, "Mean row time %lf over %d rounds\n", rowtime / count, count); - //free(office); pthread_exit(NULL); } -- cgit v1.2.3