From 9e882b4c317f736edd2ad5e2eca9a2b3cba9f717 Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Fri, 15 Sep 2017 18:13:37 +0200
Subject: [PATCH] [fixup] Use correct padding indices

---
 python/dune/perftool/sumfact/accumulation.py | 2 +-
 python/dune/perftool/sumfact/symbolic.py     | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/python/dune/perftool/sumfact/accumulation.py b/python/dune/perftool/sumfact/accumulation.py
index f8ef3940..a3e14a3b 100644
--- a/python/dune/perftool/sumfact/accumulation.py
+++ b/python/dune/perftool/sumfact/accumulation.py
@@ -292,7 +292,7 @@ def generate_accumulation_instruction(expr, visitor):
 
     # Those input fields, that are padded need to be set to zero
     # in order to do a horizontal_add later on
-    for pad in vsf.padded_indices:
+    for pad in vsf.padded_indices(visitor):
         assignee = prim.Subscript(lp.TaggedVariable(temp, vsf.tag), pad)
         instruction(assignee=assignee,
                     expression=0,
diff --git a/python/dune/perftool/sumfact/symbolic.py b/python/dune/perftool/sumfact/symbolic.py
index 88446417..296d6f6d 100644
--- a/python/dune/perftool/sumfact/symbolic.py
+++ b/python/dune/perftool/sumfact/symbolic.py
@@ -290,8 +290,7 @@ class SumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable):
     # Define properties for conformity with the interface of VectorizedSumfactKernel
     #
 
-    @property
-    def padded_indices(self):
+    def padded_indices(self, visitor):
         return set()
 
     @property
@@ -441,10 +440,9 @@ class VectorizedSumfactKernel(SumfactKernelBase, ImmutableRecord, prim.Variable)
     # Define some properties only needed for this one
     #
 
-    @property
-    def padded_indices(self):
+    def padded_indices(self, visitor):
         indices = set(range(self.vector_width)) - set(range(len(self.kernels)))
-        return tuple(self.kernels[0].quadrature_index(None) + (i,) for i in indices)
+        return tuple(self.kernels[0].quadrature_index(None, visitor) + (i,) for i in indices)
 
     @property
     def vector_width(self):
-- 
GitLab