diff options
author | 2023-03-24 23:42:45 +0100 | |
---|---|---|
committer | 2023-03-24 15:42:45 -0700 | |
commit | a455df61ad2df6fda6e0a27d736776c7ddffc8be (patch) | |
tree | b4f63f7d1219c9a642e8be695ffb29cd5bce6aea /Source/Utils/WarpXrocfftUtil.cpp | |
parent | 9c166ee7f165483b86c5c592bd9d5ec0797965b6 (diff) | |
download | WarpX-a455df61ad2df6fda6e0a27d736776c7ddffc8be.tar.gz WarpX-a455df61ad2df6fda6e0a27d736776c7ddffc8be.tar.zst WarpX-a455df61ad2df6fda6e0a27d736776c7ddffc8be.zip |
Refactoring of main.cpp to improve readability (#3784)
* refactoring of main.cpp to improve readability
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed bug
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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 +} |