From f925f8905447cccb2680237a0ae63bd39365625b Mon Sep 17 00:00:00 2001
From: Martin Bauer <martin.bauer@fau.de>
Date: Thu, 24 Jan 2019 16:37:07 +0100
Subject: [PATCH] New code generation interface for waLBerla

---
 __init__.py                           | 3 ++-
 cpu/vectorization.py                  | 3 +++
 datahandling/parallel_datahandling.py | 1 -
 gpucuda/indexing.py                   | 2 +-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/__init__.py b/__init__.py
index 699662a56..d7ede400e 100644
--- a/__init__.py
+++ b/__init__.py
@@ -6,7 +6,7 @@ from .slicing import make_slice
 from .kernelcreation import create_kernel, create_indexed_kernel, create_staggered_kernel
 from .display_utils import show_code, to_dot
 from .simp import AssignmentCollection
-from .assignment import Assignment
+from .assignment import Assignment, assignment_from_stencil
 from .sympyextensions import SymbolCreator
 from .datahandling import create_data_handling
 from .kernel_decorator import kernel
@@ -20,6 +20,7 @@ __all__ = ['Field', 'FieldType', 'fields',
            'show_code', 'to_dot',
            'AssignmentCollection',
            'Assignment',
+           'assignment_from_stencil',
            'SymbolCreator',
            'create_data_handling',
            'kernel',
diff --git a/cpu/vectorization.py b/cpu/vectorization.py
index e54109fc4..6556a01f6 100644
--- a/cpu/vectorization.py
+++ b/cpu/vectorization.py
@@ -36,6 +36,9 @@ def vectorize(kernel_ast: ast.KernelFunction, instruction_set: str = 'avx',
                                         depending on the access pattern there might be additional padding
                                         required at the end of the array
     """
+    if instruction_set is None:
+        return
+    
     all_fields = kernel_ast.fields_accessed
     if nontemporal is None or nontemporal is False:
         nontemporal = {}
diff --git a/datahandling/parallel_datahandling.py b/datahandling/parallel_datahandling.py
index 23a6f09c4..71fe0c944 100644
--- a/datahandling/parallel_datahandling.py
+++ b/datahandling/parallel_datahandling.py
@@ -383,4 +383,3 @@ class ParallelDataHandling(DataHandling):
     def load_all(self, directory):
         for field_name, data_name in self._field_name_to_cpu_data_name.items():
             self.blocks.readBlockData(data_name, os.path.join(directory, field_name + ".dat"))
-
diff --git a/gpucuda/indexing.py b/gpucuda/indexing.py
index ab656b5b1..403d6790f 100644
--- a/gpucuda/indexing.py
+++ b/gpucuda/indexing.py
@@ -7,7 +7,7 @@ from pystencils.slicing import normalize_slice
 from pystencils.data_types import TypedSymbol, create_type
 from functools import partial
 
-AUTO_BLOCK_SIZE_LIMITING = True
+AUTO_BLOCK_SIZE_LIMITING = False
 
 BLOCK_IDX = [TypedSymbol("blockIdx." + coord, create_type("int")) for coord in ('x', 'y', 'z')]
 THREAD_IDX = [TypedSymbol("threadIdx." + coord, create_type("int")) for coord in ('x', 'y', 'z')]
-- 
GitLab