aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-06-16 13:59:20 +0200
committerAdrian Kummerlaender2019-06-16 13:59:20 +0200
commit9e6c66fd16a488edbe4cb27c0e273bcb99a9436a (patch)
tree53f6a53d34c8e8ef1b6d1ae833030a755b5674c1
parentb64054acaa9c9710c5b4140cfdb8e32e392a5df9 (diff)
downloadsymlbm_playground-9e6c66fd16a488edbe4cb27c0e273bcb99a9436a.tar
symlbm_playground-9e6c66fd16a488edbe4cb27c0e273bcb99a9436a.tar.gz
symlbm_playground-9e6c66fd16a488edbe4cb27c0e273bcb99a9436a.tar.bz2
symlbm_playground-9e6c66fd16a488edbe4cb27c0e273bcb99a9436a.tar.lz
symlbm_playground-9e6c66fd16a488edbe4cb27c0e273bcb99a9436a.tar.xz
symlbm_playground-9e6c66fd16a488edbe4cb27c0e273bcb99a9436a.tar.zst
symlbm_playground-9e6c66fd16a488edbe4cb27c0e273bcb99a9436a.zip
Select thread layout depending on the descriptor's characteristics
-rw-r--r--simulation.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/simulation.py b/simulation.py
index ef05e4f..ba3945c 100644
--- a/simulation.py
+++ b/simulation.py
@@ -68,10 +68,11 @@ class Lattice:
self.build_kernel()
- if descriptor.d == 2:
- self.layout = (32,1)
- elif descriptor.d == 3:
- self.layout = (32,1,1)
+ self.layout = {
+ (2, 9): (32,1),
+ (3,19): (32,4,4),
+ (3,27): (32,1,1)
+ }.get((descriptor.d, descriptor.q), None)
self.program.equilibrilize(
self.queue, self.geometry.span(), self.layout, self.cl_pop_a, self.cl_pop_b).wait()