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
27cf4f19
Commit
27cf4f19
authored
May 14, 2018
by
Martin Bauer
Browse files
Fixes in vectorization to also support float kernels
parent
866e9fc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
backends/cbackend.py
View file @
27cf4f19
...
...
@@ -272,6 +272,7 @@ class CustomSympyPrinter(CCodePrinter):
else
:
return
res
# noinspection PyPep8Naming
class
VectorizedCustomSympyPrinter
(
CustomSympyPrinter
):
SummandInfo
=
namedtuple
(
"SummandInfo"
,
[
'sign'
,
'term'
])
...
...
transformations.py
View file @
27cf4f19
...
...
@@ -721,6 +721,8 @@ class KernelConstraintsCheck:
elif
isinstance
(
rhs
,
sp
.
Mul
):
new_args
=
[
self
.
process_expression
(
arg
)
if
arg
not
in
(
-
1
,
1
)
else
arg
for
arg
in
rhs
.
args
]
return
rhs
.
func
(
*
new_args
)
if
new_args
else
rhs
elif
isinstance
(
rhs
,
sp
.
Indexed
):
return
rhs
else
:
if
isinstance
(
rhs
,
sp
.
Pow
):
# don't process exponents -> they should remain integers
...
...
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