Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Plewinski
pystencils
Commits
bbfcdc90
Commit
bbfcdc90
authored
Aug 06, 2019
by
Stephan Seitz
Browse files
Make generate_c also work if astnode does not have member
`instruction_set`
parent
ddb86435
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils/backends/cbackend.py
View file @
bbfcdc90
...
...
@@ -49,8 +49,12 @@ def generate_c(ast_node: Node, signature_only: bool = False, dialect='c', custom
if
custom_backend
:
printer
=
custom_backend
elif
dialect
==
'c'
:
try
:
instruction_set
=
ast_node
.
instruction_set
except
Exception
:
instruction_set
=
None
printer
=
CBackend
(
signature_only
=
signature_only
,
vector_instruction_set
=
ast_node
.
instruction_set
)
vector_instruction_set
=
instruction_set
)
elif
dialect
==
'cuda'
:
from
pystencils.backends.cuda_backend
import
CudaBackend
printer
=
CudaBackend
(
signature_only
=
signature_only
)
...
...
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