diff --git a/examples/alpaka/babelstream/AlpakaStream.cpp b/examples/alpaka/babelstream/AlpakaStream.cpp index 2452c2a502..cb7046ffaa 100644 --- a/examples/alpaka/babelstream/AlpakaStream.cpp +++ b/examples/alpaka/babelstream/AlpakaStream.cpp @@ -13,8 +13,8 @@ namespace { - constexpr auto blockSize = 1024; - constexpr auto dotBlockSize = 256; + constexpr auto blockSize = Idx{1024}; + constexpr auto dotBlockSize = Idx{256}; struct StreamingAccessor { @@ -87,7 +87,7 @@ struct InitKernel template void AlpakaStream::init_arrays(T initA, T initB, T initC) { - auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, 1}; + auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, Idx{1}}; // auto const workdiv = alpaka::getValidWorkDiv(devAcc, arraySize); alpaka::exec( queue, @@ -123,7 +123,7 @@ struct CopyKernel template void AlpakaStream::copy() { - auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, 1}; + auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, Idx{1}}; // auto const workdiv = alpaka::getValidWorkDiv(devAcc, arraySize); auto viewA = llama::View{mapping, llama::Array{reinterpret_cast(alpaka::getPtrNative(d_a))}, Accessor{}}; @@ -147,7 +147,7 @@ struct MulKernel template void AlpakaStream::mul() { - auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, 1}; + auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, Idx{1}}; // auto const workdiv = alpaka::getValidWorkDiv(devAcc, arraySize); auto viewB = llama::View{mapping, llama::Array{reinterpret_cast(alpaka::getPtrNative(d_b))}, Accessor{}}; @@ -170,7 +170,7 @@ struct AddKernel template void AlpakaStream::add() { - auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, 1}; + auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, Idx{1}}; // auto const workdiv = alpaka::getValidWorkDiv(devAcc, arraySize); auto viewA = llama::View{mapping, llama::Array{reinterpret_cast(alpaka::getPtrNative(d_a))}, Accessor{}}; @@ -196,7 +196,7 @@ struct TriadKernel template void AlpakaStream::triad() { - auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, 1}; + auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, Idx{1}}; // auto const workdiv = alpaka::getValidWorkDiv(devAcc, arraySize); auto viewA = llama::View{mapping, llama::Array{reinterpret_cast(alpaka::getPtrNative(d_a))}, Accessor{}}; @@ -222,7 +222,7 @@ struct NstreamKernel template void AlpakaStream::nstream() { - auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, 1}; + auto const workdiv = WorkDiv{arraySize / blockSize, blockSize, Idx{1}}; // auto const workdiv = alpaka::getValidWorkDiv(devAcc, arraySize); auto viewA = llama::View{mapping, llama::Array{reinterpret_cast(alpaka::getPtrNative(d_a))}, Accessor{}}; @@ -270,7 +270,7 @@ struct DotKernel template auto AlpakaStream::dot() -> T { - auto const workdiv = WorkDiv{dotBlockSize, blockSize, 1}; + auto const workdiv = WorkDiv{dotBlockSize, blockSize, Idx{1}}; // auto const workdiv = alpaka::getValidWorkDiv(devAcc, dotBlockSize * blockSize); auto viewA = llama::View{mapping, llama::Array{reinterpret_cast(alpaka::getPtrNative(d_a))}, Accessor{}}; diff --git a/examples/alpaka/babelstream/AlpakaStream.h b/examples/alpaka/babelstream/AlpakaStream.h index d07ac6541b..0c35894961 100644 --- a/examples/alpaka/babelstream/AlpakaStream.h +++ b/examples/alpaka/babelstream/AlpakaStream.h @@ -20,7 +20,7 @@ inline constexpr auto IMPLEMENTATION_STRING = "alpaka/LLAMA"; using Dim = alpaka::DimInt<1>; -using Idx = int; +using Idx = int; // use size_t for large problem sizes using Vec = alpaka::Vec; using Acc = alpaka::ExampleDefaultAcc;