Skip to content
Snippets Groups Projects
Commit c0d959cb authored by Daniel Bauer's avatar Daniel Bauer :speech_balloon:
Browse files

apply vector substitutions in all ast nodes

parent 67e6e6ce
No related tags found
No related merge requests found
Pipeline #61939 failed
......@@ -429,8 +429,12 @@ def insert_vector_casts(ast_node, instruction_set, loop_counter_symbol, default_
arg.condition_expr = visit_expr(arg.condition_expr, default_type)
visit_node(arg, substitution_dict, default_type)
elif isinstance(arg, ast.ForLoop): # ForLoop is intended not to be vectorized but to set up small finite loops within kernels
visit_node(arg.body, substitution_dict, default_type)
visit_node(arg.body, substitution_dict, default_type)
else:
visit_node(arg, substitution_dict, default_type)
node = fast_subs(
node, substitution_dict,
skip=lambda e: isinstance(e, (ast.SympyAssignment, ast.Conditional, ast.ForLoop, ast.ResolvedFieldAccess))
)
visit_node(ast_node, {}, default_float_type)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment