aboutsummaryrefslogtreecommitdiff
path: root/boltzgen.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-10-26 15:01:39 +0200
committerAdrian Kummerlaender2019-10-26 15:01:39 +0200
commit1bf577b1c5e606ac2c0553857297ce8c0c04ccb7 (patch)
tree8ad97c3cd8549c1cee3b52a460f1b8c1e4e07cfe /boltzgen.py
parent71e0d07ec0cdf528eb5d962ce97bd6c55da52eae (diff)
downloadboltzgen-1bf577b1c5e606ac2c0553857297ce8c0c04ccb7.tar
boltzgen-1bf577b1c5e606ac2c0553857297ce8c0c04ccb7.tar.gz
boltzgen-1bf577b1c5e606ac2c0553857297ce8c0c04ccb7.tar.bz2
boltzgen-1bf577b1c5e606ac2c0553857297ce8c0c04ccb7.tar.lz
boltzgen-1bf577b1c5e606ac2c0553857297ce8c0c04ccb7.tar.xz
boltzgen-1bf577b1c5e606ac2c0553857297ce8c0c04ccb7.tar.zst
boltzgen-1bf577b1c5e606ac2c0553857297ce8c0c04ccb7.zip
Support passing additional string arguments to the generator
Diffstat (limited to 'boltzgen.py')
-rwxr-xr-xboltzgen.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/boltzgen.py b/boltzgen.py
index 17509e7..2b32661 100755
--- a/boltzgen.py
+++ b/boltzgen.py
@@ -15,6 +15,7 @@ argparser.add_argument('--geometry', required = True, help = 'Size of the block
argparser.add_argument('--tau', required = True, help = 'BGK relaxation time')
argparser.add_argument('--disable-cse', action = 'store_const', const = True, help = 'Disable common subexpression elimination')
+argparser.add_argument('--extra', action = 'append', nargs = '+', default = [], help = 'Additional generator parameters')
args = argparser.parse_args()
@@ -28,5 +29,5 @@ generator = Generator(
geometry = Geometry.parse(args.geometry)
-src = generator.kernel(args.language, args.precision, args.layout, geometry)
+src = generator.kernel(args.language, args.precision, args.layout, geometry, sum(args.extra, []))
print(src)