From bd7fc1d84356c2c478f47d919363c51e70b103a0 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Thu, 22 Sep 2016 11:48:05 +0200 Subject: [PATCH] Define name property for all functions --- python/dune/perftool/loopy/functions.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/dune/perftool/loopy/functions.py b/python/dune/perftool/loopy/functions.py index 762ee64a..703ffdc4 100644 --- a/python/dune/perftool/loopy/functions.py +++ b/python/dune/perftool/loopy/functions.py @@ -52,12 +52,16 @@ class PDELabAccumulationFunction(FunctionIdentifier): def __getinitargs__(self): return (self.accumobj, self.rank) + @property + def name(self): + return '{}.accumulate'.format(self.accumobj) + @function_mangler def accumulation_mangler(target, func, dtypes): if isinstance(func, PDELabAccumulationFunction): if func.rank == 1: - return CallMangleInfo('{}.accumulate'.format(func.accumobj), + return CallMangleInfo(func.name, (), (NumpyType(str), NumpyType(numpy.int32), @@ -65,7 +69,7 @@ def accumulation_mangler(target, func, dtypes): ) ) if func.rank == 2: - return CallMangleInfo('{}.accumulate'.format(func.accumobj), + return CallMangleInfo(func.name, (), (NumpyType(str), NumpyType(numpy.int32), -- GitLab