Skip to content

Commit

Permalink
pyop3: ro_with_halos and rw_with_halos need broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
ksagiyam committed Apr 25, 2024
1 parent cfc270f commit 4bcf336
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyop3/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ def data_rw_with_halos(self):

if not self._roots_valid:
self._reduce_leaves_to_roots()
if not self._leaves_valid:
self._broadcast_roots_to_leaves()

# modifying owned values invalidates ghosts
self._leaves_valid = False
Expand All @@ -224,6 +226,8 @@ def data_rw_with_halos(self):
def data_ro_with_halos(self):
if not self._roots_valid:
self._reduce_leaves_to_roots()
if not self._leaves_valid:
self._broadcast_roots_to_leaves()
return readonly(self._data)

@property
Expand Down

0 comments on commit 4bcf336

Please sign in to comment.