1 #ifndef AMREX_RANDOM_ENGINE_H_
2 #define AMREX_RANDOM_ENGINE_H_
3 #include <AMReX_Config.H>
8 #if defined(AMREX_USE_HIP)
9 #pragma clang diagnostic push
10 #pragma clang diagnostic ignored "-W#warnings"
11 #include <hiprand/hiprand.hpp>
12 #pragma clang diagnostic pop
13 #elif defined(AMREX_USE_CUDA)
15 #include <curand_kernel.h>
16 #elif defined(AMREX_USE_SYCL)
17 #include <sycl/sycl.hpp>
18 #include <oneapi/mkl/rng.hpp>
19 #include <oneapi/mkl/rng/device.hpp>
20 namespace mkl = oneapi::mkl;
29 using sycl_rng_engine = mkl::rng::device::philox4x32x10<>;
30 using sycl_rng_descr = mkl::rng::device::engine_descriptor<sycl_rng_engine>;
31 using sycl_rng_acc = mkl::rng::device::engine_accessor<sycl_rng_engine>;
33 extern sycl_rng_descr* rand_engine_descr;
36 sycl_rng_descr* getRandEngineDescriptor () {
return rand_engine_descr; }
39 sycl_rng_engine* engine;
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
Definition: AMReX_Amr.cpp:49
curandGenerator_t randGenerator_t
Definition: AMReX_RandomEngine.H:49
AMREX_FORCE_INLINE randState_t * getRandState()
Definition: AMReX_RandomEngine.H:55
curandState_t randState_t
Definition: AMReX_RandomEngine.H:48
amrex::randState_t * gpu_rand_state
Definition: AMReX_Random.cpp:23
Definition: AMReX_RandomEngine.H:57
randState_t * rand_state
Definition: AMReX_RandomEngine.H:58