aboutsummaryrefslogtreecommitdiff
path: root/boltzgen.py
diff options
context:
space:
mode:
Diffstat (limited to 'boltzgen.py')
-rw-r--r--boltzgen.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/boltzgen.py b/boltzgen.py
index 14aa292..04651e4 100644
--- a/boltzgen.py
+++ b/boltzgen.py
@@ -5,10 +5,15 @@ from boltzgen import *
argparser = argparse.ArgumentParser(description='Generate LBM kernels in various languages using a symbolic description.')
argparser.add_argument('language', help = 'Target language (currently either "opencl" or "cpp")')
-argparser.add_argument('layout', help = 'Memory layout ("aos" or "soa" for C++, ignored for OpenCL')
+argparser.add_argument(
+ '--layout', dest = 'layout',
+ help = 'Memory layout ("aos" or "soa" for C++, ignored for OpenCL')
args = argparser.parse_args()
+if args.language == 'cpp' and args.layout is None:
+ raise Exception('Please specify the memory layout')
+
lbm = LBM(D2Q9)
generator = Generator(
descriptor = D2Q9,