Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephan Seitz
pystencils
Commits
107a3ac8
Commit
107a3ac8
authored
Dec 05, 2019
by
Stephan Seitz
Browse files
Fix printing for Functions without name
This fixes test for LLVM GPU using pointer_arith_func
parent
296de5db
Pipeline
#20272
passed with stage
in 15 minutes and 49 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pystencils/backends/cbackend.py
View file @
107a3ac8
...
...
@@ -390,8 +390,9 @@ class CustomSympyPrinter(CCodePrinter):
elif
expr
.
func
==
int_div
:
return
"((%s) / (%s))"
%
(
self
.
_print
(
expr
.
args
[
0
]),
self
.
_print
(
expr
.
args
[
1
]))
else
:
name
=
expr
.
name
if
hasattr
(
expr
,
'name'
)
else
expr
.
__class__
.
__name__
arg_str
=
', '
.
join
(
self
.
_print
(
a
)
for
a
in
expr
.
args
)
return
f
'
{
expr
.
name
}
(
{
arg_str
}
)'
return
f
'
{
name
}
(
{
arg_str
}
)'
def
_typed_number
(
self
,
number
,
dtype
):
res
=
self
.
_print
(
number
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment