Commit 354877bb authored by Martin Geitner's avatar Martin Geitner
Browse files

add index Field parameter to ast

parent c7a4918a
Pipeline #20544 failed with stage
in 2 minutes and 17 seconds
......@@ -76,6 +76,9 @@ def create_kernel(assignments,
[0., 4., 4., 4., 0.],
[0., 0., 0., 0., 0.]])
"""
#save the original assignments
assign = assignments
# ---- Normalizing parameters
split_groups = ()
if isinstance(assignments, AssignmentCollection):
......@@ -130,7 +133,8 @@ def create_kernel(assignments,
if use_auto_for_assignments:
for a in ast.atoms(SympyAssignment):
a.use_auto = True
ast.assignments = assignments
ast.assignments = assign
ast.indexFields = False
return ast
......@@ -181,6 +185,9 @@ def create_indexed_kernel(assignments,
[0. , 0. , 0. , 4.3, 0. ],
[0. , 0. , 0. , 0. , 0. ]])
"""
assign = assignments
indF = index_fields
if isinstance(assignments, Assignment):
assignments = [assignments]
elif isinstance(assignments, AssignmentCollection):
......@@ -213,7 +220,8 @@ def create_indexed_kernel(assignments,
else:
raise ValueError("Unknown target %s. Has to be either 'cpu' or 'gpu'" % (target,))
ast.assignments = assignments
ast.assignments = assign
ast.indexFields = indF
return ast
......
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