From c7ef1299d1c84a7b9aad0ecd9b34bbd70859f308 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Fri, 19 Jan 2024 21:45:11 +0100 Subject: [PATCH] Fix initialization of device memory from host --- examples/alpaka/asyncblur/asyncblur.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/alpaka/asyncblur/asyncblur.cpp b/examples/alpaka/asyncblur/asyncblur.cpp index b5a09bb636..a7e09d2b68 100644 --- a/examples/alpaka/asyncblur/asyncblur.cpp +++ b/examples/alpaka/asyncblur/asyncblur.cpp @@ -241,7 +241,7 @@ 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; std::vector devOldView; std::vector devNewView; @@ -249,8 +249,8 @@ try 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");