From 9e6c66fd16a488edbe4cb27c0e273bcb99a9436a Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 16 Jun 2019 13:59:20 +0200 Subject: Select thread layout depending on the descriptor's characteristics --- simulation.py | 9 +++++---- 1 file 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() -- cgit v1.2.3