aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-10-29 19:30:50 +0100
committerAdrian Kummerlaender2019-10-29 19:30:50 +0100
commita0438d434a8dde45e6fdab38d44181f0cd0cb2c6 (patch)
tree679d0262f69f3e1b3536cd66e3ef25a026c9a25e
parenta6dcb57cff9a1dd9de7e5fafdc87230489be87b9 (diff)
downloadboltzgen-a0438d434a8dde45e6fdab38d44181f0cd0cb2c6.tar
boltzgen-a0438d434a8dde45e6fdab38d44181f0cd0cb2c6.tar.gz
boltzgen-a0438d434a8dde45e6fdab38d44181f0cd0cb2c6.tar.bz2
boltzgen-a0438d434a8dde45e6fdab38d44181f0cd0cb2c6.tar.xz
boltzgen-a0438d434a8dde45e6fdab38d44181f0cd0cb2c6.zip
Rename target module to memory
-rwxr-xr-xboltzgen.py4
-rw-r--r--boltzgen/kernel/__init__.py2
-rw-r--r--boltzgen/kernel/generator.py12
-rw-r--r--boltzgen/kernel/memory/__init__.py (renamed from boltzgen/kernel/target/__init__.py)0
-rw-r--r--boltzgen/kernel/memory/index.py (renamed from boltzgen/kernel/target/index.py)0
-rw-r--r--boltzgen/kernel/memory/layout/AOS.py (renamed from boltzgen/kernel/target/layout/AOS.py)0
-rw-r--r--boltzgen/kernel/memory/layout/SOA.py (renamed from boltzgen/kernel/target/layout/SOA.py)0
-rw-r--r--boltzgen/kernel/memory/layout/__init__.py (renamed from boltzgen/kernel/target/layout/__init__.py)0
-rw-r--r--boltzgen/kernel/memory/precision.py (renamed from boltzgen/kernel/target/precision.py)0
9 files changed, 9 insertions, 9 deletions
diff --git a/boltzgen.py b/boltzgen.py
index 1c8e931..b4a9fe8 100755
--- a/boltzgen.py
+++ b/boltzgen.py
@@ -6,7 +6,7 @@ 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 "cl" or "cpp")')
+argparser.add_argument('target', help = 'Target language (currently either "cl" or "cpp")')
argparser.add_argument('--lattice', required = True, help = 'Lattice type (D2Q9, D3Q7, D3Q19, D3Q27)')
argparser.add_argument('--layout', required = True, help = 'Memory layout ("AOS" or "SOA")')
@@ -31,7 +31,7 @@ generator = Generator(
descriptor = lattice,
moments = lbm.moments(optimize = not args.disable_cse),
collision = lbm.bgk(f_eq = lbm.equilibrium(), tau = float(args.tau), optimize = not args.disable_cse),
- language = args.language,
+ target = args.target,
precision = args.precision,
index = args.index,
layout = args.layout)
diff --git a/boltzgen/kernel/__init__.py b/boltzgen/kernel/__init__.py
index 92d1853..78f6ecb 100644
--- a/boltzgen/kernel/__init__.py
+++ b/boltzgen/kernel/__init__.py
@@ -1,2 +1,2 @@
from . import generator
-from . import target
+from . import memory
diff --git a/boltzgen/kernel/generator.py b/boltzgen/kernel/generator.py
index b2a632c..30e2c04 100644
--- a/boltzgen/kernel/generator.py
+++ b/boltzgen/kernel/generator.py
@@ -3,23 +3,23 @@ import sympy
from mako.template import Template
from pathlib import Path
-from . import target
+from . import memory
class Generator:
- def __init__(self, descriptor, moments, collision, language, precision, index, layout):
+ def __init__(self, descriptor, moments, collision, target, precision, index, layout):
self.descriptor = descriptor
self.moments = moments
self.collision = collision
- self.target = language
- self.float_type = eval("target.precision.%s" % language).get_float_type(precision)
+ self.target = target
+ self.float_type = eval("memory.precision.%s" % target).get_float_type(precision)
try:
- self.index_impl = eval("target.index.%s" % index)
+ self.index_impl = eval("memory.index.%s" % index)
except AttributeError:
raise Exception("There is no cell indexing scheme '%s'" % index) from None
try:
- self.layout_impl = eval("target.layout.%s" % layout)
+ self.layout_impl = eval("memory.layout.%s" % layout)
except AttributeError:
raise Exception("There is no layout '%s'" % layout) from None
diff --git a/boltzgen/kernel/target/__init__.py b/boltzgen/kernel/memory/__init__.py
index 5927d1b..5927d1b 100644
--- a/boltzgen/kernel/target/__init__.py
+++ b/boltzgen/kernel/memory/__init__.py
diff --git a/boltzgen/kernel/target/index.py b/boltzgen/kernel/memory/index.py
index e89e9ee..e89e9ee 100644
--- a/boltzgen/kernel/target/index.py
+++ b/boltzgen/kernel/memory/index.py
diff --git a/boltzgen/kernel/target/layout/AOS.py b/boltzgen/kernel/memory/layout/AOS.py
index 88e5377..88e5377 100644
--- a/boltzgen/kernel/target/layout/AOS.py
+++ b/boltzgen/kernel/memory/layout/AOS.py
diff --git a/boltzgen/kernel/target/layout/SOA.py b/boltzgen/kernel/memory/layout/SOA.py
index 05e9e84..05e9e84 100644
--- a/boltzgen/kernel/target/layout/SOA.py
+++ b/boltzgen/kernel/memory/layout/SOA.py
diff --git a/boltzgen/kernel/target/layout/__init__.py b/boltzgen/kernel/memory/layout/__init__.py
index 731fbe8..731fbe8 100644
--- a/boltzgen/kernel/target/layout/__init__.py
+++ b/boltzgen/kernel/memory/layout/__init__.py
diff --git a/boltzgen/kernel/target/precision.py b/boltzgen/kernel/memory/precision.py
index d22e922..d22e922 100644
--- a/boltzgen/kernel/target/precision.py
+++ b/boltzgen/kernel/memory/precision.py