diff options
author | 2021-03-19 08:08:26 -0700 | |
---|---|---|
committer | 2021-03-19 08:08:26 -0700 | |
commit | 0310202ef8a1ffddbb07d708f5232baae8dd7cb5 (patch) | |
tree | 17ff681a0079cad6845057d0bf29e3a080e562fd /Source/Utils/KernelTimer.H | |
parent | 2cc2c5e61f593e5ffeb3989ae125c0473443b733 (diff) | |
download | WarpX-0310202ef8a1ffddbb07d708f5232baae8dd7cb5.tar.gz WarpX-0310202ef8a1ffddbb07d708f5232baae8dd7cb5.tar.zst WarpX-0310202ef8a1ffddbb07d708f5232baae8dd7cb5.zip |
Warnings: PSATD+RZ & More (#1814)
* PSATD+RZ: Fix Warnings
Fix a couple of warnings in PSATD + RZ.
* BesselRoots: Missing Include & using
* Kernel & Util: Unused Code & Var
Diffstat (limited to 'Source/Utils/KernelTimer.H')
-rw-r--r-- | Source/Utils/KernelTimer.H | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/Utils/KernelTimer.H b/Source/Utils/KernelTimer.H index 8c13e1add..b52f0d33b 100644 --- a/Source/Utils/KernelTimer.H +++ b/Source/Utils/KernelTimer.H @@ -21,8 +21,14 @@ public: * (for performance, it is recommended to allocate pinned host memory). */ AMREX_GPU_DEVICE - KernelTimer (const bool do_timing, amrex::Real* cost) - : m_do_timing(do_timing), m_cost(cost) { + KernelTimer +#if (defined AMREX_USE_GPU) + (const bool do_timing, amrex::Real* cost) + : m_do_timing(do_timing), m_cost(cost) +#else + (const bool, amrex::Real*) +#endif + { #if (defined AMREX_USE_GPU) if (do_timing && cost) { #if defined(AMREX_USE_CUDA) || defined(AMREX_USE_HIP) @@ -53,6 +59,7 @@ public: #endif } +#if (defined AMREX_USE_GPU) private: //! Stores whether kernel timer is active. bool m_do_timing; @@ -62,6 +69,7 @@ private: //! Store the time difference (cost) from a single thread. long long int m_wt; +#endif }; #endif |