Skip to content

Commit

Permalink
Make sure Matrix::waitLocalTiles actually consumes the tile wrappers …
Browse files Browse the repository at this point in the history
…immediately
  • Loading branch information
msimberg committed Jan 14, 2025
1 parent 4f8479c commit 94e9c6f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions include/dlaf/matrix/matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,11 @@ void Matrix<const T, D>::waitLocalTiles() noexcept {
const auto range_local = common::iterate_range2d(distribution().local_nr_tiles());

auto s = pika::execution::experimental::when_all_vector(internal::selectGeneric(
[this](const LocalTileIndex& index) {
return this->tile_managers_[tileLinearIndex(index)].readwrite();
},
range_local)) |
pika::execution::experimental::drop_value();
pika::this_thread::experimental::sync_wait(std::move(s));
[this](const LocalTileIndex& index) {
return this->tile_managers_[tileLinearIndex(index)].readwrite();
},
range_local));
[[maybe_unused]] auto tiles = pika::this_thread::experimental::sync_wait(std::move(s));
}

template <class T, Device D>
Expand Down

0 comments on commit 94e9c6f

Please sign in to comment.