Skip to content
Snippets Groups Projects
Commit 27cf4f19 authored by Martin Bauer's avatar Martin Bauer
Browse files

Fixes in vectorization to also support float kernels

parent 866e9fc0
No related merge requests found
...@@ -272,6 +272,7 @@ class CustomSympyPrinter(CCodePrinter): ...@@ -272,6 +272,7 @@ class CustomSympyPrinter(CCodePrinter):
else: else:
return res return res
# noinspection PyPep8Naming # noinspection PyPep8Naming
class VectorizedCustomSympyPrinter(CustomSympyPrinter): class VectorizedCustomSympyPrinter(CustomSympyPrinter):
SummandInfo = namedtuple("SummandInfo", ['sign', 'term']) SummandInfo = namedtuple("SummandInfo", ['sign', 'term'])
......
...@@ -721,6 +721,8 @@ class KernelConstraintsCheck: ...@@ -721,6 +721,8 @@ class KernelConstraintsCheck:
elif isinstance(rhs, sp.Mul): elif isinstance(rhs, sp.Mul):
new_args = [self.process_expression(arg) if arg not in (-1, 1) else arg for arg in rhs.args] 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 return rhs.func(*new_args) if new_args else rhs
elif isinstance(rhs, sp.Indexed):
return rhs
else: else:
if isinstance(rhs, sp.Pow): if isinstance(rhs, sp.Pow):
# don't process exponents -> they should remain integers # don't process exponents -> they should remain integers
......
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