From 99710e942c7a5b4dab46b987776ff0cb4993ddf3 Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Wed, 3 Jan 2018 05:33:39 -0500
Subject: [PATCH] Small fixes to make compilation of single precision work

---
 python/dune/perftool/loopy/vcl.py              | 2 +-
 python/dune/perftool/pdelab/driver/__init__.py | 1 +
 python/dune/perftool/sumfact/tabulation.py     | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/python/dune/perftool/loopy/vcl.py b/python/dune/perftool/loopy/vcl.py
index c7c1ffd4..143d9b6c 100644
--- a/python/dune/perftool/loopy/vcl.py
+++ b/python/dune/perftool/loopy/vcl.py
@@ -95,4 +95,4 @@ def vcl_function_mangler(knl, func, arg_dtypes):
     if func == "horizontal_add":
         dtype = arg_dtypes[0]
         vcl = lp.types.NumpyType(get_vcl_type(dtype))
-        return lp.CallMangleInfo("horizontal_add", (lp.types.NumpyType(dtype),), (vcl,))
+        return lp.CallMangleInfo("horizontal_add", (lp.types.NumpyType(dtype.dtype),), (vcl,))
diff --git a/python/dune/perftool/pdelab/driver/__init__.py b/python/dune/perftool/pdelab/driver/__init__.py
index 5471ce75..eb852744 100644
--- a/python/dune/perftool/pdelab/driver/__init__.py
+++ b/python/dune/perftool/pdelab/driver/__init__.py
@@ -15,6 +15,7 @@ from dune.perftool.generation import (generator_factory,
                                       global_context,
                                       include_file,
                                       cached,
+                                      pre_include,
                                       preamble,
                                       )
 from dune.perftool.options import get_option
diff --git a/python/dune/perftool/sumfact/tabulation.py b/python/dune/perftool/sumfact/tabulation.py
index 836cfab3..cbe8fbbc 100644
--- a/python/dune/perftool/sumfact/tabulation.py
+++ b/python/dune/perftool/sumfact/tabulation.py
@@ -399,7 +399,7 @@ class PolynomialLookup(FunctionIdentifier):
 def polynomial_lookup_mangler(target, func, dtypes):
     if isinstance(func, PolynomialLookup):
         dtype = dtype_floatingpoint()
-        return CallMangleInfo(func.name, (dtype,), (NumpyType(np.int32), NumpyType(dtype)))
+        return CallMangleInfo(func.name, (NumpyType(dtype),), (NumpyType(np.int32), NumpyType(dtype)))
 
 
 def define_theta(name, tabmat, additional_indices=(), width=None):
-- 
GitLab