Skip to content

Commit

Permalink
trivial test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
albestro committed Feb 17, 2023
1 parent 7bec672 commit 343d087
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/unit/matrix/test_extra_buffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ using namespace dlaf;
TEST(ExtraBuffersTest, Basic) {
using T = float;
constexpr auto D = Device::CPU;

namespace ex = pika::execution::experimental;
namespace tt = pika::this_thread::experimental;

TileElementSize tile_size(2, 2);
Matrix<T, D> tile({tile_size.rows(), tile_size.cols()}, tile_size);
ExtraBuffers<T, D> buffers(tile_size, 10);
constexpr SizeType nbuffers = 10;
ExtraBuffers<T, D> buffers(tile_size, nbuffers);

for (const auto ij : common::iterate_range2d(buffers.nrTiles())) {
tt::sync_wait(ex::when_all(buffers.readwrite_sender(ij), ex::just(T(1))) |
for (SizeType i = 0; i < nbuffers; ++i) {
tt::sync_wait(ex::when_all(buffers.readwrite_sender(i), ex::just(T(1))) |
ex::then([](const auto& tile, const T value) { matrix::test::set(tile, value); }));
}

Expand Down

0 comments on commit 343d087

Please sign in to comment.