Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
e55c5d8a
Commit
e55c5d8a
authored
Oct 01, 2019
by
Martin Bauer
Browse files
Bugfix in typing
parent
0cc3b825
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/cpu/kernelcreation.py
View file @
e55c5d8a
...
...
@@ -42,12 +42,11 @@ def create_kernel(assignments: AssignmentOrAstNodeList, function_name: str = "ke
Returns:
AST node representing a function, that can be printed as C or CUDA code
"""
def
type_symbol
(
term
):
if
isinstance
(
term
,
Field
.
Access
)
or
isinstance
(
term
,
TypedSymbol
):
return
term
elif
isinstance
(
term
,
sp
.
Symbol
):
if
not
hasattr
(
type_info
,
'__getitem__'
):
if
isinstance
(
type_info
,
str
)
or
not
hasattr
(
type_info
,
'__getitem__'
):
return
TypedSymbol
(
term
.
name
,
create_type
(
type_info
))
else
:
return
TypedSymbol
(
term
.
name
,
type_info
[
term
.
name
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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