summaryrefslogtreecommitdiff
path: root/lib.h
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-08-26 00:51:17 +0100
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-08-26 00:51:17 +0100
commit026aa887f99d87932fd5316152a15c1a79f5a6e2 (patch)
tree752e4b9c2f12c1fcb983ab0e02f1d2b6abc286e2 /lib.h
parent1bc283b195fb6f7152a5b98385f019056e95d637 (diff)
downloadabelian-sandpile-026aa887f99d87932fd5316152a15c1a79f5a6e2.tar.gz
abelian-sandpile-026aa887f99d87932fd5316152a15c1a79f5a6e2.tar.bz2
abelian-sandpile-026aa887f99d87932fd5316152a15c1a79f5a6e2.zip
+further multithreading
I split the grid into 4 quadrants which are managed by their own thread. Improves speed and uses more resources correctly.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib.h b/lib.h
index 1831f5e..33423d8 100644
--- a/lib.h
+++ b/lib.h
@@ -12,9 +12,10 @@ typedef struct State
size_t dwidth;
size_t window_len;
- int multiplier;
+ double multiplier;
bool thread_alive;
+ uint64_t payload;
} state_t;
bool load_from_file(state_t *state, const char *filepath);