Skip to content

Commit

Permalink
Backwards-compatible workdiv creation
Browse files Browse the repository at this point in the history
  • Loading branch information
chillenzer committed Jun 27, 2024
1 parent 772c12d commit b9cb9fe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/include/mallocMC/creationPolicies/Scatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,14 @@ namespace mallocMC::CreationPolicies
{
using Dim = typename alpaka::trait::DimType<TAcc>::type;
using Idx = typename alpaka::trait::IdxType<TAcc>::type;
using VecType = alpaka::Vec<Dim, Idx>;

auto poolView = alpaka::createView(dev, reinterpret_cast<char*>(pool), alpaka::Vec<Dim, Idx>(memsize));
alpaka::memset(queue, poolView, 0U);
alpaka::wait(queue);

auto workDivSingleThread = alpaka::WorkDivMembers<Dim, Idx>{{1U}, {1U}, {1U}};
auto workDivSingleThread
= alpaka::WorkDivMembers<Dim, Idx>{VecType::ones(), VecType::ones(), VecType::ones()};
alpaka::exec<TAcc>(queue, workDivSingleThread, InitKernel{}, heap, pool, memsize);
alpaka::wait(queue);
}
Expand Down

0 comments on commit b9cb9fe

Please sign in to comment.