aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-10-24 14:43:06 +0200
committerAdrian Kummerlaender2019-10-24 14:43:06 +0200
commitb3d131b94f9417c0c4cd6733433c86ca780dde5e (patch)
treeb2c54c64a2e39f64e77decad31afc176a65b5751
parentf1c5164b327054fc540527e973ff7843d4c01996 (diff)
downloadboltzgen-b3d131b94f9417c0c4cd6733433c86ca780dde5e.tar
boltzgen-b3d131b94f9417c0c4cd6733433c86ca780dde5e.tar.gz
boltzgen-b3d131b94f9417c0c4cd6733433c86ca780dde5e.tar.bz2
boltzgen-b3d131b94f9417c0c4cd6733433c86ca780dde5e.tar.lz
boltzgen-b3d131b94f9417c0c4cd6733433c86ca780dde5e.tar.xz
boltzgen-b3d131b94f9417c0c4cd6733433c86ca780dde5e.tar.zst
boltzgen-b3d131b94f9417c0c4cd6733433c86ca780dde5e.zip
Handle missing memory layout argument
-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,