diff --git a/pystencils/backends/cbackend.py b/pystencils/backends/cbackend.py index ab0aa8a4333ccdc3a19c379d3e8d361514fed93d..a25ba876ca8274a77ce62f867200f68b9b1c40f4 100644 --- a/pystencils/backends/cbackend.py +++ b/pystencils/backends/cbackend.py @@ -239,7 +239,7 @@ class CBackend: instr = 'storeU' if aligned: instr = 'stream' if nontemporal else 'storeA' - if mask != True: + if mask != True: # NOQA instr = 'maskStore' if aligned else 'maskStoreU' printed_mask = self.sympy_printer.doprint(mask) if self._vector_instruction_set['dataTypePrefix']['double'] == '__mm256d': diff --git a/pystencils/cpu/vectorization.py b/pystencils/cpu/vectorization.py index c5080aa20fc109da07c5e5b12fa09830db5a3186..1e3a434bc0251c86074a5260f16f7cdf6ab53b58 100644 --- a/pystencils/cpu/vectorization.py +++ b/pystencils/cpu/vectorization.py @@ -232,10 +232,6 @@ def insert_vector_casts(ast_node): assignment.lhs = new_lhs elif isinstance(assignment.lhs, vector_memory_access): 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): arg.condition_expr = fast_subs(arg.condition_expr, substitution_dict, skip=lambda e: isinstance(e, ast.ResolvedFieldAccess)) diff --git a/pystencils/data_types.py b/pystencils/data_types.py index 6fb15be18f5fd229b9e0a3646d01b2cefa5e2390..e2f224757b9e01c24889a37a212f79b442f04d05 100644 --- a/pystencils/data_types.py +++ b/pystencils/data_types.py @@ -27,10 +27,12 @@ def typed_symbols(names, dtype, *args): else: return TypedSymbol(str(symbols), dtype) + def type_all_numbers(expr, dtype): substitutions = {a: cast_func(a, dtype) for a in expr.atoms(sp.Number)} return expr.subs(substitutions) + def matrix_symbols(names, dtype, rows, cols): if isinstance(names, str): names = names.replace(' ', '').split(',')