diff options
author | Julian T <julian@jtle.dk> | 2020-03-23 13:31:04 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-03-23 16:57:23 +0100 |
commit | 47868725567bb03d9d64cecdbd763fb8c2aaabec (patch) | |
tree | 8add5f5b87f491a07baaae11e823d979e5c7770c | |
parent | b82c067167ac2b4d295d459cea6e26434f889c8d (diff) |
Removed mean row time
-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 |