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)
53 #elif defined(USE_SERIAL)
56 using HostType = Kokkos::Device<HostExSpace,HostMemSpace>;
59 #ifdef USE_GPU_AWARE_MPI
68 using NoInit = Kokkos::ViewAllocateWithoutInitializing;
71 typedef Kokkos::Random_XorShift64_Pool<DeviceType>
pool_type;
72 typedef typename pool_type::generator_type
RandGen;
75 #ifndef KOKKOS_TEAM_SCRATCH_OPT
76 #define KOKKOS_TEAM_SCRATCH_OPT 0
81 namespace Opt = Kokkos::Experimental;
82 constexpr
static const Kokkos::Experimental::WorkItemProperty::HintLightWeight_t
Async = Kokkos::Experimental::WorkItemProperty::HintLightWeight;
85 # define DEVICE_PRINTF(...) printf(__VA_ARGS__)
87 # define DEVICE_PRINTF(...) sycl::ext::oneapi::experimental::printf(__VA_ARGS__)
Kokkos::Random_XorShift64_Pool< DeviceType > pool_type
Definition: space_settings.hpp:71
Kokkos::CudaSpace MemSpace
Definition: space_settings.hpp:10
Kokkos::Device< HostExSpace, HostMemSpace > HostType
Definition: space_settings.hpp:56
Kokkos::Cuda ExSpace
Definition: space_settings.hpp:11
Kokkos::LayoutRight CLayout
Definition: space_settings.hpp:67
pool_type::generator_type RandGen
Definition: space_settings.hpp:72
Kokkos::HostSpace HostMemSpace
Definition: space_settings.hpp:50
static constexpr const Kokkos::Experimental::WorkItemProperty::HintLightWeight_t Async
Definition: space_settings.hpp:82
Kokkos::Device< ExSpace, MemSpace > DeviceType
Definition: space_settings.hpp:47
Kokkos::OpenMP HostExSpace
Definition: space_settings.hpp:52
HostType MPIDeviceType
Definition: space_settings.hpp:62
Kokkos::ViewAllocateWithoutInitializing NoInit
Definition: space_settings.hpp:68