Commit 107a3ac8 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Fix printing for Functions without name

This fixes test for LLVM GPU using pointer_arith_func
parent 296de5db
...@@ -390,8 +390,9 @@ class CustomSympyPrinter(CCodePrinter): ...@@ -390,8 +390,9 @@ class CustomSympyPrinter(CCodePrinter):
elif expr.func == int_div: elif expr.func == int_div:
return "((%s) / (%s))" % (self._print(expr.args[0]), self._print(expr.args[1])) return "((%s) / (%s))" % (self._print(expr.args[0]), self._print(expr.args[1]))
else: else:
name = if hasattr(expr, 'name') else expr.__class__.__name__
arg_str = ', '.join(self._print(a) for a in expr.args) arg_str = ', '.join(self._print(a) for a in expr.args)
return f'{}({arg_str})' return f'{name}({arg_str})'
def _typed_number(self, number, dtype): def _typed_number(self, number, dtype):
res = self._print(number) res = self._print(number)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment