diff options
Diffstat (limited to 'Source/Utils/WarpXrocfftUtil.cpp')
-rw-r--r-- | Source/Utils/WarpXrocfftUtil.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Source/Utils/WarpXrocfftUtil.cpp b/Source/Utils/WarpXrocfftUtil.cpp new file mode 100644 index 000000000..8af65f1b6 --- /dev/null +++ b/Source/Utils/WarpXrocfftUtil.cpp @@ -0,0 +1,33 @@ +/* Copyright 2023 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ + +#include "WarpXrocfftUtil.H" + +#include <AMReX_Config.H> + +#if defined(AMREX_USE_HIP) && defined(WARPX_USE_PSATD) +// cstddef: work-around for ROCm/rocFFT <=4.3.0 +// https://github.com/ROCmSoftwarePlatform/rocFFT/blob/rocm-4.3.0/library/include/rocfft.h#L36-L42 +# include <cstddef> +# include <rocfft.h> +#endif + +void +utils::rocfft::setup() +{ +#if defined(AMREX_USE_HIP) && defined(WARPX_USE_PSATD) + rocfft_setup(); +#endif +} + +void +utils::rocfft::cleanup() +{ +#if defined(AMREX_USE_HIP) && defined(WARPX_USE_PSATD) + rocfft_cleanup(); +#endif +} |