Skip to content

Commit 7f273f9

Browse files
committed
add more explanation for MPMS reuse tweak
1 parent 7dcd1d4 commit 7f273f9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pytato/transform/materialize.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,11 @@ def _materialize_if_mpms(expr: Array,
191191

192192
nsuccessors = 0
193193
for successor in successors:
194-
# Handle indexing with heavy reuse, if the sizes are known ahead of time
194+
# Handle indexing with heavy reuse, if the sizes are known ahead of time.
195+
# This can occur when the elements of a smaller array are used repeatedly to
196+
# compute the elements of a larger array. (Example: In meshmode's direct
197+
# connection code, this happens when injecting data from a smaller
198+
# discretization into a larger one, such as BTAG_ALL -> FACE_RESTR_ALL.)
195199
if (
196200
isinstance(successor, IndexBase)
197201
and isinstance(successor.size, int)

0 commit comments

Comments
 (0)