diff options
-rw-r--r-- | main.c | 12 | ||||
-rw-r--r-- | test.png | bin | 694523 -> 694523 bytes |
2 files changed, 0 insertions, 12 deletions
@@ -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); } Binary files differ |