diff options
Diffstat (limited to 'boltzgen/kernel')
-rw-r--r-- | boltzgen/kernel/__init__.py | 2 | ||||
-rw-r--r-- | boltzgen/kernel/generator.py | 7 | ||||
-rw-r--r-- | boltzgen/kernel/target/__init__.py | 2 | ||||
-rw-r--r-- | boltzgen/kernel/target/layout/__init__.py | 4 |
4 files changed, 9 insertions, 6 deletions
diff --git a/boltzgen/kernel/__init__.py b/boltzgen/kernel/__init__.py new file mode 100644 index 0000000..92d1853 --- /dev/null +++ b/boltzgen/kernel/__init__.py @@ -0,0 +1,2 @@ +from . import generator +from . import target diff --git a/boltzgen/kernel/generator.py b/boltzgen/kernel/generator.py index 47fb245..5a1a37d 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.layout -import kernel.target.precision +import boltzgen.kernel.target class Generator: def __init__(self, descriptor, moments, collision): @@ -34,7 +33,7 @@ class Generator: ) def kernel(self, target, precision, layout, geometry, functions, extras = []): - layout_impl = eval("kernel.target.layout.%s.%s" % (target, layout)) + layout_impl = eval("boltzgen.kernel.target.layout.%s.%s" % (target, layout)) if layout_impl is None: raise Exception("Target '%s' doesn't support layout '%s'" % (target, layout)) else: @@ -43,6 +42,6 @@ class Generator: if geometry.dimension() != self.descriptor.d: raise Exception('Geometry dimension must match descriptor dimension') - float_type = eval("kernel.target.precision.%s" % target).get_float_type(precision) + float_type = eval("boltzgen.kernel.target.precision.%s" % target).get_float_type(precision) return "\n".join(map(lambda f: self.instantiate(target, f, float_type, layout_impl, geometry, extras), functions)) diff --git a/boltzgen/kernel/target/__init__.py b/boltzgen/kernel/target/__init__.py new file mode 100644 index 0000000..e3f8dad --- /dev/null +++ b/boltzgen/kernel/target/__init__.py @@ -0,0 +1,2 @@ +from . import layout +from . import precision diff --git a/boltzgen/kernel/target/layout/__init__.py b/boltzgen/kernel/target/layout/__init__.py index 3887e07..44e92e6 100644 --- a/boltzgen/kernel/target/layout/__init__.py +++ b/boltzgen/kernel/target/layout/__init__.py @@ -1,2 +1,2 @@ -import kernel.target.layout.cl -import kernel.target.layout.cpp +from . import cl +from . import cpp |