Commit 20f2ee40 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Fixup: allow time_constant_fields == None

parent 8b7bdb96
Pipeline #20185 failed with stage
in 1 minute and 30 seconds
......@@ -85,7 +85,7 @@ def _create_backward_assignments_tf_mad(self, diff_fields_prefix):
w in zip(ra.offsets, forward_assignment.lhs.offsets))
diff_read_field_sum += sp.diff(forward_assignment.rhs, ra) * \
diff_write_field[inverted_offset](*diff_write_index)
if forward_read_field in self._time_constant_fields and self.time_constant_fields is not None:
if self.time_constant_fields is not None and forward_read_field in self._time_constant_fields:
# Accumulate in case of time_constant_fields
assignment = ps.Assignment(
diff_read_field.center(), diff_read_field.center() + diff_read_field_sum)
......@@ -368,7 +368,7 @@ Backward:
rhs = rhs[0, 0]
# if field is constant over we time we can accumulate in assignment
if read_access.field in self._time_constant_fields and self.time_constant_fields is not None:
if self.time_constant_fields is not None and read_access.field in self._time_constant_fields:
backward_assignments.append(ps.Assignment(lhs, lhs + rhs))
else:
backward_assignments.append(ps.Assignment(lhs, rhs))
......
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