diff options
author | Adrian Kummerlaender | 2019-10-27 16:03:07 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2019-10-27 16:10:33 +0100 |
commit | 6938758f6c1754f0ee49d0709dd0ca376a146010 (patch) | |
tree | 53e196ae894bba8610f26fd9b418b802f9797a03 | |
parent | 74c60dcbe56862d73b000d569423cb298fb06686 (diff) | |
download | boltzgen-6938758f6c1754f0ee49d0709dd0ca376a146010.tar boltzgen-6938758f6c1754f0ee49d0709dd0ca376a146010.tar.gz boltzgen-6938758f6c1754f0ee49d0709dd0ca376a146010.tar.bz2 boltzgen-6938758f6c1754f0ee49d0709dd0ca376a146010.tar.lz boltzgen-6938758f6c1754f0ee49d0709dd0ca376a146010.tar.xz boltzgen-6938758f6c1754f0ee49d0709dd0ca376a146010.tar.zst boltzgen-6938758f6c1754f0ee49d0709dd0ca376a146010.zip |
Move layout implementations into separate folder
-rw-r--r-- | boltzgen/kernel/generator.py | 7 | ||||
-rw-r--r-- | boltzgen/kernel/target/layout/__init__.py | 2 | ||||
-rw-r--r-- | boltzgen/kernel/target/layout/cl.py (renamed from boltzgen/kernel/target/cl.py) | 0 | ||||
-rw-r--r-- | boltzgen/kernel/target/layout/cpp.py (renamed from boltzgen/kernel/target/cpp.py) | 0 |
4 files changed, 5 insertions, 4 deletions
diff --git a/boltzgen/kernel/generator.py b/boltzgen/kernel/generator.py index 04b0a64..ebe1018 100644 --- a/boltzgen/kernel/generator.py +++ b/boltzgen/kernel/generator.py @@ -3,8 +3,7 @@ import sympy from mako.template import Template from pathlib import Path -import kernel.target.cl -import kernel.target.cpp +import kernel.target.layout class Generator: def __init__(self, descriptor, moments, collision): @@ -33,8 +32,8 @@ class Generator: extras = extras ) - def kernel(self, target, precision, layout, geometry, functions = ['collide_and_stream'], extras = []): - layout_impl = eval("kernel.target.%s.%s" % (target, layout)) + def kernel(self, target, precision, layout, geometry, functions, extras = []): + layout_impl = eval("kernel.target.layout.%s.%s" % (target, layout)) if layout_impl is None: raise Exception("Target '%s' doesn't support layout '%s'" % (target, layout)) else: diff --git a/boltzgen/kernel/target/layout/__init__.py b/boltzgen/kernel/target/layout/__init__.py new file mode 100644 index 0000000..3887e07 --- /dev/null +++ b/boltzgen/kernel/target/layout/__init__.py @@ -0,0 +1,2 @@ +import kernel.target.layout.cl +import kernel.target.layout.cpp diff --git a/boltzgen/kernel/target/cl.py b/boltzgen/kernel/target/layout/cl.py index 9707cb3..9707cb3 100644 --- a/boltzgen/kernel/target/cl.py +++ b/boltzgen/kernel/target/layout/cl.py diff --git a/boltzgen/kernel/target/cpp.py b/boltzgen/kernel/target/layout/cpp.py index bb5dba0..bb5dba0 100644 --- a/boltzgen/kernel/target/cpp.py +++ b/boltzgen/kernel/target/layout/cpp.py |