33 #if (defined AMREX_USE_GPU) 34 (
const bool do_timing, amrex::Real* cost)
35 : m_do_timing(do_timing)
37 (
const bool do_timing, amrex::Real* cost)
40 #if (defined AMREX_USE_GPU) 41 # if (defined WARPX_USE_GPUCLOCK) 42 if (m_do_timing && cost) {
44 # if defined(AMREX_USE_CUDA) || defined(AMREX_USE_HIP) 48 # elif defined(AMREX_USE_DPCPP) 51 "KernelTimer not yet supported for this hardware." );
54 # else // WARPX_USE_GPUCLOCK 56 "`algo.load_balance_costs_update = gpuclock` requires to compile with `-DWarpX_GPUCLOCK=ON`.");
57 # endif // WARPX_USE_GPUCLOCK 58 #else // AMREX_USE_GPU 60 #endif // AMREX_USE_GPU 66 #if (defined AMREX_USE_GPU) 67 if (m_do_timing && m_cost) {
68 # if defined(AMREX_USE_CUDA) || defined(AMREX_USE_HIP) 69 m_wt = clock64() - m_wt;
71 # elif defined(AMREX_USE_DPCPP) 78 #if (defined AMREX_USE_GPU) 84 amrex::Real* m_cost =
nullptr;
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void ignore_unused(const Ts &...)
#define AMREX_ALWAYS_ASSERT_WITH_MESSAGE(EX, MSG)
AMREX_GPU_DEVICE ~KernelTimer()
Destructor.
Definition: KernelTimer.H:65
Defines a timer object to be used on GPU; measures summed thread cycles.
Definition: KernelTimer.H:23
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE T Add(T *sum, T value) noexcept