aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-03-23 13:31:04 +0100
committerJulian T <julian@jtle.dk>2020-03-23 16:57:23 +0100
commit47868725567bb03d9d64cecdbd763fb8c2aaabec (patch)
tree8add5f5b87f491a07baaae11e823d979e5c7770c
parentb82c067167ac2b4d295d459cea6e26434f889c8d (diff)
Removed mean row time
-rw-r--r--main.c12
-rw-r--r--test.pngbin694523 -> 694523 bytes
2 files changed, 0 insertions, 12 deletions
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);
}
diff --git a/test.png b/test.png
index d378e88..d17c091 100644
--- a/test.png
+++ b/test.png
Binary files differ