Block-Structured AMR Software Framework
AMReX_GpuAssert.H
Go to the documentation of this file.
1 #ifndef AMREX_GPU_ASSERT_H_
2 #define AMREX_GPU_ASSERT_H_
3 #include <AMReX_Config.H>
4 
5 #if !defined(__APPLE__)
6 
7 #include <cassert>
8 
9 #ifdef AMREX_USE_SYCL
10 # include <sycl/sycl.hpp>
11 #endif
12 
13 #if defined(AMREX_USE_SYCL)
14 # define AMREX_DEVICE_ASSERT(flag) assert(flag)
15 #elif defined(AMREX_USE_CUDA)
16 # define AMREX_DEVICE_ASSERT(flag) assert(flag)
17 #elif defined(AMREX_USE_HIP)
18 # define AMREX_DEVICE_ASSERT(flag) assert(flag)
19 #endif
20 
21 #endif // !defined(__APPLE__)
22 #endif // AMREX_GPU_ASSERT_H_