Don't use Kokkos internal headers

Don't initialise kokkos view to zero in ctor
Upgrade std to 17 for Kokkos (<17 is warning in 3.6, error is develop)
This commit is contained in:
Tom Lin 2022-08-17 15:09:00 +01:00
parent 80853e66e0
commit 370d378fbc
3 changed files with 4 additions and 6 deletions

View File

@ -14,9 +14,9 @@ KokkosStream<T>::KokkosStream(
{
Kokkos::initialize();
d_a = new Kokkos::View<T*>("d_a", ARRAY_SIZE);
d_b = new Kokkos::View<T*>("d_b", ARRAY_SIZE);
d_c = new Kokkos::View<T*>("d_c", ARRAY_SIZE);
d_a = new Kokkos::View<T*>(Kokkos::ViewAllocateWithoutInitializing("d_a"), ARRAY_SIZE);
d_b = new Kokkos::View<T*>(Kokkos::ViewAllocateWithoutInitializing("d_b"), ARRAY_SIZE);
d_c = new Kokkos::View<T*>(Kokkos::ViewAllocateWithoutInitializing("d_c"), ARRAY_SIZE);
hm_a = new typename Kokkos::View<T*>::HostMirror();
hm_b = new typename Kokkos::View<T*>::HostMirror();
hm_c = new typename Kokkos::View<T*>::HostMirror();

View File

@ -10,8 +10,6 @@
#include <stdexcept>
#include <Kokkos_Core.hpp>
#include <Kokkos_Parallel.hpp>
#include <Kokkos_View.hpp>
#include "Stream.h"

View File

@ -17,7 +17,7 @@ set(KOKKOS_FLAGS_CPU_INTEL -qopt-streaming-stores=always)
macro(setup)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)
cmake_policy(SET CMP0074 NEW) #see https://github.com/kokkos/kokkos/blob/master/BUILD.md
message(STATUS "Building using in-tree Kokkos source at `${KOKKOS_IN_TREE}`")