1 #ifndef SPACE_SETTINGS_HPP
2 #define SPACE_SETTINGS_HPP
3 #include <Kokkos_Core.hpp>
4 #include <Kokkos_Random.hpp>
12 #elif defined(USE_HIP)
13 using MemSpace = Kokkos::Experimental::HIPSpace;
14 using ExSpace = Kokkos::Experimental::HIP;
15 #elif defined(USE_SYCL)
16 using MemSpace = Kokkos::Experimental::SYCLDeviceUSMSpace;
17 using ExSpace = Kokkos::Experimental::SYCL;
18 #elif defined(USE_OMPT)
19 using MemSpace = Kokkos::Experimental::OpenMPTargetSpace;
20 using ExSpace = Kokkos::Experimental::OpenMPTarget;
22 #error USE_GPU is on, but no Kokkos backend specified
30 #elif defined(USE_SERIAL)
33 #error No CPU backend specified (USE_OMP or USE_SERIAL)
54 #elif defined(USE_SERIAL)
57 using HostType = Kokkos::Device<HostExSpace,HostMemSpace>;
60 #ifdef USE_GPU_AWARE_MPI
69 using NoInit = Kokkos::ViewAllocateWithoutInitializing;
72 typedef Kokkos::Random_XorShift64_Pool<DeviceType>
pool_type;
73 typedef typename pool_type::generator_type
RandGen;
76 #ifndef KOKKOS_TEAM_SCRATCH_OPT
77 #define KOKKOS_TEAM_SCRATCH_OPT 0
82 namespace Opt = Kokkos::Experimental;
83 constexpr
static const Kokkos::Experimental::WorkItemProperty::HintLightWeight_t
Async = Kokkos::Experimental::WorkItemProperty::HintLightWeight;
86 # define DEVICE_PRINTF(...) printf(__VA_ARGS__)
88 # define DEVICE_PRINTF(...) sycl::ext::oneapi::experimental::printf(__VA_ARGS__)
Kokkos::Random_XorShift64_Pool< DeviceType > pool_type
Definition: space_settings.hpp:72
Kokkos::CudaSpace MemSpace
Definition: space_settings.hpp:10
Kokkos::Device< HostExSpace, HostMemSpace > HostType
Definition: space_settings.hpp:57
Kokkos::Cuda ExSpace
Definition: space_settings.hpp:11
Kokkos::LayoutRight CLayout
Definition: space_settings.hpp:68
pool_type::generator_type RandGen
Definition: space_settings.hpp:73
Kokkos::HostSpace HostMemSpace
Definition: space_settings.hpp:51
static constexpr const Kokkos::Experimental::WorkItemProperty::HintLightWeight_t Async
Definition: space_settings.hpp:83
Kokkos::Device< ExSpace, MemSpace > DeviceType
Definition: space_settings.hpp:48
Kokkos::OpenMP HostExSpace
Definition: space_settings.hpp:53
HostType MPIDeviceType
Definition: space_settings.hpp:63
Kokkos::ViewAllocateWithoutInitializing NoInit
Definition: space_settings.hpp:69