aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXrocfftUtil.cpp
blob: 8af65f1b6f28aa76e772bdaae8234920d9ecd198 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
}