aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-05-06 00:00:48 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-05-06 00:00:53 +1200
commit7829acdb73ac143cbe550a7ea84beebdd71f0eda (patch)
tree76a2140b95195180157413d899351ec3688cd1a4
parent989c3e973f18e6533da414384ef0add95c692b89 (diff)
downloadfractal-gen-7829acdb73ac143cbe550a7ea84beebdd71f0eda.tar.xz
Revert to thread 0 for progress monitoring
-rw-r--r--fractal-gen.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fractal-gen.c b/fractal-gen.c
index 612e7ce..5e1e146 100644
--- a/fractal-gen.c
+++ b/fractal-gen.c
@@ -132,11 +132,10 @@ int main(int argc, char **argv)
pthread_create(&sections[i].thread, NULL, generator, &(sections[i]));
}
- s = &(sections[cores-1]);
+ s = &(sections[0]);
while((x = s->idx) < s->datasize)
{
- fprintf(stderr, "Thread %d: %.4f%%\r",
- cores-1,
+ fprintf(stderr, "Thread 0: %.4f%%\r",
100.f*(double)x/s->datasize);
sleep(1);
}