Skip to content

Commit

Permalink
Fix initialization of device memory from host
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Jan 19, 2024
1 parent 0bad022 commit c7ef129
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/alpaka/asyncblur/asyncblur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,16 @@ try
auto hostView = llama::allocView(hostMapping, allocBlobHost);

using HostChunkView = decltype(llama::allocView(devMapping, allocBlobHost));
using AccChunkView = decltype(llama::allocView(devMapping, allocBlobAcc));
using AccChunkView = decltype(llama::allocViewUninitialized(devMapping, allocBlobAcc));
std::vector<HostChunkView> hostChunkView;
std::vector<AccChunkView> devOldView;
std::vector<AccChunkView> devNewView;

for(std::size_t i = 0; i < chunkCount; ++i)
{
hostChunkView.push_back(llama::allocView(devMapping, allocBlobHost));
devOldView.push_back(llama::allocView(devMapping, allocBlobAcc));
devNewView.push_back(llama::allocView(devMapping, allocBlobAcc));
devOldView.push_back(llama::allocViewUninitialized(devMapping, allocBlobAcc));
devNewView.push_back(llama::allocViewUninitialized(devMapping, allocBlobAcc));
}

chrono.printAndReset("Alloc");
Expand Down

0 comments on commit c7ef129

Please sign in to comment.