Commit 2c5f227a authored by Julian Hammer's avatar Julian Hammer
Browse files

gracefully failing von vectortype

parent f684d662
Pipeline #28788 passed with stage
in 21 minutes and 51 seconds
......@@ -10,7 +10,7 @@ from sympy.functions import Abs
from sympy.core.numbers import Zero
from pystencils.assignment import Assignment
from pystencils.data_types import cast_func, get_type_of_expression, PointerType
from pystencils.data_types import cast_func, get_type_of_expression, PointerType, VectorType
from pystencils.kernelparameters import FieldPointerSymbol
T = TypeVar('T')
......@@ -465,6 +465,8 @@ def count_operations(term: Union[sp.Expr, List[sp.Expr]],
base_type = get_type_of_expression(e)
except ValueError:
return False
if isinstance(base_type, VectorType):
return False
if isinstance(base_type, PointerType):
return only_type == 'int'
if only_type == 'int' and (base_type.is_int() or base_type.is_uint()):
......
Markdown is supported
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