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

Style fixes

parent e99e8a93
No related branches found
No related tags found
No related merge requests found
...@@ -239,7 +239,7 @@ class CBackend: ...@@ -239,7 +239,7 @@ class CBackend:
instr = 'storeU' instr = 'storeU'
if aligned: if aligned:
instr = 'stream' if nontemporal else 'storeA' instr = 'stream' if nontemporal else 'storeA'
if mask != True: if mask != True: # NOQA
instr = 'maskStore' if aligned else 'maskStoreU' instr = 'maskStore' if aligned else 'maskStoreU'
printed_mask = self.sympy_printer.doprint(mask) printed_mask = self.sympy_printer.doprint(mask)
if self._vector_instruction_set['dataTypePrefix']['double'] == '__mm256d': if self._vector_instruction_set['dataTypePrefix']['double'] == '__mm256d':
......
...@@ -232,10 +232,6 @@ def insert_vector_casts(ast_node): ...@@ -232,10 +232,6 @@ def insert_vector_casts(ast_node):
assignment.lhs = new_lhs assignment.lhs = new_lhs
elif isinstance(assignment.lhs, vector_memory_access): elif isinstance(assignment.lhs, vector_memory_access):
assignment.lhs = visit_expr(assignment.lhs) assignment.lhs = visit_expr(assignment.lhs)
#elif isinstance(assignment.lhs, cast_func): # TODO check if necessary
# lhs_type = assignment.lhs.args[1]
# if type(lhs_type) is VectorType and type(rhs_type) is not VectorType:
# assignment.rhs = cast_func(assignment.rhs, lhs_type)
elif isinstance(arg, ast.Conditional): elif isinstance(arg, ast.Conditional):
arg.condition_expr = fast_subs(arg.condition_expr, substitution_dict, arg.condition_expr = fast_subs(arg.condition_expr, substitution_dict,
skip=lambda e: isinstance(e, ast.ResolvedFieldAccess)) skip=lambda e: isinstance(e, ast.ResolvedFieldAccess))
......
...@@ -27,10 +27,12 @@ def typed_symbols(names, dtype, *args): ...@@ -27,10 +27,12 @@ def typed_symbols(names, dtype, *args):
else: else:
return TypedSymbol(str(symbols), dtype) return TypedSymbol(str(symbols), dtype)
def type_all_numbers(expr, dtype): def type_all_numbers(expr, dtype):
substitutions = {a: cast_func(a, dtype) for a in expr.atoms(sp.Number)} substitutions = {a: cast_func(a, dtype) for a in expr.atoms(sp.Number)}
return expr.subs(substitutions) return expr.subs(substitutions)
def matrix_symbols(names, dtype, rows, cols): def matrix_symbols(names, dtype, rows, cols):
if isinstance(names, str): if isinstance(names, str):
names = names.replace(' ', '').split(',') names = names.replace(' ', '').split(',')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment