From 41167d51086bc688824efa8d38b0741165856b66 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Mon, 26 Oct 2020 17:05:00 +0100 Subject: [PATCH] DIRTY HACK!! --- src/pystencils_autodiff/backends/python_bindings.py | 3 ++- src/pystencils_autodiff/framework_integration/printer.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pystencils_autodiff/backends/python_bindings.py b/src/pystencils_autodiff/backends/python_bindings.py index d86c4f1..e2f56f8 100644 --- a/src/pystencils_autodiff/backends/python_bindings.py +++ b/src/pystencils_autodiff/backends/python_bindings.py @@ -170,5 +170,6 @@ class PybindFunctionWrapping(JinjaCppFile): def __init__(self, function_node): super().__init__({'python_name': function_node.function_name, 'cpp_name': function_node.function_name, - 'parameters': [p.symbol.name for p in function_node.get_parameters()] + 'parameters': [p.symbol.name for p in function_node.get_parameters() + if hasattr(p.symbol, 'dtype') and not 'meshFunctor' in p.symbol.name] }) diff --git a/src/pystencils_autodiff/framework_integration/printer.py b/src/pystencils_autodiff/framework_integration/printer.py index 6e11cf6..9225352 100644 --- a/src/pystencils_autodiff/framework_integration/printer.py +++ b/src/pystencils_autodiff/framework_integration/printer.py @@ -58,7 +58,8 @@ class FrameworkIntegrationPrinter(pystencils.backends.cbackend.CBackend): max_threads = node.indexing.max_threads_per_block() if max_threads: launch_bounds = f"__launch_bounds__({max_threads}) " - func_declaration = f"FUNC_PREFIX {launch_bounds} {self._print(return_type)} {node.function_name}({', '.join(function_arguments)})" # noqa + indent = ',\n' + ' ' * len(f'FUNC_PREFIX {launch_bounds} {self._print(return_type)} {node.function_name}') + func_declaration = f"FUNC_PREFIX {launch_bounds} {self._print(return_type)} {node.function_name}({indent.join(function_arguments)})" # noqa if self._signatureOnly: return func_declaration -- GitLab